From b523a3141a0ca64872f1f1679d485e3426ed7136 Mon Sep 17 00:00:00 2001 From: JianWeie Date: Sun, 8 May 2022 16:13:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E5=95=86?= =?UTF-8?q?=E5=9F=8E=E6=A0=8F=E7=9B=AE=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=B9=BF=E5=91=8A=E7=BB=84=E4=BB=B6=E4=BD=BF=E7=94=A8=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../coreshop-advert/coreshop-advert.vue | 57 ------------------ .../coreshop-page/coreshop-coupon.vue | 14 ----- .../CoreShop/pages/category/index/index.vue | 43 -------------- .../CoreShop/pages/coupon/coupon.vue | 14 ----- .../CoreShop/pages/index/default/default.vue | 58 ------------------- 5 files changed, 186 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-advert/coreshop-advert.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-advert/coreshop-advert.vue index e76fb20d..16e112a2 100644 --- a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-advert/coreshop-advert.vue +++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-advert/coreshop-advert.vue @@ -9,7 +9,6 @@ diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-coupon.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-coupon.vue index 8b544004..d95d2b86 100644 --- a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-coupon.vue +++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-coupon.vue @@ -99,20 +99,6 @@ created() { }, methods: { - // 用户领取优惠券 - receiveCoupon(couponId) { - let _this = this; - let coreshopdata = { - id: couponId - } - this.$u.api.getCoupon(coreshopdata).then(res => { - if (res.status) { - _this.$refs.uToast.show({ message: res.msg, type: 'success', back: false }) - } else { - _this.$u.toast(res.msg) - } - }) - }, } } diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/category/index/index.vue b/CoreCms.Net.Uni-App/CoreShop/pages/category/index/index.vue index a650f0e3..b77e3a8f 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/category/index/index.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/category/index/index.vue @@ -69,7 +69,6 @@ menuHeight: 0, // 左边菜单的高度 menuItemHeight: 0, // 左边菜单item的高度, beans: [], - advert: {}, isChild: false, searchKey: '' } @@ -81,7 +80,6 @@ }, onShow() { this.categories(); - this.getBanner(); }, methods: { categories() { @@ -127,47 +125,6 @@ url: '/pages/category/list/list?id=' + catId }); }, - getBanner() { - this.$u.api.advert( - { - codes: 'tpl1_class_banner1' - }).then(res => { - this.advert = res.data; - } - ); - }, - // 广告点击查看详情 - showSliderInfo(type, val) { - if (type == 1) { - if (val.indexOf('http') != -1) { - // #ifdef H5 - window.location.href = val - // #endif - } else { - // #ifdef H5 || 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') > -1) { - var id = val.replace('/pages/coupon/coupon?id=', ""); - this.receiveCoupon(id) - } else { - this.$u.route(val); - return; - } - // #endif - } - } else if (type == 2) { - // 商品详情 - this.goGoodsDetail(val); - } else if (type == 3) { - // 文章详情 - this.$u.route('/pages/article/details/details?id=' + val + '&idType=1'); - } else if (type == 4) { - // 文章列表 - this.$u.route('/pages/article/list/list?cid=' + val); - } - }, goSearch() { if (this.searchKey != '') { this.$u.route('/pages/category/list/list?key=' + this.searchKey); diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/coupon/coupon.vue b/CoreCms.Net.Uni-App/CoreShop/pages/coupon/coupon.vue index 05d7c0f3..80134982 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/coupon/coupon.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/coupon/coupon.vue @@ -114,20 +114,6 @@ } }) }, - // 用户领取优惠券 - receiveCoupon(couponId) { - let _this = this; - let coreshopdata = { - id: couponId - } - this.$u.api.getCoupon(coreshopdata).then(res => { - if (res.status) { - _this.$refs.uToast.show({ message: res.msg, type: 'success' }) - } else { - this.$u.toast(res.msg) - } - }) - } } }; diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue b/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue index 05adfc48..14bddeda 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/index/default/default.vue @@ -229,64 +229,6 @@ this.shareUrl = res.data }); }, - taped: function (e) { - this.showSliderInfo(this.swiperItems[e].linkType, this.swiperItems[e].linkValue); - }, - // 广告点击查看详情 - showSliderInfo(type, val) { - if (!val) { - return; - } - if (type == 1) { - if (val.indexOf('http') != -1) { - // #ifdef H5 - window.location.href = val - // #endif - } else { - // #ifdef H5 || 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') > -1) { - var id = val.replace('/pages/coupon/coupon?id=', ""); - this.receiveCoupon(id) - } else { - this.$u.route(val); - return; - } - // #endif - } - } else if (type == 2) { - // 商品详情 - this.goGoodsDetail(val) - } else if (type == 3) { - // 文章详情 - this.$u.route('/pages/article/details/details?id=' + val + '&idType=1') - } else if (type == 4) { - // 文章列表 - this.$u.route('/pages/article/list/list?cid=' + val) - } else if (type == 5) { - //智能表单 - this.$u.route('/pages/form/details/details?id=' + val) - } - }, - // 用户领取优惠券 - receiveCoupon(couponId) { - let data = { - promotion_id: couponId - } - this.$u.api.getCoupon(data).then(res => { - if (res.status) { - this.$refs.uToast.show({ message: res.msg, type: 'success', back: false }) - } else { - this.$u.toast(res.msg) - } - }) - }, - }, onPullDownRefresh() { this.swiperItems = [];