Commit ffcb7c7091f69bbd7508b74ee1582db2d238457a
1 parent
22a972bc
幸运购
Showing
11 changed files
with
121 additions
and
49 deletions
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
| ... | ... | @@ -12,8 +12,20 @@ Page({ |
| 12 | 12 | pageNum: 1, // 当前页数 |
| 13 | 13 | }, |
| 14 | 14 | |
| 15 | - onLoad: function () { | |
| 15 | + onLoad: function (options) { | |
| 16 | 16 | self = this; |
| 17 | + | |
| 18 | + var first_leader = options.first_leader; | |
| 19 | + if(first_leader) { | |
| 20 | + app.globalData.first_leader = first_leader; | |
| 21 | + //调用接口判断是不是会员 | |
| 22 | + // app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid + "/" + first_leader, {}).then(res => { | |
| 23 | + // if (res.data.code == 0) { | |
| 24 | + // getApp().globalData.guide_id = res.data.data.id; | |
| 25 | + // } | |
| 26 | + // }) | |
| 27 | + }; | |
| 28 | + | |
| 17 | 29 | app.isLogin().then(function(data) { |
| 18 | 30 | self.setData({ |
| 19 | 31 | userInfo: data, |
| ... | ... | @@ -173,5 +185,42 @@ Page({ |
| 173 | 185 | }; |
| 174 | 186 | }, |
| 175 | 187 | |
| 188 | + | |
| 189 | + /** | |
| 190 | + * 用户点击右上角分享 | |
| 191 | + */ | |
| 192 | + onShareAppMessage: function (e) { | |
| 193 | + var pagePath = this.route; //当前页面url | |
| 194 | + if (pagePath.indexOf('/') != 0) { | |
| 195 | + pagePath = '/' + pagePath; | |
| 196 | + } | |
| 197 | + if(getApp().globalData.user_id){ | |
| 198 | + | |
| 199 | + if(pagePath.indexOf("?")>0){ | |
| 200 | + pagePath+="&first_leader="+getApp().globalData.user_id; | |
| 201 | + }else{ | |
| 202 | + pagePath+="?first_leader="+getApp().globalData.user_id; | |
| 203 | + } | |
| 204 | + } | |
| 205 | + return { | |
| 206 | + title: "幸运购活动列表", | |
| 207 | + path: pagePath, | |
| 208 | + } | |
| 209 | + }, | |
| 210 | + | |
| 211 | + onShareTimeline() { | |
| 212 | + var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:''; | |
| 213 | + var pagePath = this.route; //当前页面url | |
| 214 | + | |
| 215 | + if(!store_name) store_name = getApp().globalData.setting.appName; | |
| 216 | + if (pagePath.indexOf('/') != 0) { | |
| 217 | + pagePath = '/' + pagePath; | |
| 218 | + } | |
| 219 | + return { | |
| 220 | + title: store_name + '-幸运购活动列表', | |
| 221 | + path: pagePath, | |
| 222 | + } | |
| 223 | + }, | |
| 224 | + | |
| 176 | 225 | }) |
| 177 | 226 | ... | ... |
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| ... | ... | @@ -102,7 +102,7 @@ Page({ |
| 102 | 102 | |
| 103 | 103 | |
| 104 | 104 | //先获取物流,再获取用户信息,再展示页面 |
| 105 | - //th.get_wuliu(th.get_info(th.show_page)); | |
| 105 | + th.get_wuliu(th.get_info(th.show_page)); | |
| 106 | 106 | }, |
| 107 | 107 | |
| 108 | 108 | onUnload: function() { |
| ... | ... | @@ -604,7 +604,7 @@ Page({ |
| 604 | 604 | pdata = new Array(); |
| 605 | 605 | var ff = true; |
| 606 | 606 | //------------立即购买------------- |
| 607 | - console.log("buy_new"); | |
| 607 | + // console.log("buy_new"); | |
| 608 | 608 | |
| 609 | 609 | //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 |
| 610 | 610 | if (th.data.bn_exp_type == 0 && th.data.user_addr == null && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == |
| ... | ... | @@ -649,6 +649,8 @@ Page({ |
| 649 | 649 | 'goods_price': th.data.param.goods_price, //商品总价 |
| 650 | 650 | //'goods_price': th.data.formData.all_price, //商品总价 |
| 651 | 651 | 'shipping_price': th.data.formData.shipping_price, //物流金额 |
| 652 | + 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code, | |
| 653 | + 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name, | |
| 652 | 654 | 'user_money': th.data.formData.user_money, //使用余额 |
| 653 | 655 | 'total_amount': th.data.formData.total_amount, //订单总价 |
| 654 | 656 | 'order_amount': th.data.formData.order_amount, //应付 | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
| ... | ... | @@ -468,7 +468,7 @@ Page({ |
| 468 | 468 | }; |
| 469 | 469 | ///二微码 |
| 470 | 470 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
| 471 | - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | |
| 471 | + os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; | |
| 472 | 472 | |
| 473 | 473 | |
| 474 | 474 | // 读取文件成功则OK-- |
| ... | ... | @@ -953,32 +953,32 @@ Page({ |
| 953 | 953 | }, |
| 954 | 954 | |
| 955 | 955 | //------ 分享配置 -------- |
| 956 | - onShareAppMessage: function (e) { | |
| 957 | - var th=this; | |
| 958 | - var scene=this.data.teamgroup.id; | |
| 959 | - var url="/pages/team/team_show/team_show?tg_id="+scene; | |
| 960 | - //--分享图片-- | |
| 961 | - var img=th.data.iurl+th.data.teamlist.share_imgurl; | |
| 962 | - //--把会员分享出去-- | |
| 963 | - if(getApp().globalData.user_id){ | |
| 964 | - if(url.indexOf("?")>0) | |
| 965 | - url+="&first_leader="+getApp().globalData.user_id; | |
| 966 | - else | |
| 967 | - url+="?first_leader="+getApp().globalData.user_id; | |
| 968 | - } | |
| 969 | - // console.log('url+++++>>>>>', url, th.data.teamlist.title); | |
| 956 | + // onShareAppMessage: function (e) { | |
| 957 | + // var th=this; | |
| 958 | + // var scene=this.data.teamgroup.id; | |
| 959 | + // var url="/pages/team/team_show/team_show?tg_id="+scene; | |
| 960 | + // //--分享图片-- | |
| 961 | + // var img=th.data.iurl+th.data.teamlist.share_imgurl; | |
| 962 | + // //--把会员分享出去-- | |
| 963 | + // if(getApp().globalData.user_id){ | |
| 964 | + // if(url.indexOf("?")>0) | |
| 965 | + // url+="&first_leader="+getApp().globalData.user_id; | |
| 966 | + // else | |
| 967 | + // url+="?first_leader="+getApp().globalData.user_id; | |
| 968 | + // } | |
| 969 | + // // console.log('url+++++>>>>>', url, th.data.teamlist.title); | |
| 970 | 970 | |
| 971 | - var share_title=th.data.teamlist.title; | |
| 972 | - if(th.data.teamlist.share_title){ | |
| 973 | - share_title=th.data.teamlist.share_title; | |
| 974 | - } | |
| 971 | + // var share_title=th.data.teamlist.title; | |
| 972 | + // if(th.data.teamlist.share_title){ | |
| 973 | + // share_title=th.data.teamlist.share_title; | |
| 974 | + // } | |
| 975 | 975 | |
| 976 | - return { | |
| 977 | - path:url, | |
| 978 | - title: share_title, | |
| 979 | - imageUrl: img, | |
| 980 | - } | |
| 981 | - }, | |
| 976 | + // return { | |
| 977 | + // path:url, | |
| 978 | + // title: share_title, | |
| 979 | + // imageUrl: img, | |
| 980 | + // } | |
| 981 | + // }, | |
| 982 | 982 | |
| 983 | 983 | clickShare() { |
| 984 | 984 | this.setData({ | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
| ... | ... | @@ -16,7 +16,11 @@ |
| 16 | 16 | <view class="flex-vertical-between"> |
| 17 | 17 | <view> |
| 18 | 18 | <view class="fs40 xc-wc rmb">{{filters.price(luckyGoInfo.group_price)}}</view> |
| 19 | - <view class="fs22 word-line c-7b">零售价<text class="rmb">{{luckyGoInfo.market_price}}</text></view> | |
| 19 | + <view class="fs22 word-line c-7b"> | |
| 20 | + <!-- 手店价<text class="rmb">{{luckyGoInfo.shop_price}}</text> --> | |
| 21 | + <!-- <block wx:if="{{card_field && sele_g[card_field]>0}}"><text class="rmb lh1">{{sele_g[card_field]}}</text></block> | |
| 22 | + <block wx:else><text class="rmb lh1">{{sele_g.shop_price}}</text></block> --> | |
| 23 | + </view> | |
| 20 | 24 | </view> |
| 21 | 25 | <view class="xc-wc fs24"> |
| 22 | 26 | <view> |
| ... | ... | @@ -202,7 +206,7 @@ |
| 202 | 206 | </view> |
| 203 | 207 | <view class="mgl20 t-l"> |
| 204 | 208 | <view>{{item.nickname}}</view> |
| 205 | - <view class="c-7b">参团编号:<text class="c-red">{{item.team_sn}}</text></view> | |
| 209 | + <!-- <view class="c-7b">参团编号:<text class="c-red">{{item.team_sn}}</text></view> --> | |
| 206 | 210 | </view> |
| 207 | 211 | </view> |
| 208 | 212 | |
| ... | ... | @@ -346,7 +350,6 @@ |
| 346 | 350 | <!-- 遮罩层 --> |
| 347 | 351 | <view class="mask" bindtap="close_all" catchtouchmove="true" wx:if="{{showRules}}"></view> |
| 348 | 352 | <!-- 规则详情和提示信息弹窗 --> |
| 349 | - <!-- <view class="rule-pop-container" wx:if="{{showRule}}"> --> | |
| 350 | 353 | <view class="rule-pop-container" wx:if="{{showRules}}"> |
| 351 | 354 | <view class="pop-title">规则详情 |
| 352 | 355 | <text class="iconfont icon-guan" bindtap="closeRules"></text> |
| ... | ... | @@ -365,7 +368,7 @@ |
| 365 | 368 | |
| 366 | 369 | |
| 367 | 370 | <view class="pdv20"> |
| 368 | - <view class="btn" bindtap="closeRule">我知道了</view> | |
| 371 | + <view class="btn" bindtap="closeRules">我知道了</view> | |
| 369 | 372 | </view> |
| 370 | 373 | </view> |
| 371 | 374 | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> |
| 29 | 29 | <view class="spec-goods-stock" wx:else>可售:0</view> |
| 30 | 30 | </block> |
| 31 | - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 31 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 32 | 32 | </view> |
| 33 | 33 | </block> |
| 34 | 34 | <!-- <block wx:if="{{is_normal==0}}"> | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -1729,9 +1729,12 @@ Page({ |
| 1729 | 1729 | if (e.is_normal == 1) { |
| 1730 | 1730 | this.check_nor_promgood(e.goods_id, function (res) { |
| 1731 | 1731 | if (res && res.cat_id) { |
| 1732 | - e.prom_type = 0; | |
| 1732 | + e.prom_type = 3; | |
| 1733 | 1733 | e.prom_id = res.cat_id; |
| 1734 | - } | |
| 1734 | + } else { | |
| 1735 | + e.prom_type = 0; | |
| 1736 | + // e.prom_id = 0; | |
| 1737 | + } | |
| 1735 | 1738 | s.set_b_now(e); |
| 1736 | 1739 | /*-- |
| 1737 | 1740 | wx.redirectTo({ |
| ... | ... | @@ -1739,8 +1742,8 @@ Page({ |
| 1739 | 1742 | });--*/ |
| 1740 | 1743 | |
| 1741 | 1744 | console.log('11111111111111111111111111======》'); |
| 1742 | - getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id); | |
| 1743 | - // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&group_id=" + th.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + th.data.luckGoInfo.lc_alert); | |
| 1745 | + // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id); | |
| 1746 | + getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&group_id=" + th.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + th.data.luckGoInfo.lc_alert); | |
| 1744 | 1747 | |
| 1745 | 1748 | }) |
| 1746 | 1749 | } else { |
| ... | ... | @@ -4040,11 +4043,12 @@ Page({ |
| 4040 | 4043 | newd['prom_id'] = e.act_id; |
| 4041 | 4044 | } |
| 4042 | 4045 | console.log('aaaaa'); |
| 4046 | + newd['prom_type'] = 0; | |
| 4043 | 4047 | th.buyNow(newd); |
| 4044 | 4048 | }); |
| 4045 | 4049 | } |
| 4046 | 4050 | else { |
| 4047 | - console.log('bbbb'); | |
| 4051 | + // 点击立即参团 | |
| 4048 | 4052 | th.buyNow_pt(newd); |
| 4049 | 4053 | }; |
| 4050 | 4054 | }) |
| ... | ... | @@ -4513,7 +4517,7 @@ Page({ |
| 4513 | 4517 | } |
| 4514 | 4518 | ///二微码 |
| 4515 | 4519 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
| 4516 | - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | |
| 4520 | + os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; | |
| 4517 | 4521 | |
| 4518 | 4522 | console.log(path3); |
| 4519 | 4523 | |
| ... | ... | @@ -4630,9 +4634,9 @@ Page({ |
| 4630 | 4634 | context.setFillStyle("red") |
| 4631 | 4635 | |
| 4632 | 4636 | |
| 4633 | - var pri0 = th.data.data.shop_price; | |
| 4634 | - if (th.data.prom_act) | |
| 4635 | - pri0 = th.data.prom_act.price; | |
| 4637 | + var pri0 = th.data.luckGoInfo.group_price; | |
| 4638 | + // if (th.data.prom_act) | |
| 4639 | + // pri0 = th.data.prom_act.price; | |
| 4636 | 4640 | pri0 = parseFloat(pri0).toFixed(2); |
| 4637 | 4641 | var wd1 = th.data.screenWidth - ut.measureText(pri0, 31 * unit) - 25; |
| 4638 | 4642 | context.fillText("¥", wd1 - 15, 185 * unit); | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| ... | ... | @@ -114,7 +114,10 @@ |
| 114 | 114 | <view class="fs50 val">{{filters.toFix(luckGoInfo.group_price/100,2)}}</view> |
| 115 | 115 | </view> |
| 116 | 116 | <view class="word-line fs20 xc-qtunit-price"> |
| 117 | - 手店价¥{{filters.toFix(data.shop_price,2)}} | |
| 117 | + 手店价 | |
| 118 | + <!-- ¥{{filters.toFix(data.shop_price,2)}} --> | |
| 119 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"><text class="rmb lh1">{{sele_g[card_field]}}</text></block> | |
| 120 | + <block wx:else><text class="rmb lh1">{{sele_g.shop_price}}</text></block> | |
| 118 | 121 | </view> |
| 119 | 122 | </view> |
| 120 | 123 | |
| ... | ... | @@ -270,8 +273,9 @@ |
| 270 | 273 | |
| 271 | 274 | |
| 272 | 275 | <view class="goods-num"> |
| 273 | - <view class="sales">销量:{{data.sales_sum}}件</view> | |
| 274 | - <view class="stock">折扣:{{data.disc}}折</view> | |
| 276 | + <view class="sales">已拼成功:{{data.sales_sum}}件</view> | |
| 277 | + <!-- <view class="sales">销量:{{data.sales_sum}}件</view> --> | |
| 278 | + <!-- <view class="stock">折扣:{{data.disc}}折</view> --> | |
| 275 | 279 | <view class="stock">{{categories3[0].num}}人评价</view> |
| 276 | 280 | </view> |
| 277 | 281 | <view wx:if="{{prom_type==1}}"> |
| ... | ... | @@ -905,7 +909,13 @@ |
| 905 | 909 | <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules==2 }}"> |
| 906 | 910 | <view class="btn-container f1"> |
| 907 | 911 | <view bindtap="openSpecModel_pt" data-ind="1" data-it="1" class="btn-yellow flex f1 fdc jc-center"> |
| 908 | - <view class="lh1"><text class="rmb lh1">{{filters.toFix(data.shop_price,2)}}</text></view> | |
| 912 | + <view class="lh1"> | |
| 913 | + <!-- <text class="rmb lh1">{{filters.toFix(data.shop_price,2)}}</text> --> | |
| 914 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"><text class="rmb lh1">{{sele_g[card_field]}}</text></block> | |
| 915 | + <block wx:else><text class="rmb lh1">{{sele_g.shop_price}}</text></block> | |
| 916 | + </view> | |
| 917 | + <!-- 如果是等级会员,且有等级价 --> | |
| 918 | + | |
| 909 | 919 | <view class="lh1 fs pdt4">单独购买</view> |
| 910 | 920 | </view> |
| 911 | 921 | <!-- data-ind="2" --> | ... | ... |
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js
| ... | ... | @@ -253,7 +253,7 @@ Page({ |
| 253 | 253 | case 3: { //优惠券 |
| 254 | 254 | app.request.promiseGet('/api/weshop/prom/luckyCoupon/page', { |
| 255 | 255 | data: { |
| 256 | - store_id: os.stoid, | |
| 256 | + store_id: app.globalData.setting.stoid, | |
| 257 | 257 | aid: self.data.currentItemAid, |
| 258 | 258 | } |
| 259 | 259 | }).then(res => { |
| ... | ... | @@ -268,7 +268,7 @@ Page({ |
| 268 | 268 | case 4: { //服务项目 |
| 269 | 269 | app.request.promiseGet('/api/weshop/prom/luckyService/page', { |
| 270 | 270 | data: { |
| 271 | - store_id: os.stoid, | |
| 271 | + store_id: app.globalData.setting.stoid, | |
| 272 | 272 | aid: self.data.currentItemAid, |
| 273 | 273 | } |
| 274 | 274 | }).then(res => { | ... | ... |
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml