Commit 0d0f29d4 by 李伟康

commit

1 parent a88a5725
...@@ -40,21 +40,23 @@ export default { ...@@ -40,21 +40,23 @@ export default {
}) })
}, },
sendMessage (i) { sendMessage (i) {
let { merchantId, merchantName, userName, channelType } = this.getLocalStorage('dj_scrm_userInfo') let { merchantId, merchantName, userName, sapCode } = this.getLocalStorage('dj_scrm_userInfo')
let { tabIndex, entry } = this let { tabIndex, entry } = this
let { name } = this.$route let { name } = this.$route
let { userId, id, couponName, activityName, packageName, goodsName, goodsImage, discountType } = i let { userId, id, couponName, activityName, packageName, goodsName, goodsImage, discountType } = i
let query = `merchantId=${merchantId}`
if (sapCode) query = `${query}&storeCode=${sapCode}`
this.showLoading() this.showLoading()
// channelType 1 嘀加 2:广汇
if (name === 'coupon') { /**卡券 */ if (name === 'coupon') { /**卡券 */
let desc = '您的专属服务顾问为您发来了优惠券,请点击领取~' let desc = '您的专属服务顾问为您发来了优惠券,请点击领取~'
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 (tabIndex == 0) { if (false) {
// if (tabIndex == 0) {
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)}` page: `/packageMine/pages/boutique/gift/gift.html?id=${id}&userId=${userId}&employName=${this.toUnicode(i.employeeName)}&${query}`
}) })
else boutiquecouponApi.getBoutiqueCoupon({ id }).then(url => { else boutiquecouponApi.getBoutiqueCoupon({ id }).then(url => {
this.shareAppMessage(url, desc, couponName, imgUrl) this.shareAppMessage(url, desc, couponName, imgUrl)
...@@ -65,7 +67,7 @@ export default { ...@@ -65,7 +67,7 @@ export default {
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}&merchantId=${merchantId}&issueName=${this.toUnicode(userName)}&issueDate=${new Date().getTime()}` page: `/packageMall/pages/coupon/coupon.html?couponId=${id}&${query}&issueName=${this.toUnicode(userName)}&issueDate=${new Date().getTime()}`
}) })
else this.shareAppMessage(url, desc, couponName, imgUrl) else this.shareAppMessage(url, desc, couponName, imgUrl)
}) })
...@@ -77,7 +79,7 @@ export default { ...@@ -77,7 +79,7 @@ export default {
appid: shopmall_appid, appid: shopmall_appid,
title: activityName, title: activityName,
imgUrl, imgUrl,
page: `/packageMall/pages/detail/detail.html?isActivity=true&id=${id}&merchantId=${merchantId}` page: `/packageMall/pages/detail/detail.html?isActivity=true&id=${id}&${query}`
}) })
else activityApi.getShared({ id }).then(url => { else activityApi.getShared({ id }).then(url => {
this.shareAppMessage(url, '您有一个秒杀活动可参加', activityName, imgUrl) this.shareAppMessage(url, '您有一个秒杀活动可参加', activityName, imgUrl)
...@@ -88,7 +90,6 @@ export default { ...@@ -88,7 +90,6 @@ export default {
} else { /**店铺 */ } else { /**店铺 */
if (tabIndex == 0) { if (tabIndex == 0) {
let path = 'pages/tab/index/index' let path = 'pages/tab/index/index'
let query = `merchantId=${merchantId}`
const imgUrl = 'https://img01.glsx.com.cn/weapp/resource/scrm-mobile/activity/miniprogram-cover.jpg' const imgUrl = 'https://img01.glsx.com.cn/weapp/resource/scrm-mobile/activity/miniprogram-cover.jpg'
if (entry != 'normal') this.sendChatMessage({ if (entry != 'normal') this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
...@@ -111,7 +112,7 @@ export default { ...@@ -111,7 +112,7 @@ export default {
appid: shopmall_appid, appid: shopmall_appid,
title: packageName, title: packageName,
imgUrl, imgUrl,
page: `/packageEquity/pages/package/package.html?id=${id}&merchantId=${merchantId}` page: `/packageEquity/pages/package/package.html?id=${id}&${query}`
}) })
else equityApi.getEquityShared({ id }).then(({ url }) => { else equityApi.getEquityShared({ id }).then(({ url }) => {
this.shareAppMessage(url, '您的专属客服顾问为您发来了会员套餐,点击查看哦', packageName, imgUrl) this.shareAppMessage(url, '您的专属客服顾问为您发来了会员套餐,点击查看哦', packageName, imgUrl)
...@@ -121,7 +122,7 @@ export default { ...@@ -121,7 +122,7 @@ export default {
appid: shopmall_appid, appid: shopmall_appid,
title: goodsName, title: goodsName,
imgUrl: goodsImage, imgUrl: goodsImage,
page: `/packageMall/pages/detail/detail.html?id=${id}&merchantId=${merchantId}` page: `/packageMall/pages/detail/detail.html?id=${id}&${query}`
}) })
else shopmallApi.getGoodsLink({ id }).then(url => { else shopmallApi.getGoodsLink({ id }).then(url => {
this.shareAppMessage(url, '', goodsName, goodsImage) this.shareAppMessage(url, '', goodsName, goodsImage)
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
:key="index" :key="index"
class="item" class="item"
> >
<div :class="['sprite-icon', 'text-center',tabIndex == 0 ?'icon-coupon':'icon-discount', {'clear-padding':i.discountType == 3}]"> <div :class="['sprite-icon', 'text-center',false ?'icon-coupon':'icon-discount', {'clear-padding':i.discountType == 3}]">
<template v-if="tabIndex == 0 "> <template v-if="false ">
{{i.couponTypeName}} {{i.couponTypeName}}
</template> </template>
<template v-else> <template v-else>
...@@ -38,12 +38,12 @@ ...@@ -38,12 +38,12 @@
<div class="title">{{i.couponName}}</div> <div class="title">{{i.couponName}}</div>
<div class="num">剩余:{{i.remainAmount || i.residueAmount || 0}}张</div> <div class="num">剩余:{{i.remainAmount || i.residueAmount || 0}}张</div>
<div <div
:class="['btn', 'y-center', 'text-center', {'disabled-btn':tabIndex == 0 ?i.remainAmount<1:i.residueAmount<1}]" :class="['btn', 'y-center', 'text-center', {'disabled-btn':false ?i.remainAmount<1:i.residueAmount<1}]"
@click="showShareModel(i)" @click="showShareModel(i)"
>发送</div> >发送</div>
</div> </div>
<div class="bottom"> <div class="bottom">
<template v-if="tabIndex == 0 "> <template v-if="false ">
<div>永久有效</div> <div>永久有效</div>
<div class="right">适用于新车购买用户</div> <div class="right">适用于新车购买用户</div>
</template> </template>
...@@ -75,18 +75,19 @@ export default { ...@@ -75,18 +75,19 @@ export default {
mixins: [shareMixin, pageMixin, discountTypeMixin], mixins: [shareMixin, pageMixin, discountTypeMixin],
data () { data () {
return { return {
tabList: ['新车精品礼券', '商城优惠券'] tabList: ['商城优惠券']
// tabList: ['新车精品礼券', '商城优惠券']
} }
}, },
mounted () { }, mounted () { },
methods: { methods: {
getList (pageNum) { getList (pageNum) {
let { list, tabIndex } = this let { list, tabIndex } = this
let API = tabIndex == 0 ? boutiquecouponApi : couponApi let API = false ? boutiquecouponApi : couponApi
let target = tabIndex == 0 ? 'getBoutiqueCouponList' : 'getMerchantCouponList' let target = false ? 'getBoutiqueCouponList' : 'getMerchantCouponList'
API[target]({ pageNum }).then(res => { API[target]({ pageNum }).then(res => {
this.hideLoading() this.hideLoading()
console.log(tabIndex == 0 ? '精品礼券' : '商城礼券', res) console.log(false ? '精品礼券' : '商城礼券', res)
this.flag = true this.flag = true
this.list = list.concat(res.list) this.list = list.concat(res.list)
this.total = res.total this.total = res.total
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!