Commit 0d0f29d4 by 李伟康

commit

1 parent a88a5725
......@@ -40,21 +40,23 @@ export default {
})
},
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 { name } = this.$route
let { userId, id, couponName, activityName, packageName, goodsName, goodsImage, discountType } = i
let query = `merchantId=${merchantId}`
if (sapCode) query = `${query}&storeCode=${sapCode}`
this.showLoading()
// channelType 1 嘀加 2:广汇
if (name === 'coupon') { /**卡券 */
let desc = '您的专属服务顾问为您发来了优惠券,请点击领取~'
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({
appid: shopmall_appid,
title: couponName,
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 => {
this.shareAppMessage(url, desc, couponName, imgUrl)
......@@ -65,7 +67,7 @@ export default {
appid: shopmall_appid,
title: `${couponName}(${window.$discountType[discountType]}券)`,
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)
})
......@@ -77,7 +79,7 @@ export default {
appid: shopmall_appid,
title: activityName,
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 => {
this.shareAppMessage(url, '您有一个秒杀活动可参加', activityName, imgUrl)
......@@ -88,7 +90,6 @@ export default {
} else { /**店铺 */
if (tabIndex == 0) {
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'
if (entry != 'normal') this.sendChatMessage({
appid: shopmall_appid,
......@@ -111,7 +112,7 @@ export default {
appid: shopmall_appid,
title: packageName,
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 }) => {
this.shareAppMessage(url, '您的专属客服顾问为您发来了会员套餐,点击查看哦', packageName, imgUrl)
......@@ -121,7 +122,7 @@ export default {
appid: shopmall_appid,
title: goodsName,
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 => {
this.shareAppMessage(url, '', goodsName, goodsImage)
......
......@@ -20,8 +20,8 @@
:key="index"
class="item"
>
<div :class="['sprite-icon', 'text-center',tabIndex == 0 ?'icon-coupon':'icon-discount', {'clear-padding':i.discountType == 3}]">
<template v-if="tabIndex == 0 ">
<div :class="['sprite-icon', 'text-center',false ?'icon-coupon':'icon-discount', {'clear-padding':i.discountType == 3}]">
<template v-if="false ">
{{i.couponTypeName}}
</template>
<template v-else>
......@@ -38,12 +38,12 @@
<div class="title">{{i.couponName}}</div>
<div class="num">剩余:{{i.remainAmount || i.residueAmount || 0}}张</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)"
>发送</div>
</div>
<div class="bottom">
<template v-if="tabIndex == 0 ">
<template v-if="false ">
<div>永久有效</div>
<div class="right">适用于新车购买用户</div>
</template>
......@@ -75,18 +75,19 @@ export default {
mixins: [shareMixin, pageMixin, discountTypeMixin],
data () {
return {
tabList: ['新车精品礼券', '商城优惠券']
tabList: ['商城优惠券']
// tabList: ['新车精品礼券', '商城优惠券']
}
},
mounted () { },
methods: {
getList (pageNum) {
let { list, tabIndex } = this
let API = tabIndex == 0 ? boutiquecouponApi : couponApi
let target = tabIndex == 0 ? 'getBoutiqueCouponList' : 'getMerchantCouponList'
let API = false ? boutiquecouponApi : couponApi
let target = false ? 'getBoutiqueCouponList' : 'getMerchantCouponList'
API[target]({ pageNum }).then(res => {
this.hideLoading()
console.log(tabIndex == 0 ? '精品礼券' : '商城礼券', res)
console.log(false ? '精品礼券' : '商城礼券', res)
this.flag = true
this.list = list.concat(res.list)
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!