Explorar o código

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	components/alert/votePopup.vue
hmp %!s(int64=4) %!d(string=hai) anos
pai
achega
9c84ca8db3
Modificáronse 3 ficheiros con 13 adicións e 8 borrados
  1. 10 7
      components/alert/votePopup.vue
  2. 2 0
      main.js
  3. 1 1
      pages/activity/activityDetail.vue

+ 10 - 7
components/alert/votePopup.vue

@@ -13,12 +13,13 @@
 							<image mode="aspectFit" class="gift-img" :src="item.imgUrl"></image>
 							<image mode="aspectFit" class="gift-img" :src="item.imgUrl"></image>
 							<view class="gift-name">{{item.name}}</view>
 							<view class="gift-name">{{item.name}}</view>
 						</view>
 						</view>
-						<view style="color: #999999;font-size: 20rpx;text-align: center;padding-top: 10rpx;">剩余免费次数</view>
+						<view style="color: #999999;font-size: 20rpx;text-align: center;padding-top: 10rpx;">{{item.activeVote==0? '剩余免费次数':'剩余次数'}} {{item.remainCount}}</view>
 					</view>
 					</view>
 				</scroll-view>
 				</scroll-view>
 				
 				
 				<view class="handle-bar">
 				<view class="handle-bar">
-					<view class="text-center padding-bottom-20" style="color: #0A9FEF;font-size: 28rpx;">您目前的移动积分</view>
+					<view v-if="pointNum>=0" class="text-center padding-bottom-20" style="color: #0A9FEF;">您目前的移动积分 {{pointNum}}</view>
+					<view v-else class="text-center padding-bottom-20" style="color: #0A9FEF;">您目前的移动积分 <u-loading style="margin: 10rpx;" mode="circle"></u-loading></view>
 					<view class="button-bar">
 					<view class="button-bar">
 						<view class="button-r">
 						<view class="button-r">
 							<u-count-to v-if="show" color="#E72226" start-val="0" :end-val="gitfs[selected].point" :duration="500"></u-count-to>
 							<u-count-to v-if="show" color="#E72226" start-val="0" :end-val="gitfs[selected].point" :duration="500"></u-count-to>
@@ -43,24 +44,26 @@
 				show: false,
 				show: false,
 				selected: 0,
 				selected: 0,
 				count: 1000,
 				count: 1000,
+				pointNum: -1,
 				gitfs: [],
 				gitfs: [],
 			};
 			};
 		},
 		},
+		
 		methods: {
 		methods: {
-			async showVote(){
-				let params = {
-					mobile: '15016450036'
-				}
+			async showVote(mobile){
+				let params = {mobile}
 				const queryRes = (await this.$api.CMCC.queryCmccPoint(this.$u.queryParams(params)));
 				const queryRes = (await this.$api.CMCC.queryCmccPoint(this.$u.queryParams(params)));
 				if(queryRes.data.data.resultCode == '0001' ){
 				if(queryRes.data.data.resultCode == '0001' ){
 					this.$refs.pointAuth.showAuth(queryRes.data.data.data);
 					this.$refs.pointAuth.showAuth(queryRes.data.data.data);
 					return;
 					return;
 				}
 				}
+				const pointDetail = JSON.parse(queryRes.data.data.data);
+				this.pointNum = pointDetail['points'];
 				const res = await this.$api.activity.getGiftList({userId: 1,current: 1,size: 99});
 				const res = await this.$api.activity.getGiftList({userId: 1,current: 1,size: 99});
 				this.gitfs = res.data.data.records;
 				this.gitfs = res.data.data.records;
 				this.show = true;
 				this.show = true;
 			},
 			},
-			hideVote(){			
+			hideVote(){
 				this.show = false;
 				this.show = false;
 			}
 			}
 		}
 		}

+ 2 - 0
main.js

@@ -64,6 +64,8 @@ import global from 'utils/global.js'
 Vue.prototype.$global = global
 Vue.prototype.$global = global
 //util end
 //util end
 
 
+import config from 'assets/http/config.js'
+Vue.prototype.$config = config
 
 
 //封装api
 //封装api
 import {
 import {

+ 1 - 1
pages/activity/activityDetail.vue

@@ -93,7 +93,7 @@
 				}
 				}
 			},
 			},
 			async showVote(){
 			async showVote(){
-				this.$refs.votePopup.showVote();
+				this.$refs.votePopup.showVote(this.vuex_phone);
 			},
 			},
 			init(){
 			init(){
 				if (this.vuex_phone) {
 				if (this.vuex_phone) {