From ffcb7c7091f69bbd7508b74ee1582db2d238457a Mon Sep 17 00:00:00 2001 From: taiyuan Date: Tue, 30 Nov 2021 15:25:41 +0800 Subject: [PATCH] 幸运购 --- packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js | 1 + packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js | 6 ++++-- packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js | 50 +++++++++++++++++++++++++------------------------- packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml | 11 +++++++---- packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml | 2 +- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js | 22 +++++++++++++--------- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml | 18 ++++++++++++++---- packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js | 4 ++-- packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js | 3 +++ packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml | 2 +- 11 files changed, 121 insertions(+), 49 deletions(-) diff --git a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js index 24cf8d3..0327421 100644 --- a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js +++ b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js @@ -12,8 +12,20 @@ Page({ pageNum: 1, // 当前页数 }, - onLoad: function () { + onLoad: function (options) { self = this; + + var first_leader = options.first_leader; + if(first_leader) { + app.globalData.first_leader = first_leader; + //调用接口判断是不是会员 + // app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid + "/" + first_leader, {}).then(res => { + // if (res.data.code == 0) { + // getApp().globalData.guide_id = res.data.data.id; + // } + // }) + }; + app.isLogin().then(function(data) { self.setData({ userInfo: data, @@ -173,5 +185,42 @@ Page({ }; }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function (e) { + var pagePath = this.route; //当前页面url + if (pagePath.indexOf('/') != 0) { + pagePath = '/' + pagePath; + } + if(getApp().globalData.user_id){ + + if(pagePath.indexOf("?")>0){ + pagePath+="&first_leader="+getApp().globalData.user_id; + }else{ + pagePath+="?first_leader="+getApp().globalData.user_id; + } + } + return { + title: "幸运购活动列表", + path: pagePath, + } + }, + + onShareTimeline() { + var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:''; + var pagePath = this.route; //当前页面url + + if(!store_name) store_name = getApp().globalData.setting.appName; + if (pagePath.indexOf('/') != 0) { + pagePath = '/' + pagePath; + } + return { + title: store_name + '-幸运购活动列表', + path: pagePath, + } + }, + }) diff --git a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js index c311c38..6fbbaae 100644 --- a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js +++ b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js @@ -126,6 +126,7 @@ Page({ user_note:{}, zuhe_map_good:{}, }, + onLoad: function (t) { wx.setNavigationBarTitle({title: "填写订单",}) var th = this; diff --git a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js index 35637e2..7dbca86 100644 --- a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js +++ b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js @@ -102,7 +102,7 @@ Page({ //先获取物流,再获取用户信息,再展示页面 - //th.get_wuliu(th.get_info(th.show_page)); + th.get_wuliu(th.get_info(th.show_page)); }, onUnload: function() { @@ -604,7 +604,7 @@ Page({ pdata = new Array(); var ff = true; //------------立即购买------------- - console.log("buy_new"); + // console.log("buy_new"); //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 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({ 'goods_price': th.data.param.goods_price, //商品总价 //'goods_price': th.data.formData.all_price, //商品总价 'shipping_price': th.data.formData.shipping_price, //物流金额 + 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code, + 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name, 'user_money': th.data.formData.user_money, //使用余额 'total_amount': th.data.formData.total_amount, //订单总价 'order_amount': th.data.formData.order_amount, //应付 diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js index d668d04..01bc74e 100644 --- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js +++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js @@ -468,7 +468,7 @@ Page({ }; ///二微码 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; + os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; // 读取文件成功则OK-- @@ -953,32 +953,32 @@ Page({ }, //------ 分享配置 -------- - onShareAppMessage: function (e) { - var th=this; - var scene=this.data.teamgroup.id; - var url="/pages/team/team_show/team_show?tg_id="+scene; - //--分享图片-- - var img=th.data.iurl+th.data.teamlist.share_imgurl; - //--把会员分享出去-- - if(getApp().globalData.user_id){ - if(url.indexOf("?")>0) - url+="&first_leader="+getApp().globalData.user_id; - else - url+="?first_leader="+getApp().globalData.user_id; - } - // console.log('url+++++>>>>>', url, th.data.teamlist.title); + // onShareAppMessage: function (e) { + // var th=this; + // var scene=this.data.teamgroup.id; + // var url="/pages/team/team_show/team_show?tg_id="+scene; + // //--分享图片-- + // var img=th.data.iurl+th.data.teamlist.share_imgurl; + // //--把会员分享出去-- + // if(getApp().globalData.user_id){ + // if(url.indexOf("?")>0) + // url+="&first_leader="+getApp().globalData.user_id; + // else + // url+="?first_leader="+getApp().globalData.user_id; + // } + // // console.log('url+++++>>>>>', url, th.data.teamlist.title); - var share_title=th.data.teamlist.title; - if(th.data.teamlist.share_title){ - share_title=th.data.teamlist.share_title; - } + // var share_title=th.data.teamlist.title; + // if(th.data.teamlist.share_title){ + // share_title=th.data.teamlist.share_title; + // } - return { - path:url, - title: share_title, - imageUrl: img, - } - }, + // return { + // path:url, + // title: share_title, + // imageUrl: img, + // } + // }, clickShare() { this.setData({ diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml index 2155d60..7924a0f 100644 --- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml +++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml @@ -16,7 +16,11 @@ {{filters.price(luckyGoInfo.group_price)}} - 零售价{{luckyGoInfo.market_price}} + + + + @@ -202,7 +206,7 @@ {{item.nickname}} - 参团编号:{{item.team_sn}} + @@ -346,7 +350,6 @@ - 规则详情 @@ -365,7 +368,7 @@ - 我知道了 + 我知道了 diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml index c283a6e..2f360da 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml @@ -28,7 +28,7 @@ 可售:{{def_pick_store.CanOutQty}} 可售:0 - 可售:{{sele_g.store_count}} + 可售:{{sele_g.store_count}} + {{sele_g[card_field]}} + {{sele_g.shop_price}} @@ -270,8 +273,9 @@ - 销量:{{data.sales_sum}}件 - 折扣:{{data.disc}}折 + 已拼成功:{{data.sales_sum}}件 + + {{categories3[0].num}}人评价 @@ -905,7 +909,13 @@ - {{filters.toFix(data.shop_price,2)}} + + + {{sele_g[card_field]}} + {{sele_g.shop_price}} + + + 单独购买 diff --git a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js index 2726629..d892b75 100644 --- a/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js +++ b/packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js @@ -253,7 +253,7 @@ Page({ case 3: { //优惠券 app.request.promiseGet('/api/weshop/prom/luckyCoupon/page', { data: { - store_id: os.stoid, + store_id: app.globalData.setting.stoid, aid: self.data.currentItemAid, } }).then(res => { @@ -268,7 +268,7 @@ Page({ case 4: { //服务项目 app.request.promiseGet('/api/weshop/prom/luckyService/page', { data: { - store_id: os.stoid, + store_id: app.globalData.setting.stoid, aid: self.data.currentItemAid, } }).then(res => { diff --git a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js index e9b51a2..b883001 100644 --- a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js +++ b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js @@ -1493,6 +1493,9 @@ Page({ }, + + + diff --git a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml index 24652f6..2ec90cd 100644 --- a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml +++ b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml @@ -39,7 +39,7 @@ - ¥{{item.member_goods_price}} + ¥{{item.goods_price}} ×{{item.goods_num}} -- libgit2 0.21.4