Merge branch 'feature/商品商城优化' into dev

This commit is contained in:
mengxiaolong
2020-09-11 11:35:37 +08:00

View File

@@ -47,7 +47,12 @@
</div> </div>
</div> </div>
<div v-else> <div v-else>
<img id="detailImg" v-if="detailImg" :src="$assetsUrl + detailImg" /> <template v-if="redirectUrl">
<iframe style="width: 100vw; min-height: 100vh;" :src="redirectUrl" frameborder="0"></iframe>
</template>
<template v-else>
<img id="detailImg" v-if="detailImg" :src="$assetsUrl + detailImg" />
</template>
</div> </div>
<van-button class="bottom-btn" :disabled="!isCanCheck1 || !isCanCheck2" v-if="isWeixin && bottomBtnShow" type="danger" @click="check" v-no-more-click="1000" <van-button class="bottom-btn" :disabled="!isCanCheck1 || !isCanCheck2" v-if="isWeixin && bottomBtnShow" type="danger" @click="check" v-no-more-click="1000"
>查看</van-button >查看</van-button
@@ -117,7 +122,8 @@ export default {
}, },
loaded: false, loaded: false,
detailImg: '', detailImg: '',
bottomBtnShow: false bottomBtnShow: false,
redirectUrl: ''
} }
}, },
created() { created() {
@@ -156,8 +162,7 @@ export default {
if (!res) return if (!res) return
if (res.result == '0') { if (res.result == '0') {
if (res.content.redirect) { if (res.content.redirect) {
console.log('redirect...') this.redirectUrl = res.content.linkUrl
window.location.href = res.content.linkUrl
} else { } else {
if (res.content.rightBtnShow && !this.isWeixin) { if (res.content.rightBtnShow && !this.isWeixin) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
@@ -175,9 +180,9 @@ export default {
this.bottomBtnShow = res.content.bottomBtnShow this.bottomBtnShow = res.content.bottomBtnShow
this.detail = res.content this.detail = res.content
this.pdfUrl = this.$assetsUrl + res.content.pdfUrl this.pdfUrl = this.$assetsUrl + res.content.pdfUrl
this.loaded = true
this.isCanCheck2 = true this.isCanCheck2 = true
} }
this.loaded = true
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
} }