Commit 4515bd4e by 李伟康

commit

1 parent 33e06e5b
......@@ -64,9 +64,20 @@ export default {
share() {
let { currentItem, apiName, activityData } = this
let flag = apiName != 'shopmallApi'
// if (currentItem.userId) {
// } else {
if (currentItem.userId) {
console.log(activityData.posterMediaId)
window.$wx
.sendChatMessage({
msgtype: 'image',
image: {
mediaid: activityData.posterMediaId
},
enterChat: false
})
.then(() => {
this.showToast('发送成功')
})
} else {
window.$wx
.shareAppMessage({
imgUrl: flag ? currentItem.shareImgUrl : currentItem.goodsImage,
......@@ -76,7 +87,7 @@ export default {
.then(res => {
this.showToast('发送成功')
})
// }
}
}
}
}
......
......@@ -48,7 +48,7 @@ export default {
value(n) {
console.log(n)
let {
currentItem: { id },
currentItem: { id , userId },
component_id,
apiName,
component_api_name
......@@ -59,8 +59,12 @@ export default {
}
if (n) {
let options = this.tools.deepClone(staticOptions)
if (apiName == 'couponApi' || apiName == 'boutiquecouponApi' || apiName == 'equityApi') {
if (apiName == 'couponApi' || apiName == 'boutiquecouponApi' || apiName == 'equityApi' || apiName == 'shopmallApi') {
if (apiName == 'shopmallApi' && !userId) {
options[1].className = 'disabled'
} else {
options[1].className = 'disabled'
}
this.showShare = true
}
this.options = options
......@@ -127,7 +131,6 @@ export default {
}
}
if (apiName == 'activityApi' || apiName == 'liveApi') {
let { activityData } = this
if (apiName == 'activityApi') {
if (userId) this.sendChatMessage(activityData.linkUrl, '', activityData.activityName, activityData.posterUrl)
else this.shareAppMessage(activityData.linkUrl, '', activityData.activityName, activityData.posterUrl)
......@@ -145,7 +148,6 @@ export default {
else this.shareAppMessage(res.url, desc, currentItem.packageName)
})
} else {
let { activityData } = this
console.log('________________________', activityData.url)
if (userId) this.sendChatMessage(activityData.url, '', currentItem.goodsName, currentItem.goodsImage)
else this.shareAppMessage(activityData.url, '', currentItem.goodsName, currentItem.goodsImage)
......@@ -248,7 +250,7 @@ export default {
.van-share-sheet__option.disabled {
opacity: 0.5;
}
.sheet{
.sheet {
position: relative;
z-index: 1;
}
......
......@@ -2,7 +2,7 @@ const discountType = {
1: '满减',
2: '折扣',
3: '代金',
4: '实物',
4: '兑换',
5: '购车代金',
6: '商品折扣',
7: '会员服务'
......
......@@ -19,13 +19,18 @@
:key="index"
class="item"
>
<div :class="['sprite-icon', 'text-center',tabIndex == 0?'icon-coupon':'icon-discount']">
<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>
<template v-else>
<template v-if="i.discountType == 3">
<span>¥</span>{{i.denomination}}
</template>
<template v-else>
{{discountType[i.discountType]}}
</template>
</template>
</div>
<div class="info">
<div class="top">
......@@ -73,25 +78,21 @@ import { couponApi, boutiquecouponApi } from '@/api'
export default {
name: '',
mixins: [shareMixin, pageMixin, discountTypeMixin],
data () {
return {
}
data() {
return {}
},
activated () {
activated() {
console.log('卡券activated')
this.watchPageBack().then(() => {
console.log('子页面返回')
})
},
deactivated () {
deactivated() {
console.log('离开卡券页')
},
mounted () {
},
mounted() {},
methods: {
getList_0 (pageNum) {
getList_0(pageNum) {
let { list } = this
boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => {
console.log('精品礼券', res)
......@@ -101,7 +102,7 @@ export default {
this.hideLoading()
})
},
getList_1 (pageNum) {
getList_1(pageNum) {
let { list } = this
couponApi.getMerchantCouponList({ pageNum }).then(res => {
console.log('商城礼券', res)
......@@ -138,6 +139,12 @@ export default {
padding: 0 14px;
flex-shrink: 0;
text-align: center;
span{
font-size: 10px;
}
}
.clear-padding{
padding: 0;
}
.info {
margin-left: 8px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!