Commit ebbb15c4 by 李伟康

commit

1 parent 0d0f29d4
......@@ -52,38 +52,63 @@ export default {
let imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png'
if (false) {
// if (tabIndex == 0) {
let path = 'packageMine/pages/boutique/gift/gift'
if (entry != 'normal') this.sendChatMessage({
appid: shopmall_appid,
title: couponName,
imgUrl,
page: `/packageMine/pages/boutique/gift/gift.html?id=${id}&userId=${userId}&employName=${this.toUnicode(i.employeeName)}&${query}`
})
else boutiquecouponApi.getBoutiqueCoupon({ id }).then(url => {
this.shareAppMessage(url, desc, couponName, imgUrl)
page: `/${path}.html?id=${id}&userId=${userId}&employName=${this.toUnicode(i.employeeName)}&${query}`
})
else wxConfig
.createMiniprogramUrlLink({
path,
query: encodeURIComponent(query),
appId: shopmall_appid
})
.then(url => {
this.shareAppMessage(url, desc, couponName, imgUrl)
})
} else {
let path = 'packageMall/pages/coupon/coupon'
query = `couponId=${id}&${query}&issueName=${this.toUnicode(userName)}&issueDate=${new Date().getTime()}`
this.couponShare(i, url => {
if (entry != 'normal') this.sendChatMessage({
appid: shopmall_appid,
title: `${couponName}(${window.$discountType[discountType]}券)`,
imgUrl,
page: `/packageMall/pages/coupon/coupon.html?couponId=${id}&${query}&issueName=${this.toUnicode(userName)}&issueDate=${new Date().getTime()}`
page: `/${path}.html?${query}`
})
else this.shareAppMessage(url, desc, couponName, imgUrl)
else wxConfig
.createMiniprogramUrlLink({
path,
query: encodeURIComponent(query),
appId: shopmall_appid
})
.then(url => {
this.shareAppMessage(url, desc, couponName, imgUrl)
})
})
}
} else if (name === 'activity') { /**活动 */
if (tabIndex == 0) {
let imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png'
let path = 'packageMall/pages/detail/detail'
query = `isActivity=true&id=${id}&${query}`
if (entry != 'normal') this.sendChatMessage({
appid: shopmall_appid,
title: activityName,
imgUrl,
page: `/packageMall/pages/detail/detail.html?isActivity=true&id=${id}&${query}`
})
else activityApi.getShared({ id }).then(url => {
this.shareAppMessage(url, '您有一个秒杀活动可参加', activityName, imgUrl)
page: `/${path}.html?${query}`
})
else wxConfig
.createMiniprogramUrlLink({
path,
query: encodeURIComponent(query),
appId: shopmall_appid
})
.then(url => {
this.shareAppMessage(url, '您有一个秒杀活动可参加', activityName, imgUrl)
})
} else {
/**直播 */
}
......@@ -107,26 +132,42 @@ export default {
this.shareAppMessage(url, '', merchantName, imgUrl)
})
} else if (tabIndex == 1) {
let path = 'packageEquity/pages/package/package'
let imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png'
query = `id=${id}&${query}`
if (entry != 'normal') this.sendChatMessage({
appid: shopmall_appid,
title: packageName,
imgUrl,
page: `/packageEquity/pages/package/package.html?id=${id}&${query}`
})
else equityApi.getEquityShared({ id }).then(({ url }) => {
this.shareAppMessage(url, '您的专属客服顾问为您发来了会员套餐,点击查看哦', packageName, imgUrl)
page: `/${path}.html?${query}`
})
else wxConfig
.createMiniprogramUrlLink({
path,
query: encodeURIComponent(query),
appId: shopmall_appid
})
.then(url => {
this.shareAppMessage(url, '您的专属客服顾问为您发来了会员套餐,点击查看哦', packageName, imgUrl)
})
} else {
let path = 'packageMall/pages/detail/detail'
query = `id=${id}&${query}`
if (entry != 'normal') this.sendChatMessage({
appid: shopmall_appid,
title: goodsName,
imgUrl: goodsImage,
page: `/packageMall/pages/detail/detail.html?id=${id}&${query}`
})
else shopmallApi.getGoodsLink({ id }).then(url => {
this.shareAppMessage(url, '', goodsName, goodsImage)
page: `/${path}.html?${query}`
})
else wxConfig
.createMiniprogramUrlLink({
path,
query: encodeURIComponent(query),
appId: shopmall_appid
})
.then(url => {
this.shareAppMessage(url, '', goodsName, goodsImage)
})
}
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!