lyqu hace 4 años
padre
commit
39f9a5ff43
Se han modificado 1 ficheros con 25 adiciones y 0 borrados
  1. 25 0
      pages/activityList/activity/bankCard.vue

+ 25 - 0
pages/activityList/activity/bankCard.vue

@@ -47,6 +47,20 @@
 			<view style="padding: 0 60upx;">
 				<u-line color="#d4d4d4"></u-line>
 			</view>
+			<view class="flex align-center" style="padding: 20upx 60upx;">
+				<view style="width: 160upx;font-family: PingFang SC;font-weight: bold;color: #000000;"><text class="text-red">*</text>提现密码</view>
+				<u-input v-model="password1" type="password" :password-icon="true" placeholder="请输入提现密码" :clearable="false" />
+			</view>
+			<view style="padding: 0 60upx;">
+				<u-line color="#d4d4d4"></u-line>
+			</view>
+			<view class="flex align-center" style="padding: 20upx 60upx;">
+				<view style="width: 160upx;font-family: PingFang SC;font-weight: bold;color: #000000;"><text class="text-red">*</text>再次确认</view>
+				<u-input v-model="password2" type="password" :password-icon="true" placeholder="请再次确认密码" :clearable="false" />
+			</view>
+			<view style="padding: 0 60upx;">
+				<u-line color="#d4d4d4"></u-line>
+			</view>
 			<view class="flex align-center" style="padding: 20upx 60upx;">
 				<view style="width: 160upx;font-family: PingFang SC;font-weight: bold;color: #000000;"><text class="text-white">*</text>验证码</view>
 				<u-input v-model="code" placeholder="请输入验证码" :clearable="false" />
@@ -61,6 +75,7 @@
 </template>
 
 <script>
+	import md5Libs from "uview-ui/libs/function/md5";
 	export default {
 		data() {
 			return {
@@ -75,6 +90,8 @@
 					realName: '',
 					phone: '',
 				},
+				password1: '',
+				password2: '',
 				accountType: [],
 				accountShow: false,
 				code: '',
@@ -227,6 +244,13 @@
 					})
 					return;
 				}
+				if (this.password1 != this.password2) {
+					uni.showToast({
+						icon: "none",
+						title: '密码不一致',
+					})
+					return;
+				}
 				let url = 'huawei/sms/validCode?phone=' + this.cardInfo.phone + '&code=' + this.code;
 				this.$u.post(url).then(res => {
 					if (res == 'success') {
@@ -246,6 +270,7 @@
 				})
 			},
 			saveCardInfo() {
+				this.cardInfo.withdrawPossword = md5Libs.md5(this.password1);
 				this.cardInfo.userId = uni.getStorageSync("userId");
 				this.$u.api.bankCard.bindCard(this.cardInfo).then(res => {
 					console.log("插入成功",res);