|
@@ -6,27 +6,27 @@
|
|
|
this.$store.dispatch('getTabBar')
|
|
|
},
|
|
|
onShow: function(options) {
|
|
|
- console.log('App Show:',options)
|
|
|
+ // console.log('App Show:',options)
|
|
|
hasUpdate()
|
|
|
- uni.getSystemInfo({
|
|
|
- success: function (res) {
|
|
|
- console.log('宽度:',res.windowWidth);
|
|
|
- console.log('设备:',res.platform);
|
|
|
- if (res.windowWidth > 600||['windows','mac'].includes(res.platform)) {
|
|
|
- const params=options.query//此处的query就是在pc分享钩子函数中拼接的参数
|
|
|
- let paramsStr=`xcxPath=${decodeURIComponent(options.path)}`
|
|
|
- for(const key in params){
|
|
|
- paramsStr=`${paramsStr}&${key}=${params[key]}`
|
|
|
- }
|
|
|
- console.log('进入pc');
|
|
|
- uni.reLaunch({
|
|
|
- url: `/pages/pc?${paramsStr}`,
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- fail:function(res){
|
|
|
- }
|
|
|
- })
|
|
|
+ // uni.getSystemInfo({
|
|
|
+ // success: function (res) {
|
|
|
+ // console.log('宽度:',res.windowWidth);
|
|
|
+ // console.log('设备:',res.platform);
|
|
|
+ // if (res.windowWidth > 600||['windows','mac'].includes(res.platform)) {
|
|
|
+ // const params=options.query//此处的query就是在pc分享钩子函数中拼接的参数
|
|
|
+ // let paramsStr=`xcxPath=${decodeURIComponent(options.path)}`
|
|
|
+ // for(const key in params){
|
|
|
+ // paramsStr=`${paramsStr}&${key}=${params[key]}`
|
|
|
+ // }
|
|
|
+ // console.log('进入pc');
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url: `/pages/pc?${paramsStr}`,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // fail:function(res){
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
onHide: function() {
|
|
|
console.log('App Hide')
|