Procházet zdrojové kódy

7.10日下班提交

李万涛 před 2 roky
rodič
revize
00dfd16311
2 změnil soubory, kde provedl 93 přidání a 11 odebrání
  1. 8 1
      api/my/index.js
  2. 85 10
      pages/user/commission/withdraw.vue

+ 8 - 1
api/my/index.js

xqd
@@ -91,4 +91,11 @@ export const quesRecord = (params, config = {}) => http.post('/chat/list', param
 
 
 //提交问答
-export const sendGpt = (params, config = {}) => http.post('/chat/send', params, config)
+export const sendGpt = (params, config = {}) => http.post('/chat/send', params, config)
+
+//保存提现信息
+export const withDrawInfo = (params, config = {}) => http.post('/chat/send', params, config)
+
+
+//回显提现信息
+export const saveWithDrawInfo = (params, config = {}) => http.post('/chat/send', params, config)

+ 85 - 10
pages/user/commission/withdraw.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -110,12 +110,20 @@
 					<view class="content_box modal-content">
 						<u-radio-group v-model="selectedWithdrawType" activeColor="#A36FFF" wrap
 							v-for="(item, index) in withdrawList" :key="index">
-							<view class="type-item">
-								<u-radio shape="circle" iconSize="30" :name="item.type" labelWidth="100%">
-								</u-radio>
-								<view class="item-left u-flex u-col-center u-m-l-30">
-									<image class="item-img" :src="item.icon" mode=""></image>
-									<view class="item-title u-m-l-20">{{item.title}}</view>
+							<view class="type-item"
+								style="display: flex;align-items: center;justify-content: space-between;">
+								<view class="" style="display: flex;align-items: center; ">
+									<u-radio shape="circle" iconSize="30" :name="item.type" labelWidth="100%">
+									</u-radio>
+									<view class="item-left u-flex u-col-center u-m-l-30">
+										<image class="item-img" :src="item.icon" mode=""></image>
+										<view class="item-title u-m-l-20">{{item.title}}</view>
+									</view>
+								</view>
+
+								<view class="" style="color: rgb(163, 111, 255);width: 100rpx;"
+									@click="updateWithDrawInfo(index+1)">
+									修改
 								</view>
 							</view>
 						</u-radio-group>
@@ -176,14 +184,17 @@
 
 	import {
 		sysParms,
-		applyWithdraw
+		applyWithdraw,
+		withDrawInfo,
+		saveWithDrawInfo
 	} from '@/api/my/index.js'
 	// import FormValidate from '@/shopro/validate/form';
 	// import wechat from '@/shopro/wechat/wechat';
 
 	import {
 		taskCount,
-		recommendCount
+		recommendCount,
+
 	} from '@/api/my/index.js'
 	export default {
 
@@ -249,7 +260,9 @@
 				dayCash: 0,
 				methods: [],
 				cardNum: '',
-				bankName: ''
+				bankName: '',
+
+				withDrawInfo: {}
 			};
 		},
 		computed: {
@@ -273,6 +286,15 @@
 			}
 		},
 		async onLoad(o) {
+			// let ress6 = await withDrawInfo()
+
+			// if (ress6.code == 0) {
+			// 	console.log('用户保存的提现信息', ress6);
+			// 	this.withDrawInfo = ress6.data
+			// }
+
+
+
 			this.withDrawType = o.type
 
 			let ress = await sysParms()
@@ -314,6 +336,25 @@
 			}
 		},
 		methods: {
+			updateWithDrawInfo(i) {
+				this.showWithdrawList = false;
+				this.showBindForm = true
+				this.selectedWithdrawType = i
+
+
+				// if (i == 1) {
+				// 	this.bankName = '123'
+				// } else if (i == 1) {
+
+				// } else {
+
+				// }
+
+
+			},
+
+
+
 			async confirmWithdraw() {
 				const that = this;
 				// 类型(1.余额 2.分销)
@@ -445,7 +486,7 @@
 				wechat.bind();
 				that.getWithdrawInfo();
 			},
-			exchange() {
+			async exchange() {
 				let that = this;
 				if (this.selectedWithdrawType == 1) {
 					if (!that.cardNum) {
@@ -519,6 +560,40 @@
 					bank_name: this.bankName,
 					qrcode_url: this.paymentcode
 				});
+
+				// let res7 = await saveWithDrawInfo({
+				// 	real_name: this.realname,
+				// 	card_num: this.cardNum,
+				// 	bank_name: this.bankName,
+				// 	qrcode_url: this.paymentcode
+				// })
+				// console.log('提交保存的提现信息', {
+				// 	real_name: this.realname,
+				// 	card_num: this.cardNum,
+				// 	bank_name: this.bankName,
+				// 	qrcode_url: this.paymentcode
+				// });
+				// if (res7.code == 0) {
+				// 	this.confirmWithdraw()
+				// 	this.selectedWithdrawType = 2
+				// 	this.money = ''
+				// 	this.realname = ''
+				// 	this.cardNum = ''
+				// 	this.bankName = ''
+				// 	this.paymentcode = ''
+				// 	console.log('提现参数重置后', {
+				// 		type: this.withDrawType,
+				// 		method: this.selectedWithdrawType,
+				// 		amount: this.money,
+
+				// 		real_name: this.realname,
+				// 		card_num: this.cardNum,
+				// 		bank_name: this.bankName,
+				// 		qrcode_url: this.paymentcode
+				// 	});
+				// }
+
+
 				return
 				that.$http('commission.update', {
 					real_name: that.realname,