Authored by 陈峰

fix miniapp login

... ... @@ -9,7 +9,7 @@
},
"scripts": {
"start": "NODE_ENV=\"production\" node app.js",
"dev": "nodemon -e js,hbs -i public/ app.js",
"dev": "nodemon -e js,hbs -i public/ -i dist/ app.js",
"static": "yo-cli dev --config ./build/yo.dev.conf.js",
"build:node": "node ./build/yo.node.conf.js",
"build:sw": "webpack --config ./build/webpack.sw.config.js",
... ...
... ... @@ -41,6 +41,7 @@ yoho = {
isNowApp: /yohonow/i.test(navigator.userAgent || ''),
isMarsApp: /YohoMars/i.test(navigator.userAgent || ''),
isYohoApp: /YohoBuy/i.test(navigator.userAgent || ''),
isMiniApp: /miniProgram/i.test(navigator.userAgent || '') || qs.client_type === 'miniapp',
isApp: /YohoMars/i.test(navigator.userAgent || '') ||
/YohoBuy/i.test(navigator.userAgent || '') ||
/yohonow/i.test(navigator.userAgent || '') ||
... ... @@ -166,6 +167,9 @@ yoho = {
},
goLogin: function(refer, data) {
if (this.isMiniApp) {
return false;
}
let url;
if (refer.indexOf('//') === 0) {
... ...