Commit a789b5ba by 李伟康

暂时屏蔽精品礼券

1 parent 1a97f990
import { shopmallApi, activityApi, couponApi, boutiquecouponApi, equityApi, wxConfig } from '@/api'
const { environment } = window.$fetchConfig
export default {
data() {
data () {
return {
entry: 'normal'
}
},
mounted() {
mounted () {
if (this.$route.meta.isTab || this.$route.meta.isIndex) this.wxInit()
},
methods: {
wxInit() {
wxInit () {
let _this = this
wxConfig.init(['shareAppMessage', 'sendChatMessage', 'getCurExternalContact', 'getContext']).then(() => {
wxConfig.getContext().then(({ entry }) => {
......@@ -19,7 +19,7 @@ export default {
})
})
},
showShareModel(i = {}) {
showShareModel (i = {}) {
let {
tabIndex,
$route: { name }
......@@ -39,7 +39,7 @@ export default {
this.sendMessage(i)
})
},
sendMessage(i) {
sendMessage (i) {
let { merchantId, merchantName, userName, channelType } = this.getLocalStorage('dj_scrm_userInfo')
let { tabIndex, entry } = this
let { name } = this.$route
......@@ -52,7 +52,8 @@ export default {
let desc = '您的专属服务顾问为您发来了优惠券,请点击领取~'
let imgUrl = 'http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png'
console.log(entry)
if (tabIndex == 0 ) {
if (false) {
// if (tabIndex == 0 ) {
if (entry != 'normal')
this.sendChatMessage({
// channelType 1 嘀加 2:广汇
......@@ -161,7 +162,7 @@ export default {
}
}
},
sendChatMessage(params) {
sendChatMessage (params) {
wxConfig
.sendChatMessage({
msgtype: 'miniprogram',
......@@ -176,7 +177,7 @@ export default {
this.hideLoading()
})
},
shareAppMessage(link, desc, title, imgUrl) {
shareAppMessage (link, desc, title, imgUrl) {
wxConfig
.shareAppMessage({
title,
......@@ -191,14 +192,14 @@ export default {
this.hideLoading()
})
},
toUnicode(chineseStr = '') {
toUnicode (chineseStr = '') {
let unicodeStr = ''
for (let i = 0, iLength = chineseStr.length; i < iLength; i++) {
unicodeStr += '@' + chineseStr.charCodeAt(i).toString(16)
}
return unicodeStr
},
couponShare(item, callBack) {
couponShare (item, callBack) {
let { is_contact, id } = item
let obj = {
couponId: id,
......
......@@ -21,7 +21,8 @@
class="item"
>
<div :class="['sprite-icon', 'text-center',tabIndex == 0 ?'icon-coupon':'icon-discount', {'clear-padding':i.discountType == 3}]">
<template v-if="tabIndex == 0 ">
<template v-if="false">
<!-- <template v-if="tabIndex == 0 "> -->
{{i.couponTypeName}}
</template>
<template v-else>
......@@ -76,7 +77,8 @@
<script type='text/ecmascript-6'>
import { shareMixin, pageMixin, discountTypeMixin } from '@/mixins'
import { couponApi, boutiquecouponApi } from '@/api'
const tabList = ['新车精品礼券', '商城优惠券']
const tabList = ['商城优惠券']
// const tabList = ['新车精品礼券', '商城优惠券']
export default {
name: 'coupon',
mixins: [shareMixin, pageMixin, discountTypeMixin],
......@@ -88,27 +90,18 @@ export default {
},
mounted() {},
methods: {
// getList_0(pageNum) {
// let { list } = this
// boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => {
// this.hideLoading()
// console.log('精品礼券', res)
// this.flag = true
// this.list = list.concat(res.list)
// this.total = res.total
// })
// },
getList_0(pageNum) {
let { list } = this
boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => {
this.hideLoading()
console.log('精品礼券', res)
// if (res.total == 0) {
// this.showLoading()
// this.updata = new Date().getTime()
// this.tabList = ['商城优惠券']
// this.getList_1(pageNum)
// return
// } else {
// this.tabList = tabList
// }
this.flag = true
this.list = list.concat(res.list)
this.total = res.total
})
},
getList_1(pageNum) {
let { list } = this
couponApi.getMerchantCouponList({ pageNum }).then(res => {
this.hideLoading()
console.log('商城礼券', res)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!