Преглед изворни кода

1.修复授权
2.测试其他接口

zizhong.wang пре 5 година
родитељ
комит
705a3f84cb

+ 5 - 2
pages/auth/index.vue

@@ -70,7 +70,8 @@
 						encryptedData:myEncryptedData,
 					},
 					success: res => {
-						console.log(res)
+						getApp().globalData.user_phone = res.data.phoneNumber;
+						that.refuseBtn();
 					} 
 				});
 			},
@@ -97,7 +98,7 @@
 						// session_key:getApp().globalData.session_key,
 						// encryptedData:that.encryptedData,
 						auth_status:1,
-						shangjiid:getApp().globalData.lastId
+						shangjiid:getApp().globalData.lastId?getApp().globalData.lastId:getApp().globalData.user_id
 					},
 					success: res => {
 						getApp().globalData.user_id = res.data.msg.id;
@@ -107,6 +108,8 @@
 						getApp().globalData.user_name = res.data.msg.name;
 						getApp().globalData.user_status = res.data.msg.status;
 						getApp().globalData.user_phone = res.data.msg.phone;
+						that.isNeedPhone = res.data.msg.phone;
+						that.isAuth = getApp().globalData.isAuth;
 						// uni.navigateBack({
 						// });
 					} 

+ 1 - 1
pages/selfCenter/cashoutPage/applyPage/index.vue

@@ -75,7 +75,7 @@ export default {
 					success: res => {
 						if (res.data.code === 200) {
 							uni.showToast({
-								title: '提现成功',
+								title: '递交已申请',
 								icon: 'none',
 								duration:2000
 							});

+ 1 - 0
pages/selfCenter/cashoutPage/index.vue

@@ -41,6 +41,7 @@
 
 <script>
 var md5 = require('../../../common/md5.js')
+//0进行中 , 1已到账
 export default {
 	data() {
 		return {

+ 17 - 5
pages/selfCenter/index.vue

@@ -6,9 +6,9 @@
 			</view>
 			<view class="self-auth" v-if='isAuth'>
 				<image :src="userHead" mode=""></image>
-				<view>
-					<text style="margin-left: 10%;">{{userName}}</text>
-					<text style="margin-left: 10%;font-size: 28rpx;" v-if="isAuthPhone">{{userPhone}} </text>
+				<view style="margin-left: 3%;">
+					<text>{{userName}}</text>
+					<text style="font-size: 28rpx;" v-if="isAuthPhone">{{userPhone}} </text>
 					<button type="primary" class="authPhone"  open-type="getPhoneNumber"  style="font-size: 12px;"
 					@getphonenumber="getPhoneNumber" v-else>手机号码授权</button> 
 				</view>
@@ -99,9 +99,9 @@ export default {
 		}
 	},
 	onLoad() {
-		this.switchUserStatus(getApp().globalData.user_status)
 	},
 	onShow() {
+		this.switchUserStatus(getApp().globalData.user_status)
 		this.getUserInfo();
 	},
 	methods: {
@@ -143,7 +143,16 @@ export default {
 				success: res => {
 					if (res.data.code === 200) {
 						console.log(res.data.msg)
-						that.userInfoObj = res.data.msg
+						that.userInfoObj = res.data.msg;
+						that.isAuth = res.data.msg.auth_status === '1';
+						that.isAuthPhone = res.data.msg.phone;
+						if(that.isAuth){
+							that.userName  = getApp().globalData.user_name;
+							that.userHead = getApp().globalData.user_headUrl;
+						}
+					    if(that.isAuthPhone){
+							that.userPhone = res.data.msg.phone;
+						}
 						//that.cashOutList = res.data.msg
 					}
 				}
@@ -230,6 +239,7 @@ export default {
 		
 	 },
 	 cancel(type) {
+		this.userStatus = '审核中'+'&nbsp;&nbsp;&nbsp;'
 	 	this.$refs.showtip.close()
 	 },
 	 change(e) {
@@ -275,6 +285,8 @@ export default {
 	 		success: res => {
 	 			if(res.data.code === 200){
 					getApp().globalData.user_phone = res.data.msg.phoneNumber;
+					that.userPhone = res.data.msg.phoneNumber;
+					that.isAuthPhone = res.data.msg.phoneNumber;
 				}
 	 		} 
 	 	});