Commit 051887ee by 李伟康

精品升级礼券

1 parent 98e9d0ec
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
}) })
}, },
sendMessage(i) { sendMessage(i) {
let { merchantId, merchantName, userName } = this.getLocalStorage('dj_scrm_userInfo') let { merchantId, merchantName, userName, channelType } = this.getLocalStorage('dj_scrm_userInfo')
let { tabIndex, entry, tabList } = this let { tabIndex, entry, tabList } = 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
...@@ -55,10 +55,11 @@ export default { ...@@ -55,10 +55,11 @@ export default {
if (tabIndex == 0 && tabList.length > 1) { if (tabIndex == 0 && tabList.length > 1) {
if (entry != 'normal') if (entry != 'normal')
this.sendChatMessage({ this.sendChatMessage({
appid: dj_appId, // channelType 1 嘀加 2:广汇
appid: channelType == 1 ? dj_appId : 'wxfe82b8d65d07808f',
title: couponName, title: couponName,
imgUrl, imgUrl,
page: `/packagePersonal/pages/boutiquePages/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)}`
}) })
else { else {
boutiquecouponApi.getBoutiqueCoupon({ id }).then(res => { boutiquecouponApi.getBoutiqueCoupon({ id }).then(res => {
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
:key="index" :key="index"
class="item" class="item"
> >
<div :class="['sprite-icon', 'text-center',tabIndex == 0 && tabList.length > 1?'icon-coupon':'icon-discount', {'clear-padding':i.discountType == 3}]"> <div :class="['sprite-icon', 'text-center',tabIndex == 0 ?'icon-coupon':'icon-discount', {'clear-padding':i.discountType == 3}]">
<template v-if="tabIndex == 0 && tabList.length > 1"> <template v-if="tabIndex == 0 ">
{{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 && tabList.length > 1?i.remainAmount<1:i.residueAmount<1}]" :class="['btn', 'y-center', 'text-center', {'disabled-btn':tabIndex == 0 ?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 && tabList.length > 1"> <template v-if="tabIndex == 0 ">
<div>永久有效</div> <div>永久有效</div>
<div class="right">适用于新车购买用户</div> <div class="right">适用于新车购买用户</div>
</template> </template>
...@@ -76,8 +76,7 @@ ...@@ -76,8 +76,7 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { shareMixin, pageMixin, discountTypeMixin } from '@/mixins' import { shareMixin, pageMixin, discountTypeMixin } from '@/mixins'
import { couponApi, boutiquecouponApi } from '@/api' import { couponApi, boutiquecouponApi } from '@/api'
const tabList = [ '商城优惠券'] const tabList = ['新车精品礼券', '商城优惠券']
// const tabList = ['新车精品礼券', '商城优惠券']
export default { export default {
name: 'coupon', name: 'coupon',
mixins: [shareMixin, pageMixin, discountTypeMixin], mixins: [shareMixin, pageMixin, discountTypeMixin],
...@@ -89,11 +88,11 @@ export default { ...@@ -89,11 +88,11 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
// getList_0(pageNum) { getList_0(pageNum) {
// let { list } = this let { list } = this
// boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => { boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => {
// this.hideLoading() this.hideLoading()
// console.log('精品礼券', res) console.log('精品礼券', res)
// if (res.total == 0) { // if (res.total == 0) {
// this.showLoading() // this.showLoading()
// this.updata = new Date().getTime() // this.updata = new Date().getTime()
...@@ -103,20 +102,19 @@ export default { ...@@ -103,20 +102,19 @@ export default {
// } else { // } else {
// this.tabList = tabList // this.tabList = tabList
// } // }
// 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
// }) })
// }, },
// getList_1(pageNum) { getList_1(pageNum) {
getList_0(pageNum) {
let { list } = this let { list } = this
couponApi.getMerchantCouponList({ pageNum }).then(res => { couponApi.getMerchantCouponList({ pageNum }).then(res => {
this.hideLoading()
console.log('商城礼券', res) console.log('商城礼券', 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
this.hideLoading()
}) })
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!