mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:53:27 +08:00
【新增】首页弹出弹窗广告新增自定义上传图片和链接链接地址。
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="coreshop-modal-box" :class="show?'show':''">
|
||||
<view class="dialog">
|
||||
<view class="coreshop-flex coreshop-align-end coreshop-self-end coreshop-justify-end">
|
||||
<u-icon name="close-circle" color="#ffffff" size="28" @click="closeEvent"></u-icon>
|
||||
</view>
|
||||
<image class="img" :src="src" lazy-load mode="widthFix" @tap="imgEvent"></image>
|
||||
<view class="coreshop-flex coreshop-align-center coreshop-self-end coreshop-justify-center">
|
||||
<u-icon name="close-circle" color="#ffffff" size="32" @click="closeEvent"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<!--返回顶部组件-->
|
||||
<u-back-top :scroll-top="scrollTop" :duration="500"></u-back-top>
|
||||
<!--弹出框-->
|
||||
<coreshop-modal-img :show="modalShow" :src="$globalConstVars.apiFilesUrl+'/static/images/empty/reward.png'" @imgTap="imgTap" @closeTap="closeTap" />
|
||||
<coreshop-modal-img :show="modalShow" :src="indexPopupWindowImageUrl" @imgTap="imgTap" @closeTap="closeTap" />
|
||||
<!-- 登录提示 -->
|
||||
<coreshop-login-modal></coreshop-login-modal>
|
||||
</view>
|
||||
@@ -46,7 +46,10 @@
|
||||
shareUrl: this.$globalConstVars.shareUrl,
|
||||
isScorll: false,
|
||||
homeTitle: '',
|
||||
modalShow: false
|
||||
modalShow: false,
|
||||
indexPopupWindowHrefUrl: '',
|
||||
indexPopupWindowImageUrl: '',
|
||||
|
||||
};
|
||||
},
|
||||
updated() {
|
||||
@@ -54,6 +57,8 @@
|
||||
},
|
||||
mounted() {
|
||||
this.modalShow = this.$store.state.config.showIndexPopupWindow == 1;
|
||||
this.indexPopupWindowHrefUrl = this.$store.state.config.indexPopupWindowHrefUrl;
|
||||
this.indexPopupWindowImageUrl = this.$store.state.config.indexPopupWindowImageUrl;
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
@@ -91,7 +96,25 @@
|
||||
methods: {
|
||||
imgTap() {
|
||||
this.modalShow = false;
|
||||
this.$refs.uToast.show({ message: "你点了海报了。", type: 'success', back: false });
|
||||
var val = this.indexPopupWindowHrefUrl;
|
||||
if (this.indexPopupWindowHrefUrl.indexOf('http') != -1) {
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE || MP
|
||||
this.$u.route('/pages/webview/webview', { src: val });
|
||||
// #endif
|
||||
} else {
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE || MP
|
||||
if (val == '/pages/index/default/default' || val == '/pages/category/index/index' || val == '/pages/index/cart/cart' || val == '/pages/index/member/member') {
|
||||
this.$u.route({ type: 'switchTab', url: val });
|
||||
return;
|
||||
} else if (val.indexOf('/pages/coupon/coupon?id=') > -1) {
|
||||
var id = val.replace('/pages/coupon/coupon?id=', "");
|
||||
this.receiveCoupon(id)
|
||||
} else {
|
||||
this.$u.route(val);
|
||||
return;
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
closeTap() {
|
||||
this.modalShow = false;
|
||||
|
||||
Reference in New Issue
Block a user