Browse Source

我的-银行卡

linbl 1 year ago
parent
commit
dcd64d14ae
6 changed files with 73 additions and 7 deletions
  1. 9 0
      pages.json
  2. 1 1
      pages/index/index.vue
  3. 57 0
      pages/personal/bankInfo.vue
  4. 6 1
      pages/personal/personal.vue
  5. 0 4
      pages/shop/detail.vue
  6. 0 1
      pages/shop/shop.vue

+ 9 - 0
pages.json

@@ -525,6 +525,15 @@
             }
 
         }
+        ,{
+            "path" : "pages/personal/bankInfo",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "银行卡信息",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		"color": "#7A7E83",

+ 1 - 1
pages/index/index.vue

@@ -164,7 +164,7 @@ export default {
 		getNewsList() {
 			this.http.request({
 				url: '/level-one-server/app/TbPortNews/getNewestList',
-				data: { limit: 5 },
+				data: { limit: 3 },
 				success: res => {
 					this.newsList = res.data.data;
 				}

+ 57 - 0
pages/personal/bankInfo.vue

@@ -0,0 +1,57 @@
+<template>
+	<view class="cmain">
+		<view class="form_group">
+			<view class="lable re">开户行</view>
+			<input type="text" placeholder="请输入开户行" v-model="item.bankName" />
+		</view>
+		<view class="form_group">
+			<view class="lable re">银行账号</view>
+			<input type="text" placeholder="请输入银行账号" v-model="item.bankAccount" />
+		</view>
+		</br></br></br>
+		<button class="btn" @click="save()">提交</button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				item: {bankName:'',bankAccount:''},
+			}
+		},
+		onLoad() {
+			this.http.request({
+				url: '/sp-admin/app/AppUser/getBankInfo',
+				success: res => {
+					console.log("res",res)
+					this.item.bankName = res.data.data.bankName;
+					this.item.bankAccount = res.data.data.bankAccount;
+				}
+			})
+		},
+		methods: {
+			save() {
+				let rule = [
+					{ name: 'bankAccount', checkType: 'bank', errorMsg: '银行账号格式不正确' }
+				];
+				if (!this.verify.check(this.item, rule)) {
+					uni.showModal({ content: this.verify.error, showCancel: false });
+					return false;
+				}
+				this.http.request({
+					url: '/sp-admin/app/AppUser/saveBankInfo',
+					data: { bankName:this.item.bankName, bankAccount:this.item.bankAccount },
+					success: res => {
+						uni.showToast({title:"提交成功"})
+						uni.switchTab({ url: '/pages/personal/personal' });
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 6 - 1
pages/personal/personal.vue

@@ -157,6 +157,11 @@
 				</view>
 			</view>
 			<view class="cmd">
+				<view class="s_item" @click="go('/pages/personal/bankInfo')">
+					<text class="icon ic">&#xe662;</text>
+					<text class="title">银行卡</text>
+					<text class="icon arrow">&#xe8f2;</text>
+				</view>
 				<view class="s_item" @click="go('/pages/login/userAgreement?id=1')">
 					<text class="icon ic">&#xe662;</text>
 					<text class="title">用户协议</text>
@@ -257,7 +262,7 @@ export default {
 							url: '/sp-admin/app/AppUser/logout',
 							data: param,
 							success: res => {
-							
+
 							}
 						});
 					}

+ 0 - 4
pages/shop/detail.vue

@@ -20,10 +20,6 @@
 					<text class="desc">{{item.tradeAreaName}}</text>
 				</view>
 				<view class="item">
-					<text class="label">区域</text>
-					<text class="desc">{{item.area}}</text>
-				</view>
-				<view class="item">
 					<text class="label">经营范围</text>
 					<text class="desc">{{item.bnsScope}}</text>
 				</view>

+ 0 - 1
pages/shop/shop.vue

@@ -13,7 +13,6 @@
 					<view style="float: left;margin-right: 10px;">铺主:{{item.ownerName}}</view>
 					<view style="">编号:{{item.shopNo}}</view>
 					<view class="tradeAreaName">{{ item.tradeAreaName }}</view>
-					<view class="date">区域:{{ item.area }}</view>
 				</view>
 				<view class="clear"></view>
 			</view>