diff --git a/App.vue b/App.vue index 4682dd0..8b5d6db 100644 --- a/App.vue +++ b/App.vue @@ -8,22 +8,22 @@ onShow: function() { // 判断浏览器环境 var ua = navigator.userAgent.toLowerCase(); - if (ua.search(/MicroMessenger/i) > -1 && !uni.getStorageSync('appType')) { - // 微信环境 - uni.setStorageSync('appType', 2) - http.mpAuthLogin() - } - const state = util.getUrlKey('state') - const code = util.getUrlKey('code') - if ((state == 'needCode' || state == 'unNeedCode') && code) { - let path = window.location.href - if (path.indexOf('code=') > 0 && path.indexOf('&state=unNeedCode') > -1) { - http.mpLogin(null, code) - path = path.substring(0, path.indexOf('code=') - 1) - history.replaceState({}, '', path) - } + // if (ua.search(/MicroMessenger/i) > -1 && !uni.getStorageSync('appType')) { + // // 微信环境 + // uni.setStorageSync('appType', 2) + // http.mpAuthLogin() + // } + // const state = util.getUrlKey('state') + // const code = util.getUrlKey('code') + // if ((state == 'needCode' || state == 'unNeedCode') && code) { + // let path = window.location.href + // if (path.indexOf('code=') > 0 && path.indexOf('&state=unNeedCode') > -1) { + // http.mpLogin(null, code) + // path = path.substring(0, path.indexOf('code=') - 1) + // history.replaceState({}, '', path) + // } http.getCartCount() - } + // } }, globalData: { // 定义全局请求队列 diff --git a/package.json b/package.json index 31ef0a9..01384b0 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,10 @@ "author": "", "license": "ISC", "devDependencies": { - "uni-read-pages": "^1.0.5", - "query-string": "^6.13.1" + "query-string": "^6.13.1", + "uni-read-pages": "^1.0.5" + }, + "dependencies": { + "crypto-js": "^4.1.1" } } diff --git a/pages/accountLogin/accountLogin.vue b/pages/accountLogin/accountLogin.vue index 76439b9..06b807b 100644 --- a/pages/accountLogin/accountLogin.vue +++ b/pages/accountLogin/accountLogin.vue @@ -33,6 +33,7 @@