From 4a428c7e7ea0890dbab7b678193ba0e98bd31459 Mon Sep 17 00:00:00 2001 From: taiyuan Date: Wed, 1 Dec 2021 16:03:13 +0800 Subject: [PATCH] 幸运购修改4 --- packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxml | 3 ++- packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss | 4 ++++ packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js | 54 ++++++++++++++++++++++++++++++------------------------ packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js | 44 ++++++++++++++++++++++++++++++++++++++++---- packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml | 6 ++++-- pages/index/index/index.wxml | 3 ++- pages/index/index/index.wxss | 4 ++++ pages/user/order_list/order_list.wxml | 12 +++++++++--- 8 files changed, 95 insertions(+), 35 deletions(-) diff --git a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxml b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxml index bf4862b..65ad4aa 100644 --- a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxml +++ b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxml @@ -26,7 +26,8 @@ - 去参团 + 已抢光 + 去参团 diff --git a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss index 00e52a5..f7fe7f7 100644 --- a/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss +++ b/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss @@ -92,3 +92,7 @@ page { color: white; text-align: center; } + +.btn.gray { + background-color: #ccc; +} diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js index c204e88..9a91ad8 100644 --- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js +++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js @@ -306,16 +306,18 @@ Page({ // if(ct_price==0) ct_price=min_price; // } + //获取大家都在团信息 - getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { - data:{page:1,pageSize:2} - }).then(res => { - if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ - pageteam = res.data.data.pageData; - ee.setData({pageteam: pageteam,}) - } + // getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , { + // data:{page:1,pageSize:2} + // }).then(res => { + // if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){ + // pageteam = res.data.data.pageData; + // ee.setData({pageteam: pageteam,}) + // } - }) + // }) + //--当是成团的时候的操作-- // if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){ @@ -467,8 +469,10 @@ Page({ scene += "_" + getApp().globalData.room_id; }; ///二微码 - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + - os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; + // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + + // os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; // 读取文件成功则OK-- @@ -955,7 +959,8 @@ Page({ //------ 分享配置 -------- onShareAppMessage: function (e) { 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 - // console.log('pagePath=====>', pagePath); + console.log('pagePath=====xxxxxx>', pagePath); + var imgPath = this.data.iurl + this.data.luckyGoInfo.original_img; if (pagePath.indexOf('/') != 0) { pagePath = '/' + pagePath; } @@ -968,24 +973,25 @@ Page({ } } return { - title: "幸运购", + title: "邀你一起参加幸运购", path: pagePath, + imageUrl: imgPath, } }, - onShareTimeline() { - // var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:''; - // var pagePath = this.route; //当前页面url + // 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, - // } - }, + // // if(!store_name) store_name = getApp().globalData.setting.appName; + // // if (pagePath.indexOf('/') != 0) { + // // pagePath = '/' + pagePath; + // // } + // // return { + // // title: store_name + '-幸运购活动列表', + // // path: pagePath, + // // } + // }, clickShare() { this.setData({ diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js index c88d9a2..e89dd89 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js @@ -274,7 +274,7 @@ Page({ luckGoInfo: {}, - + showDetails: false, }, @@ -306,6 +306,40 @@ Page({ prom_id, }); } + + + // 检查是否已经购买参团 + getApp().request.get("/api/weshop/prom/luckyOrder/getUserOrderInfo/" + o.stoid + "/" + oo.user_id + "/" + prom_id, { + success: function(res) { + console.log('505=====>', res.data.data); + if(res.data.code == 0) { + th.setData({ + showDetails: true, + buyInfo: res.data.data, + }); + } else { + th.setData({ + showDetails: false, + }); + }; + } + }); + // api/weshop/prom/luckyOrder/getUserOrderInfo/{store_id}/{user_id}/{aid} + // getApp().request.promiseGet("/api/weshop/pickup/list", { + // data: { store_id: os.stoid, pickup_id: e.pickup_id, lat: th.data.lat, lon: th.data.lon,is_pos:1 }, + // }).then(res => { + // if (res.data.code == 0) { + // e = res.data.data.pageData[0]; + // if (e) { + // e.is_no_dis = ee.is_no_dis; + // appd.pk_store = e; + // that.set_def_storage(e); + // } + + // } + // }) + + // console.log('type********>>',this.data.prom_type); //-- 自定义海报 -- // getApp().request.promiseGet("/api/weshop/goods/poster/page", { @@ -4519,8 +4553,10 @@ Page({ scene += "_" + getApp().globalData.room_id; } ///二微码 - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + - os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; + // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + + // os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo"; console.log(path3); @@ -5209,7 +5245,7 @@ Page({ tt(); }, fail: function (res) { - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 + ee.data.share_goods_img = "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 tt(); } }); diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml index aaaa597..34ea239 100644 --- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml +++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml @@ -273,7 +273,7 @@ - 已拼成功:{{data.sales_sum}}件 + 已售:{{data.sales_sum}}件 {{categories3[0].num}}人评价 @@ -920,7 +920,9 @@ - 立即参团 + 查看详情 + 立即参团 + 已经抢光 diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss index f665667..f0c8adf 100644 --- a/pages/index/index/index.wxss +++ b/pages/index/index/index.wxss @@ -1195,3 +1195,7 @@ page { text-align: center; } +.luck .btn.gray { + background-color: #ccc; +} + diff --git a/pages/user/order_list/order_list.wxml b/pages/user/order_list/order_list.wxml index 4735e7b..c411b46 100644 --- a/pages/user/order_list/order_list.wxml +++ b/pages/user/order_list/order_list.wxml @@ -91,7 +91,9 @@ - + + @@ -128,7 +130,10 @@ - {{filters.toFix(goods.member_goods_price,2)}} + + + {{filters.toFix(goods.goods_price,2)}} + {{filters.toFix(goods.member_goods_price,2)}} x{{goods.goods_num}} @@ -162,7 +167,8 @@ 合计(改): - {{filters.toFix(item.order_amount+item.user_money,2)}} + + {{filters.toFix(item.order_amount+item.user_money,2)}} +{{item.coupon_price}}元优惠券 +{{item.integral}}积分 -- libgit2 0.21.4