Pārlūkot izejas kodu

Merge branch 'master' of http://192.168.1.218:3000/liyingqu/cyzh-SoundOfMusic-H5

lyqu 4 gadi atpakaļ
vecāks
revīzija
aefe2ede63

+ 1 - 1
common/http/http.api.js

@@ -122,7 +122,7 @@ const install = (Vue, vm) => {
 		withdrawrecords:(params = {}) => vm.$u.get(userUrl.withdrawRecords, params),
 		mineData:(params = {}) => vm.$u.get(userUrl.mineData, params),
 		statisticalList:(params = {}) => vm.$u.get(userUrl.statisticalList, params),
-		withdraw:(params = {}) => vm.$u.post(userUrl.withdraw, params),
+		withdraw:(params = {},q) => vm.$u.post(userUrl.withdraw+'?withdrawPassword='+q, params),
 		//提现 end
 	}
 	

+ 1 - 0
common/utils/global.js

@@ -1,6 +1,7 @@
 let global = {
 	baseUrl: 'https://yyzs.nanyue6688.com/ldt/api'
 	// baseUrl: 'http://192.168.1.168:9612'
+	// baseUrl: 'http://192.168.1.244:9612'
 }
 
 export default global

+ 1 - 1
components/goods/goods.vue

@@ -88,7 +88,7 @@
 	    padding: 0 30rpx;
 	    .list{
 	      width: 49%;
-	      height: 510rpx;
+	      height: 530rpx;
 	      margin-bottom: 20rpx;
 	      background-color: #FFFFFF;
 	      border-radius: 10rpx;

+ 5 - 5
pages/activityList/activity/bankCard.vue

@@ -40,10 +40,6 @@
 			<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="cardInfo.phone" placeholder="请输入手机号码" :clearable="false" />
-			</view>
 			<view style="padding: 0 60upx;">
 				<u-line color="#d4d4d4"></u-line>
 			</view>
@@ -61,6 +57,10 @@
 			<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="cardInfo.phone" placeholder="请输入手机号码" :clearable="false" />
+			</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" />
@@ -270,7 +270,7 @@
 				})
 			},
 			saveCardInfo() {
-				this.cardInfo.withdrawPossword = md5Libs.md5(this.password1);
+				this.cardInfo.withdrawPassword = md5Libs.md5(this.password1);
 				this.cardInfo.userId = uni.getStorageSync("userId");
 				this.$u.api.bankCard.bindCard(this.cardInfo).then(res => {
 					console.log("插入成功",res);

+ 25 - 11
pages/activityList/activity/doAwards.vue

@@ -1,5 +1,11 @@
 <template>
 	<view>
+		<u-modal :mask-close-able="true" confirm-text="确定提现" @confirm="confirm" v-model="passwordShow" title="提示">
+			<view class="slot-content" style="padding: 20rpx;">
+				<u-input v-model="withdrawPassword" placeholder="请填写提现密码" type="password" />
+			</view>
+		</u-modal>
+		
 		<view class="bg-img flex justify-center align-center" style="background-image: url('https://upload-file-data.obs.cn-south-1.myhuaweicloud.com/97d63ec49f544a33a6a8cc3c0b64b17a-songRankBgImg.png');height: 302upx;">
 			<view class="text-white" >
 				<text class="text-lg">提现金额:</text>
@@ -27,13 +33,11 @@
 			</view>
 		</view>
 		<view class="" style="height: 140rpx;"></view>
-		<view class="footer-fixed flex align-center justify-between padding bg-white" style="border-top: 1rpx solid #e5e5e5;z-index: 9;">
-			<view class="flex align-center" style="width: 60%;">
-				<view>提现密码:</view>
-				<u-input v-model="password" type="password" :password-icon="true" placeholder="请输入提现密码" :clearable="false" />
-			</view>
+		<view 
+			class="footer-fixed flex align-center justify-end padding bg-white"
+			style="padding: 30rpx;;border-top: 1rpx solid #e5e5e5;z-index: 9;">
 			<button class="cu-btn round text-white theme-bg-color" style="width: 180upx;height: 80upx;"
-				@click="withdraw">确认提现</button>
+				@click="withdraw">提现</button>
 		</view>
 	</view>
 </template>
@@ -62,10 +66,11 @@
 		},
 		data() {
 			return {
-				password: '',
 				userId:'',
 				list:[],
-				withdrawList:[]
+				withdrawList:[],
+				withdrawPassword:'',
+				passwordShow:false
 			}
 		},
 		onLoad(options) {
@@ -97,13 +102,22 @@
 				})
 			},
 			withdraw(){
+				this.passwordShow=true
+			},
+			confirm(){
+				if (this.$u.test.isEmpty(this.withdrawPassword)) {
+					this.$u.toast("请填写提现密码")
+					return
+				}
 				if (this.total<=0) {
 					this.$u.toast("请输入正确的兑换金额")
 					return
 				}
-				this.$u.api.user.withdraw(this.withdrawList).then(res=>{
-					if (res) {
-						this.$dialog.showModal(res+",请耐心等待",false).then(res=>{
+				this.$u.api.user.withdraw(this.withdrawList,md5Libs.md5(this.withdrawPassword)).then(res=>{
+					if (res.code==400) {
+						this.$dialog.showModal(res.msg,false)
+					}else{
+						this.$dialog.showModal(res,false).then(res=>{
 							uni.navigateBack({
 								delta:1
 							})