Commit a3359ba6 by 李伟康

精品交付

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