Commit cbeeca88 by 李嘉林

直接进入订单详情

parent 4f267b7d
<template> <template>
<div> <div>
<web-view v-if="withoutScene" :src="pageUrl" @message="getMessage" @error="handleError" @load="handleLoad"></web-view> <web-view v-if="withoutScene" :src="newPageUrl" @message="getMessage" @error="handleError" @load="handleLoad"></web-view>
</div> </div>
</template> </template>
...@@ -16,6 +16,7 @@ const { log } = app; ...@@ -16,6 +16,7 @@ const { log } = app;
export default { export default {
data() { data() {
return { return {
newPageUrl: "",
code: '', code: '',
shopId: this.$store.state.mixid, shopId: this.$store.state.mixid,
options: {}, options: {},
...@@ -65,8 +66,9 @@ export default { ...@@ -65,8 +66,9 @@ export default {
if(wx.getStorageSync("enterpriseAccount")){ if(wx.getStorageSync("enterpriseAccount")){
this.params +=`&enterpriseAccount=${wx.getStorageSync("enterpriseAccount")}`; this.params +=`&enterpriseAccount=${wx.getStorageSync("enterpriseAccount")}`;
} }
console.log(this.link,'=======',this.page,'++++++++++++++',this.params,'************')
let pageUrl1 = (this.page.startsWith('http://') || this.page.startsWith('https://'))? (this.page + this.params) : this.link+this.page+this.params let pageUrl1 = (this.page.startsWith('http://') || this.page.startsWith('https://'))? (this.page + this.params) : this.link+this.page+this.params
console.log(pageUrl1,'--------pageUrl1') console.log(pageUrl1,'--------pageUrl1--')
let pageUrl = forUrlAddKey(decodeURIComponent(pageUrl1)); let pageUrl = forUrlAddKey(decodeURIComponent(pageUrl1));
console.log(pageUrl,'--------pageUrl') console.log(pageUrl,'--------pageUrl')
// let pageUrl = this.link+this.page+this.params; // let pageUrl = this.link+this.page+this.params;
...@@ -75,6 +77,10 @@ export default { ...@@ -75,6 +77,10 @@ export default {
}, },
watch: { watch: {
pageUrl(n,o) { pageUrl(n,o) {
if(!this.withoutScene) {
return;
}
this.newPageUrl = this.pageUrl;
// 进入直播页面调用不息屏api // 进入直播页面调用不息屏api
console.log(this.pageUrl,this.pageUrl.includes('/liveBroadcast/lived'),"this.pageUrl.includes('/liveBroadcast/lived')") console.log(this.pageUrl,this.pageUrl.includes('/liveBroadcast/lived'),"this.pageUrl.includes('/liveBroadcast/lived')")
if(this.pageUrl.includes('/liveBroadcast/lived')){ if(this.pageUrl.includes('/liveBroadcast/lived')){
...@@ -123,6 +129,7 @@ export default { ...@@ -123,6 +129,7 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options,'---options')
if(wx.getStorageSync("sessionid")) { if(wx.getStorageSync("sessionid")) {
//清空门店id //清空门店id
...@@ -217,7 +224,8 @@ export default { ...@@ -217,7 +224,8 @@ export default {
} }
options.params && (this.params += "&" + serialize(decodeURIComponent(options.params))); options.params && (this.params += "&" + serialize(decodeURIComponent(options.params)));
} else if (options.from && options.from == "themeLink") { } else if (options.from && options.from == "themeLink") {
log.info('options.from == "themeLink"') log.info('options.from == "themeLink')
console.log('options.from == "themeLink')
// 多主题link // 多主题link
this.page = decodeURIComponent(options.backpath); this.page = decodeURIComponent(options.backpath);
this.params += "&" + decodeURIComponent(options.params); this.params += "&" + decodeURIComponent(options.params);
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
}, },
// 是否开启企业要货 // 是否开启企业要货
whetherOpenEnterprisesWantGoods(){ whetherOpenEnterprisesWantGoods(){
return this.mpApp.globalData.shopInfo.whetherOpenEnterprisesWantGoods==1?1:0 return this.mpApp.globalData.shopInfo && this.mpApp.globalData.shopInfo.whetherOpenEnterprisesWantGoods==1?1:0
}, },
}, },
onShow() { onShow() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment