-
mentioned in commit 9f288d0b9ee04d79d65f99f43e6afc432b0d2fb0
-
Status changed to merged
Showing
95 changed files
app.js
| ... | ... | @@ -51,7 +51,7 @@ App({ |
| 51 | 51 | config: null, //门店参数 |
| 52 | 52 | config2: null, //门店配置 |
| 53 | 53 | code: null, |
| 54 | - user_id:null,// qa-6519858,// | |
| 54 | + user_id:null,// 6520352,// qa-6519858,// | |
| 55 | 55 | // user_id:6520314,// qa-6519858,// |
| 56 | 56 | // user_id:14148118,// qa-6519858,// |
| 57 | 57 | buy_now: null, |
| ... | ... | @@ -928,7 +928,7 @@ App({ |
| 928 | 928 | }); |
| 929 | 929 | }, |
| 930 | 930 | |
| 931 | - user_tools_endTime(type) { | |
| 931 | + user_tools_endTime(type,func) { | |
| 932 | 932 | //调用接口判断商家工具有没有过期 |
| 933 | 933 | return this.request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=" + type + "", {}).then(res => { |
| 934 | 934 | if (res.data.code == 0) { |
| ... | ... | @@ -938,8 +938,18 @@ App({ |
| 938 | 938 | if (item.is_sy == 0) { |
| 939 | 939 | var now = Date.parse(new Date()); now = now / 1000; |
| 940 | 940 | if (item.end_time < now) { |
| 941 | + | |
| 942 | + if(func){ | |
| 943 | + func(0) | |
| 944 | + return false; | |
| 945 | + } | |
| 941 | 946 | return 0 |
| 942 | 947 | } |
| 948 | + if(func){ | |
| 949 | + func(1) | |
| 950 | + return false; | |
| 951 | + } | |
| 952 | + | |
| 943 | 953 | return 1; |
| 944 | 954 | } |
| 945 | 955 | } | ... | ... |
app.json
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | "pages/user/grow_value/grow_value", |
| 38 | 38 | "pages/payment/pay_success/pay_success", |
| 39 | 39 | "pages/user/plus/plus", |
| 40 | - "pages/user/cardinfo/cardinfo", | |
| 40 | + | |
| 41 | 41 | "pages/user/my_service/appment_main", |
| 42 | 42 | "pages/user/my_service/i_service", |
| 43 | 43 | "pages/user/my_service/cosmetology_list", |
| ... | ... | @@ -209,7 +209,8 @@ |
| 209 | 209 | "pages": [ |
| 210 | 210 | "pages/togoin/togoin", |
| 211 | 211 | "pages/user/Detailed/Detailed", |
| 212 | - "pages/user/user_fw/user_fw" | |
| 212 | + "pages/user/user_fw/user_fw", | |
| 213 | + "pages/user/cardinfo/cardinfo" | |
| 213 | 214 | ] |
| 214 | 215 | } |
| 215 | 216 | ... | ... |
app.wxss
components/cart_collect_temp/cart_collect_temp.js
0 → 100644
| 1 | +Component({ | |
| 2 | + properties: { | |
| 3 | + // 这里定义了数据列表属性,列表显示数据 | |
| 4 | + all_collocation_list: { | |
| 5 | + type: Array, | |
| 6 | + value: null | |
| 7 | + }, | |
| 8 | + // 是不是购物车 | |
| 9 | + is_cart: { | |
| 10 | + type: Boolean, | |
| 11 | + value: false | |
| 12 | + }, | |
| 13 | + // 购物车的索引 | |
| 14 | + cart_index: { | |
| 15 | + type: Number, | |
| 16 | + value: 0 | |
| 17 | + } | |
| 18 | + | |
| 19 | + }, | |
| 20 | + /*** 页面的初始数据***/ | |
| 21 | + data: { | |
| 22 | + imgUrl: getApp().globalData.setting.imghost, | |
| 23 | + }, | |
| 24 | + methods: { | |
| 25 | + select_coll(e) { | |
| 26 | + var index = e.currentTarget.dataset.index; | |
| 27 | + var itr = this.properties.all_collocation_list[index]; | |
| 28 | + var ob = { | |
| 29 | + index: index, | |
| 30 | + selected: !itr.selected | |
| 31 | + } | |
| 32 | + | |
| 33 | + if(this.properties.is_cart){ | |
| 34 | + ob.is_cart =1; | |
| 35 | + ob.cart_index =this.properties.cart_index; | |
| 36 | + } | |
| 37 | + | |
| 38 | + var txt = "all_collocation_list[" + index + "].selected" | |
| 39 | + | |
| 40 | + this.setData({[txt]: ob.selected}) | |
| 41 | + this.triggerEvent('childFun', ob); | |
| 42 | + }, | |
| 43 | + | |
| 44 | + //图片失败,默认图片 | |
| 45 | + bind_bnerr3: function (e) { | |
| 46 | + var _errImg = e.target.dataset.errorimg; | |
| 47 | + var _Img = e.target.dataset.img; | |
| 48 | + if (_Img != undefined) { | |
| 49 | + var _errObj = {}; | |
| 50 | + _errObj[_errImg] = "/public/images/default_goods_image_240.gif"; | |
| 51 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 52 | + } | |
| 53 | + }, | |
| 54 | + | |
| 55 | + | |
| 56 | + } | |
| 57 | +}) | |
| 0 | 58 | \ No newline at end of file | ... | ... |
components/cart_collect_temp/cart_collect_temp.json
0 → 100644
components/cart_collect_temp/cart_collect_temp.wxml
0 → 100644
| 1 | +<!-- 如果有搭配购商品的售 --> | |
| 2 | +<view class="seckill" wx:if="{{all_collocation_list && all_collocation_list.length != 0}}" | |
| 3 | + style="border-bottom: 20rpx solid #F0F0F0;border-top: 20rpx solid #F0F0F0;"> | |
| 4 | + <view class="fs30 pd20">超值搭配</view> | |
| 5 | + <view class=""> | |
| 6 | + <scroll-view scroll-x="true" class="s_proms" style="height:400rpx" indicator-active-color='red' bindchange="ptSwiperChange" indicator-dots> | |
| 7 | + <view class="flex" style="padding: 0; margin-left: 10rpx"> | |
| 8 | + <navigator wx:for="{{all_collocation_list}}" style="flex-shrink: 0;width: 247rpx" class="nav" hover-class="none" | |
| 9 | + url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" > | |
| 10 | + <view class="imgview" style="height:247rpx;width: 247rpx"> | |
| 11 | + <image src="{{imgUrl+item.original_img}}" mode="aspectFill" lazy-load="true" | |
| 12 | + data-errorimg="all_collocation_list[{{index}}].original_img" | |
| 13 | + binderror="bind_bnerr3" data-img="{{item.original_img}}"></image> | |
| 14 | + </view> | |
| 15 | + <view class="ellipsis-2 fs30" style="height: 84rpx;">{{item.goods_name}}</view> | |
| 16 | + <view class="co-red flex jc_sb ai_c" style="margin-top:6rpx"> | |
| 17 | + <view><text class="fs20">¥</text>{{item.price}}</view> | |
| 18 | + <view style="margin-right:10rpx" catchtap="select_coll" data-index="{{index}}" > | |
| 19 | + <icon color="{{item.selected?'red':'gray'}}" size="14" type="success"></icon> | |
| 20 | + </view> | |
| 21 | + </view> | |
| 22 | + </navigator> | |
| 23 | + </view> | |
| 24 | + </scroll-view> | |
| 25 | + </view> | |
| 26 | +</view> | ... | ... |
components/cart_collect_temp/cart_collect_temp.wxss
0 → 100644
components/diy_advertising/diy_advertising.wxss
components/diy_goodsGroup/diy_goodsGroup.js
| ... | ... | @@ -56,6 +56,11 @@ Component({ |
| 56 | 56 | title_class: "", |
| 57 | 57 | is_no_plus: 1, |
| 58 | 58 | container: null, |
| 59 | + | |
| 60 | + //判断接口是不是调用完成 | |
| 61 | + is_get:0, | |
| 62 | + | |
| 63 | + is_retail_price:0 //是否显示零售价 | |
| 59 | 64 | }, |
| 60 | 65 | |
| 61 | 66 | lifetimes: { |
| ... | ... | @@ -315,44 +320,10 @@ Component({ |
| 315 | 320 | getApp().getConfig2(function (e) { |
| 316 | 321 | var swithc_list = e.switch_list; |
| 317 | 322 | var sw_arr = JSON.parse(swithc_list); |
| 318 | - //---如果后台又开等级卡的开关--- | |
| 319 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 320 | - th.setData({ | |
| 321 | - rank_switch: true | |
| 322 | - }); | |
| 323 | - //---回调卡的列表--- | |
| 324 | - th.getPlusCardType(function (ob) { | |
| 325 | - th.setData({ | |
| 326 | - card_list: ob.card_list | |
| 327 | - }); | |
| 328 | - var ti = setInterval(function () { | |
| 329 | - var user = getApp().globalData.userInfo; | |
| 330 | - if (!user) return false; | |
| 331 | - clearInterval(ti); | |
| 332 | - | |
| 333 | - if (user.card_field && user['card_expiredate']) { | |
| 334 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 335 | - var end = new Date(str); | |
| 336 | - end = Date.parse(end) / 1000; | |
| 337 | - var now = ut.gettimestamp(); | |
| 338 | - | |
| 339 | - //--- 判断是等级会员,且在有效期范围内 --- | |
| 340 | - if (user.card_field && now < end) { | |
| 341 | - var card_name = ob.name_map.get(user.card_field); | |
| 342 | - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 4); | |
| 343 | - th.setData({ | |
| 344 | - card_field: user.card_field, | |
| 345 | - card_name: card_name, | |
| 346 | - card_list: ob.card_list | |
| 347 | - }); | |
| 348 | - } | |
| 349 | - | |
| 350 | - } | |
| 351 | - | |
| 352 | - }, 500) | |
| 353 | - }) | |
| 354 | - | |
| 323 | + if(sw_arr.is_retail_price){ | |
| 324 | + th.setData({is_retail_price:1}); | |
| 355 | 325 | } |
| 326 | + ut.get_plus_name_price(sw_arr,th); | |
| 356 | 327 | }) |
| 357 | 328 | } |
| 358 | 329 | }) |
| ... | ... | @@ -571,11 +542,12 @@ Component({ |
| 571 | 542 | for (var i = 0; i < rData.length; i += 3) { |
| 572 | 543 | arr.push(rData.slice(i, i + 3)); |
| 573 | 544 | } |
| 574 | - th.setData({ goods_array: arr, page: th.data.currentPage - 1, }); | |
| 545 | + th.setData({ goods_array: arr, page: th.data.currentPage - 1,is_get:1 }); | |
| 575 | 546 | } else { |
| 576 | 547 | th.setData({ |
| 577 | 548 | goods_array: th.data.requestData, |
| 578 | 549 | page: th.data.currentPage - 1, |
| 550 | + is_get:1 | |
| 579 | 551 | }); |
| 580 | 552 | } |
| 581 | 553 | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.wxml
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | </block> |
| 26 | 26 | |
| 27 | 27 | |
| 28 | -<view style="background-color: {{bg_color}};" wx:if="{{goods_array.length > 0 }}"> | |
| 28 | +<view style="background-color: {{bg_color}};" wx:if="{{goods_array.length > 0 }}"> | |
| 29 | 29 | <!--1个列表的时候--> |
| 30 | 30 | <view class="zs_goods_wai" wx:if='{{object.column==1}}'> |
| 31 | 31 | <block wx:for="{{goods_array}}"> |
| ... | ... | @@ -67,7 +67,7 @@ |
| 67 | 67 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 68 | 68 | <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> |
| 69 | 69 | </view> |
| 70 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 70 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view> | |
| 71 | 71 | </block> |
| 72 | 72 | <block wx:else> |
| 73 | 73 | |
| ... | ... | @@ -89,10 +89,10 @@ |
| 89 | 89 | </view> |
| 90 | 90 | <view class="flex" style="line-height: 28rpx;"> |
| 91 | 91 | <!-- 原价 --> |
| 92 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 93 | -<!-- <view class="fs22">¥</view>--> | |
| 94 | -<!--<!– <view class="fs22">{{item.market_price}}</view>–>--> | |
| 95 | -<!-- </view>--> | |
| 92 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 93 | + <view class="fs22">¥</view> | |
| 94 | + <view class="fs22">{{item.market_price}}</view> | |
| 95 | + </view> | |
| 96 | 96 | </view> |
| 97 | 97 | </block> |
| 98 | 98 | <blocK wx:else> |
| ... | ... | @@ -105,10 +105,10 @@ |
| 105 | 105 | </view> |
| 106 | 106 | <view class="flex" style="line-height: 28rpx;"> |
| 107 | 107 | <!-- 原价 --> |
| 108 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 109 | -<!-- <view class="fs22">¥</view>--> | |
| 110 | -<!--<!– <view class="fs22">{{item.market_price}}</view>–>--> | |
| 111 | -<!-- </view>--> | |
| 108 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 109 | + <view class="fs22">¥</view> | |
| 110 | + <view class="fs22">{{item.market_price}}</view> | |
| 111 | + </view> | |
| 112 | 112 | </view> |
| 113 | 113 | </blocK> |
| 114 | 114 | </block> |
| ... | ... | @@ -122,10 +122,10 @@ |
| 122 | 122 | <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> |
| 123 | 123 | </view> |
| 124 | 124 | <!-- 原价 --> |
| 125 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 126 | -<!-- <view class="fs22">¥</view>--> | |
| 127 | -<!--<!– <view class="fs22">{{item.market_price}}</view>–>--> | |
| 128 | -<!-- </view>--> | |
| 125 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 126 | + <view class="fs22">¥</view> | |
| 127 | + <view class="fs22">{{item.market_price}}</view> | |
| 128 | + </view> | |
| 129 | 129 | |
| 130 | 130 | </view> |
| 131 | 131 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -150,10 +150,10 @@ |
| 150 | 150 | </view> |
| 151 | 151 | <view class="flex" style="line-height: 28rpx;"> |
| 152 | 152 | <!-- 原价 --> |
| 153 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 154 | -<!-- <view class="fs22">¥</view>--> | |
| 155 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 156 | -<!-- </view>--> | |
| 153 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 154 | + <view class="fs22">¥</view> | |
| 155 | + <view class="fs22">{{item.market_price}}</view> | |
| 156 | + </view> | |
| 157 | 157 | </view> |
| 158 | 158 | </block> |
| 159 | 159 | </block> |
| ... | ... | @@ -161,7 +161,7 @@ |
| 161 | 161 | |
| 162 | 162 | <block wx:else> |
| 163 | 163 | <view class='wz_red'>¥{{item.shop_price}}</view> |
| 164 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 164 | + <view wx:if="{{is_retail_price}}"class='del'>¥{{item.market_price}}</view> | |
| 165 | 165 | </block> |
| 166 | 166 | |
| 167 | 167 | </block> |
| ... | ... | @@ -237,7 +237,7 @@ |
| 237 | 237 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 238 | 238 | <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> |
| 239 | 239 | </view> |
| 240 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 240 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view> | |
| 241 | 241 | </block> |
| 242 | 242 | <block wx:else> |
| 243 | 243 | <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> |
| ... | ... | @@ -258,10 +258,10 @@ |
| 258 | 258 | </view> |
| 259 | 259 | <view class="flex" style="line-height: 28rpx;"> |
| 260 | 260 | <!-- 原价 --> |
| 261 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 262 | -<!-- <view class="fs22">¥</view>--> | |
| 263 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 264 | -<!-- </view>--> | |
| 261 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 262 | + <view class="fs22">¥</view> | |
| 263 | + <view class="fs22">{{item.market_price}}</view> | |
| 264 | + </view> | |
| 265 | 265 | </view> |
| 266 | 266 | </block> |
| 267 | 267 | <blocK wx:else> |
| ... | ... | @@ -274,10 +274,10 @@ |
| 274 | 274 | </view> |
| 275 | 275 | <view class="flex" style="line-height: 28rpx;"> |
| 276 | 276 | <!-- 原价 --> |
| 277 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 278 | -<!-- <view class="fs22">¥</view>--> | |
| 279 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 280 | -<!-- </view>--> | |
| 277 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 278 | + <view class="fs22">¥</view> | |
| 279 | + <view class="fs22">{{item.market_price}}</view> | |
| 280 | + </view> | |
| 281 | 281 | </view> |
| 282 | 282 | </blocK> |
| 283 | 283 | </block> |
| ... | ... | @@ -291,10 +291,10 @@ |
| 291 | 291 | <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> |
| 292 | 292 | </view> |
| 293 | 293 | <!-- 原价 --> |
| 294 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 295 | -<!-- <view class="fs22">¥</view>--> | |
| 296 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 297 | -<!-- </view>--> | |
| 294 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 295 | + <view class="fs22">¥</view> | |
| 296 | + <view class="fs22">{{item.market_price}}</view> | |
| 297 | + </view> | |
| 298 | 298 | |
| 299 | 299 | </view> |
| 300 | 300 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -319,17 +319,17 @@ |
| 319 | 319 | </view> |
| 320 | 320 | <view class="flex" style="line-height: 28rpx;"> |
| 321 | 321 | <!-- 原价 --> |
| 322 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 323 | -<!-- <view class="fs22">¥</view>--> | |
| 324 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 325 | -<!-- </view>--> | |
| 322 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 323 | + <view class="fs22">¥</view> | |
| 324 | + <view class="fs22">{{item.market_price}}</view> | |
| 325 | + </view> | |
| 326 | 326 | </view> |
| 327 | 327 | </block> |
| 328 | 328 | </block> |
| 329 | 329 | </block> |
| 330 | 330 | <block wx:else> |
| 331 | 331 | <view class='wz_red'>¥{{item.shop_price}}</view> |
| 332 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 332 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view> | |
| 333 | 333 | </block> |
| 334 | 334 | </block> |
| 335 | 335 | </view> |
| ... | ... | @@ -406,7 +406,7 @@ |
| 406 | 406 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 407 | 407 | <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> |
| 408 | 408 | </view> |
| 409 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 409 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view> | |
| 410 | 410 | </block> |
| 411 | 411 | <block wx:else> |
| 412 | 412 | <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> |
| ... | ... | @@ -427,10 +427,10 @@ |
| 427 | 427 | </view> |
| 428 | 428 | <view class="flex" style="line-height: 28rpx;"> |
| 429 | 429 | <!-- 原价 --> |
| 430 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 431 | -<!-- <view class="fs22">¥</view>--> | |
| 432 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 433 | -<!-- </view>--> | |
| 430 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 431 | + <view class="fs22">¥</view> | |
| 432 | + <view class="fs22">{{item.market_price}}</view> | |
| 433 | + </view> | |
| 434 | 434 | </view> |
| 435 | 435 | </block> |
| 436 | 436 | <blocK wx:else> |
| ... | ... | @@ -443,10 +443,10 @@ |
| 443 | 443 | </view> |
| 444 | 444 | <view class="flex" style="line-height: 28rpx;"> |
| 445 | 445 | <!-- 原价 --> |
| 446 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 447 | -<!-- <view class="fs22">¥</view>--> | |
| 448 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 449 | -<!-- </view>--> | |
| 446 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 447 | + <view class="fs22">¥</view> | |
| 448 | + <view class="fs22">{{item.market_price}}</view> | |
| 449 | + </view> | |
| 450 | 450 | </view> |
| 451 | 451 | </blocK> |
| 452 | 452 | </block> |
| ... | ... | @@ -460,10 +460,10 @@ |
| 460 | 460 | <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> |
| 461 | 461 | </view> |
| 462 | 462 | <!-- 原价 --> |
| 463 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 464 | -<!-- <view class="fs22">¥</view>--> | |
| 465 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 466 | -<!-- </view>--> | |
| 463 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 464 | + <view class="fs22">¥</view> | |
| 465 | + <view class="fs22">{{item.market_price}}</view> | |
| 466 | + </view> | |
| 467 | 467 | |
| 468 | 468 | </view> |
| 469 | 469 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -488,17 +488,17 @@ |
| 488 | 488 | </view> |
| 489 | 489 | <view class="flex" style="line-height: 28rpx;"> |
| 490 | 490 | <!-- 原价 --> |
| 491 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 492 | -<!-- <view class="fs22">¥</view>--> | |
| 493 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 494 | -<!-- </view>--> | |
| 491 | + <view class="price flex xc-ash line_th"> | |
| 492 | + <view class="fs22">¥</view> | |
| 493 | + <view class="fs22">{{item.market_price}}</view> | |
| 494 | + </view> | |
| 495 | 495 | </view> |
| 496 | 496 | </block> |
| 497 | 497 | </block> |
| 498 | 498 | </block> |
| 499 | 499 | <block wx:else> |
| 500 | 500 | <view class='wz_red'>¥{{item.shop_price}}</view> |
| 501 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 501 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view> | |
| 502 | 502 | </block> |
| 503 | 503 | </block> |
| 504 | 504 | </view> |
| ... | ... | @@ -577,7 +577,7 @@ |
| 577 | 577 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 578 | 578 | <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> |
| 579 | 579 | </view> |
| 580 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 580 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view> | |
| 581 | 581 | </block> |
| 582 | 582 | <!-- 不是活动的情况 --> |
| 583 | 583 | <block wx:else> |
| ... | ... | @@ -600,10 +600,10 @@ |
| 600 | 600 | </view> |
| 601 | 601 | <view class="flex" style="line-height: 28rpx;"> |
| 602 | 602 | <!-- 原价 --> |
| 603 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 604 | -<!-- <view class="fs22">¥</view>--> | |
| 605 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 606 | -<!-- </view>--> | |
| 603 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 604 | + <view class="fs22">¥</view> | |
| 605 | + <view class="fs22">{{item.market_price}}</view> | |
| 606 | + </view> | |
| 607 | 607 | </view> |
| 608 | 608 | </block> |
| 609 | 609 | <blocK wx:else> |
| ... | ... | @@ -616,10 +616,10 @@ |
| 616 | 616 | </view> |
| 617 | 617 | <view class="flex" style="line-height: 28rpx;"> |
| 618 | 618 | <!-- 原价 --> |
| 619 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 620 | -<!-- <view class="fs22">¥</view>--> | |
| 621 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 622 | -<!-- </view>--> | |
| 619 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 620 | + <view class="fs22">¥</view> | |
| 621 | + <view class="fs22">{{item.market_price}}</view> | |
| 622 | + </view> | |
| 623 | 623 | </view> |
| 624 | 624 | </blocK> |
| 625 | 625 | </block> |
| ... | ... | @@ -633,10 +633,10 @@ |
| 633 | 633 | <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> |
| 634 | 634 | </view> |
| 635 | 635 | <!-- 原价 --> |
| 636 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 637 | -<!-- <view class="fs22">¥</view>--> | |
| 638 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 639 | -<!-- </view>--> | |
| 636 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 637 | + <view class="fs22">¥</view> | |
| 638 | + <view class="fs22">{{item.market_price}}</view> | |
| 639 | + </view> | |
| 640 | 640 | |
| 641 | 641 | </view> |
| 642 | 642 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -660,10 +660,10 @@ |
| 660 | 660 | </view> |
| 661 | 661 | <view class="flex" style="line-height: 28rpx;"> |
| 662 | 662 | <!-- 原价 --> |
| 663 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 664 | -<!-- <view class="fs22">¥</view>--> | |
| 665 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 666 | -<!-- </view>--> | |
| 663 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 664 | + <view class="fs22">¥</view> | |
| 665 | + <view class="fs22">{{item.market_price}}</view> | |
| 666 | + </view> | |
| 667 | 667 | </view> |
| 668 | 668 | </block> |
| 669 | 669 | </block> |
| ... | ... | @@ -671,7 +671,7 @@ |
| 671 | 671 | |
| 672 | 672 | <block wx:else> |
| 673 | 673 | <view class='wz_red'>¥{{item.shop_price}}</view> |
| 674 | -<!-- <view class='del'>¥{{item.market_price}}</view>--> | |
| 674 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view> | |
| 675 | 675 | </block> |
| 676 | 676 | |
| 677 | 677 | </block> |
| ... | ... | @@ -772,7 +772,7 @@ |
| 772 | 772 | <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text> |
| 773 | 773 | <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text> |
| 774 | 774 | </view> |
| 775 | -<!-- <view class='del'>¥{{aitem.market_price}}</view>--> | |
| 775 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{aitem.market_price}}</view> | |
| 776 | 776 | </block> |
| 777 | 777 | <block wx:else> |
| 778 | 778 | <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}"> |
| ... | ... | @@ -793,10 +793,10 @@ |
| 793 | 793 | </view> |
| 794 | 794 | <view class="flex" style="line-height: 28rpx;"> |
| 795 | 795 | <!-- 原价 --> |
| 796 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 797 | -<!-- <view class="fs22">¥</view>--> | |
| 798 | -<!-- <view class="fs22">{{aitem.market_price}}</view>--> | |
| 799 | -<!-- </view>--> | |
| 796 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 797 | + <view class="fs22">¥</view> | |
| 798 | + <view class="fs22">{{aitem.market_price}}</view> | |
| 799 | + </view> | |
| 800 | 800 | </view> |
| 801 | 801 | </block> |
| 802 | 802 | <blocK wx:else> |
| ... | ... | @@ -809,10 +809,10 @@ |
| 809 | 809 | </view> |
| 810 | 810 | <view class="flex" style="line-height: 28rpx;"> |
| 811 | 811 | <!-- 原价 --> |
| 812 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 813 | -<!-- <view class="fs22">¥</view>--> | |
| 814 | -<!-- <view class="fs22">{{aitem.market_price}}</view>--> | |
| 815 | -<!-- </view>--> | |
| 812 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 813 | + <view class="fs22">¥</view> | |
| 814 | + <view class="fs22">{{aitem.market_price}}</view> | |
| 815 | + </view> | |
| 816 | 816 | </view> |
| 817 | 817 | </blocK> |
| 818 | 818 | </block> |
| ... | ... | @@ -826,10 +826,10 @@ |
| 826 | 826 | <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> |
| 827 | 827 | </view> |
| 828 | 828 | <!-- 原价 --> |
| 829 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 830 | -<!-- <view class="fs22">¥</view>--> | |
| 831 | -<!-- <view class="fs22">{{aitem.market_price}}</view>--> | |
| 832 | -<!-- </view>--> | |
| 829 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 830 | + <view class="fs22">¥</view> | |
| 831 | + <view class="fs22">{{aitem.market_price}}</view> | |
| 832 | + </view> | |
| 833 | 833 | |
| 834 | 834 | </view> |
| 835 | 835 | <view class="flex" style="line-height: 28rpx;"> |
| ... | ... | @@ -854,17 +854,17 @@ |
| 854 | 854 | </view> |
| 855 | 855 | <view class="flex" style="line-height: 28rpx;"> |
| 856 | 856 | <!-- 原价 --> |
| 857 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 858 | -<!-- <view class="fs22">¥</view>--> | |
| 859 | -<!-- <view class="fs22">{{aitem.market_price}}</view>--> | |
| 860 | -<!-- </view>--> | |
| 857 | + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th"> | |
| 858 | + <view class="fs22">¥</view> | |
| 859 | + <view class="fs22">{{aitem.market_price}}</view> | |
| 860 | + </view> | |
| 861 | 861 | </view> |
| 862 | 862 | </block> |
| 863 | 863 | </block> |
| 864 | 864 | </block> |
| 865 | 865 | <block wx:else> |
| 866 | 866 | <view class='wz_red'>¥{{aitem.shop_price}}</view> |
| 867 | -<!-- <view class='del'>¥{{aitem.market_price}}</view>--> | |
| 867 | + <view wx:if="{{is_retail_price}}" class='del'>¥{{aitem.market_price}}</view> | |
| 868 | 868 | </block> |
| 869 | 869 | </block> |
| 870 | 870 | </view> |
| ... | ... | @@ -898,5 +898,8 @@ |
| 898 | 898 | </swiper> |
| 899 | 899 | |
| 900 | 900 | </view> |
| 901 | -<view class="nodata-title" wx:else>暂无数据</view> | |
| 901 | +<view class="nodata-title" wx:elif="{{is_get}}">暂无数据</view> | |
| 902 | +<view class="flex jcc loader" wx:else> | |
| 903 | + <image style="width: 40rpx; height: 40rpx; " src="{{url}}/miniapp/images/loader.gif"></image> | |
| 904 | +</view> | |
| 902 | 905 | </view> |
| 903 | 906 | \ No newline at end of file | ... | ... |
components/diy_goodsGroup/diy_goodsGroup.wxss
components/diy_groupbuy/diy_groupbuy.js
| ... | ... | @@ -59,7 +59,19 @@ Component({ |
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | init: function (g_id) { |
| 62 | - var th = this, app = getApp(), goodsidlist = ""; | |
| 62 | + | |
| 63 | + var th=this; | |
| 64 | + getApp().getConfig2(function (e) { | |
| 65 | + var swithc_list = e.switch_list; | |
| 66 | + var sw_arr = JSON.parse(swithc_list); | |
| 67 | + | |
| 68 | + if(sw_arr.is_retail_price){ | |
| 69 | + th.setData({is_retail_price:1}); | |
| 70 | + } | |
| 71 | + }) | |
| 72 | + | |
| 73 | + | |
| 74 | + var app = getApp(), goodsidlist = ""; | |
| 63 | 75 | if (g_id.data && g_id.data.length > 0) { |
| 64 | 76 | //--先把商品ID串起来-- |
| 65 | 77 | g_id.data.forEach(function (val, ind) { | ... | ... |
components/diy_groupbuy/diy_groupbuy.wxml
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | <view class='sp_wz'> |
| 40 | 40 | <view class='sp_wzi'>{{aitem.goods_name}}</view> |
| 41 | 41 | <view class='sp_jg'>¥{{aitem.price}}</view> |
| 42 | -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>--> | |
| 42 | + <view wx:if="{{is_retail_price}}" class='sp_jgx'>¥{{aitem.market_price}}</view> | |
| 43 | 43 | </view> |
| 44 | 44 | <!-- <view class="progress_box"> |
| 45 | 45 | <text class="on_sale_list">已买:{{aitem.buy_num + aitem.virtual_num}}件</text> |
| ... | ... | @@ -94,7 +94,7 @@ |
| 94 | 94 | </view> |
| 95 | 95 | <view> |
| 96 | 96 | <view class='sp_jg'>¥{{aitem.price}}</view> |
| 97 | -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>--> | |
| 97 | + <view wx:if="{{is_retail_price}}" class='sp_jgx'>¥{{aitem.market_price}}</view> | |
| 98 | 98 | </view> |
| 99 | 99 | </view> |
| 100 | 100 | </view> | ... | ... |
components/diy_luckyGo/diy_luckyGo.js
| ... | ... | @@ -60,7 +60,18 @@ Component({ |
| 60 | 60 | // 这里是一个自定义方法 |
| 61 | 61 | customMethod: function () { }, |
| 62 | 62 | init: function (g_id) { |
| 63 | - var th = this, app = getApp(), goodsidlist = ""; | |
| 63 | + var th = this; | |
| 64 | + | |
| 65 | + getApp().getConfig2(function (e) { | |
| 66 | + var swithc_list = e.switch_list; | |
| 67 | + var sw_arr = JSON.parse(swithc_list); | |
| 68 | + | |
| 69 | + if(sw_arr.is_retail_price){ | |
| 70 | + th.setData({is_retail_price:1}); | |
| 71 | + } | |
| 72 | + }) | |
| 73 | + | |
| 74 | + var app = getApp(), goodsidlist = ""; | |
| 64 | 75 | if (g_id.data_type == 2) { |
| 65 | 76 | if (g_id.data && g_id.data.length > 0) { |
| 66 | 77 | //--先把商品ID串起来-- | ... | ... |
components/diy_luckyGo/diy_luckyGo.wxml
| ... | ... | @@ -27,9 +27,9 @@ |
| 27 | 27 | |
| 28 | 28 | <view class="ellipsis-2 name fs28 clearbadge">{{aitem.title}}</view> |
| 29 | 29 | <view> |
| 30 | - <view class="flex ai-center"> | |
| 30 | + <view class="flex ai-center" style="align-items: center;"> | |
| 31 | 31 | <text class="rmb c-red">{{filters.price(aitem.group_price)}}</text> |
| 32 | -<!-- <view class="del fs22 c-a pdl10"><text class="rmb">{{aitem.shop_price}}</text></view>--> | |
| 32 | + <view style="position: relative;top:-2rpx" wx:if="{{is_retail_price}}" class="del fs22 c-a pdl10"><text class="rmb">{{aitem.market_price}}</text></view> | |
| 33 | 33 | </view> |
| 34 | 34 | </view> |
| 35 | 35 | ... | ... |
components/diy_picMax/diy_picMax.js
| 1 | +var ut = require("../../utils/util.js"); | |
| 1 | 2 | Component({ |
| 2 | 3 | properties: { |
| 3 | 4 | object: { |
| ... | ... | @@ -10,7 +11,8 @@ Component({ |
| 10 | 11 | // 这里是一些组件内部数据 |
| 11 | 12 | someData: {}, |
| 12 | 13 | pic_height: 0,//图片组合的高度 |
| 13 | - is_yspan: 0, //是否要严格按照比例来实现 | |
| 14 | + is_yspan: 0, //是否要严格按照比例来实现 | |
| 15 | + is_time_show:0 | |
| 14 | 16 | }, |
| 15 | 17 | ready: function () { |
| 16 | 18 | //-- console.log(this.data.object.data) -- |
| ... | ... | @@ -25,6 +27,26 @@ Component({ |
| 25 | 27 | |
| 26 | 28 | }) |
| 27 | 29 | this.setData({ pic_height: height, is_yspan: is_yspan }) |
| 30 | + | |
| 31 | + | |
| 32 | + var start_time=this.properties.object.start_time; | |
| 33 | + var end_time=this.properties.object.end_time; | |
| 34 | + | |
| 35 | + if(start_time && end_time) { | |
| 36 | + | |
| 37 | + var start_time = Date.parse(new Date(start_time.replace(/-/g, '/'))) / 1000; | |
| 38 | + var end_time = Date.parse(new Date(end_time.replace(/-/g, '/'))) / 1000; | |
| 39 | + var now = ut.gettimestamp(); | |
| 40 | + | |
| 41 | + | |
| 42 | + if (start_time < now && end_time > now) { | |
| 43 | + this.setData({is_time_show: 1}); | |
| 44 | + } | |
| 45 | + }else{ | |
| 46 | + this.setData({is_time_show: 1}); | |
| 47 | + } | |
| 48 | + | |
| 49 | + | |
| 28 | 50 | }, |
| 29 | 51 | methods: { |
| 30 | 52 | //-- 智能跳转到页面 -- | ... | ... |
components/diy_picMax/diy_picMax.wxml
| 1 | 1 | <!-- 图片组合 --> |
| 2 | +<block wx:if="{{is_time_show}}"> | |
| 2 | 3 | <wxs module="g_filter" src="../diy_notice/g_filter.wxs"></wxs> |
| 3 | 4 | <!-- 如果有纵向合并的时候,要求要按照绝对布局来实现 --> |
| 4 | 5 | <block wx:if="{{is_yspan}}"> |
| ... | ... | @@ -49,4 +50,5 @@ |
| 49 | 50 | </view> |
| 50 | 51 | <view class="picMax-clear"></view> |
| 51 | 52 | </view> |
| 53 | +</block> | |
| 52 | 54 | </block> |
| 53 | 55 | \ No newline at end of file | ... | ... |
components/diy_pingd_buy/diy_pingd_buy.js
| ... | ... | @@ -65,8 +65,22 @@ Component({ |
| 65 | 65 | // 这里是一个自定义方法 |
| 66 | 66 | customMethod: function() {}, |
| 67 | 67 | init: function(g_id) { |
| 68 | - var th = this, | |
| 69 | - app = getApp(), all_array = [], | |
| 68 | + | |
| 69 | + var th = this; | |
| 70 | + getApp().getConfig2(function (e) { | |
| 71 | + var swithc_list = e.switch_list; | |
| 72 | + var sw_arr = JSON.parse(swithc_list); | |
| 73 | + | |
| 74 | + if(sw_arr.is_retail_price){ | |
| 75 | + th.setData({is_retail_price:1}); | |
| 76 | + } | |
| 77 | + }) | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + var app = getApp(), all_array = [], | |
| 70 | 84 | index = 0, |
| 71 | 85 | goodsidlist=""; |
| 72 | 86 | ... | ... |
components/diy_pingd_buy/diy_pingd_buy.wxml
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | <view class='sp_wz_p'> |
| 47 | 47 | <view class='sp_wzi_p'>{{aitem.title}}</view> |
| 48 | 48 | <view class='sp_jg_p'>¥{{aitem.price}}</view> |
| 49 | - <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>--> | |
| 49 | + <view wx:if="{{is_retail_price}}" class='sp_jgx_p'>¥{{aitem.market_price}}</view> | |
| 50 | 50 | |
| 51 | 51 | <view class="tuan_set_num"> |
| 52 | 52 | <view class="co-red2">{{aitem.ct_num}}人团</view> |
| ... | ... | @@ -91,7 +91,7 @@ |
| 91 | 91 | </view> |
| 92 | 92 | <view class="money"> |
| 93 | 93 | <view class='sp_jg_p'>¥{{aitem.price}}</view> |
| 94 | -<!-- <view class='sp_jgx_p'>¥{{aitem.shop_price}}</view>--> | |
| 94 | + <view wx:if="{{is_retail_price}}" class='sp_jgx_p'>¥{{aitem.market_price}}</view> | |
| 95 | 95 | </view> |
| 96 | 96 | <view class="o1_sj_p" wx:if="{{aitem.end_time>newTime}}"> |
| 97 | 97 | <image class="time_img" src="{{iurl}}/miniapp/images/time.png"></image> | ... | ... |
components/diy_pregoods/diy_pregoods.js
| ... | ... | @@ -33,7 +33,19 @@ Component({ |
| 33 | 33 | methods: { |
| 34 | 34 | // 这里是一个自定义方法 |
| 35 | 35 | init: function(g_id) { |
| 36 | - var th = this, app = getApp(), goodsidlist=""; | |
| 36 | + var th = this; | |
| 37 | + | |
| 38 | + getApp().getConfig2(function (e) { | |
| 39 | + var swithc_list = e.switch_list; | |
| 40 | + var sw_arr = JSON.parse(swithc_list); | |
| 41 | + | |
| 42 | + if(sw_arr.is_retail_price){ | |
| 43 | + th.setData({is_retail_price:1}); | |
| 44 | + } | |
| 45 | + }) | |
| 46 | + | |
| 47 | + | |
| 48 | + var app = getApp(), goodsidlist=""; | |
| 37 | 49 | if(g_id && g_id.length>0){ |
| 38 | 50 | //--先把商品ID串起来-- |
| 39 | 51 | g_id.forEach(function(val, ind) { | ... | ... |
components/diy_pregoods/diy_pregoods.wxml
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | <view class='sp_wz'> |
| 58 | 58 | <view class='sp_wzi'>{{aitem.act_name}}</view> |
| 59 | 59 | <view class='sp_jg'>¥{{aitem.presell_price}}</view> |
| 60 | -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>--> | |
| 60 | + <view wx:if="{{is_retail_price}}" class='sp_jgx'>¥{{aitem.shop_price}}</view> | |
| 61 | 61 | </view> |
| 62 | 62 | |
| 63 | 63 | </view> |
| ... | ... | @@ -88,7 +88,7 @@ |
| 88 | 88 | </view> |
| 89 | 89 | <view class="money"> |
| 90 | 90 | <view class='sp_jg'>¥{{aitem.presell_price}}</view> |
| 91 | - <view class='sp_jgx'>¥{{aitem.market_price}}</view> | |
| 91 | + <view wx:if="{{is_retail_price}}"class='sp_jgx'>¥{{aitem.market_price}}</view> | |
| 92 | 92 | </view> |
| 93 | 93 | |
| 94 | 94 | <block wx:if="{{aitem.end_time<newTime}}"> | ... | ... |
components/diy_seckill/diy_seckill.js
| ... | ... | @@ -78,7 +78,19 @@ Component({ |
| 78 | 78 | // 这里是一个自定义方法 |
| 79 | 79 | customMethod: function () { }, |
| 80 | 80 | init: function (g_id) { |
| 81 | - var th = this, app = getApp(), goodsidlist = "", idlist = ""; | |
| 81 | + var th = this; | |
| 82 | + | |
| 83 | + getApp().getConfig2(function (e) { | |
| 84 | + var swithc_list = e.switch_list; | |
| 85 | + var sw_arr = JSON.parse(swithc_list); | |
| 86 | + | |
| 87 | + if(sw_arr.is_retail_price){ | |
| 88 | + th.setData({is_retail_price:1}); | |
| 89 | + } | |
| 90 | + }) | |
| 91 | + | |
| 92 | + | |
| 93 | + var app = getApp(), goodsidlist = "", idlist = ""; | |
| 82 | 94 | if (g_id.data_type == 2) { |
| 83 | 95 | if (g_id.data && g_id.data.length > 0) { |
| 84 | 96 | //--先把商品ID串起来-- | ... | ... |
components/diy_seckill/diy_seckill.wxml
| ... | ... | @@ -82,7 +82,7 @@ |
| 82 | 82 | <view class='sp_wz'> |
| 83 | 83 | <view class='sp_wzi ellipsis-2'>{{aitem.goods_name}}</view> |
| 84 | 84 | <view class='sp_jg'>¥{{aitem.price}}</view> |
| 85 | -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>--> | |
| 85 | + <view wx:if="{{is_retail_price}}"class='sp_jgx'>¥{{aitem.market_price}}</view> | |
| 86 | 86 | </view> |
| 87 | 87 | |
| 88 | 88 | </view> | ... | ... |
components/goods_list/goods_list.js
| ... | ... | @@ -18,14 +18,29 @@ Component({ |
| 18 | 18 | max_card_field: "", |
| 19 | 19 | card_list: null, |
| 20 | 20 | is_no_plus: 1, |
| 21 | + | |
| 22 | + is_retail_price:0 | |
| 23 | + | |
| 21 | 24 | }, |
| 22 | 25 | properties: { |
| 23 | 26 | // 这⾥定义了innerText属性,属性值可以在组件使⽤时指定 |
| 24 | 27 | }, |
| 25 | - ready: function () { }, | |
| 28 | + ready: function () { | |
| 29 | + | |
| 30 | + var th=this; | |
| 31 | + getApp().getConfig2(function (e) { | |
| 32 | + var swithc_list = e.switch_list; | |
| 33 | + var sw_arr = JSON.parse(swithc_list); | |
| 34 | + if(sw_arr.is_retail_price){ | |
| 35 | + th.setData({is_retail_price:1}); | |
| 36 | + } | |
| 37 | + },1); | |
| 38 | + | |
| 39 | + }, | |
| 26 | 40 | pageLifetimes: { |
| 27 | 41 | //要处理一下,游客登录后的界面的变化,主要还该是改变会员 |
| 28 | 42 | show: function () { |
| 43 | + | |
| 29 | 44 | this.init(); |
| 30 | 45 | if (getApp().globalData.login_back == 1) { |
| 31 | 46 | getApp().globalData.login_back == 0; |
| ... | ... | @@ -48,39 +63,7 @@ Component({ |
| 48 | 63 | getApp().getConfig2(function (e) { |
| 49 | 64 | var swithc_list = e.switch_list; |
| 50 | 65 | var sw_arr = JSON.parse(swithc_list); |
| 51 | - //---如果后台有开等级卡的开关--- | |
| 52 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 53 | - th.setData({ | |
| 54 | - rank_switch: true | |
| 55 | - }); | |
| 56 | - //---回调卡的列表--- | |
| 57 | - th.getPlusCardType(function (ob) { | |
| 58 | - th.setData({ | |
| 59 | - card_list: ob.card_list | |
| 60 | - }); | |
| 61 | - var ti = setInterval(function () { | |
| 62 | - var user = getApp().globalData.userInfo; | |
| 63 | - if (!user) return false; | |
| 64 | - clearInterval(ti); | |
| 65 | - if (user.card_field && user['card_expiredate']) { | |
| 66 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 67 | - var end = new Date(str); | |
| 68 | - end = Date.parse(end) / 1000; | |
| 69 | - var now = ut.gettimestamp(); | |
| 70 | - //--- 判断是等级会员,且在有效期范围内 --- | |
| 71 | - if (user.card_field && now < end) { | |
| 72 | - var card_name = ob.name_map.get(user.card_field); | |
| 73 | - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8); | |
| 74 | - th.setData({ | |
| 75 | - card_field: user.card_field, | |
| 76 | - card_name: card_name, | |
| 77 | - card_list: ob.card_list | |
| 78 | - }); | |
| 79 | - } | |
| 80 | - } | |
| 81 | - }, 500) | |
| 82 | - }) | |
| 83 | - } | |
| 66 | + ut.get_plus_name_price(sw_arr,th); | |
| 84 | 67 | }) |
| 85 | 68 | |
| 86 | 69 | } | ... | ... |
components/goods_list/goods_list.wxml
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <!-- 判断是否有活动价 --> |
| 18 | 18 | <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}"> |
| 19 | 19 | <view class="pdt10"> |
| 20 | - <view class="money flex xc-wc"> | |
| 20 | + <view class="money flex xc-wc" style="line-height:28rpx"> | |
| 21 | 21 | <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> |
| 22 | 22 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 23 | 23 | <!-- 活动价 --> |
| ... | ... | @@ -26,13 +26,16 @@ |
| 26 | 26 | <view class="fs35">{{item.prom_price}}</view> |
| 27 | 27 | </view> |
| 28 | 28 | </view> |
| 29 | -<!-- <view class="flex">--> | |
| 30 | -<!-- <!– 原价 –>--> | |
| 31 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 32 | -<!-- <view class="fs22">¥</view>--> | |
| 33 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 34 | -<!-- </view>--> | |
| 35 | -<!-- </view>--> | |
| 29 | + | |
| 30 | + <!-- 控制显示原价 --> | |
| 31 | + <view class="flex" wx:if="{{is_retail_price}}"> | |
| 32 | + <!-- 原价 --> | |
| 33 | + <view class="price flex xc-ash line_th"> | |
| 34 | + <view class="fs22">¥</view> | |
| 35 | + <view class="fs22">{{item.market_price}}</view> | |
| 36 | + </view> | |
| 37 | + </view> | |
| 38 | + | |
| 36 | 39 | </view> |
| 37 | 40 | |
| 38 | 41 | </block> |
| ... | ... | @@ -54,15 +57,20 @@ |
| 54 | 57 | </view> |
| 55 | 58 | </view> |
| 56 | 59 | </view> |
| 57 | -<!-- <view class="flex">--> | |
| 58 | -<!-- <!– 原价 –>--> | |
| 59 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 60 | -<!-- <view class="fs22">¥</view>--> | |
| 61 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 62 | -<!-- </view>--> | |
| 63 | -<!-- </view>--> | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + <view class="flex" wx:if="{{is_retail_price}}"> | |
| 64 | + <!-- 原价 --> | |
| 65 | + <view class="price flex xc-ash line_th"> | |
| 66 | + <view class="fs22">¥</view> | |
| 67 | + <view class="fs22">{{item.market_price}}</view> | |
| 68 | + </view> | |
| 69 | + </view> | |
| 70 | + | |
| 71 | + | |
| 64 | 72 | </block> |
| 65 | - <blocK wx:else> | |
| 73 | + <block wx:else> | |
| 66 | 74 | <view class="money flex"> |
| 67 | 75 | <!-- 办卡价 --> |
| 68 | 76 | <view class="flex xc-wc"> |
| ... | ... | @@ -70,14 +78,14 @@ |
| 70 | 78 | <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> |
| 71 | 79 | </view> |
| 72 | 80 | </view> |
| 73 | -<!-- <view class="flex">--> | |
| 74 | -<!-- <!– 原价 –>--> | |
| 75 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 76 | -<!-- <view class="fs22">¥</view>--> | |
| 77 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 78 | -<!-- </view>--> | |
| 79 | -<!-- </view>--> | |
| 80 | - </blocK> | |
| 81 | + <view class="flex" wx:if="{{is_retail_price}}"> | |
| 82 | + <!-- 原价 --> | |
| 83 | + <view class="price flex xc-ash line_th"> | |
| 84 | + <view class="fs22">¥</view> | |
| 85 | + <view class="fs22">{{item.market_price}}</view> | |
| 86 | + </view> | |
| 87 | + </view> | |
| 88 | + </block> | |
| 81 | 89 | </block> |
| 82 | 90 | <block wx:else> |
| 83 | 91 | <!-- 如果商品有设置等级价⼤于0的 --> |
| ... | ... | @@ -89,10 +97,10 @@ |
| 89 | 97 | <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> |
| 90 | 98 | </view> |
| 91 | 99 | <!-- 原价 --> |
| 92 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 93 | -<!-- <view class="fs22">¥</view>--> | |
| 94 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 95 | -<!-- </view>--> | |
| 100 | + <view class="price flex xc-ash line_th" wx:if="{{is_retail_price}}"> | |
| 101 | + <view class="fs22">¥</view> | |
| 102 | + <view class="fs22">{{item.market_price}}</view> | |
| 103 | + </view> | |
| 96 | 104 | </view> |
| 97 | 105 | <view class="flexr"> |
| 98 | 106 | <!-- 等级价 --> |
| ... | ... | @@ -114,13 +122,13 @@ |
| 114 | 122 | <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> |
| 115 | 123 | </view> |
| 116 | 124 | </view> |
| 117 | -<!-- <view class="flex">--> | |
| 118 | -<!-- <!– 原价 –>--> | |
| 119 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 120 | -<!-- <view class="fs22">¥</view>--> | |
| 121 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 122 | -<!-- </view>--> | |
| 123 | -<!-- </view>--> | |
| 125 | + <view class="flex" wx:if="{{is_retail_price}}"> | |
| 126 | + <!-- 原价 --> | |
| 127 | + <view class="price flex xc-ash line_th"> | |
| 128 | + <view class="fs22">¥</view> | |
| 129 | + <view class="fs22">{{item.market_price}}</view> | |
| 130 | + </view> | |
| 131 | + </view> | |
| 124 | 132 | </block> |
| 125 | 133 | </block> |
| 126 | 134 | </block> |
| ... | ... | @@ -133,13 +141,13 @@ |
| 133 | 141 | <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> |
| 134 | 142 | </view> |
| 135 | 143 | </view> |
| 136 | -<!-- <view class="flex" style="">--> | |
| 137 | -<!-- <!– 原价 –>--> | |
| 138 | -<!-- <view class="price flex xc-ash line_th">--> | |
| 139 | -<!-- <view class="fs22">¥</view>--> | |
| 140 | -<!-- <view class="fs22">{{item.market_price}}</view>--> | |
| 141 | -<!-- </view>--> | |
| 142 | -<!-- </view>--> | |
| 144 | + <view class="flex" style="" wx:if="{{is_retail_price}}"> | |
| 145 | + <!-- 原价 --> | |
| 146 | + <view class="price flex xc-ash line_th"> | |
| 147 | + <view class="fs22">¥</view> | |
| 148 | + <view class="fs22">{{item.market_price}}</view> | |
| 149 | + </view> | |
| 150 | + </view> | |
| 143 | 151 | </view> |
| 144 | 152 | </block> |
| 145 | 153 | </view> | ... | ... |
components/qr_code/qr_code.js
| ... | ... | @@ -35,7 +35,7 @@ Component({ |
| 35 | 35 | this.setData({q_show: 1,object:e,barcode_canvas:list,qrcode_canvas:list,is_fw:e.is_fw }); |
| 36 | 36 | var val=e.val; |
| 37 | 37 | |
| 38 | - barcode('barcode'+this.data.index,val, 620, 160,this); | |
| 38 | + barcode('barcode'+this.data.index,val+"", 620, 160,this); | |
| 39 | 39 | qrcode('qrcode'+this.data.index, val, 520, 520,this); |
| 40 | 40 | } |
| 41 | 41 | }, | ... | ... |
components/serviceCard_list/serviceCard_list.js
| ... | ... | @@ -45,48 +45,7 @@ Component({ |
| 45 | 45 | success: function (e) { |
| 46 | 46 | if (e.data.code == 0 && e.data && e.data.data) { |
| 47 | 47 | getApp().globalData.userInfo = e.data.data; |
| 48 | - getApp().getConfig2(function (e) { | |
| 49 | - var swithc_list = e.switch_list; | |
| 50 | - var sw_arr = JSON.parse(swithc_list); | |
| 51 | - //---如果后台有开等级卡的开关--- | |
| 52 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 53 | - th.setData({ | |
| 54 | - rank_switch: true | |
| 55 | - }); | |
| 56 | - //---回调卡的列表--- | |
| 57 | - th.getPlusCardType(function (ob) { | |
| 58 | - th.setData({ | |
| 59 | - card_list: ob.card_list | |
| 60 | - }); | |
| 61 | - var ti = setInterval(function () { | |
| 62 | - var user = getApp().globalData.userInfo; | |
| 63 | - if (!user) return false; | |
| 64 | - clearInterval(ti); | |
| 65 | - if (user.card_field && user['card_expiredate']) { | |
| 66 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 67 | - var end = new Date(str); | |
| 68 | - end = Date.parse(end) / 1000; | |
| 69 | - var now = ut.gettimestamp(); | |
| 70 | - //--- 判断是等级会员,且在有效期范围内 --- | |
| 71 | - if (user.card_field && now < end) { | |
| 72 | - var card_name = ob.name_map.get(user.card_field); | |
| 73 | - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8); | |
| 74 | - th.setData({ | |
| 75 | - card_field: user.card_field, | |
| 76 | - card_name: card_name, | |
| 77 | - card_list: ob.card_list | |
| 78 | - }); | |
| 79 | - } | |
| 80 | - } | |
| 81 | - }, 500) | |
| 82 | - }) | |
| 83 | - } | |
| 84 | - }) | |
| 85 | - | |
| 86 | 48 | } |
| 87 | - | |
| 88 | - | |
| 89 | - | |
| 90 | 49 | } |
| 91 | 50 | }) |
| 92 | 51 | }, | ... | ... |
components/serviceCard_list/serviceCard_list.wxml
| ... | ... | @@ -37,95 +37,8 @@ |
| 37 | 37 | |
| 38 | 38 | </block> |
| 39 | 39 | <block wx:else> |
| 40 | - <!-- 商品价格,先判断下是后⼜等级价--> | |
| 41 | - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> | |
| 42 | - <!-- 当会员是等级卡的时候 --> | |
| 43 | - <block wx:if="{{card_field}}"> | |
| 44 | - <!-- 等级价>0 --> | |
| 45 | - <block wx:if="{{item[card_field]>0}}"> | |
| 46 | - <view class="money flex"> | |
| 47 | - <!-- 办卡价 --> | |
| 48 | - <view class="flex xc-wc ai_and"> | |
| 49 | - <view class="fs24">¥</view> | |
| 50 | - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view> | |
| 51 | - <view class="card_bg ellipsis-1"> | |
| 52 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | |
| 53 | - <text class="card_name">{{card_name}}</text> | |
| 54 | - </view> | |
| 55 | - </view> | |
| 56 | - </view> | |
| 57 | - <view class="flex"> | |
| 58 | - <!-- 原价 --> | |
| 59 | - <view class="price flex xc-ash line_th"> | |
| 60 | - <view class="fs22">¥</view> | |
| 61 | - <view class="fs22">{{item.market_price}}</view> | |
| 62 | - </view> | |
| 63 | - </view> | |
| 64 | - </block> | |
| 65 | - <blocK wx:else> | |
| 66 | - <view class="money flex"> | |
| 67 | - <!-- 办卡价 --> | |
| 68 | - <view class="flex xc-wc"> | |
| 69 | - <view class="fs24">¥</view> | |
| 70 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 71 | - </view> | |
| 72 | - </view> | |
| 73 | - <view class="flex"> | |
| 74 | - <!-- 原价 --> | |
| 75 | - <view class="price flex xc-ash line_th"> | |
| 76 | - <view class="fs22">¥</view> | |
| 77 | - <view class="fs22">{{item.market_price}}</view> | |
| 78 | - </view> | |
| 79 | - </view> | |
| 80 | - </blocK> | |
| 81 | - </block> | |
| 82 | - <block wx:else> | |
| 83 | - <!-- 如果商品有设置等级价⼤于0的 --> | |
| 84 | - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | |
| 85 | - <view class="money flex"> | |
| 86 | - <!-- 办卡价 --> | |
| 87 | - <view class="flex xc-wc"> | |
| 88 | - <view class="fs24">¥</view> | |
| 89 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 90 | - </view> | |
| 91 | - <!-- 原价 --> | |
| 92 | - <view class="price flex xc-ash line_th"> | |
| 93 | - <view class="fs22">¥</view> | |
| 94 | - <view class="fs22">{{item.market_price}}</view> | |
| 95 | - </view> | |
| 96 | - </view> | |
| 97 | - <view class="flexr" style=""> | |
| 98 | - <!-- 等级价 --> | |
| 99 | - <view class="price flex ai-center"> | |
| 100 | - <view class="fs22">¥</view> | |
| 101 | - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view> | |
| 102 | - <view class="card_bg ellipsis-1"> | |
| 103 | - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 104 | - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text> | |
| 105 | - </view> | |
| 106 | - </view> | |
| 107 | - </view> | |
| 108 | - </block> | |
| 109 | - <block wx:else> | |
| 110 | - <view class="money flex"> | |
| 111 | - <!-- 办卡价 --> | |
| 112 | - <view class="flex xc-wc"> | |
| 113 | - <view class="fs24">¥</view> | |
| 114 | - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> | |
| 115 | - </view> | |
| 116 | - </view> | |
| 117 | - <view class="flex"> | |
| 118 | - <!-- 原价 --> | |
| 119 | - <view class="price flex xc-ash line_th"> | |
| 120 | - <view class="fs22">¥</view> | |
| 121 | - <view class="fs22">{{item.market_price}}</view> | |
| 122 | - </view> | |
| 123 | - </view> | |
| 124 | - </block> | |
| 125 | - </block> | |
| 126 | - </block> | |
| 127 | 40 | <!-- 商品压根就没有等级价 --> |
| 128 | - <view class="pdt10" wx:else> | |
| 41 | + <view class="pdt10"> | |
| 129 | 42 | <view class="money flex"> |
| 130 | 43 | <!-- 办卡价 --> |
| 131 | 44 | <view class="flex xc-wc"> | ... | ... |
custom-tab-bar/index.js
| ... | ... | @@ -20,6 +20,12 @@ Component({ |
| 20 | 20 | } |
| 21 | 21 | }) |
| 22 | 22 | |
| 23 | + //过滤掉分销到期的 | |
| 24 | + getApp().user_tools_endTime(2,function(e){ | |
| 25 | + if(!e) th.setData({is_no_distri:1}) | |
| 26 | + }); | |
| 27 | + | |
| 28 | + | |
| 23 | 29 | //购买的信息用全局缓存 |
| 24 | 30 | if(getApp().globalData.dis_buy_obj){ |
| 25 | 31 | var arr = getApp().globalData.dis_buy_obj; | ... | ... |
packageA/pages/checkin/checkin.wxml
| ... | ... | @@ -79,7 +79,7 @@ |
| 79 | 79 | <view class="date"> |
| 80 | 80 | <block wx:for="{{dateArr}}" wx:for-index="index" wx:for-item="item" wx:key="key"> |
| 81 | 81 | <!-- <view style="{{index ==0?'margin-left:calc(100%/7 * ' + firstDay + ');':''}}width:calc(100%/7);line-height:80rpx;" class="{{index+1==day?'today':''}} {{index+1==day&&isClock?'clockOn':''}}" ><view class="day">{{item}}</view></view> --> |
| 82 | - <view style="{{index ==0?'margin-left:calc(100%/7 * 0);':''}}width:calc(100%/7);line-height:80rpx;" class="{{item.isCheckIn ? 'active':''}} {{res.curbqdaynum&&item.isBq ? 'bq':''}}" bindtap="clickDay" data-day="{{item.num}}"> | |
| 82 | + <view style="width:calc(100% / 7) ; line-height: 80rpx;{{index ==0?'margin-left:calc(100%/7 * 0);':''}}" class="{{item.isCheckIn ? 'active':''}} {{res.curbqdaynum&&item.isBq ? 'bq':''}}" bindtap="clickDay" data-day="{{item.num}}"> | |
| 83 | 83 | <view class="day">{{item.num}}</view> |
| 84 | 84 | </view> |
| 85 | 85 | </block> |
| ... | ... | @@ -93,17 +93,17 @@ |
| 93 | 93 | <view class="jfbuy-container"> |
| 94 | 94 | |
| 95 | 95 | <block wx:if="{{ad_data}}"> |
| 96 | - <swiper class="swiper" circular="true" autoplay="true" indicator-dots="true" interval="2500"> | |
| 96 | + <swiper class="swiper" style="height: {{max_sw_height}}rpx;" circular="true" autoplay="true" indicator-dots="true" interval="2500"> | |
| 97 | 97 | <block wx:for="{{ad_data}}"> |
| 98 | 98 | <navigator url="{{item.ad_weapplink}}" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}"> |
| 99 | - <swiper-item> | |
| 100 | - <image src="{{item.ad_code}}" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true" /> | |
| 99 | + <swiper-item class="swiper-item"> | |
| 100 | + <image src="{{item.ad_code}}" data-index="{{index}}" mode="widthFix" bindload="imageLoad" class="slide-image" lazy-load="true" /> | |
| 101 | 101 | </swiper-item> |
| 102 | 102 | </navigator> |
| 103 | 103 | |
| 104 | 104 | <view data-url="{{item.ad_weapplink}}" wx:else bindtap="go_url"> |
| 105 | - <swiper-item> | |
| 106 | - <image src="{{item.ad_code}}" class="slide-image" mode="widthFix" lazy-load="true" /> | |
| 105 | + <swiper-item class="swiper-item"> | |
| 106 | + <image src="{{item.ad_code}}" class="slide-image" mode="widthFix" bindload="imageLoad" lazy-load="true" /> | |
| 107 | 107 | </swiper-item> |
| 108 | 108 | </view> |
| 109 | 109 | </block> | ... | ... |
packageA/pages/checkin/checkin.wxss
| ... | ... | @@ -192,7 +192,7 @@ page, |
| 192 | 192 | |
| 193 | 193 | |
| 194 | 194 | .jfbuy-container { |
| 195 | - padding: 60rpx 40rpx 40rpx; | |
| 195 | + padding: 60rpx 25rpx 40rpx; | |
| 196 | 196 | } |
| 197 | 197 | .jfbuy { |
| 198 | 198 | /* border: 2rpx solid black; */ |
| ... | ... | @@ -394,4 +394,17 @@ page, |
| 394 | 394 | } |
| 395 | 395 | .pop_up_no .close_img{ |
| 396 | 396 | width:60rpx; height:60rpx;position:absolute; right:-15px; top:-15rpx; |
| 397 | - } | |
| 398 | 397 | \ No newline at end of file |
| 398 | + } | |
| 399 | + .swiper { | |
| 400 | + width: 700rpx; | |
| 401 | + height: 300rpx; | |
| 402 | + /* background: #cccc; */ | |
| 403 | + } | |
| 404 | + .swiper-item { | |
| 405 | + display: flex; | |
| 406 | + align-items: center; | |
| 407 | + } | |
| 408 | + .slide-image { | |
| 409 | + width: 100%; | |
| 410 | + height: 100%; | |
| 411 | + } | ... | ... |
packageA/pages/distribution/goods/goods.wxml
| ... | ... | @@ -83,7 +83,7 @@ |
| 83 | 83 | <view class="ellipsis-2">{{item.goods_name}}</view> |
| 84 | 84 | <view> |
| 85 | 85 | <!-- 判断是否有活动价 --> |
| 86 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}"> | |
| 86 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}"> | |
| 87 | 87 | <view class="flex xc-wc ai-center"> |
| 88 | 88 | <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text> |
| 89 | 89 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> | ... | ... |
packageA/pages/distribution/shop/shop.wxml
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | <view class="flex fdc jc_sb"> |
| 77 | 77 | <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view> |
| 78 | 78 | <!-- 判断是否有活动价 --> |
| 79 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}"> | |
| 79 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}"> | |
| 80 | 80 | <view class="flex xc-wc pdt20"> |
| 81 | 81 | <text wx:if="{{item.prom_integral}}"> |
| 82 | 82 | <text class="fs30">{{item.prom_integral}}</text> | ... | ... |
packageA/pages/goodsInfo/goodsInfo.js
| ... | ... | @@ -914,7 +914,7 @@ Page({ |
| 914 | 914 | // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 |
| 915 | 915 | let actInfo = th.data.sele_g; |
| 916 | 916 | await th.get_buy_num2().then(function (data) { |
| 917 | - let limited = actInfo.buy_limit; // 限购数量a | |
| 917 | + let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a | |
| 918 | 918 | let promcardbuynum = data.data.data.promcardbuynum; |
| 919 | 919 | let buyedNum = promcardbuynum; // 自己已经购买的数量b |
| 920 | 920 | let canBuyNum = limited - buyedNum; // 自己还可购买的数量c |
| ... | ... | @@ -1242,7 +1242,7 @@ Page({ |
| 1242 | 1242 | // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 |
| 1243 | 1243 | let actInfo = th.data.sele_g; |
| 1244 | 1244 | await th.get_buy_num2().then(function (data) { |
| 1245 | - let limited = actInfo.buy_limit; // 限购数量a | |
| 1245 | + let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a | |
| 1246 | 1246 | let promcardbuynum = data.data.data.promcardbuynum; |
| 1247 | 1247 | let buyedNum = promcardbuynum; // 自己已经购买的数量b |
| 1248 | 1248 | let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | ... | ... |
packageA/pages/myGiftDetails/myGiftDetails.js
| ... | ... | @@ -38,6 +38,14 @@ Page({ |
| 38 | 38 | showBtn: showBtn, |
| 39 | 39 | }) |
| 40 | 40 | |
| 41 | + getApp().getConfig2(function (e) { | |
| 42 | + var json_d = JSON.parse(e.switch_list); | |
| 43 | + self.setData({ | |
| 44 | + bconfig: e, | |
| 45 | + is_retail_price: json_d.is_retail_price || 0 | |
| 46 | + }); | |
| 47 | + }) | |
| 48 | + | |
| 41 | 49 | // console.log('options', options); |
| 42 | 50 | app.isLogin().then(function(data) {//进入页面前已经授权登录成功 |
| 43 | 51 | self.setData({ | ... | ... |
packageA/pages/myGiftDetails/myGiftDetails.wxml
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | </block> |
| 37 | 37 | |
| 38 | 38 | </view> |
| 39 | - <view class="fs22 c-a4 line-through mgl10">{{filter.toFix(details.oldprice,2)}}</view> | |
| 39 | + <view class="fs22 c-a4 line-through mgl10">{{is_retail_price?'零售价:':''}}{{filter.toFix(details.oldprice,2)}}</view> | |
| 40 | 40 | </view> |
| 41 | 41 | <view class="fs24 c-a4" wx:if="{{!is_not_start}}">已售{{details.salenum+details.virtualsales}}件</view> |
| 42 | 42 | </view> | ... | ... |
packageA/pages/profile/profile.js
| ... | ... | @@ -586,6 +586,18 @@ Page({ |
| 586 | 586 | this.setData({head_pic:uu.head_pic,nickname:uu.nickname}) |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | + if(getApp().globalData.first_leader){ | |
| 590 | + //--生成会员 -- | |
| 591 | + getApp().promiseGet("/api/weshop/users/get/" + r.stoid + "/" + getApp().globalData.first_leader,{}).then(res=>{ | |
| 592 | + if(res.data.code==0){ | |
| 593 | + //更新会员 | |
| 594 | + self.setData({ | |
| 595 | + fir_user:res.data.data | |
| 596 | + }) | |
| 597 | + } | |
| 598 | + }) | |
| 599 | + } | |
| 600 | + | |
| 589 | 601 | app.request.get(url1, { |
| 590 | 602 | success:async function(res) { |
| 591 | 603 | if(res.data.code == 0) { |
| ... | ... | @@ -1132,7 +1144,13 @@ Page({ |
| 1132 | 1144 | |
| 1133 | 1145 | //-- 需要推荐人 -- |
| 1134 | 1146 | if(this.data.reg_info.introducer_state){ |
| 1135 | - let tjrname = this.data.referee; | |
| 1147 | + | |
| 1148 | + var tj= this.data.fir_user?this.data.fir_user.mobile:''; | |
| 1149 | + if(!tj){ | |
| 1150 | + tj=this.data.user['fromuser_id']?this.data.user['fromuser_id']:''; | |
| 1151 | + } | |
| 1152 | + | |
| 1153 | + let tjrname = this.data.referee || tj; | |
| 1136 | 1154 | if (tjrname == "" || tjrname == null) { |
| 1137 | 1155 | //app.my_warnning("请输入推荐人", 0, this); |
| 1138 | 1156 | //return false; | ... | ... |
packageA/pages/profile/profile.wxml
| ... | ... | @@ -29,8 +29,17 @@ |
| 29 | 29 | <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.introducer_state}}"> |
| 30 | 30 | <view class="user-name-txt">推荐人:</view> |
| 31 | 31 | |
| 32 | + <block wx-if="{{fir_user}}"> | |
| 33 | + <input bindblur="" disabled="true" value="{{fir_user.mobile}}" data-name="推荐人" | |
| 34 | + class="user-txt-right f1 pdl20 t-r" /> | |
| 35 | + </block> | |
| 36 | + | |
| 37 | + <block wx:else> | |
| 38 | + <input bindinput="getReferee" bindblur="" disabled="{{user['fromuser_id']}}" | |
| 39 | + value="{{user['fromuser_id']?user['fromuser_id']:''}}" data-name="推荐人" class="user-txt-right f1 pdl20 t-r" placeholder="请输入推荐人手机号码或卡号"/> | |
| 40 | + </block> | |
| 41 | + | |
| 32 | 42 | |
| 33 | - <input bindinput="getReferee" bindblur="" disabled="{{user['fromuser_id']}}" value="{{user['fromuser_id']?user['fromuser_id']:''}}" data-name="推荐人" class="user-txt-right f1 pdl20 t-r" placeholder="请输入推荐人手机号码或卡号"/> | |
| 34 | 43 | |
| 35 | 44 | <block wx:if="{{!user['fromuser_id']}}"> |
| 36 | 45 | <view class="c-red pdl20 fs24" wx:if="{{reg_info.introducer && reg_info.introducer_state && (reg_info.introducer_type == 0)}}">+{{reg_info.introducer}}积分</view> | ... | ... |
packageB/pages/user/collect_list/collect_list.js
| ... | ... | @@ -26,12 +26,28 @@ Page({ |
| 26 | 26 | total_collects: 0, |
| 27 | 27 | is_goods: 0, |
| 28 | 28 | pageSize: 8, //分页数量 |
| 29 | - isdelete: 0 | |
| 29 | + isdelete: 0, | |
| 30 | + | |
| 31 | + is_retail_price:0 | |
| 30 | 32 | }, |
| 31 | 33 | onLoad: function() { |
| 32 | 34 | |
| 35 | + var th=this; | |
| 36 | + | |
| 33 | 37 | o.init(this, "", "collects"), |
| 34 | 38 | this.requestCollectList(); |
| 39 | + | |
| 40 | + | |
| 41 | + getApp().getConfig2(function(rs){ | |
| 42 | + //计算等级价相关 | |
| 43 | + var swithc_list=rs.switch_list; | |
| 44 | + var sw_arr=JSON.parse(swithc_list); | |
| 45 | + if(sw_arr.is_retail_price){ | |
| 46 | + th.setData({is_retail_price:1}); | |
| 47 | + } | |
| 48 | + | |
| 49 | + }); | |
| 50 | + | |
| 35 | 51 | }, |
| 36 | 52 | requestCollectList: function() { |
| 37 | 53 | var th = this; | ... | ... |
packageB/pages/user/collect_list/collect_list.wxml
| ... | ... | @@ -49,10 +49,10 @@ |
| 49 | 49 | <view class="fs40">{{item.prom_price?item.prom_price:item.final_price}}</view> |
| 50 | 50 | </view> |
| 51 | 51 | <!-- 原价 --> |
| 52 | -<!-- <view class="flex fs24 line through xc-ash">--> | |
| 53 | -<!-- <view>零售价:</view>--> | |
| 54 | -<!-- <view>¥{{item.market_price}}</view>--> | |
| 55 | -<!-- </view>--> | |
| 52 | + <view wx:if="{{is_retail_price}}" class="flex fs24 line through xc-ash"> | |
| 53 | + <view>零售价:</view> | |
| 54 | + <view>¥{{item.market_price}}</view> | |
| 55 | + </view> | |
| 56 | 56 | </view> |
| 57 | 57 | |
| 58 | 58 | <view class="money_right flex line" wx:if="{{!editEd}}"> | ... | ... |
packageB/pages/zuhegou/index/index.js
| ... | ... | @@ -540,10 +540,12 @@ Page({ |
| 540 | 540 | this.data.is_zuhe_addcart = 1; |
| 541 | 541 | if (!haveAdded) { |
| 542 | 542 | |
| 543 | - | |
| 544 | - | |
| 543 | + //购买的商品的数量默认超量的数量 | |
| 545 | 544 | th.data.sele_g = this.data.list[index]; |
| 546 | - if (!th.data.sele_g.num) th.data.goodsInputNum = 1; | |
| 545 | + if (!th.data.sele_g.num){ | |
| 546 | + th.data.goodsInputNum = 1; | |
| 547 | + if(th.data.sele_g.zhqty) th.data.goodsInputNum = th.data.sele_g.zhqty; | |
| 548 | + } | |
| 547 | 549 | |
| 548 | 550 | //如果没有门店,活动商品的配送方式和门店的配送方式不一样 |
| 549 | 551 | if (!th.data.def_pick_store || |
| ... | ... | @@ -664,8 +666,11 @@ Page({ |
| 664 | 666 | async check_pk_store_conut(func,is_no_msg,gd,by_num){ |
| 665 | 667 | var th=this; |
| 666 | 668 | if(this.data.sales_rules!=2){ |
| 667 | - if(func) func(); | |
| 668 | - return false; | |
| 669 | + if(is_no_msg) return true; | |
| 670 | + else { | |
| 671 | + if(func) func(); | |
| 672 | + return false; | |
| 673 | + } | |
| 669 | 674 | } |
| 670 | 675 | //门店库存no |
| 671 | 676 | var pkno= gd && gd.pickup_no?gd.pickup_no:this.data.def_pick_store.pickup_no; |
| ... | ... | @@ -784,9 +789,17 @@ Page({ |
| 784 | 789 | this.data.sele_index = index; |
| 785 | 790 | th.data.goodsInputNum = th.data.sele_g.num + 1; |
| 786 | 791 | |
| 792 | + //必须是组合购买的超量 | |
| 793 | + var is_zhqty=0; | |
| 794 | + if(th.data.goodsInputNum<th.data.sele_g.zhqty){ | |
| 795 | + th.data.goodsInputNum=th.data.sele_g.zhqty; | |
| 796 | + is_zhqty=1; | |
| 797 | + } | |
| 798 | + | |
| 787 | 799 | th.check_pk_store_conut(function(){ |
| 788 | 800 | if (th.data.sele_g.cart_num) { |
| 789 | 801 | th.data.s_cart_num = th.data.sele_g.cart_num + 1; |
| 802 | + if(is_zhqty) th.data.s_cart_num=th.data.sele_g.zhqty; | |
| 790 | 803 | } |
| 791 | 804 | th.add_cart_func(); |
| 792 | 805 | }) |
| ... | ... | @@ -1195,7 +1208,7 @@ Page({ |
| 1195 | 1208 | if (th.data.adding) return false; |
| 1196 | 1209 | th.data.adding = 1; |
| 1197 | 1210 | //-------如果购物车中有相关的数据--------- |
| 1198 | - if (th.data.goodsInputNum > 1) { | |
| 1211 | + if (th.data.list[index].num > 0) { | |
| 1199 | 1212 | var item = th.data.sele_g; |
| 1200 | 1213 | if (th.data.goodsInputNum > o.store_count) { |
| 1201 | 1214 | th.data.adding = 0; |
| ... | ... | @@ -2000,6 +2013,13 @@ Page({ |
| 2000 | 2013 | } |
| 2001 | 2014 | |
| 2002 | 2015 | var num = item.goods_num; |
| 2016 | + | |
| 2017 | + var is_num_change=0; | |
| 2018 | + if(num<th.data.goodsInputNum){ | |
| 2019 | + num=th.data.goodsInputNum; | |
| 2020 | + is_num_change=1; | |
| 2021 | + } | |
| 2022 | + | |
| 2003 | 2023 | if (item.cbuy > -1 && item.cbuy < item.goods_num) { |
| 2004 | 2024 | num = item.cbuy; |
| 2005 | 2025 | } |
| ... | ... | @@ -2024,6 +2044,9 @@ Page({ |
| 2024 | 2044 | updata['guide_id'] = getApp().globalData.guide_id; |
| 2025 | 2045 | updata['guide_type'] = 0; |
| 2026 | 2046 | } |
| 2047 | + if(is_num_change){ | |
| 2048 | + updata['goods_num']=num; | |
| 2049 | + } | |
| 2027 | 2050 | |
| 2028 | 2051 | getApp().request.put("/api/weshop/cart/update", { |
| 2029 | 2052 | data: updata, | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
packageC/pages/presell/goodsInfo/goodsInfo.js
| ... | ... | @@ -21,6 +21,9 @@ let self = null; |
| 21 | 21 | |
| 22 | 22 | Page({ |
| 23 | 23 | data: { |
| 24 | + type: 0, | |
| 25 | + a_btn_type: true, //测试底部按钮显示 | |
| 26 | + | |
| 24 | 27 | start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) |
| 25 | 28 | color_type: 0, //线条控制 |
| 26 | 29 | color_type_one: 0, |
| ... | ... | @@ -308,7 +311,7 @@ Page({ |
| 308 | 311 | } |
| 309 | 312 | //-- 如果有room_id的获取 -- |
| 310 | 313 | if (gid_str.length > 2 && gid_str[3]) { |
| 311 | - room_id = gid_str[2]; | |
| 314 | + room_id = gid_str[3]; | |
| 312 | 315 | room_user_share = 1; |
| 313 | 316 | } |
| 314 | 317 | } |
| ... | ... | @@ -376,7 +379,7 @@ Page({ |
| 376 | 379 | is_closecoupon: json_d.is_closecoupon, |
| 377 | 380 | is_newsales_rules: json_d.is_newsales_rules |
| 378 | 381 | }); |
| 379 | - ee.init(gid); | |
| 382 | + // ee.init(gid); | |
| 380 | 383 | //------几人评价------- |
| 381 | 384 | //n.init(th, "", "comments"); |
| 382 | 385 | |
| ... | ... | @@ -566,12 +569,16 @@ Page({ |
| 566 | 569 | is_share: 0, |
| 567 | 570 | }, |
| 568 | 571 | }).then(res1 => { |
| 572 | + console.log('优惠券+++++++++++++++++'); | |
| 573 | + console.log(res1); | |
| 569 | 574 | fir_quan = res1.data.data.pageData; |
| 570 | 575 | }) |
| 571 | 576 | } |
| 572 | 577 | //过滤不是本商品的单品优惠券------------------- |
| 573 | 578 | if (fir_quan.length > 0) { |
| 574 | - let goodInfo = ee.data.data || {} | |
| 579 | + let goodInfo = th.data.data || {} | |
| 580 | + console.log('商品++++++++++++++++++++++'); | |
| 581 | + console.log(goodInfo); | |
| 575 | 582 | for (let index = fir_quan.length - 1; index >= 0; index--) { |
| 576 | 583 | if (fir_quan[index].useobjecttype == 20) { //判断是单品优惠券 |
| 577 | 584 | if (fir_quan[index].useobjectno != goodInfo.goods_sn) { |
| ... | ... | @@ -580,6 +587,7 @@ Page({ |
| 580 | 587 | } |
| 581 | 588 | } |
| 582 | 589 | } |
| 590 | + | |
| 583 | 591 | let arr = [] |
| 584 | 592 | let length = fir_quan.length |
| 585 | 593 | if (length <= 3) { |
| ... | ... | @@ -784,7 +792,7 @@ Page({ |
| 784 | 792 | sele_g: t.data.data, |
| 785 | 793 | userInfo: getApp().globalData.userInfo, |
| 786 | 794 | }); |
| 787 | - | |
| 795 | + ee.init(gid); | |
| 788 | 796 | //获取门店 |
| 789 | 797 | ee.get_sto(); |
| 790 | 798 | ee.get_sku(o.stoid, t.data.data, gid); |
| ... | ... | @@ -843,7 +851,7 @@ Page({ |
| 843 | 851 | ee.data.enterAddressPage && (this.data.enterAddressPage = !1); |
| 844 | 852 | }) |
| 845 | 853 | |
| 846 | - | |
| 854 | + | |
| 847 | 855 | |
| 848 | 856 | }, |
| 849 | 857 | enterAddress: function () { |
| ... | ... | @@ -2379,13 +2387,30 @@ Page({ |
| 2379 | 2387 | countDown(time, prom_st) { |
| 2380 | 2388 | if (!this.data.is_timer) return false; |
| 2381 | 2389 | var th = this; |
| 2390 | + var {presellForm:{start_time,show_time,end_time},presellForm} = this.data; | |
| 2382 | 2391 | // 获取当前时间,同时得到活动结束时间数组 |
| 2383 | 2392 | var endTime = time; |
| 2384 | 2393 | var newTime = ut.gettimestamp(); |
| 2385 | 2394 | // 对结束时间进行处理渲染到页面 |
| 2386 | 2395 | var obj = null; |
| 2387 | - // 如果活动未结束,对时间进行处理 | |
| 2388 | - if (endTime - newTime > 0) { | |
| 2396 | + var type = 0; | |
| 2397 | + | |
| 2398 | + if ( show_time && newTime>=show_time && newTime<start_time ) { | |
| 2399 | + // 如果开启预热且在预热时间内 | |
| 2400 | + var time = (start_time - newTime); | |
| 2401 | + // 获取天、时、分、秒 | |
| 2402 | + var day = parseInt(time / (60 * 60 * 24)); | |
| 2403 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 2404 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 2405 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 2406 | + obj = { | |
| 2407 | + day: this.timeFormat(day), | |
| 2408 | + hou: this.timeFormat(hou), | |
| 2409 | + min: this.timeFormat(min), | |
| 2410 | + sec: this.timeFormat(sec) | |
| 2411 | + } | |
| 2412 | + } else if (endTime - newTime > 0) { | |
| 2413 | + // 如果活动未结束,对时间进行处理 | |
| 2389 | 2414 | var time = (endTime - newTime); |
| 2390 | 2415 | // 获取天、时、分、秒 |
| 2391 | 2416 | var day = parseInt(time / (60 * 60 * 24)); |
| ... | ... | @@ -2398,8 +2423,8 @@ Page({ |
| 2398 | 2423 | min: this.timeFormat(min), |
| 2399 | 2424 | sec: this.timeFormat(sec) |
| 2400 | 2425 | } |
| 2426 | + type = 1 | |
| 2401 | 2427 | } else { |
| 2402 | - | |
| 2403 | 2428 | //活动已结束,全部设置为'00' |
| 2404 | 2429 | obj = { |
| 2405 | 2430 | day: '00', |
| ... | ... | @@ -2407,19 +2432,20 @@ Page({ |
| 2407 | 2432 | min: '00', |
| 2408 | 2433 | sec: '00' |
| 2409 | 2434 | } |
| 2435 | + | |
| 2410 | 2436 | th.setData({ |
| 2411 | 2437 | prom_time_text: '活动已经结束:', |
| 2412 | - prom_st: 3 | |
| 2438 | + prom_st: 3, | |
| 2439 | + djs: obj, | |
| 2440 | + type: 2 | |
| 2413 | 2441 | }) |
| 2414 | - th.setData({ | |
| 2415 | - djs: obj | |
| 2416 | - }); | |
| 2417 | - return false; | |
| 2418 | 2442 | |
| 2443 | + return false; | |
| 2419 | 2444 | } |
| 2420 | 2445 | |
| 2421 | 2446 | th.setData({ |
| 2422 | - djs: obj | |
| 2447 | + djs: obj, | |
| 2448 | + type: type | |
| 2423 | 2449 | }); |
| 2424 | 2450 | setTimeout(function () { |
| 2425 | 2451 | th.countDown(endTime) |
| ... | ... | @@ -2748,6 +2774,7 @@ Page({ |
| 2748 | 2774 | this.saveImageToPhotosAlbumDef() |
| 2749 | 2775 | } |
| 2750 | 2776 | }, |
| 2777 | + | |
| 2751 | 2778 | //--定义的保存图片方法,分享团--- |
| 2752 | 2779 | saveImageToPhotosAlbum: function () { |
| 2753 | 2780 | //--先判断会员状态-- |
| ... | ... | @@ -3112,19 +3139,18 @@ Page({ |
| 3112 | 3139 | var app = getApp(); |
| 3113 | 3140 | var unit = that.data.screenWidth / 750 * 1.35; //基础单位, |
| 3114 | 3141 | var path2 = that.data.data.original_img; |
| 3115 | - var scene = th.data.gid + ""; | |
| 3116 | - scene += "." + th.data.sele_g.prom_type + "." + th.data.sele_g.prom_id; | |
| 3117 | 3142 | |
| 3118 | - var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
| 3119 | - if (user_id > 0) { | |
| 3120 | - scene += "_" + user_id; | |
| 3121 | - } | |
| 3122 | - //-- 如果不是会员分享过来的要分享给别人 -- | |
| 3123 | - if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
| 3124 | - //固定房间是第3个字符 | |
| 3125 | - if (!user_id) scene += "_0"; | |
| 3126 | - scene += "_" + getApp().globalData.room_id; | |
| 3127 | - } | |
| 3143 | + var scene = th.data.gid + "_"+th.data.presellList.id; | |
| 3144 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
| 3145 | + if (user_id > 0) { | |
| 3146 | + scene += "_" + user_id; | |
| 3147 | + } | |
| 3148 | + //-- 如果不是会员分享过来的要分享给别人 -- | |
| 3149 | + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
| 3150 | + //固定房间是第3个字符 | |
| 3151 | + if (!user_id) scene += "_0"; | |
| 3152 | + scene += "_" + getApp().globalData.room_id; | |
| 3153 | + } | |
| 3128 | 3154 | |
| 3129 | 3155 | ///二微码 |
| 3130 | 3156 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
| ... | ... | @@ -4510,7 +4536,7 @@ Page({ |
| 4510 | 4536 | getApp().goto("/pages/user/plus/plus"); |
| 4511 | 4537 | }, |
| 4512 | 4538 | go_card_info: function () { |
| 4513 | - getApp().goto("/pages/user/cardinfo/cardinfo"); | |
| 4539 | + getApp().goto("/packageE/pages/user/cardinfo/cardinfo"); | |
| 4514 | 4540 | }, |
| 4515 | 4541 | //-- 根据ID拿出门店 -- |
| 4516 | 4542 | get_pick_from_list(pid) { |
| ... | ... | @@ -4716,6 +4742,7 @@ Page({ |
| 4716 | 4742 | presell_id: presell_id, |
| 4717 | 4743 | goods_id: th.data.gid |
| 4718 | 4744 | } |
| 4745 | + console.log('获取预售从表') | |
| 4719 | 4746 | //------获取预售从表---------- |
| 4720 | 4747 | await getApp().request.promiseGet(url, { |
| 4721 | 4748 | data: rd |
| ... | ... | @@ -4730,6 +4757,7 @@ Page({ |
| 4730 | 4757 | }) |
| 4731 | 4758 | |
| 4732 | 4759 | } else { |
| 4760 | + console.log('获取预售从表', 'pre_id', th.data.pre_id) | |
| 4733 | 4761 | //------获取预售从表---------- |
| 4734 | 4762 | await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/get/" + os.stoid + "/" + th.data.pre_id, {}).then(res => { |
| 4735 | 4763 | if (res.data.code == 0 && res.data.data) { |
| ... | ... | @@ -4798,12 +4826,13 @@ Page({ |
| 4798 | 4826 | } |
| 4799 | 4827 | |
| 4800 | 4828 | if (act_data.start_time > ut.gettimestamp()) { |
| 4801 | - wx.showToast({ title: "活动还未开始", icon: 'none', duration: 3000 }); | |
| 4802 | - setTimeout(function () { | |
| 4803 | - ut.wx_back(); | |
| 4804 | - }, 2000) | |
| 4805 | - gnext = 0; | |
| 4806 | - return false; | |
| 4829 | + // wx.showToast({ title: "活动还未开始", icon: 'none', duration: 3000 }); | |
| 4830 | + // setTimeout(function () { | |
| 4831 | + // ut.wx_back(); | |
| 4832 | + // }, 2000) | |
| 4833 | + // gnext = 0; | |
| 4834 | + th.setData({ show: true }); | |
| 4835 | + // return false; | |
| 4807 | 4836 | } |
| 4808 | 4837 | |
| 4809 | 4838 | th.setData({ |
| ... | ... | @@ -4813,20 +4842,24 @@ Page({ |
| 4813 | 4842 | } |
| 4814 | 4843 | }) |
| 4815 | 4844 | |
| 4845 | + // console.log('是否继续查询', gnext) | |
| 4816 | 4846 | if (!gnext) { |
| 4817 | 4847 | return false; |
| 4818 | 4848 | } |
| 4849 | + // console.log('继续查询') | |
| 4819 | 4850 | |
| 4820 | 4851 | var userInfo = getApp().globalData.userInfo; |
| 4821 | - var pre_data = { store_id: os.stoid, is_end: 0, timetype: 1, isuse: 1, prom_type: 8, prom_id: presell_id, pageSize: 1000 }; | |
| 4852 | + // timetype: 1, | |
| 4853 | + var pre_data = { store_id: os.stoid, is_end: 0, isuse: 1, prom_type: 8, prom_id: presell_id, pageSize: 1000 }; | |
| 4822 | 4854 | if (userInfo) { |
| 4823 | 4855 | pre_data.user_id = userInfo.user_id; |
| 4824 | 4856 | } |
| 4825 | 4857 | await getApp().request.promiseGet("/api/weshop/marketing/marketingPresellList/page", { |
| 4826 | 4858 | data: pre_data, |
| 4827 | 4859 | }).then(e => { |
| 4860 | + // console.log('查询marketingPresellList', e) | |
| 4828 | 4861 | if (e.data.code == 0 && e.data.data.pageData && e.data.data.pageData.length > 0) { |
| 4829 | - | |
| 4862 | + // console.log('匹配resellList') | |
| 4830 | 4863 | th.data.all_pre_goods = e.data.data.pageData; |
| 4831 | 4864 | var idx = e.data.data.pageData.findIndex(function (ele) { |
| 4832 | 4865 | return ele.id == th.data.presellList.id; |
| ... | ... | @@ -4838,11 +4871,12 @@ Page({ |
| 4838 | 4871 | } |
| 4839 | 4872 | }) |
| 4840 | 4873 | if (!pre_arr) { |
| 4841 | - wx.showToast({ title: "当前会员身份不符或者时间已过期,无法参与", icon: 'none', duration: 3000 }); | |
| 4842 | - setTimeout(function () { | |
| 4843 | - ut.wx_back(); | |
| 4844 | - }, 2000) | |
| 4845 | - return false; | |
| 4874 | + // wx.showToast({ title: "当前会员身份不符或者时间已过期,无法参与", icon: 'none', duration: 3000 }); | |
| 4875 | + // setTimeout(function () { | |
| 4876 | + // ut.wx_back(); | |
| 4877 | + // }, 2000) | |
| 4878 | + th.setData({ show: true }); | |
| 4879 | + // return false; | |
| 4846 | 4880 | } |
| 4847 | 4881 | if (func) { |
| 4848 | 4882 | func(); | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -74,7 +74,8 @@ |
| 74 | 74 | <view class="goo"> |
| 75 | 75 | <view class="pt_view rel"> |
| 76 | 76 | <!-- 许程 7. 24 --> |
| 77 | - <image class="secondkill-img" src="{{iurl+'/miniapp/images/red_jx.png'}}"></image> | |
| 77 | + <image wx:if="{{type == 0}}" class="secondkill-img" src="{{iurl?iurl+'miniapp/images/blue_ks.png':''}}" /> | |
| 78 | + <image wx:else class="secondkill-img" src="{{iurl?iurl+'miniapp/images/red_jx.png':''}}" /> | |
| 78 | 79 | <!-- <view class=""> --> |
| 79 | 80 | <!-- <view class="flex" style='height:40rpx; margin-top:5rpx;'> --> |
| 80 | 81 | <view class="abs xc-qt-price fs28 xc-qtsign">预售价</view> |
| ... | ... | @@ -82,34 +83,34 @@ |
| 82 | 83 | <view class="fs28 val" style="margin-right:100rpx">¥{{presellList.presell_price}}</view> |
| 83 | 84 | <!-- <view class="word-line fs26 xc-qtunit-price">--> |
| 84 | 85 | <!-- 零售价¥{{filters.toFix(data.market_price,2)}}--> |
| 85 | -<!-- </view>--> | |
| 86 | +<!-- </view>--> | |
| 86 | 87 | </view> |
| 87 | 88 | |
| 88 | 89 | |
| 89 | 90 | <block> |
| 90 | 91 | <!-- </view> --> |
| 91 | - <view class="hy-stop word-color fs26 abs">距活动结束还有</view> | |
| 92 | + <view class="hy-stop word-color fs26 abs cl_r {{type==0?'pre_cl':''}}">距活动{{type==0?'开始':'结束'}}还有</view> | |
| 92 | 93 | <view class="secview flex abs fs24 " style="color: black;right: 3px; top:46rpx;"> |
| 93 | 94 | <block wx:if="djs.day"> |
| 94 | - <view class='day-val' style="color:#d40022;margin-top:-34rpx;"> | |
| 95 | + <view class="day-val cl_r {{type==0?'pre_cl':''}}" style="margin-top:-34rpx;"> | |
| 95 | 96 | {{djs.day}} |
| 96 | 97 | </view> |
| 97 | - <view class="day white" style="margin-top:-34rpx;margin-right:10rpx;color:#d40022"> | |
| 98 | + <view class="day cl_r {{type==0?'pre_cl':''}}" style="margin-top:-34rpx;margin-right:10rpx;"> | |
| 98 | 99 | 天 |
| 99 | 100 | </view> |
| 100 | 101 | </block> |
| 101 | - <view class='xc-time-val white t-c' style="background:#d40022"> | |
| 102 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | |
| 102 | 103 | {{djs.hou}} |
| 103 | 104 | </view> |
| 104 | - <view class="xc-time" style="color:#d40022">时</view> | |
| 105 | - <view class='xc-time-val white t-c' style="background:#d40022"> | |
| 105 | + <view class="xc-time {{type==0?'pre_cl':''}}">时</view> | |
| 106 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | |
| 106 | 107 | {{djs.min}} |
| 107 | 108 | </view> |
| 108 | - <view class="xc-time" style="color:#d40022">分</view> | |
| 109 | - <view class='xc-time-val white t-c' style=";background:#d40022"> | |
| 109 | + <view class="xc-time {{type==0?'pre_cl':''}}">分</view> | |
| 110 | + <view class="xc-time-val white t-c {{type==0?'pre_ba':''}}" > | |
| 110 | 111 | {{djs.sec}} |
| 111 | 112 | </view> |
| 112 | - <view class="xc-time" style="color:#d40022">秒</view> | |
| 113 | + <view class="xc-time {{type==0?'pre_cl':''}}">秒</view> | |
| 113 | 114 | </view> |
| 114 | 115 | </block> |
| 115 | 116 | </view> |
| ... | ... | @@ -128,11 +129,11 @@ |
| 128 | 129 | </view> |
| 129 | 130 | </view> |
| 130 | 131 | <view wx:if="{{presellForm.presell_type==0}}" class="fs24" style="padding-bottom:20rpx"> |
| 131 | - <view class="stock" style="color:#999">尾款:{{filters.format_time(presellForm.pay_begindate,1)}}-{{filters.format_time(presellForm.pay_enddate,1)}}</view> | |
| 132 | + <view class="stock" style="color:#999">尾款:{{filters.format_time(presellForm.pay_begindate,1)}}-{{filters.format_time(presellForm.pay_enddate,1)}}</view> | |
| 132 | 133 | </view> |
| 133 | 134 | <view class="goods-num"> |
| 134 | 135 | <block wx:if="{{presellList.virtual_qty}}"> |
| 135 | - <view class="stock">总数量:{{presellList.presell_sumqty+presellList.virtual_qty}}件</view> | |
| 136 | + <view class="stock">总数量:{{presellList.presell_sumqty+presellList.virtual_qty}}件</view> | |
| 136 | 137 | <view class="stock" wx:if="{{presellList.vip_butyqty}}">限购:{{presellList.vip_butyqty}}件</view> |
| 137 | 138 | <view class="stock" wx:else>限购:不限</view> |
| 138 | 139 | <view class="sales">已购:{{presellList.buy_goodnum+presellList.virtual_qty}}件</view> |
| ... | ... | @@ -147,6 +148,24 @@ |
| 147 | 148 | </view> |
| 148 | 149 | <view class="t_gz" wx:if="{{is_show_gz==1}}">{{prom_act.remark}}</view> |
| 149 | 150 | </view> |
| 151 | + <!-- 许程 7.24暂时注释 --> | |
| 152 | + <view class="bdt16" wx:if="{{ prom_type!=1 && prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1 && sele_g.is_xz_yh !=1}}"> | |
| 153 | + <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}"> | |
| 154 | + <view class="cx-sizs fs30">领券</view> | |
| 155 | + <view class="flex ai_c f1 pdh20"> | |
| 156 | + <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="id"> | |
| 157 | + <view class="circle xc-circular xc-one"></view> | |
| 158 | + <view class="xc-coupon t-c four-level-word"> | |
| 159 | + 满{{item.condition}}减{{item.money}} | |
| 160 | + </view> | |
| 161 | + <view class="circle xc-circular xc-two"></view> | |
| 162 | + </view> | |
| 163 | + </view> | |
| 164 | + <view data-coupon="1" bindtap="switchCoupon" class="cx-obtain-coupon wsize"> | |
| 165 | + <text class="bg_jj"></text> | |
| 166 | + </view> | |
| 167 | + </view> | |
| 168 | + </view> | |
| 150 | 169 | <!-- 门店收货地址 --> |
| 151 | 170 | <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> |
| 152 | 171 | <view class="address_frame" bindtap="choice_store" data-ind="0"> |
| ... | ... | @@ -209,7 +228,7 @@ |
| 209 | 228 | </view> |
| 210 | 229 | <scroll-view scroll-x="true" class="pj_scroll"> |
| 211 | 230 | <view class="flex"> |
| 212 | - <view class="xc_comment-detail" style="" wx:for="{{fir_comments}}" wx:key="fir_comments"> | |
| 231 | + <view class="xc_comment-detail" wx:for="{{fir_comments}}" wx:key="fir_comments"> | |
| 213 | 232 | <view class="xc_comment-left"> |
| 214 | 233 | <view class="xc_comment-user"> |
| 215 | 234 | <view class="xc_user-img"> |
| ... | ... | @@ -219,7 +238,7 @@ |
| 219 | 238 | <view class="xc_user-name five-level-word"> |
| 220 | 239 | {{item.is_anonymous!=1?item.username:'匿名'}} |
| 221 | 240 | </view> |
| 222 | - <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
| 241 | + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="rank"></image> | |
| 223 | 242 | </view> |
| 224 | 243 | </view> |
| 225 | 244 | <view class="xc_comment-font pj_word_size ellipsis-1 pdt12"> |
| ... | ... | @@ -434,7 +453,7 @@ |
| 434 | 453 | <view class="middle-user"> |
| 435 | 454 | {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}} |
| 436 | 455 | </view> |
| 437 | - <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
| 456 | + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="index"></image> | |
| 438 | 457 | </view> |
| 439 | 458 | </view> |
| 440 | 459 | <view class="xc-pirces"> |
| ... | ... | @@ -450,12 +469,12 @@ |
| 450 | 469 | </view> |
| 451 | 470 | <view class="img-ul"> |
| 452 | 471 | <block wx:if="{{item.source_type==0}}"> |
| 453 | - <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | |
| 472 | + <view class="img-li" wx:for="{{item.img}}" wx:key="index"> | |
| 454 | 473 | <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image> |
| 455 | 474 | </view> |
| 456 | 475 | </block> |
| 457 | 476 | <block wx:if="{{item.source_type==1}}"> |
| 458 | - <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem"> | |
| 477 | + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="index" wx:for-item="aitem"> | |
| 459 | 478 | <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image> |
| 460 | 479 | </view> |
| 461 | 480 | </block> |
| ... | ... | @@ -474,7 +493,7 @@ |
| 474 | 493 | <view class="reply rel" wx:if="{{item.replay_list}}"> |
| 475 | 494 | <view class="line_bulge"></view> |
| 476 | 495 | <view class="shop-reply">店家回复:</view> |
| 477 | - <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}"> | |
| 496 | + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="index"> | |
| 478 | 497 | {{r_item.content}} |
| 479 | 498 | </view> |
| 480 | 499 | </view> |
| ... | ... | @@ -529,7 +548,8 @@ |
| 529 | 548 | </navigator> |
| 530 | 549 | </view> |
| 531 | 550 | |
| 532 | - <view class="fs24 f1 flex ai-center bg-FF4732 t-c white" style="border-radius:10rpx;justify-content: center"> | |
| 551 | + <view wx:if="{{type == 0}}" class="buy-btn cart-btn cart-btn-lg lanse set_width" style="border-radius: 56rpx;">即将开始</view> | |
| 552 | + <view wx:else class="fs24 f1 flex ai-center bg-FF4732 t-c white" style="border-radius:10rpx;justify-content: center"> | |
| 533 | 553 | <view style="padding: 0 6rpx"> |
| 534 | 554 | <view class="">{{filters.format_time(presellForm.end_time,2)}} 预售结束</view> |
| 535 | 555 | <!-- <view class="">08.30 23:59:59 开始发货</view> --> |
| ... | ... | @@ -721,7 +741,7 @@ |
| 721 | 741 | {{sec_sto.name}} |
| 722 | 742 | </view> |
| 723 | 743 | <view class="itemlists" hidden="{{is_sec_mend==0}}"> |
| 724 | - <view wx:for="{{sec_sto.s_arr}}" wx:key="{{index}}" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | |
| 744 | + <view wx:for="{{sec_sto.s_arr}}" wx:key="index" class="item" bindtap="hidemend" data-p_id="{{item.pickup_id}}" data-p_name="{{item.pickup_name}}" data-p_dis="{{item.distr_type}}"> | |
| 725 | 745 | {{item.pickup_name}} |
| 726 | 746 | </view> |
| 727 | 747 | </view> |
| ... | ... | @@ -735,7 +755,7 @@ |
| 735 | 755 | <view class="prom-model"> |
| 736 | 756 | <icon bindtap="closePromModal" class="modal-close" color="gray" size="22" type="cancel"></icon> |
| 737 | 757 | <view class="prom-title">优惠信息</view> |
| 738 | - <view class="logistics-item" wx:for="{{select.activity.data}}" wx:key="{{index}}"> | |
| 758 | + <view class="logistics-item" wx:for="{{select.activity.data}}" wx:key="index"> | |
| 739 | 759 | <view class="item-title"> |
| 740 | 760 | <text class="prom-item">{{item.title}}</text> |
| 741 | 761 | </view> |
| ... | ... | @@ -759,7 +779,7 @@ |
| 759 | 779 | <view class="top-frame"> |
| 760 | 780 | <view class="xc-coupon-frame "> |
| 761 | 781 | <!-- -单张的券- --> |
| 762 | - <view class="rel" wx:for="{{quan_list}}" wx:key="{{index}}"> | |
| 782 | + <view class="rel" wx:for="{{quan_list}}" wx:key="index"> | |
| 763 | 783 | <view class="coupon flex"> |
| 764 | 784 | <view class="circle xc-circular-one"></view> |
| 765 | 785 | <view class="xc-coupon-left "> |
| ... | ... | @@ -817,7 +837,7 @@ |
| 817 | 837 | <block wx:if="{{choice_sort_store==0}}"> |
| 818 | 838 | <!-- 需要for循环 --> |
| 819 | 839 | <block wx:if="{{is_show_sto_cat==1}}"> |
| 820 | - <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 840 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" wx:key="dpl" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 821 | 841 | <view class="store flex-vertical"> |
| 822 | 842 | <!-- 需要点击事件 --> |
| 823 | 843 | <block wx:if="{{index==fir_pick_index}}"> |
| ... | ... | @@ -843,7 +863,7 @@ |
| 843 | 863 | </view> |
| 844 | 864 | </block> |
| 845 | 865 | <block wx:else> |
| 846 | - <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 866 | + <view class="store_choose flex" wx:for="{{only_pk}}" wx:key="olpk" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 847 | 867 | <view class="store flex-vertical"> |
| 848 | 868 | <!-- 需要点击事件 --> |
| 849 | 869 | <block wx:if="{{index==fir_pick_index}}"> |
| ... | ... | @@ -871,7 +891,7 @@ |
| 871 | 891 | </block> |
| 872 | 892 | <block wx:else> |
| 873 | 893 | <!-- 如果是点击选择门店分类后显示分类下的门店 --> |
| 874 | - <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | |
| 894 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" wx:key="sec_arr" data-ind="{{index}}" bindtap="choose_for_store"> | |
| 875 | 895 | <view class="store flex-vertical"> |
| 876 | 896 | <!-- 需要点击事件 --> |
| 877 | 897 | <block wx:if="{{index==sec_pick_index}}"> |
| ... | ... | @@ -922,7 +942,7 @@ |
| 922 | 942 | </view> |
| 923 | 943 | </view> |
| 924 | 944 | <view class="sort_store_list"> |
| 925 | - <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | |
| 945 | + <view class="sort-store-frame" wx:for="{{all_sto}}" wx:key="all_sto" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | |
| 926 | 946 | <view class="sort-store flex-vertical-between"> |
| 927 | 947 | <view class="fs30" di>{{item.name}}</view> |
| 928 | 948 | <view class="black_rights-frame"> | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.wxss
| ... | ... | @@ -2361,8 +2361,30 @@ margin-top:5rpx; |
| 2361 | 2361 | top: -23rpx; |
| 2362 | 2362 | right: 56rpx; |
| 2363 | 2363 | } |
| 2364 | -.xc-time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | |
| 2365 | -.xc-time{margin-right:10rpx; margin-left:10rpx; margin-top:-32rpx; | |
| 2364 | +.xc-time-val{ | |
| 2365 | + width:36rpx; | |
| 2366 | + height:36rpx; | |
| 2367 | + border-radius:7rpx; | |
| 2368 | + line-height: 36rpx; | |
| 2369 | + background:#d40022; | |
| 2370 | +} | |
| 2371 | +.xc-time{ | |
| 2372 | + margin-right:10rpx; | |
| 2373 | + margin-left:10rpx; | |
| 2374 | + margin-top:-32rpx; | |
| 2375 | + color: #d40022; | |
| 2376 | +} | |
| 2377 | +.ba_r { | |
| 2378 | + background:#d40022; | |
| 2379 | +} | |
| 2380 | +.cl_r { | |
| 2381 | + color: #d40022; | |
| 2382 | +} | |
| 2383 | +.pre_ba { | |
| 2384 | + background:#0097e0; | |
| 2385 | +} | |
| 2386 | +.pre_cl { | |
| 2387 | + color: #0097e0; | |
| 2366 | 2388 | } |
| 2367 | 2389 | .xc-goods-explain{ |
| 2368 | 2390 | width:100%; |
| ... | ... | @@ -2947,7 +2969,7 @@ button.custom-service::after{ |
| 2947 | 2969 | /* position: absolute; */ |
| 2948 | 2970 | display: flex; |
| 2949 | 2971 | align-items: center; |
| 2950 | - /* justify-content: center; */ | |
| 2972 | + justify-content: center; | |
| 2951 | 2973 | border-radius: 60rpx; |
| 2952 | 2974 | background-color: rgba(0,0,0,.4); |
| 2953 | 2975 | /* position: absolute; */ | ... | ... |
packageC/pages/presell/list/list.js
| ... | ... | @@ -11,7 +11,7 @@ Page({ |
| 11 | 11 | isshow: 0, |
| 12 | 12 | ad_data: null, |
| 13 | 13 | max_sw_height: 200, |
| 14 | - type: 1, | |
| 14 | + type: 0, | |
| 15 | 15 | }, |
| 16 | 16 | |
| 17 | 17 | //------初始化加载---------- |
| ... | ... | @@ -136,7 +136,7 @@ Page({ |
| 136 | 136 | store_id: os.stoid, |
| 137 | 137 | page: this.data.page, |
| 138 | 138 | pageSize: 10, |
| 139 | - timetype: self.data.type, | |
| 139 | + // timetype: self.data.type, | |
| 140 | 140 | isuse:1 |
| 141 | 141 | } |
| 142 | 142 | if(getApp().globalData.userInfo){ |
| ... | ... | @@ -150,12 +150,20 @@ Page({ |
| 150 | 150 | getApp().request.get("/api/weshop/marketing/marketingPresellList/page", { |
| 151 | 151 | data: req, |
| 152 | 152 | success: function (res) { |
| 153 | + let now = ut.gettimestamp(); | |
| 153 | 154 | self.data.loading = 0; |
| 154 | 155 | if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { |
| 155 | 156 | var list = self.data.goodlist ? self.data.goodlist : []; |
| 156 | 157 | var arr = res.data.data.pageData; |
| 157 | 158 | //数组合起来 |
| 158 | 159 | for (var i in arr) { |
| 160 | + arr[i].type = arr[i].show_time&&(now>=arr[i].show_time&&now<arr[i].start_time)?0:(now>arr[i].start_time&&now<arr[i].end_time)?1:2; | |
| 161 | + arr[i].djs = { | |
| 162 | + day: '00', | |
| 163 | + hou: '00', | |
| 164 | + min: '00', | |
| 165 | + sec: '00', | |
| 166 | + }; | |
| 159 | 167 | list.push(arr[i]); |
| 160 | 168 | } |
| 161 | 169 | self.data.page++; |
| ... | ... | @@ -215,36 +223,49 @@ Page({ |
| 215 | 223 | if(endTimeList==null) return null |
| 216 | 224 | // 对结束时间进行处理渲染到页面 |
| 217 | 225 | for (var i = 0; i < endTimeList.length; i++){ |
| 218 | - var o = endTimeList[i]; | |
| 219 | - var endTime = o.start_time; | |
| 220 | - let obj = null; | |
| 221 | - // 如果活动未结束,对时间进行处理 | |
| 222 | - if (endTime - newTime > 0){ | |
| 223 | - let time = (endTime - newTime); | |
| 224 | - // 获取天、时、分、秒 | |
| 225 | - let day = parseInt(time / (60 * 60 * 24)); | |
| 226 | - let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 227 | - let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 228 | - let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 229 | - obj = { | |
| 230 | - day: this.timeFormat(day), | |
| 231 | - hou: this.timeFormat(hou), | |
| 232 | - min: this.timeFormat(min), | |
| 233 | - sec: this.timeFormat(sec), | |
| 234 | - hide: 1 | |
| 235 | - } | |
| 236 | - }else{ | |
| 237 | - //活动已结束,全部设置为'00' | |
| 238 | - obj = { | |
| 239 | - day: '00', | |
| 240 | - hou: '00', | |
| 241 | - min: '00', | |
| 242 | - sec: '00' | |
| 226 | + var o = endTimeList[i]; | |
| 227 | + var endTime = o.start_time; | |
| 228 | + let obj = null; | |
| 229 | + var type = 1; | |
| 230 | + var tend = false; | |
| 231 | + // if (o.show_time && newTime < endTime && newTime >= o.show_time) { | |
| 232 | + // type = 0; | |
| 233 | + // } | |
| 234 | + // 如果活动未结束,对时间进行处理 | |
| 235 | + if (o.show_time && newTime < endTime && newTime > o.show_time){ | |
| 236 | + let time = (endTime - newTime); | |
| 237 | + // 获取天、时、分、秒 | |
| 238 | + let day = parseInt(time / (60 * 60 * 24)); | |
| 239 | + let hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 240 | + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 241 | + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 242 | + obj = { | |
| 243 | + day: this.timeFormat(day), | |
| 244 | + hou: this.timeFormat(hou), | |
| 245 | + min: this.timeFormat(min), | |
| 246 | + sec: this.timeFormat(sec), | |
| 247 | + hide: 1 | |
| 243 | 248 | } |
| 249 | + type = 0; | |
| 250 | + }else{ | |
| 251 | + //活动已结束,全部设置为'00' | |
| 252 | + obj = { | |
| 253 | + day: '00', | |
| 254 | + hou: '00', | |
| 255 | + min: '00', | |
| 256 | + sec: '00' | |
| 244 | 257 | } |
| 245 | - var txt ="goodlist["+i+"].djs"; | |
| 246 | - th.setData({ [txt]: obj}); | |
| 258 | + tend = true | |
| 247 | 259 | } |
| 260 | + var txt ="goodlist["+i+"].djs"; | |
| 261 | + var typ ="goodlist["+i+"].type"; | |
| 262 | + var end ="goodlist["+i+"].end"; | |
| 263 | + th.setData({ | |
| 264 | + [txt]: obj, | |
| 265 | + [typ]: type, | |
| 266 | + [end]: tend, | |
| 267 | + }); | |
| 268 | + } | |
| 248 | 269 | }, |
| 249 | 270 | go_url(e){ |
| 250 | 271 | let url=e.currentTarget.dataset.url; | ... | ... |
packageC/pages/presell/list/list.wxml
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | |
| 7 | 7 | <swiper class="swiper" circular="true" autoplay="true" |
| 8 | 8 | indicator-dots="true" interval="2500" style="height:{{max_sw_height}}rpx" > |
| 9 | - <block wx:for="{{ad_data}}"> | |
| 9 | + <block wx:for="{{ad_data}}" wx:key="as"> | |
| 10 | 10 | |
| 11 | 11 | <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}"> |
| 12 | 12 | <swiper-item> |
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | <view class="kill-list seckill_list"> |
| 29 | - <view class="kill-item" wx:for="{{goodlist}}"> | |
| 29 | + <view class="kill-item" wx:for="{{goodlist}}" wx:key="gs"> | |
| 30 | 30 | <navigator class="kill-pic rel" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}"> |
| 31 | 31 | <image class="wh100" src="{{url+item.original_img}}" data-val="{{item.original_img}}" |
| 32 | 32 | data-errorimg="goodlist[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image> |
| ... | ... | @@ -37,9 +37,10 @@ |
| 37 | 37 | <view class="flex-vertical xc-strip-frame"> |
| 38 | 38 | <view class="xc-strip-blank rel"> |
| 39 | 39 | |
| 40 | - <view class="flex-vertical rel total" style="background-color: {{type == 0 ? '#059de5' : ''}};"> | |
| 41 | - <view class="t-c abs xc-fill" ></view> | |
| 42 | - <text class="fs20 white abs xc-fill-text">已预售0%</text> | |
| 40 | + <view class="flex-vertical rel total" style="background-color: {{item.type == 0 ? '#059de5' : item.type == 1 ? '#ffe3e2' : ''}};"> | |
| 41 | + <view wx:if="{{item.type == 1}}" class="t-c abs xc-fill" style="background: #e4374d;width: calc({{filters.toFix(100-(item.buy_goodnum+item.virtual_qty)/(item.presell_sumqty+item.virtual_qty)*100,0)||100}} * 1%);"></view> | |
| 42 | + <text wx:if="{{item.type == 1}}" class="fs20 white abs xc-fill-text">剩余{{filters.toFix(100-(item.buy_goodnum+item.virtual_qty)/(item.presell_sumqty+item.virtual_qty)*100,0)||100}}%</text> | |
| 43 | + <text wx:else class="fs20 white abs xc-fill-text">已预售{{filters.toFix((item.buy_goodnum+item.virtual_qty)/(item.presell_sumqty+item.virtual_qty)*100,0)||0}}%</text> | |
| 43 | 44 | </view> |
| 44 | 45 | |
| 45 | 46 | </view> |
| ... | ... | @@ -48,23 +49,24 @@ |
| 48 | 49 | |
| 49 | 50 | <view class="goods-num"> |
| 50 | 51 | <view> |
| 51 | - <view class="blue_c" wx:if="{{type == 0}}"> | |
| 52 | - <text>剩余:</text> | |
| 53 | - <text class='tui-conutdown-box'> {{item.djs.day}}</text>天 | |
| 52 | + <view class="blue_c" wx:if="{{item.type == 0 && false}}" style="display: none;position: absolute;margin-top: -40rpx;"> | |
| 53 | + <text>剩余:</text> | |
| 54 | + <text class='tui-conutdown-box'>{{item.djs.day}}</text>天 | |
| 54 | 55 | <text class='tui-conutdown-box'>{{item.djs.hou}}</text>时 |
| 55 | 56 | <text class='tui-conutdown-box'>{{item.djs.min}}</text>分 |
| 56 | 57 | <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒 |
| 57 | 58 | </view> |
| 58 | 59 | |
| 59 | - <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" > | |
| 60 | + <view class="fs40 flex xc-buttom-money {{item.type==1?'xc-wc':'blue_c'}}" > | |
| 60 | 61 | <view class="fs28" style="line-height: 16px;">¥{{item.presell_price}}</view> |
| 61 | 62 | <text>{{item.price}}</text> |
| 62 | 63 | <!-- <span class="underline fs20">零售价¥{{item.market_price}}</span>--> |
| 63 | 64 | </view> |
| 64 | 65 | </view> |
| 65 | 66 | <view class="kill-btn "> |
| 66 | - <navigator wx:if="{{type==1}}" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">去抢购</navigator> | |
| 67 | - <navigator wx:else url="/packageC/pages/presell/pregoodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> | |
| 67 | + <navigator wx:if="{{item.type==1}}" url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}">去抢购</navigator> | |
| 68 | + <!-- <navigator wx:else url="/packageC/pages/presell/pregoodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> --> | |
| 69 | + <navigator wx:else url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&pre_id={{item.id}}" style="background:#059de5;"><view style="color:#fff;">即将开始</view></navigator> | |
| 68 | 70 | </view> |
| 69 | 71 | |
| 70 | 72 | </view> | ... | ... |
packageC/pages/presell/pregoodsInfo/goodsInfo.js
| ... | ... | @@ -3694,7 +3694,7 @@ Page({ |
| 3694 | 3694 | getApp().goto("/pages/user/plus/plus"); |
| 3695 | 3695 | }, |
| 3696 | 3696 | go_card_info: function () { |
| 3697 | - getApp().goto("/pages/user/cardinfo/cardinfo"); | |
| 3697 | + getApp().goto("/packageE/pages/user/cardinfo/cardinfo"); | |
| 3698 | 3698 | }, |
| 3699 | 3699 | //-- 根据ID拿出门店 -- |
| 3700 | 3700 | get_pick_from_list(pid) { | ... | ... |
pages/user/cardinfo/cardinfo.js renamed to packageE/pages/user/cardinfo/cardinfo.js
| ... | ... | @@ -2,11 +2,11 @@ var t = getApp(), |
| 2 | 2 | a = t.request, |
| 3 | 3 | o = t.globalData.setting, |
| 4 | 4 | os = o, |
| 5 | - i = require("../../../utils/util.js"), | |
| 5 | + i = require("../../../../utils/util.js"), | |
| 6 | 6 | ut = i, |
| 7 | - s = require("../../../utils/common.js"),t_pay = require("../../../utils/pay2.js"), | |
| 8 | - w = require("../../../utils/wxParse/wxParse.js"); | |
| 9 | -var regeneratorRuntime = require('../../../utils/runtime.js'); | |
| 7 | + s = require("../../../../utils/common.js"),t_pay = require("../../../../utils/pay2.js"), | |
| 8 | + w = require("../../../../utils/wxParse/wxParse.js"); | |
| 9 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
| 10 | 10 | //wx.downloadFile把线上地址设为本地地址 |
| 11 | 11 | Page({ |
| 12 | 12 | ... | ... |
pages/user/cardinfo/cardinfo.json renamed to packageE/pages/user/cardinfo/cardinfo.json
pages/user/cardinfo/cardinfo.wxml renamed to packageE/pages/user/cardinfo/cardinfo.wxml
| 1 | -<import src="../../../utils/wxParse/wxParse.wxml"></import> | |
| 2 | -<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
| 1 | +<import src="../../../../utils/wxParse/wxParse.wxml"></import> | |
| 2 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | |
| 3 | 3 | |
| 4 | 4 | <view> |
| 5 | 5 | <image class="Member_bk" src="{{url}}/miniapp/images/plus/page_bk.png"></image> | ... | ... |
pages/user/cardinfo/cardinfo.wxss renamed to packageE/pages/user/cardinfo/cardinfo.wxss
pages/activity/pind_list/pind_list.js
| ... | ... | @@ -18,6 +18,7 @@ Page({ |
| 18 | 18 | iurl: os.imghost, |
| 19 | 19 | ad_data: null, |
| 20 | 20 | max_sw_height: 200, |
| 21 | + is_retail_price:0 | |
| 21 | 22 | }, |
| 22 | 23 | |
| 23 | 24 | //------初始化加载---------- |
| ... | ... | @@ -29,6 +30,16 @@ Page({ |
| 29 | 30 | var th = this; |
| 30 | 31 | getApp().getConfig(); |
| 31 | 32 | |
| 33 | + var th=this; | |
| 34 | + getApp().getConfig2(function (e) { | |
| 35 | + var swithc_list = e.switch_list; | |
| 36 | + var sw_arr = JSON.parse(swithc_list); | |
| 37 | + if(sw_arr.is_retail_price){ | |
| 38 | + th.setData({is_retail_price:1}); | |
| 39 | + } | |
| 40 | + },1); | |
| 41 | + | |
| 42 | + | |
| 32 | 43 | if (first_leader) { |
| 33 | 44 | getApp().globalData.first_leader = first_leader; |
| 34 | 45 | //调用接口判断是不是会员 | ... | ... |
pages/activity/pind_list/pind_list.wxml
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | <view class="fs20 flex xc-people-val-frame" |
| 44 | 44 | style="border-color:{{type==1?'#d60021':'#059de5'}};margin-left:{{type==1?'15rpx':'0rpx'}}"> |
| 45 | 45 | <view class=" flex-center val-img {{type==1?'red-b':'blue_b'}}"> |
| 46 | - <image class="people-img"src="{{iurl}}/miniapp/images/bai-ren.png"></image> | |
| 46 | + <image class="people-img" src="{{iurl}}/miniapp/images/bai-ren.png"></image> | |
| 47 | 47 | </view> |
| 48 | 48 | <text class="{{type==1?'red-co':'blue_c ai-bas'}}" style="margin-left:8rpx; margin-right:8rpx">{{item.ct_num}}人团</text> |
| 49 | 49 | </view> |
| ... | ... | @@ -63,20 +63,20 @@ |
| 63 | 63 | <text class='tui-conutdown-box'>{{item.djs.min}}</text>分 |
| 64 | 64 | <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒 |
| 65 | 65 | </view> |
| 66 | - <view class="goods-num"style="margin-top:{{type==0?'42rpx':'18rpx'}}"> | |
| 66 | + <view class="goods-num" style="margin-top:{{type==0?'42rpx':'18rpx'}}"> | |
| 67 | 67 | <view> |
| 68 | 68 | |
| 69 | 69 | <view class="fs40 flex xc-top15 {{type==1?'red-co ai-bas':'blue_c xc-lihe42 ai-bas'}}"> |
| 70 | 70 | <text class="fs28 {{type==0?'martop13':''}}">¥</text> |
| 71 | 71 | <text style="margin-left:-5rpx">{{item.price}}</text> |
| 72 | -<!-- <span class="underline {{type==0?'martop18':''}}">¥{{item.shop_price}}</span>--> | |
| 72 | + <text wx:if="{{is_retail_price}}" class="underline {{type==0?'martop18':''}}">¥{{item.shop_price}}</text> | |
| 73 | 73 | </view> |
| 74 | 74 | |
| 75 | 75 | </view> |
| 76 | 76 | <view class="kill-btn"> |
| 77 | - <navigator class="huise"style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==1 }}">即将开始</navigator> | |
| 78 | - <navigator class="huise"style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==2 }}" >即将开始</navigator> | |
| 79 | - <navigator class="huise"style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==3 }}" >即将开始</navigator> | |
| 77 | + <navigator class="huise" style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==1 }}">即将开始</navigator> | |
| 78 | + <navigator class="huise" style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==2 }}" >即将开始</navigator> | |
| 79 | + <navigator class="huise" style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==3 }}" >即将开始</navigator> | |
| 80 | 80 | |
| 81 | 81 | <navigator class="blue_b" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{item.status==1 && type==1 && item.kttype==1}}">去参团</navigator> |
| 82 | 82 | <navigator url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{item.status==1 && type==1 && item.kttype==2}}">去开团</navigator> |
| ... | ... | @@ -94,11 +94,11 @@ |
| 94 | 94 | <view class="theader" > |
| 95 | 95 | <view bindtap='tip' data-ty="1" class="xc-border-right flex-center timeac left {{type==1?'active':''}}"> |
| 96 | 96 | <image class="xc-bottom" |
| 97 | - src="{{type==1?'{{url}}/miniapp/images/fire-red.png':'{{url}}/miniapp/images/fire-black.png'}}"></image> | |
| 97 | + src="{{type==1?url+'/miniapp/images/fire-red.png':url+'/miniapp/images/fire-black.png'}}"></image> | |
| 98 | 98 | 火热进行中</view> |
| 99 | 99 | <view bindtap='tip' data-ty="0" class=" flex-center timeac right {{type==0?'active':''}}"> |
| 100 | 100 | <image class="xc-bottom" |
| 101 | - src="{{type==0?'{{url}}/miniapp/images/clock-rad.png':'{{url}}/miniapp/images/clock-black.png'}}"></image> | |
| 101 | + src="{{type==0?url+'/miniapp/images/clock-rad.png':url+'/miniapp/images/clock-black.png'}}"></image> | |
| 102 | 102 | 即将开始</view> |
| 103 | 103 | </view> |
| 104 | 104 | ... | ... |
pages/activity/seckill_list/seckill_list.js
| ... | ... | @@ -17,6 +17,7 @@ Page({ |
| 17 | 17 | isshow: 0, |
| 18 | 18 | ad_data: null, |
| 19 | 19 | max_sw_height: 200, |
| 20 | + is_retail_price:0 | |
| 20 | 21 | }, |
| 21 | 22 | |
| 22 | 23 | //------初始化加载---------- |
| ... | ... | @@ -37,6 +38,16 @@ Page({ |
| 37 | 38 | console.log(first_leader); |
| 38 | 39 | getApp().getConfig(); |
| 39 | 40 | |
| 41 | + var th=this; | |
| 42 | + getApp().getConfig2(function (e) { | |
| 43 | + var swithc_list = e.switch_list; | |
| 44 | + var sw_arr = JSON.parse(swithc_list); | |
| 45 | + if(sw_arr.is_retail_price){ | |
| 46 | + th.setData({is_retail_price:1}); | |
| 47 | + } | |
| 48 | + },1); | |
| 49 | + | |
| 50 | + | |
| 40 | 51 | if (first_leader) { |
| 41 | 52 | getApp().globalData.first_leader = first_leader; |
| 42 | 53 | //调用接口判断是不是会员 |
| ... | ... | @@ -73,9 +84,9 @@ Page({ |
| 73 | 84 | |
| 74 | 85 | |
| 75 | 86 | onShow: function (t) { |
| 76 | - getApp().check_can_share(); | |
| 87 | + getApp().check_can_share(); | |
| 77 | 88 | this.data.is_timer = 1; |
| 78 | - this.data.currentPage = 1; | |
| 89 | + //this.data.currentPage = 1;不能清空未1 | |
| 79 | 90 | var th = this; |
| 80 | 91 | //设置全局定时器 |
| 81 | 92 | th.data.timer = setInterval(function () { | ... | ... |
pages/activity/seckill_list/seckill_list.wxml
| ... | ... | @@ -68,8 +68,8 @@ |
| 68 | 68 | </view> |
| 69 | 69 | <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" > |
| 70 | 70 | <view class="fs28" style="line-height: 16px;">¥</view> |
| 71 | - <text>{{item.price}}</text> | |
| 72 | -<!-- <span class="underline fs20">零售价¥{{item.market_price}}</span>--> | |
| 71 | + <text>{{item.price}}</text> | |
| 72 | + <span wx:if="{{is_retail_price}}" class="underline fs20">零售价¥{{item.market_price}}</span> | |
| 73 | 73 | </view> |
| 74 | 74 | |
| 75 | 75 | </view> |
| ... | ... | @@ -79,7 +79,7 @@ |
| 79 | 79 | <navigator class="huise"url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.id}}&prom_type=1" wx:if="{{item.status==3 && type==1}}">已抢光</navigator> --> |
| 80 | 80 | <navigator style="background-color: #059de5;" url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{type==0}}" >即将开始</navigator> |
| 81 | 81 | <navigator url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{item.status==1 && type==1}}">马上抢</navigator> |
| 82 | - <navigator class="huise"url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{item.status==3 && type==1}}">已抢光</navigator> | |
| 82 | + <navigator class="huise" url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{item.status==3 && type==1}}">已抢光</navigator> | |
| 83 | 83 | </view> |
| 84 | 84 | </view> |
| 85 | 85 | </view> | ... | ... |
pages/cart/cart/cart.js
pages/cart/cart2/cart2.js
| ... | ... | @@ -137,7 +137,11 @@ Page({ |
| 137 | 137 | dis_config:null, |
| 138 | 138 | bn_use_commission:0, //是不是使用佣金 |
| 139 | 139 | cart_use_commission:0, |
| 140 | - cart_commission:0 | |
| 140 | + cart_commission:0, | |
| 141 | + | |
| 142 | + //订单所有搭配购的 | |
| 143 | + all_collocation_list:[] | |
| 144 | + | |
| 141 | 145 | }, |
| 142 | 146 | onLoad: function (t) { |
| 143 | 147 | wx.setNavigationBarTitle({ title: "填写订单", }) |
| ... | ... | @@ -391,7 +395,11 @@ Page({ |
| 391 | 395 | //to.get_allsto(function (e) { |
| 392 | 396 | //th.setData({ allsto: e }); |
| 393 | 397 | //-------获取购物车已经选择的商品-------- |
| 398 | + if(!th.data.old_cartlist) | |
| 394 | 399 | th.get_cart(); |
| 400 | + else{ | |
| 401 | + th.calculatePrice(); | |
| 402 | + } | |
| 395 | 403 | //}) |
| 396 | 404 | } |
| 397 | 405 | }); |
| ... | ... | @@ -413,6 +421,72 @@ Page({ |
| 413 | 421 | |
| 414 | 422 | }, |
| 415 | 423 | |
| 424 | + //-- 获取搭配购商品 -- | |
| 425 | + async set_collection(gd,arr,index){ | |
| 426 | + var th=this; | |
| 427 | + var user_id=getApp().globalData.user_id; | |
| 428 | + var collocation_list=[]; | |
| 429 | + var pick=null; | |
| 430 | + var distr_t=0; | |
| 431 | + | |
| 432 | + //如果是购物车的时候, | |
| 433 | + if(arr) { | |
| 434 | + var idx = th.data.allsto.findIndex(function (e) { | |
| 435 | + return e.pickup_id == arr[index].pick_id | |
| 436 | + }) | |
| 437 | + pick = th.data.allsto[idx]; | |
| 438 | + var get_gd=null; | |
| 439 | + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + gd.goods_id,{ | |
| 440 | + | |
| 441 | + }).then(res1 => { | |
| 442 | + if(res1.data.code==0){ | |
| 443 | + get_gd=res1.data.data; | |
| 444 | + } | |
| 445 | + }) | |
| 446 | + distr_t=pick.distr_type || get_gd.distr_type; | |
| 447 | + | |
| 448 | + }else{ | |
| 449 | + var gg=to.get_b_now(); | |
| 450 | + //---获取门店--- | |
| 451 | + await getApp().request.promiseGet("/api/weshop/pickup/get/" + oo.stoid + "/" + gg.pick_id, {}) | |
| 452 | + .then(res => { | |
| 453 | + pick = res.data.data; | |
| 454 | + }); | |
| 455 | + distr_t=gd.distr_type || pick.distr_type; | |
| 456 | + } | |
| 457 | + | |
| 458 | + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" | |
| 459 | + + os.stoid + "/" + gd.goods_id + "/0/"+user_id, { | |
| 460 | + }).then(res => { | |
| 461 | + if(res.data.code==0 && res.data.data){ | |
| 462 | + var r_data = res.data.data; | |
| 463 | + if (r_data.collocationList) { | |
| 464 | + collocation_list=r_data.collocationList; | |
| 465 | + } | |
| 466 | + } | |
| 467 | + }) | |
| 468 | + | |
| 469 | + if(!collocation_list) return null; | |
| 470 | + | |
| 471 | + var new_arr=[]; | |
| 472 | + for (let i = 0; i <collocation_list.length; i++){ | |
| 473 | + var item0=collocation_list[i]; | |
| 474 | + //判断物流配送一样的 | |
| 475 | + if(item0.distr_type==0 || item0.distr_type==distr_t ){ | |
| 476 | + new_arr.push(item0); | |
| 477 | + } | |
| 478 | + } | |
| 479 | + | |
| 480 | + if(!new_arr.length) return null; | |
| 481 | + if(arr) { | |
| 482 | + arr[index].collocationList=new_arr; | |
| 483 | + | |
| 484 | + } | |
| 485 | + else th.setData({ | |
| 486 | + all_collocation_list:new_arr | |
| 487 | + }) | |
| 488 | + | |
| 489 | + }, | |
| 416 | 490 | |
| 417 | 491 | //-----真的获取购物车,入口-------- |
| 418 | 492 | get_cart: function () { |
| ... | ... | @@ -594,7 +668,11 @@ Page({ |
| 594 | 668 | }) |
| 595 | 669 | } |
| 596 | 670 | } |
| 671 | + //-- 判断一下,获取搭配购的消息 -- | |
| 672 | + if((item1.prom_type==0 || item1.prom_type==5) && (!carr[i].collocationList || !carr[i].collocationList.length)) { | |
| 597 | 673 | |
| 674 | + await th.set_collection(item1,carr,i); | |
| 675 | + } | |
| 598 | 676 | } |
| 599 | 677 | |
| 600 | 678 | //在分组的时候,就不要再调用接口,await |
| ... | ... | @@ -662,6 +740,17 @@ Page({ |
| 662 | 740 | if (car_item.cut_price1) arr[j].card_cut_price += car_item.cut_price1; |
| 663 | 741 | |
| 664 | 742 | arr[j].goods.push(car_item); |
| 743 | + if(car_item.collocationList){ | |
| 744 | + | |
| 745 | + if(!arr[j].collocationList) arr[j].collocationList=cart_item.collocationList; | |
| 746 | + else{ | |
| 747 | + var arr_new=[...arr[j].collocationList,...cart_item.collocationList]; | |
| 748 | + arr[j].collocationList=arr_new; | |
| 749 | + } | |
| 750 | + } | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 665 | 754 | find = 1; |
| 666 | 755 | break; |
| 667 | 756 | } |
| ... | ... | @@ -715,6 +804,7 @@ Page({ |
| 715 | 804 | } |
| 716 | 805 | } |
| 717 | 806 | |
| 807 | + | |
| 718 | 808 | var ie = { |
| 719 | 809 | pickup_id: pcid, |
| 720 | 810 | pname: pikname, |
| ... | ... | @@ -734,6 +824,13 @@ Page({ |
| 734 | 824 | |
| 735 | 825 | //-- 把等级卡会优惠多少钱装进去 -- |
| 736 | 826 | if (car_item.cut_price1) ie.card_cut_price += car_item.cut_price1; |
| 827 | + | |
| 828 | + if(car_item.collocationList) { | |
| 829 | + | |
| 830 | + ie.collocationList = car_item.collocationList; | |
| 831 | + } | |
| 832 | + | |
| 833 | + | |
| 737 | 834 | arr.push(ie); |
| 738 | 835 | } |
| 739 | 836 | } |
| ... | ... | @@ -927,7 +1024,6 @@ Page({ |
| 927 | 1024 | wx.navigateBack({delta: 1}) |
| 928 | 1025 | },1000) |
| 929 | 1026 | |
| 930 | - | |
| 931 | 1027 | return false |
| 932 | 1028 | } |
| 933 | 1029 | |
| ... | ... | @@ -972,6 +1068,8 @@ Page({ |
| 972 | 1068 | et = th.data.bn_exp_type; |
| 973 | 1069 | m_wind = th.data.index; |
| 974 | 1070 | } |
| 1071 | + th.data.m_wind = m_wind; | |
| 1072 | + | |
| 975 | 1073 | //---是不是购买等级卡成功的返回---等级卡显示的判断--- |
| 976 | 1074 | var is_card_back = getApp().globalData.is_card_back; |
| 977 | 1075 | if (is_card_back) { |
| ... | ... | @@ -990,9 +1088,16 @@ Page({ |
| 990 | 1088 | } |
| 991 | 1089 | } |
| 992 | 1090 | |
| 1091 | + //-- 判断是不是可以收藏 -- | |
| 1092 | + if(gd.prom_type ==5 && !th.data.all_collocation_list.length){ | |
| 1093 | + await th.set_collection(gd); | |
| 1094 | + } | |
| 1095 | + | |
| 1096 | + //-- 当是搭配购的时候 -- | |
| 993 | 1097 | gd.prom_type = gg.prom_type ? gg.prom_type : 0; |
| 994 | 1098 | gd.prom_id = gg.prom_id ? gg.prom_id : 0; |
| 995 | 1099 | |
| 1100 | + | |
| 996 | 1101 | if(gd.whsle_id>0){ |
| 997 | 1102 | gd.prom_type =gg.prom_type=0; |
| 998 | 1103 | gd.prom_id =gg.prom_id=0; |
| ... | ... | @@ -1051,6 +1156,7 @@ Page({ |
| 1051 | 1156 | |
| 1052 | 1157 | } |
| 1053 | 1158 | |
| 1159 | + | |
| 1054 | 1160 | //如果立即购买那边过来,就要读取接口,查看活动的优惠内容 |
| 1055 | 1161 | if (gg.prom_type == 3) { |
| 1056 | 1162 | t.data.data.prom_id = gg.prom_id; |
| ... | ... | @@ -1100,10 +1206,12 @@ Page({ |
| 1100 | 1206 | //计算价格 |
| 1101 | 1207 | th.calculatePrice2(); |
| 1102 | 1208 | //获取优惠券 |
| 1103 | - th.get_buy_now_quan(); | |
| 1209 | + th.get_buy_now_quan(); | |
| 1104 | 1210 | |
| 1105 | 1211 | }) |
| 1106 | 1212 | } else { |
| 1213 | + | |
| 1214 | + | |
| 1107 | 1215 | //--看是不是搭配促销-- |
| 1108 | 1216 | if (gg.prom_type == 5) { |
| 1109 | 1217 | t.data.data.prom_id = gg.prom_id; |
| ... | ... | @@ -1122,91 +1230,26 @@ Page({ |
| 1122 | 1230 | } |
| 1123 | 1231 | th.setData({ collocation_goods: gg.collocation_goods }); |
| 1124 | 1232 | |
| 1125 | - var cart_arr = new Array(); | |
| 1126 | - //var narr=gg.collocation_goods; | |
| 1127 | - //修改成深拷贝,确保返回是数据正确 | |
| 1128 | - var narr = JSON.parse(JSON.stringify(gg.collocation_goods)); | |
| 1129 | - | |
| 1130 | - narr.push(t.data.data); | |
| 1131 | - | |
| 1132 | - //-- 搭配促销的门店配送方式的修复 -- | |
| 1133 | - et = 1; | |
| 1134 | - distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流 | |
| 1135 | - for (var hi in narr) { | |
| 1136 | - var dis_t = narr[hi].distr_type; | |
| 1137 | - if (dis_t == 2) { | |
| 1138 | - th.setData({ is_all_zt: 0 }); | |
| 1139 | - et = 0; | |
| 1140 | - } | |
| 1141 | - if (dis_t > 0) { | |
| 1142 | - distr_t = dis_t; | |
| 1143 | - } | |
| 1144 | - | |
| 1145 | - //-- 如果有一件代发的商品或者不是同城配送的配送 -- | |
| 1146 | - if(narr[hi].is_same_city!=1 || narr[hi].whsle_id>0){ | |
| 1147 | - th.setData({show_same_city:0}) | |
| 1148 | - } | |
| 1233 | + if(th.data.all_collocation_list){ | |
| 1234 | + for(var i = 0; i<th.data.all_collocation_list.length; i++){ | |
| 1235 | + var item0=th.data.all_collocation_list[i]; | |
| 1236 | + var idx=gg.collocation_goods.findIndex(function(e){ | |
| 1237 | + return e.goods_id ==item0.goods_id && e.prom_id==item0.prom_id; | |
| 1238 | + }) | |
| 1239 | + if(idx!=-1){ | |
| 1240 | + var txt='all_collocation_list['+i+'].selected'; | |
| 1241 | + th.setData({[txt]:1}); | |
| 1242 | + } | |
| 1243 | + } | |
| 1149 | 1244 | |
| 1150 | 1245 | } |
| 1151 | - //自选的时候,系统配置了默认的配送方式是物流的时候 | |
| 1152 | - if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) { | |
| 1153 | - et = 0; | |
| 1154 | - } | |
| 1155 | - | |
| 1156 | - var ie = { | |
| 1157 | - pickup_id: gg.pick_id, | |
| 1158 | - pname: gg.pick_name, | |
| 1159 | - goods: narr, | |
| 1160 | - exp_type: et, | |
| 1161 | - wind: m_wind, | |
| 1162 | - distr_t: distr_t, | |
| 1163 | - bn_t_exp_t: distr_t, | |
| 1164 | - goods_price: 0, | |
| 1165 | - shipping_price: 0, | |
| 1166 | - user_money: 0, | |
| 1167 | - total_amount: 0, | |
| 1168 | - order_amount: 0, | |
| 1169 | - user_note: "" | |
| 1170 | - }; | |
| 1171 | - | |
| 1172 | - var cart_commission=0; | |
| 1173 | - //-- 循环计算一下线下取价 -- | |
| 1174 | - //计算佣金的商品 | |
| 1175 | - var commission_gds=[]; | |
| 1176 | - for (var c = 0; c < narr.length; c++) { | |
| 1177 | - | |
| 1178 | - var hr={ | |
| 1179 | - goods_id:item[c].goods_id, | |
| 1180 | - goods_num:item[c].goods_num, | |
| 1181 | - prom_type:0, | |
| 1182 | - prom_id:0, | |
| 1183 | - } | |
| 1184 | - commission_gds.push(hr); | |
| 1185 | - | |
| 1186 | - } | |
| 1187 | - //获取购物车的佣金,此处要优化调用接口,获取佣金 | |
| 1188 | - var req_d = { | |
| 1189 | - user_id:getApp().globalData.user_id,goods_ids:commission_gds,store_id: os.stoid | |
| 1190 | - } | |
| 1191 | - var back_data=null; | |
| 1192 | - await getApp().request.promisePost("/api/weshop/order/getrebateSum", { | |
| 1193 | - is_json: 1, data: req_d | |
| 1194 | - }).then(rs => { | |
| 1195 | - if (rs.data.code == 0) back_data =rs.data.data; | |
| 1196 | - }); | |
| 1197 | - | |
| 1198 | - if(back_data && parseFloat(back_data)) { | |
| 1199 | - ie.can_usecommise =parseFloat(back_data); | |
| 1200 | - cart_commission = ie.can_usecommise; | |
| 1201 | - } | |
| 1202 | - | |
| 1203 | - cart_arr.push(ie); | |
| 1204 | - if(cart_commission){ | |
| 1205 | - th.setData({cart_commission}); | |
| 1206 | - } | |
| 1207 | 1246 | |
| 1208 | 1247 | |
| 1209 | - th.data.old_cartlist = cart_arr; | |
| 1248 | + //var narr=gg.collocation_goods; | |
| 1249 | + //修改成深拷贝,确保返回是数据正确 | |
| 1250 | + var narr = JSON.parse(JSON.stringify(gg.collocation_goods)); | |
| 1251 | + narr.push(t.data.data); | |
| 1252 | + await th.get_collocation_list(narr); | |
| 1210 | 1253 | } |
| 1211 | 1254 | th.setData({ |
| 1212 | 1255 | bn_goods: gd, bn_pickname: gg.pick_name, index: m_wind, |
| ... | ... | @@ -1228,8 +1271,6 @@ Page({ |
| 1228 | 1271 | th.get_cart_quan(); |
| 1229 | 1272 | }); |
| 1230 | 1273 | |
| 1231 | - | |
| 1232 | - | |
| 1233 | 1274 | } else { |
| 1234 | 1275 | //计算价格 |
| 1235 | 1276 | th.calculatePrice2(); |
| ... | ... | @@ -1540,7 +1581,6 @@ Page({ |
| 1540 | 1581 | } |
| 1541 | 1582 | } |
| 1542 | 1583 | |
| 1543 | - | |
| 1544 | 1584 | o_price -= (item_map.price - item_map.prom_price); |
| 1545 | 1585 | //如果有限制使用优惠券,就要减掉参与的活动商品的钱 |
| 1546 | 1586 | if (!item_map.is_xz_yh) q_conditin = o_price; |
| ... | ... | @@ -1622,6 +1662,9 @@ Page({ |
| 1622 | 1662 | } |
| 1623 | 1663 | |
| 1624 | 1664 | }, |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1625 | 1668 | calclate_lbNum(r_data) { |
| 1626 | 1669 | let send_lb = this.data.send_lb; |
| 1627 | 1670 | //g_lb_num我的礼包 g_zxlb_num专享礼包 |
| ... | ... | @@ -3154,10 +3197,17 @@ Page({ |
| 3154 | 3197 | } |
| 3155 | 3198 | |
| 3156 | 3199 | //积分购,先要带is_integral_normal=1 |
| 3157 | - if (gg.is_integral_normal) goods.is_integral_normal = 1; | |
| 3200 | + if (gg.is_integral_normal){ | |
| 3201 | + goods.is_integral_normal = 1; item.is_normal=1; | |
| 3202 | + } | |
| 3158 | 3203 | |
| 3159 | 3204 | //先要带is_pd_normal=1 |
| 3160 | - if (gg.is_pd_normal) goods.is_pd_normal = 1; | |
| 3205 | + if (gg.is_pd_normal){ | |
| 3206 | + goods.is_pd_normal = 1; item.is_normal=1; | |
| 3207 | + } | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3161 | 3211 | |
| 3162 | 3212 | //如果不立即购买或者秒杀,如果是线下库存购买的时候 |
| 3163 | 3213 | if (goods.prom_type != 1 && goods.prom_type != 6 && goods.prom_type != 2 && th.data.sales_rules == 2 && !th.data.bn_goods.whsle_id) { |
| ... | ... | @@ -4307,6 +4357,13 @@ Page({ |
| 4307 | 4357 | ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif"; |
| 4308 | 4358 | this.setData(ob); |
| 4309 | 4359 | }, |
| 4360 | + cart_set_err1: function (e) { | |
| 4361 | + var txt = e.currentTarget.dataset.err; | |
| 4362 | + var ob = {}; | |
| 4363 | + ob[txt] = "/miniapp/images/default_g_img.gif"; | |
| 4364 | + this.setData(ob); | |
| 4365 | + }, | |
| 4366 | + | |
| 4310 | 4367 | //--验证是否已经冻结-- |
| 4311 | 4368 | check_is_frozenQuan: function (quanlist, frozenQuan, isby) { |
| 4312 | 4369 | console.log("券列表", quanlist); |
| ... | ... | @@ -5400,10 +5457,9 @@ Page({ |
| 5400 | 5457 | th.setData({ [txt9]: new_pk_list_goods, send_gf: this.data.send_gf }); |
| 5401 | 5458 | this.data.old_cartlist[index].goods = new_pk_list_goods; |
| 5402 | 5459 | |
| 5403 | - | |
| 5404 | 5460 | console.log(this.data.send_gf, "----"); |
| 5405 | - | |
| 5406 | 5461 | th.calculatePrice(); |
| 5462 | + | |
| 5407 | 5463 | } else { |
| 5408 | 5464 | var new_pk_list_goods = []; |
| 5409 | 5465 | //-- 当是立即购买的时候 -- |
| ... | ... | @@ -5552,6 +5608,208 @@ Page({ |
| 5552 | 5608 | } else { |
| 5553 | 5609 | func(); |
| 5554 | 5610 | } |
| 5611 | + }, | |
| 5612 | + | |
| 5613 | + //子组件返回的优化 | |
| 5614 | + select_coll(e){ | |
| 5615 | + console.log("--1111--aaa--"); | |
| 5616 | + console.log(e); | |
| 5617 | + //-- 如果是购物车的选择添加搭配商品 -- | |
| 5618 | + if(e.detail.is_cart==1){ | |
| 5619 | + this.select_coll_buy_cart(e.detail); | |
| 5620 | + }else{ | |
| 5621 | + this.select_coll_buy_now(e.detail); | |
| 5622 | + } | |
| 5623 | + }, | |
| 5624 | + | |
| 5625 | + //立即购买的时候,选中和不选中搭配商品 | |
| 5626 | + async select_coll_buy_now(e){ | |
| 5627 | + var th=this; | |
| 5628 | + //--按钮变灰色 -- | |
| 5629 | + th.setData({submit:1}); | |
| 5630 | + //如果是选中 | |
| 5631 | + if(e.selected){ | |
| 5632 | + var item=this.data.all_collocation_list[e.index]; | |
| 5633 | + item.goods_num=1; | |
| 5634 | + item.goods_price=item.price; | |
| 5635 | + item.is_collocation=1; | |
| 5636 | + item.prom_type=5; | |
| 5637 | + | |
| 5638 | + | |
| 5639 | + var coll_arr=[]; | |
| 5640 | + if(this.data.collocation_goods && this.data.collocation_goods.length){ | |
| 5641 | + coll_arr=this.data.collocation_goods; | |
| 5642 | + } | |
| 5643 | + coll_arr.push(item); | |
| 5644 | + this.setData({collocation_goods:coll_arr}); | |
| 5645 | + //让主商品的活动变成5,搭配购 | |
| 5646 | + this.setData({'bn_goods.prom_type':5, 'bn_goods.prom_id':coll_arr[0].prom_id }); | |
| 5647 | + | |
| 5648 | + var is_has_main=coll_arr.findIndex(function(e){ | |
| 5649 | + return e.goods_id==th.data.bn_goods.goods_id; | |
| 5650 | + }) | |
| 5651 | + | |
| 5652 | + //要进行深拷贝 | |
| 5653 | + var coll_arr_new=JSON.parse(JSON.stringify(coll_arr)); | |
| 5654 | + coll_arr_new.unshift(this.data.bn_goods); | |
| 5655 | + | |
| 5656 | + await th.get_collocation_list(coll_arr_new); | |
| 5657 | + //计算价格 | |
| 5658 | + th.calculatePrice2(); | |
| 5659 | + th.get_cart_quan(); | |
| 5660 | + | |
| 5661 | + }else{ | |
| 5662 | + var item=this.data.all_collocation_list[e.index]; | |
| 5663 | + var coll_arr=this.data.collocation_goods; | |
| 5664 | + var find=coll_arr.findIndex(function (e){ | |
| 5665 | + return e.goods_id==item.goods_id; | |
| 5666 | + }) | |
| 5667 | + coll_arr.splice(find,1); | |
| 5668 | + | |
| 5669 | + //当coll_arr的长度等于1的时候,说明没有选中搭配商品,只有主商品了 | |
| 5670 | + if(!coll_arr || coll_arr.length<1){ | |
| 5671 | + //让主商品的活动变成0,取消搭配购 | |
| 5672 | + this.setData({'bn_goods.prom_type':0, 'bn_goods.prom_id':0,collocation_goods:[] }); | |
| 5673 | + //计算价格 | |
| 5674 | + th.calculatePrice2(); | |
| 5675 | + //获取优惠券 | |
| 5676 | + th.get_buy_now_quan(); | |
| 5677 | + | |
| 5678 | + }else{ | |
| 5679 | + this.setData({collocation_goods:coll_arr}); | |
| 5680 | + //要进行深拷贝 | |
| 5681 | + var coll_arr_new=JSON.parse(JSON.stringify(coll_arr)); | |
| 5682 | + coll_arr_new.unshift(this.data.bn_goods); | |
| 5683 | + await th.get_collocation_list(coll_arr); | |
| 5684 | + //计算价格 | |
| 5685 | + th.calculatePrice2(); | |
| 5686 | + th.get_cart_quan(); | |
| 5687 | + } | |
| 5688 | + } | |
| 5689 | + }, | |
| 5690 | + //购物车购买的时候,选中和不选中搭配商品 | |
| 5691 | + async select_coll_buy_cart(e){ | |
| 5692 | + var th=this; | |
| 5693 | + var cart_index=e.cart_index; | |
| 5694 | + var index=e.index; | |
| 5695 | + | |
| 5696 | + var collocationList=this.data.cartlist[cart_index].collocationList; | |
| 5697 | + var item=collocationList[cart_index]; | |
| 5698 | + var goods=this.data.cartlist[cart_index].goods; | |
| 5699 | + var txt='cartlist['+cart_index+'].goods'; | |
| 5700 | + var txt2='cartlist['+cart_index+'].collocationList['+index+'].selected'; | |
| 5701 | + | |
| 5702 | + //-- 如果是选中 -- | |
| 5703 | + if(e.selected){ | |
| 5704 | + item.goods_num=1; | |
| 5705 | + item.goods_price=item.price; | |
| 5706 | + item.prom_type=5; | |
| 5707 | + item.is_collocation=1; | |
| 5708 | + | |
| 5709 | + goods.push(item); | |
| 5710 | + | |
| 5711 | + th.setData({[txt]:goods,[txt2]:1}); | |
| 5712 | + | |
| 5713 | + th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist)); | |
| 5714 | + th.calculatePrice(); | |
| 5715 | + //th.get_cart_quan(); | |
| 5716 | + | |
| 5717 | + }else{ | |
| 5718 | + var fd=goods.findIndex(function (e){ | |
| 5719 | + return e.goods_id ==item.goods_id && e.prom_type ==5; | |
| 5720 | + }) | |
| 5721 | + | |
| 5722 | + goods.splice(fd,1); | |
| 5723 | + th.setData({[txt]:goods,[txt2]:0}); | |
| 5724 | + th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist)); | |
| 5725 | + | |
| 5726 | + th.calculatePrice(); | |
| 5727 | + //th.get_cart_quan(); | |
| 5728 | + } | |
| 5729 | + }, | |
| 5730 | + | |
| 5731 | + //-- 搭配购的获取搭配商品的购物车计算价格的数组格式 -- | |
| 5732 | + async get_collocation_list(narr){ | |
| 5733 | + var gg = to.get_b_now(); | |
| 5734 | + var th=this; | |
| 5735 | + var cart_arr = new Array(); | |
| 5736 | + //-- 搭配促销的门店配送方式的修复 -- | |
| 5737 | + var et = 1; | |
| 5738 | + var distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流 | |
| 5739 | + for (var hi in narr) { | |
| 5740 | + var dis_t = narr[hi].distr_type; | |
| 5741 | + if (dis_t == 2) { | |
| 5742 | + th.setData({ is_all_zt: 0 }); | |
| 5743 | + et = 0; | |
| 5744 | + } | |
| 5745 | + if (dis_t > 0) { | |
| 5746 | + distr_t = dis_t; | |
| 5747 | + } | |
| 5748 | + | |
| 5749 | + //-- 如果有一件代发的商品或者不是同城配送的配送 -- | |
| 5750 | + if(narr[hi].is_same_city!=1 || narr[hi].whsle_id>0){ | |
| 5751 | + th.setData({show_same_city:0}) | |
| 5752 | + } | |
| 5753 | + } | |
| 5754 | + //自选的时候,系统配置了默认的配送方式是物流的时候 | |
| 5755 | + if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) { | |
| 5756 | + et = 0; th.setData({ is_all_zt: 0 }); | |
| 5757 | + } | |
| 5758 | + | |
| 5759 | + var m_wind=th.data.m_wind; | |
| 5760 | + var ie = { | |
| 5761 | + pickup_id: gg.pick_id, | |
| 5762 | + pname: gg.pick_name, | |
| 5763 | + goods: narr, | |
| 5764 | + exp_type: et, | |
| 5765 | + wind: m_wind, | |
| 5766 | + distr_t: distr_t, | |
| 5767 | + bn_t_exp_t: distr_t, | |
| 5768 | + goods_price: 0, | |
| 5769 | + shipping_price: 0, | |
| 5770 | + user_money: 0, | |
| 5771 | + total_amount: 0, | |
| 5772 | + order_amount: 0, | |
| 5773 | + user_note: "" | |
| 5774 | + }; | |
| 5775 | + | |
| 5776 | + var cart_commission=0; | |
| 5777 | + //-- 循环计算一下线下取价 -- | |
| 5778 | + //计算佣金的商品 | |
| 5779 | + var commission_gds=[]; | |
| 5780 | + for (var c = 0; c < narr.length; c++) { | |
| 5781 | + var hr={ | |
| 5782 | + goods_id:narr[c].goods_id, | |
| 5783 | + goods_num:narr[c].goods_num, | |
| 5784 | + prom_type:0, | |
| 5785 | + prom_id:0, | |
| 5786 | + } | |
| 5787 | + commission_gds.push(hr); | |
| 5788 | + | |
| 5789 | + } | |
| 5790 | + | |
| 5791 | + //获取购物车的佣金,此处要优化调用接口,获取佣金 | |
| 5792 | + var req_d = { | |
| 5793 | + user_id:getApp().globalData.user_id,goods_ids:commission_gds,store_id: os.stoid | |
| 5794 | + } | |
| 5795 | + var back_data=null; | |
| 5796 | + await getApp().request.promisePost("/api/weshop/order/getrebateSum", { | |
| 5797 | + is_json: 1, data: req_d | |
| 5798 | + }).then(rs => { | |
| 5799 | + if (rs.data.code == 0) back_data =rs.data.data; | |
| 5800 | + }); | |
| 5801 | + | |
| 5802 | + if(back_data && parseFloat(back_data)) { | |
| 5803 | + ie.can_usecommise =parseFloat(back_data); | |
| 5804 | + cart_commission = ie.can_usecommise; | |
| 5805 | + } | |
| 5806 | + | |
| 5807 | + cart_arr.push(ie); | |
| 5808 | + if(cart_commission){ | |
| 5809 | + th.setData({cart_commission}); | |
| 5810 | + } | |
| 5811 | + | |
| 5812 | + th.data.old_cartlist = cart_arr; | |
| 5555 | 5813 | } |
| 5556 | 5814 | |
| 5557 | 5815 | ... | ... |
pages/cart/cart2/cart2.json
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | "navigationBarTitleText": "填写订单", |
| 3 | 3 | "enablePullDownRefresh": false, |
| 4 | 4 | "usingComponents": { |
| 5 | - "warn": "/components/long_warn/long_warn" | |
| 5 | + "warn": "/components/long_warn/long_warn", | |
| 6 | + "cart_collect_temp": "/components/cart_collect_temp/cart_collect_temp" | |
| 6 | 7 | } |
| 7 | 8 | } |
| 8 | 9 | \ No newline at end of file | ... | ... |
pages/cart/cart2/cart2.wxml
| ... | ... | @@ -108,6 +108,11 @@ |
| 108 | 108 | </navigator> |
| 109 | 109 | </view> |
| 110 | 110 | |
| 111 | + <!-- 使用搭配 --> | |
| 112 | + <cart_collect_temp bind:childFun="select_coll" | |
| 113 | + is_cart="1" cart_index="{{index}}" | |
| 114 | + all_collocation_list="{{item.collocationList}}" /> | |
| 115 | + | |
| 111 | 116 | <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> |
| 112 | 117 | <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}"> |
| 113 | 118 | <view class="flex"> |
| ... | ... | @@ -127,10 +132,6 @@ |
| 127 | 132 | <view bindtap="buycard" class="card_op">立即开通</view> |
| 128 | 133 | </view> |
| 129 | 134 | |
| 130 | - | |
| 131 | - | |
| 132 | - | |
| 133 | - | |
| 134 | 135 | <view class="set-mes bdr_b-14"> |
| 135 | 136 | <view wx:if="{{order.store_prom}}"> |
| 136 | 137 | <icon color="#f23030" size="16" type="info"></icon> |
| ... | ... | @@ -217,7 +218,6 @@ |
| 217 | 218 | </view> |
| 218 | 219 | </block> |
| 219 | 220 | </view> |
| 220 | - | |
| 221 | 221 | <!-- 赠品的显示 --> |
| 222 | 222 | <view wx:if="{{send_gf[item.pickup_id]}}"> |
| 223 | 223 | <block wx:for="{{send_gf[item.pickup_id]}}" wx:for-item="iter"> |
| ... | ... | @@ -252,6 +252,7 @@ |
| 252 | 252 | </view> |
| 253 | 253 | |
| 254 | 254 | |
| 255 | + | |
| 255 | 256 | <!-- 留言 --> |
| 256 | 257 | <view class="coupon-mes flex-vertical"> |
| 257 | 258 | <view>留言</view> |
| ... | ... | @@ -332,7 +333,7 @@ |
| 332 | 333 | <view class="goods-img" style="position: relative"> |
| 333 | 334 | <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> |
| 334 | 335 | |
| 335 | - <image class="wh100 bdr14" src="{{item.original_img}}" binderror='cart_set_err' data-err="item.original_img"></image> | |
| 336 | + <image class="wh100 bdr14" src="{{item.original_img}}" binderror='cart_set_err' data-err="buy_now_gift_goods[{{index}}].original_img"></image> | |
| 336 | 337 | </view> |
| 337 | 338 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> |
| 338 | 339 | <view class="goods-name ellipsis-2">{{item.goods_name}}</view> |
| ... | ... | @@ -356,7 +357,7 @@ |
| 356 | 357 | <!-- 搭配购买的功能实现 --> |
| 357 | 358 | <view class="order-detail" wx:for="{{collocation_goods}}"> |
| 358 | 359 | <view class="goods-img"> |
| 359 | - <image class="wh100 bdr14" src="{{imgUrl+item.original_img}}" binderror='err_img_collocation' data-err="item.original_img"></image> | |
| 360 | + <image class="wh100 bdr14" src="{{imgUrl+item.original_img}}" binderror='cart_set_err1' data-err="collocation_goods[{{index}}].original_img"></image> | |
| 360 | 361 | </view> |
| 361 | 362 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> |
| 362 | 363 | <view class="goods-name ellipsis-2">{{item.goods_name}}</view> |
| ... | ... | @@ -375,6 +376,10 @@ |
| 375 | 376 | </view> |
| 376 | 377 | </block> |
| 377 | 378 | |
| 379 | + <!-- 使用搭配 --> | |
| 380 | + <cart_collect_temp bind:childFun="select_coll" all_collocation_list="{{all_collocation_list}}" /> | |
| 381 | + | |
| 382 | + | |
| 378 | 383 | <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> |
| 379 | 384 | <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> |
| 380 | 385 | <view class="flex"> |
| ... | ... | @@ -441,8 +446,6 @@ |
| 441 | 446 | </view> |
| 442 | 447 | |
| 443 | 448 | |
| 444 | - | |
| 445 | - | |
| 446 | 449 | <view class="set-mes bdr_b-14"> |
| 447 | 450 | |
| 448 | 451 | <view wx:if="{{order.store_prom}}"> |
| ... | ... | @@ -478,8 +481,6 @@ |
| 478 | 481 | </view> |
| 479 | 482 | </view> |
| 480 | 483 | |
| 481 | - | |
| 482 | - | |
| 483 | 484 | <!-- 留言 --> |
| 484 | 485 | <view class="coupon-mes flex-vertical"> |
| 485 | 486 | <view>留言</view> | ... | ... |
pages/distribution/distribution.wxml
| ... | ... | @@ -95,7 +95,7 @@ |
| 95 | 95 | <view class="left f1"> |
| 96 | 96 | <view class="icon-container"><text class="iconfont icon-huiyuan1"></text></view> |
| 97 | 97 | <view>仅限PLUS卡({{item.conditonRemark}})的会员, |
| 98 | - <text wx:if="{{item.pass}}" class="c-red" bindtap="goto" data-url="/pages/user/cardinfo/cardinfo">PLUS详情</text> | |
| 98 | + <text wx:if="{{item.pass}}" class="c-red" bindtap="goto" data-url="/packageE/pages/user/cardinfo/cardinfo">PLUS详情</text> | |
| 99 | 99 | <text wx:else class="c-red" bindtap="goto" data-url="/pages/user/plus/plus">立即升级</text> |
| 100 | 100 | </view> |
| 101 | 101 | </view> | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.wxml
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <!--<block wx:for="{{wareCard}}" wx:if="{{now > filter.gettimestamp(items.starTime) || (items.is_show && now > items.show_time)}}" wx:for-item="items" wx:for-index="index" wx:key="index">--> |
| 25 | 25 | <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index"> |
| 26 | 26 | <view class="content_box"> |
| 27 | - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''"> | |
| 27 | + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&cover_img={{items.cover_img}}&orderSn=''"> | |
| 28 | 28 | <view class="content_box_img"> |
| 29 | 29 | <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}" data-errorimg="wareCard[{{index}}].cover_img"></image> |
| 30 | 30 | <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else data-errorimg="wareCard[{{index}}].lbUrl"></image> | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
| ... | ... | @@ -71,6 +71,7 @@ Page({ |
| 71 | 71 | |
| 72 | 72 | sto_sele_name_1: '', |
| 73 | 73 | share_goods_img:'', //礼包的分享图 |
| 74 | + giftImageCover:null, | |
| 74 | 75 | canvasHidden:true, |
| 75 | 76 | |
| 76 | 77 | screenWidth: 0 |
| ... | ... | @@ -91,7 +92,8 @@ Page({ |
| 91 | 92 | var json_d = JSON.parse(e.switch_list); |
| 92 | 93 | th.setData({ |
| 93 | 94 | bconfig: e, |
| 94 | - sys_switch: json_d | |
| 95 | + sys_switch: json_d, | |
| 96 | + is_retail_price: json_d.is_retail_price || 0 | |
| 95 | 97 | }); |
| 96 | 98 | }) |
| 97 | 99 | |
| ... | ... | @@ -251,8 +253,11 @@ Page({ |
| 251 | 253 | }, |
| 252 | 254 | success: function (res) { |
| 253 | 255 | if (res.data.code == 0) { |
| 256 | + console.log('商品------++') | |
| 257 | + console.log(res) | |
| 254 | 258 | th.setData({ |
| 255 | - giftImage: th.data.iurl + res.data.data.lbUrl, | |
| 259 | + giftImage: th.data.iurl + res.data.data.lbUrl, | |
| 260 | + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), | |
| 256 | 261 | giftTitle: res.data.data.giftTitle, |
| 257 | 262 | default_color: res.data.data.bgcolor |
| 258 | 263 | }) |
| ... | ... | @@ -346,7 +351,8 @@ Page({ |
| 346 | 351 | success: function success(res) { |
| 347 | 352 | if (res.data.code == 0) { |
| 348 | 353 | _this2.setData({ |
| 349 | - giftImage: th.iurl + res.data.data.lbUrl, | |
| 354 | + giftImage: th.iurl + res.data.data.lbUrl, | |
| 355 | + giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl), | |
| 350 | 356 | giftTitle: res.data.data.giftTitle, |
| 351 | 357 | default_color: res.data.data.bgcolor |
| 352 | 358 | }) |
| ... | ... | @@ -419,6 +425,7 @@ Page({ |
| 419 | 425 | if (res.data.code == 0) { |
| 420 | 426 | th.setData({ |
| 421 | 427 | giftImage: th.data.iurl + res.data.data.lbUrl, |
| 428 | + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl), | |
| 422 | 429 | giftTitle: res.data.data.lbTitle, |
| 423 | 430 | default_color: res.data.data.bgcolor |
| 424 | 431 | }) |
| ... | ... | @@ -964,6 +971,7 @@ Page({ |
| 964 | 971 | th.get_goods_temp(function () { |
| 965 | 972 | var vpath = res.path; |
| 966 | 973 | var context = wx.createCanvasContext('share'); |
| 974 | + // let share_goods_img = th.params.cover_img | |
| 967 | 975 | th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0); |
| 968 | 976 | |
| 969 | 977 | //把画板内容绘制成图片,并回调 画板图片路径 |
| ... | ... | @@ -1116,7 +1124,7 @@ Page({ |
| 1116 | 1124 | tt(); |
| 1117 | 1125 | return false; |
| 1118 | 1126 | } |
| 1119 | - var img_url = ee.data.giftImage; | |
| 1127 | + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage; | |
| 1120 | 1128 | //获取商品是分享图信息 |
| 1121 | 1129 | wx.getImageInfo({ |
| 1122 | 1130 | src: img_url, | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.wxml
| ... | ... | @@ -64,7 +64,7 @@ |
| 64 | 64 | </view> |
| 65 | 65 | <view class="top_foot data-v-3a5b7e36"> |
| 66 | 66 | <view class="top_foot_price data-v-3a5b7e36"> |
| 67 | - <text class="data-v-3a5b7e36">{{giftPosPrice+"元"}}</text> | |
| 67 | + <text class="data-v-3a5b7e36"> {{is_retail_price?'零售价:':''}}{{giftPosPrice+"元"}}</text> | |
| 68 | 68 | </view> |
| 69 | 69 | <view class="top_foot_qty data-v-3a5b7e36"> |
| 70 | 70 | <text class="data-v-3a5b7e36" wx:if="{{!flag}}">{{"已售:"+giftQty+"件"}}</text> | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.wxml
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | </view> |
| 24 | 24 | <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| 25 | 25 | <view class="content_box"> |
| 26 | - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> | |
| 26 | + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
| 27 | 27 | <view class="content_box_img"> |
| 28 | 28 | <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> --> |
| 29 | 29 | <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image> |
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | |
| 94 | 94 | </view> |
| 95 | 95 | </view> |
| 96 | - <view class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}"> | |
| 96 | + <view class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}"> | |
| 97 | 97 | <button>立即使用</button> |
| 98 | 98 | </view> |
| 99 | 99 | </view> | ... | ... |
pages/goods/categoryList/categoryList.js
| ... | ... | @@ -75,6 +75,8 @@ Page({ |
| 75 | 75 | load: 0, |
| 76 | 76 | xmlist: null, |
| 77 | 77 | |
| 78 | + is_retail_price:0 //是否显示零售价 | |
| 79 | + | |
| 78 | 80 | |
| 79 | 81 | }, |
| 80 | 82 | |
| ... | ... | @@ -166,32 +168,11 @@ Page({ |
| 166 | 168 | //计算等级价相关 |
| 167 | 169 | var swithc_list = rs.switch_list; |
| 168 | 170 | var sw_arr = JSON.parse(swithc_list); |
| 169 | - //---如果后台又开等级卡的开关--- | |
| 170 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 171 | - th.setData({ rank_switch: true }); | |
| 172 | - var user = getApp().globalData.userInfo; | |
| 173 | - var ti = setInterval(function () { | |
| 174 | - if (!user) return false; | |
| 175 | - clearInterval(ti); | |
| 176 | - //---回调卡的列表--- | |
| 177 | - th.getPlusCardType(function (ob) { | |
| 178 | - th.setData({ card_list: ob.card_list }); | |
| 179 | - if (user.card_field && user['card_expiredate']) { | |
| 180 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 181 | - var end = new Date(str); | |
| 182 | - end = Date.parse(end) / 1000; | |
| 183 | - var now = ut.gettimestamp(); | |
| 184 | - | |
| 185 | - //--- 判断是等级会员,且在有效期范围内 --- | |
| 186 | - if (user.card_field && now < end) { | |
| 187 | - var card_name = ob.name_map.get(user.card_field); | |
| 188 | - //if (card_name.length > 4) card_name = card_name.substring(0, 4); | |
| 189 | - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | |
| 190 | - } | |
| 191 | - } | |
| 192 | - }) | |
| 193 | - }, 500) | |
| 171 | + | |
| 172 | + if(sw_arr.is_retail_price){ | |
| 173 | + th.setData({is_retail_price:1}); | |
| 194 | 174 | } |
| 175 | + | |
| 195 | 176 | }); |
| 196 | 177 | }, |
| 197 | 178 | onShow: function () { |
| ... | ... | @@ -221,6 +202,11 @@ Page({ |
| 221 | 202 | var data = e; |
| 222 | 203 | var switch_list_data = data.switch_list; |
| 223 | 204 | var switch_list = JSON.parse(switch_list_data); |
| 205 | + | |
| 206 | + //---如果后台又开等级卡的开关--- | |
| 207 | + ut.get_plus_name_price(switch_list,that); | |
| 208 | + | |
| 209 | + | |
| 224 | 210 | var is_newsgoodstype = switch_list.is_newsgoodstype; |
| 225 | 211 | if (is_newsgoodstype == undefined) { |
| 226 | 212 | is_newsgoodstype = 0; | ... | ... |
pages/goods/categoryList/categoryList.wxml
| ... | ... | @@ -584,7 +584,8 @@ |
| 584 | 584 | <view class="item-cont"> |
| 585 | 585 | <view class="title">{{item.goods_name}}</view> |
| 586 | 586 | <!-- 判断是否有活动价 --> |
| 587 | - <block wx:if="{{item.prom_price>0 || item.prom_integral}}"> | |
| 587 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}"> | |
| 588 | + | |
| 588 | 589 | <view class="flex ai-center"> |
| 589 | 590 | <!-- 活动价 --> |
| 590 | 591 | <view class="price"> |
| ... | ... | @@ -592,7 +593,7 @@ |
| 592 | 593 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 593 | 594 | <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> |
| 594 | 595 | </view> |
| 595 | - <!-- <view class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>--> | |
| 596 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view> | |
| 596 | 597 | </view> |
| 597 | 598 | |
| 598 | 599 | <view class="comment"> |
| ... | ... | @@ -605,12 +606,14 @@ |
| 605 | 606 | </block> |
| 606 | 607 | <block wx:else> |
| 607 | 608 | |
| 609 | + | |
| 608 | 610 | <!-- 商品价格,先判断下是后又等级价--> |
| 609 | 611 | <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> |
| 610 | 612 | |
| 611 | 613 | |
| 612 | 614 | <!-- 当会员是等级卡的时候 --> |
| 613 | 615 | <block wx:if="{{card_field}}"> |
| 616 | + | |
| 614 | 617 | <!-- 等级价>0 --> |
| 615 | 618 | <block wx:if="{{item[card_field]>0}}"> |
| 616 | 619 | <view class="flex ai_and"> |
| ... | ... | @@ -621,7 +624,7 @@ |
| 621 | 624 | </view> |
| 622 | 625 | </view> |
| 623 | 626 | <view class="comment flex jc_sb"> |
| 624 | - <!-- <view class="word-line xc-ash rmb fs24">{{item.market_price}}</view>--> | |
| 627 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24">{{item.market_price}}</view> | |
| 625 | 628 | <view class="fs22 pdt10 t-r"> |
| 626 | 629 | <span>评论{{item.comment_count}}</span> |
| 627 | 630 | <span class="pdl30">已售{{item.sales_sum}}</span> |
| ... | ... | @@ -631,7 +634,7 @@ |
| 631 | 634 | <block wx:else> |
| 632 | 635 | <view class="flex ai-center"> |
| 633 | 636 | <view class="price rmb">{{item.shop_price}}</view> |
| 634 | - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | |
| 637 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | |
| 635 | 638 | </view> |
| 636 | 639 | |
| 637 | 640 | <view class="comment"> |
| ... | ... | @@ -647,7 +650,7 @@ |
| 647 | 650 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
| 648 | 651 | <view class="flex ai-center"> |
| 649 | 652 | <view class="price rmb">{{item.shop_price}}</view> |
| 650 | - <!-- <view class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>--> | |
| 653 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view> | |
| 651 | 654 | </view> |
| 652 | 655 | <view class="comment"> |
| 653 | 656 | <view class="flex ai-center"> |
| ... | ... | @@ -668,8 +671,8 @@ |
| 668 | 671 | </block> |
| 669 | 672 | <block wx:else> |
| 670 | 673 | <view class="flex ai-center"> |
| 671 | - <view class="price rmb">{{item.shop_price}}</view> | |
| 672 | - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | |
| 674 | + <view class="price rmb">{{item.shop_price}}</view> | |
| 675 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | |
| 673 | 676 | </view> |
| 674 | 677 | <!-- <view class="price">¥{{item.shop_price}}</view> --> |
| 675 | 678 | <view class="comment"> |
| ... | ... | @@ -683,9 +686,10 @@ |
| 683 | 686 | </block> |
| 684 | 687 | </block> |
| 685 | 688 | <block wx:else> |
| 689 | + | |
| 686 | 690 | <view class="flex ai-center"> |
| 687 | 691 | <view class="price rmb">{{item.shop_price}}</view> |
| 688 | - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | |
| 692 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | |
| 689 | 693 | </view> |
| 690 | 694 | <!-- <view class="price">¥{{item.shop_price}}</view> --> |
| 691 | 695 | <view class="comment"> | ... | ... |
pages/goods/com_screen.js
0 → 100644
| 1 | +const ut = require("../../utils/util.js"); | |
| 2 | +var regeneratorRuntime = require('../../utils/runtime.js'); | |
| 3 | +var oo = getApp().globalData.setting; | |
| 4 | +module.exports = { | |
| 5 | + //下拉排序 | |
| 6 | + bind_pk_sort:function (e,th){ | |
| 7 | + var index=e.detail.value; | |
| 8 | + var ob=th.data.more_sort_arr[index]; | |
| 9 | + | |
| 10 | + var url = th.data.requestUrl; | |
| 11 | + if (th.data.tabname!=ob.value){ | |
| 12 | + | |
| 13 | + var txt='desc'; | |
| 14 | + if(ob.value=='sort') txt='asc' | |
| 15 | + th.setData({ tabname: ob.value, adname:txt }); | |
| 16 | + } | |
| 17 | + th.resetData(); | |
| 18 | + | |
| 19 | + //开始点击分类 | |
| 20 | + if(th.requestGoodsList) { | |
| 21 | + //-- 开始点击分类 -- | |
| 22 | + th.requestGoodsList(url); | |
| 23 | + }else if(th.requestSearch){ | |
| 24 | + //-- 重新开始搜索 -- | |
| 25 | + th.requestSearch(url); | |
| 26 | + } | |
| 27 | + | |
| 28 | + }, | |
| 29 | + | |
| 30 | + //-- 获取列表 -- | |
| 31 | + set_screen:async function (url,th){ | |
| 32 | + if(!url) url=th.data.requestUrl; | |
| 33 | + | |
| 34 | + var arr=url.split('1=1&'); | |
| 35 | + url='/api/weshop/goods/goodsBrandGroup?'+arr[1]; | |
| 36 | + | |
| 37 | + var screen_brand=null; | |
| 38 | + var screen_nation=null; | |
| 39 | + var screen_price=null; | |
| 40 | + var screen_cate=null; | |
| 41 | + //如果有分类的话 | |
| 42 | + if( th.data.cat_id && !th.data.screen_cate){ | |
| 43 | + var c_url="/api/weshop/goodscategory/get/"+oo.stoid+"/"+ th.data.cat_id; | |
| 44 | + var f_cate=null; | |
| 45 | + await getApp().request.promiseGet(c_url,{ | |
| 46 | + }).then(res=>{ | |
| 47 | + if(res.data.code==0 && res.data.data){ | |
| 48 | + f_cate=res.data.data; | |
| 49 | + } | |
| 50 | + }) | |
| 51 | + | |
| 52 | + //分类必须有parent_id_path值 | |
| 53 | + if(f_cate && f_cate['parent_id_path']){ | |
| 54 | + var new_arr=f_cate['parent_id_path'].split('_'); | |
| 55 | + c_url='/api/weshop/goodscategory/page?store_id='+oo.stoid+'&parent_id_path='+(new_arr[0]+"_"+new_arr['1']); | |
| 56 | + await getApp().request.promiseGet(c_url,{ | |
| 57 | + data:{level:2,pageSize:1000} | |
| 58 | + }).then(res=>{ | |
| 59 | + if(ut.ajax_ok(res) ){ | |
| 60 | + screen_cate=res.data.data.pageData.filter(function(e){ | |
| 61 | + return e.name | |
| 62 | + }); | |
| 63 | + } | |
| 64 | + }) | |
| 65 | + } | |
| 66 | + | |
| 67 | + } | |
| 68 | + | |
| 69 | + | |
| 70 | + if(url.indexOf('brand_id')==-1) { | |
| 71 | + var url1 = url + "&grouptype=1"; | |
| 72 | + await getApp().request.promiseGet(url1, { | |
| 73 | + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid} | |
| 74 | + }).then(res => { | |
| 75 | + if (res.data.code == 0 && res.data.data && res.data.data.length) { | |
| 76 | + screen_brand = res.data.data.filter(function(e){ | |
| 77 | + return e.name | |
| 78 | + }); | |
| 79 | + } | |
| 80 | + }) | |
| 81 | + } | |
| 82 | + | |
| 83 | + if(url.indexOf('nation_id')==-1) { | |
| 84 | + url1 = url + "&grouptype=2"; | |
| 85 | + await getApp().request.promiseGet(url1, { | |
| 86 | + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid} | |
| 87 | + }).then(res => { | |
| 88 | + if (res.data.code == 0 && res.data.data && res.data.data.length) { | |
| 89 | + screen_nation = res.data.data.filter(function(e){ | |
| 90 | + return e.name; | |
| 91 | + }); | |
| 92 | + } | |
| 93 | + }) | |
| 94 | + } | |
| 95 | + | |
| 96 | + | |
| 97 | + if(url.indexOf('startprice')==-1) { | |
| 98 | + url1 = url + "&grouptype=3"; | |
| 99 | + await getApp().request.promiseGet(url1, { | |
| 100 | + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid} | |
| 101 | + }).then(res => { | |
| 102 | + if (res.data.code == 0 && res.data.data && res.data.data.length) { | |
| 103 | + var price = res.data.data; | |
| 104 | + var max_price = price[0].final_price; | |
| 105 | + var psize = Math.ceil(max_price / 5); // 每一段累积的价钱 | |
| 106 | + var parr = []; | |
| 107 | + for (var i = 0; i < 5; i++) { | |
| 108 | + var start = i * psize; | |
| 109 | + var end = start + psize; | |
| 110 | + // 如果没有这个价格范围的商品则不列出来 | |
| 111 | + var ii = false; | |
| 112 | + for (var v in price) { | |
| 113 | + var item_p = price[v]; | |
| 114 | + if (item_p.final_price > start && item_p.final_price <= end) { | |
| 115 | + ii = true; | |
| 116 | + } | |
| 117 | + } | |
| 118 | + if (ii == false) continue; | |
| 119 | + var obj = {}; | |
| 120 | + obj['price'] = start + "-" + end; | |
| 121 | + if (i == 0) obj['name'] = end + "元以下"; | |
| 122 | + else if (i == 4) obj['name'] = start + "元以上"; | |
| 123 | + else obj['name'] = start + "-" + end + '元'; | |
| 124 | + parr.push(obj) | |
| 125 | + } | |
| 126 | + screen_price = parr; | |
| 127 | + } | |
| 128 | + }) | |
| 129 | + } | |
| 130 | + | |
| 131 | + th.setData({screen_brand,screen_nation,screen_price,screen_cate}) | |
| 132 | + | |
| 133 | + }, | |
| 134 | + | |
| 135 | + | |
| 136 | + filterGoods:function (e,th){ | |
| 137 | + | |
| 138 | + var index=e.currentTarget.dataset.index; | |
| 139 | + var type=e.currentTarget.dataset.type; | |
| 140 | + var url=th.data.requestUrl; | |
| 141 | + | |
| 142 | + switch (type){ | |
| 143 | + case "1"://分类 | |
| 144 | + var item=th.data.screen_cate[index]; | |
| 145 | + if( th.data.cat_id){ | |
| 146 | + var arr_m=url.split("1=1&"); | |
| 147 | + var arr_m2=arr_m[1].split('&'); | |
| 148 | + var url=""; | |
| 149 | + for(var jj in arr_m2){ | |
| 150 | + if(arr_m2[jj].indexOf('cat_id')>=-1){ | |
| 151 | + url+="&cat_id="+item.id; | |
| 152 | + }else if(arr_m2[jj].indexOf('pid')>=-1){ | |
| 153 | + url+="&pid="+item.parent_id; | |
| 154 | + }else{ | |
| 155 | + url+="&"+arr_m2[jj]; | |
| 156 | + } | |
| 157 | + } | |
| 158 | + }else { | |
| 159 | + url+="&cat_id="+item.id+"&pid="+item.parent_id; | |
| 160 | + } | |
| 161 | + url=arr_m[0]+"1=1&"+url; | |
| 162 | + break; | |
| 163 | + case "2"://国别 | |
| 164 | + var item=th.data.screen_nation[index]; | |
| 165 | + url+="&nation_id="+item.nation_id; | |
| 166 | + break; | |
| 167 | + case "3"://品牌 | |
| 168 | + var item=th.data.screen_brand[index]; | |
| 169 | + url+="&brand_id="+item.brand_id; | |
| 170 | + break; | |
| 171 | + case "4"://价格 | |
| 172 | + var item=th.data.screen_price[index]; | |
| 173 | + var p_arr=item.price.split('-'); | |
| 174 | + url+="&startprice="+p_arr[0]+"&endprice="+p_arr[1]; | |
| 175 | + break; | |
| 176 | + } | |
| 177 | + | |
| 178 | + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0, | |
| 179 | + screen_price:null,screen_cate:null,requestData:null}) | |
| 180 | + th.data.currentPage=1; | |
| 181 | + //进行筛选 | |
| 182 | + this.set_screen(url,th); | |
| 183 | + | |
| 184 | + th.setData({ | |
| 185 | + tabname:"sort", //排序的字段 | |
| 186 | + adname:"asc", //升降的字段 | |
| 187 | + }) | |
| 188 | + | |
| 189 | + //开始点击分类 | |
| 190 | + if(th.requestGoodsList) { | |
| 191 | + //-- 开始点击分类 -- | |
| 192 | + th.requestGoodsList(url); | |
| 193 | + }else if(th.requestSearch){ | |
| 194 | + //-- 重新开始搜索 -- | |
| 195 | + th.requestSearch(url); | |
| 196 | + } | |
| 197 | + }, | |
| 198 | + | |
| 199 | + //-- 展开和收起的控制 -- | |
| 200 | + open_more:function(e,th){ | |
| 201 | + var type=e.currentTarget.dataset.type; | |
| 202 | + switch(type){ | |
| 203 | + case "1": | |
| 204 | + if(th.data.fil_cate_state==0 || th.data.fil_cate_state==2) th.setData({fil_cate_state:1}) | |
| 205 | + else th.setData({fil_cate_state:2}) | |
| 206 | + break; | |
| 207 | + case "2": | |
| 208 | + if(th.data.fil_nation_state==0 || th.data.fil_nation_state==2) th.setData({fil_nation_state:1}) | |
| 209 | + else th.setData({fil_nation_state:2}) | |
| 210 | + break; | |
| 211 | + case "3": | |
| 212 | + if(th.data.fil_brand_state==0 || th.data.fil_brand_state==2) th.setData({fil_brand_state:1}) | |
| 213 | + else th.setData({fil_brand_state:2}) | |
| 214 | + break; | |
| 215 | + case "4": | |
| 216 | + if(th.data.fil_price_state==0 || th.data.fil_price_state==2) th.setData({fil_price_state:1}) | |
| 217 | + else th.setData({fil_price_state:2}) | |
| 218 | + break; | |
| 219 | + | |
| 220 | + } | |
| 221 | + }, | |
| 222 | + | |
| 223 | + clear_fil(th){ | |
| 224 | + var url=th.data.old_req_url; | |
| 225 | + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0, | |
| 226 | + screen_price:null,screen_cate:null,requestData:null}) | |
| 227 | + th.data.currentPage=1; | |
| 228 | + | |
| 229 | + //进行筛选 | |
| 230 | + this.set_screen(url,th); | |
| 231 | + if(th.requestGoodsList) { | |
| 232 | + //-- 开始点击分类 -- | |
| 233 | + th.requestGoodsList(url); | |
| 234 | + }else if(th.requestSearch){ | |
| 235 | + //-- 重新开始搜索 -- | |
| 236 | + th.requestSearch(url); | |
| 237 | + } | |
| 238 | + } | |
| 239 | + | |
| 240 | + | |
| 241 | +} | |
| 0 | 242 | \ No newline at end of file | ... | ... |
pages/goods/com_screen.wxml
0 → 100644
| 1 | +<!-- 点击筛选的优化 --> | |
| 2 | +<view hidden="{{!openFilterModal}}"> | |
| 3 | + <view bindtap="closeFilterModal" class="cover-layer" style="z-index:1000"></view> | |
| 4 | + <view class="filter-modal"> | |
| 5 | + <!-- 顶部标题 --> | |
| 6 | + <view class="flex jc-center ai_c t-c" style="height:80rpx"> | |
| 7 | + 筛选 | |
| 8 | + <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 9 | + </view> | |
| 10 | + <view class="filter-box" wx:if="{{screen_cate && screen_cate.length > 0}}"> | |
| 11 | + <view class="f_cate_item fs28"> | |
| 12 | + <text>分类</text> | |
| 13 | + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="1"> | |
| 14 | + <block wx:if="{{fil_cate_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 15 | + <block wx:if="{{fil_cate_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block> | |
| 16 | + <block wx:if="{{fil_cate_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 17 | + </view> | |
| 18 | + </view> | |
| 19 | + <view class="filter-items fs26 {{fil_cate_state==0?'normal_to':(fil_cate_state==2?'back_to':'') }} " style="padding:0 20rpx"> | |
| 20 | + <block wx:for="{{screen_cate}}"> | |
| 21 | + <view bindtap="filterGoods" data-type="1" data-index="{{index}}" class="f_cate_item">{{item.name}} | |
| 22 | + </view> | |
| 23 | + </block> | |
| 24 | + </view> | |
| 25 | + </view> | |
| 26 | + | |
| 27 | + <view class="filter-box" wx:if="{{screen_nation && screen_nation.length>0}}"> | |
| 28 | + <view class="f_cate_item fs28">国别 | |
| 29 | + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="2"> | |
| 30 | + <block wx:if="{{fil_nation_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 31 | + <block wx:if="{{fil_nation_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block> | |
| 32 | + <block wx:if="{{fil_nation_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 33 | + </view> | |
| 34 | + </view> | |
| 35 | + <view class="filter-items mgt20 fs26 {{fil_nation_state==0?'normal_to':(fil_nation_state==2?'back_to':'') }} "> | |
| 36 | + <block wx:for="{{screen_nation}}"> | |
| 37 | + <view wx:if="{{item.name}}" bindtap="filterGoods" data-type="2" data-index="{{index}}" | |
| 38 | + class="filter-item">{{item.name}} | |
| 39 | + </view> | |
| 40 | + </block> | |
| 41 | + </view> | |
| 42 | + <view style="clear:both"></view> | |
| 43 | + </view> | |
| 44 | + <view class="filter-box" wx:if="{{screen_brand && screen_brand.length > 0}}"> | |
| 45 | + <view class="f_cate_item fs28">品牌 | |
| 46 | + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="3"> | |
| 47 | + <block wx:if="{{fil_brand_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 48 | + <block wx:if="{{fil_brand_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block> | |
| 49 | + <block wx:if="{{fil_brand_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 50 | + </view> | |
| 51 | + | |
| 52 | + </view> | |
| 53 | + <view class="filter-items mgt20 fs26 {{fil_brand_state==0?'normal_to':(fil_brand_state==2?'back_to':'') }} "> | |
| 54 | + <block wx:for="{{screen_brand}}"> | |
| 55 | + <view wx:if="{{item.name}}" bindtap="filterGoods" data-type="3" data-index="{{index}}" | |
| 56 | + class="filter-item">{{item.name}} | |
| 57 | + </view> | |
| 58 | + </block> | |
| 59 | + </view> | |
| 60 | + <view style="clear:both"></view> | |
| 61 | + </view> | |
| 62 | + <view class="filter-box" wx:if="{{screen_price}}"> | |
| 63 | + <view class="f_cate_item fs28">价格 | |
| 64 | + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="4"> | |
| 65 | + <block wx:if="{{fil_price_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 66 | + <block wx:if="{{fil_price_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block> | |
| 67 | + <block wx:if="{{fil_price_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block> | |
| 68 | + </view> | |
| 69 | + | |
| 70 | + </view> | |
| 71 | + <view class="filter-items mgt20 fs26 {{fil_price_state==0?'normal_to':(fil_price_state==2?'back_to':'') }} "> | |
| 72 | + <block wx:for="{{screen_price}}"> | |
| 73 | + <view bindtap="filterGoods" class="filter-item" data-type="4" data-index="{{index}}">{{item.name}} | |
| 74 | + </view> | |
| 75 | + </block> | |
| 76 | + </view> | |
| 77 | + <view style="clear:both"></view> | |
| 78 | + </view> | |
| 79 | + | |
| 80 | + <view class="flex jc_sb ai_c" style="padding:0 20rpx"> | |
| 81 | + <view bindtap="clear_fil" class="fil_btn fil_cancle">取消筛选</view> | |
| 82 | + <view bindtap="closeFilterModal" class="fil_btn fil_sure">确定</view> | |
| 83 | + </view> | |
| 84 | + | |
| 85 | + <view class="filter-box" style="height:30rpx"></view> | |
| 86 | + </view> | |
| 87 | +</view> | |
| 0 | 88 | \ No newline at end of file | ... | ... |
pages/goods/com_screen.wxss
0 → 100644
| 1 | +/*--三角形的显示--*/ | |
| 2 | +.arrow_down,.arrow_up{ | |
| 3 | + width: 0px; | |
| 4 | + height: 0px; | |
| 5 | + font-size: 0; | |
| 6 | + line-height: 0; | |
| 7 | + border-right: 5px solid transparent; | |
| 8 | + border-left: 5px solid transparent; | |
| 9 | +} | |
| 10 | + | |
| 11 | +.arrow_down { | |
| 12 | + border-top: 5px solid #a5a5a5; margin-top: 4rpx; | |
| 13 | +} | |
| 14 | +.arrow_up{ | |
| 15 | + border-bottom: 5px solid #a5a5a5; | |
| 16 | +} | |
| 17 | + | |
| 18 | +.arrow_down.on{ | |
| 19 | + border-top: 5px solid #F4281C ; | |
| 20 | +} | |
| 21 | +.arrow_up.on{ | |
| 22 | + border-bottom: 5px solid #F4281C; | |
| 23 | +} | |
| 24 | + | |
| 25 | +.f_cate_item{ height:80rpx; display:flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #dcdcdc;} | |
| 26 | + | |
| 27 | +.filter-items{ color: #666; overflow:hidden} | |
| 28 | +.filter-items.normal_to{ max-height: 260rpx} | |
| 29 | +.filter-items.back_to{ height: 0rpx} | |
| 30 | + | |
| 31 | +.up_ar{ transform: rotate(180deg)} | |
| 32 | +.fil_btn{ width: 47%; height:80rpx; border-radius:10rpx; display: flex; | |
| 33 | + justify-content:center; align-items: center; font-size:28rpx;color:#fff} | |
| 34 | +.fil_cancle{ background-color: #25c6fc } | |
| 35 | +.fil_sure{ background-color:#dd272c } | |
| 36 | + | |
| 37 | +.filter-modal { | |
| 38 | + position: fixed; | |
| 39 | + left: 150rpx; | |
| 40 | + top: 0; | |
| 41 | + right: 0; | |
| 42 | + bottom: 0; | |
| 43 | + z-index: 1120; | |
| 44 | + background-color: white; | |
| 45 | + overflow-x: hidden; | |
| 46 | +} | |
| 47 | + | |
| 48 | +.filter-box { | |
| 49 | + box-sizing: border-box; | |
| 50 | + width: 100%; | |
| 51 | + font-size: 28rpx; | |
| 52 | + padding: 20rpx; | |
| 53 | +} | |
| 54 | + | |
| 55 | +.filter-name { | |
| 56 | + width: 100%; | |
| 57 | + padding: 20rpx 0; | |
| 58 | + word-break: keep-all; | |
| 59 | + white-space: nowrap; | |
| 60 | + text-overflow: ellipsis; | |
| 61 | + overflow: hidden; | |
| 62 | + font-size: 30rpx; | |
| 63 | +} | |
| 64 | + | |
| 65 | +.filter-item { | |
| 66 | + float: left; | |
| 67 | + width: fit-content; | |
| 68 | + max-width: 500rpx; | |
| 69 | + word-break: keep-all; | |
| 70 | + white-space: nowrap; | |
| 71 | + text-overflow: ellipsis; | |
| 72 | + overflow: hidden; | |
| 73 | + padding: 10rpx; | |
| 74 | + border-radius: 10rpx; | |
| 75 | + border: 1rpx #ddd solid; | |
| 76 | + margin: 0 10rpx 10rpx 0; | |
| 77 | + background-color: #fdfdfd; | |
| 78 | + color: #666; | |
| 79 | +} | |
| 0 | 80 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/buy_com_pop.wxml
0 → 100644
| 1 | +<view class="spec-goods"> | |
| 2 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" | |
| 3 | + binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 4 | + <view class="spec-goods-info"> | |
| 5 | + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | |
| 6 | + <view class="flex ai_end xc-val-money"> | |
| 7 | + <text class="fs20">¥</text> | |
| 8 | + <!-- 如果是等级会员,且有等级价 --> | |
| 9 | + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}}</block> | |
| 10 | + <block wx:else>{{sele_g.shop_price}}</block> | |
| 11 | + </view> | |
| 12 | + | |
| 13 | + <view class="flex"> | |
| 14 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 15 | + <block wx:if="{{sales_rules==2}}"> | |
| 16 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}"> | |
| 17 | + 可售:{{def_pick_store.CanOutQty}} | |
| 18 | + </view> | |
| 19 | + <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 20 | + </block> | |
| 21 | + <block wx:else> | |
| 22 | + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view> | |
| 23 | + </block> | |
| 24 | + </view> | |
| 25 | + | |
| 26 | + | |
| 27 | + </view> | |
| 28 | + | |
| 29 | + <!-- 选择门店模块 --> | |
| 30 | + <view class="flex-space-between address ai_end xc-width "> | |
| 31 | + | |
| 32 | + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 33 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 34 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | |
| 35 | + 距离:{{def_pick_store.distance > 1000 ? filters.toFix(def_pick_store.distance / 1000, 2) + "km" : filters.toFix(def_pick_store.distance, 0) + "m"}} | |
| 36 | + | |
| 37 | + </view> | |
| 38 | + </view> | |
| 39 | + | |
| 40 | + <!-- 没有门店的时候 --> | |
| 41 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 42 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 43 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 44 | + </view> | |
| 45 | + | |
| 46 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" | |
| 47 | + bindtap="choice_store">更多门店<text class="right-arrow"></text> | |
| 48 | + </view> | |
| 49 | + </view> | |
| 50 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 51 | + <block wx:else> | |
| 52 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 53 | + <block wx:else> | |
| 54 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 55 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}"> | |
| 56 | + (库存不足) | |
| 57 | + </view> | |
| 58 | + </block> | |
| 59 | + </block> | |
| 60 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}"> | |
| 61 | + 地址:{{def_pick_store.fulladdress}} | |
| 62 | + </view> | |
| 63 | + | |
| 64 | + | |
| 65 | + <!--商品的属性项目--> | |
| 66 | + <view class="xc-goods-attribute"> | |
| 67 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 68 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 69 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" | |
| 70 | + data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | |
| 71 | + {{item.gg}} | |
| 72 | + </view> | |
| 73 | + </view> | |
| 74 | + </view> | |
| 75 | + | |
| 76 | + <view class="b_num"> | |
| 77 | + <view>购买数量</view> | |
| 78 | + <view class="count"> | |
| 79 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" | |
| 80 | + class="sub {{goodsInputNum <= 1 ? 'active':''}}">- | |
| 81 | + </view> | |
| 82 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 83 | + <view bindtap="addCartNum" class="add">+</view> | |
| 84 | + </view> | |
| 85 | + </view> | |
| 86 | +</view> | |
| 87 | +<!-- 提示再买多少优惠 --> | |
| 88 | +<view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
| 89 | + 再买{{hui_condition.need}} | |
| 90 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 91 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 92 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 93 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 94 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 95 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 96 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 97 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 98 | +</view> | |
| 99 | +<!-- 按钮部分 --> | |
| 100 | +<view class="spec-cart-btns"> | |
| 101 | + | |
| 102 | + <!-- 根本就找不到门店 --> | |
| 103 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 104 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
| 105 | + 配送不匹配 | |
| 106 | + </view> | |
| 107 | + </block> | |
| 108 | + <block wx:else> | |
| 109 | + <!-- 根本就找不到门店 --> | |
| 110 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 111 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;"> | |
| 112 | + 库存不足 | |
| 113 | + </view> | |
| 114 | + </block> | |
| 115 | + <block wx:else> | |
| 116 | + | |
| 117 | + | |
| 118 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 119 | + <view class="spec-cart-btn fs32" data-action="add" | |
| 120 | + style="background-color: #dcdcdc;color: #999;">库存不足 | |
| 121 | + </view> | |
| 122 | + </block> | |
| 123 | + <block wx:else> | |
| 124 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 125 | + <view class="spec-cart-btn fs32" data-action="add" | |
| 126 | + style="background-color: #dcdcdc;color: #999">库存不足 | |
| 127 | + </view> | |
| 128 | + </block> | |
| 129 | + <block wx:else> | |
| 130 | + <block wx:if="{{!def_pick_store}}"> | |
| 131 | + <view class="spec-cart-btn fs32" data-action="add" | |
| 132 | + style="background-color: #dcdcdc;color: #999">请先选择门店 | |
| 133 | + </view> | |
| 134 | + </block> | |
| 135 | + <block wx:else> | |
| 136 | + <block wx:if="{{data.store_count<=0}}"> | |
| 137 | + <view class="spec-cart-btn fs32" data-action="add" | |
| 138 | + style="background-color: #dcdcdc;color: #999">库存不足 | |
| 139 | + </view> | |
| 140 | + </block> | |
| 141 | + <block wx:else> | |
| 142 | + <view class="flex jc_sb"> | |
| 143 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 144 | + data-action="add" style="background-color: #ffb03f;">加入购物车 | |
| 145 | + </view> | |
| 146 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 147 | + data-action="buy">立即购买 | |
| 148 | + </view> | |
| 149 | + </view> | |
| 150 | + </block> | |
| 151 | + | |
| 152 | + </block> | |
| 153 | + </block> | |
| 154 | + </block> | |
| 155 | + </block> | |
| 156 | + </block> | |
| 157 | +</view> | |
| 158 | + | ... | ... |
pages/goods/goodsInfo/buy_flash_normal.wxml
| 1 | 1 | <view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view> |
| 2 | - <view class="spec-model"> | |
| 3 | - <view class="pding"> | |
| 4 | - <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 5 | - <view class="spec-goods"> | |
| 6 | - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 7 | - <view class="spec-goods-info"> | |
| 8 | - <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | |
| 9 | - <view class="flex ai_end xc-val-money"> | |
| 10 | - <text class="fs20">¥</text> | |
| 11 | - <!-- 如果是等级会员,且有等级价 --> | |
| 12 | - <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | |
| 13 | - <block wx:else>{{sele_g.shop_price}}</block> | |
| 14 | - </view> | |
| 15 | - | |
| 16 | - <view class="flex"> | |
| 17 | - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 18 | - <block wx:if="{{sales_rules==2}}"> | |
| 19 | - <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | |
| 20 | - <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 21 | - </block> | |
| 22 | - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 23 | - </view> | |
| 24 | - | |
| 25 | - | |
| 26 | - </view> | |
| 27 | - | |
| 28 | - <!-- 选择门店模块 --> | |
| 29 | - <view class="flex-space-between address ai_end xc-width "> | |
| 30 | - | |
| 31 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 32 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 33 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
| 34 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 35 | - | |
| 36 | - </view> | |
| 37 | - </view> | |
| 38 | - | |
| 39 | - <!-- 没有门店的时候 --> | |
| 40 | - <view class="flex" bindtap="choice_store" wx:else> | |
| 41 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 42 | - <view class="fs30" style="color:black;">选择门店</view> | |
| 43 | - </view> | |
| 44 | - | |
| 45 | - <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | |
| 46 | - </view> | |
| 47 | - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 48 | - <block wx:else> | |
| 49 | - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 50 | - <block wx:else> | |
| 51 | - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 52 | - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
| 53 | - </block> | |
| 54 | - </block> | |
| 55 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 56 | - | |
| 57 | - | |
| 58 | - <!--商品的属性项目--> | |
| 59 | - <view class="xc-goods-attribute"> | |
| 60 | - <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 61 | - <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 62 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | |
| 63 | - {{item.gg}} | |
| 64 | - </view> | |
| 65 | - </view> | |
| 66 | - </view> | |
| 67 | - | |
| 68 | - <view class="b_num"> | |
| 69 | - <view>购买数量</view> | |
| 70 | - <view class="count"> | |
| 71 | - <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
| 72 | - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 73 | - <view bindtap="addCartNum" class="add">+</view> | |
| 74 | - </view> | |
| 75 | - </view> | |
| 76 | - </view> | |
| 77 | - | |
| 78 | - | |
| 79 | - <!-- 提示再买多少优惠 --> | |
| 80 | - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
| 81 | - 再买{{hui_condition.need}} | |
| 82 | - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 83 | - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 84 | - <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 85 | - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 86 | - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 87 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 88 | - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 89 | - <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 90 | - </view> | |
| 91 | - | |
| 92 | - | |
| 93 | - <!-- 按钮部分 --> | |
| 94 | - <view class="spec-cart-btns"> | |
| 95 | - | |
| 96 | - <!-- 根本就找不到门店 --> | |
| 97 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 98 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 99 | - </block> | |
| 100 | - <block wx:else> | |
| 101 | - <!-- 根本就找不到门店 --> | |
| 102 | - <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 103 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 104 | - </block> | |
| 105 | - <block wx:else> | |
| 106 | - | |
| 107 | - | |
| 108 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 109 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 110 | - </block> | |
| 111 | - <block wx:else> | |
| 112 | - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 113 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 114 | - </block> | |
| 115 | - <block wx:else> | |
| 116 | - <block wx:if="{{!def_pick_store}}"> | |
| 117 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 118 | - </block> | |
| 119 | - <block wx:else> | |
| 120 | - <block wx:if="{{data.store_count<=0}}"> | |
| 121 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 122 | - </block> | |
| 123 | - <block wx:else> | |
| 124 | - <view class="flex jc_sb"> | |
| 125 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 126 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
| 127 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 128 | - data-action="buy">立即购买</view> | |
| 129 | - </view> | |
| 130 | - </block> | |
| 131 | - | |
| 132 | - </block> | |
| 133 | - </block> | |
| 134 | - </block> | |
| 135 | - </block> | |
| 136 | - </block> | |
| 137 | - </view> | |
| 138 | - | |
| 139 | - </view> | |
| 140 | - </view> | |
| 141 | - <view class="clear"></view> | |
| 142 | 2 | \ No newline at end of file |
| 3 | +<view class="spec-model"> | |
| 4 | + <view class="pding"> | |
| 5 | + <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 6 | + <include src="buy_com_pop.wxml"></include> | |
| 7 | + </view> | |
| 8 | +</view> | |
| 9 | +<view class="clear"></view> | |
| 143 | 10 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/buy_integral_normal.wxml
| 1 | -<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view> | |
| 2 | - <view class="spec-model"> | |
| 3 | - <view class="pding"> | |
| 4 | - <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 5 | - <view class="spec-goods"> | |
| 6 | - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image> | |
| 7 | - <view class="spec-goods-info"> | |
| 8 | - <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view> | |
| 9 | - <view class="flex ai_end xc-val-money"> | |
| 10 | - <text class="fs20">¥</text> | |
| 11 | - <!-- 如果是等级会员,且有等级价 --> | |
| 12 | - <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> | |
| 13 | - <block wx:else>{{sele_g.shop_price}}</block> | |
| 14 | - </view> | |
| 15 | - | |
| 16 | - <view class="flex"> | |
| 17 | - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 18 | - <block wx:if="{{sales_rules==2}}"> | |
| 19 | - <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | |
| 20 | - <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 21 | - </block> | |
| 22 | - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 23 | - </view> | |
| 24 | - | |
| 25 | - | |
| 26 | - </view> | |
| 27 | - | |
| 28 | - <!-- 选择门店模块 --> | |
| 29 | - <view class="flex-space-between address ai_end xc-width "> | |
| 30 | - | |
| 31 | - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 32 | - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 33 | - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
| 34 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 35 | - | |
| 36 | - </view> | |
| 37 | - </view> | |
| 38 | - | |
| 39 | - <!-- 没有门店的时候 --> | |
| 40 | - <view class="flex" bindtap="choice_store" wx:else> | |
| 41 | - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 42 | - <view class="fs30" style="color:black;">选择门店</view> | |
| 43 | - </view> | |
| 44 | - | |
| 45 | - <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | |
| 46 | - </view> | |
| 47 | - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 48 | - <block wx:else> | |
| 49 | - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 50 | - <block wx:else> | |
| 51 | - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view> | |
| 52 | - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2}}">(库存不足)</view> | |
| 53 | - </block> | |
| 54 | - </block> | |
| 55 | - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 56 | - | |
| 57 | - | |
| 58 | - <!--商品的属性项目--> | |
| 59 | - <view class="xc-goods-attribute"> | |
| 60 | - <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 61 | - <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 62 | - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | |
| 63 | - {{item.gg}} | |
| 64 | - </view> | |
| 65 | - </view> | |
| 66 | - </view> | |
| 67 | - | |
| 68 | - <view class="b_num"> | |
| 69 | - <view>购买数量</view> | |
| 70 | - <view class="count"> | |
| 71 | - <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
| 72 | - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 73 | - <view bindtap="addCartNum" class="add">+</view> | |
| 74 | - </view> | |
| 75 | - </view> | |
| 76 | - </view> | |
| 77 | - | |
| 78 | - | |
| 79 | - <!-- 提示再买多少优惠 --> | |
| 80 | - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
| 81 | - 再买{{hui_condition.need}} | |
| 82 | - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 83 | - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 84 | - <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 85 | - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 86 | - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 87 | - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 88 | - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 89 | - <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 90 | - </view> | |
| 91 | - | |
| 92 | - | |
| 93 | - <!-- 按钮部分 --> | |
| 94 | - <view class="spec-cart-btns"> | |
| 95 | - | |
| 96 | - | |
| 97 | - <!-- 根本就找不到门店 --> | |
| 98 | - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 99 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view> | |
| 100 | - </block> | |
| 101 | - <block wx:else> | |
| 102 | - <!-- 根本就找不到门店 --> | |
| 103 | - <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 104 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 105 | - </block> | |
| 106 | - <block wx:else> | |
| 107 | - | |
| 108 | - | |
| 109 | - <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 110 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 111 | - </block> | |
| 112 | - <block wx:else> | |
| 113 | - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 114 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 115 | - </block> | |
| 116 | - <block wx:else> | |
| 117 | - <block wx:if="{{!def_pick_store}}"> | |
| 118 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 119 | - </block> | |
| 120 | - <block wx:else> | |
| 121 | - <!-- 线下库存 --> | |
| 122 | - <block wx:if="{{sales_rules==2 && prom_type==0 && !sele_g.whsle_id}}"> | |
| 123 | - <block wx:if="{{def_pick_store && !def_pick_store.CanOutQty}}"> | |
| 124 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 125 | - </block> | |
| 126 | - <block wx:else> | |
| 127 | - <view class="flex jc_sb"> | |
| 128 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 129 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
| 130 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 131 | - data-action="buy">立即购买</view> | |
| 132 | - </view> | |
| 133 | - </block> | |
| 134 | - </block> | |
| 135 | - <!-- 线上库存 --> | |
| 136 | - <block wx:else> | |
| 137 | - <block wx:if="{{sele_g.store_count<=0}}"> | |
| 138 | - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999"> | |
| 139 | - 库存不足5 | |
| 140 | - </view> | |
| 141 | - </block> | |
| 142 | - <block wx:else> | |
| 143 | - <view class="flex jc_sb"> | |
| 144 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 145 | - data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
| 146 | - <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 147 | - data-action="buy">立即购买</view> | |
| 148 | - </view> | |
| 149 | - </block> | |
| 150 | - | |
| 151 | - </block> | |
| 152 | - | |
| 153 | - </block> | |
| 154 | - </block> | |
| 155 | - </block> | |
| 156 | - </block> | |
| 157 | - </block> | |
| 158 | - </view> | |
| 159 | - | |
| 160 | - | |
| 161 | - </view> | |
| 162 | - </view> | |
| 163 | - <view class="clear"></view> | |
| 164 | 1 | \ No newline at end of file |
| 2 | +<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view> | |
| 3 | +<view class="spec-model"> | |
| 4 | + <view class="pding"> | |
| 5 | + <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 6 | + <include src="buy_com_pop.wxml"></include> | |
| 7 | + </view> | |
| 8 | +</view> | |
| 9 | +<view class="clear"></view> | |
| 165 | 10 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -255,7 +255,9 @@ Page({ |
| 255 | 255 | share_hidden: false, |
| 256 | 256 | all_activity_list: null, //所有活动的列表 |
| 257 | 257 | |
| 258 | - hiddenCS: true, | |
| 258 | + hiddenCS: true, | |
| 259 | + | |
| 260 | + is_retail_price:0, | |
| 259 | 261 | }, |
| 260 | 262 | |
| 261 | 263 | //------初始化加载---------- |
| ... | ... | @@ -424,7 +426,8 @@ Page({ |
| 424 | 426 | store_config: e, |
| 425 | 427 | sys_switch: json_d, |
| 426 | 428 | is_closecoupon: json_d.is_closecoupon, |
| 427 | - is_newsales_rules: json_d.is_newsales_rules | |
| 429 | + is_newsales_rules: json_d.is_newsales_rules, | |
| 430 | + is_retail_price: json_d.is_retail_price || 0 | |
| 428 | 431 | }); |
| 429 | 432 | ee.init(gid); |
| 430 | 433 | //------几人评价------- |
| ... | ... | @@ -438,38 +441,7 @@ Page({ |
| 438 | 441 | var swithc_list = e.switch_list; |
| 439 | 442 | var sw_arr = JSON.parse(swithc_list); |
| 440 | 443 | //---如果后台又开等级卡的开关--- |
| 441 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 442 | - th.setData({rank_switch: true}); | |
| 443 | - //---回调卡的列表--- | |
| 444 | - th.getPlusCardType(function (ob) { | |
| 445 | - th.setData({card_list: ob.card_list}); | |
| 446 | - var ti = setInterval(function () { | |
| 447 | - var user = getApp().globalData.userInfo; | |
| 448 | - if (!user) return false; | |
| 449 | - clearInterval(ti); | |
| 450 | - if (user.card_field && user['card_expiredate']) { | |
| 451 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 452 | - var end = new Date(str); | |
| 453 | - end = Date.parse(end) / 1000; | |
| 454 | - var now = ut.gettimestamp(); | |
| 455 | - //--- 判断是等级会员,且在有效期范围内 --- | |
| 456 | - if (user.card_field && now < end) { | |
| 457 | - var card_name = ob.name_map.get(user.card_field); | |
| 458 | - //if(card_name.length>6) card_name=card_name.substring(0,6); | |
| 459 | - | |
| 460 | - var is_near_date = 0; | |
| 461 | - if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天 | |
| 462 | - th.setData({ | |
| 463 | - card_field: user.card_field, | |
| 464 | - card_name: card_name, | |
| 465 | - card_list: ob.card_list, | |
| 466 | - is_near_date: is_near_date | |
| 467 | - }); | |
| 468 | - } | |
| 469 | - } | |
| 470 | - }, 500) | |
| 471 | - }) | |
| 472 | - } | |
| 444 | + ut.get_plus_name_price(sw_arr,th); | |
| 473 | 445 | |
| 474 | 446 | }, 1); |
| 475 | 447 | |
| ... | ... | @@ -750,8 +722,11 @@ Page({ |
| 750 | 722 | fir_quan = res1.data.data.pageData; |
| 751 | 723 | }) |
| 752 | 724 | } |
| 725 | + | |
| 726 | + let arr=[] | |
| 727 | + | |
| 753 | 728 | //过滤不是本商品的单品优惠券------------------- |
| 754 | - if(fir_quan.length > 0 ){ | |
| 729 | + if(fir_quan && fir_quan.length > 0 ){ | |
| 755 | 730 | let goodInfo = ee.data.data |
| 756 | 731 | for (let index = fir_quan.length-1; index >= 0; index--) { |
| 757 | 732 | if (fir_quan[index].useobjecttype==20) { //判断是单品优惠券 |
| ... | ... | @@ -759,15 +734,18 @@ Page({ |
| 759 | 734 | fir_quan.splice(index,1) |
| 760 | 735 | } |
| 761 | 736 | } |
| 762 | - } | |
| 763 | - } | |
| 764 | - let arr=[] | |
| 765 | - let length = fir_quan.length | |
| 766 | - if (length <= 3) { | |
| 767 | - arr=fir_quan | |
| 768 | - }else{ | |
| 769 | - arr=fir_quan.splice(0,3); | |
| 737 | + } | |
| 738 | + | |
| 739 | + let length = fir_quan.length | |
| 740 | + if (length <= 3) { | |
| 741 | + arr=fir_quan | |
| 742 | + }else{ | |
| 743 | + arr=fir_quan.splice(0,3); | |
| 744 | + } | |
| 745 | + | |
| 770 | 746 | } |
| 747 | + | |
| 748 | + | |
| 771 | 749 | //--------获取视频图片--------- |
| 772 | 750 | await getApp().request.promiseGet("/api/weshop/goodsVideos/get/" + os.stoid + "/" + ee.data.gid, { |
| 773 | 751 | 1: 1 |
| ... | ... | @@ -1418,6 +1396,8 @@ Page({ |
| 1418 | 1396 | }; |
| 1419 | 1397 | |
| 1420 | 1398 | |
| 1399 | + | |
| 1400 | + | |
| 1421 | 1401 | //-- 代发商品不参加优惠 -- |
| 1422 | 1402 | if(th.data.sele_g.whsle_id && newd.prom_type==3){ |
| 1423 | 1403 | newd.prom_type=0; |
| ... | ... | @@ -1465,6 +1445,7 @@ Page({ |
| 1465 | 1445 | |
| 1466 | 1446 | newd.prom_type = 0; |
| 1467 | 1447 | newd.prom_id = 0; |
| 1448 | + newd.is_pd_normal=1; | |
| 1468 | 1449 | |
| 1469 | 1450 | //---如果是线下门店销售的时候--- |
| 1470 | 1451 | if (th.data.sales_rules == 2) { |
| ... | ... | @@ -1788,7 +1769,7 @@ Page({ |
| 1788 | 1769 | add_cart_next(e, t, a, o, newd, CanOutQty) { |
| 1789 | 1770 | var th = this, i = getApp().request; |
| 1790 | 1771 | //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ |
| 1791 | - if ((o.prom_type != 1 || o.prom_id <= 0) && ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 ) || th.data.is_normal)) { | |
| 1772 | + if ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 && o.prom_type != 1 ) || th.data.is_normal) { | |
| 1792 | 1773 | var conf = th.data.bconfig; |
| 1793 | 1774 | if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) { |
| 1794 | 1775 | var s_list = JSON.parse(conf.switch_list); |
| ... | ... | @@ -2007,7 +1988,7 @@ Page({ |
| 2007 | 1988 | getApp().goto(url); |
| 2008 | 1989 | } else { |
| 2009 | 1990 | //要判断积分购的普通购买有没有参加优惠活动 |
| 2010 | - if (e.is_integral_normal == 1) { | |
| 1991 | + if (e.is_integral_normal == 1 || e.is_pd_normal == 1 ) { | |
| 2011 | 1992 | this.check_nor_promgood(e.goods_id, function (res) { |
| 2012 | 1993 | if (res && res.cat_id) { |
| 2013 | 1994 | e.prom_type = 3; |
| ... | ... | @@ -6363,7 +6344,7 @@ Page({ |
| 6363 | 6344 | getApp().goto("/pages/user/plus/plus"); |
| 6364 | 6345 | }, |
| 6365 | 6346 | go_card_info: function () { |
| 6366 | - getApp().goto("/pages/user/cardinfo/cardinfo"); | |
| 6347 | + getApp().goto("/packageE/pages/user/cardinfo/cardinfo"); | |
| 6367 | 6348 | }, |
| 6368 | 6349 | //-- 根据ID拿出门店 -- |
| 6369 | 6350 | get_pick_from_list(pid) { |
| ... | ... | @@ -6963,7 +6944,28 @@ Page({ |
| 6963 | 6944 | var prom_id=e.currentTarget.dataset.prom; |
| 6964 | 6945 | var index=e.currentTarget.dataset.index; |
| 6965 | 6946 | getApp().goto("/packageD/pages/gift/gift?prom_id="+prom_id+"&index="+index); |
| 6947 | + }, | |
| 6948 | + | |
| 6949 | + pre_gallery_img(e){ | |
| 6950 | + | |
| 6951 | + this.data.show_prew_img=1; | |
| 6952 | + | |
| 6953 | + var index = e.currentTarget.dataset.index; | |
| 6954 | + getApp().globalData.no_clear=1; | |
| 6955 | + | |
| 6956 | + var url=this.data.gallery[index].image_url; | |
| 6957 | + var url_arr=[]; | |
| 6958 | + | |
| 6959 | + for(var i in this.data.gallery){ | |
| 6960 | + url_arr.push(this.data.gallery[i].image_url) | |
| 6966 | 6961 | } |
| 6967 | 6962 | |
| 6968 | 6963 | |
| 6964 | + wx.previewImage({ | |
| 6965 | + current: url, // 当前显示图片的http链接 | |
| 6966 | + urls: url_arr,// 需要预览的图片http链接列表 | |
| 6967 | + }); | |
| 6968 | + } | |
| 6969 | + | |
| 6970 | + | |
| 6969 | 6971 | }) | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -45,8 +45,8 @@ |
| 45 | 45 | <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video> |
| 46 | 46 | </view> |
| 47 | 47 | </swiper-item> |
| 48 | - <swiper-item wx:for="{{gallery}}" wx:key="gallery"> | |
| 49 | - <view class="wh100 g_img_box" style="background-image:url({{item.image_url}});"></view> | |
| 48 | + <swiper-item wx:for="{{gallery}}" wx:key="gallery" > | |
| 49 | + <view data-index="{{index}}" bindtap='pre_gallery_img' class="wh100 g_img_box" style="background-image:url({{item.image_url}});"></view> | |
| 50 | 50 | </swiper-item> |
| 51 | 51 | </swiper> |
| 52 | 52 | <block wx:if="{{mapurl}}"> |
| ... | ... | @@ -124,9 +124,9 @@ |
| 124 | 124 | <view class="flex fs35 xc-qtsign">¥</view> |
| 125 | 125 | <view class="fs50 val">{{prom_price}}</view> |
| 126 | 126 | </view> |
| 127 | - <view class="word-line fs20 xc-qtunit-price"> | |
| 128 | - ¥{{filters.toFix(data.shop_price,2)}} | |
| 129 | - </view> | |
| 127 | + | |
| 128 | + <view wx:if="is_retail_price" class="word-line fs20 xc-qtunit-price">¥{{filters.toFix(data.market_price,2)}}</view> | |
| 129 | + <view wx:else class="word-line fs20 xc-qtunit-price">¥{{filters.toFix(data.shop_price,2)}}</view> | |
| 130 | 130 | </view> |
| 131 | 131 | |
| 132 | 132 | <view class="abs white xc-nanber"> |
| ... | ... | @@ -260,9 +260,15 @@ |
| 260 | 260 | <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> |
| 261 | 261 | <text class="rel_txt" wx:if="{{prom_price}}">{{filters.toFix(prom_price,2)}}元</text> |
| 262 | 262 | <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> |
| 263 | - <text class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | |
| 263 | + | |
| 264 | + <text wx:if="{{is_retail_price}}" class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | |
| 265 | + ¥{{filters.toFix(data.market_price,2)}} | |
| 266 | + </text> | |
| 267 | + | |
| 268 | + <text wx:else class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;"> | |
| 264 | 269 | ¥{{filters.toFix(data.shop_price,2)}} |
| 265 | 270 | </text> |
| 271 | + | |
| 266 | 272 | </view> |
| 267 | 273 | <!-- 这个是分享按钮 --> |
| 268 | 274 | <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> --> |
| ... | ... | @@ -302,18 +308,29 @@ |
| 302 | 308 | </view> |
| 303 | 309 | <text class="rel yuan">¥</text> |
| 304 | 310 | {{filters.toFix(data[card_field],2)}} |
| 305 | -<!-- <view class='yj' style="top:35rpx">--> | |
| 306 | -<!-- <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text>--> | |
| 307 | -<!-- </view>--> | |
| 311 | + | |
| 312 | + <view wx:if="{{is_retail_price}}" class='yj' style="top:35rpx"> | |
| 313 | + <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text> | |
| 314 | + </view> | |
| 315 | + | |
| 316 | + <view wx:else class='yj' style="top:35rpx"> | |
| 317 | + <text>:¥{{filters.toFix(data.shop_price,2)}}</text> | |
| 318 | + </view> | |
| 319 | + | |
| 308 | 320 | </block> |
| 309 | 321 | <block wx:elif="{{prom_type!=2}}"> |
| 310 | 322 | |
| 311 | 323 | |
| 312 | 324 | <text class="yuan">¥</text> |
| 313 | 325 | {{filters.toFix(data.shop_price,2)}} |
| 314 | -<!-- <view class='yj'>--> | |
| 315 | -<!-- <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text>--> | |
| 316 | -<!-- </view>--> | |
| 326 | + <view wx:if="{{is_retail_price}}" class='yj'> | |
| 327 | + <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text> | |
| 328 | + </view> | |
| 329 | + | |
| 330 | + <view wx:else class='yj'> | |
| 331 | + <text>:¥{{filters.toFix(data.shop_price,2)}}</text> | |
| 332 | + </view> | |
| 333 | + | |
| 317 | 334 | </block> |
| 318 | 335 | </view> |
| 319 | 336 | </view> |
| ... | ... | @@ -410,7 +427,8 @@ |
| 410 | 427 | <text class="fs30">¥</text> |
| 411 | 428 | {{prom_price}} |
| 412 | 429 | </view> |
| 413 | - <view class="word-line fs24">¥{{filters.toFix(data.shop_price,2)}}</view> | |
| 430 | + <view wx:if="{{is_retail_price}}" class="word-line fs24">¥{{filters.toFix(data.market_price,2)}}</view> | |
| 431 | + <view wx:else class="word-line fs24">¥{{filters.toFix(data.shop_price,2)}}</view> | |
| 414 | 432 | </view> |
| 415 | 433 | <!-- 这个是分享按钮 --> |
| 416 | 434 | <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> |
| ... | ... | @@ -1504,6 +1522,7 @@ |
| 1504 | 1522 | </view> |
| 1505 | 1523 | </view> |
| 1506 | 1524 | <view class="mask" catchtouchmove="true" wx:if="{{showRules}}"></view> |
| 1525 | + | |
| 1507 | 1526 | <!-- 选择门店的弹框,1.1版最新的 --> |
| 1508 | 1527 | <block wx:if="{{store==1}}"> |
| 1509 | 1528 | <view class="mongolia-layer" bindtap="close_popup"></view> | ... | ... |
pages/goods/goodsList/goodsList.js
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | }; |
| 5 | 5 | }(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), oo = e.globalData.setting, ut = require("../../../utils/util.js"); |
| 6 | 6 | var regeneratorRuntime = require('../../../utils/runtime.js'); |
| 7 | +var com_fil= require('../com_screen.js'); | |
| 7 | 8 | |
| 8 | 9 | Page({ |
| 9 | 10 | data: { |
| ... | ... | @@ -16,6 +17,8 @@ Page({ |
| 16 | 17 | openFilterModal: !1, |
| 17 | 18 | baseUrl: "/api/weshop/goods/page?1=1", |
| 18 | 19 | requestUrl: "", |
| 20 | + old_req_url:'', | |
| 21 | + | |
| 19 | 22 | tabname:"sort", //排序的字段 |
| 20 | 23 | adname:"asc", //升降的字段 |
| 21 | 24 | is_new:0, |
| ... | ... | @@ -25,6 +28,19 @@ Page({ |
| 25 | 28 | rq_data:null, |
| 26 | 29 | isToggle: false, //切换商品视图控制符 |
| 27 | 30 | show_all:1, //判断显示 |
| 31 | + | |
| 32 | + is_retail_price:0, //是否显示零售价 | |
| 33 | + | |
| 34 | + more_sort_arr:[ | |
| 35 | + {name:'综合',value:'sort'}, | |
| 36 | + {name:'新品',value:'on_time'}, | |
| 37 | + {name:'评论',value:'comment_count'}, | |
| 38 | + ], | |
| 39 | + | |
| 40 | + fil_cate_state:0, | |
| 41 | + fil_nation_state:0, | |
| 42 | + fil_brand_state:0, | |
| 43 | + fil_price_state:0, | |
| 28 | 44 | }, |
| 29 | 45 | |
| 30 | 46 | onLoad: function(t) { |
| ... | ... | @@ -59,6 +75,7 @@ Page({ |
| 59 | 75 | url += "&parent_id="+t.pid; |
| 60 | 76 | } |
| 61 | 77 | } |
| 78 | + this.data.cat_id=t.cat_id; | |
| 62 | 79 | } |
| 63 | 80 | |
| 64 | 81 | if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; } |
| ... | ... | @@ -153,7 +170,14 @@ Page({ |
| 153 | 170 | } |
| 154 | 171 | }) |
| 155 | 172 | } |
| 173 | + | |
| 174 | + | |
| 175 | + this.data.old_req_url=url; | |
| 176 | + //进行筛选 | |
| 177 | + this.set_screen(url); | |
| 178 | + | |
| 156 | 179 | this.requestGoodsList(url); |
| 180 | + | |
| 157 | 181 | getApp().getConfig2(function(rs){ |
| 158 | 182 | //计算等级价相关 |
| 159 | 183 | var swithc_list=rs.switch_list; |
| ... | ... | @@ -184,6 +208,11 @@ Page({ |
| 184 | 208 | }) |
| 185 | 209 | },500) |
| 186 | 210 | } |
| 211 | + | |
| 212 | + if(sw_arr.is_retail_price){ | |
| 213 | + th.setData({is_retail_price:1}); | |
| 214 | + } | |
| 215 | + | |
| 187 | 216 | }); |
| 188 | 217 | |
| 189 | 218 | //调用接口判断商家plus有没有过期 |
| ... | ... | @@ -250,6 +279,7 @@ Page({ |
| 250 | 279 | } |
| 251 | 280 | this.resetData(), this.requestGoodsList(url); |
| 252 | 281 | }, |
| 282 | + | |
| 253 | 283 | requestGoodsList:function(t) { |
| 254 | 284 | if(this.data.loading) return false; |
| 255 | 285 | this.data.loading=1; |
| ... | ... | @@ -259,15 +289,21 @@ Page({ |
| 259 | 289 | |
| 260 | 290 | var user_id=getApp().globalData.user_id; |
| 261 | 291 | if(!user_id) user_id=0; |
| 292 | + | |
| 262 | 293 | //不是商品分组的,不是默认排序的 |
| 263 | - if(t.indexOf("group_id")==-1 || e.data.tabname!="sort" ){ | |
| 294 | + if(t.indexOf("group_id")==-1 ){ | |
| 264 | 295 | t += "&orderField=" + e.data.tabname; |
| 265 | 296 | t += "&orderType=" + e.data.adname; |
| 266 | 297 | } |
| 267 | 298 | |
| 268 | 299 | t +="&page=" + e.data.currentPage; |
| 300 | + | |
| 301 | + wx.showLoading({}); | |
| 302 | + | |
| 269 | 303 | getApp().request.promiseGet(t, {data:{is_mainshow: 1, isonsale: 1, store_id: oo.stoid}}).then(async res=>{ |
| 270 | 304 | th.data.loading=0; |
| 305 | + wx.hideLoading(); | |
| 306 | + | |
| 271 | 307 | e.setData({is_go:1}); |
| 272 | 308 | if(ut.ajax_ok(res)){ |
| 273 | 309 | e.data.currentPage++; |
| ... | ... | @@ -322,7 +358,7 @@ Page({ |
| 322 | 358 | if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { |
| 323 | 359 | var arr = res.data.data[0]; |
| 324 | 360 | item.prom_price = arr.luck_goods_price; |
| 325 | - item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0); | |
| 361 | + // item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0); | |
| 326 | 362 | } |
| 327 | 363 | }) |
| 328 | 364 | break; |
| ... | ... | @@ -336,10 +372,10 @@ Page({ |
| 336 | 372 | if (prom != null && prom.is_end==0 && prom.end_time>now && (prom.start_time<now || (prom_type!=2 && prom.show_time && prom.show_time<now)) ) { |
| 337 | 373 | item.prom_price = res.data.data.price; |
| 338 | 374 | if(res.data.data.user_price) item.prom_price=res.data.data.user_price; |
| 339 | - var vNum=res.data.data.virtual_num?res.data.data.virtual_num:0; | |
| 340 | - var vNum1=res.data.data.virtualNum?res.data.data.virtualNum:0; | |
| 341 | - var vNum2=res.data.data.virtual?res.data.data.virtual:0; | |
| 342 | - item.sales_sum=res.data.data.buy_num+(vNum+vNum1+vNum2); | |
| 375 | + // var vNum=res.data.data.virtual_num?res.data.data.virtual_num:0; | |
| 376 | + // var vNum1=res.data.data.virtualNum?res.data.data.virtualNum:0; | |
| 377 | + // var vNum2=res.data.data.virtual?res.data.data.virtual:0; | |
| 378 | + // item.sales_sum=res.data.data.buy_num+(vNum+vNum1+vNum2); | |
| 343 | 379 | }else{ |
| 344 | 380 | item.prom_type=0; |
| 345 | 381 | item.prom_id=0; |
| ... | ... | @@ -450,8 +486,7 @@ Page({ |
| 450 | 486 | }) |
| 451 | 487 | }, |
| 452 | 488 | |
| 453 | - | |
| 454 | - | |
| 489 | + | |
| 455 | 490 | // 切换显示 |
| 456 | 491 | bindToggleDisplay() { |
| 457 | 492 | this.setData({ |
| ... | ... | @@ -459,14 +494,20 @@ Page({ |
| 459 | 494 | }); |
| 460 | 495 | }, |
| 461 | 496 | |
| 462 | - | |
| 463 | 497 | go_url:function (e) { |
| 464 | 498 | var url = e.currentTarget.dataset.url; |
| 465 | 499 | //var rq_data = JSON.stringify(this.data.rq_data); |
| 466 | 500 | //url += `&o=${rq_data}`; |
| 467 | 501 | // console.log('url!!!=======<<<<', url); |
| 468 | 502 | getApp().goto(url); |
| 469 | - } | |
| 503 | + }, | |
| 504 | + | |
| 505 | + /*-- 和筛选相关的 --*/ | |
| 506 | + bind_pk_sort(e){ com_fil.bind_pk_sort(e,this); }, | |
| 507 | + set_screen(url){ com_fil.set_screen(url,this); }, | |
| 508 | + filterGoods(e){ com_fil.filterGoods(e,this); }, | |
| 509 | + open_more(e){ com_fil.open_more(e,this); }, | |
| 510 | + clear_fil(){ com_fil.clear_fil(this); } | |
| 470 | 511 | |
| 471 | 512 | |
| 472 | 513 | }); |
| 473 | 514 | \ No newline at end of file | ... | ... |
pages/goods/goodsList/goodsList.wxml
| ... | ... | @@ -27,30 +27,46 @@ |
| 27 | 27 | |
| 28 | 28 | <view class="nav-box"> |
| 29 | 29 | <view class="nav"> |
| 30 | - <navigator bindtap="changeTab" class="nav-item" data-href="sort" data-ad="{{adname}}">综合 | |
| 31 | - <view class="ico-dg" wx:if="{{tabname=='sort'}}"> | |
| 32 | - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 33 | - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 34 | - </view> | |
| 30 | + | |
| 31 | + | |
| 32 | + <navigator class="nav-item"> | |
| 33 | + <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name"> | |
| 34 | + <text wx:if="{{tabname=='on_time'}}">新品</text> | |
| 35 | + <text wx:elif="{{tabname=='comment_count'}}">评论</text> | |
| 36 | + <text wx:else>综合</text> | |
| 37 | + </picker> | |
| 38 | + <view class="arrow_down"></view> | |
| 39 | + | |
| 35 | 40 | </navigator> |
| 41 | + | |
| 42 | + | |
| 36 | 43 | <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量 |
| 37 | - <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}"> | |
| 38 | - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 39 | - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 44 | +<!-- <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">--> | |
| 45 | +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>--> | |
| 46 | +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>--> | |
| 47 | +<!-- </view>--> | |
| 48 | + <view> | |
| 49 | + <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view> | |
| 50 | + <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view> | |
| 40 | 51 | </view> |
| 41 | 52 | |
| 42 | 53 | </navigator> |
| 43 | 54 | <navigator bindtap="changeTab" class="nav-item" data-href="final_price" data-ad="{{adname}}"> |
| 44 | 55 | 价格 |
| 45 | - <view class="ico-dg" wx:if="{{tabname=='final_price'}}"> | |
| 46 | - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 47 | - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 56 | +<!-- <view class="ico-dg" wx:if="{{tabname=='final_price'}}">--> | |
| 57 | +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>--> | |
| 58 | +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>--> | |
| 59 | +<!-- </view>--> | |
| 60 | + <view> | |
| 61 | + <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view> | |
| 62 | + <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view> | |
| 48 | 63 | </view> |
| 49 | 64 | </navigator> |
| 50 | - <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter"> | |
| 51 | - <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image> | |
| 52 | - </view> | |
| 53 | - </navigator> --> | |
| 65 | + <navigator bindtap="openFilterModal" class="nav-item"> | |
| 66 | + 筛选<view class="ico-filter"> | |
| 67 | + <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image> | |
| 68 | + </view> | |
| 69 | + </navigator> | |
| 54 | 70 | |
| 55 | 71 | <!-- <navigator class="nav-item search" url="/pages/goods/search/search"> |
| 56 | 72 | <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> |
| ... | ... | @@ -66,7 +82,7 @@ |
| 66 | 82 | <view class="item-cont"> |
| 67 | 83 | <view class="title ellipsis-2">{{item.goods_name}}</view> |
| 68 | 84 | <!-- 判断是否有活动价 --> |
| 69 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 }}"> | |
| 85 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}"> | |
| 70 | 86 | <view class="flex on"> |
| 71 | 87 | <!-- 活动价 --> |
| 72 | 88 | <view class="price"> |
| ... | ... | @@ -74,7 +90,7 @@ |
| 74 | 90 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 75 | 91 | <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> |
| 76 | 92 | </view> |
| 77 | -<!-- <view class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>--> | |
| 93 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view> | |
| 78 | 94 | </view> |
| 79 | 95 | |
| 80 | 96 | |
| ... | ... | @@ -101,7 +117,7 @@ |
| 101 | 117 | </view> |
| 102 | 118 | </view> |
| 103 | 119 | <view class="comment"> |
| 104 | -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>--> | |
| 120 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view> | |
| 105 | 121 | <view class="fs24 t-r"> |
| 106 | 122 | <span>评论{{item.comment_count}}</span> |
| 107 | 123 | <span class="pdl30">已售{{item.sales_sum}}</span> |
| ... | ... | @@ -123,7 +139,7 @@ |
| 123 | 139 | <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}"> |
| 124 | 140 | <view class="flex ai-center"> |
| 125 | 141 | <view class="price rmb">{{item.shop_price}}</view> |
| 126 | -<!-- <view class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>--> | |
| 142 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb">{{item.market_price}}</view> | |
| 127 | 143 | </view> |
| 128 | 144 | <view class="comment"> |
| 129 | 145 | <view class="flex ai-center"> |
| ... | ... | @@ -142,7 +158,7 @@ |
| 142 | 158 | <block wx:else> |
| 143 | 159 | <view> |
| 144 | 160 | <view class="price rmb">{{item.shop_price}}</view> |
| 145 | -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>--> | |
| 161 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view> | |
| 146 | 162 | </view> |
| 147 | 163 | <!-- <view class="price">¥{{item.shop_price}}</view> --> |
| 148 | 164 | <view class="comment pdt10"> |
| ... | ... | @@ -157,7 +173,7 @@ |
| 157 | 173 | <view wx:else> |
| 158 | 174 | <view class="flex ai-center"> |
| 159 | 175 | <view class="price rmb">{{item.shop_price}}</view> |
| 160 | -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | |
| 176 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | |
| 161 | 177 | </view> |
| 162 | 178 | |
| 163 | 179 | <view class="comment pdt10"> |
| ... | ... | @@ -189,12 +205,12 @@ |
| 189 | 205 | <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> |
| 190 | 206 | <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> |
| 191 | 207 | </view> |
| 192 | -<!-- <view class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>--> | |
| 208 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view> | |
| 193 | 209 | </view> |
| 194 | 210 | |
| 195 | 211 | |
| 196 | 212 | <view class="comment pdt10"> |
| 197 | - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> --> | |
| 213 | +<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>--> | |
| 198 | 214 | <view class="fs24 t-r"> |
| 199 | 215 | <span>评论{{item.comment_count}}</span> |
| 200 | 216 | <span class="pdl30">已售{{item.sales_sum}}</span> |
| ... | ... | @@ -216,7 +232,7 @@ |
| 216 | 232 | </view> |
| 217 | 233 | </view> |
| 218 | 234 | <view class="comment"> |
| 219 | -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>--> | |
| 235 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view> | |
| 220 | 236 | <view class="fs24 t-r"> |
| 221 | 237 | <span>评论{{item.comment_count}}</span> |
| 222 | 238 | <span class="pdl30">已售{{item.sales_sum}}</span> |
| ... | ... | @@ -226,7 +242,7 @@ |
| 226 | 242 | <block wx:else> |
| 227 | 243 | <view class="price rmb">{{item.shop_price}}</view> |
| 228 | 244 | <view class="comment"> |
| 229 | -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>--> | |
| 245 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view> | |
| 230 | 246 | <view class="fs24 t-r"> |
| 231 | 247 | <span>评论{{item.comment_count}}</span> |
| 232 | 248 | <span class="pdl30">已售{{item.sales_sum}}</span> |
| ... | ... | @@ -238,7 +254,7 @@ |
| 238 | 254 | <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}"> |
| 239 | 255 | <view class="flex ai-center"> |
| 240 | 256 | <view class="price rmb">{{item.shop_price}}</view> |
| 241 | -<!-- <view class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>--> | |
| 257 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb">{{item.market_price}}</view> | |
| 242 | 258 | </view> |
| 243 | 259 | <view class="comment"> |
| 244 | 260 | <view class="flex ai-center"> |
| ... | ... | @@ -257,7 +273,7 @@ |
| 257 | 273 | <block wx:else> |
| 258 | 274 | <view> |
| 259 | 275 | <view class="price rmb">{{item.shop_price}}</view> |
| 260 | -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>--> | |
| 276 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view> | |
| 261 | 277 | </view> |
| 262 | 278 | <!-- <view class="price">¥{{item.shop_price}}</view> --> |
| 263 | 279 | <view class="comment pdt10"> |
| ... | ... | @@ -272,7 +288,7 @@ |
| 272 | 288 | <view wx:else> |
| 273 | 289 | <view class=""> |
| 274 | 290 | <view class="price rmb">{{item.shop_price}}</view> |
| 275 | -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> | |
| 291 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view> | |
| 276 | 292 | </view> |
| 277 | 293 | |
| 278 | 294 | <view class="comment pdt10"> |
| ... | ... | @@ -297,42 +313,8 @@ |
| 297 | 313 | <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator> |
| 298 | 314 | </view> |
| 299 | 315 | </view> |
| 300 | -<view hidden="{{!openFilterModal}}"> | |
| 301 | - <view bindtap="closeFilterModal" class="cover-layer"></view> | |
| 302 | - <view class="filter-modal"> | |
| 303 | - <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 304 | - <button bindtap="restoreData" class="viewall-btn">显示全部分类</button> | |
| 305 | - <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}"> | |
| 306 | - <view class="filter-name">{{item.name}}</view> | |
| 307 | - <view class="filter-items"> | |
| 308 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 309 | - {{item.name}}</view> | |
| 310 | - </view> | |
| 311 | - </view> | |
| 312 | 316 | |
| 313 | - <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}"> | |
| 314 | - <view class="filter-name">{{item.name}}</view> | |
| 315 | - <view class="filter-items"> | |
| 316 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 317 | - {{item.name}}</view> | |
| 318 | - </view> | |
| 319 | - </view> | |
| 320 | - <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}"> | |
| 321 | - <view class="filter-name">相关品牌</view> | |
| 322 | - <view class="filter-items"> | |
| 323 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}"> | |
| 324 | - {{item.name}}</view> | |
| 325 | - </view> | |
| 326 | - </view> | |
| 327 | - <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}"> | |
| 328 | - <view class="filter-name">价格区间</view> | |
| 329 | - <view class="filter-items"> | |
| 330 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}"> | |
| 331 | - {{item.name}}</view> | |
| 332 | - </view> | |
| 333 | - </view> | |
| 334 | - </view> | |
| 335 | - </view> | |
| 317 | +<include src="../com_screen.wxml" /> | |
| 336 | 318 | |
| 337 | 319 | <share_box id="share"></share_box> |
| 338 | 320 | <view class="t-c fs32" wx:if="{{err_txt}}"> | ... | ... |
pages/goods/goodsList/goodsList.wxss
| ... | ... | @@ -165,54 +165,6 @@ page { |
| 165 | 165 | /* padding-right: 30rpx; */ |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -.filter-modal { | |
| 169 | - position: fixed; | |
| 170 | - left: 150rpx; | |
| 171 | - top: 0; | |
| 172 | - right: 0; | |
| 173 | - bottom: 0; | |
| 174 | - z-index: 20; | |
| 175 | - background-color: white; | |
| 176 | - overflow-x: hidden; | |
| 177 | - padding-bottom: 30rpx; | |
| 178 | -} | |
| 179 | - | |
| 180 | -.filter-box { | |
| 181 | - box-sizing: border-box; | |
| 182 | - width: 100%; | |
| 183 | - font-size: 28rpx; | |
| 184 | - padding: 20rpx; | |
| 185 | -} | |
| 186 | - | |
| 187 | -.filter-name { | |
| 188 | - width: 100%; | |
| 189 | - padding: 20rpx 0; | |
| 190 | - word-break: keep-all; | |
| 191 | - white-space: nowrap; | |
| 192 | - text-overflow: ellipsis; | |
| 193 | - overflow: hidden; | |
| 194 | - font-size: 30rpx; | |
| 195 | -} | |
| 196 | - | |
| 197 | -.filter-items { | |
| 198 | - width: 100%; | |
| 199 | -} | |
| 200 | - | |
| 201 | -.filter-item { | |
| 202 | - float: left; | |
| 203 | - width: fit-content; | |
| 204 | - max-width: 500rpx; | |
| 205 | - word-break: keep-all; | |
| 206 | - white-space: nowrap; | |
| 207 | - text-overflow: ellipsis; | |
| 208 | - overflow: hidden; | |
| 209 | - padding: 10rpx; | |
| 210 | - border-radius: 10rpx; | |
| 211 | - border: 1rpx #ddd solid; | |
| 212 | - margin: 0 10rpx 10rpx 0; | |
| 213 | - background-color: #fdfdfd; | |
| 214 | - color: #666; | |
| 215 | -} | |
| 216 | 168 | |
| 217 | 169 | .viewall-btn { |
| 218 | 170 | margin-top: 20rpx; |
| ... | ... | @@ -342,3 +294,5 @@ page { |
| 342 | 294 | color: white; |
| 343 | 295 | padding: 20rpx 50rpx; |
| 344 | 296 | } |
| 297 | + | |
| 298 | +@import '../com_screen.wxss'; | |
| 345 | 299 | \ No newline at end of file | ... | ... |
pages/goods/search/search.js
| ... | ... | @@ -4,6 +4,7 @@ var t = function (t) { |
| 4 | 4 | }; |
| 5 | 5 | }(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"), |
| 6 | 6 | a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting; |
| 7 | +const com_fil = require("../com_screen.js"); | |
| 7 | 8 | |
| 8 | 9 | Page({ |
| 9 | 10 | data: { |
| ... | ... | @@ -16,6 +17,7 @@ Page({ |
| 16 | 17 | openSearchModal: !1, |
| 17 | 18 | baseUrl: "/api/weshop/goods/page?1=1", |
| 18 | 19 | requestUrl: "", |
| 20 | + old_req_url:'', | |
| 19 | 21 | //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ] |
| 20 | 22 | hotWords: null, |
| 21 | 23 | is_no_plus: 1, |
| ... | ... | @@ -27,6 +29,17 @@ Page({ |
| 27 | 29 | is_his: 0, |
| 28 | 30 | hiddenClear: true, |
| 29 | 31 | fliter_flag: false, |
| 32 | + | |
| 33 | + more_sort_arr:[ | |
| 34 | + {name:'综合',value:'sort'}, | |
| 35 | + {name:'新品',value:'on_time'}, | |
| 36 | + {name:'评论',value:'comment_count'}, | |
| 37 | + ], | |
| 38 | + | |
| 39 | + fil_cate_state:0, | |
| 40 | + fil_nation_state:0, | |
| 41 | + fil_brand_state:0, | |
| 42 | + fil_price_state:0, | |
| 30 | 43 | }, |
| 31 | 44 | |
| 32 | 45 | onLoad: function (t) { |
| ... | ... | @@ -86,34 +99,11 @@ Page({ |
| 86 | 99 | var swithc_list = rs.switch_list; |
| 87 | 100 | var sw_arr = JSON.parse(swithc_list); |
| 88 | 101 | //---如果后台又开等级卡的开关--- |
| 89 | - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 90 | - th.setData({ rank_switch: true }); | |
| 91 | - var user = getApp().globalData.userInfo; | |
| 92 | - var ti = setInterval(function () { | |
| 93 | - if (!user) return false; | |
| 94 | - clearInterval(ti); | |
| 95 | - //---回调卡的列表--- | |
| 96 | - th.getPlusCardType(function (ob) { | |
| 97 | - th.setData({ card_list: ob.card_list }); | |
| 98 | - if (user.card_field) { | |
| 99 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 100 | - var end = new Date(str); | |
| 101 | - end = Date.parse(end) / 1000; | |
| 102 | - var now = ut.gettimestamp(); | |
| 103 | - | |
| 104 | - //--- 判断是等级会员,且在有效期范围内 --- | |
| 105 | - if (user.card_field && now < end) { | |
| 106 | - var card_name = ob.name_map.get(user.card_field); | |
| 107 | - if (card_name && card_name.length > 7) card_name = card_name.substring(0, 8); | |
| 108 | - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | |
| 109 | - } | |
| 110 | - } | |
| 111 | - }) | |
| 112 | - }, 500) | |
| 102 | + ut.get_plus_name_price(sw_arr,th); | |
| 103 | + if(sw_arr.is_retail_price){ | |
| 104 | + th.setData({is_retail_price:1}); | |
| 113 | 105 | } |
| 114 | 106 | |
| 115 | - | |
| 116 | - | |
| 117 | 107 | }) |
| 118 | 108 | //e.init(this, "", "requestData"); |
| 119 | 109 | var url = this.data.baseUrl; |
| ... | ... | @@ -387,6 +377,10 @@ Page({ |
| 387 | 377 | if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词"); |
| 388 | 378 | this.data.key_str = t; |
| 389 | 379 | this.resetData(); |
| 380 | + | |
| 381 | + this.data.old_req_url=this.data.baseUrl + "&key_str=" + encodeURIComponent(t); | |
| 382 | + | |
| 383 | + this.set_screen(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)) | |
| 390 | 384 | this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); |
| 391 | 385 | this.historyRecord(); |
| 392 | 386 | }, |
| ... | ... | @@ -571,4 +565,13 @@ Page({ |
| 571 | 565 | openSearchModal: true, |
| 572 | 566 | }); |
| 573 | 567 | }, |
| 568 | + | |
| 569 | + /*-- 和筛选相关的 --*/ | |
| 570 | + bind_pk_sort(e){ com_fil.bind_pk_sort(e,this); }, | |
| 571 | + set_screen(url){ com_fil.set_screen(url,this); }, | |
| 572 | + filterGoods(e){ com_fil.filterGoods(e,this); }, | |
| 573 | + open_more(e){ com_fil.open_more(e,this); }, | |
| 574 | + clear_fil(){ com_fil.clear_fil(this); } | |
| 575 | + | |
| 576 | + | |
| 574 | 577 | }); |
| 575 | 578 | \ No newline at end of file | ... | ... |
pages/goods/search/search.wxml
| ... | ... | @@ -46,28 +46,32 @@ |
| 46 | 46 | <block wx:if="{{!openSearchModal}}"> |
| 47 | 47 | |
| 48 | 48 | <view class="nav flex"> |
| 49 | - <navigator bindtap="changeTab" class="nav-item f1" data-href="sort" data-ad="{{adname}}">综合 | |
| 50 | - <view class="ico-dg" wx:if="{{tabname=='sort'}}"> | |
| 51 | - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 52 | - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 53 | - </view> | |
| 49 | + <navigator class="nav-item f1" > | |
| 50 | + <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name"> | |
| 51 | + <text wx:if="{{tabname=='on_time'}}">新品</text> | |
| 52 | + <text wx:elif="{{tabname=='comment_count'}}">评论</text> | |
| 53 | + <text wx:else>综合</text> | |
| 54 | + </picker> | |
| 55 | + <view class="arrow_down"></view> | |
| 54 | 56 | </navigator> |
| 57 | + | |
| 58 | + | |
| 55 | 59 | <navigator bindtap="changeTab" class="nav-item f1" data-href="sales_sum" data-ad="{{adname}}">销量 |
| 56 | - <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}"> | |
| 57 | - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 58 | - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 59 | - </view> | |
| 60 | + <view> | |
| 61 | + <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view> | |
| 62 | + <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view> | |
| 63 | + </view> | |
| 60 | 64 | </navigator> |
| 61 | 65 | <navigator bindtap="changeTab" class="nav-item f1" data-href="final_price" data-ad="{{adname}}">价格 |
| 62 | - <view class="ico-dg" wx:if="{{tabname=='final_price'}}"> | |
| 63 | - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image> | |
| 64 | - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image> | |
| 65 | - </view> | |
| 66 | + <view> | |
| 67 | + <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view> | |
| 68 | + <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view> | |
| 69 | + </view> | |
| 66 | 70 | </navigator> |
| 67 | - <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter"> | |
| 71 | + <navigator bindtap="openFilterModal" class="nav-item f1">筛选<view class="ico-filter"> | |
| 68 | 72 | <image class="wh100" src="{{url}}/miniapp/images/xx.png"></image> |
| 69 | 73 | </view> |
| 70 | - </navigator> --> | |
| 74 | + </navigator> | |
| 71 | 75 | <!-- <navigator bindtap="openSearchModal" class="nav-item nav-search"> |
| 72 | 76 | <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image> |
| 73 | 77 | </navigator> --> |
| ... | ... | @@ -83,7 +87,7 @@ |
| 83 | 87 | <view class="item-cont"> |
| 84 | 88 | <view class="title ellipsis-2">{{item.goods_name}}</view> |
| 85 | 89 | <!-- 判断是否有活动价,小程序没有有团购和拼单 --> |
| 86 | - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7}}"> | |
| 90 | + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}"> | |
| 87 | 91 | <!-- 活动价 --> |
| 88 | 92 | <view class="price"> |
| 89 | 93 | <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> |
| ... | ... | @@ -111,14 +115,14 @@ |
| 111 | 115 | </view> |
| 112 | 116 | </view> |
| 113 | 117 | <view class="comment flex jc_sb"> |
| 114 | -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>--> | |
| 118 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 115 | 119 | <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> |
| 116 | 120 | </view> |
| 117 | 121 | </block> |
| 118 | 122 | <block wx:else> |
| 119 | 123 | <view class="price">¥{{item.shop_price}}</view> |
| 120 | 124 | <view class="comment flex jc_sb"> |
| 121 | -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>--> | |
| 125 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 122 | 126 | <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> |
| 123 | 127 | </view> |
| 124 | 128 | </block> |
| ... | ... | @@ -127,7 +131,7 @@ |
| 127 | 131 | <block wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}"> |
| 128 | 132 | <view class="flex ai-center"> |
| 129 | 133 | <view class="price">¥{{item.shop_price}}</view> |
| 130 | -<!-- <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view>--> | |
| 134 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
| 131 | 135 | </view> |
| 132 | 136 | <view class="comment flex jc_sb"> |
| 133 | 137 | <view class="flex ai_center"> |
| ... | ... | @@ -145,7 +149,7 @@ |
| 145 | 149 | <block wx:else> |
| 146 | 150 | <view class="price">¥{{item.shop_price}}</view> |
| 147 | 151 | <view class="comment flex jc_sb"> |
| 148 | -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>--> | |
| 152 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 149 | 153 | <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> |
| 150 | 154 | </view> |
| 151 | 155 | </block> |
| ... | ... | @@ -154,7 +158,7 @@ |
| 154 | 158 | <block wx:else> |
| 155 | 159 | <view class="price">¥{{item.shop_price}}</view> |
| 156 | 160 | <view class="comment flex jc_sb"> |
| 157 | -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>--> | |
| 161 | + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view> | |
| 158 | 162 | <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> |
| 159 | 163 | </view> |
| 160 | 164 | </block> |
| ... | ... | @@ -173,38 +177,5 @@ |
| 173 | 177 | |
| 174 | 178 | </block> |
| 175 | 179 | </view> |
| 176 | -<view hidden="{{!openFilterModal}}"> | |
| 177 | - <view bindtap="closeFilterModal" class="cover-layer"></view> | |
| 178 | - <view class="filter-modal"> | |
| 179 | - <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon> | |
| 180 | - <button bindtap="restoreData" class="viewall-btn">显示全部分类</button> | |
| 181 | - <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}"> | |
| 182 | - <view class="filter-name">{{item.name}}</view> | |
| 183 | - <view class="filter-items"> | |
| 184 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 185 | - {{item.name}}</view> | |
| 186 | - </view> | |
| 187 | - </view> | |
| 188 | - <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}"> | |
| 189 | - <view class="filter-name">{{item.name}}</view> | |
| 190 | - <view class="filter-items"> | |
| 191 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}"> | |
| 192 | - {{item.name}}</view> | |
| 193 | - </view> | |
| 194 | - </view> | |
| 195 | - <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}"> | |
| 196 | - <view class="filter-name">相关品牌</view> | |
| 197 | - <view class="filter-items"> | |
| 198 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}"> | |
| 199 | - {{item.name}}</view> | |
| 200 | - </view> | |
| 201 | - </view> | |
| 202 | - <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}"> | |
| 203 | - <view class="filter-name">价格区间</view> | |
| 204 | - <view class="filter-items"> | |
| 205 | - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}"> | |
| 206 | - {{item.name}}</view> | |
| 207 | - </view> | |
| 208 | - </view> | |
| 209 | - </view> | |
| 210 | -</view> | |
| 211 | 180 | \ No newline at end of file |
| 181 | + | |
| 182 | +<include src="../com_screen.wxml" /> | |
| 212 | 183 | \ No newline at end of file | ... | ... |
pages/goods/search/search.wxss
| ... | ... | @@ -114,54 +114,6 @@ |
| 114 | 114 | margin-top: 4rpx; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | -.filter-modal { | |
| 118 | - position: fixed; | |
| 119 | - left: 150rpx; | |
| 120 | - top: 0; | |
| 121 | - right: 0; | |
| 122 | - bottom: 0; | |
| 123 | - z-index: 20; | |
| 124 | - background-color: white; | |
| 125 | - overflow-x: hidden; | |
| 126 | - padding-bottom: 30rpx; | |
| 127 | -} | |
| 128 | - | |
| 129 | -.filter-box { | |
| 130 | - box-sizing: border-box; | |
| 131 | - width: 100%; | |
| 132 | - font-size: 28rpx; | |
| 133 | - padding: 20rpx; | |
| 134 | -} | |
| 135 | - | |
| 136 | -.filter-name { | |
| 137 | - width: 100%; | |
| 138 | - padding: 20rpx 0; | |
| 139 | - word-break: keep-all; | |
| 140 | - white-space: nowrap; | |
| 141 | - text-overflow: ellipsis; | |
| 142 | - overflow: hidden; | |
| 143 | - font-size: 30rpx; | |
| 144 | -} | |
| 145 | - | |
| 146 | -.filter-items { | |
| 147 | - width: 100%; | |
| 148 | -} | |
| 149 | - | |
| 150 | -.filter-item { | |
| 151 | - float: left; | |
| 152 | - width: fit-content; | |
| 153 | - max-width: 500rpx; | |
| 154 | - word-break: keep-all; | |
| 155 | - white-space: nowrap; | |
| 156 | - text-overflow: ellipsis; | |
| 157 | - overflow: hidden; | |
| 158 | - padding: 10rpx; | |
| 159 | - border-radius: 10rpx; | |
| 160 | - border: 1rpx #ddd solid; | |
| 161 | - margin: 0 10rpx 10rpx 0; | |
| 162 | - background-color: #fdfdfd; | |
| 163 | - color: #666; | |
| 164 | -} | |
| 165 | 117 | |
| 166 | 118 | .viewall-btn { |
| 167 | 119 | margin-top: 20rpx; |
| ... | ... | @@ -439,4 +391,7 @@ |
| 439 | 391 | width: 80%; |
| 440 | 392 | z-index: 1000; |
| 441 | 393 | transition: all .5s; |
| 442 | -} | |
| 443 | 394 | \ No newline at end of file |
| 395 | +} | |
| 396 | + | |
| 397 | + | |
| 398 | +@import '../com_screen.wxss'; | |
| 444 | 399 | \ No newline at end of file | ... | ... |
pages/index/index/index.js
| ... | ... | @@ -86,6 +86,7 @@ Page({ |
| 86 | 86 | is_ok_h5: 0, //判断要不要显示关注二维码 |
| 87 | 87 | |
| 88 | 88 | container: null, |
| 89 | + is_retail_price:0, | |
| 89 | 90 | }, |
| 90 | 91 | |
| 91 | 92 | |
| ... | ... | @@ -125,6 +126,12 @@ Page({ |
| 125 | 126 | |
| 126 | 127 | var th = this; |
| 127 | 128 | getApp().getConfig2(function (config2) { |
| 129 | + var swithc_list = config2.switch_list; | |
| 130 | + var sw_arr = JSON.parse(swithc_list); | |
| 131 | + if(sw_arr.is_retail_price){ | |
| 132 | + th.setData({is_retail_price:1}); | |
| 133 | + } | |
| 134 | + | |
| 128 | 135 | if (config2 && config2.is_overdue == 1) { |
| 129 | 136 | getApp().promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=5", {}).then(res => { |
| 130 | 137 | var o = res; |
| ... | ... | @@ -361,7 +368,8 @@ Page({ |
| 361 | 368 | console.log(this.data.isTemplate, '首页'); |
| 362 | 369 | |
| 363 | 370 | if (!this.data.isTemplate) { |
| 364 | - var pre_data = { store_id: os.stoid, is_end: 0, timetype: 1, isuse: 1 }; | |
| 371 | + // timetype: 1 仅查询已预售 置空查询全部, | |
| 372 | + var pre_data = { store_id: os.stoid, is_end: 0, isuse: 1 }; | |
| 365 | 373 | if (user_id) { |
| 366 | 374 | pre_data.user_id = user_id; |
| 367 | 375 | } |
| ... | ... | @@ -370,7 +378,25 @@ Page({ |
| 370 | 378 | data: pre_data, |
| 371 | 379 | success: function (e) { |
| 372 | 380 | if (e.data.code == 0 && e.data.data.pageData && e.data.data.pageData.length > 0) { |
| 373 | - var pre_data = e.data.data.pageData; | |
| 381 | + var pre_data = e.data.data.pageData; | |
| 382 | + //当前时间戳 | |
| 383 | + var st = ut.gettimestamp(); | |
| 384 | + | |
| 385 | + pre_data.forEach(function (val, ind) { | |
| 386 | + | |
| 387 | + if (val.user_price) val.price = val.user_price; | |
| 388 | + if (val.start_time > st) { | |
| 389 | + pre_data[ind].status = 0; | |
| 390 | + } else if (val.end_time > st) { | |
| 391 | + pre_data[ind].status = 1; | |
| 392 | + } else { | |
| 393 | + pre_data[ind].status = 2; | |
| 394 | + } | |
| 395 | + | |
| 396 | + // if (val.buy_num >= val.goods_num) { | |
| 397 | + // pre_data[ind].status = 2; | |
| 398 | + // } | |
| 399 | + }); | |
| 374 | 400 | var arr = new Array(); |
| 375 | 401 | //--三个三个一组--- |
| 376 | 402 | for (var i = 0; i < pre_data.length; i += 3) { |
| ... | ... | @@ -770,7 +796,7 @@ Page({ |
| 770 | 796 | let goodsGroupArr = this.data.goodsGroupArr |
| 771 | 797 | if (this.data.isTemplate && goodsGroupArr.length >0) { |
| 772 | 798 | goodsGroupArr.map(item=>{ |
| 773 | - this[item].automore() | |
| 799 | + if(this[item]) this[item].automore() | |
| 774 | 800 | }) |
| 775 | 801 | } |
| 776 | 802 | ... | ... |
pages/index/index/index.wxml
| ... | ... | @@ -145,7 +145,7 @@ |
| 145 | 145 | </navigator> |
| 146 | 146 | <view class="seckill-list"> |
| 147 | 147 | <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange"> |
| 148 | - <swiper-item wx:for="{{saleGoods}}" wx:key="{{index}}" class="p_swiper" wx:key="saleGoods" style="padding: 0; margin-left: 10rpx"> | |
| 148 | + <swiper-item wx:for="{{saleGoods}}" class="p_swiper" wx:key="saleGoods" style="padding: 0; margin-left: 10rpx"> | |
| 149 | 149 | <navigator style="flex-shrink: 0;width: 247rpx" class="nav" hover-class="none" url="{{aitem.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + aitem.goods_id + '&title=' + aitem.goods_name + '&prom_type=1&prom_id=' + aitem.id )}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind"> |
| 150 | 150 | <view class="imgview"> |
| 151 | 151 | <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="saleGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> |
| ... | ... | @@ -158,6 +158,7 @@ |
| 158 | 158 | <!-- <view class="red-co mar-top10 is_seckill_height"> --> |
| 159 | 159 | <view class="co-red mar-top10"> |
| 160 | 160 | <text class="fs20">¥</text>{{aitem.price}} |
| 161 | + <text wx:if="{{is_retail_price}}" class="un_line">¥{{aitem.market_price}}</text> | |
| 161 | 162 | </view> |
| 162 | 163 | </navigator> |
| 163 | 164 | |
| ... | ... | @@ -189,14 +190,19 @@ |
| 189 | 190 | <navigator bindtap="go_pre" class="nav" hover-class="none" |
| 190 | 191 | data-url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&pre_id={{aitem.id}}" |
| 191 | 192 | wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind"> |
| 192 | - <view class="imgview presell"> | |
| 193 | + <!-- <view class="imgview presell"> --> | |
| 194 | + <view class="imgview"> | |
| 193 | 195 | <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="preGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image> |
| 196 | + | |
| 197 | + <image wx:if="{{aitem.status==0}}" class="status_img" src="{{url}}/miniapp/images/miao/yure.png"/> | |
| 198 | + <image wx:elif="{{aitem.status==1}}" class="status_img" src="{{url}}/miniapp/images/miao/going.png"/> | |
| 199 | + <image wx:else="{{aitem.status==2}}" class="status_img" src="{{url}}/miniapp/images/miao/mend.png"/> | |
| 194 | 200 | </view> |
| 195 | 201 | <view class="ellipsis-2 mar-top10" style="height: 75rpx; width: 200rpx">{{aitem.act_name}}</view> |
| 196 | 202 | <view class="co-red mar-top10 flex jc_sb ali-c"> |
| 197 | 203 | <view> |
| 198 | 204 | <text><text class="fs20">¥</text>{{aitem.presell_price}}</text> |
| 199 | -<!-- <text class="un_line">¥{{aitem.shop_price}}</text>--> | |
| 205 | + <text wx:if="{{is_retail_price}}" class="un_line">¥{{aitem.market_price}}</text> | |
| 200 | 206 | </view> |
| 201 | 207 | <view class="btn-buy">去抢购</view> |
| 202 | 208 | </view> |
| ... | ... | @@ -233,7 +239,7 @@ |
| 233 | 239 | <view> |
| 234 | 240 | <view class="flex ai-center"> |
| 235 | 241 | <text class="rmb c-red">{{filter.price(item.group_price)}}</text> |
| 236 | -<!-- <view class="del fs22 c-a pdl10"><text class="rmb">{{item.shop_price}}</text></view>--> | |
| 242 | + <view wx:if="{{is_retail_price}}" class="del fs22 c-a pdl10"><text class="rmb">{{item.market_price}}</text></view> | |
| 237 | 243 | </view> |
| 238 | 244 | <view class="flex jc_sb"> |
| 239 | 245 | <progress class="pdr20 f1 progress" percent="{{filter.percent(item.num, item.group_num)}}" activeColor="#FF6768" backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="{{item.num}}人已参团"></progress> |
| ... | ... | @@ -319,7 +325,7 @@ |
| 319 | 325 | <view class="fs40 flex xc-top15 {{aitem.is_team_tepy==0?'blue_c ai-bas':' red-co ai-bas'}}"> |
| 320 | 326 | <text class="fs28 {{aitem.is_team_tepy==0?'martop4':''}}">¥</text> |
| 321 | 327 | <text style="margin-left:-5rpx">{{aitem.price}}</text> |
| 322 | -<!-- <span class="underline {{type==0?'martop18':''}}">¥{{aitem.shop_price}}</span>--> | |
| 328 | + <span wx:if="{{is_retail_price}}" class="underline {{type==0?'martop18':''}}">¥{{aitem.market_price}}</span> | |
| 323 | 329 | </view> |
| 324 | 330 | |
| 325 | 331 | </view> |
| ... | ... | @@ -395,13 +401,13 @@ |
| 395 | 401 | <view> |
| 396 | 402 | <block wx:for="{{template_arr}}" > |
| 397 | 403 | <block wx:if="{{item.content.is_top==1}}"> |
| 398 | - <view style="height:100rpx"></view> | |
| 404 | + <view style="height:91rpx"></view> | |
| 399 | 405 | </block> |
| 400 | 406 | </block> |
| 401 | 407 | |
| 402 | 408 | </view> |
| 403 | 409 | |
| 404 | - <block wx:for="{{template_arr}}" wx:key="{{index}}"> | |
| 410 | + <block wx:for="{{template_arr}}" wx:key="index"> | |
| 405 | 411 | <view> |
| 406 | 412 | <!--导航--> |
| 407 | 413 | <block wx:if="{{item.ename=='nav'}}"> | ... | ... |
pages/user/assistance/assistance.wxml
| ... | ... | @@ -71,6 +71,9 @@ |
| 71 | 71 | <view class="flex-center width state" wx:if="{{item.status==0}}" data-taskId="{{item.helpTaskId}}" bindtap="go_to_task"> |
| 72 | 72 | <view class="ellipsis-1">{{item.zlHelpNum}}/{{item.helpNum}}</view> |
| 73 | 73 | </view> |
| 74 | + <view class="flex-center width " wx:if="{{item.status==3}}"> | |
| 75 | + <view class="ellipsis-1">已失效</view> | |
| 76 | + </view> | |
| 74 | 77 | <view class="flex-center width state" wx:if="{{item.status==2}}"> |
| 75 | 78 | <view class="ellipsis-1" bindtap="select_libao" data-orderSn="{{item.orderSn}}">查看礼包</view> |
| 76 | 79 | </view> | ... | ... |
pages/user/assistance/friend_assistance.js
| ... | ... | @@ -21,14 +21,16 @@ Page({ |
| 21 | 21 | userId: 0, //任务用户的ID |
| 22 | 22 | s_num: 0, //分享的人数 |
| 23 | 23 | taskId:0, //活动从表ID |
| 24 | - helpId:0, | |
| 24 | + helpId:0, | |
| 25 | + invalidTime:0, //任务失效时间戳 | |
| 25 | 26 | }, |
| 26 | 27 | |
| 27 | 28 | /** |
| 28 | 29 | * 生命周期函数--监听页面加载 |
| 29 | 30 | */ |
| 30 | 31 | onLoad: function(options) { |
| 31 | - | |
| 32 | + console.log('助力——————————————————————————————'); | |
| 33 | + console.log(options); | |
| 32 | 34 | var th = this; |
| 33 | 35 | |
| 34 | 36 | var nav_b = th.selectComponent("#nav_b"); //组件的id |
| ... | ... | @@ -38,7 +40,7 @@ Page({ |
| 38 | 40 | if (options.userId) this.data.userId = options.userId; |
| 39 | 41 | //任务是不是为空 |
| 40 | 42 | if (this.data.tasking == 0 || this.data.tasking == undefined) { |
| 41 | - this.data.tasking = decodeURIComponent(options.scene); | |
| 43 | + this.data.tasking = decodeURIComponent(options.scene); | |
| 42 | 44 | } |
| 43 | 45 | |
| 44 | 46 | }, |
| ... | ... | @@ -73,10 +75,19 @@ Page({ |
| 73 | 75 | storeId: os.stoid |
| 74 | 76 | } |
| 75 | 77 | }).then(res => { |
| 78 | + console.log('任务时间-------------------------'); | |
| 79 | + console.log(res); | |
| 76 | 80 | if (res.data.code == 0) { |
| 81 | + | |
| 77 | 82 | th.data.userId = res.data.data.userId; |
| 78 | 83 | th.data.taskId = res.data.data.helpTaskId; |
| 79 | - th.data.helpId=res.data.data.helpFormId; | |
| 84 | + th.data.helpId=res.data.data.helpFormId; | |
| 85 | + // th.invalidTime = res.data.data.invalidTime | |
| 86 | + // th.setData({ | |
| 87 | + // invalidTime:1662138310 | |
| 88 | + // }) | |
| 89 | + let openTime = res.data.data.openTime | |
| 90 | + th.getInvalidTime(openTime) | |
| 80 | 91 | //获取活动的时间 |
| 81 | 92 | return getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", { |
| 82 | 93 | data: { |
| ... | ... | @@ -110,9 +121,45 @@ Page({ |
| 110 | 121 | }) |
| 111 | 122 | |
| 112 | 123 | } |
| 113 | - }, | |
| 124 | + }, | |
| 125 | + getInvalidTime(openTime=0){ | |
| 126 | + let th = this | |
| 127 | + rq.get("/api/weshop/marketing/giftbag/helpinfo/get", { | |
| 128 | + data: { | |
| 129 | + storeId: os.stoid, | |
| 130 | + // userId: user_id, | |
| 131 | + taskId: th.data.taskId, | |
| 132 | + helpId:th.data.helpId | |
| 133 | + }, | |
| 134 | + success: function (res) { | |
| 135 | + console.log('获取失效时间------'); | |
| 136 | + console.log(res); | |
| 137 | + if (res.data.code == 0) { | |
| 138 | + let validTime=res.data.data.validTime | |
| 139 | + let invalidTime =0 | |
| 140 | + if (openTime && validTime > 0) { | |
| 141 | + invalidTime = openTime*1 + validTime*60*60 | |
| 142 | + } | |
| 143 | + th.setData({ | |
| 144 | + invalidTime | |
| 145 | + }); | |
| 146 | + } | |
| 147 | + } | |
| 148 | + }) | |
| 149 | + }, | |
| 114 | 150 | //点击开启礼盒 |
| 115 | 151 | cklie_button: function() { |
| 152 | + //判断任务是否失效 | |
| 153 | + let invalidTime = this.data.invalidTime | |
| 154 | + let nowTime = parseInt((new Date().getTime())/1000) | |
| 155 | + if (invalidTime > 0) { | |
| 156 | + let disTime = invalidTime - nowTime | |
| 157 | + if (disTime <=0) { | |
| 158 | + getApp().showWarning("该任务已失效"); | |
| 159 | + return | |
| 160 | + } | |
| 161 | + } | |
| 162 | + | |
| 116 | 163 | var th = this; |
| 117 | 164 | //--先判断会员状态-- |
| 118 | 165 | var user_info = getApp().globalData.userInfo; | ... | ... |
pages/user/assistance/task_assistance.js
| ... | ... | @@ -7,6 +7,7 @@ var e = getApp(), |
| 7 | 7 | s = e.globalData.setting, |
| 8 | 8 | os = s, |
| 9 | 9 | app_d = e.globalData; |
| 10 | + var invalidSetTime = null | |
| 10 | 11 | var regeneratorRuntime = require('../../../utils/runtime.js'); |
| 11 | 12 | Page({ |
| 12 | 13 | /** |
| ... | ... | @@ -65,7 +66,15 @@ Page({ |
| 65 | 66 | zltime: "", //助力时间 |
| 66 | 67 | djs: "", //定时器的显示 |
| 67 | 68 | //*********************************************end |
| 68 | - | |
| 69 | + //距离失效------ | |
| 70 | + invalidTime:0, | |
| 71 | + invalidState:true, | |
| 72 | + invalidObj:{ | |
| 73 | + h:'00', | |
| 74 | + m:'00', | |
| 75 | + s:'00' | |
| 76 | + }, | |
| 77 | + //-------------- | |
| 69 | 78 | // Hei: 0, |
| 70 | 79 | max_sw_height: 0, |
| 71 | 80 | |
| ... | ... | @@ -76,7 +85,7 @@ Page({ |
| 76 | 85 | font_color:'', |
| 77 | 86 | }, |
| 78 | 87 | |
| 79 | - /** | |
| 88 | + /** | |
| 80 | 89 | * 生命周期函数--监听页面加载 |
| 81 | 90 | */ |
| 82 | 91 | onLoad: function (options) { |
| ... | ... | @@ -443,6 +452,12 @@ Page({ |
| 443 | 452 | }, |
| 444 | 453 | //判断是否有领取任务 获取正在进行中的任务 |
| 445 | 454 | get_user_task: function () { |
| 455 | + invalidSetTime ? clearTimeout(invalidSetTime) :'' | |
| 456 | + this.setData({ | |
| 457 | + invalidObj:{ h:'00', m:'00',s:'00'}, | |
| 458 | + invalidState:true, | |
| 459 | + invalidTime:0 | |
| 460 | + }) | |
| 446 | 461 | var user_id = getApp().globalData.user_id; |
| 447 | 462 | var th = this; |
| 448 | 463 | var aitem = th.data.aitem; |
| ... | ... | @@ -452,18 +467,83 @@ Page({ |
| 452 | 467 | data: { |
| 453 | 468 | storeId: os.stoid, |
| 454 | 469 | userId: user_id, |
| 455 | - taskId: taskid | |
| 470 | + taskId: taskid | |
| 456 | 471 | }, |
| 457 | 472 | success: function (res) { |
| 473 | + console.log('任务---------------------------------------'); | |
| 474 | + console.log(res); | |
| 458 | 475 | if (res.data.code == 0) { |
| 459 | 476 | var is_usertask = res.data.data; |
| 460 | 477 | th.setData({ |
| 461 | - is_user_task: is_usertask | |
| 478 | + is_user_task: is_usertask, | |
| 462 | 479 | }); |
| 480 | + th.getInvalidTime(taskid) | |
| 463 | 481 | } |
| 464 | 482 | } |
| 465 | 483 | }) |
| 466 | 484 | }, |
| 485 | + //获取失效时间 | |
| 486 | + getInvalidTime(taskid){ | |
| 487 | + let th = this | |
| 488 | + rq.get("/api/weshop/marketing/giftbag/helpinfo/get", { | |
| 489 | + data: { | |
| 490 | + storeId: os.stoid, | |
| 491 | + // userId: user_id, | |
| 492 | + taskId: taskid, | |
| 493 | + helpId:th.data.help_id | |
| 494 | + }, | |
| 495 | + success: function (res) { | |
| 496 | + console.log('获取失效时间------'); | |
| 497 | + console.log(res); | |
| 498 | + if (res.data.code == 0) { | |
| 499 | + let openTime =th.data.is_user_task ? th.data.is_user_task.openTime : 0 | |
| 500 | + let validTime=res.data.data.validTime | |
| 501 | + let invalidTime =0 | |
| 502 | + if (openTime && validTime > 0) { | |
| 503 | + invalidTime = openTime*1 + validTime*60*60 | |
| 504 | + } | |
| 505 | + th.setData({ | |
| 506 | + invalidTime | |
| 507 | + }); | |
| 508 | + | |
| 509 | + th.invalid_count_down() //失效倒计时 | |
| 510 | + } | |
| 511 | + } | |
| 512 | + }) | |
| 513 | + }, | |
| 514 | + // 距离失效倒计时 | |
| 515 | + invalid_count_down(){ | |
| 516 | + | |
| 517 | + let invalidTime = this.data.invalidTime | |
| 518 | + let nowTime = parseInt((new Date().getTime())/1000) | |
| 519 | + if (invalidTime) { | |
| 520 | + let disTime = invalidTime - nowTime | |
| 521 | + if (disTime>0) { | |
| 522 | + let h = parseInt(disTime/(60*60)) | |
| 523 | + h = h*1 < 10 ? '0'+ h : h | |
| 524 | + let m= parseInt((disTime/60)%60) | |
| 525 | + m = m*1 < 10 ? '0' + m : m | |
| 526 | + let s = disTime % 60 | |
| 527 | + s = s*1 < 10 ? '0'+s : s | |
| 528 | + this.setData({ | |
| 529 | + 'invalidObj.h':h, | |
| 530 | + 'invalidObj.m':m, | |
| 531 | + 'invalidObj.s':s, | |
| 532 | + }) | |
| 533 | + invalidSetTime=setTimeout(this.invalid_count_down,1000) | |
| 534 | + }else{ | |
| 535 | + this.setData({ | |
| 536 | + invalidObj:{ h:'00', m:'00',s:'00'}, | |
| 537 | + invalidState:false | |
| 538 | + }) | |
| 539 | + } | |
| 540 | + }else{ | |
| 541 | + this.setData({ | |
| 542 | + invalidObj:{h:'00', m:'00',s:'00'} | |
| 543 | + }) | |
| 544 | + } | |
| 545 | + }, | |
| 546 | + | |
| 467 | 547 | //获取助力活动参与的人数 |
| 468 | 548 | get_user_task_num: function () { |
| 469 | 549 | var th = this; |
| ... | ... | @@ -686,11 +766,13 @@ Page({ |
| 686 | 766 | ///二微码 |
| 687 | 767 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
| 688 | 768 | os.stoid + "?sceneValue=" + scene + "&pageValue=pages/user/assistance/friend_assistance"; |
| 689 | - //读取文件成功则OK-- | |
| 769 | + console.log('二维码路径'); | |
| 770 | + console.log(path3); | |
| 771 | + //读取文件成功则OK-- | |
| 690 | 772 | wx.getImageInfo({ |
| 691 | 773 | src: path3, |
| 692 | 774 | success: function (res) { |
| 693 | - | |
| 775 | + | |
| 694 | 776 | var ewm_path = res.path; // |
| 695 | 777 | //var act_time="2019.06.26 - 2019.07.02"; //活动的时间 |
| 696 | 778 | var bg_time = ut.formar_no_full(th.data.dynamic.beginDate,'.'); |
| ... | ... | @@ -939,6 +1021,10 @@ Page({ |
| 939 | 1021 | |
| 940 | 1022 | //好友猜一猜 |
| 941 | 1023 | save_share: function (e) { |
| 1024 | + if (!this.data.invalidState) { | |
| 1025 | + getApp().showWarning("该任务已失效"); | |
| 1026 | + return | |
| 1027 | + } | |
| 942 | 1028 | var th = this; |
| 943 | 1029 | var aitem = this.data.aitem; //任务的数据集 |
| 944 | 1030 | var sw_index = this.data.sw_index; //轮播的下标 |
| ... | ... | @@ -987,7 +1073,7 @@ Page({ |
| 987 | 1073 | var block = th.data.block; |
| 988 | 1074 | if (images) { |
| 989 | 1075 | th.data.head_pic_arr.length = 0; |
| 990 | - for (var i in images) {s | |
| 1076 | + for (var i in images) { | |
| 991 | 1077 | var img_path = images[i].headPic; |
| 992 | 1078 | img_path=img_path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); |
| 993 | 1079 | img_path=img_path.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | ... | ... |
pages/user/assistance/task_assistance.wxml
| 1 | 1 | <wxs module="filter" src="../../../utils/filter.wxs"></wxs> |
| 2 | 2 | <view class="container" style="background-color:#{{bg_color ? bg_color:'d01119'}}"> |
| 3 | - <view class="top-back" style="background-color:#{{bg_color ? bg_color:'d01119'}};padding-bottom:80rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> | |
| 3 | + <view class="top-back" style="background-color:#{{bg_color ? bg_color:'d01119'}};padding-bottom:40rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> | |
| 4 | 4 | <!-- <view class="top-back" style="padding-bottom:{{is_user_task!=null&&is_user_task.status==0?50:0}}rpx;background-image: url({{iurl}}/miniapp/images/friendhelp/lumi.png)" bindtap="close"> --> |
| 5 | 5 | <!-- 助力活动头部 --> |
| 6 | 6 | <view class="top-frame"> |
| ... | ... | @@ -55,17 +55,18 @@ |
| 55 | 55 | style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> |
| 56 | 56 | 就选它了 |
| 57 | 57 | </view> |
| 58 | - <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}" class="task_clike fs40 t-c flex-center" bindtap="save_share" | |
| 58 | + <view wx:if="{{ is_user_task!=null&&is_user_task.status==0}}" class="task_clike fs40 t-c flex-center" bindtap="save_share" | |
| 59 | 59 | style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> |
| 60 | 60 | 好友拆一拆 |
| 61 | 61 | </view> |
| 62 | 62 | <!-- 任务超时失效 --> |
| 63 | - <!-- <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}"> | |
| 64 | - <text>距离失效</text> | |
| 65 | - <view><text>15</text>:<text>45</text>:<text>10</text></view> | |
| 66 | - </view> --> | |
| 63 | + <view class="invalid fs28" wx:if="{{ is_user_task!=null && is_user_task.status==0 && invalidTime !=0}}"> | |
| 64 | + <text>距离失效:</text> | |
| 65 | + <view class="invalid_info" wx:if="{{invalidState}}"><text>{{invalidObj.h}}</text>:<text>{{invalidObj.m}}</text>:<text>{{invalidObj.s}}</text></view> | |
| 66 | + <view class="invalid_info" wx:else>该任务已失效</view> | |
| 67 | + </view> | |
| 67 | 68 | |
| 68 | - <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now" | |
| 69 | + <view wx:if="{{ is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now" | |
| 69 | 70 | style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};"> |
| 70 | 71 | 立即兑换 |
| 71 | 72 | </view> |
| ... | ... | @@ -103,9 +104,10 @@ |
| 103 | 104 | <view class="ellipsis-1">{{item.helpTaskName}} |
| 104 | 105 | </view> |
| 105 | 106 | </view> |
| 106 | - <view class="flex-center width state"> | |
| 107 | + <view class="flex-center width " style="{{item.status !=3 ? ' text-decoration: underline;' :''}}"> | |
| 107 | 108 | <view class="ellipsis-1"> |
| 108 | 109 | <text wx:if="{{item.status==0}}" bindtap="go_task" data-taskid="{{item.helpTaskId}}">{{item.zlHelpNum}}/{{item.helpNum}}</text> |
| 110 | + <text wx:if="{{item.status==3}}" >已失效</text> | |
| 109 | 111 | <text wx:if="{{item.status==2}}" bindtap="select_libao" data-orderSn="{{item.orderSn}}">查看礼包</text> |
| 110 | 112 | <text wx:if="{{item.status==1}}" bindtap="get_libao" data-libaoid="{{item.helpListGiftBagId}}"data-taskingid="{{item.id}}" data-taskid="{{item.helpTaskId}}">领取礼包 </text> |
| 111 | 113 | </view> | ... | ... |
pages/user/assistance/task_assistance.wxss
| ... | ... | @@ -256,3 +256,25 @@ line-height: 48rpx; |
| 256 | 256 | image{ |
| 257 | 257 | -webkit-touch-callout:none |
| 258 | 258 | } |
| 259 | +.invalid{ | |
| 260 | + width: 100%; | |
| 261 | + height: 80rpx; | |
| 262 | + margin: 20rpx 0; | |
| 263 | + display: flex; | |
| 264 | + justify-content: center; | |
| 265 | + align-items: center; | |
| 266 | + color: #fff; | |
| 267 | + | |
| 268 | +} | |
| 269 | +.invalid_info{ | |
| 270 | + width: 180rpx; | |
| 271 | + padding: 10rpx; | |
| 272 | + color: #000; | |
| 273 | + background-color: #fff; | |
| 274 | + margin-left: 20rpx; | |
| 275 | + border: 1rpx solid #fff; | |
| 276 | + border-radius: 10rpx; | |
| 277 | + display: flex; | |
| 278 | + align-items: center; | |
| 279 | + justify-content: space-around; | |
| 280 | +} | |
| 259 | 281 | \ No newline at end of file | ... | ... |
pages/user/index/index.js
pages/user/index/index.wxml
| ... | ... | @@ -90,7 +90,7 @@ |
| 90 | 90 | <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image> |
| 91 | 91 | <view class="member fs28 "> 加入plus会员预计可省3031元</view> |
| 92 | 92 | </view> |
| 93 | - <view class="xc-opening-button t-c" data-url="/pages/user/cardinfo/cardinfo" bindtap="goto"> | |
| 93 | + <view class="xc-opening-button t-c" data-url="/packageE/pages/user/cardinfo/cardinfo" bindtap="goto"> | |
| 94 | 94 | <view class="xc-opening fs28">立即续费</view> |
| 95 | 95 | </view> |
| 96 | 96 | </view> | ... | ... |
pages/user/order_list/order_list.js
| ... | ... | @@ -481,6 +481,35 @@ Page({ |
| 481 | 481 | } |
| 482 | 482 | }); |
| 483 | 483 | }, |
| 484 | + | |
| 485 | + //-----删除订单(完成和带评价的)----- | |
| 486 | + deleteOrderData_: function(t) { | |
| 487 | + var th = this; | |
| 488 | + var order_id = t.currentTarget.dataset.order_id; | |
| 489 | + var index = t.currentTarget.dataset.index; | |
| 490 | + var up_data={order_id: order_id,isdel:1}; | |
| 491 | + | |
| 492 | + | |
| 493 | + wx.showModal({ | |
| 494 | + title: "是否删除订单?", | |
| 495 | + success: function(tt) { | |
| 496 | + tt.confirm && rq.put("/api/weshop/order/updatebyId", { | |
| 497 | + data: up_data, | |
| 498 | + success: function(t) { | |
| 499 | + for (var e = 0; e < th.data.orderList.length; e++) | |
| 500 | + if (th.data.orderList[e].order_id == order_id) { | |
| 501 | + th.data.orderList.splice(e, 1), th.setData({ | |
| 502 | + orderList: th.data.orderList | |
| 503 | + }); | |
| 504 | + break; | |
| 505 | + } | |
| 506 | + } | |
| 507 | + }) | |
| 508 | + } | |
| 509 | + }); | |
| 510 | + }, | |
| 511 | + | |
| 512 | + | |
| 484 | 513 | //-----删除订单----- |
| 485 | 514 | deleteSerOrderData: function(t) { |
| 486 | 515 | var th = this; | ... | ... |
pages/user/order_list/order_list.wxml
| ... | ... | @@ -74,10 +74,10 @@ |
| 74 | 74 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view> |
| 75 | 75 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view> |
| 76 | 76 | <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view> |
| 77 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 77 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 78 | 78 | </view> |
| 79 | 79 | <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view> |
| 80 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 80 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 81 | 81 | </view> |
| 82 | 82 | <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> |
| 83 | 83 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> |
| ... | ... | @@ -95,10 +95,10 @@ |
| 95 | 95 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0 && item.team_status == 2)}}">待发货</view> |
| 96 | 96 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1 && item.team_status == 2)}}">待收货</view> |
| 97 | 97 | <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view> |
| 98 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 98 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 99 | 99 | </view> |
| 100 | 100 | <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view> |
| 101 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 101 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 102 | 102 | </view> |
| 103 | 103 | <view wx:if="{{item.pay_status == 0 && item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> |
| 104 | 104 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> |
| ... | ... | @@ -112,10 +112,10 @@ |
| 112 | 112 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0)}}">待发货</view> |
| 113 | 113 | <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">待收货</view> |
| 114 | 114 | <view wx:if="{{(item.order_status==2)}}" class="flex-center">待评价<view class="lin"></view> |
| 115 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 115 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 116 | 116 | </view> |
| 117 | 117 | <view wx:if="{{item.order_status==4}}" class="flex-center">已评价<view class="lin"></view> |
| 118 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 118 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData_" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> | |
| 119 | 119 | </view> |
| 120 | 120 | <view wx:if="{{item.order_status==3 && item.pt_status!=6}}" class="flex-center" >已取消<view class="lin"></view> |
| 121 | 121 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteOrderData" data-index="{{index}}" data-order_id="{{item.order_id}}"></image> |
| ... | ... | @@ -310,7 +310,7 @@ |
| 310 | 310 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> |
| 311 | 311 | </view> |
| 312 | 312 | <view wx:if="{{item.order_status == 2}}" class="flex-center">已评价<view class="lin"></view> |
| 313 | - <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> | |
| 313 | + <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> | |
| 314 | 314 | </view> |
| 315 | 315 | <view wx:if="{{item.order_status == 3}}" class="c-a9" class="flex-center">已取消<view class="lin"></view> |
| 316 | 316 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" ></image> | ... | ... |
pages/user/plus/plus.js
| ... | ... | @@ -64,10 +64,27 @@ Page({ |
| 64 | 64 | }) |
| 65 | 65 | } |
| 66 | 66 | }) |
| 67 | + | |
| 68 | + | |
| 69 | + //二维码的带入 | |
| 67 | 70 | var fir_leader = options.scene; |
| 68 | - if (fir_leader) that.setData({ | |
| 69 | - fir_leader: fir_leader | |
| 70 | - }) | |
| 71 | + if (fir_leader){ | |
| 72 | + | |
| 73 | + that.setData({ | |
| 74 | + fir_leader: fir_leader | |
| 75 | + }) | |
| 76 | + | |
| 77 | + //-- user_id代过来免登录 -- | |
| 78 | + getApp().globalData.first_leader = fir_leader; | |
| 79 | + //调用接口判断是不是会员 | |
| 80 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + fir_leader, {}).then(res => { | |
| 81 | + if (res.data.code == 0) { | |
| 82 | + getApp().globalData.guide_id = res.data.data.id; | |
| 83 | + } | |
| 84 | + }) | |
| 85 | + } | |
| 86 | + | |
| 87 | + | |
| 71 | 88 | //--先判断会员状态-- |
| 72 | 89 | var user_info = getApp().globalData.userInfo; |
| 73 | 90 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| ... | ... | @@ -157,7 +174,7 @@ Page({ |
| 157 | 174 | success: function (e) { |
| 158 | 175 | var userInfo = e.data.data; |
| 159 | 176 | if (userInfo['card_field'] && !getApp().globalData.is_card_back) { |
| 160 | - var u_url = "/pages/user/cardinfo/cardinfo"; | |
| 177 | + var u_url = "/packageE/pages/user/cardinfo/cardinfo"; | |
| 161 | 178 | wx.reLaunch({ |
| 162 | 179 | url: u_url |
| 163 | 180 | }) |
| ... | ... | @@ -484,7 +501,7 @@ Page({ |
| 484 | 501 | }); |
| 485 | 502 | return false; |
| 486 | 503 | } else { |
| 487 | - var u_url = "/pages/user/cardinfo/cardinfo"; | |
| 504 | + var u_url = "/packageE/pages/user/cardinfo/cardinfo"; | |
| 488 | 505 | wx.reLaunch({ |
| 489 | 506 | url: u_url |
| 490 | 507 | }) | ... | ... |
utils/barcode.js
| ... | ... | @@ -197,7 +197,7 @@ function stringToCode128(text) { |
| 197 | 197 | //ok some type of shift is nessecary |
| 198 | 198 | if (shifter != -1) { |
| 199 | 199 | result.push(shifter); |
| 200 | - result.push(codeValue(chr2)); | |
| 200 | + result.push(codeValue(chr1)); | |
| 201 | 201 | } |
| 202 | 202 | else { |
| 203 | 203 | if (currcs == CODESET.C) { | ... | ... |
utils/util.js
| ... | ... | @@ -697,7 +697,52 @@ module.exports = { |
| 697 | 697 | } |
| 698 | 698 | }) |
| 699 | 699 | }, |
| 700 | + //检验等级价格 | |
| 701 | + get_plus_name_price:function(sw_arr,th){ | |
| 702 | + var that=this; | |
| 703 | + //---如果后台又开等级卡的开关--- | |
| 704 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
| 705 | + th.setData({ | |
| 706 | + rank_switch: true | |
| 707 | + }); | |
| 708 | + //---回调卡的列表--- | |
| 709 | + th.getPlusCardType(function (ob) { | |
| 710 | + th.setData({ | |
| 711 | + card_list: ob.card_list | |
| 712 | + }); | |
| 713 | + var ti = setInterval(function () { | |
| 714 | + var user = getApp().globalData.userInfo; | |
| 715 | + if (!user) return false; | |
| 716 | + clearInterval(ti); | |
| 717 | + | |
| 718 | + if (user.card_field && user['card_expiredate']) { | |
| 719 | + var str = user['card_expiredate'].replace(/-/g, '/'); | |
| 720 | + var end = new Date(str); | |
| 721 | + end = Date.parse(end) / 1000; | |
| 722 | + var now = that.gettimestamp(); | |
| 723 | + | |
| 724 | + //--- 判断是等级会员,且在有效期范围内 --- | |
| 725 | + if (user.card_field && now < end) { | |
| 726 | + var card_name = ob.name_map.get(user.card_field); | |
| 727 | + if (card_name && card_name.length > 6) card_name = card_name.substring(0, 6); | |
| 728 | + var is_near_date = 0; | |
| 729 | + if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天 | |
| 730 | + | |
| 731 | + th.setData({ | |
| 732 | + card_field: user.card_field, | |
| 733 | + card_name: card_name, | |
| 734 | + card_list: ob.card_list, | |
| 735 | + is_near_date:is_near_date | |
| 736 | + }); | |
| 737 | + } | |
| 738 | + | |
| 739 | + } | |
| 740 | + | |
| 741 | + }, 500) | |
| 742 | + }) | |
| 700 | 743 | |
| 744 | + } | |
| 745 | + }, | |
| 701 | 746 | |
| 702 | 747 | unserialize: unserialize, |
| 703 | 748 | _throttle:_throttle, | ... | ... |