Commit 25b9edfc by 程默

fix

parent 393d6252
...@@ -8,12 +8,11 @@ export default { ...@@ -8,12 +8,11 @@ export default {
let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; let extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {};
console.log(extConfig, "-----------extConfig"); console.log(extConfig, "-----------extConfig");
if ( if (
process.env.NODE_ENV == "production" ||
JSON.stringify(extConfig) == "{}" JSON.stringify(extConfig) == "{}"
) { ) {
// extConfig = { mixid: "jordan", shopid: 471 }; extConfig = { mixid: "antgood", shopid: 67 };
extConfig = { "mixid":"xyyx", // extConfig = { "mixid":"xyyx",
"shopid":133 }; // "shopid":133 };
} }
console.log("1444444444", extConfig); console.log("1444444444", extConfig);
this.$store.commit("setExtConfig", extConfig.mixid); this.$store.commit("setExtConfig", extConfig.mixid);
......
...@@ -276,7 +276,6 @@ export default { ...@@ -276,7 +276,6 @@ export default {
setFooterShow(el){ setFooterShow(el){
let afterScrollTop = el.scrollTop; let afterScrollTop = el.scrollTop;
let delta = afterScrollTop - this.beforeScrollTop; let delta = afterScrollTop - this.beforeScrollTop;
let {showFlag} = this.$mp.page.getTabBar().data;
if( if(
delta === 0 || delta === 0 ||
afterScrollTop < 0 || afterScrollTop < 0 ||
...@@ -287,7 +286,6 @@ export default { ...@@ -287,7 +286,6 @@ export default {
this.beforeScrollTop = afterScrollTop; this.beforeScrollTop = afterScrollTop;
return; return;
} }
this.$mp.page.getTabBar().setData({'showFlag':delta>0?'down':'up'})
}, },
scrolltolower(){ scrolltolower(){
console.log("scrolltolower") console.log("scrolltolower")
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div style="width:100%;height:90vh;display:flex;justify-content: center;align-items: center;"> <div style="width:100%;height:90vh;display:flex;justify-content: center;align-items: center;">
<van-loading size="40px" type="spinner"></van-loading> <van-loading size="40px" type="spinner"></van-loading>
</div> </div>
<web-view v-if="withoutScene" :src="'https://test-m-shop.mayi888.cn/?mixid=antgood'" @message="getMessage" @error="handleError" @load="handleLoad"></web-view> <web-view v-if="withoutScene" :src="pageUrl" @message="getMessage" @error="handleError" @load="handleLoad"></web-view>
</div> </div>
</template> </template>
...@@ -25,13 +25,11 @@ export default { ...@@ -25,13 +25,11 @@ export default {
page: "/", page: "/",
location_obj:encodeURIComponent(wx.getStorageSync("location")), location_obj:encodeURIComponent(wx.getStorageSync("location")),
params: "?mixid=" + this.shopId+`&native_test=1&location_obj=${this.location_obj}`, params: "?mixid=" + this.shopId+`&native_test=1&location_obj=${this.location_obj}`,
userInfo: { userInfo: {
nickName: "mpvue", nickName: "mpvue",
avatarUrl: "http://mpvue.com/assets/logo.png" avatarUrl: "http://mpvue.com/assets/logo.png"
}, },
shareUrl: "", shareUrl: "",
//分享 //分享
shopConfig: null, shopConfig: null,
spokesmanGroupId: "", // 代言人的集团id spokesmanGroupId: "", // 代言人的集团id
...@@ -82,24 +80,28 @@ export default { ...@@ -82,24 +80,28 @@ export default {
this.options = options; this.options = options;
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
this.withoutScene = true; let op=wx.getStorageSync("openid")
//获取openId if (op) {
wx.login({ this.params += '&open_id='+wx.getStorageSync("openid");
success: res => { this.withoutScene = true;
this.code = res.code; }else{
login.miniLogin({ code: this.code}).then(res1 => { //获取openId
console.log(res1,555555) wx.login({
if (res1.data.code == 200) { success: res => {
wx.setStorage({ this.code = res.code;
key: "openid", login.miniLogin({ code: this.code}).then(res1 => {
data: res1.data.data.openid if (res1.data.code == 200) {
}); wx.setStorage({
} key: "openid",
this.params += '&open_id='+wx.getStorageSync("openid"); data: res1.data.data.openid
console.log(this.code,77777,this.params) });
}) }
}, this.params += '&open_id='+wx.getStorageSync("openid");
}) this.withoutScene = true;
})
},
})
}
// 移除重复参数 // 移除重复参数
if (options.params) { if (options.params) {
let params=decodeURIComponent(options.params) let params=decodeURIComponent(options.params)
...@@ -324,13 +326,6 @@ export default { ...@@ -324,13 +326,6 @@ export default {
if (ss && !this.params.includes("sessionid")) { if (ss && !this.params.includes("sessionid")) {
this.params +=`&sessionid=${ss}` this.params +=`&sessionid=${ss}`
} }
console.log(this.getTabBar,'312')
if (typeof this.getTabBar === 'function' &&
this.getTabBar()) {
this.getTabBar().setData({
selected: this.index
})
}
}, },
methods: { methods: {
init() { init() {
......
...@@ -316,6 +316,17 @@ export default { ...@@ -316,6 +316,17 @@ export default {
delta: 1 delta: 1
}); });
}else{ }else{
wx.reLaunch({
url: `../index/main?from=login&backpath=${
this.backPath
}&params=${encodeURIComponent(this.backParams)}`
});
return
let parseLink=decodeURIComponent(this.backPath); let parseLink=decodeURIComponent(this.backPath);
let isTabbarIndex =checkTabbarPage(parseLink) let isTabbarIndex =checkTabbarPage(parseLink)
console.log('32111',isTabbarIndex,parseLink,this.backParams) console.log('32111',isTabbarIndex,parseLink,this.backParams)
......
...@@ -42,13 +42,14 @@ export function $themeToLink(data, option) { ...@@ -42,13 +42,14 @@ export function $themeToLink(data, option) {
//判断是否市跳转到tabbar页面 替换首页位置 //判断是否市跳转到tabbar页面 替换首页位置
let isTabbarIndex = checkTabbarPage(parseLink); let isTabbarIndex = checkTabbarPage(parseLink);
// console.log('44',isTabbarIndex) console.log('444444',isTabbarIndex)
if (isTabbarIndex>=0) { if (isTabbarIndex>=0) {
// isTabbarIndex = isTabbarIndex == 0 ? checkTabbarPage('/') : isTabbarIndex // isTabbarIndex = isTabbarIndex == 0 ? checkTabbarPage('/') : isTabbarIndex
// wx.switchTab({ // wx.switchTab({
// url: parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`, // url: parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`,
// }) // })
wx.redirectTo({ console.log(parseLink,'parseLink')
wx.reLaunch({
url: `../index/main?from=home&backpath=${encodeURIComponent(parseLink)}` url: `../index/main?from=home&backpath=${encodeURIComponent(parseLink)}`
}) })
return return
......
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