Commit 4a428c7e7ea0890dbab7b678193ba0e98bd31459
1 parent
8b0cc8ca
幸运购修改4
Showing
8 changed files
with
95 additions
and
35 deletions
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxml
| ... | ... | @@ -26,7 +26,8 @@ |
| 26 | 26 | </view> |
| 27 | 27 | <view class="flex jc_sb"> |
| 28 | 28 | <progress class="pdr20 f1 progress" percent="{{filters.percent(item.num, item.group_num)}}" activeColor="#FF6768" backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="{{item.num}}人已参团"></progress> |
| 29 | - <view class="btn fs26">去参团</view> | |
| 29 | + <view class="btn fs26 {{item.goods_num == 0 ? 'gray':''}}" wx:if="{{item.goods_num == 0}}">已抢光</view> | |
| 30 | + <view class="btn fs26" wx:else>去参团</view> | |
| 30 | 31 | </view> |
| 31 | 32 | </view> |
| 32 | 33 | ... | ... |
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
| ... | ... | @@ -306,16 +306,18 @@ Page({ |
| 306 | 306 | // if(ct_price==0) ct_price=min_price; |
| 307 | 307 | // } |
| 308 | 308 | |
| 309 | + | |
| 309 | 310 | //获取大家都在团信息 |
| 310 | - getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { | |
| 311 | - data:{page:1,pageSize:2} | |
| 312 | - }).then(res => { | |
| 313 | - if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 314 | - pageteam = res.data.data.pageData; | |
| 315 | - ee.setData({pageteam: pageteam,}) | |
| 316 | - } | |
| 311 | + // getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { | |
| 312 | + // data:{page:1,pageSize:2} | |
| 313 | + // }).then(res => { | |
| 314 | + // if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 315 | + // pageteam = res.data.data.pageData; | |
| 316 | + // ee.setData({pageteam: pageteam,}) | |
| 317 | + // } | |
| 317 | 318 | |
| 318 | - }) | |
| 319 | + // }) | |
| 320 | + | |
| 319 | 321 | |
| 320 | 322 | //--当是成团的时候的操作-- |
| 321 | 323 | // if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){ |
| ... | ... | @@ -467,8 +469,10 @@ Page({ |
| 467 | 469 | scene += "_" + getApp().globalData.room_id; |
| 468 | 470 | }; |
| 469 | 471 | ///二微码 |
| 470 | - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 471 | - os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; | |
| 472 | + // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 473 | + // os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; | |
| 474 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 475 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | |
| 472 | 476 | |
| 473 | 477 | |
| 474 | 478 | // 读取文件成功则OK-- |
| ... | ... | @@ -955,7 +959,8 @@ Page({ |
| 955 | 959 | //------ 分享配置 -------- |
| 956 | 960 | onShareAppMessage: function (e) { |
| 957 | 961 | var pagePath = `packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=${this.data.param.goods_id}&prom_type=9&group_id=${this.data.param.group_id}`; //当前页面url |
| 958 | - // console.log('pagePath=====>', pagePath); | |
| 962 | + console.log('pagePath=====xxxxxx>', pagePath); | |
| 963 | + var imgPath = this.data.iurl + this.data.luckyGoInfo.original_img; | |
| 959 | 964 | if (pagePath.indexOf('/') != 0) { |
| 960 | 965 | pagePath = '/' + pagePath; |
| 961 | 966 | } |
| ... | ... | @@ -968,24 +973,25 @@ Page({ |
| 968 | 973 | } |
| 969 | 974 | } |
| 970 | 975 | return { |
| 971 | - title: "幸运购", | |
| 976 | + title: "邀你一起参加幸运购", | |
| 972 | 977 | path: pagePath, |
| 978 | + imageUrl: imgPath, | |
| 973 | 979 | } |
| 974 | 980 | }, |
| 975 | 981 | |
| 976 | - onShareTimeline() { | |
| 977 | - // var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:''; | |
| 978 | - // var pagePath = this.route; //当前页面url | |
| 982 | + // onShareTimeline() { | |
| 983 | + // // var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:''; | |
| 984 | + // // var pagePath = this.route; //当前页面url | |
| 979 | 985 | |
| 980 | - // if(!store_name) store_name = getApp().globalData.setting.appName; | |
| 981 | - // if (pagePath.indexOf('/') != 0) { | |
| 982 | - // pagePath = '/' + pagePath; | |
| 983 | - // } | |
| 984 | - // return { | |
| 985 | - // title: store_name + '-幸运购活动列表', | |
| 986 | - // path: pagePath, | |
| 987 | - // } | |
| 988 | - }, | |
| 986 | + // // if(!store_name) store_name = getApp().globalData.setting.appName; | |
| 987 | + // // if (pagePath.indexOf('/') != 0) { | |
| 988 | + // // pagePath = '/' + pagePath; | |
| 989 | + // // } | |
| 990 | + // // return { | |
| 991 | + // // title: store_name + '-幸运购活动列表', | |
| 992 | + // // path: pagePath, | |
| 993 | + // // } | |
| 994 | + // }, | |
| 989 | 995 | |
| 990 | 996 | clickShare() { |
| 991 | 997 | this.setData({ | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -274,7 +274,7 @@ Page({ |
| 274 | 274 | |
| 275 | 275 | |
| 276 | 276 | luckGoInfo: {}, |
| 277 | - | |
| 277 | + showDetails: false, | |
| 278 | 278 | |
| 279 | 279 | }, |
| 280 | 280 | |
| ... | ... | @@ -306,6 +306,40 @@ Page({ |
| 306 | 306 | prom_id, |
| 307 | 307 | }); |
| 308 | 308 | } |
| 309 | + | |
| 310 | + | |
| 311 | + // 检查是否已经购买参团 | |
| 312 | + getApp().request.get("/api/weshop/prom/luckyOrder/getUserOrderInfo/" + o.stoid + "/" + oo.user_id + "/" + prom_id, { | |
| 313 | + success: function(res) { | |
| 314 | + console.log('505=====>', res.data.data); | |
| 315 | + if(res.data.code == 0) { | |
| 316 | + th.setData({ | |
| 317 | + showDetails: true, | |
| 318 | + buyInfo: res.data.data, | |
| 319 | + }); | |
| 320 | + } else { | |
| 321 | + th.setData({ | |
| 322 | + showDetails: false, | |
| 323 | + }); | |
| 324 | + }; | |
| 325 | + } | |
| 326 | + }); | |
| 327 | + // api/weshop/prom/luckyOrder/getUserOrderInfo/{store_id}/{user_id}/{aid} | |
| 328 | + // getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 329 | + // data: { store_id: os.stoid, pickup_id: e.pickup_id, lat: th.data.lat, lon: th.data.lon,is_pos:1 }, | |
| 330 | + // }).then(res => { | |
| 331 | + // if (res.data.code == 0) { | |
| 332 | + // e = res.data.data.pageData[0]; | |
| 333 | + // if (e) { | |
| 334 | + // e.is_no_dis = ee.is_no_dis; | |
| 335 | + // appd.pk_store = e; | |
| 336 | + // that.set_def_storage(e); | |
| 337 | + // } | |
| 338 | + | |
| 339 | + // } | |
| 340 | + // }) | |
| 341 | + | |
| 342 | + | |
| 309 | 343 | // console.log('type********>>',this.data.prom_type); |
| 310 | 344 | //-- 自定义海报 -- |
| 311 | 345 | // getApp().request.promiseGet("/api/weshop/goods/poster/page", { |
| ... | ... | @@ -4519,8 +4553,10 @@ Page({ |
| 4519 | 4553 | scene += "_" + getApp().globalData.room_id; |
| 4520 | 4554 | } |
| 4521 | 4555 | ///二微码 |
| 4522 | - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 4523 | - os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; | |
| 4556 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 4557 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | |
| 4558 | + // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 4559 | + // os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; | |
| 4524 | 4560 | |
| 4525 | 4561 | console.log(path3); |
| 4526 | 4562 | |
| ... | ... | @@ -5209,7 +5245,7 @@ Page({ |
| 5209 | 5245 | tt(); |
| 5210 | 5246 | }, |
| 5211 | 5247 | fail: function (res) { |
| 5212 | - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 | |
| 5248 | + ee.data.share_goods_img = "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 | |
| 5213 | 5249 | tt(); |
| 5214 | 5250 | } |
| 5215 | 5251 | }); | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| ... | ... | @@ -273,7 +273,7 @@ |
| 273 | 273 | |
| 274 | 274 | |
| 275 | 275 | <view class="goods-num"> |
| 276 | - <view class="sales">已拼成功:{{data.sales_sum}}件</view> | |
| 276 | + <view class="sales">已售:{{data.sales_sum}}件</view> | |
| 277 | 277 | <!-- <view class="sales">销量:{{data.sales_sum}}件</view> --> |
| 278 | 278 | <!-- <view class="stock">折扣:{{data.disc}}折</view> --> |
| 279 | 279 | <view class="stock">{{categories3[0].num}}人评价</view> |
| ... | ... | @@ -920,7 +920,9 @@ |
| 920 | 920 | </view> |
| 921 | 921 | <!-- data-ind="2" --> |
| 922 | 922 | <!-- openSpecModel_pt --> |
| 923 | - <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt"data-it="0">立即参团</view> | |
| 923 | + <view class="btn-red f1 flex ai-center jc-center" bindtap="go" data-it="0" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{luckGoInfo.id}}&goods_id={{luckGoInfo.goods_id}}&goods_name={{data.goods_name}}&team_id={{buyInfo.team_id}}&&from=list" wx:if="{{showDetails}}">查看详情</view> | |
| 924 | + <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt" data-it="0" wx:elif="{{!showDetails && (luckGoInfo.goods_num != 0)}}">立即参团</view> | |
| 925 | + <view class="btn-red f1 flex ai-center jc-center" wx:else>已经抢光</view> | |
| 924 | 926 | <!-- <view class="btn-red f1 flex ai-center jc-center" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy">立即参团</view> --> |
| 925 | 927 | </view> |
| 926 | 928 | <!-- <view bindtap="openSpecModel" data-ind="1" class="btn-buy flex fdc jc-center"> | ... | ... |
pages/index/index/index.wxml
| ... | ... | @@ -257,7 +257,8 @@ |
| 257 | 257 | </view> |
| 258 | 258 | <view class="flex jc_sb"> |
| 259 | 259 | <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> |
| 260 | - <view class="btn fs26">去参团</view> | |
| 260 | + <view class="btn fs26 {{item.goods_num == 0 ? 'gray':''}}" wx:if="{{item.goods_num == 0}}">已抢光</view> | |
| 261 | + <view class="btn fs26" wx:else>去参团</view> | |
| 261 | 262 | <!-- &title=狐狸3号测速003&prom_type=7&prom_id=468 --> |
| 262 | 263 | </view> |
| 263 | 264 | </view> | ... | ... |
pages/index/index/index.wxss
pages/user/order_list/order_list.wxml
| ... | ... | @@ -91,7 +91,9 @@ |
| 91 | 91 | <!-- 单个商品 --> |
| 92 | 92 | <!-- wx:if="{{goods.return_btn!=4}}" --> |
| 93 | 93 | <view> |
| 94 | - <navigator class="detail_commodity flex-vertical padding" wx:for="{{item.order_goods}}" wx:for-item="goods" wx:for-index="pinx" url="{{item.ord_url}}?order_id={{item.order_id}}"> | |
| 94 | + <!-- url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}" wx:if="{{item.order_goods[0].prom_type==9}}" | |
| 95 | + {{item.ord_url}}?order_id={{item.order_id}} --> | |
| 96 | + <navigator class="detail_commodity flex-vertical padding" wx:for="{{item.order_goods}}" wx:for-item="goods" wx:for-index="pinx" url="{{item.order_goods[0].prom_type==9 ? ('/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id=' + item.order_id):(item.ord_url + '?order_id=' + item.order_id)}}"> | |
| 95 | 97 | <!-- 商品图片 --> |
| 96 | 98 | <navigator class="rel"> |
| 97 | 99 | <image src="{{resourceUrl+goods.original_img}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].order_goods[{{pinx}}].original_img"></image> |
| ... | ... | @@ -128,7 +130,10 @@ |
| 128 | 130 | <!-- 商品价格 --> |
| 129 | 131 | <view class="flex-vertical c-tb baseline"> |
| 130 | 132 | <view class="fs24">¥</view> |
| 131 | - <view class="fs26">{{filters.toFix(goods.member_goods_price,2)}}</view> | |
| 133 | + <!-- 幸运购prom_type等于9 --> | |
| 134 | + <!-- 如果是幸运购就显示幸运购参团价格 --> | |
| 135 | + <view class="fs26" wx:if="{{goods.prom_type == 9}}">{{filters.toFix(goods.goods_price,2)}}</view> | |
| 136 | + <view class="fs26" wx:else>{{filters.toFix(goods.member_goods_price,2)}}</view> | |
| 132 | 137 | </view> |
| 133 | 138 | <view class="fs26 c-a9">x{{goods.goods_num}}</view> |
| 134 | 139 | </view> |
| ... | ... | @@ -162,7 +167,8 @@ |
| 162 | 167 | <view class="commodity_money flex baseline" wx:else> |
| 163 | 168 | <view>合计<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view> |
| 164 | 169 | <view class="fs24 c-r">¥</view> |
| 165 | - <view class="c-r">{{filters.toFix(item.order_amount+item.user_money,2)}} | |
| 170 | + <view class="c-r"> | |
| 171 | + {{filters.toFix(item.order_amount+item.user_money,2)}} | |
| 166 | 172 | <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text> |
| 167 | 173 | <text wx:if="{{item.integral}}">+{{item.integral}}积分</text> |
| 168 | 174 | </view> | ... | ... |