Commit a3359ba6 by 李伟康

精品交付

1 parent 9fd3ba80
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
value: 0, value: 0,
option: [ option: [
{ text: '优惠券', value: 0 }, { text: '优惠券', value: 0 },
// { text: '精品礼券', value: 1 }, { text: '精品礼券', value: 1 },
{ text: '商品订单', value: 2 }, { text: '商品订单', value: 2 },
{ text: '会员服务', value: 3 } { text: '会员服务', value: 3 }
], ],
......
import { shopmallApi, activityApi, couponApi, boutiquecouponApi, equityApi, wxConfig } from '@/api' import { couponApi, wxConfig } from '@/api'
const { shopmall_appid } = window.$fetchConfig
export default { export default {
data () { data () {
return { return {
...@@ -40,24 +39,26 @@ export default { ...@@ -40,24 +39,26 @@ export default {
}) })
}, },
sendMessage (i) { sendMessage (i) {
const { shopmall_appid } = window.$fetchConfig
let { merchantId, merchantName, userName, sapCode } = 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}` let query = `merchantId=${merchantId}`
if (sapCode) query = `${query}&storeCode=${sapCode}` if (sapCode) query = `${query}&storeCode=${sapCode}`
const entryType = entry != 'normal'
this.showLoading() this.showLoading()
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 (false) { if (tabIndex == 0) {
// if (tabIndex == 0) {
let path = 'packageMine/pages/boutique/gift/gift' let path = 'packageMine/pages/boutique/gift/gift'
if (entry != 'normal') this.sendChatMessage({ let query = `id=${id}&userId=${userId}&employName=${this.toUnicode(i.employeeName)}&${query}`
if (entryType) this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
title: couponName, title: couponName,
imgUrl, imgUrl,
page: `/${path}.html?id=${id}&userId=${userId}&employName=${this.toUnicode(i.employeeName)}&${query}` page: `/${path}.html?${query}`
}) })
else wxConfig else wxConfig
.createMiniprogramUrlLink({ .createMiniprogramUrlLink({
...@@ -72,7 +73,7 @@ export default { ...@@ -72,7 +73,7 @@ export default {
let path = 'packageMall/pages/coupon/coupon' let path = 'packageMall/pages/coupon/coupon'
query = `couponId=${id}&${query}&issueName=${this.toUnicode(userName)}&issueDate=${new Date().getTime()}` 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 (entryType) this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
title: `${couponName}(${window.$discountType[discountType]}券)`, title: `${couponName}(${window.$discountType[discountType]}券)`,
imgUrl, imgUrl,
...@@ -94,7 +95,7 @@ export default { ...@@ -94,7 +95,7 @@ export default {
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' let path = 'packageMall/pages/detail/detail'
query = `isActivity=true&id=${id}&${query}` query = `isActivity=true&id=${id}&${query}`
if (entry != 'normal') this.sendChatMessage({ if (entryType) this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
title: activityName, title: activityName,
imgUrl, imgUrl,
...@@ -116,7 +117,7 @@ export default { ...@@ -116,7 +117,7 @@ export default {
if (tabIndex == 0) { if (tabIndex == 0) {
let path = 'pages/tab/index/index' let path = 'pages/tab/index/index'
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 (entryType) this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
title: merchantName, title: merchantName,
imgUrl, imgUrl,
...@@ -135,7 +136,7 @@ export default { ...@@ -135,7 +136,7 @@ export default {
let path = 'packageEquity/pages/package/package' 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}` query = `id=${id}&${query}`
if (entry != 'normal') this.sendChatMessage({ if (entryType) this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
title: packageName, title: packageName,
imgUrl, imgUrl,
...@@ -153,7 +154,7 @@ export default { ...@@ -153,7 +154,7 @@ export default {
} else { } else {
let path = 'packageMall/pages/detail/detail' let path = 'packageMall/pages/detail/detail'
query = `id=${id}&${query}` query = `id=${id}&${query}`
if (entry != 'normal') this.sendChatMessage({ if (entryType) this.sendChatMessage({
appid: shopmall_appid, appid: shopmall_appid,
title: goodsName, title: goodsName,
imgUrl: goodsImage, imgUrl: goodsImage,
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
:key="index" :key="index"
class="item" class="item"
> >
<div :class="['sprite-icon', 'text-center',false ?'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="false "> <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':false ?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="false "> <template v-if="tabIndex == 0 ">
<div>永久有效</div> <div>永久有效</div>
<div class="right">适用于新车购买用户</div> <div class="right">适用于新车购买用户</div>
</template> </template>
...@@ -75,19 +75,19 @@ export default { ...@@ -75,19 +75,19 @@ export default {
mixins: [shareMixin, pageMixin, discountTypeMixin], mixins: [shareMixin, pageMixin, discountTypeMixin],
data () { data () {
return { return {
tabList: ['商城优惠券'] // tabList: ['商城优惠券']
// tabList: ['新车精品礼券', '商城优惠券'] tabList: ['新车精品礼券', '商城优惠券']
} }
}, },
mounted () { }, mounted () { },
methods: { methods: {
getList (pageNum) { getList (pageNum) {
let { list, tabIndex } = this let { list, tabIndex } = this
let API = false ? boutiquecouponApi : couponApi let API = tabIndex == 0 ? boutiquecouponApi : couponApi
let target = false ? 'getBoutiqueCouponList' : 'getMerchantCouponList' let target = tabIndex == 0 ? 'getBoutiqueCouponList' : 'getMerchantCouponList'
API[target]({ pageNum }).then(res => { API[target]({ pageNum }).then(res => {
this.hideLoading() this.hideLoading()
console.log(false ? '精品礼券' : '商城礼券', res) console.log(tabIndex == 0 ? '精品礼券' : '商城礼券', 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
......
...@@ -231,7 +231,7 @@ export default { ...@@ -231,7 +231,7 @@ export default {
total: 0, total: 0,
userName: '', userName: '',
itemObj2, itemObj2,
showScan: false showScan: !['production'].includes(process.env.NODE_ENV)
} }
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
...@@ -281,8 +281,8 @@ export default { ...@@ -281,8 +281,8 @@ export default {
userStatus: 1, userStatus: 1,
type: 0 type: 0
}) })
// this.getCustomerCouponList('Y') this.getCustomerCouponList('Y')
// this.getCustomerCouponList('N') this.getCustomerCouponList('N')
this.getGoodsVerficationList(1) this.getGoodsVerficationList(1)
this.getGoodsVerficationList(2) this.getGoodsVerficationList(2)
this.getVerificationList(3) this.getVerificationList(3)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!