小程序详情页面分享不能生成分销关系->首页还是有问题。
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
|
||||
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
|
||||
export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api';
|
||||
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static';
|
||||
|
@ -254,7 +254,7 @@
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/activity/GroupDetails/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid"),
|
||||
path: "pages/activity/GroupDetails/index?id="+this.storeInfo.id+"&spread=" + uni.getStorageSync("uid")+"&pageType=good&codeType=routine",
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
|
@ -171,7 +171,7 @@
|
||||
return {
|
||||
title: this.storeInfo.title,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/activity/GoodsSeckill/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid"),
|
||||
path: "pages/activity/GoodsSeckill/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid")+"&pageType=good&codeType=routine",
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
|
@ -326,7 +326,7 @@
|
||||
return {
|
||||
title: this.storeInfo.storeName,
|
||||
imageUrl: this.storeInfo.image,
|
||||
path: "pages/shop/GoodsCon/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid"),
|
||||
path: "pages/shop/GoodsCon/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid")+"&pageType=good&codeType=routine",
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '分享成功'
|
||||
|
103
utils/index.js
103
utils/index.js
@ -818,9 +818,105 @@ export const handleLoginFailure = () => {
|
||||
console.log(store.getters)
|
||||
console.log('————————')
|
||||
store.commit("updateAuthorizationPage", true);
|
||||
|
||||
let path = '/' + getCurrentPageUrlWithArgs()
|
||||
console.log("getCurrentPageUrl",getCurrentPageUrl());
|
||||
//判断小程序转发分享商品详情进来的
|
||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleUrlParam(path) && !handleQrCode()) {
|
||||
debugger;
|
||||
console.log('————————')
|
||||
console.log('判断小程序转发分享商品详情进来的')
|
||||
console.log(' handleUrlParam()', handleUrlParam(path))
|
||||
|
||||
let url = handleUrlParam(path);
|
||||
console.log(url)
|
||||
if (url) {
|
||||
path = parseUrl({
|
||||
path: `/${getCurrentPageUrl()}`,
|
||||
query: {
|
||||
id: url.id,
|
||||
}
|
||||
})
|
||||
cookie.set("spread", url.spread || 0);
|
||||
} else {
|
||||
handleNoParameters()
|
||||
console.log('————————')
|
||||
console.log('是扫描的商品详情进来的,但是没有获取到参数')
|
||||
console.log('————————')
|
||||
}
|
||||
}
|
||||
|
||||
// 是分享转发拼团进来的
|
||||
if (getCurrentPageUrl() == 'pages/activity/GroupDetails/index' && handleUrlParam(path) && !handleQrCode()) {
|
||||
console.log('————————')
|
||||
console.log('是分享转发拼团进来的')
|
||||
console.log('————————')
|
||||
|
||||
let url = handleUrlParam(path);
|
||||
console.log(url)
|
||||
if (url) {
|
||||
path = parseUrl({
|
||||
path: `/${getCurrentPageUrl()}`,
|
||||
query: {
|
||||
id: url.id,
|
||||
}
|
||||
})
|
||||
cookie.set("spread", url.spread || 0);
|
||||
} else {
|
||||
console.log('————————')
|
||||
console.log('是拼团进来的,但是没有获取到参数')
|
||||
console.log('————————')
|
||||
handleNoParameters()
|
||||
}
|
||||
}
|
||||
|
||||
// 是分享转发秒杀进来的
|
||||
if (getCurrentPageUrl() == 'pages/activity/SeckillDetails/index' && handleUrlParam(path) && !handleQrCode()) {
|
||||
console.log('————————')
|
||||
console.log('是分享转发秒杀进来的')
|
||||
console.log('————————')
|
||||
|
||||
let url = handleUrlParam(path);
|
||||
console.log(url)
|
||||
if (url) {
|
||||
path = parseUrl({
|
||||
path: `/${getCurrentPageUrl()}`,
|
||||
query: {
|
||||
id: url.id,
|
||||
}
|
||||
})
|
||||
cookie.set("spread", url.spread || 0);
|
||||
} else {
|
||||
console.log('————————')
|
||||
console.log('是秒杀进来的,但是没有获取到参数')
|
||||
console.log('————————')
|
||||
handleNoParameters()
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是不是转发分享的砍价海报进来的
|
||||
if (getCurrentPageUrl() == 'pages/activity/DargainDetails/index' && handleUrlParam(path) && !handleQrCode()) {
|
||||
console.log('————————')
|
||||
console.log('判断是不是转发分享的砍价海报进来的')
|
||||
console.log('————————')
|
||||
let url = handleUrlParam(path);
|
||||
if (url) {
|
||||
path = parseUrl({
|
||||
path: `/${getCurrentPageUrl()}`,
|
||||
query: {
|
||||
id: url.bargainId,
|
||||
partake: url.uid
|
||||
}
|
||||
})
|
||||
cookie.set("spread", url.spread || 0);
|
||||
} else {
|
||||
handleNoParameters()
|
||||
console.log('————————')
|
||||
console.log('是扫描的砍价海报进来的,但是没有获取到参数')
|
||||
console.log('————————')
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
// 判断是不是拼团进来的
|
||||
if (getCurrentPageUrl() == 'pages/activity/GroupRule/index' && handleQrCode()) {
|
||||
console.log('————————')
|
||||
@ -836,7 +932,7 @@ export const handleLoginFailure = () => {
|
||||
id: url.pinkId,
|
||||
}
|
||||
})
|
||||
// cookie.set("spread", url.spread || 0);
|
||||
cookie.set("spread", url.spread || 0);
|
||||
} else {
|
||||
console.log('————————')
|
||||
console.log('是拼团进来的,但是没有获取到参数')
|
||||
@ -859,7 +955,7 @@ export const handleLoginFailure = () => {
|
||||
partake: url.uid
|
||||
}
|
||||
})
|
||||
// cookie.set("spread", url.spread || 0);
|
||||
cookie.set("spread", url.spread || 0);
|
||||
} else {
|
||||
handleNoParameters()
|
||||
console.log('————————')
|
||||
@ -871,6 +967,7 @@ export const handleLoginFailure = () => {
|
||||
}
|
||||
|
||||
if (getCurrentPageUrl() == 'pages/shop/GoodsCon/index' && handleQrCode()) {
|
||||
debugger;
|
||||
console.log('————————')
|
||||
console.log('是扫描的商品详情')
|
||||
console.log('————————')
|
||||
|
Reference in New Issue
Block a user