Commit ebbb15c4 by 李伟康

commit

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