修复分销和商品详情无法生成关系的问题
This commit is contained in:
@ -48,36 +48,20 @@
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
}
|
||||
if (this.$store.getters.token) {
|
||||
this.toLaunch();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// cookie.get("spread");
|
||||
// if (this.$deviceType == "weixin") {
|
||||
// let path = parseQuery().path
|
||||
// console.log(this)
|
||||
// if (path) {
|
||||
// this.$yrouter.push({
|
||||
// path
|
||||
// });
|
||||
// } else {
|
||||
// this.$yrouter.switchTab({
|
||||
// path: "/pages/home/index"
|
||||
// });
|
||||
// }
|
||||
|
||||
// return
|
||||
// if (this.$deviceType == "app" || this.$deviceType == "weixinh5") {
|
||||
// this.$yrouter.switchTab({
|
||||
// path: "/pages/home/index"
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// this.toLaunch();
|
||||
if (this.$deviceType == "app" || this.$deviceType == "weixinh5") {
|
||||
// this.toLaunch();
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
if (this.$store.getters.token) {
|
||||
// 如果token存在,直接进行进页面
|
||||
console.log('登录状态存在,直接进页面')
|
||||
this.toLaunch();
|
||||
return;
|
||||
}
|
||||
console.log('进行登录操作')
|
||||
login().finally(() => {
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
@ -89,9 +73,18 @@
|
||||
toLaunch() {
|
||||
console.log("loading home");
|
||||
this.changeAuthorization(false);
|
||||
this.$yrouter.switchTab({
|
||||
path: "/pages/home/index"
|
||||
});
|
||||
let redirect = cookie.get('redirect')
|
||||
if (redirect) {
|
||||
redirect = redirect.split('/pages')[1]
|
||||
this.$yrouter.replace({
|
||||
path: '/pages' + redirect,
|
||||
});
|
||||
cookie.remove('redirect');
|
||||
} else {
|
||||
this.$yrouter.replace({
|
||||
path: '/pages/home/index',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<view class="bargain on">
|
||||
<!-- 在header上加 on 为请求支援 -->
|
||||
<view :class="[bargainPartake != userInfo.uid ? 'wrapper bargain-box on user' : 'wrapper bargain-box user']" v-if="bargainPartake != userInfo.uid">
|
||||
<view :class="[bargainPartake != userInfo.uid ? 'wrapper bargain-box on user' : 'wrapper bargain-box user']"
|
||||
v-if="bargainUserInfo && bargainPartake != userInfo.uid">
|
||||
<!-- <view class="people">{{ lookCount }}人查看 丨 {{ shareCount }}人分享 丨 {{ userCount }}人参与</view> -->
|
||||
<!-- 帮助砍价、帮砍成功:-->
|
||||
<view class="pictxt acea-row row-center-wrapper " >
|
||||
<view class="pictxt acea-row row-center-wrapper ">
|
||||
<div class="bargain-header">
|
||||
<view class="pictrue">
|
||||
<image :src="bargainUserInfo.avatar" />
|
||||
@ -305,7 +306,7 @@
|
||||
} else {
|
||||
that.bargainPartake = parseInt(this.partake);
|
||||
}
|
||||
|
||||
|
||||
that.getBargainHelpCountStart();
|
||||
that.getBargainDetail();
|
||||
that.getBargainShare(0);
|
||||
@ -505,11 +506,17 @@
|
||||
that.helpListStatus = res.data.length < that.limit;
|
||||
that.helpListLoading = false;
|
||||
that.page++;
|
||||
that.bargainHelpList.push.apply(that.bargainHelpList, res.data);
|
||||
if (res.data) {
|
||||
that.bargainHelpList.push.apply(that.bargainHelpList, res.data);
|
||||
}
|
||||
})
|
||||
.catch(res => {
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
if(!err.msg){
|
||||
return
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
|
@ -303,8 +303,15 @@
|
||||
computed: mapGetters(["isLogin", "location"]),
|
||||
mounted: function () {
|
||||
let url = handleQrCode();
|
||||
if (url && url.productId) {
|
||||
this.id = url.productId;
|
||||
if (url && url.id) {
|
||||
this.id = url.id;
|
||||
var spread = cookie.get("spread");
|
||||
let urlSpread = parseInt(url.spread);
|
||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
} else if (spread === 0 || typeof spread !== "number") {
|
||||
cookie.set("spread", urlSpread || 0);
|
||||
}
|
||||
} else {
|
||||
this.id = this._route.query.id;
|
||||
}
|
||||
@ -326,7 +333,8 @@
|
||||
return {
|
||||
title: this.storeInfo.storeName,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/shop/GoodsCon/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid")+"&pageType=good&codeType=routine",
|
||||
path: "pages/shop/GoodsCon/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid") +
|
||||
"&pageType=good&codeType=routine",
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
@ -593,7 +601,7 @@
|
||||
//选择属性;
|
||||
ChangeAttr: function (res) {
|
||||
// 修改了规格
|
||||
|
||||
|
||||
let productSelect = this.productValue[res.value];
|
||||
if (productSelect) {
|
||||
this.attr.productAttr[res.indexw].index = res.indexn;
|
||||
@ -754,10 +762,10 @@
|
||||
configAppMessage
|
||||
)
|
||||
.then((res) => {
|
||||
|
||||
|
||||
})
|
||||
.catch((res) => {
|
||||
|
||||
|
||||
if (res.is_ready) {
|
||||
res.wx.updateAppMessageShareData(configAppMessage);
|
||||
res.wx.updateTimelineShareData(configAppMessage);
|
||||
@ -776,10 +784,10 @@
|
||||
configAppMessage
|
||||
)
|
||||
.then((res) => {
|
||||
|
||||
|
||||
})
|
||||
.catch((res) => {
|
||||
|
||||
|
||||
if (res.is_ready) {
|
||||
res.wx.updateAppMessageShareData(configAppMessage);
|
||||
res.wx.updateTimelineShareData(configAppMessage);
|
||||
|
Reference in New Issue
Block a user