Commit 4515bd4e by 李伟康

commit

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