Przeglądaj źródła

主页定位获取延时

wkyy 3 lat temu
rodzic
commit
382e8c2035
3 zmienionych plików z 13 dodań i 3 usunięć
  1. 1 1
      apis/user.js
  2. 11 1
      pages/index/index.vue
  3. 1 1
      pages/user/phone.vue

+ 1 - 1
apis/user.js

@@ -77,7 +77,7 @@ export function changePhone  (data) {
 	return request({
 		method: 'get',
 		data:data ,
-		url: '/mobile/regUser/changePhone '
+		url: '/mobile/regUser/changePhone'
 	})
 }
 

+ 11 - 1
pages/index/index.vue

@@ -230,6 +230,7 @@
 		data() {
 			return {
 				timeOut: false,
+				pointTimeOut: true,
 				stationData: {},
 				chargeList: [],
 				activityList: [],
@@ -260,6 +261,7 @@
 		},
 		onUnload() {
 			this.timeOut = false;
+			this.pointTimeOut = false;
 		},
 		onReachBottom() {
 			if (this.newsList.length < this.recordsTotal) {
@@ -277,12 +279,20 @@
 			}).catch(error => {
 				console.log(res)
 			})
+			
 
-			this.getPoint();
+			this.getPointTimeOut();
 			this.getNewsList();
 			this.getActivityInfoList();
 		},
 		methods: {
+			getPointTimeOut() {
+				if(this.pointTimeOut){
+					setTimeout(()=>{
+						this.getPoint();
+					},1000)
+				}
+			},
 			getFindChargeData() {
 				uni.showLoading({
 					title: "加载中",

+ 1 - 1
pages/user/phone.vue

@@ -17,7 +17,7 @@
 		
 		<u-button class="login-btn" type="success" shape="circle" @click="sure">确定修改</u-button>
 		
-		<u-verification-code :seconds="sendMsgSecond" ref="uCode" @change="codeChange" @end="end" @start="start" change-text="已发送(XS)">
+		<u-verification-code :seconds="sendMsgSecond" ref="uCode" @change="codeChange" @end="end" @start="start" change-text="已发送(Xs)">
 		</u-verification-code>
 	</view>
 </template>