李志伟 3 anni fa
parent
commit
f15a8f6c26

BIN
src/assets/bank/ABCbank.png Vedi File


BIN
src/assets/bank/BOCbank.png Vedi File


BIN
src/assets/bank/CCBbank.png Vedi File


BIN
src/assets/bank/jianhang.jpg Vedi File


+ 1
- 1
src/pages/addBankCard/index.jsx Vedi File

@@ -111,7 +111,7 @@ export default withLayout((props) => {
111 111
           <Input type='number' maxlength='11' value={phone} onInput={(e) => setPhone(e.detail.value)} placeholder='请输入银行卡预留手机号' />
112 112
         </View>
113 113
         <View className='bottomBtn'>
114
-          <MyButton loading={loading} value='提现' onClick={onClick} />
114
+          <MyButton loading={loading} value='绑定' onClick={onClick} />
115 115
         </View>
116 116
       </View>
117 117
     </View>

+ 10
- 15
src/pages/bankCard/Card/index.jsx Vedi File

@@ -1,25 +1,20 @@
1
-import { View, Image, Text } from "@tarojs/components"
2
-import logoImg from '@/assets/bank/jianhang.jpg'
1
+import { View, Image } from "@tarojs/components"
3 2
 import './style.less'
4 3
 
5 4
 export default (props) => {
6 5
   const { value, onChange } = props
7
-  let style = { background: `linear-gradient(0deg,#${value.color1},#${value.color2})`  }
8 6
   return (
9
-    <View className='bank' style={style}>
7
+    <View className='bank' style={{ background: `radial-gradient(circle at 0% 0%,#${value.color2},#${value.color1})` }}>
10 8
       <View className='top'>
11
-        <Image className='logo' src={logoImg} />
12
-        <View className='title'>{value.ownerBank}</View>
13
-        <View className='cardType'>储蓄卡</View>
14
-        <View className='light'>Bank</View>
15
-        <View className='unBind' onClick={onChange}>解除绑定</View>
16
-      </View>
17
-      <View className='bottom'>
18
-        <Text className='codeText'>{value.cardNo.substr(0, 4)}</Text>
19
-        <Text className='codeText'>****</Text>
20
-        <Text className='codeText'>****</Text>
21
-        <Text className='codeText'>{value.cardNo.slice(-4)}</Text>
9
+        <View className='ImgBox'>
10
+          <Image src={value.bankCode} className='logo' />
11
+        </View>
12
+        <View className='title'>
13
+          {value.ownerBank}储蓄卡
14
+        </View>
15
+        <View className='codeNo'>****&nbsp;<text>{value.cardNo.slice(-4)}</text></View>
22 16
       </View>
17
+      <View className='unBing' onClick={onChange}>解除绑定</View>
23 18
     </View>
24 19
   )
25 20
 }

+ 28
- 34
src/pages/bankCard/Card/style.less Vedi File

@@ -1,48 +1,42 @@
1 1
 .bank{
2
-  // background: linear-gradient(0deg,#375BCA,#5E93E0);
3
-  border-radius: 40px;
4
-  color: #FFFFFF;
2
+  height: 30vw;
3
+  color: #fff;
5 4
   position: relative;
6
-  font-weight: bold;
7
-  padding: 60px 20px 70px 60px;
8 5
   margin-bottom: 30px;
6
+  border-radius: 20px;
7
+  padding: 30px;
8
+  overflow: hidden;
9
+  box-sizing: border-box;
9 10
   .top{
10 11
     display: flex;
11
-    align-items: center;
12
-    margin-bottom: 40px;
13
-    .logo{
14
-      width: 40px;
15
-      height: 40px;
12
+    .ImgBox{
13
+      width: 60px;
14
+      height: 60px;
15
+      background: #fff;
16 16
       border-radius: 50%;
17
+      display: flex;
18
+      align-items: center;
19
+      justify-content: center;
20
+      margin-right: 30px;
21
+      .logo{
22
+        width: 40px;
23
+        height: 40px;
24
+      }
17 25
     }
18 26
     .title{
19
-      font-size: 36px;
20
-      margin: 0 21px 0 16px;
27
+      width: 48vw;
21 28
     }
22
-    .cardType{
23
-      font-size: 28px;
24
-      font-weight: 400;
25
-    }
26
-    .light{
27
-      font-size: 89px;
28
-      opacity: 0.1;
29
-      position: absolute;
30
-      right: 20px;
31
-      letter-spacing: 10px;
32
-    }
33
-    .unBind{
34
-      font-size: 28px;
29
+    .codeNo{
35 30
       position: absolute;
36
-      right: 20px;
37
-      top: 40px;
31
+      right: 30px;
32
+      view>text{
33
+        font-weight: bold;
34
+      }
38 35
     }
39 36
   }
40
-  .bottom{
41
-    .codeText{
42
-      font-size: 40px;
43
-    }
44
-    .codeText+.codeText{
45
-      margin-left: 1em;
46
-    }
37
+  .unBing{
38
+    position: absolute;
39
+    bottom: 30px;
40
+    right: 30px;
47 41
   }
48 42
 }

+ 8
- 8
src/pages/bankCard/index.jsx Vedi File

@@ -1,10 +1,10 @@
1
-import { useState, useEffect } from "react"
1
+import { useState } from "react"
2 2
 import Taro, { useDidShow } from "@tarojs/taro"
3
-import { View, Image, ScrollView, Text } from "@tarojs/components"
3
+import { View, Image, ScrollView } from "@tarojs/components"
4 4
 import withLayout from '@/layouts'
5 5
 import NullCard from "@/components/NullCard";
6 6
 import CustomNav from "@/components/CustomNav"
7
-import { getBankList, deleteBank,getBankTypeList } from '@/services/bank'
7
+import { getBankList, deleteBank, getBankTypeList } from '@/services/bank'
8 8
 import addImg from '@/assets/bank/addBank.png'
9 9
 import BankCard from './Card'
10 10
 import './style.less'
@@ -41,13 +41,13 @@ export default withLayout((props) => {
41 41
     getList()
42 42
   })
43 43
   const getList = () => {
44
-    getBankList({pageSize:500}).then((res) => {
45
-      getBankTypeList({pageSize:500}).then((res2)=>{
46
-        let list1=[]
44
+    getBankList({ pageSize: 500 }).then((res) => {
45
+      getBankTypeList({ pageSize: 500 }).then((res2) => {
46
+        let list1 = []
47 47
         let current
48 48
         res.records.forEach(item => {
49
-          current= res2.records.filter(v=>item.ownerBank==v.name)[0]
50
-          list1.push({...item,color1:current.color1,color2:current.color2})
49
+          current = res2.records.filter(v => item.ownerBank == v.name)[0]
50
+          list1.push({ ...item, color1: current.color1, color2: current.color2, bankCode: current.bankCode })
51 51
         });
52 52
         setBankList(list1)
53 53
       })