he2802 4 år sedan
förälder
incheckning
62c28882a9
2 ändrade filer med 5 tillägg och 2 borttagningar
  1. 3 0
      common/request.js
  2. 2 2
      pages2/wd/ranking.vue

+ 3 - 0
common/request.js

@@ -6,6 +6,7 @@ const BASE_URL = 'http://192.168.1.222:8088'
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
+var  refreshIng = false
 export const myRequest = (options) => {
 	// uni.showLoading({
 	// 	title:'拼命加载中...'
@@ -52,7 +53,9 @@ export const myRequest = (options) => {
 			method: 'get',
 			noToken: true
 		}
+		refreshIng = true //防止同时多次刷新令牌
 		const res = await myRequest(datas)
+		refreshIng = false
 		if (res.data.code === 200) {
 			uni.setStorageSync('token', res.data.data.token)
 

+ 2 - 2
pages2/wd/ranking.vue

@@ -88,7 +88,7 @@
 								</view>
 							</u-col>
 							<u-col span="2" text-align="left">
-								<view class="rank_t4">{{ item.hourse }}h</view>
+								<view class="rank_t4">{{ item.hourse }}</view>
 							</u-col>
 						</u-row>
 					</view>
@@ -109,7 +109,7 @@
 								</view>
 							</u-col>
 							<u-col span="2" text-align="left">
-								<view class="rank_t4">{{ item.hourse }}h</view>
+								<view class="rank_t4">{{ item.hourse }}</view>
 							</u-col>
 						</u-row>
 					</view>