diff --git a/components/WaterfallsFlowItem/WaterfallsFlowItem.vue b/components/WaterfallsFlowItem/WaterfallsFlowItem.vue deleted file mode 100644 index 4902c97..0000000 --- a/components/WaterfallsFlowItem/WaterfallsFlowItem.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - diff --git a/components/item-list.vue b/components/item-list.vue deleted file mode 100644 index 4dc59f0..0000000 --- a/components/item-list.vue +++ /dev/null @@ -1,1486 +0,0 @@ - - - - - - - diff --git a/components/pay-box.vue b/components/pay-box.vue deleted file mode 100644 index c1f9093..0000000 --- a/components/pay-box.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - - - diff --git a/components/robby-tags.vue b/components/robby-tags.vue deleted file mode 100644 index a5429d4..0000000 --- a/components/robby-tags.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/shop-category.vue b/components/shop-category.vue deleted file mode 100644 index e7eb12a..0000000 --- a/components/shop-category.vue +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - diff --git a/components/themes/diy.vue b/components/themes/diy.vue index 98fd067..8d7570f 100644 --- a/components/themes/diy.vue +++ b/components/themes/diy.vue @@ -1,543 +1,894 @@ - diff --git a/pages/product/detail.vue b/pages/product/detail.vue index e2bf25d..edd8a5b 100644 --- a/pages/product/detail.vue +++ b/pages/product/detail.vue @@ -973,7 +973,7 @@ {{ __('客服') }} - + diff --git a/pagesub/index/category.vue b/pagesub/index/category.vue new file mode 100644 index 0000000..310fa0c --- /dev/null +++ b/pagesub/index/category.vue @@ -0,0 +1,1368 @@ + + + + + diff --git a/pagesub/index/components/tabbar.vue b/pagesub/index/components/tabbar.vue new file mode 100644 index 0000000..de0fabf --- /dev/null +++ b/pagesub/index/components/tabbar.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/pagesub/index/feed.vue b/pagesub/index/feed.vue new file mode 100644 index 0000000..d665b99 --- /dev/null +++ b/pagesub/index/feed.vue @@ -0,0 +1,42 @@ + + + + + \ No newline at end of file diff --git a/pagesub/index/goods.vue b/pagesub/index/goods.vue new file mode 100644 index 0000000..14a4a4e --- /dev/null +++ b/pagesub/index/goods.vue @@ -0,0 +1,1750 @@ + + + + + diff --git a/pagesub/index/store.vue b/pagesub/index/store.vue index 965152e..56478f2 100644 --- a/pagesub/index/store.vue +++ b/pagesub/index/store.vue @@ -11,152 +11,91 @@ - {{ store_info.store_name }} + ">{{ store_info.store_name }} {{ __("综合体验") }} - + {{ store_info.store_grade_name }} - {{ sprintf(__("公告:%s"), store_info.store_slogan) }} + " v-if="store_info.store_slogan != ''">{{ sprintf(__("公告:%s"), store_info.store_slogan) }} - + - + - + - + - + - - + {{ __("推荐") }} - + {{ commonTPL.shopInfo.AllProduct }} {{ __("全部商品") }} - + {{ commonTPL.shopInfo.NewProduct }} {{ __("上新") }} - + {{ __("店铺简介") }} - + @@ -164,129 +103,73 @@ - + - + - + - + - + - + - + - + ]"> - + {{ __("销量") }} - + {{ __("新品") }} - + - - + + - + @@ -294,39 +177,39 @@ - {{ number_format(item.ItemSalePrice, 2) }} + + + + + - - - + - + @@ -352,47 +235,26 @@ - + - - + ]"> + - + - + @@ -400,44 +262,35 @@ - {{ number_format(item.ItemSalePrice, 2) }} + - - - + - - + + @@ -464,49 +317,33 @@ - + {{ commonTPL.shopInfo.LegalAdress }} - {{ sprintf(__("距您 %s"), distance) }} + {{ + sprintf(__("距您 %s"), distance) }} + style="width: 4rpx; height: 70rpx; border-radius: 24%" /> - + + class="phone-img" /> {{ __("联系商家") }} @@ -514,35 +351,16 @@ - - + - - - + + + @@ -550,17 +368,12 @@ - - + @@ -574,22 +387,13 @@ {{ comment.comment_content }} - + - + - + @@ -600,11 +404,8 @@ - + @@ -615,10 +416,7 @@ - + @@ -629,11 +427,11 @@ - - + + @@ -686,6 +484,7 @@ var thatProm = { formdate: "", pageId: 0, }; + import wxParse from "@/components/u-parse/u-parse.vue"; import paymentBox from "../../components/payment-box.vue"; @@ -699,6 +498,7 @@ import shoptheme5 from "../../components/themes/shoptheme5.vue"; import shoptheme6 from "../../components/themes/shoptheme6.vue"; import diy from "../../components/themes/diy.vue"; import uniTag from "@/components/uni-tag/uni-tag.vue"; +import MyTabbar from "./components/tabbar.vue"; import favorite from "@/helpers/favorite"; @@ -771,6 +571,7 @@ export default { "shopInfo", "userInfo", "hasLogin", + "cartNum", ]), components: { shoptheme1, @@ -782,7 +583,16 @@ export default { diy, uniTag, wxParse, + MyTabbar, }, + + onBackPress({ from }) { + console.log("=======", from); + if (from == "backbutton") { + uni.switchTab({ url: "/pages/index/index" }); + } + }, + onLoad: function (options) { this.initStorePageData(options); }, @@ -818,7 +628,7 @@ export default { /** * 页面上拉触底事件的处理函数 */ - onReachBottom: function () {}, + onReachBottom: function () { }, /** * 用户点击右上角分享 @@ -859,7 +669,7 @@ export default { /** * 页面滚动触发事件的处理函数 */ - onPageScroll: function () {}, + onPageScroll: function () { }, methods: { ...mapMutations([ @@ -868,7 +678,46 @@ export default { "forceUserInfo", "getStoreInfo", ]), - ckLabel: function (e) {}, + + goShopDetail(url) { + this.$.gopage(url) + }, + + async addCart(item, event) { + var that = this; + var params = { + item_id: item.item_id, + proName: item.product_name, + cart_quantity: 1, + activity_id: 0, + SKU_Id: item.item_id, + }; + + event.stopPropagation() + + await this.$store.dispatch(`addCart`, { + params: params, + callback: (data, status, msg, code) => { + if (status == 200) { + if (data.item_quantity != 0) { + that.$.alert(that.__("添加购物车成功"), function () { }, 400); + } else { + uni.showToast({ + title: "亲~商品没有库存啦!", + icon: "error", + duration: 500, + }); + // that.$.alert(that.__("商品没有库存了"), function () {}, 500); + } + + if (that.plantformInfo.prodcut_addcart_flag) { + that.$store.dispatch(`getCartList`, function (data) { }); + } + } + }, + }); + }, + ckLabel: function (e) { }, reloadShop6Data: function () { let that = this; if (this.$refs.shop6) { @@ -979,9 +828,9 @@ export default { Math.asin( Math.sqrt( Math.pow(Math.sin(a / 2), 2) + - Math.cos(radLat1) * - Math.cos(radLat2) * - Math.pow(Math.sin(b / 2), 2) + Math.cos(radLat1) * + Math.cos(radLat2) * + Math.pow(Math.sin(b / 2), 2) ) ); s = s * 6378.137; // EARTH_RADIUS; @@ -1047,11 +896,11 @@ export default { RefreshProduct: function (e) { e ? this.setData({ - refresh: true, - }) + refresh: true, + }) : this.setData({ - refresh: false, - }); + refresh: false, + }); }, //初始化数据,获取店铺分类 @@ -1108,7 +957,7 @@ export default { that.$.hideLoading(); }, - fail: function (err) {}, + fail: function (err) { }, }); }); //读取店铺商品分类 todo 根据需要读取。 @@ -1209,7 +1058,7 @@ export default { that.getStoreData(); }, // 查看店铺简介 - getStoreData: function () {}, + getStoreData: function () { }, // 切换商品显示方式 onViewType: function () { var that = this; @@ -1483,7 +1332,7 @@ export default { that.commonTPL.TemplateKey == "shopdiy" && that.getDivModel(); //shopdiy用户自定义UI resolve("success"); }, - complete: function (res, status) {}, + complete: function (res, status) { }, }); }); //读取店铺商品分类 @@ -1497,16 +1346,16 @@ export default { t.length > 2 || t.length < 2 ? that.$.alert("无法识别") : t[0] == "productId" - ? that.$.isNull(t[1]) - ? that.$.alert("无法识别") - : that.$.navigateTo("/pages/product/detail?pid=" + t[1]) - : t[0] == "eventId" - ? that.$.isNull(t[1]) - ? that.$.alert("无法识别") - : that.$.navigateTo( - "../activitycheckin/activitycheckin?eventId=" + t[1] - ) - : that.$.alert("无法识别"); + ? that.$.isNull(t[1]) + ? that.$.alert("无法识别") + : that.$.navigateTo("/pages/product/detail?pid=" + t[1]) + : t[0] == "eventId" + ? that.$.isNull(t[1]) + ? that.$.alert("无法识别") + : that.$.navigateTo( + "../activitycheckin/activitycheckin?eventId=" + t[1] + ) + : that.$.alert("无法识别"); }, fail: function (e) { that.$.alert("无法识别"); @@ -1528,17 +1377,17 @@ export default { }, userReceiveCoupon: function () { var e = { - CouponIds: "", + CouponIds: "", - user_is_new: this.user_is_new, - }, + user_is_new: this.user_is_new, + }, that = this; that.$.xsr(that.$.makeUrl(userapi.UserReceiveCoupon, e), function (e) { e.Code == 0 ? that.setData({ - isCancelSuccess: false, - Coupons: e.Info, - }) + isCancelSuccess: false, + Coupons: e.Info, + }) : that.$.alert(e.Msg); }); }, @@ -1602,13 +1451,29 @@ export default { }; - -