Commit 33e06e5b by 李伟康

commit

1 parent 8cebad94
<template> <template>
<van-overlay <van-overlay :show="show">
:show="show" <!-- z-index="9999999" -->
z-index="9999999"
>
<div <div
class="wrapper" class="wrapper"
@click.stop @click.stop
...@@ -43,38 +41,39 @@ ...@@ -43,38 +41,39 @@
export default { export default {
name: 'Poster', name: 'Poster',
props: ['value', 'apiName', 'currentItem', 'activityData'], props: ['value', 'apiName', 'currentItem', 'activityData'],
data () { data() {
return { return {
show: false, show: false,
img: null img: null
} }
}, },
mounted () { mounted() {},
},
watch: { watch: {
'value' (n) { value(n) {
this.show = n this.show = n
}, }
}, },
methods: { methods: {
close () { close() {
this.show = false this.show = false
this.$emit('close') this.$emit('close')
}, },
save () { save() {
this.showToast('请长按海报保存') this.showToast('请长按海报保存')
}, },
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) {
// } else { // } else {
window.$wx.shareAppMessage({ window.$wx
.shareAppMessage({
imgUrl: flag ? currentItem.shareImgUrl : currentItem.goodsImage, imgUrl: flag ? currentItem.shareImgUrl : currentItem.goodsImage,
title: flag ? currentItem.name : currentItem.goodsName, title: flag ? currentItem.name : currentItem.goodsName,
link: flag ? activityData.pagePath : activityData.url, link: flag ? activityData.pagePath : activityData.url
}).then(res => { })
.then(res => {
this.showToast('发送成功') this.showToast('发送成功')
}) })
// } // }
...@@ -84,6 +83,9 @@ export default { ...@@ -84,6 +83,9 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.van-overlay {
position: absolute;
}
.wrapper { .wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
......
<template> <template>
<div class="share"> <div
class="share-box"
v-show="showShare"
>
<div class="sheet">
<van-share-sheet <van-share-sheet
v-model="showShare" v-model="showShare"
title="立即分享给好友" title="立即分享给好友"
...@@ -8,6 +12,7 @@ ...@@ -8,6 +12,7 @@
@cancel="cancel" @cancel="cancel"
@click-overlay="cancel" @click-overlay="cancel"
/> />
</div>
<poster <poster
:value="showPoster" :value="showPoster"
@close="showPoster = false" @close="showPoster = false"
...@@ -78,6 +83,7 @@ export default { ...@@ -78,6 +83,7 @@ export default {
return return
} }
if (apiName == 'shopmallApi') { if (apiName == 'shopmallApi') {
this.showLoading()
shopmallApi.getGoodsLink({ id }).then(data => { shopmallApi.getGoodsLink({ id }).then(data => {
console.log('商品链接', data) console.log('商品链接', data)
shopmallApi.getGoodsPoster({ id }).then(res => { shopmallApi.getGoodsPoster({ id }).then(res => {
...@@ -87,6 +93,7 @@ export default { ...@@ -87,6 +93,7 @@ export default {
url: data url: data
} }
this.showShare = true this.showShare = true
this.hideLoading()
}) })
}) })
} }
...@@ -241,4 +248,16 @@ export default { ...@@ -241,4 +248,16 @@ export default {
.van-share-sheet__option.disabled { .van-share-sheet__option.disabled {
opacity: 0.5; opacity: 0.5;
} }
.sheet{
position: relative;
z-index: 1;
}
.share-box {
position: fixed;
width: 100%;
height: 100vh;
top: 0;
left: 0;
z-index: 100;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
> >
<div class="box"> <div class="box">
<div class="title flex"> <div class="title flex">
{{data.packageName}} <div class="name text-hide">{{data.packageName}}</div>
<div class="subtitle">内含{{data.couponsDetailList&&data.couponsDetailList.length}}项权益项目</div> <div class="subtitle">内含{{data.couponsDetailList&&data.couponsDetailList.length}}项权益项目</div>
</div> </div>
<div class="items"> <div class="items">
...@@ -113,6 +113,9 @@ export default { ...@@ -113,6 +113,9 @@ export default {
top: 0; top: 0;
background-color: #fff; background-color: #fff;
z-index: 2; z-index: 2;
.name{
max-width: 70%;
}
.subtitle { .subtitle {
font-size: 12px; font-size: 12px;
color: #3a3a3a; color: #3a3a3a;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<div <div
:key="index" :key="index"
class="item" class="item"
@click="choose(i)"
> >
<div class="icon"> <div class="icon">
<img :src="i.goodsImage || ''"> <img :src="i.goodsImage || ''">
...@@ -24,7 +25,6 @@ ...@@ -24,7 +25,6 @@
</div> </div>
<div <div
class="sprite-icon icon-share" class="sprite-icon icon-share"
@click="choose(i)"
></div> ></div>
</div> </div>
</template> </template>
...@@ -48,12 +48,11 @@ export default { ...@@ -48,12 +48,11 @@ export default {
list: [], list: [],
flag: false, flag: false,
total: 0, total: 0,
WX: wxConfig
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.WX.init(['shareAppMessage']) wxConfig.init(['shareAppMessage'])
}, },
methods: { methods: {
getList() { getList() {
...@@ -68,8 +67,8 @@ export default { ...@@ -68,8 +67,8 @@ export default {
choose(e) { choose(e) {
let { id, goodsName, goodsImage } = e let { id, goodsName, goodsImage } = e
shopmallApi.getGoodsLink({ id }).then(data => { shopmallApi.getGoodsLink({ id }).then(data => {
console.log(data) console.log('链接_________',data)
this.WX.shareAppMessage({ wxConfig.shareAppMessage({
title: goodsName, title: goodsName,
desc: '', desc: '',
link: data, link: data,
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
>分享给客户</div> >分享给客户</div>
</template> </template>
<template v-else> <template v-else>
<div @click="showShareModel(i)">
<div class="icon"> <div class="icon">
<img :src="i.goodsImage || ''"> <img :src="i.goodsImage || ''">
</div> </div>
...@@ -50,10 +51,8 @@ ...@@ -50,10 +51,8 @@
<div class="price">¥{{i.price.toFixed(2)}}</div> <div class="price">¥{{i.price.toFixed(2)}}</div>
</template> </template>
</div> </div>
<div <div class="sprite-icon icon-share"></div>
class="sprite-icon icon-share" </div>
@click="showShareModel(i)"
></div>
</template> </template>
</div> </div>
</template> </template>
...@@ -88,20 +87,17 @@ import { shopmallApi, equityApi } from '@/api' ...@@ -88,20 +87,17 @@ import { shopmallApi, equityApi } from '@/api'
export default { export default {
name: '', name: '',
mixins: [shareMixin, pageMixin], mixins: [shareMixin, pageMixin],
data () { data() {
return { return {
showVip: false, showVip: false,
equity_id: null equity_id: null
} }
}, },
mounted () { mounted() {},
}, activated() {},
activated () { deactivated() {},
},
deactivated () {
},
methods: { methods: {
getList_0 (pageNum) { getList_0(pageNum) {
let { list } = this let { list } = this
equityApi.getEquityList({ pageNum }).then(res => { equityApi.getEquityList({ pageNum }).then(res => {
this.flag = true this.flag = true
...@@ -110,7 +106,7 @@ export default { ...@@ -110,7 +106,7 @@ export default {
this.hideLoading() this.hideLoading()
}) })
}, },
getList_1 (pageNum) { getList_1(pageNum) {
let { list } = this let { list } = this
shopmallApi.getGoodsList({ currentPage: pageNum }).then(res => { shopmallApi.getGoodsList({ currentPage: pageNum }).then(res => {
this.flag = true this.flag = true
...@@ -119,7 +115,7 @@ export default { ...@@ -119,7 +115,7 @@ export default {
this.hideLoading() this.hideLoading()
}) })
}, },
showVipDialog (i) { showVipDialog(i) {
this.showVip = true this.showVip = true
this.equity_id = i.id this.equity_id = i.id
} }
...@@ -154,7 +150,7 @@ export default { ...@@ -154,7 +150,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-direction: column; flex-direction: column;
max-width:70%; max-width: 70%;
.title { .title {
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
...@@ -162,6 +158,7 @@ export default { ...@@ -162,6 +158,7 @@ export default {
} }
.decoration { .decoration {
color: #b9babb; color: #b9babb;
width: 160px;
} }
.btn { .btn {
color: #b1b1b3; color: #b1b1b3;
...@@ -178,6 +175,7 @@ export default { ...@@ -178,6 +175,7 @@ export default {
} }
.btn { .btn {
right: 10px; right: 10px;
z-index: 2;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!