|
@@ -3,24 +3,22 @@
|
|
|
checkLogin
|
|
checkLogin
|
|
|
} from './libs/login';
|
|
} from './libs/login';
|
|
|
import {
|
|
import {
|
|
|
- HTTP_REQUEST_URL
|
|
|
|
|
|
|
+ HTTP_REQUEST_URL,
|
|
|
|
|
+ SYSTEM_VERSION
|
|
|
} from './config/app';
|
|
} from './config/app';
|
|
|
import {
|
|
import {
|
|
|
getShopConfig,
|
|
getShopConfig,
|
|
|
- silenceAuth
|
|
|
|
|
|
|
+ silenceAuth,
|
|
|
|
|
+ getSystemVersion
|
|
|
} from '@/api/public';
|
|
} from '@/api/public';
|
|
|
import Auth from '@/libs/wechat.js';
|
|
import Auth from '@/libs/wechat.js';
|
|
|
import Routine from './libs/routine.js';
|
|
import Routine from './libs/routine.js';
|
|
|
import {
|
|
import {
|
|
|
silenceBindingSpread
|
|
silenceBindingSpread
|
|
|
} from "@/utils";
|
|
} from "@/utils";
|
|
|
- import {
|
|
|
|
|
- getCartCounts,
|
|
|
|
|
- } from '@/api/order.js';
|
|
|
|
|
import {
|
|
import {
|
|
|
colorChange,
|
|
colorChange,
|
|
|
getCrmebCopyRight,
|
|
getCrmebCopyRight,
|
|
|
-
|
|
|
|
|
} from '@/api/api.js';
|
|
} from '@/api/api.js';
|
|
|
import {
|
|
import {
|
|
|
getLangJson,
|
|
getLangJson,
|
|
@@ -83,6 +81,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ console.log(this.globalData.cccc)
|
|
|
const queryData = uni.getEnterOptionsSync() // uni-app版本 3.5.1+ 支持
|
|
const queryData = uni.getEnterOptionsSync() // uni-app版本 3.5.1+ 支持
|
|
|
if (queryData.query.spread) {
|
|
if (queryData.query.spread) {
|
|
|
this.$Cache.set('spread', queryData.query.spread);
|
|
this.$Cache.set('spread', queryData.query.spread);
|
|
@@ -97,33 +96,33 @@
|
|
|
silenceBindingSpread(this.globalData)
|
|
silenceBindingSpread(this.globalData)
|
|
|
}
|
|
}
|
|
|
// #ifdef MP
|
|
// #ifdef MP
|
|
|
- if (queryData.query.scene) {
|
|
|
|
|
- let param = this.$util.getUrlParams(decodeURIComponent(queryData.query.scene))
|
|
|
|
|
- console.log(queryData.query.scene)
|
|
|
|
|
- console.log(param)
|
|
|
|
|
- if(param.pid){
|
|
|
|
|
- this.$Cache.set('spread', param.pid);
|
|
|
|
|
- this.globalData.spid = param.pid;
|
|
|
|
|
- this.globalData.pid = param.pid;
|
|
|
|
|
- }else{
|
|
|
|
|
- switch (queryData.scene) {
|
|
|
|
|
- //扫描小程序码
|
|
|
|
|
- case 1047:
|
|
|
|
|
- this.globalData.code = queryData.query.scene;
|
|
|
|
|
- break;
|
|
|
|
|
- //长按图片识别小程序码
|
|
|
|
|
- case 1048:
|
|
|
|
|
- this.globalData.code = queryData.query.scene;
|
|
|
|
|
- break;
|
|
|
|
|
- //手机相册选取小程序码
|
|
|
|
|
- case 1049:
|
|
|
|
|
- this.globalData.code = queryData.query.scene;
|
|
|
|
|
- break;
|
|
|
|
|
- //直接进入小程序
|
|
|
|
|
- case 1001:
|
|
|
|
|
- this.globalData.spid = queryData.query.scene;
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (queryData.query.scene) {
|
|
|
|
|
+ let param = this.$util.getUrlParams(decodeURIComponent(queryData.query.scene))
|
|
|
|
|
+ console.log(queryData.query.scene)
|
|
|
|
|
+ console.log(param)
|
|
|
|
|
+ if (param.pid) {
|
|
|
|
|
+ this.$Cache.set('spread', param.pid);
|
|
|
|
|
+ this.globalData.spid = param.pid;
|
|
|
|
|
+ this.globalData.pid = param.pid;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ switch (queryData.scene) {
|
|
|
|
|
+ //扫描小程序码
|
|
|
|
|
+ case 1047:
|
|
|
|
|
+ this.globalData.code = queryData.query.scene;
|
|
|
|
|
+ break;
|
|
|
|
|
+ //长按图片识别小程序码
|
|
|
|
|
+ case 1048:
|
|
|
|
|
+ this.globalData.code = queryData.query.scene;
|
|
|
|
|
+ break;
|
|
|
|
|
+ //手机相册选取小程序码
|
|
|
|
|
+ case 1049:
|
|
|
|
|
+ this.globalData.code = queryData.query.scene;
|
|
|
|
|
+ break;
|
|
|
|
|
+ //直接进入小程序
|
|
|
|
|
+ case 1001:
|
|
|
|
|
+ this.globalData.spid = queryData.query.scene;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
silenceBindingSpread(this.globalData)
|
|
silenceBindingSpread(this.globalData)
|
|
|
}
|
|
}
|
|
@@ -282,6 +281,19 @@
|
|
|
getCrmebCopyRight().then(res => {
|
|
getCrmebCopyRight().then(res => {
|
|
|
uni.setStorageSync('copyRight', res.data)
|
|
uni.setStorageSync('copyRight', res.data)
|
|
|
})
|
|
})
|
|
|
|
|
+ // #ifdef MP
|
|
|
|
|
+ getSystemVersion().then(res => {
|
|
|
|
|
+ if (res.data.version_code < SYSTEM_VERSION) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '请重新打包并上传小程序',
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {}
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ // #endif
|
|
|
},
|
|
},
|
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
|
onHide() {
|
|
onHide() {
|