Explorar el Código

异步处理待解决

shish hace 6 años
padre
commit
7fafa57864

+ 1 - 1
store/src/App.vue

@@ -16,7 +16,7 @@
 			// wxLoginFn()
 			// uni.clearStorage()
 			const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
-			console.log('extConfig', extConfig)
+
 			uni.setStorageSync('account', extConfig.account)
 			// #endif
 			// 开发

+ 1 - 0
store/src/admin/home/console.vue

@@ -26,6 +26,7 @@ export default {
           type: 2
         });
       }
+
     }
   }
 };

+ 7 - 10
store/src/mixins/globalMixins.js

@@ -27,22 +27,19 @@ export default {
 		if (option.account) {
 			uni.setStorageSync('account', option.account)
 		}
+
 		uni.setStorageSync('currentQuery', JSON.stringify(option))
 		if (isLogin() == false) {
-			if (this.init) {
-				// 	if (constant.source == 'store') {
-				// 		getUser()
-				// 	}
-				this.init()
-			}
+
 			wxLoginFn().then(res => {
 				getUser()
 			})
-		} else {
-			if (this.init) {
-				this.init()
-			}
 		}
+
+		if (this.init) {
+			this.init()
+		}
+
 		// getCheckLogin().then(res => {
 		// 	if (constant.source == 'store') {
 		// 		if (res) {

+ 0 - 1
store/src/utils/auth.js

@@ -88,7 +88,6 @@ export async function wxLoginFn(update) {
 			provider: 'weixin',
 			success: res => {
 				uni.setStorageSync('code', res.code)
-				console.log(res.code, 'res.code')
 				resolve(res)
 			}
 		})

+ 1 - 1
store/src/utils/util.js

@@ -180,7 +180,7 @@ export const $formatDate = (num, fmt = 'YYYY-MM-DD HH:mm', all) => {
  * @parmas item.type 为跳转调用的函数 1为navigateTo, 2为redirectTo, 3为reLaunch, 4为switchTab
  */
 export const pageTo = (item) => {
-	console.log('item', item)
+	
 	if (isNumber(item)) {
 		uni.navigateBack({
 			delta: item