diff --git a/App.vue b/App.vue index dc722102..99145671 100644 --- a/App.vue +++ b/App.vue @@ -71,11 +71,11 @@ // tabbar页面 tabbar_pages: ['/pages/index/index', '/pages/goods-category/goods-category', '/pages/cart/cart', '/pages/user/user'], // 请求地址 - request_url: 'https://new.shopxo.vip/', - // request_url: 'http://shopxo.com/', + // request_url: 'https://new.shopxo.vip/', + request_url: 'http://shopxo.com/', // 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/) - static_url: 'https://new.shopxo.vip/', - // static_url: 'http://shopxo.com/', + // static_url: 'https://new.shopxo.vip/', + static_url: 'http://shopxo.com/', // 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立) system_type: 'default', // 基础信息 diff --git a/components/binding-detail-list/binding-detail-list.vue b/components/binding-detail-list/binding-detail-list.vue index b0a334ff..858917fe 100644 --- a/components/binding-detail-list/binding-detail-list.vue +++ b/components/binding-detail-list/binding-detail-list.vue @@ -4,7 +4,7 @@ - + {{bv.title}} @@ -13,7 +13,7 @@ - + @@ -29,18 +29,18 @@ - - + + + } + }; + \ No newline at end of file diff --git a/components/goods-list/goods-list.vue b/components/goods-list/goods-list.vue index 64c7e370..533b90ec 100644 --- a/components/goods-list/goods-list.vue +++ b/components/goods-list/goods-list.vue @@ -26,7 +26,7 @@ {{ item[propPriceField] }} - + @@ -40,11 +40,7 @@ - + {{ lv.name }} @@ -81,11 +77,7 @@ - + {{ grid_btn_config.name }} @@ -106,11 +98,7 @@ - + {{ lv.name }} @@ -123,14 +111,7 @@ - + @@ -139,36 +120,28 @@ {{ item.title }} - - - {{ item.price_icon }} - {{ propCurrencySymbol }} - {{ item[propPriceField] }} - - + - - + + + + {{ item.price_icon }} + {{ propCurrencySymbol }} + {{ item[propPriceField] }} + - + - + {{ lv.name }} diff --git a/components/magic-list/magic-list.vue b/components/magic-list/magic-list.vue index 975ade3e..00ed9ed2 100644 --- a/components/magic-list/magic-list.vue +++ b/components/magic-list/magic-list.vue @@ -28,9 +28,9 @@ - + {{ currency_symbol }} - {{ listItem.min_price }} + {{ listItem.min_price }} @@ -131,7 +131,6 @@ transform: translateY(-50%); } - .hot-list .swiper-2 { height: 176rpx; } diff --git a/pages/goods-detail/goods-detail.css b/pages/goods-detail/goods-detail.css index c7412a35..394fbe73 100644 --- a/pages/goods-detail/goods-detail.css +++ b/pages/goods-detail/goods-detail.css @@ -10,13 +10,16 @@ top: 28px; z-index: 11; } + .top-nav-left-icon { left: auto; margin-left: 20rpx; } + .top-nav-right-icon { right: 20rpx; } + .top-nav-left-icon .icon, .top-nav-right-icon .icon { background: rgb(255 255 255 / 70%); @@ -28,6 +31,7 @@ text-align: center; padding: 3px; } + .top-nav { position: absolute; bottom: 0; @@ -37,20 +41,24 @@ padding-bottom: 5px; /* #endif */ } + .top-nav-content { margin: 0 auto; width: 310rpx; margin-left: calc(50% - 170rpx); } + .top-nav-content text { font-size: 30rpx; /* #ifdef H5 || APP */ font-size: 14px; /* #endif */ } + .top-nav-content text:not(:last-child) { margin-right: 30rpx; } + .top-nav-content .nav-active { font-weight: 500; padding-bottom: 2rpx; @@ -70,6 +78,7 @@ top: 62px; left: 20rpx; } + .nav-more-view .triangle { width: 0; height: 0; @@ -79,12 +88,15 @@ top: -5px; left: calc(20rpx + 42px); } + .nav-more-view .content { background: rgb(0 0 0 / 0.7); } + .nav-more-view .content .item { font-size: 12px; } + .nav-more-view .content .item:not(:last-child) { border-bottom: 1px solid #585858; } @@ -108,13 +120,16 @@ height: 100rpx; z-index: 2; } + .goods-buy-nav .btn-items { padding: 15rpx 0; } + .goods-buy-nav .bus-items, .goods-buy-nav .btn-items { height: 100rpx; } + .goods-buy-nav .btn-items .item { height: 70rpx; line-height: 70rpx; @@ -123,48 +138,61 @@ margin-right: 15rpx; position: relative; } + .goods-buy-nav image { width: 40rpx; height: 40rpx; margin: 10rpx 0 5rpx 0; } + .goods-buy-nav .dis-block { margin-top: -10rpx; } + .goods-buy-nav .badge-icon { position: absolute; top: 2rpx; left: calc(50% + 25rpx); z-index: 1; } + .goods-buy-nav-btn-number-0 .item, .goods-buy-nav-btn-number-1 .item { width: calc(100% - 15rpx) !important; } + .goods-buy-nav-btn-number-2 .item { width: calc(50% - 15rpx) !important; } + .goods-buy-nav-btn-number-3 .item { width: calc(33.33% - 15rpx) !important; } + .goods-buy-nav-btn-number-4 .item { width: calc(25% - 15rpx) !important; } + .goods-buy-nav-btn-number-5 .item { width: calc(20% - 15rpx) !important; } + .goods-buy-nav-btn-number-6 .item { width: calc(16.66% - 15rpx) !important; } + .goods-buy-nav-btn-number-7 .item { width: calc(14.28% - 15rpx) !important; } + .goods-buy-nav-btn-number-8 .item { width: calc(12.5% - 15rpx) !important; } + .goods-buy-nav-btn-number-9 .item { width: calc(11.11% - 15rpx) !important; } + .goods-buy-nav-btn-number-10 .item { width: calc(10% - 15rpx) !important; } @@ -176,19 +204,23 @@ position: relative; min-height: 86rpx; } + .goods-base-content .goods-title { font-size: 36rpx; line-height: 52rpx; font-weight: bold; width: calc(100% - 200rpx); } + .goods-base-content image { width: 40rpx; height: 40rpx; } + .goods-base-content .collect { width: 76rpx; } + .goods-base-content .base-grid view { width: calc(33.33% - 1px); } @@ -202,16 +234,19 @@ left: 0; z-index: 1; } + .goods-video video { width: 100%; height: 55vh !important; } + .goods-video-submit { left: 50rpx; top: auto; bottom: 60rpx; z-index: 2; } + .goods-video-submit image { width: 80rpx; height: 80rpx !important; @@ -224,31 +259,38 @@ height: 145rpx; overflow: hidden; } + .price-content { - width: calc(100% - 230rpx); + width: calc(100% - 280rpx); } + .goods-base-right-opt { - width: 210rpx; + width: 280rpx; } + .price-content, .goods-base-right-opt { box-sizing: border-box; position: relative; height: 100%; } + .goods-base-right-opt image { width: 40rpx; height: 40rpx; } + .goods-base-right-opt .collect { width: 76rpx; } + .price-content .price-icon { margin-right: 5rpx; padding: 1px 5px; background: #FF5722; color: #fff; } + .price-content .sales-price { font-size: 42rpx; } @@ -268,13 +310,15 @@ .goods-base-price-countdown { background: #e84742 !important; } + .goods-base-price-countdown .price-content { background: #f9534e; background-repeat: no-repeat; background-size: 100% 100%; width: 60%; } -.goods-base-price-countdown .price-icon { + +.goods-base-price-countdown .price-icon { margin-right: 0; padding: 0px 10rpx; border: 1px solid #fff; @@ -284,44 +328,44 @@ bottom: 20rpx; font-size: 24rpx; } + .goods-base-price-countdown .sales-price { color: #fff; } + .goods-base-price-countdown .original-price { color: #ffcece; } + .countdown-content .time-title { font-size: 38rpx; margin-bottom: 10rpx; } -/** - * 栏目右侧内容 - */ -.column-right-view { - width: calc(100% - 190rpx); - margin-right: 50rpx; -} - /* * 商品参数 */ .parameters-base .content-item .item { color: #666; } + .goods-parameters .content-item .item { padding: 8rpx 10rpx; width: calc(50% - 20rpx); } + .goods-parameters .content-item .item .name { margin-right: 10rpx; } + .goods-parameters .content-item .item:nth-child(2n-1) { float: left; } + .goods-parameters .content-item .item:nth-child(2n) { float: right; } + /** * 商品参数弹窗 */ @@ -330,11 +374,13 @@ overflow-y: scroll; overflow-x: hidden; } + .popup-params-container .item .name { - width: 220rpx; + width: 220rpx; } + .popup-params-container .item .value { - width: calc(100% - 240rpx); + width: calc(100% - 240rpx); } /* @@ -353,9 +399,11 @@ background: #fffbfc; color: #d2354c; } + .goods-panel-container view { padding: 15rpx 0; } + .goods-panel-container view:not(:first-child) { border-top: 1px dashed #fff1f2; } @@ -382,6 +430,7 @@ -moz-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 8px 10px rgb(0 0 0 / 20%); } + .plugins-salerecords-tips image, .plugins-salerecords-tips-top-left image, .plugins-salerecords-tips-top-right image, @@ -393,40 +442,49 @@ height: 50rpx; border-radius: 50%; } + .plugins-salerecords-tips-top-left { left: 5%; top: 13%; } + .plugins-salerecords-tips-top-right { right: 5%; top: 13%; left: auto; } + .plugins-salerecords-tips-top-center { top: 13%; } + /* #ifdef MP-ALIPAY */ .plugins-salerecords-tips-top-left { top: 5%; } + .plugins-salerecords-tips-top-right { top: 5%; } + .plugins-salerecords-tips-top-center { top: 5%; } + /* #endif */ .plugins-salerecords-tips-bottom-left { left: 5%; bottom: 10%; top: auto; } + .plugins-salerecords-tips-bottom-right { right: 5%; bottom: 10%; left: auto; top: auto; } + .plugins-salerecords-tips-bottom-center { bottom: 10%; top: auto; @@ -435,33 +493,100 @@ /* * 优惠劵 - 插件 */ +.coupon-padding { + padding: 2rpx; +} +.mini-coupon { + position: relative; + display: inline-block; + height: 40rpx; + line-height: 40rpx; + border-radius: 4rpx; + padding: 0 16rpx; +} + +.mini-coupon::before, +.mini-coupon::after { + content: ''; + width: 14rpx; + height: 14rpx; + border-radius: 50%; + background-color: #fff; + position: absolute; + top: 50%; + transform: translateY(-50%); +} + +.mini-coupon::before { + left: -8rpx; +} + +.mini-coupon::after { + right: -8rpx; +} +.mini-coupon-br::before, +.mini-coupon-br::after { + border: 1px solid #FE5500; +} + +.coupon-srcoll { + white-space: nowrap; + overflow-x: auto; +} + +.coupon-srcoll::-webkit-scrollbar { + width: 0; + height: 0; + display: none; +} + +.received-coupon { + background: #FFEBE0; + border: 2rpx solid #FE5500; + color: #FE5500; +} + +.not-received-coupon { + background: #FE5500; + border: 2rpx solid #FE5500; + color: #fff; +} +.received-coupon .divider-l::before { + background: red; +} +.not-received-coupon .divider-l::before { + background: #fff; +} + .plugins-coupon-container-view .item-title { - min-width: 100rpx; -} -.plugins-coupon-container-view .item { - padding: 5rpx 15rpx; - display: inline-table; + min-width: 70rpx; } + .plugins-coupon-container-view .item:not(:last-child) { margin-right: 10rpx; } + .plugins-coupon-container { max-height: 50vh; overflow-y: scroll; overflow-x: hidden; margin-top: 20rpx; } + .plugins-coupon-container .v-left { padding: 20rpx 10rpx 20rpx 20rpx; } + .plugins-coupon-container .item:not(:last-child) { margin-bottom: 20rpx; } + .plugins-coupon-container .item, .plugins-coupon-container .v-right, .plugins-coupon-container .v-right .circle { height: 175rpx; } + .plugins-coupon-container .v-left .base .price { font-size: 46rpx; } @@ -470,33 +595,35 @@ * 批发 - 插件 */ .plugins-wholesale-container-view .item-title { - min-width: 100rpx; + min-width: 70rpx; } + .plugins-wholesale-container-view .item { padding: 5rpx 15rpx; color: #ff6633; border: 1px dashed #ff9e7e; display: inline-table; } + .plugins-wholesale-container-view .item:not(:last-child) { margin-right: 10rpx; } + .plugins-wholesale-container { max-height: 50vh; overflow-y: scroll; overflow-x: hidden; margin-top: 20rpx; } -.plugins-wholesale-container .item { - width: calc(50% - 50rpx); - margin-bottom: 20rpx; -} -.plugins-wholesale-container .item:nth-child(2n) { + +.plugins-wholesale-container .item>view:nth-child(2n) { margin-left: 10rpx; } -.plugins-wholesale-container .item:nth-child(2n+1) { + +.plugins-wholesale-container .item>view:nth-child(2n+1) { margin-right: 10rpx; } + .plugins-wholesale-container .spec-tips { color: #ffbf00; border: 1px solid #333; @@ -512,17 +639,21 @@ .plugins-label navigator:not(:last-child) { margin-right: 20rpx; } + .plugins-label navigator { margin-bottom: 20rpx; } + .plugins-label-top-left, .plugins-label-top-center, .plugins-label-top-right { top: calc(var(--status-bar-height) + 130rpx); } + .plugins-label-text { padding: 20rpx 20rpx 0 20rpx; } + .plugins-label-bottom-left, .plugins-label-bottom-center, .plugins-label-bottom-right { @@ -538,14 +669,17 @@ border-color: #ffe2e0; color: #dd514c; } + .plugins-intellectstools-content-top-container { background: #daeeff; color: #2b6e8f; border: 1px solid #c9e9ff; } + .plugins-intellectstools-content-top-container .panel-content .item:first-child { padding-top: 0 !important; } + .plugins-intellectstools-content-top-container .panel-title, .plugins-intellectstools-content-top-container .panel-content .item:not(:last-child) { border-bottom: 1px solid #c8e4fb !important; @@ -564,20 +698,20 @@ /** * 商品服务 - 插件 */ -.plugins-goodsservice-view-container .content { - width: calc(100% - 30rpx); -} .plugins-goodsservice-view-container .item image { width: 32rpx; height: 32rpx !important; } + .plugins-goodsservice-container .item image { width: 70rpx; height: 70rpx !important; } + .plugins-goodsservice-container .item .left { width: 80rpx; } + .plugins-goodsservice-container .item .right { width: calc(100% - 90rpx); } \ No newline at end of file diff --git a/pages/goods-detail/goods-detail.vue b/pages/goods-detail/goods-detail.vue index d12b905c..440eb5f1 100644 --- a/pages/goods-detail/goods-detail.vue +++ b/pages/goods-detail/goods-detail.vue @@ -113,7 +113,7 @@ 分享 - + {{ nav_favor_button_info.text }} @@ -198,28 +198,38 @@ - - {{ plugins_wholesale_data.title }} - + {{ plugins_wholesale_data.title }} + + {{ item.msg }} + - - - 优惠券 - + 优惠券 + + - {{ item.desc || item.name }} + + + + {{ item.desc || item.name }} + {{ item.status_operable_name }} + + + + + 共{{ plugins_coupon_data.data.length }}张 + + - @@ -231,23 +241,27 @@ - - - - {{ item.value }} - + + + + + {{ item.value }} + + + - - + + - + {{ item.name }} - + + @@ -442,7 +456,7 @@ - + @@ -463,21 +477,23 @@ - + - + {{ plugins_wholesale_data.spec_tips }} - + - - {{ item.arr.msg }} - {{ item.arr.val }} - {{ item.arr.unit }} + + + {{ item.arr.msg }} + {{ item.arr.val }} + {{ item.arr.unit }} + @@ -491,30 +507,16 @@ - + - + - - - - {{ currency_symbol }} - {{ item.discount_value }} - {{ item.type_unit }} - - {{ item.use_limit_type_name }} - {{ item.desc }} - - - - {{ item.is_operable_name }} - - + @@ -526,10 +528,10 @@ - + - + @@ -548,7 +550,7 @@ - + @@ -618,6 +620,7 @@ import componentSharePopup from '../../components/share-popup/share-popup'; import componentGoodsComments from '../../components/goods-comments/goods-comments'; import componentAskCommentsGoods from '../../components/ask-comments-goods/ask-comments-goods'; + import componentCouponCard from '../../components/coupon-card/coupon-card'; var common_static_url = app.globalData.get_static_url('common'); var ask_static_url = app.globalData.get_static_url('ask', true) + 'app/'; @@ -764,6 +767,7 @@ componentSharePopup, componentGoodsComments, componentAskCommentsGoods, + componentCouponCard, }, onLoad(params) { @@ -1244,24 +1248,17 @@ }, // 优惠劵领取事件 - coupon_receive_event(e) { + coupon_receive_event(index, value) { // 参数处理 - if ((e || null) == null) { + if ((index || null) == null && (value || null) == null) { var index = this.temp_coupon_receive_index; var value = this.temp_coupon_receive_value; } else { - var index = e.currentTarget.dataset.index; - var value = e.currentTarget.dataset.value; this.setData({ temp_coupon_receive_index: index, temp_coupon_receive_value: value, }); } - // 是否可以领取 - var temp_list = this.plugins_coupon_data.data; - if (temp_list[index]['is_operable'] != 1) { - return false; - } // 登录校验 var user = app.globalData.get_user_info(this, 'coupon_receive_event'); @@ -1273,6 +1270,7 @@ }); return false; } else { + var temp_list = this.plugins_coupon_data.data; uni.showLoading({ title: '处理中...', }); @@ -1287,13 +1285,23 @@ uni.hideLoading(); if (res.data.code == 0) { app.globalData.showToast(res.data.msg, 'success'); - if (this.plugins_coupon_data.base != null && this.plugins_coupon_data.base.is_repeat_receive != 1) { - temp_list[index]['is_operable'] = 0; - temp_list[index]['is_operable_name'] = '已领取'; - this.setData({ - 'plugins_coupon_data.data': temp_list, - }); - } + temp_list[index] = res.data.data.coupon; + this.setData({ + 'plugins_coupon_data.data': temp_list, + }); + // if ((res.data.data.is_repeat_receive = 1)) { + // temp_list[index]['is_repeat_receive'] = 1; + // temp_list[index]['already_receive_text'] = '已领取'; + // temp_list[index]['already_receive_text'] = '已领取'; + // if (temp_list[index].process_data.type !== 0) { + // temp_list[index]['already_send_count'] = Number(temp_list[index]['already_send_count']) + 1; + // temp_list[index]['process_data'].value = Math.floor((Number(temp_list[index]['already_send_count']) / Number(temp_list[index]['limit_send_count'])) * 100); + // temp_list[index]['process_data'].msg = '已领' + Math.floor((Number(temp_list[index]['already_send_count']) / Number(temp_list[index]['limit_send_count'])) * 100) + '%'; + // } + // this.setData({ + // 'plugins_coupon_data.data': temp_list, + // }); + // } } else { if (app.globalData.is_login_check(res.data, this, 'coupon_receive_event')) { app.globalData.showToast(res.data.msg); diff --git a/pages/plugins/coupon/index/index.vue b/pages/plugins/coupon/index/index.vue index a340fdf7..d614d65c 100644 --- a/pages/plugins/coupon/index/index.vue +++ b/pages/plugins/coupon/index/index.vue @@ -198,14 +198,10 @@ uni.hideLoading(); if (res.data.code == 0) { app.globalData.showToast(res.data.msg, 'success'); - if (this.data_base != null && this.data_base.is_repeat_receive != 1) { - temp_list[index]['is_operable'] = 0; - temp_list[index]['is_operable_name'] = '已领取'; - this.setData({ - data_list: temp_list, - }); - } - this.get_data_list(); + temp_list[index] = res.data.data.coupon; + this.setData({ + data_list: temp_list, + }); } else { if (app.globalData.is_login_check(res.data, this, 'coupon_receive_event')) { app.globalData.showToast(res.data.msg);