Closed
Merge Request #887 · created by 后端研发-苏明海


Dev


From dev into test

Closed by 后端研发-苏明海

Changes were not merged into target branch

1 participants









app.js
@@ -275,8 +275,8 @@ App({ @@ -275,8 +275,8 @@ App({
275 getwuliu: function (t, o){ 275 getwuliu: function (t, o){
276 this.globalData.wuliu=null; 276 this.globalData.wuliu=null;
277 var th = this, st = this.globalData.setting; 277 var th = this, st = this.globalData.setting;
278 - this.globalData.wuliu && !o ?  
279 - "function" == typeof t && t(this.globalData.wuliu) : a.get("/api/weshop/storeshipping/list", { 278 + //获取物流不缓存
  279 + a.get("/api/weshop/storeshipping/list", {
280 data: { store_id: st.stoid, status: 1, pageSize:600 }, 280 data: { store_id: st.stoid, status: 1, pageSize:600 },
281 success: function (o) { 281 success: function (o) {
282 console.log('getwuliu'); 282 console.log('getwuliu');
@@ -296,8 +296,8 @@ App({ @@ -296,8 +296,8 @@ App({
296 //----------------获取物流价格表-------------------- 296 //----------------获取物流价格表--------------------
297 getwuliuprice: function (t, o) { 297 getwuliuprice: function (t, o) {
298 var e = this,th=e, st = this.globalData.setting; 298 var e = this,th=e, st = this.globalData.setting;
299 - this.globalData.wuliuprice && !o ?  
300 - "function" == typeof t && t(this.globalData.wuliuprice) : a.get("/api/weshop/shippingarea/list",{ 299 + //获取物流不缓存
  300 + a.get("/api/weshop/shippingarea/list",{
301 data: { store_id: st.stoid,pageSize: 600 }, 301 data: { store_id: st.stoid,pageSize: 600 },
302 success: function (o) { 302 success: function (o) {
303 console.log('getwuliuprice'); 303 console.log('getwuliuprice');
components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -15,7 +15,8 @@ @@ -15,7 +15,8 @@
15 <view class="zs_goods_wai" wx:if='{{object.column==1}}'> 15 <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
16 <block wx:for="{{goods_array}}" > 16 <block wx:for="{{goods_array}}" >
17 <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'> 17 <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'>
18 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.prom_id}}&&prom_type={{item.prom_type}}" class="s1_gk_a1"> 18 + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1">
  19 + <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.prom_id}}&&prom_type={{item.prom_type}}" class="s1_gk_a1"> -->
19 <view class='zs_top rel'> 20 <view class='zs_top rel'>
20 21
21 <block wx:if="{{object.big_order_type==3}}"> 22 <block wx:if="{{object.big_order_type==3}}">
@@ -169,7 +170,7 @@ @@ -169,7 +170,7 @@
169 <!--2个一列--> 170 <!--2个一列-->
170 <block wx:if="{{object.column==2}}"> 171 <block wx:if="{{object.column==2}}">
171 <block wx:for="{{goods_array}}" > 172 <block wx:for="{{goods_array}}" >
172 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.prom_id}}&&prom_type={{item.prom_type}}" class="s1_gk_a1"> 173 + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1">
173 <view class="zs_goods_wai_ban {{g_filter.get_border_type(object.big_order_type)}}"> 174 <view class="zs_goods_wai_ban {{g_filter.get_border_type(object.big_order_type)}}">
174 <view class="zs_goods_ban"> 175 <view class="zs_goods_ban">
175 <view class='zs_goods_2l'> 176 <view class='zs_goods_2l'>
@@ -328,7 +329,7 @@ @@ -328,7 +329,7 @@
328 <block wx:if='{{object.column==3}}'> 329 <block wx:if='{{object.column==3}}'>
329 <view class="zwp_3"> 330 <view class="zwp_3">
330 <block wx:for="{{goods_array}}" > 331 <block wx:for="{{goods_array}}" >
331 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.prom_id}}&&prom_type={{item.prom_type}}" class="s1_gk_a1"> 332 + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1">
332 <view class="zs_goods_wai_san" > 333 <view class="zs_goods_wai_san" >
333 <view class="zs_goods_san"> 334 <view class="zs_goods_san">
334 <view class='zs_goods_3l {{g_filter.get_border_type(object.big_order_type)}}'> 335 <view class='zs_goods_3l {{g_filter.get_border_type(object.big_order_type)}}'>
@@ -485,7 +486,7 @@ @@ -485,7 +486,7 @@
485 <!-- 列表显示 --> 486 <!-- 列表显示 -->
486 <view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'> 487 <view class="zs_goods_xiao_wai" wx:if='{{object.column==4}}'>
487 <block wx:for="{{goods_array}}" > 488 <block wx:for="{{goods_array}}" >
488 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.prom_id}}&&prom_type={{item.prom_type}}" class="s1_gk_a1"> 489 + <navigator url="{{g_filter.get_url_by_type(item)}}" class="s1_gk_a1">
489 <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" > 490 <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" >
490 <view class='zs_top_x'> 491 <view class='zs_top_x'>
491 <block wx:if="{{object.big_order_type==3}}"> 492 <block wx:if="{{object.big_order_type==3}}">
@@ -668,7 +669,7 @@ @@ -668,7 +669,7 @@
668 <view class="sp"> 669 <view class="sp">
669 <swiper-item class="s_it" wx:for="{{goods_array}}"> 670 <swiper-item class="s_it" wx:for="{{goods_array}}">
670 <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> 671 <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
671 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&prom_id={{aitem.prom_id}}&&prom_type={{aitem.prom_type}}" style="width: 32%" > 672 + <navigator url="{{g_filter.get_url_by_type(item)}}" style="width: 32%" >
672 <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}} " style="margin-left: 10rpx"> 673 <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}} " style="margin-left: 10rpx">
673 <view class='sp_top'> 674 <view class='sp_top'>
674 <view class='s_img' style="position: relative; width: 100%"> 675 <view class='s_img' style="position: relative; width: 100%">
components/diy_goodsGroup/diy_goodsGroup.wxss
@@ -178,6 +178,7 @@ @@ -178,6 +178,7 @@
178 height: 90rpx; 178 height: 90rpx;
179 margin-bottom: 10rpx; 179 margin-bottom: 10rpx;
180 font-size: 28rpx; 180 font-size: 28rpx;
  181 + /* word-break: break-all; */
181 /* white-space: nowrap; 182 /* white-space: nowrap;
182 width: 80%; */ 183 width: 80%; */
183 } 184 }
@@ -319,6 +320,7 @@ @@ -319,6 +320,7 @@
319 height: 90rpx; 320 height: 90rpx;
320 /* line-height: 40rpx; */ 321 /* line-height: 40rpx; */
321 margin-top: 10rpx; 322 margin-top: 10rpx;
  323 + /* word-break: break-all; */
322 } 324 }
323 325
324 .zs_wz2_2l { 326 .zs_wz2_2l {
components/diy_goodsGroup/g_filter.wxs
@@ -88,6 +88,16 @@ var g_filters = { @@ -88,6 +88,16 @@ var g_filters = {
88 return min_name; 88 return min_name;
89 }, 89 },
90 90
  91 +
  92 + get_url_by_type: function(item) {
  93 + var url = '';
  94 + if(item.prom_type == 9) {
  95 + url = '/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id;
  96 + } else {
  97 + url = '/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_id=' + item.prom_id + '&prom_type=' + item.prom_type;
  98 + };
  99 + return url;
  100 + },
91 101
92 } 102 }
93 103
@@ -97,4 +107,5 @@ module.exports = { @@ -97,4 +107,5 @@ module.exports = {
97 is_has_rank:g_filters.is_has_rank, 107 is_has_rank:g_filters.is_has_rank,
98 get_card_price:g_filters.get_card_price, 108 get_card_price:g_filters.get_card_price,
99 get_border_type:g_filters.get_border_type, 109 get_border_type:g_filters.get_border_type,
  110 + get_url_by_type: g_filters.get_url_by_type,
100 } 111 }
components/diy_luckyGo/diy_luckyGo.js 0 → 100644
  1 +// var e = function(e) {
  2 +// return e && e.__esModule ? e : {
  3 +// default: e
  4 +// };
  5 +// }(require("../../utils/LoadMore3.js")),
  6 +// n = new e.default(),
  7 +var t = getApp(),
  8 + a = t.request,
  9 + o = t.globalData.setting,
  10 + os = o,
  11 + i = require("../../utils/util.js"),
  12 + ut = i,
  13 + s = require("../../utils/common.js");
  14 +var regeneratorRuntime = require('../../utils/runtime.js');
  15 +Component({
  16 + properties: {
  17 + // 这里定义了innerText属性,属性值可以在组件使用时指定
  18 + object: {
  19 + type: Object,
  20 + value: null,
  21 + },
  22 + goods_array: {
  23 + type: Array,
  24 + value: []
  25 + },
  26 + newTime: {
  27 + type: Number,
  28 + value: 0
  29 + },
  30 + },
  31 + data: {
  32 + // 这里是一些组件内部数据
  33 + yc: false,
  34 + someData: null,
  35 + ylp_img: "https://mshopimg.yolipai.net/",
  36 + imghost: os.imghost,
  37 + timer: null,
  38 + },
  39 +
  40 + pageLifetimes: {
  41 + //要处理一下,游客登录后的界面的变化,主要还该是改变会员
  42 + show: function () {
  43 + //会员身份变化
  44 + var th = this;
  45 + var g_id = this.data.object;
  46 + this.init(g_id);
  47 + setTimeout(function () {
  48 + if (th.data.goods_array && th.data.goods_array.length > 0) {
  49 + th.data.timer = setInterval(function () {
  50 + th.countDown2(th);
  51 + }, 1000);
  52 + }
  53 + },600)
  54 + }
  55 + },
  56 +
  57 + ready: function () {
  58 + var g_id = this.data.object;
  59 + this.init(g_id);
  60 + },
  61 + detached() {
  62 + // 页面被被销毁的时候,清除定时器
  63 + clearInterval(this.data.timer);
  64 + },
  65 + methods: {
  66 + // 这里是一个自定义方法
  67 + customMethod: function () { },
  68 + init: function (g_id) {
  69 + var th = this, app = getApp(), goodsidlist = "";
  70 + if (g_id.data_type == 2) {
  71 + if (g_id.data && g_id.data.length > 0) {
  72 + //--先把商品ID串起来--
  73 + g_id.data.forEach(function (val, ind) {
  74 + var item = {};
  75 + goodsidlist += val.goodsid + ",";
  76 + })
  77 + goodsidlist = ut.sub_last(goodsidlist);
  78 +
  79 + var user_id=getApp().globalData.user_id;
  80 + if(!user_id){ user_id=0;}
  81 +
  82 + //--调用接口,读取秒杀--
  83 + app.request.promiseGet("/api/weshop/prom/luckyActivity/getGoodsList?store_id="
  84 + + os.stoid + "&goodsidlist=" + goodsidlist + "&type="+ 1, {}).then(res => {
  85 + console.log(res);
  86 + //如果秒杀的数组为空的时候
  87 + var goodslist = res.data.data;
  88 + //就算是添加的活动已经过期,就要用最新的进行中活动
  89 + if (goodslist && goodslist.length > 0) {
  90 + th.set_goods_list(g_id.data, goodslist);
  91 + }
  92 + });
  93 + }
  94 + } else {
  95 + th.no_gid_set();
  96 + }
  97 + },
  98 +
  99 + //当是默认的情况
  100 + no_gid_set() {
  101 + var user_id=getApp().globalData.user_id;
  102 + if(!user_id){ user_id=0;}
  103 + // var req={ store_id: os.stoid, is_end: 0, is_show: 1, timetype: 2,user_id:user_id}; 原来的
  104 + var req={ store_id: os.stoid, is_end: 0, timetype: 1};
  105 + getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page",
  106 + { isShowLoading: 1, data:req }
  107 + ).then(res => {
  108 + if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) {
  109 + var goodsidlist = res.data.data.pageData;
  110 + this.set_goods_list(null, goodsidlist);
  111 + // console.log('goodsidlist', goodsidlist);
  112 + }
  113 + });
  114 + },
  115 +
  116 + //就算是添加的活动已经过期,就要用最新的活动
  117 + set_goods_list(g_id, goodslist) {
  118 + // 判断火热,预热
  119 + var newTime = ut.gettimestamp(), all_array = [], th = this;
  120 + th.setData({ newTime: newTime });
  121 + if (g_id) {
  122 + /*--商品队列按照添加的顺序排列--*/
  123 + g_id.forEach(function (val, ind) {
  124 + goodslist.forEach(function (vy, indy) {
  125 + if (val.goodsid == vy.goods_id) {
  126 + if(!vy.id) vy.id=vy.prom_id;
  127 + all_array.push(vy);
  128 + }
  129 + })
  130 + })
  131 + } else {
  132 + all_array = goodslist;
  133 + }
  134 +
  135 +
  136 + if (all_array.length == 0) {
  137 + all_array = goodslist;
  138 + }
  139 +
  140 + for(let i in all_array){
  141 + let item=all_array[i];
  142 + if(item.user_price) item.price=item.user_price;
  143 + }
  144 +
  145 + var arr = new Array();
  146 + //--三个三个一组---
  147 + for (var i = 0; i < all_array.length; i += 3) {
  148 + arr.push(all_array.slice(i, i + 3));
  149 + }
  150 + /*--熏染到前台--*/
  151 +
  152 + th.setData({ goods_array: arr });
  153 + console.log('goods_array', arr);
  154 +
  155 + th.data.timer = setInterval(function () {
  156 + th.countDown2(th);
  157 + }, 1000);
  158 + },
  159 +
  160 +
  161 +
  162 + //---小于10的格式化函数----
  163 + timeFormat: function (param) {
  164 + return param < 10 ? '0' + param : param;
  165 + },
  166 + //----秒杀倒计时函数-----
  167 + countDown2: function (ob) {
  168 + if (ob == undefined) return false;
  169 + var ee = ob;
  170 + // 获取当前时间,同时得到活动结束时间数组
  171 + var newTime = ut.gettimestamp();
  172 + this.setData({ newTime: newTime });
  173 +
  174 + var List = ee.data.goods_array;
  175 + if (List.length == 0) return false;
  176 + for (var j = 0; j < List.length; j++) {
  177 + // 对结束时间进行处理渲染到页面
  178 + var endTimeList = List[j];
  179 + for (var i = 0; i < endTimeList.length; i++) {
  180 + var o = endTimeList[i];
  181 + var endTime = o.end_time;
  182 + if (newTime < o.start_time) endTime = o.start_time;
  183 + let obj = null;
  184 + // 如果活动未结束,对时间进行处理
  185 + if (endTime - newTime > 0) {
  186 + let time = (endTime - newTime);
  187 + // 获取天、时、分、秒
  188 + let day = parseInt(time / (60 * 60 * 24));
  189 + let hou = parseInt(time % (60 * 60 * 24) / 3600);
  190 + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  191 + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  192 + obj = {
  193 + day: this.timeFormat(day),
  194 + hou: this.timeFormat(hou),
  195 + min: this.timeFormat(min),
  196 + sec: this.timeFormat(sec)
  197 + }
  198 + } else {
  199 + //活动已结束,全部设置为'00'
  200 + obj = {
  201 + day: '00',
  202 + hou: '00',
  203 + min: '00',
  204 + sec: '00'
  205 + }
  206 + }
  207 + var txt = "goods_array[" + j + "][" + i + "].djs";
  208 + ee.setData({
  209 + [txt]: obj
  210 + });
  211 + }
  212 + }
  213 + },
  214 +
  215 +
  216 + //图片失败,默认图片
  217 + bind_bnerr3: function (e) {
  218 + var _errImg = e.target.dataset.errorimg;
  219 + var _errObj = {};
  220 + _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
  221 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  222 + },
  223 +
  224 + go: function (e) {
  225 + let url = e.currentTarget.dataset.url;
  226 + getApp().goto(url);
  227 + },
  228 +
  229 + alert: function() {
  230 + wx.showToast({
  231 + title: '本活动商品已抢光!',
  232 + icon: 'none',
  233 + })
  234 + },
  235 + },
  236 +
  237 +
  238 +})
0 \ No newline at end of file 239 \ No newline at end of file
components/diy_luckyGo/diy_luckyGo.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
components/diy_luckyGo/diy_luckyGo.wxml 0 → 100644
  1 +<wxs module="filters" src="../../utils/filter.wxs"></wxs>
  2 +<block wx:if="{{goods_array.length>0}}">
  3 + <!-- 幸运购 -->
  4 + <view class="pdh20 flex jc_sb ai-center bg-white" bindtap="go">
  5 + <view><text class="iconfont icon-luck"></text>幸运购</view>
  6 + <view class="arrow-r">
  7 + <image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true" class="img-block"></image>
  8 + </view>
  9 + </view>
  10 +
  11 + <!-- 单行滑动显示 -->
  12 + <block wx:if="{{object.style==1}}">
  13 + <!--商品展示-->
  14 + <swiper indicator-active-color="#ED6064" indicator-dots="false" wx:if="{{object.style==1}}">
  15 + <view wx:if="{{object.style==1}}">
  16 + <swiper-item class="s_it" wx:for="{{goods_array}}">
  17 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  18 + <navigator url="{{aitem.actLen == 0 ? '':('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + aitem.goods_id + '&prom_type=9&group_id=' + aitem.id)}}"
  19 + class="pd20 nav" hover-class="none" bindtap="{{aitem.actLen == 0 ? 'alert':''}}">
  20 + <view class="">
  21 + <view class="img-container row {{aitem.actLen == 0 ? 'active':''}}" data-content="{{aitem.group_num}}人团">
  22 + <image class="img-block" src="{{imghost + aitem.original_img}}" data-val="{{aitem.original_img}}"
  23 + data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" lazy-load="true"
  24 + lazy-load="true"></image>
  25 + </view>
  26 + <view class="flex fdc jc_sb f1 pdt20">
  27 +
  28 + <view class="ellipsis-2 name fs28 clearbadge">{{aitem.title}}</view>
  29 + <view>
  30 + <view class="flex ai-center">
  31 + <text class="rmb c-red">{{filters.price(aitem.group_price)}}</text>
  32 + <view class="del fs22 c-a pdl10"><text class="rmb">{{aitem.market_price}}</text></view>
  33 + </view>
  34 + </view>
  35 +
  36 + </view>
  37 + </view>
  38 +
  39 + </navigator>
  40 + </block>
  41 + </swiper-item>
  42 + </view>
  43 + </swiper>
  44 + </block>
  45 +
  46 + <!-- 单列显示 -->
  47 + <block class="sp2" wx:if="{{object.style==2}}">
  48 + <view class="list">
  49 + <block wx:for="{{goods_array}}">
  50 + <!-- goods_array的数据是这样子的: [Array(3), Array(3), Array(3), Array(1)] -->
  51 + <!-- 3个成一组,这里我们默认让它显示goods_array[0],控制显示数量在3个以内 -->
  52 + <block wx:if="{{index == 0}}">
  53 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  54 + <view class="list-item" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{aitem.goods_id}}&prom_type=9&group_id={{aitem.id}}" bindtap="{{aitem.actLen == 0 ? '':'go'}}">
  55 + <view class="flex ai-center">
  56 + <view class="img-container">
  57 + <image class="img-block" src="{{imghost + aitem.original_img}}" data-val="{{aitem.original_img}}"
  58 + data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" lazy-load="true"></image>
  59 + </view>
  60 + <view class="pdl20 flex fdc jc_sb f1">
  61 +
  62 + <view class="ellipsis-2 name fs28" data-content="{{aitem.group_num}}人团">{{aitem.title}}</view>
  63 + <view>
  64 + <view class="flex ai-center">
  65 + <text class="rmb c-red">{{filters.price(aitem.group_price)}}</text>
  66 + <view class="del fs22 c-a pdl10">零售价:<text class="rmb">{{aitem.market_price}}</text></view>
  67 + </view>
  68 + <view class="flex jc_sb">
  69 + <progress class="pdr20 f1 progress" percent="{{filters.percent(aitem.num, aitem.group_num)}}" activeColor="#FF6768"
  70 + backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="{{aitem.num}}人已参团"></progress>
  71 + <view class="btn fs26 {{aitem.actLen == 0 ? 'gray':''}}" wx:if="{{aitem.actLen == 0}}">已抢光</view>
  72 + <view class="btn fs26" wx:else>去参团</view>
  73 + </view>
  74 + </view>
  75 + </view>
  76 + </view>
  77 + <view class="fs24 pdt10 c-7b">*<text class="c-red">{{aitem.group_num}}</text>人成团,<text class="c-red">{{aitem.group_win}}</text>人得商品,<text
  78 + class="c-red">{{aitem.group_num - aitem.group_win}}</text>人全额退款并得<text class="c-red">惊喜礼品</text>!</view>
  79 + </view>
  80 + </block>
  81 + </block>
  82 + </block>
  83 + </view>
  84 + </block>
  85 +</block>
components/diy_luckyGo/diy_luckyGo.wxss 0 → 100644
  1 +@import '../../app.wxss';
  2 +
  3 +
  4 +
  5 +.s_it {
  6 + width: 100%;
  7 + display: flex;
  8 + background-color: white;
  9 +}
  10 +
  11 +
  12 +
  13 +
  14 +
  15 +
  16 +swiper {
  17 + height: 450rpx;
  18 +}
  19 +
  20 +.nav {
  21 + width: calc(100% / 3);
  22 + box-sizing: border-box;
  23 +}
  24 +
  25 +.arrow-r {
  26 + width: 30rpx;
  27 + height: 30rpx;
  28 +}
  29 +
  30 +.icon-luck {
  31 + color: #ED6064;
  32 + margin-right: 4rpx;
  33 +}
  34 +
  35 +
  36 +
  37 +
  38 +.list-item {
  39 + background-color: white;
  40 + padding: 20rpx;
  41 +}
  42 +
  43 +.img-container {
  44 + width: 220rpx;
  45 + height: 220rpx;
  46 + border-radius: 14rpx;
  47 + overflow: hidden;
  48 + flex-shrink: 0;
  49 + position: relative;
  50 +}
  51 +
  52 +.img-container::before {
  53 + content: '幸运购';
  54 + position: absolute;
  55 + left: 0;
  56 + top: 0;
  57 + padding: 4rpx;
  58 + background-color: rgba(255,103,103,.7);
  59 + color: white;
  60 + font-size: 22rpx;
  61 + border-radius: 0 0 14rpx 0;
  62 +}
  63 +
  64 +
  65 +
  66 +.img-container.row::before {
  67 + content: attr(data-content);
  68 + position: absolute;
  69 + left: 0;
  70 + top: 0;
  71 + padding: 4rpx;
  72 + background-color: rgba(255,103,103,.7);
  73 + color: white;
  74 + font-size: 22rpx;
  75 + border-radius: 0 0 14rpx 0;
  76 +}
  77 +
  78 +.name::before {
  79 + content: attr(data-content);
  80 + background-color: #FF6768;
  81 + color: white;
  82 + font-size: 24rpx;
  83 + padding-left: 10rpx;
  84 + padding-right: 10rpx;
  85 + border-radius: 20rpx;
  86 + margin-right: 10rpx;
  87 +}
  88 +
  89 +.name.clearbadge::before {
  90 + content: none;
  91 +}
  92 +
  93 +.rmb::before {
  94 + content: '¥';
  95 + font-size: 24rpx;
  96 +}
  97 +
  98 +.del {
  99 + text-decoration: line-through;
  100 +}
  101 +
  102 +.btn {
  103 + background-color: #FF6768;
  104 + border-radius: 20rpx;
  105 + padding-left:20rpx;
  106 + padding-right: 20rpx;
  107 + color: white;
  108 +}
  109 +
  110 +.name {
  111 + height: 88rpx;
  112 +}
  113 +
  114 +.no-more {
  115 + font-size: 24rpx;
  116 + line-height: 2;
  117 + text-align: center;
  118 + padding-top: 20rpx;
  119 + padding-bottom: 20rpx;
  120 + color: #ccc;
  121 +}
  122 +
  123 +.progress {
  124 + position: relative;
  125 +}
  126 +.progress::before {
  127 + position: absolute;
  128 + width: 100%;
  129 + content: attr(data-content);
  130 + font-size: 20rpx;
  131 + color: white;
  132 + text-align: center;
  133 +}
  134 +
  135 +.btn.gray {
  136 + background-color: #ccc;
  137 +}
  138 +
  139 +.img-container.active::after {
  140 + content: '已抢光';
  141 + position: absolute;
  142 + font-size: 24rpx;
  143 + color: white;
  144 + bottom: 0;
  145 + left: 0;
  146 + width: 100%;
  147 + text-align: center;
  148 + background-color: rgba(0,0,0,.4);
  149 +}
0 \ No newline at end of file 150 \ No newline at end of file
components/diy_seckill/diy_seckill.js
@@ -81,7 +81,7 @@ Component({ @@ -81,7 +81,7 @@ Component({
81 81
82 //--调用接口,读取秒杀-- 82 //--调用接口,读取秒杀--
83 app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id=" 83 app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id="
84 - + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id="+user_id, {}).then(res => { 84 + + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id="+user_id+"&type=1", {}).then(res => {
85 console.log(res); 85 console.log(res);
86 //如果秒杀的数组为空的时候 86 //如果秒杀的数组为空的时候
87 var goodslist = res.data.data; 87 var goodslist = res.data.data;
@@ -113,6 +113,11 @@ Component({ @@ -113,6 +113,11 @@ Component({
113 113
114 //就算是添加的活动已经过期,就要用最新的活动 114 //就算是添加的活动已经过期,就要用最新的活动
115 set_goods_list(g_id, goodslist) { 115 set_goods_list(g_id, goodslist) {
  116 +
  117 + goodslist.forEach(function (vy, indy) {
  118 + if(!vy.id) vy.id=vy.prom_id;
  119 + })
  120 +
116 // 判断火热,预热 121 // 判断火热,预热
117 var newTime = ut.gettimestamp(), all_array = [], th = this; 122 var newTime = ut.gettimestamp(), all_array = [], th = this;
118 th.setData({ newTime: newTime }); 123 th.setData({ newTime: newTime });
@@ -121,16 +126,14 @@ Component({ @@ -121,16 +126,14 @@ Component({
121 g_id.forEach(function (val, ind) { 126 g_id.forEach(function (val, ind) {
122 goodslist.forEach(function (vy, indy) { 127 goodslist.forEach(function (vy, indy) {
123 if (val.goodsid == vy.goods_id) { 128 if (val.goodsid == vy.goods_id) {
124 - if(!vy.id) vy.id=vy.prom_id;  
125 all_array.push(vy); 129 all_array.push(vy);
126 } 130 }
127 }) 131 })
128 }) 132 })
129 } else { 133 } else {
130 - all_array = goodslist; 134 + all_array = goodslist;
131 } 135 }
132 136
133 -  
134 if (all_array.length == 0) { 137 if (all_array.length == 0) {
135 all_array = goodslist; 138 all_array = goodslist;
136 } 139 }
components/diy_seckill/diy_seckill.wxss
@@ -116,6 +116,7 @@ swiper { @@ -116,6 +116,7 @@ swiper {
116 padding: 4rpx 0; 116 padding: 4rpx 0;
117 /* overflow: hidden; */ 117 /* overflow: hidden; */
118 height: 90rpx; 118 height: 90rpx;
  119 + word-break: break-all;
119 /* text-overflow: ellipsis; 120 /* text-overflow: ellipsis;
120 white-space: nowrap; 121 white-space: nowrap;
121 line-height: 48rpx; */ 122 line-height: 48rpx; */
components/goods_list/goods_list.wxml
@@ -4,15 +4,16 @@ @@ -4,15 +4,16 @@
4 <view class="collects"> 4 <view class="collects">
5 <view class="hang "> 5 <view class="hang ">
6 <!-- 商品详情 --> 6 <!-- 商品详情 -->
7 - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">  
8 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}" hover-class="none"> 7 + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}">
  8 + <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}" hover-class="none"> -->
  9 + <navigator url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}" hover-class="none">
9 <!-- 商品图⽚ --> 10 <!-- 商品图⽚ -->
10 <image class="sp" src="{{url+item.original_img}}" mode="aspectFill" binderror="bind_bnerr_xc" data-url="{{url+item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image> 11 <image class="sp" src="{{url+item.original_img}}" mode="aspectFill" binderror="bind_bnerr_xc" data-url="{{url+item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image>
11 <view class="bottom"> 12 <view class="bottom">
12 <!-- 商品名称 --> 13 <!-- 商品名称 -->
13 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view> 14 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view>
14 <!-- 判断是否有活动价 --> 15 <!-- 判断是否有活动价 -->
15 - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0}}"> 16 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7}}">
16 <view class="pdt10"> 17 <view class="pdt10">
17 <view class="money flex xc-wc" > 18 <view class="money flex xc-wc" >
18 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> 19 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
@@ -12,8 +12,20 @@ Page({ @@ -12,8 +12,20 @@ Page({
12 pageNum: 1, // 当前页数 12 pageNum: 1, // 当前页数
13 }, 13 },
14 14
15 - onLoad: function () { 15 + onLoad: function (options) {
16 self = this; 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 app.isLogin().then(function(data) { 29 app.isLogin().then(function(data) {
18 self.setData({ 30 self.setData({
19 userInfo: data, 31 userInfo: data,
@@ -173,5 +185,42 @@ Page({ @@ -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_activityList/luckyGo_activityList.wxml
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 11
12 <view class="list"> 12 <view class="list">
13 <block wx:for="{{list.pageData}}"> 13 <block wx:for="{{list.pageData}}">
14 - <view class="list-item" wx:if="{{item.status == 1}}" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&prom_type=9&group_id={{item.id}}"> 14 + <view class="list-item" wx:if="{{item.status == 1}}" bindtap="{{item.actLen == 0 ? '':'go'}}" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&prom_type=9&group_id={{item.id}}">
15 <view class="flex ai-center"> 15 <view class="flex ai-center">
16 <view class="img-container"> 16 <view class="img-container">
17 <image class="img-block" src="{{imghost + item.original_img}}" data-val="{{item.original_img}}" 17 <image class="img-block" src="{{imghost + item.original_img}}" data-val="{{item.original_img}}"
@@ -26,7 +26,8 @@ @@ -26,7 +26,8 @@
26 </view> 26 </view>
27 <view class="flex jc_sb"> 27 <view class="flex jc_sb">
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> 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.actLen == 0 ? 'gray':''}}" wx:if="{{item.actLen == 0}}">已抢光</view>
  30 + <view class="btn fs26" wx:else>去参团</view>
30 </view> 31 </view>
31 </view> 32 </view>
32 33
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.wxss
@@ -20,8 +20,8 @@ page { @@ -20,8 +20,8 @@ page {
20 } 20 }
21 21
22 .img-container { 22 .img-container {
23 - width: 200rpx;  
24 - height: 200rpx; 23 + width: 220rpx;
  24 + height: 220rpx;
25 border-radius: 14rpx; 25 border-radius: 14rpx;
26 overflow: hidden; 26 overflow: hidden;
27 flex-shrink: 0; 27 flex-shrink: 0;
@@ -70,6 +70,7 @@ page { @@ -70,6 +70,7 @@ page {
70 70
71 .name { 71 .name {
72 height: 88rpx; 72 height: 88rpx;
  73 + word-break: break-all;
73 } 74 }
74 75
75 .no-more { 76 .no-more {
@@ -92,3 +93,7 @@ page { @@ -92,3 +93,7 @@ page {
92 color: white; 93 color: white;
93 text-align: center; 94 text-align: center;
94 } 95 }
  96 +
  97 +.btn.gray {
  98 + background-color: #ccc;
  99 +}
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
@@ -126,6 +126,7 @@ Page({ @@ -126,6 +126,7 @@ Page({
126 user_note:{}, 126 user_note:{},
127 zuhe_map_good:{}, 127 zuhe_map_good:{},
128 }, 128 },
  129 +
129 onLoad: function (t) { 130 onLoad: function (t) {
130 wx.setNavigationBarTitle({title: "填写订单",}) 131 wx.setNavigationBarTitle({title: "填写订单",})
131 var th = this; 132 var th = this;
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.json
1 { 1 {
2 - "navigationBarTitleText": "提交订单", 2 + "navigationBarTitleText": "填写订单",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 "warn": "/components/long_warn/long_warn" 5 "warn": "/components/long_warn/long_warn"
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -75,6 +75,11 @@ Page({ @@ -75,6 +75,11 @@ Page({
75 }, 75 },
76 76
77 onLoad: function(t) { 77 onLoad: function(t) {
  78 +
  79 + // console.log('收到的传参', t);
  80 + wx.setNavigationBarTitle({
  81 + title: '填写订单',
  82 + });
78 self = this; 83 self = this;
79 this.setData({ 84 this.setData({
80 is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, 85 is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,
@@ -85,6 +90,17 @@ Page({ @@ -85,6 +90,17 @@ Page({
85 90
86 this.data.postdata = appD; 91 this.data.postdata = appD;
87 92
  93 +
  94 + // 获取幸运购活动团team_id
  95 + this.get_teamId({
  96 + store_id: oo.stoid,
  97 + user_id: getApp().globalData.user_id,
  98 + aid: t.group_id,
  99 + });
  100 +
  101 +
  102 +
  103 +
88 //如果期号有值01 104 //如果期号有值01
89 // if (appD.qh) { 105 // if (appD.qh) {
90 // th.data.qh = appD.qh; 106 // th.data.qh = appD.qh;
@@ -102,7 +118,7 @@ Page({ @@ -102,7 +118,7 @@ Page({
102 118
103 119
104 //先获取物流,再获取用户信息,再展示页面 120 //先获取物流,再获取用户信息,再展示页面
105 - //th.get_wuliu(th.get_info(th.show_page)); 121 + // this.get_wuliu(th.get_info(th.show_page));
106 }, 122 },
107 123
108 onUnload: function() { 124 onUnload: function() {
@@ -580,18 +596,24 @@ Page({ @@ -580,18 +596,24 @@ Page({
580 596
581 // 提交订单前弹出确认对话框 597 // 提交订单前弹出确认对话框
582 submitConfirm(e) { 598 submitConfirm(e) {
583 - wx.showModal({  
584 - title: '温馨提示',  
585 - content: this.data.param.alert,  
586 - success(res) {  
587 - if (res.confirm) {  
588 - console.log('用户点击确定');  
589 - self.submitForm(e);  
590 - } else if (res.cancel) {  
591 - console.log('用户点击取消'); 599 + // is_show为0不显示温馨提示,为1显示温馨提示
  600 + if(this.data.param.is_show == 1) {
  601 + wx.showModal({
  602 + title: '温馨提示',
  603 + content: this.data.param.alert,
  604 + success(res) {
  605 + if (res.confirm) {
  606 + console.log('用户点击确定');
  607 + self.submitForm(e);
  608 + } else if (res.cancel) {
  609 + console.log('用户点击取消');
  610 + }
592 } 611 }
593 - }  
594 - }) 612 + });
  613 + } else {
  614 + this.submitForm(e);
  615 + };
  616 +
595 }, 617 },
596 618
597 619
@@ -604,7 +626,7 @@ Page({ @@ -604,7 +626,7 @@ Page({
604 pdata = new Array(); 626 pdata = new Array();
605 var ff = true; 627 var ff = true;
606 //------------立即购买------------- 628 //------------立即购买-------------
607 - console.log("buy_new"); 629 + // console.log("buy_new");
608 630
609 //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 631 //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候
610 if (th.data.bn_exp_type == 0 && th.data.user_addr == null && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 632 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 +671,8 @@ Page({ @@ -649,6 +671,8 @@ Page({
649 'goods_price': th.data.param.goods_price, //商品总价 671 'goods_price': th.data.param.goods_price, //商品总价
650 //'goods_price': th.data.formData.all_price, //商品总价 672 //'goods_price': th.data.formData.all_price, //商品总价
651 'shipping_price': th.data.formData.shipping_price, //物流金额 673 'shipping_price': th.data.formData.shipping_price, //物流金额
  674 + 'shipping_code': th.data.bn_exp_type == 1 ? 0 : th.data.wu_arr[th.data.index].code,
  675 + 'shipping_name': th.data.bn_exp_type == 1 ? '' : th.data.wu_arr[th.data.index].name,
652 'user_money': th.data.formData.user_money, //使用余额 676 'user_money': th.data.formData.user_money, //使用余额
653 'total_amount': th.data.formData.total_amount, //订单总价 677 'total_amount': th.data.formData.total_amount, //订单总价
654 'order_amount': th.data.formData.order_amount, //应付 678 'order_amount': th.data.formData.order_amount, //应付
@@ -784,10 +808,17 @@ Page({ @@ -784,10 +808,17 @@ Page({
784 // }, 1); 808 // }, 1);
785 util_pay.pay(data.data, function() { 809 util_pay.pay(data.data, function() {
786 setTimeout(function() { 810 setTimeout(function() {
787 - wx.reLaunch({  
788 - //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,  
789 - url: "/pages/team/team_success/team_success?ordersn=" + data.data,  
790 - }) 811 + // wx.reLaunch({
  812 + // //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
  813 + // url: "/pages/team/team_success/team_success?ordersn=" + data.data,
  814 + // })
  815 +
  816 + wx.redirectTo({
  817 + url: "/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?type=1&ordersn=" + data.data +
  818 + "&group_id=" + th.data.param.group_id + "&goods_id=" + th.data.param.goods_id +
  819 + "&goods_name=" + th.data.bn_goods.goods_name,
  820 + });
  821 +
791 }, 1000) 822 }, 1000)
792 }, function() { 823 }, function() {
793 //支付失败 824 //支付失败
@@ -1228,5 +1259,28 @@ Page({ @@ -1228,5 +1259,28 @@ Page({
1228 }, 1259 },
1229 1260
1230 1261
  1262 + // 获取team_id
  1263 + get_teamId(options) {
  1264 + let aid = options.aid;
  1265 + let store_id = options.store_id;
  1266 + let user_id = options.user_id;
  1267 + let url = `/api/weshop/prom/luckyActivity/page?store_id=${store_id}&is_end=0&timetype=1&id=${aid}`;
  1268 + getApp().request.get(url, {
  1269 + success: function(res) {
  1270 + if(res.data.code == 0) {
  1271 + let team_id = res.data.data.pageData[0]['team_id'];
  1272 + wx.setStorage({
  1273 + key: 'team_id',
  1274 + data: team_id,
  1275 + });
  1276 + };
  1277 + }
  1278 + });
  1279 + },
  1280 +
  1281 +
  1282 +
  1283 +
  1284 +
1231 1285
1232 }); 1286 });
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
@@ -9,6 +9,8 @@ var t = require(&quot;../../../../utils/util.js&quot;), @@ -9,6 +9,8 @@ var t = require(&quot;../../../../utils/util.js&quot;),
9 o = s.globalData.setting, 9 o = s.globalData.setting,
10 os = o; 10 os = o;
11 var regeneratorRuntime = require('../../../../utils/runtime.js'); 11 var regeneratorRuntime = require('../../../../utils/runtime.js');
  12 +
  13 +let self = null;
12 14
13 Page({ 15 Page({
14 data: { 16 data: {
@@ -48,8 +50,13 @@ Page({ @@ -48,8 +50,13 @@ Page({
48 showRules: false, 50 showRules: false,
49 isSuccess: false, 51 isSuccess: false,
50 showPoster: false, 52 showPoster: false,
  53 +
  54 + luckyGoMembers: [],
  55 + // team_id: 0,
51 }, 56 },
  57 +
52 onLoad: function (t) { 58 onLoad: function (t) {
  59 + self = this;
53 if(t.team_id != null && t.team_id !=undefined) { 60 if(t.team_id != null && t.team_id !=undefined) {
54 this.setData({ 61 this.setData({
55 team_id: t.team_id, 62 team_id: t.team_id,
@@ -71,7 +78,7 @@ Page({ @@ -71,7 +78,7 @@ Page({
71 this.init(order_sn); 78 this.init(order_sn);
72 79
73 //-- 自定义海报 -- 80 //-- 自定义海报 --
74 - getApp().request.promiseGet("/api/weshop/goods/poster/page",{ 81 + getApp().request.promiseGet("/api/weshop/goods/poster/page", {
75 data:{store_id:os.stoid, type:1, is_use:1 } 82 data:{store_id:os.stoid, type:1, is_use:1 }
76 }).then(res=>{ 83 }).then(res=>{
77 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){ 84 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){
@@ -107,9 +114,16 @@ Page({ @@ -107,9 +114,16 @@ Page({
107 114
108 onUnload: function () { 115 onUnload: function () {
109 // 开团成功后,清除storage里的team_id 116 // 开团成功后,清除storage里的team_id
110 - if(this.data.luckyGoInfo.num && this.data.luckyGoInfo.num == 0) {  
111 - wx.removeStorageSync('team_id');  
112 - }; 117 + // if(this.data.luckyGoInfo && this.data.luckyGoInfo.num == 0) {
  118 + // wx.removeStorageSync('team_id');
  119 + // };
  120 + // // 如果是从会员中心的幸运购列表点击进来的,退出时清除storage里的team_id
  121 + // if(this.data.param.from == 1) {
  122 + // let team_id = wx.getStorageSync('team_id');
  123 + // if(team_id != null && team_id != undefined) wx.removeStorageSync('team_id');
  124 + // };
  125 +
  126 + wx.removeStorageSync('team_id');
113 }, 127 },
114 128
115 //关闭展开列表 129 //关闭展开列表
@@ -169,7 +183,7 @@ Page({ @@ -169,7 +183,7 @@ Page({
169 pt_listno = "",//团编号 183 pt_listno = "",//团编号
170 pt_prom_id = 0, //活动id 184 pt_prom_id = 0, //活动id
171 ee = this, 185 ee = this,
172 - team_id = 0,//活动id 186 + //team_id = 0,//活动id
173 ordertx=[],//头像图片 187 ordertx=[],//头像图片
174 share_img=null,//分享图片 188 share_img=null,//分享图片
175 teamlist=null,//活动表 189 teamlist=null,//活动表
@@ -306,16 +320,18 @@ Page({ @@ -306,16 +320,18 @@ Page({
306 // if(ct_price==0) ct_price=min_price; 320 // if(ct_price==0) ct_price=min_price;
307 // } 321 // }
308 322
  323 +
309 //获取大家都在团信息 324 //获取大家都在团信息
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 - } 325 + // getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , {
  326 + // data:{page:1,pageSize:2}
  327 + // }).then(res => {
  328 + // if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  329 + // pageteam = res.data.data.pageData;
  330 + // ee.setData({pageteam: pageteam,})
  331 + // }
317 332
318 - }) 333 + // })
  334 +
319 335
320 //--当是成团的时候的操作-- 336 //--当是成团的时候的操作--
321 // if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){ 337 // if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){
@@ -467,8 +483,10 @@ Page({ @@ -467,8 +483,10 @@ Page({
467 scene += "_" + getApp().globalData.room_id; 483 scene += "_" + getApp().globalData.room_id;
468 }; 484 };
469 ///二微码 485 ///二微码
470 - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +  
471 - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; 486 + // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  487 + // os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo";
  488 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  489 + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo";
472 490
473 491
474 // 读取文件成功则OK-- 492 // 读取文件成功则OK--
@@ -954,32 +972,41 @@ Page({ @@ -954,32 +972,41 @@ Page({
954 972
955 //------ 分享配置 -------- 973 //------ 分享配置 --------
956 onShareAppMessage: function (e) { 974 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; 975 + 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
  976 + // console.log('pagePath=====xxxxxx>', pagePath);
  977 + var imgPath = this.data.iurl + this.data.luckyGoInfo.original_img;
  978 + if (pagePath.indexOf('/') != 0) {
  979 + pagePath = '/' + pagePath;
968 } 980 }
969 - // console.log('url+++++>>>>>', url, th.data.teamlist.title);  
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 - }  
975 - 981 + // if(getApp().globalData.user_id){
  982 +
  983 + // if(pagePath.indexOf("?")>0){
  984 + // pagePath+="&first_leader="+getApp().globalData.user_id;
  985 + // }else{
  986 + // pagePath+="?first_leader="+getApp().globalData.user_id;
  987 + // }
  988 + // }
976 return { 989 return {
977 - path:url,  
978 - title: share_title,  
979 - imageUrl: img, 990 + title: "邀您一起参加幸运购",
  991 + path: pagePath,
  992 + imageUrl: imgPath,
980 } 993 }
981 }, 994 },
982 995
  996 + // onShareTimeline() {
  997 + // // var store_name = getApp().globalData.config ? getApp().globalData.config.store_name:'';
  998 + // // var pagePath = this.route; //当前页面url
  999 +
  1000 + // // if(!store_name) store_name = getApp().globalData.setting.appName;
  1001 + // // if (pagePath.indexOf('/') != 0) {
  1002 + // // pagePath = '/' + pagePath;
  1003 + // // }
  1004 + // // return {
  1005 + // // title: store_name + '-幸运购活动列表',
  1006 + // // path: pagePath,
  1007 + // // }
  1008 + // },
  1009 +
983 clickShare() { 1010 clickShare() {
984 this.setData({ 1011 this.setData({
985 share_hidden: true, 1012 share_hidden: true,
@@ -1123,55 +1150,153 @@ Page({ @@ -1123,55 +1150,153 @@ Page({
1123 1150
1124 // 获取幸运购参团情况 1151 // 获取幸运购参团情况
1125 async get_team_info () { 1152 async get_team_info () {
1126 - var th = this;  
1127 - // 幸运购成团信息  
1128 - await getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page", {  
1129 - data: {  
1130 - store_id: o.stoid,  
1131 - is_end: 0,  
1132 - timetype: 1,  
1133 - id: this.data.param.group_id,  
1134 - }  
1135 - }).then(res => {  
1136 - var luckyGoInfo = res.data.data.pageData[0];  
1137 - var team_id = luckyGoInfo.team_id; 1153 + var th = this;
  1154 + var team_id;
  1155 + var luckyGoInfo;
  1156 + var user_id = getApp().globalData.user_id;
  1157 +
1138 1158
1139 - th.setData({  
1140 - luckyGoInfo,  
1141 - team_id, 1159 +
  1160 + // 邀请链接待完善
  1161 +
  1162 + getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page", {
  1163 + data: {
  1164 + store_id: o.stoid,
  1165 + is_end: 0,
  1166 + timetype: 1,
  1167 + id: th.data.param.group_id,
  1168 + }
  1169 + }).then(res => {
  1170 + if(res.data.code == 0) {
  1171 +
  1172 + luckyGoInfo = res.data.data.pageData[0];
  1173 +
  1174 +
  1175 +
  1176 + // else {
  1177 + // team_id = luckyGoInfo.team_id;
  1178 +
  1179 + // // 待完善
  1180 + // if(luckyGoInfo.team_id == 0) {
  1181 + // team_id = wx.getStorageSync('team_id');
  1182 + // };
  1183 +
  1184 + // };
  1185 +
  1186 + th.setData({
  1187 + luckyGoInfo,
  1188 + });
  1189 +
  1190 + //参团成功后,检查team_id
  1191 + //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘
  1192 + //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动
  1193 + //如果从会员中心的幸运购列表邀请好友点击进来,不执行storage操作
  1194 + if(th.data.param.from == 1) return false;
  1195 + // if(team_id > 0) {
  1196 + // wx.setStorage({
  1197 + // key: 'team_id',
  1198 + // data: team_id,
  1199 + // });
  1200 + // console.log('存储team_id', team_id);
  1201 + // } else {
  1202 + // let team_id2 = wx.getStorageSync('team_id');
  1203 + // console.log('获取team_id', team_id2);
  1204 + // th.setData({
  1205 + // team_id: team_id2,
  1206 + // // isSuccess: true,
  1207 + // });
  1208 + // };
  1209 +
  1210 + // th.setData({
  1211 + // luckyGoInfo,
  1212 + // team_id,
  1213 + // });
  1214 +
  1215 + };
  1216 +
  1217 + });
  1218 +
  1219 + if(th.data.param.from == 1) {
  1220 +   team_id = th.data.param.team_id;
  1221 +  } else {
  1222 +
  1223 + // 单独获取最新的team_id;
  1224 + await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/getUserOrderLastInfo/" + o.stoid + "/" + user_id + "/" + th.data.param.group_id, {
  1225 + data: {
  1226 + }
  1227 + }).then(res => {
  1228 +
  1229 + if(res.data.code == 0) {
  1230 +
  1231 + // if(th.data.param.from == 1) {
  1232 + //   team_id = luckyGoInfo.team_id;
  1233 + //  } else {
  1234 + // team_id = res.data.data.team_id;
  1235 + // };
  1236 +
  1237 + team_id = res.data.data.team_id;
  1238 +
  1239 +
  1240 + th.setData({
  1241 + team_id,
  1242 + });
  1243 +
  1244 + };
  1245 +
1142 }); 1246 });
1143 1247
1144 - //参团成功后,检查team_id  
1145 - //如果team_id为0, 表示当前已开启新的一期,文字提示应改为’参团成功,本期幸运购已开团,中奖结果可点击下方查看参团列表‘  
1146 - //如果team_id为0,取出之前保存的team_id替换掉,请求上一期已成团的幸运购活动  
1147 - if(team_id != 0) {  
1148 - wx.setStorage({  
1149 - key: 'team_id',  
1150 - data: team_id,  
1151 - });  
1152 - } else {  
1153 - let team_id = wx.getStorageSync('team_id');  
1154 - th.setData({  
1155 - team_id: team_id,  
1156 - isSuccess: true,  
1157 - });  
1158 - };  
1159 -  
1160 - }); 1248 + };
  1249 + // wx.removeStorageSync('team_id');
  1250 +
  1251 +
1161 1252
1162 // 幸运购成团成员 1253 // 幸运购成团成员
1163 await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/page", { 1254 await getApp().request.promiseGet("/api/weshop/prom/luckyOrder/page", {
1164 data: { 1255 data: {
1165 store_id: o.stoid, 1256 store_id: o.stoid,
1166 - team_id: this.data.team_id, 1257 + team_id: team_id,
1167 } 1258 }
1168 }).then(res => { 1259 }).then(res => {
1169 - th.setData({  
1170 - luckyGoMembers: res.data.data.pageData,  
1171 - });  
1172 - }); 1260 + if(res.data.code == 0) {
  1261 + console.log('当前参团成员', res, team_id);
  1262 + let myId = getApp().globalData.userInfo.user_id;
  1263 + let luckyGoMembers = res.data.data.pageData;
  1264 + th.setData({
  1265 + luckyGoMembers,
  1266 + });
  1267 +
  1268 + self.isMe(myId, luckyGoMembers);
  1269 + };
  1270 +
  1271 + });
  1272 +
  1273 +
  1274 +
1173 1275
1174 }, 1276 },
  1277 +
  1278 + // 判断自己是否中奖
  1279 + isMe(myId, list) {
  1280 + list.some((item, index) => {
  1281 + if(item.team_status == 2) {
  1282 + if(item.user_id == myId) {
  1283 + self.setData({
  1284 + iWin: true
  1285 + });
  1286 + return true;
  1287 + };
  1288 + }
  1289 + });
  1290 + },
  1291 +
  1292 +
  1293 + //-----图片失败,默认图片-----
  1294 + bind_bnerr: function (e) {
  1295 + var _errImg = e.target.dataset.errorimg;
  1296 + var _errObj = {};
  1297 + _errObj[_errImg] = '/miniapp/images/default_g_img.gif';
  1298 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  1299 + },
1175 1300
1176 1301
1177 1302
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.json
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "navigationBarTitleText": "参团详情", 2 "navigationBarTitleText": "参团详情",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 - "share": "/components/share/share" 5 + "share": "/components/share/share",
  6 + "nav_box": "/components/nav_box/nav_box"
6 } 7 }
7 } 8 }
8 \ No newline at end of file 9 \ No newline at end of file
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
@@ -4,9 +4,9 @@ @@ -4,9 +4,9 @@
4 4
5 5
6 <view class="flex pd20 bg-white"> 6 <view class="flex pd20 bg-white">
7 - <view class="img-container shrink0" data-content="已团{{luckyGoInfo.group_joined}}件">  
8 - <image class="img-block" src="{{iurl + luckyGoInfo.original_img}}" data-val="{{luckyGoInfo.original_img}}"  
9 - data-errorimg="luckyGoInfo.original_img" binderror="bind_bnerr" lazy-load="true"></image> 7 + <!-- <view class="img-container shrink0" data-content="已团{{luckyGoInfo.group_joined}}件"> -->
  8 + <view class="img-container shrink0" data-content="">
  9 + <image class="img-block" src="{{iurl + luckyGoInfo.original_img}}" data-errorimg="luckyGoInfo.original_img" binderror="bind_bnerr" lazy-load="true"></image>
10 </view> 10 </view>
11 <view class="mgl20 flex fdc jc_sb f1 pdv10"> 11 <view class="mgl20 flex fdc jc_sb f1 pdv10">
12 <!----//图片区域----> 12 <!----//图片区域---->
@@ -16,12 +16,17 @@ @@ -16,12 +16,17 @@
16 <view class="flex-vertical-between"> 16 <view class="flex-vertical-between">
17 <view> 17 <view>
18 <view class="fs40 xc-wc rmb">{{filters.price(luckyGoInfo.group_price)}}</view> 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 </view> 24 </view>
21 <view class="xc-wc fs24"> 25 <view class="xc-wc fs24">
22 <view> 26 <view>
23 - <!-- <view class="">已拼{{teamlist.buy_num}}DDD件</view> -->  
24 - <view class="t-c">待成团</view> 27 + <!-- luckyGoMembers.create_time 为0,表示还没开团 -->
  28 + <view class="t-c" wx:if="{{luckyGoMembers[0].create_time > 0}}">已成团</view>
  29 + <view class="t-c" wx:else>待成团</view>
25 <view class="flex xc-valframe t-c"> 30 <view class="flex xc-valframe t-c">
26 <view class="xc-frame-img"> 31 <view class="xc-frame-img">
27 <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image> 32 <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image>
@@ -39,7 +44,7 @@ @@ -39,7 +44,7 @@
39 <view class="mgt20 bg-white pr"> 44 <view class="mgt20 bg-white pr">
40 <view class="rules fs24" bindtap="showRules">规则 <text class="iconfont icon-arrow_right fs24"></text></view> 45 <view class="rules fs24" bindtap="showRules">规则 <text class="iconfont icon-arrow_right fs24"></text></view>
41 <!-- 阶梯团 --> 46 <!-- 阶梯团 -->
42 - <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}"> 47 + <!-- <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}">
43 当前价格 48 当前价格
44 <text class="xc-wc">¥{{ct_price}}</text>, 49 <text class="xc-wc">¥{{ct_price}}</text>,
45 <block wx:if="{{max_num-ordertx.length>0}}"> 50 <block wx:if="{{max_num-ordertx.length>0}}">
@@ -48,11 +53,11 @@ @@ -48,11 +53,11 @@
48 <block wx:else> 53 <block wx:else>
49 该团已经拼购到最低价了哦~ 54 该团已经拼购到最低价了哦~
50 </block> 55 </block>
51 - </view> 56 + </view> -->
52 57
53 58
54 <!-- 拼团成功 --> 59 <!-- 拼团成功 -->
55 - <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}"> 60 + <!-- <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}">
56 <view class="xc-wc">拼团成功</view>,当前价格 61 <view class="xc-wc">拼团成功</view>,当前价格
57 <text class="xc-wc">¥{{ct_price}}</text> 62 <text class="xc-wc">¥{{ct_price}}</text>
58 <view class="xc-img-frame oh"> 63 <view class="xc-img-frame oh">
@@ -60,20 +65,26 @@ @@ -60,20 +65,26 @@
60 </view> 65 </view>
61 </view> 66 </view>
62 67
63 - <view style="height: 20rpx" wx:if="{{teamlist.kttype==3&&p_status==4}}"></view> 68 + <view style="height: 20rpx" wx:if="{{teamlist.kttype==3&&p_status==4}}"></view> -->
64 69
65 70
66 <!-- 阶梯团失败 --> 71 <!-- 阶梯团失败 -->
67 <!-- <view class="pdt50 pdb30 pdh20" wx:if="{{pay_f==1 || order.pt_status==3}}"> --> 72 <!-- <view class="pdt50 pdb30 pdh20" wx:if="{{pay_f==1 || order.pt_status==3}}"> -->
68 <view class="pdt50 pdb30 pdh20"> 73 <view class="pdt50 pdb30 pdh20">
69 <block wx:if="{{team_id != 0}}"> 74 <block wx:if="{{team_id != 0}}">
70 - <view class="fs28 t-c" wx:if="{{!isSuccess}}">参团成功,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团,请留意成员开奖通知!</view>  
71 - <view class="fs28 t-c" wx:else>参团成功,本期幸运购已开团!</view> 75 + <view class="fs28 t-c" wx:if="{{luckyGoMembers[0].create_time > 0}}">
  76 + <view>参团成功,本期幸运购已开团!</view>
  77 + <view class="fs26 t-c c-red">{{iWin ? '恭喜您团中该商品,请等待商家发货~':'很遗憾您未团中,可获得一份帮团奖励,再接再厉噢~'}}</view>
  78 + </view>
  79 + <view class="fs28 t-c" wx:else>您已参团成功,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人参与即可成团!</view>
72 </block> 80 </block>
  81 +
73 <block wx:if="{{team_id == 0 && param.from}}"> 82 <block wx:if="{{team_id == 0 && param.from}}">
74 <view class="fs28 t-c">组团中,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团!</view> 83 <view class="fs28 t-c">组团中,还差{{filters.show_default(luckyGoInfo.group_num, '0') - filters.show_default(luckyGoInfo.num, '0')}}人即可成团!</view>
75 </block> 84 </block>
76 - <view class="fs24 t-c c-red">未团中可获得帮团奖励</view> 85 +
  86 + <!-- <view class="fs26 t-c c-red">快去邀请小伙伴一起参与吧~</view> -->
  87 +
77 <!-- <view class="xc-img-frame oh" > 88 <!-- <view class="xc-img-frame oh" >
78 <image class="img" src="{{iurl}}/miniapp/images/xc-qtshibai.png"></image> 89 <image class="img" src="{{iurl}}/miniapp/images/xc-qtshibai.png"></image>
79 </view> --> 90 </view> -->
@@ -81,16 +92,16 @@ @@ -81,16 +92,16 @@
81 92
82 93
83 <!-- 拼团成功 --> 94 <!-- 拼团成功 -->
84 - <view class="xc-ptcomplete flex-level fs28" wx:if="{{p_status==2 && (teamlist.kttype==2||teamlist.kttype==1)}}"> 95 + <!-- <view class="xc-ptcomplete flex-level fs28" wx:if="{{p_status==2 && (teamlist.kttype==2||teamlist.kttype==1)}}">
85 <view class="xc-wc">拼团成功</view>,为您节省 96 <view class="xc-wc">拼团成功</view>,为您节省
86 <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元 97 <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元
87 <view class="xc-img-frame oh"> 98 <view class="xc-img-frame oh">
88 <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image> 99 <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image>
89 </view> 100 </view>
90 </view> 101 </view>
91 - <view></view> 102 + <view></view> -->
92 <!----//// //头像----> 103 <!----//// //头像---->
93 - <view class="flex_tou pdv30"> 104 + <view class="flex_tou pdv20">
94 <view class="flex jc-center"> 105 <view class="flex jc-center">
95 <view class="d" wx:if="{{team_id == 0 && param.from}}"> 106 <view class="d" wx:if="{{team_id == 0 && param.from}}">
96 <image class="img-block" src='{{iurl}}/miniapp/images/shafa.png'></image> 107 <image class="img-block" src='{{iurl}}/miniapp/images/shafa.png'></image>
@@ -162,7 +173,7 @@ @@ -162,7 +173,7 @@
162 <view class='fs30 xc-green' wx:if='{{teamlist.kttype==3&&p_status==2}}'> 173 <view class='fs30 xc-green' wx:if='{{teamlist.kttype==3&&p_status==2}}'>
163 拼团成功, 规定时间内支付尾款即发货 174 拼团成功, 规定时间内支付尾款即发货
164 </view> 175 </view>
165 - <view class="xc-wc fs30 t-c xc-onclik" wx:if="{{p_status==1}}"> 176 + <view class="xc-wc fs30 t-c xc-onclik" wx:if="{{!(luckyGoMembers[0].create_time > 0)}}">
166 点击下方按钮分享给小伙伴,可快速成团! 177 点击下方按钮分享给小伙伴,可快速成团!
167 </view> 178 </view>
168 179
@@ -188,11 +199,11 @@ @@ -188,11 +199,11 @@
188 <!-- </view> --> 199 <!-- </view> -->
189 <!-- </block> --> 200 <!-- </block> -->
190 <view class="flex jc-center ai-center fs26" hidden="{{hiddenName}}" bindtap="click"> 201 <view class="flex jc-center ai-center fs26" hidden="{{hiddenName}}" bindtap="click">
191 - 查看拼团列表<text class="down-arrow1"></text> 202 + 查看参团成员<text class="down-arrow1"></text>
192 </view> 203 </view>
193 204
194 <view class='bodyfoot'> 205 <view class='bodyfoot'>
195 - <view class="fs26" wx:if="{{zk}}" bindtap="czk">查看拼团列表<view class='down-arrow'></view></view> 206 + <view class="fs26" wx:if="{{zk}}" bindtap="czk">查看参团成员<view class='down-arrow'></view></view>
196 207
197 <!-- {{ordertx}} --> 208 <!-- {{ordertx}} -->
198 <view class="flex ai-center jc_sb pdh30 pdv20 fs26" hidden="{{hiddenName}}" wx:for="{{luckyGoMembers}}" wx:for-index="ky"> 209 <view class="flex ai-center jc_sb pdh30 pdv20 fs26" hidden="{{hiddenName}}" wx:for="{{luckyGoMembers}}" wx:for-index="ky">
@@ -202,7 +213,7 @@ @@ -202,7 +213,7 @@
202 </view> 213 </view>
203 <view class="mgl20 t-l"> 214 <view class="mgl20 t-l">
204 <view>{{item.nickname}}</view> 215 <view>{{item.nickname}}</view>
205 - <view class="c-7b">参团编号:<text class="c-red">{{item.team_sn}}</text></view> 216 + <!-- <view class="c-7b">参团编号:<text class="c-red">{{item.team_sn}}</text></view> -->
206 </view> 217 </view>
207 </view> 218 </view>
208 219
@@ -229,7 +240,7 @@ @@ -229,7 +240,7 @@
229 <view class="pdh20 f1"> 240 <view class="pdh20 f1">
230 <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button> 241 <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button>
231 </view> 242 </view>
232 - <view class="pdh20 f1"> 243 + <view class="pdh20 f1" wx:if="{{!(luckyGoMembers[0].create_time > 0)}}">
233 <button class="btn-yellow pdh20 fs24" bindtap="clickShare">邀请好友参团</button> 244 <button class="btn-yellow pdh20 fs24" bindtap="clickShare">邀请好友参团</button>
234 </view> 245 </view>
235 <!-- <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button> 246 <!-- <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button>
@@ -320,7 +331,7 @@ @@ -320,7 +331,7 @@
320 </block> 331 </block>
321 332
322 <!-- 分享控件,底部弹出 --> 333 <!-- 分享控件,底部弹出 -->
323 -<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> 334 +<share id="share_button" bind:send="onShareAppMessage" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
324 335
325 336
326 <view wx:if="{{showPoster}}"> 337 <view wx:if="{{showPoster}}">
@@ -346,7 +357,6 @@ @@ -346,7 +357,6 @@
346 <!-- 遮罩层 --> 357 <!-- 遮罩层 -->
347 <view class="mask" bindtap="close_all" catchtouchmove="true" wx:if="{{showRules}}"></view> 358 <view class="mask" bindtap="close_all" catchtouchmove="true" wx:if="{{showRules}}"></view>
348 <!-- 规则详情和提示信息弹窗 --> 359 <!-- 规则详情和提示信息弹窗 -->
349 - <!-- <view class="rule-pop-container" wx:if="{{showRule}}"> -->  
350 <view class="rule-pop-container" wx:if="{{showRules}}"> 360 <view class="rule-pop-container" wx:if="{{showRules}}">
351 <view class="pop-title">规则详情 361 <view class="pop-title">规则详情
352 <text class="iconfont icon-guan" bindtap="closeRules"></text> 362 <text class="iconfont icon-guan" bindtap="closeRules"></text>
@@ -365,9 +375,13 @@ @@ -365,9 +375,13 @@
365 375
366 376
367 <view class="pdv20"> 377 <view class="pdv20">
368 - <view class="btn" bindtap="closeRule">我知道了</view> 378 + <view class="btn" bindtap="closeRules">我知道了</view>
369 </view> 379 </view>
370 - </view> 380 + </view>.
  381 +
  382 +
  383 + <!-- 制作一个圆球导航 -->
  384 + <nav_box></nav_box>
371 385
372 386
373 387
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss
@@ -145,7 +145,7 @@ margin-top: 30rpx; @@ -145,7 +145,7 @@ margin-top: 30rpx;
145 height:100rpx; 145 height:100rpx;
146 border-radius: 50%; 146 border-radius: 50%;
147 overflow: hidden; 147 overflow: hidden;
148 - background-color: white; 148 + background-color: #f2f2f2;
149 } 149 }
150 150
151 .d ~ .d { 151 .d ~ .d {
@@ -979,6 +979,7 @@ height:40rpx; @@ -979,6 +979,7 @@ height:40rpx;
979 height: 60rpx; 979 height: 60rpx;
980 border-radius: 50%; 980 border-radius: 50%;
981 overflow: hidden; 981 overflow: hidden;
  982 + background-color: #f2f2f2;
982 } 983 }
983 984
984 985
packageC/pages/luckyGo/luckyGo_goodsInfo/buy_pt.wxml
@@ -18,7 +18,8 @@ @@ -18,7 +18,8 @@
18 ¥ {{sele_g.shop_price}} 18 ¥ {{sele_g.shop_price}}
19 </block> 19 </block>
20 </view> 20 </view>
21 - <view class="spec-goods-price" wx:else>¥ {{prom_price || filters.div100(luckGoInfo.group_price)}}</view> 21 + <view class="spec-goods-price" wx:else>¥ {{filters.div100(luckGoInfo.group_price)}}</view>
  22 + <!-- <view class="spec-goods-price" wx:else>¥ bbb{{prom_price || filters.div100(luckGoInfo.group_price)}}</view> -->
22 </view> 23 </view>
23 24
24 <block wx:if="{{is_normal==1}}"> 25 <block wx:if="{{is_normal==1}}">
@@ -28,7 +29,7 @@ @@ -28,7 +29,7 @@
28 <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> 29 <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view>
29 <view class="spec-goods-stock" wx:else>可售:0</view> 30 <view class="spec-goods-stock" wx:else>可售:0</view>
30 </block> 31 </block>
31 - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> 32 + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block>
32 </view> 33 </view>
33 </block> 34 </block>
34 <!-- <block wx:if="{{is_normal==0}}"> 35 <!-- <block wx:if="{{is_normal==0}}">
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -273,12 +273,24 @@ Page({ @@ -273,12 +273,24 @@ Page({
273 }], 273 }],
274 274
275 275
  276 + luckGoInfo: {},
  277 + showDetails: false,
  278 + num_success: 0, //成团已中商品数量
  279 + isTimeUp: false,
  280 +
  281 + surplus: 0,
  282 +
276 }, 283 },
277 284
278 //------初始化加载---------- 285 //------初始化加载----------
279 onLoad: function (t) { 286 onLoad: function (t) {
280 287
281 - if(t.group_id) { 288 +
  289 + if(t && t.group_id) {
  290 + // wx.setStorage({
  291 + // key: 'group_id',
  292 + // data: t.group_id,
  293 + // });
282 this.data.group_id = t.group_id; 294 this.data.group_id = t.group_id;
283 }; 295 };
284 296
@@ -303,35 +315,8 @@ Page({ @@ -303,35 +315,8 @@ Page({
303 prom_id, 315 prom_id,
304 }); 316 });
305 } 317 }
306 - // console.log('type********>>',this.data.prom_type);  
307 - //-- 自定义海报 --  
308 - // getApp().request.promiseGet("/api/weshop/goods/poster/page", {  
309 - // data: { store_id: os.stoid, type: 1, is_use: 1 }  
310 - // }).then(res => {  
311 - // if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]) {  
312 -  
313 - // var poster_data = res.data.data.pageData[0];  
314 - // var json_str = poster_data.jsonStr;  
315 -  
316 - // if (json_str) {  
317 - // var json_data = JSON.parse(json_str);  
318 - // if (json_data.bg_img) {  
319 -  
320 - // //-- 把图片那到本地 --  
321 - // wx.getImageInfo({  
322 - // src: json_data.bg_img,  
323 - // success: function (res) {  
324 - // var path = res.path;  
325 - // th.setData({ share_b_img: path })  
326 - // },  
327 - // fail: function (res) { }  
328 - // });  
329 - // }  
330 - // th.setData({ poster: json_data })  
331 -  
332 - // }  
333 - // }  
334 - // }) 318 +
  319 +
335 320
336 321
337 //---获取手机地址坐标-- 322 //---获取手机地址坐标--
@@ -539,6 +524,16 @@ Page({ @@ -539,6 +524,16 @@ Page({
539 getApp().request.put("/api/weshop/goods/updateClick", { 524 getApp().request.put("/api/weshop/goods/updateClick", {
540 data: { store_id: os.stoid, goods_id: gid } 525 data: { store_id: os.stoid, goods_id: gid }
541 }); 526 });
  527 +
  528 +
  529 + //--先判断会员登陆状态--
  530 + var user_info = getApp().globalData.userInfo;
  531 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  532 + wx.navigateTo({
  533 + url: '/pages/togoin/togoin',
  534 + })
  535 + return false;
  536 + }
542 537
543 }, 538 },
544 539
@@ -982,7 +977,44 @@ Page({ @@ -982,7 +977,44 @@ Page({
982 }); 977 });
983 this.data.enterAddressPage && (this.data.enterAddressPage = !1); 978 this.data.enterAddressPage && (this.data.enterAddressPage = !1);
984 979
  980 + // 检查幸运购活动商品库存
  981 + getApp().request.get("/api/weshop/activitylist/getActLen/" + o.stoid + "/9/" + this.data.group_id, {
  982 + success: function(res) {
  983 + //console.log('当前幸运购活动的剩余库存', res.data.data);
  984 + if(res.data.code == 0) {
  985 + th.setData({
  986 + // 剩余库存量
  987 + surplus: res.data.data,
  988 + });
  989 + };
  990 + // else {
  991 + // th.setData({
  992 + // surplus: 0,
  993 + // });
  994 + // }
  995 + }
  996 + });
  997 +
985 998
  999 + // 检查是否已经参团购买
  1000 + getApp().request.get("/api/weshop/prom/luckyOrder/getUserOrderInfo/" + o.stoid + "/" + oo.user_id + "/" + this.data.group_id, {
  1001 + success: function(res) {
  1002 + console.log('当前幸运购活动是否已经参团', res.data.code);
  1003 + if(res.data.code == 0) {
  1004 + th.setData({
  1005 + showDetails: true,
  1006 + buyInfo: res.data.data,
  1007 + });
  1008 + } else {
  1009 + th.setData({
  1010 + showDetails: false,
  1011 + });
  1012 + };
  1013 + }
  1014 + });
  1015 +
  1016 +
  1017 +
986 //获取单个活动已成团数量 1018 //获取单个活动已成团数量
987 getApp().request.get(`/api/weshop/prom/luckyTeam/getCtNum/${o.stoid}/${this.data.group_id}`, { 1019 getApp().request.get(`/api/weshop/prom/luckyTeam/getCtNum/${o.stoid}/${this.data.group_id}`, {
988 success: function (res) { 1020 success: function (res) {
@@ -1012,6 +1044,20 @@ Page({ @@ -1012,6 +1044,20 @@ Page({
1012 }); 1044 });
1013 1045
1014 1046
  1047 + //获取单个活动成团已中商品数量
  1048 + let url_num_success = `/api/weshop/prom/luckyOrder/countActNum/${os.stoid}/${this.data.group_id}`;
  1049 + getApp().request.get(url_num_success, {
  1050 + success: function (res) {
  1051 + if (res.data.code == 0) {
  1052 + console.log('成团已中商品数量汇总',res.data.data);
  1053 + th.setData({
  1054 + num_success: res.data.data,
  1055 + });
  1056 + }
  1057 + }
  1058 + });
  1059 +
  1060 +
1015 //获取单个活动成团信息 1061 //获取单个活动成团信息
1016 await getApp().request.promiseGet('/api/weshop/prom/luckyActivity/page', { 1062 await getApp().request.promiseGet('/api/weshop/prom/luckyActivity/page', {
1017 data: { 1063 data: {
@@ -1022,19 +1068,64 @@ Page({ @@ -1022,19 +1068,64 @@ Page({
1022 } 1068 }
1023 }).then(res => { 1069 }).then(res => {
1024 if (res.data.code == 0) { 1070 if (res.data.code == 0) {
1025 - // console.log('成团信息=======》', res.data.data); 1071 + console.log('成团信息=======》', res.data.data);
  1072 + if(res.data.data.pageData && res.data.data.pageData.length == 0) {
  1073 + let obj = {
  1074 + day: '00',
  1075 + hou: '00',
  1076 + min: '00',
  1077 + sec: '00'
  1078 + };
  1079 +
  1080 + th.setData({
  1081 + djs: obj,
  1082 + isTimeUp: true,
  1083 + });
  1084 + } else {
  1085 + th.setData({
  1086 + luckGoInfo: res.data.data.pageData[0],
  1087 + team_id: res.data.data.pageData[0].team_id,
  1088 + luckGoMembers: [],
  1089 + });
  1090 + // wx.setStorage({
  1091 + // key: 'team_id',
  1092 + // data: th.data.team_id,
  1093 + // });
  1094 + th.countDown(th.data.luckGoInfo.end_time, 0);
  1095 + };
  1096 +
  1097 + } else {
1026 th.setData({ 1098 th.setData({
1027 - luckGoInfo: res.data.data.pageData[0],  
1028 - team_id: res.data.data.pageData[0].team_id,  
1029 - luckGoMembers: [], 1099 + isTimeUp: true,
1030 }); 1100 });
1031 - th.countDown(th.data.luckGoInfo.end_time, 0);  
1032 - }; 1101 + };
1033 1102
1034 1103
1035 }); 1104 });
1036 1105
1037 1106
  1107 + // 获取购买次数,判断是否已经超出限购
  1108 + // {store_id}/{user_id}/{aid}
  1109 + let get_aid = this.data.prom_id || this.data.luckGoInfo.id;
  1110 + await getApp().request.get('/api/weshop/prom/luckyOrder/countActNum/' + os.stoid + '/' + oo.user_id + '/' + get_aid, {
  1111 + success: function (res) {
  1112 + if(res.data.code == 0) {
  1113 + console.log(oo.user_id, '判断是否超出限购,获取购买次数', res, );
  1114 + // th.setData({
  1115 + // num_joined: res.data.data,
  1116 + // });
  1117 + let num_joined = res.data.data;
  1118 + let group_join_num = th.data.luckGoInfo.group_join_num;
  1119 + let canBuy = num_joined >= group_join_num ? false : true;
  1120 + th.setData({
  1121 + canBuy,
  1122 + });
  1123 + // console.log('canBuy', th.data.canBuy);
  1124 + };
  1125 + },
  1126 + });
  1127 +
  1128 +
1038 //获取参团成员 1129 //获取参团成员
1039 await getApp().request.promiseGet('/api/weshop/prom/luckyOrder/page', { 1130 await getApp().request.promiseGet('/api/weshop/prom/luckyOrder/page', {
1040 data: { 1131 data: {
@@ -1729,18 +1820,21 @@ Page({ @@ -1729,18 +1820,21 @@ Page({
1729 if (e.is_normal == 1) { 1820 if (e.is_normal == 1) {
1730 this.check_nor_promgood(e.goods_id, function (res) { 1821 this.check_nor_promgood(e.goods_id, function (res) {
1731 if (res && res.cat_id) { 1822 if (res && res.cat_id) {
1732 - e.prom_type = 0; 1823 + e.prom_type = 3;
1733 e.prom_id = res.cat_id; 1824 e.prom_id = res.cat_id;
1734 - } 1825 + } else {
  1826 + e.prom_type = 0;
  1827 + // e.prom_id = 0;
  1828 + }
1735 s.set_b_now(e); 1829 s.set_b_now(e);
1736 /*-- 1830 /*--
1737 wx.redirectTo({ 1831 wx.redirectTo({
1738 url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id, 1832 url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id,
1739 });--*/ 1833 });--*/
1740 1834
1741 - 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); 1835 + // console.log('11111111111111111111111111======》');
  1836 + // getApp().goto("/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart?is_bnow=1&goods_id=" + e.goods_id);
  1837 + 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 1838
1745 }) 1839 })
1746 } else { 1840 } else {
@@ -2274,67 +2368,105 @@ Page({ @@ -2274,67 +2368,105 @@ Page({
2274 //--点击分享事件--- 2368 //--点击分享事件---
2275 onShareAppMessage: function (t) { 2369 onShareAppMessage: function (t) {
2276 2370
2277 - var th = this;  
2278 - var price = th.data.sele_g.shop_price;  
2279 - if (th.data.prom_act) {  
2280 - price = th.data.prom_act.price; 2371 + // var th = this;
  2372 + // var price = th.data.sele_g.shop_price;
  2373 + // if (th.data.prom_act) {
  2374 + // price = th.data.prom_act.price;
2281 2375
2282 - }  
2283 - var title = th.data.sele_g.goods_name;  
2284 - var img = th.data.sele_g.original_img;  
2285 - if (th.data.prom_type == 6 || th.data.prom_type == 1 || th.data.prom_type == 4) {  
2286 - title = th.data.prom_act.share_title;  
2287 - if (!title) title = th.data.prom_act.title;  
2288 - if (th.data.prom_type == 4) title = th.data.prom_act.name;  
2289 -  
2290 - if (th.data.prom_act.share_imgurl)  
2291 - img = th.data.iurl + th.data.prom_act.share_imgurl;  
2292 - }  
2293 2376
  2377 + // }
  2378 + // var title = th.data.sele_g.goods_name;
  2379 + // var img = th.data.sele_g.original_img;
  2380 + // if (th.data.prom_type == 6 || th.data.prom_type == 1 || th.data.prom_type == 4) {
  2381 + // title = th.data.prom_act.share_title;
  2382 + // if (!title) title = th.data.prom_act.title;
  2383 + // if (th.data.prom_type == 4) title = th.data.prom_act.name;
  2384 +
  2385 + // if (th.data.prom_act.share_imgurl)
  2386 + // img = th.data.iurl + th.data.prom_act.share_imgurl;
  2387 + // }
2294 2388
2295 - var url = "/pages/goods/goodsInfo/goodsInfo?goods_id="  
2296 - + th.data.sele_g.goods_id+"&prom_type="+th.data.sele_g.prom_type+"&prom_id="+th.data.sele_g.prom_id;  
2297 - if (getApp().globalData.user_id) {  
2298 - url += "&first_leader=" + getApp().globalData.user_id;  
2299 - }  
2300 2389
2301 - //-- 如果房间分享,且不是会员分享的 --  
2302 - if (getApp().globalData.room_id &&  
2303 - th.data.sele_g.goods_id == getApp().globalData.room_goods_id &&  
2304 - !getApp().globalData.room_user_share  
2305 - ) {  
2306 - url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1";  
2307 - } 2390 + // var url = "/pages/goods/goodsInfo/goodsInfo?goods_id="
  2391 + // + th.data.sele_g.goods_id+"&prom_type="+th.data.sele_g.prom_type+"&prom_id="+th.data.sele_g.prom_id;
  2392 + // if (getApp().globalData.user_id) {
  2393 + // url += "&first_leader=" + getApp().globalData.user_id;
  2394 + // }
2308 2395
2309 - var ob = {  
2310 - title: price + "元 " + title,  
2311 - path: url,  
2312 - imageUrl: img,  
2313 - };  
2314 - if (th.data.prom_type == 6) {  
2315 - title += '\n' + th.data.prom_act.share_remark;  
2316 - ob.title = title;  
2317 - ob.desc = th.data.prom_act.share_remark;  
2318 - } 2396 + // //-- 如果房间分享,且不是会员分享的 --
  2397 + // if (getApp().globalData.room_id &&
  2398 + // th.data.sele_g.goods_id == getApp().globalData.room_goods_id &&
  2399 + // !getApp().globalData.room_user_share
  2400 + // ) {
  2401 + // url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1";
  2402 + // }
2319 2403
2320 - //如果是积分购的时候  
2321 - if (th.data.prom_type == 4) {  
2322 - var name = th.data.prom_act.name;  
2323 - //-- 积分购的 --  
2324 - var pri0 = th.data.prom_act.addmoney;  
2325 - var integral = th.data.prom_act.integral;  
2326 - var text = "";  
2327 - if (integral) { text = integral + "积分"; }  
2328 - if (pri0 && integral) { text += "+"; }  
2329 - if (pri0) { text += "¥" + pri0; }  
2330 -  
2331 - ob.title = text + " " + name;  
2332 - } 2404 + // var ob = {
  2405 + // title: price + "元 " + title,
  2406 + // path: url,
  2407 + // imageUrl: img,
  2408 + // };
  2409 + // if (th.data.prom_type == 6) {
  2410 + // title += '\n' + th.data.prom_act.share_remark;
  2411 + // ob.title = title;
  2412 + // ob.desc = th.data.prom_act.share_remark;
  2413 + // }
  2414 +
  2415 + // //如果是积分购的时候
  2416 + // if (th.data.prom_type == 4) {
  2417 + // var name = th.data.prom_act.name;
  2418 + // //-- 积分购的 --
  2419 + // var pri0 = th.data.prom_act.addmoney;
  2420 + // var integral = th.data.prom_act.integral;
  2421 + // var text = "";
  2422 + // if (integral) { text = integral + "积分"; }
  2423 + // if (pri0 && integral) { text += "+"; }
  2424 + // if (pri0) { text += "¥" + pri0; }
  2425 +
  2426 + // ob.title = text + " " + name;
  2427 + // }
2333 2428
2334 - //-- 页面不能刷新 --  
2335 - this.data.show_prew_img=1;  
2336 - return ob; 2429 + // var title = th.data.sele_g.goods_name;
  2430 + // var img = th.data.sele_g.original_img;
2337 2431
  2432 + // var url = `packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=${th.data.sele_g.goods_id}&prom_type=9&group_id=${th.data.group_id}`; //当前页面url
  2433 + // if (getApp().globalData.user_id) {
  2434 + // url += "&first_leader=" + getApp().globalData.user_id;
  2435 + // }
  2436 +
  2437 + // console.log(url)
  2438 +
  2439 + // var ob = {
  2440 + // title: price + "元 " + title,
  2441 + // path: url,
  2442 + // imageUrl: img,
  2443 + // };
  2444 +
  2445 + // return ob;
  2446 +
  2447 +
  2448 + var pagePath = `packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=${this.data.sele_g.goods_id}&prom_type=9&group_id=${this.data.group_id}`; //当前页面url
  2449 + // console.log('pagePath=====xxxxxx>', pagePath);
  2450 + var imgPath = this.data.iurl + this.data.luckGoInfo.original_img;
  2451 + if (pagePath.indexOf('/') != 0) {
  2452 + pagePath = '/' + pagePath;
  2453 + }
  2454 + // if(getApp().globalData.user_id){
  2455 +
  2456 + // if(pagePath.indexOf("?")>0){
  2457 + // pagePath+="&first_leader="+getApp().globalData.user_id;
  2458 + // }else{
  2459 + // pagePath+="?first_leader="+getApp().globalData.user_id;
  2460 + // }
  2461 + // }
  2462 + return {
  2463 + title: "邀您一起参加幸运购",
  2464 + path: pagePath,
  2465 + imageUrl: imgPath,
  2466 + }
  2467 +
  2468 +
  2469 +
2338 }, 2470 },
2339 2471
2340 //-----图片失败,默认图片----- 2472 //-----图片失败,默认图片-----
@@ -3620,41 +3752,63 @@ Page({ @@ -3620,41 +3752,63 @@ Page({
3620 min: this.timeFormat(min), 3752 min: this.timeFormat(min),
3621 sec: this.timeFormat(sec) 3753 sec: this.timeFormat(sec)
3622 } 3754 }
  3755 + // console.log('cd');
3623 } else { 3756 } else {
3624 - if (th.data.prom_st == 0) {  
3625 - //var endTime2 = new Date(th.data.prom_end_time).getTime();  
3626 - var endTime2 = th.data.prom_act.end_time;  
3627 - th.setData({  
3628 - prom_time_text: '距结束还剩:',  
3629 - prom_st: 1  
3630 - })  
3631 - setTimeout(function () {  
3632 - th.countDown(endTime2)  
3633 - }, 1000);  
3634 - return false; 3757 + // if (th.data.prom_st == 0) {
  3758 + // //var endTime2 = new Date(th.data.prom_end_time).getTime();
  3759 + // var endTime2 = th.data.prom_act.end_time;
  3760 + // th.setData({
  3761 + // prom_time_text: '距结束还剩:',
  3762 + // prom_st: 1
  3763 + // })
  3764 + // setTimeout(function () {
  3765 + // th.countDown(endTime2)
  3766 + // }, 1000);
  3767 + // return false;
3635 3768
3636 - } else {  
3637 - //活动已结束,全部设置为'00'  
3638 - obj = {  
3639 - day: '00',  
3640 - hou: '00',  
3641 - min: '00',  
3642 - sec: '00'  
3643 - }  
3644 - th.setData({  
3645 - prom_time_text: '活动已经结束:',  
3646 - prom_st: 3  
3647 - })  
3648 - th.setData({  
3649 - djs: obj  
3650 - });  
3651 - return false;  
3652 - } 3769 + // } else {
  3770 + // //活动已结束,全部设置为'00'
  3771 + // obj = {
  3772 + // day: '00',
  3773 + // hou: '00',
  3774 + // min: '00',
  3775 + // sec: '00'
  3776 + // }
  3777 + // th.setData({
  3778 + // prom_time_text: '活动已经结束:',
  3779 + // prom_st: 3
  3780 + // })
  3781 + // th.setData({
  3782 + // djs: obj
  3783 + // });
  3784 + // return false;
  3785 + // }
  3786 +
  3787 +
  3788 + obj = {
  3789 + day: '00',
  3790 + hou: '00',
  3791 + min: '00',
  3792 + sec: '00'
  3793 + }
  3794 +
  3795 + th.setData({
  3796 + djs: obj,
  3797 + isTimeUp: true,
  3798 + });
  3799 + console.log('i am here');
  3800 + return false;
3653 } 3801 }
3654 -  
3655 - th.setData({  
3656 - djs: obj  
3657 - }); 3802 +
  3803 + // ----
  3804 +
  3805 +
  3806 +
  3807 +
  3808 + th.setData({
  3809 + djs: obj
  3810 + });
  3811 + // ----
3658 setTimeout(function () { 3812 setTimeout(function () {
3659 th.countDown(endTime) 3813 th.countDown(endTime)
3660 }, 1000); 3814 }, 1000);
@@ -3751,113 +3905,153 @@ Page({ @@ -3751,113 +3905,153 @@ Page({
3751 }, 3905 },
3752 3906
3753 //--点击弹起拼单-- 3907 //--点击弹起拼单--
  3908 + // ind == 1 为普通购买
3754 openSpecModel_pt: function (e) { 3909 openSpecModel_pt: function (e) {
3755 3910
3756 this.setData({ open_ind_store: 9, goodsInputNum: 1 }); 3911 this.setData({ open_ind_store: 9, goodsInputNum: 1 });
  3912 + // 判断是否有待支付订单
  3913 + var aid = this.data.group_id;
  3914 + var switOn = true;
  3915 + s.request.promiseGet('/api/weshop/prom/luckyOrder/page', {
  3916 + data: {
  3917 + store_id: os.stoid,
  3918 + user_id: oo.user_id,
  3919 + aid: aid,
  3920 + pay_status: 0, // 未支付
  3921 + order_status: 0, // 待支付
  3922 + pageSize: 1,
  3923 + page: 1
  3924 + }
  3925 + }).then(res => {
  3926 + if(res.data.code == 0){
  3927 + if (res.data.data.total > 0) {
  3928 + // 待支付订单页面
  3929 + wx.showModal({
  3930 + title: "您已经购买了该商品待支付中",
  3931 + success: function (a) {
  3932 + if (a.confirm) {
  3933 + switOn = false;
  3934 + wx.navigateTo({
  3935 + url: "/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id=" + res.data.data.pageData[0]['order_id']
  3936 + });
  3937 + }
  3938 + }
  3939 + });
  3940 + } else {
  3941 + //--先判断会员状态--
  3942 + var user_info = getApp().globalData.userInfo;
  3943 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) {
  3944 + wx.navigateTo({
  3945 + url: '/pages/togoin/togoin',
  3946 + })
  3947 + return false;
  3948 + };
  3949 +
  3950 + var th = this;
  3951 + var ind = parseInt(e.currentTarget.dataset.ind);
  3952 +
  3953 + console.log('当前ind========>>>>', ind);
  3954 +
  3955 + //ind == 1是普通购买
  3956 + if (ind == 1) {
  3957 + //如果拼单的sku data是空的,就要先获取一下
  3958 + if (th.data.sku_g_pt) {
  3959 + th.get_sto(1);
  3960 + th.setData({
  3961 + is_normal: ind,
  3962 + openSpecModal_pt: 1
  3963 + });
  3964 + } else {
  3965 + th.get_sto(1);
  3966 + th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () {
  3967 + th.setData({
  3968 + is_normal: ind,
  3969 + openSpecModal_pt: 1
  3970 + });
  3971 + });
  3972 +
  3973 + th.setData({
  3974 + is_normal: ind,
  3975 + openSpecModal_pt: 1
  3976 + });
  3977 + };
  3978 + th.check_is_youhui(th.data.gid, 1);
  3979 + } else {
  3980 +
  3981 + // //拼单商品从这里进,先判断有没有买过商品,
  3982 + // getApp().request.get("/api/weshop/order/page", {
  3983 + // data: {
  3984 + // // pt_prom_id: th.data.prom_act.id,
  3985 + // user_id: oo.user_id,
  3986 + // store_id: os.stoid,
  3987 + // pageSize: 1,
  3988 + // page: 1
  3989 + // },
  3990 + // success: function (e) {
  3991 + // //--跳转到已经购买的情况--
  3992 + // if (e.data.data.pageData.length > 0) {
  3993 + // var odr = e.data.data.pageData[0];
  3994 + // //还未支付
  3995 + // if (odr.pt_status == 0 && (odr.order_status == 1 || odr.order_status == 0)) {
  3996 + // wx.showModal({
  3997 + // title: "您已经购买了该商品待支付中",
  3998 + // success: function (a) {
  3999 + // if (a.confirm) {
  4000 + // wx.navigateTo({
  4001 + // url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id,
  4002 + // });
  4003 + // }
  4004 + // }
  4005 + // });
  4006 + // } else if (odr.pt_status == 1 && odr.order_status == 1) {
  4007 +
  4008 + // if (this.data.is_go_to_team_show) return false;
  4009 + // this.data.is_go_to_team_show = 1;
  4010 + // wx.showLoading();
  4011 +
  4012 + // /*---
  4013 + // wx.redirectTo({
  4014 + // url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,
  4015 + // });--*/
  4016 + // getApp().goto("/pages/team/team_success/team_success?ordersn=" + odr.order_sn);
  4017 +
  4018 + // } else {
  4019 + // th.setData({
  4020 + // is_normal: ind,
  4021 + // openSpecModal_pt: 1
  4022 + // });
  4023 + // }
  4024 +
  4025 + // } else {
  4026 + // th.setData({
  4027 + // is_normal: ind,
  4028 + // openSpecModal_pt: 1
  4029 + // });
  4030 + // }
  4031 + // }
  4032 + // });
  4033 + th.get_sto(1);
  4034 + th.setData({
  4035 + is_normal: 0,
  4036 + openSpecModal_pt: 1
  4037 + });
  4038 +
  4039 + }
  4040 + }
  4041 +
  4042 + }
  4043 + });
  4044 +
3757 4045
3758 - //--先判断会员状态--  
3759 - var user_info = getApp().globalData.userInfo;  
3760 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) {  
3761 - wx.navigateTo({  
3762 - url: '/pages/togoin/togoin',  
3763 - })  
3764 - return false;  
3765 - };  
3766 4046
3767 - var th = this;  
3768 - var ind = parseInt(e.currentTarget.dataset.ind);  
3769 -  
3770 - console.log('当前ind========>>>>', ind);  
3771 -  
3772 - //ind == 1是普通购买  
3773 - if (ind == 1) {  
3774 - //如果拼单的sku data是空的,就要先获取一下  
3775 - if (th.data.sku_g_pt) {  
3776 - th.get_sto(1);  
3777 - th.setData({  
3778 - is_normal: ind,  
3779 - openSpecModal_pt: 1  
3780 - });  
3781 - } else {  
3782 - th.get_sto(1);  
3783 - th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () {  
3784 - th.setData({  
3785 - is_normal: ind,  
3786 - openSpecModal_pt: 1  
3787 - });  
3788 - });  
3789 -  
3790 - th.setData({  
3791 - is_normal: ind,  
3792 - openSpecModal_pt: 1  
3793 - });  
3794 - };  
3795 - th.check_is_youhui(th.data.gid, 1);  
3796 - } else {  
3797 4047
3798 - // //拼单商品从这里进,先判断有没有买过商品,  
3799 - // getApp().request.get("/api/weshop/order/page", {  
3800 - // data: {  
3801 - // // pt_prom_id: th.data.prom_act.id,  
3802 - // user_id: oo.user_id,  
3803 - // store_id: os.stoid,  
3804 - // pageSize: 1,  
3805 - // page: 1  
3806 - // },  
3807 - // success: function (e) {  
3808 - // //--跳转到已经购买的情况--  
3809 - // if (e.data.data.pageData.length > 0) {  
3810 - // var odr = e.data.data.pageData[0];  
3811 - // //还未支付  
3812 - // if (odr.pt_status == 0 && (odr.order_status == 1 || odr.order_status == 0)) {  
3813 - // wx.showModal({  
3814 - // title: "您已经购买了该商品待支付中",  
3815 - // success: function (a) {  
3816 - // if (a.confirm) {  
3817 - // wx.navigateTo({  
3818 - // url: "/pages/user/order_detail/order_detail?order_id=" + odr.order_id,  
3819 - // });  
3820 - // }  
3821 - // }  
3822 - // });  
3823 - // } else if (odr.pt_status == 1 && odr.order_status == 1) {  
3824 -  
3825 - // if (this.data.is_go_to_team_show) return false;  
3826 - // this.data.is_go_to_team_show = 1;  
3827 - // wx.showLoading();  
3828 -  
3829 - // /*---  
3830 - // wx.redirectTo({  
3831 - // url: "/pages/team/team_success/team_success?ordersn=" + odr.order_sn,  
3832 - // });--*/  
3833 - // getApp().goto("/pages/team/team_success/team_success?ordersn=" + odr.order_sn);  
3834 -  
3835 - // } else {  
3836 - // th.setData({  
3837 - // is_normal: ind,  
3838 - // openSpecModal_pt: 1  
3839 - // });  
3840 - // }  
3841 -  
3842 - // } else {  
3843 - // th.setData({  
3844 - // is_normal: ind,  
3845 - // openSpecModal_pt: 1  
3846 - // });  
3847 - // }  
3848 - // }  
3849 - // });  
3850 - th.get_sto(1);  
3851 - th.setData({  
3852 - is_normal: 0,  
3853 - openSpecModal_pt: 1  
3854 - });  
3855 -  
3856 - }  
3857 }, 4048 },
3858 4049
3859 //-----------------拼单生成方法--------------------- 4050 //-----------------拼单生成方法---------------------
3860 addCart_pt: function () { 4051 addCart_pt: function () {
  4052 + this.setData({
  4053 + openSpecModal_pt: 0,
  4054 + });
3861 if (this.data.is_normal == 0) { 4055 if (this.data.is_normal == 0) {
3862 //看一下有没有起购数,如果有起购数,要计算起购数 4056 //看一下有没有起购数,如果有起购数,要计算起购数
3863 // var qnum = parseFloat(th.data.prom_act.minbuynum); 4057 // var qnum = parseFloat(th.data.prom_act.minbuynum);
@@ -4040,11 +4234,12 @@ Page({ @@ -4040,11 +4234,12 @@ Page({
4040 newd['prom_id'] = e.act_id; 4234 newd['prom_id'] = e.act_id;
4041 } 4235 }
4042 console.log('aaaaa'); 4236 console.log('aaaaa');
  4237 + newd['prom_type'] = 0;
4043 th.buyNow(newd); 4238 th.buyNow(newd);
4044 }); 4239 });
4045 } 4240 }
4046 else { 4241 else {
4047 - console.log('bbbb'); 4242 + // 点击立即参团
4048 th.buyNow_pt(newd); 4243 th.buyNow_pt(newd);
4049 }; 4244 };
4050 }) 4245 })
@@ -4053,7 +4248,7 @@ Page({ @@ -4053,7 +4248,7 @@ Page({
4053 buyNow_pt: function (e) { 4248 buyNow_pt: function (e) {
4054 s.set_b_now(e); 4249 s.set_b_now(e);
4055 wx.navigateTo({ 4250 wx.navigateTo({
4056 - url: "/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct?is_bnow=1&group_id=" + this.data.group_id +"&goods_id=" + e.goods_id + "&alert=" + this.data.luckGoInfo.lc_alert + '&goods_price=' + this.data.luckGoInfo.group_price/100, 4251 + url: "/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct?is_bnow=1&group_id=" + this.data.group_id + "&goods_id=" + e.goods_id + "&alert=" + this.data.luckGoInfo.lc_alert + '&goods_price=' + this.data.luckGoInfo.group_price/100 + '&is_show=' + this.data.luckGoInfo.is_show,
4057 }); 4252 });
4058 4253
4059 // 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); 4254 // 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);
@@ -4512,8 +4707,10 @@ Page({ @@ -4512,8 +4707,10 @@ Page({
4512 scene += "_" + getApp().globalData.room_id; 4707 scene += "_" + getApp().globalData.room_id;
4513 } 4708 }
4514 ///二微码 4709 ///二微码
4515 - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +  
4516 - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; 4710 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  4711 + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo";
  4712 + // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  4713 + // os.stoid + "?sceneValue=" + scene + "&pageValue=packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo";
4517 4714
4518 console.log(path3); 4715 console.log(path3);
4519 4716
@@ -4630,9 +4827,10 @@ Page({ @@ -4630,9 +4827,10 @@ Page({
4630 context.setFillStyle("red") 4827 context.setFillStyle("red")
4631 4828
4632 4829
4633 - var pri0 = th.data.data.shop_price;  
4634 - if (th.data.prom_act)  
4635 - pri0 = th.data.prom_act.price; 4830 + var pri0 = th.data.luckGoInfo.group_price/100;
  4831 + // console.log('pri0========>>>>>', pri0);
  4832 + // if (th.data.prom_act)
  4833 + // pri0 = th.data.prom_act.price;
4636 pri0 = parseFloat(pri0).toFixed(2); 4834 pri0 = parseFloat(pri0).toFixed(2);
4637 var wd1 = th.data.screenWidth - ut.measureText(pri0, 31 * unit) - 25; 4835 var wd1 = th.data.screenWidth - ut.measureText(pri0, 31 * unit) - 25;
4638 context.fillText("¥", wd1 - 15, 185 * unit); 4836 context.fillText("¥", wd1 - 15, 185 * unit);
@@ -5202,7 +5400,7 @@ Page({ @@ -5202,7 +5400,7 @@ Page({
5202 tt(); 5400 tt();
5203 }, 5401 },
5204 fail: function (res) { 5402 fail: function (res) {
5205 - ee.data.share_goods_img = "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的 5403 + ee.data.share_goods_img = "../../../../images/share/default_g_img.gif"; //分享的图片不能用网络的
5206 tt(); 5404 tt();
5207 } 5405 }
5208 }); 5406 });
@@ -6319,5 +6517,14 @@ Page({ @@ -6319,5 +6517,14 @@ Page({
6319 return newTypeArr; 6517 return newTypeArr;
6320 }, 6518 },
6321 6519
  6520 +
  6521 + //弹出活动已经结束
  6522 + timeUp() {
  6523 + wx.showToast({
  6524 + title: '本商品活动已经结束!',
  6525 + icon: 'none',
  6526 + });
  6527 + },
  6528 +
6322 6529
6323 }); 6530 });
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.json
1 { 1 {
2 - "navigationBarTitleText": "商品详情2", 2 + "navigationBarTitleText": "",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 "nav_box": "/components/nav_box/nav_box", 5 "nav_box": "/components/nav_box/nav_box",
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
@@ -29,8 +29,8 @@ @@ -29,8 +29,8 @@
29 <image src="{{item.head_pic}}" class="img-block"></image> 29 <image src="{{item.head_pic}}" class="img-block"></image>
30 </view> 30 </view>
31 <view class="flex ai_c pd10"> 31 <view class="flex ai_c pd10">
32 - <view class="nickname ellipsis-1x">恭喜{{item.nickname}}</view>  
33 - <view style="flex-shrink: 0;">获得了"{{item.goods_name}}"</view> 32 + <view class="nickname ellipsis-1x">恭喜{{item.nickname}}获得了{{item.goods_name}}</view>
  33 + <!-- <view style="flex-shrink: 0;"></view> -->
34 </view> 34 </view>
35 </view> 35 </view>
36 </swiper-item> 36 </swiper-item>
@@ -114,7 +114,10 @@ @@ -114,7 +114,10 @@
114 <view class="fs50 val">{{filters.toFix(luckGoInfo.group_price/100,2)}}</view> 114 <view class="fs50 val">{{filters.toFix(luckGoInfo.group_price/100,2)}}</view>
115 </view> 115 </view>
116 <view class="word-line fs20 xc-qtunit-price"> 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 </view> 121 </view>
119 </view> 122 </view>
120 123
@@ -195,7 +198,7 @@ @@ -195,7 +198,7 @@
195 198
196 <!-- 这个是分享按钮 --> 199 <!-- 这个是分享按钮 -->
197 <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> --> 200 <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> -->
198 - <view class="xc-share-frame t-c" bindtap="clickShare"> 201 + <view class="xc-share-frame t-c" bindtap="{{isTimeUp ? 'timeUp':'clickShare'}}">
199 <view class="iconfont icon-share"></view> 202 <view class="iconfont icon-share"></view>
200 <!-- <view class="fs22 c-7b">分享</view> --> 203 <!-- <view class="fs22 c-7b">分享</view> -->
201 </view> 204 </view>
@@ -269,9 +272,10 @@ @@ -269,9 +272,10 @@
269 272
270 273
271 274
272 - <view class="goods-num">  
273 - <view class="sales">销量:{{data.sales_sum}}件</view>  
274 - <view class="stock">折扣:{{data.disc}}折</view> 275 + <view class="goods-num pdt20">
  276 + <view class="sales">已售:{{num_success}}件</view>
  277 + <!-- <view class="sales">销量:{{data.sales_sum}}件</view> -->
  278 + <!-- <view class="stock">折扣:{{data.disc}}折</view> -->
275 <view class="stock">{{categories3[0].num}}人评价</view> 279 <view class="stock">{{categories3[0].num}}人评价</view>
276 </view> 280 </view>
277 <view wx:if="{{prom_type==1}}"> 281 <view wx:if="{{prom_type==1}}">
@@ -331,7 +335,7 @@ @@ -331,7 +335,7 @@
331 <view class="xc-partner-frame"> 335 <view class="xc-partner-frame">
332 <view class="zzk-1 flex jc_sb"> 336 <view class="zzk-1 flex jc_sb">
333 <view class="pdl10">已参团{{filters.show_default(luckGoInfo.num, '0')}}人,还差<text class="c-red">{{filters.show_default(luckGoInfo.group_num, '0')- filters.show_default(luckGoInfo.num, '0')}}</text>人成团</view> 337 <view class="pdl10">已参团{{filters.show_default(luckGoInfo.num, '0')}}人,还差<text class="c-red">{{filters.show_default(luckGoInfo.group_num, '0')- filters.show_default(luckGoInfo.num, '0')}}</text>人成团</view>
334 - <view class="ckgd flex ai_c" bindtap="showReward"> 338 + <view class="ckgd flex ai_c" bindtap="{{isTimeUp ? 'timeUp':'showReward'}}">
335 查看奖励 339 查看奖励
336 <view class="bg_right arrow-one"></view> 340 <view class="bg_right arrow-one"></view>
337 </view> 341 </view>
@@ -388,7 +392,7 @@ @@ -388,7 +392,7 @@
388 <!-- <view class="clear"></view> --> 392 <!-- <view class="clear"></view> -->
389 </view> 393 </view>
390 394
391 - <view class="fs24 pdh20 pdt20">*<text class="c-red">{{luckGoInfo.group_num}}</text>人成团,<text class="c-red">{{luckGoInfo.group_win}}</text>人得商品,<text class="c-red">{{luckGoInfo.group_num - luckGoInfo.group_win}}</text>人全额退款并获得<text class="c-red">惊喜礼品</text>!</view> 395 + <view class="fs24 pdh20">*<text class="c-red">{{filters.show_default(luckGoInfo.group_num, '0')}}</text>人成团,<text class="c-red">{{filters.show_default(luckGoInfo.group_win, '0')}}</text>人得商品,<text class="c-red">{{filters.show_default(luckGoInfo.group_num - luckGoInfo.group_win, '0')}}</text>人全额退款并获得<text class="c-red">惊喜礼品</text>!</view>
392 </view> 396 </view>
393 </view> 397 </view>
394 398
@@ -905,12 +909,26 @@ @@ -905,12 +909,26 @@
905 <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules==2 }}"> 909 <block wx:if="{{(sele_g.store_count>0 && sales_rules==1) || sales_rules==2 }}">
906 <view class="btn-container f1"> 910 <view class="btn-container f1">
907 <view bindtap="openSpecModel_pt" data-ind="1" data-it="1" class="btn-yellow flex f1 fdc jc-center"> 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 <view class="lh1 fs pdt4">单独购买</view> 919 <view class="lh1 fs pdt4">单独购买</view>
910 </view> 920 </view>
911 <!-- data-ind="2" --> 921 <!-- data-ind="2" -->
912 <!-- openSpecModel_pt --> 922 <!-- openSpecModel_pt -->
913 - <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt"data-it="0">立即参团</view> 923 + <view class="xc-ash-b f1 flex ai-center jc-center white fs26" wx:if="{{isTimeUp}}">活动已经结束</view>
  924 + <block wx:else>
  925 + <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}}" wx:if="{{showDetails}}">查看详情</view>
  926 + <view class="btn-red f1 flex ai-center jc-center" bindtap="openSpecModel_pt" data-it="0" wx:elif="{{!showDetails && surplus != 0 && canBuy}}">立即参团</view>
  927 + <view class="f1 flex ai-center jc-center xc-ash-b fs26 white" wx:elif="{{!showDetails && surplus == 0}}">已经抢光了</view>
  928 + <view class="f1 flex ai-center jc-center xc-ash-b fs26 white" wx:elif="{{!showDetails && surplus != 0 && !canBuy}}">已超限购次数</view>
  929 + </block>
  930 +
  931 + <!-- <view class="btn-red f1 flex ai-center jc-center" wx:else>已经抢光</view> -->
914 <!-- <view class="btn-red f1 flex ai-center jc-center" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy">立即参团</view> --> 932 <!-- <view class="btn-red f1 flex ai-center jc-center" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" data-action="buy">立即参团</view> -->
915 </view> 933 </view>
916 <!-- <view bindtap="openSpecModel" data-ind="1" class="btn-buy flex fdc jc-center"> 934 <!-- <view bindtap="openSpecModel" data-ind="1" class="btn-buy flex fdc jc-center">
@@ -1241,9 +1259,10 @@ @@ -1241,9 +1259,10 @@
1241 </view> 1259 </view>
1242 </view> 1260 </view>
1243 <!-- 弹起来,购买积分购 --> 1261 <!-- 弹起来,购买积分购 -->
1244 -<view hidden="{{!openSpecModal_inte}}"> 1262 +<!-- <view hidden="{{!openSpecModal_inte}}">
1245 <include src="buy_integral.wxml" /> 1263 <include src="buy_integral.wxml" />
1246 -</view> 1264 +</view> -->
  1265 +
1247 <!-- 弹起来,购买积分购的普通购买 --> 1266 <!-- 弹起来,购买积分购的普通购买 -->
1248 <!-- <view hidden="{{!openSpecModal_inte_normal}}"> 1267 <!-- <view hidden="{{!openSpecModal_inte_normal}}">
1249 <include src="buy_integral_normal.wxml" /> 1268 <include src="buy_integral_normal.wxml" />
@@ -1252,6 +1271,8 @@ @@ -1252,6 +1271,8 @@
1252 <view hidden="{{!openSpecModal_pt}}"> 1271 <view hidden="{{!openSpecModal_pt}}">
1253 <include src="buy_pt.wxml" /> 1272 <include src="buy_pt.wxml" />
1254 </view> 1273 </view>
  1274 +
  1275 +
1255 <!-- --弹起来优惠信息---- --> 1276 <!-- --弹起来优惠信息---- -->
1256 <!-- <view hidden="{{!openPromModal}}"> 1277 <!-- <view hidden="{{!openPromModal}}">
1257 <view bindtap="closePromModal" class="cover-layer"></view> 1278 <view bindtap="closePromModal" class="cover-layer"></view>
@@ -1488,7 +1509,7 @@ @@ -1488,7 +1509,7 @@
1488 <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas> 1509 <canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas>
1489 <warn id="warn"></warn> 1510 <warn id="warn"></warn>
1490 <!-- 分享控件,底部弹出 --> 1511 <!-- 分享控件,底部弹出 -->
1491 -<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share> 1512 +<share id="share_button" bind:send="onShareAppMessage" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
1492 <view wx:if="{{showPoster}}"> 1513 <view wx:if="{{showPoster}}">
1493 <view class="mask" catchtap="closePoster"></view> 1514 <view class="mask" catchtap="closePoster"></view>
1494 <view class="poster-container"> 1515 <view class="poster-container">
@@ -1578,7 +1599,7 @@ @@ -1578,7 +1599,7 @@
1578 <view class="img-container"><image class="img-block" src="{{iurl + 'miniapp/images/luckDraw/yhq.png'}}"></image></view> 1599 <view class="img-container"><image class="img-block" src="{{iurl + 'miniapp/images/luckDraw/yhq.png'}}"></image></view>
1579 <view class="f1 pdl20"> 1600 <view class="f1 pdl20">
1580 <view class="ellipsis-2 popup-title">优惠券-{{i.name}}</view> 1601 <view class="ellipsis-2 popup-title">优惠券-{{i.name}}</view>
1581 - <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">{{i.num}}</text></view> 1602 + <view class="fs26 t-r pdt16 c-7b">数量:<text class="c-red">{{i.num}}</text></view>
1582 </view> 1603 </view>
1583 </view> 1604 </view>
1584 </block> 1605 </block>
@@ -1588,7 +1609,7 @@ @@ -1588,7 +1609,7 @@
1588 <view class="img-container"><image class="img-block" src="{{iurl + 'miniapp/images/luckDraw/fw.png'}}"></image></view> 1609 <view class="img-container"><image class="img-block" src="{{iurl + 'miniapp/images/luckDraw/fw.png'}}"></image></view>
1589 <view class="f1 pdl20"> 1610 <view class="f1 pdl20">
1590 <view class="ellipsis-2 popup-title">服务项目-{{i.name}}</view> 1611 <view class="ellipsis-2 popup-title">服务项目-{{i.name}}</view>
1591 - <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">{{i.num}}</text></view> 1612 + <view class="fs26 t-r pdt16 c-7b">数量:<text class="c-red">{{i.num}}</text></view>
1592 </view> 1613 </view>
1593 </view> 1614 </view>
1594 </block> 1615 </block>
@@ -1598,7 +1619,7 @@ @@ -1598,7 +1619,7 @@
1598 <view class="img-container"><image class="img-block" src="{{iurl + 'miniapp/images/luckDraw/jf.png'}}"></image></view> 1619 <view class="img-container"><image class="img-block" src="{{iurl + 'miniapp/images/luckDraw/jf.png'}}"></image></view>
1599 <view class="f1 pdl20"> 1620 <view class="f1 pdl20">
1600 <view class="ellipsis-2 popup-title">{{luckGoInfo[item.name]}}</view> 1621 <view class="ellipsis-2 popup-title">{{luckGoInfo[item.name]}}</view>
1601 - <view class="fs24 t-r pdt16 c-7b">金额:<text class="c-red">{{filters.div100(luckGoInfo[item.num])}}</text></view> 1622 + <view class="fs26 t-r pdt16 c-7b">金额:<text class="c-red">{{filters.div100(luckGoInfo[item.num])}}</text></view>
1602 </view> 1623 </view>
1603 </view> 1624 </view>
1604 </block> 1625 </block>
@@ -1611,7 +1632,7 @@ @@ -1611,7 +1632,7 @@
1611 </view> 1632 </view>
1612 <view class="f1 pdl20"> 1633 <view class="f1 pdl20">
1613 <view class="ellipsis-2 popup-title">{{item.name}}</view> 1634 <view class="ellipsis-2 popup-title">{{item.name}}</view>
1614 - <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">{{luckGoInfo[item.num]}}</text></view> 1635 + <view class="fs26 t-r pdt16 c-7b">数量:<text class="c-red">{{luckGoInfo[item.num]}}</text></view>
1615 </view> 1636 </view>
1616 </view> 1637 </view>
1617 </block> 1638 </block>
@@ -1623,3 +1644,6 @@ @@ -1623,3 +1644,6 @@
1623 </view> 1644 </view>
1624 </view> 1645 </view>
1625 1646
  1647 + <!-- 制作一个圆球导航 -->
  1648 + <nav_box></nav_box>
  1649 +
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxss
@@ -2889,7 +2889,7 @@ button.custom-service::after{ @@ -2889,7 +2889,7 @@ button.custom-service::after{
2889 .mt20{ margin-top: 20rpx} 2889 .mt20{ margin-top: 20rpx}
2890 2890
2891 .group .group-list.luck { 2891 .group .group-list.luck {
2892 - padding: 0 20rpx; 2892 + padding: 0 20rpx 20rpx 20rpx;
2893 justify-content: flex-start; 2893 justify-content: flex-start;
2894 } 2894 }
2895 2895
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.js
@@ -253,7 +253,7 @@ Page({ @@ -253,7 +253,7 @@ Page({
253 case 3: { //优惠券 253 case 3: { //优惠券
254 app.request.promiseGet('/api/weshop/prom/luckyCoupon/page', { 254 app.request.promiseGet('/api/weshop/prom/luckyCoupon/page', {
255 data: { 255 data: {
256 - store_id: os.stoid, 256 + store_id: app.globalData.setting.stoid,
257 aid: self.data.currentItemAid, 257 aid: self.data.currentItemAid,
258 } 258 }
259 }).then(res => { 259 }).then(res => {
@@ -268,7 +268,7 @@ Page({ @@ -268,7 +268,7 @@ Page({
268 case 4: { //服务项目 268 case 4: { //服务项目
269 app.request.promiseGet('/api/weshop/prom/luckyService/page', { 269 app.request.promiseGet('/api/weshop/prom/luckyService/page', {
270 data: { 270 data: {
271 - store_id: os.stoid, 271 + store_id: app.globalData.setting.stoid,
272 aid: self.data.currentItemAid, 272 aid: self.data.currentItemAid,
273 } 273 }
274 }).then(res => { 274 }).then(res => {
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml
@@ -8,7 +8,8 @@ @@ -8,7 +8,8 @@
8 <view class="list"> 8 <view class="list">
9 <view class="list-item" wx:for="{{list.pageData}}"> 9 <view class="list-item" wx:for="{{list.pageData}}">
10 <!-- <view class="list-item" wx:for="{{list.pageData}}"> --> 10 <!-- <view class="list-item" wx:for="{{list.pageData}}"> -->
11 - <view class="pd20" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}"> 11 + <view class="pd20" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}&team_status={{item.team_status}}&group_id={{item.aid}}">
  12 + <!-- <view class="fs28">{{item.act_name}} (第{{item.team_sn}}期) </view> -->
12 <view class="pdr40 arrow" wx:if="{{item.team_status == 0}}">参团中,还差<text class="c-red">{{filters.difference(item.num, item.group_num)}}</text>人</view> 13 <view class="pdr40 arrow" wx:if="{{item.team_status == 0}}">参团中,还差<text class="c-red">{{filters.difference(item.num, item.group_num)}}</text>人</view>
13 <view class="pdr40 arrow" wx:elif="{{item.team_status == 2}}">已团中,{{item.shipping_status == 0 ? '待发货':'已发货'}}</view> 14 <view class="pdr40 arrow" wx:elif="{{item.team_status == 2}}">已团中,{{item.shipping_status == 0 ? '待发货':'已发货'}}</view>
14 <view class="pdr40 arrow" wx:elif="{{item.team_status == 1}}">未团中,已退款</view> 15 <view class="pdr40 arrow" wx:elif="{{item.team_status == 1}}">未团中,已退款</view>
@@ -28,10 +29,10 @@ @@ -28,10 +29,10 @@
28 </view> 29 </view>
29 </view> 30 </view>
30 <view class="flex ai-center pd20 bdt fs24 jc_sb"> 31 <view class="flex ai-center pd20 bdt fs24 jc_sb">
31 - <view>共1件,实付金额:<text class="rmb">{{item.user_money}}</text></view> 32 + <view>共1件,实付金额:<text class="rmb">{{filters.toFix(item.order_amount+item.user_money,2)}}</text></view>
32 <view class="flex"> 33 <view class="flex">
33 - <view class="btn gray" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}&team_status={{item.team_status}}">查看订单</view>  
34 - <view class="btn c-red mgl20" wx:if="{{item.team_status == 0}}" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{item.aid}}&goods_id={{item.goods_id}}&goods_name={{item.goods_name}}&team_id={{item.team_id}}&&from=list">邀请好友</view> 34 + <view class="btn gray" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}&team_status={{item.team_status}}&group_id={{item.aid}}">查看订单</view>
  35 + <view class="btn c-red mgl20" wx:if="{{item.team_status == 0}}" bindtap="go" data-url="/packageC/pages/luckyGo/luckyGo_details/luckyGo_details?group_id={{item.aid}}&goods_id={{item.goods_id}}&goods_name={{item.goods_name}}&team_id={{item.team_id}}&&from=1">邀请好友</view>
35 <view class="btn c-red mgl20" wx:if="{{item.team_status == 1}}" bindtap="showReward" data-index="{{index}}" data-aid="{{item.aid}}">查看奖励</view> 36 <view class="btn c-red mgl20" wx:if="{{item.team_status == 1}}" bindtap="showReward" data-index="{{index}}" data-aid="{{item.aid}}">查看奖励</view>
36 </view> 37 </view>
37 </view> 38 </view>
@@ -74,7 +75,7 @@ @@ -74,7 +75,7 @@
74 <view class="img-container"><image class="img-block" src="{{imghost + 'miniapp/images/luckDraw/jf.png'}}"></image></view> 75 <view class="img-container"><image class="img-block" src="{{imghost + 'miniapp/images/luckDraw/jf.png'}}"></image></view>
75 <view class="f1"> 76 <view class="f1">
76 <view class="ellipsis-2 popup-title">{{list.pageData[currentItemIndex][item.name]}}</view> 77 <view class="ellipsis-2 popup-title">{{list.pageData[currentItemIndex][item.name]}}</view>
77 - <view class="fs24 t-r pdt16 c-7b">金额:<text class="c-red">{{filters.div100(list.pageData[currentItemIndex][item.num])}}</text></view> 78 + <view class="fs24 t-r pdt16 c-7b">金额:<text class="c-red">{{filters.div100((list.pageData[currentItemIndex][item.num]))}}</text></view>
78 </view> 79 </view>
79 </view> 80 </view>
80 </block> 81 </block>
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss
@@ -49,7 +49,7 @@ page { @@ -49,7 +49,7 @@ page {
49 } 49 }
50 50
51 .title { 51 .title {
52 - height: 88rpx; 52 + /* max-height: 88rpx; */
53 } 53 }
54 54
55 .tab-bd { 55 .tab-bd {
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.js
@@ -47,6 +47,7 @@ Page({ @@ -47,6 +47,7 @@ Page({
47 self.getData(true, '/api/weshop/prom/luckyOrder/page', { 47 self.getData(true, '/api/weshop/prom/luckyOrder/page', {
48 store_id: app.globalData.setting.stoid, 48 store_id: app.globalData.setting.stoid,
49 team_id: self.data.team_id, 49 team_id: self.data.team_id,
  50 + pageSize: 20,
50 }); 51 });
51 52
52 53
@@ -84,6 +85,7 @@ Page({ @@ -84,6 +85,7 @@ Page({
84 this.scrollToLower('/api/weshop/prom/luckyOrder/page', { 85 this.scrollToLower('/api/weshop/prom/luckyOrder/page', {
85 store_id: app.globalData.setting.stoid, 86 store_id: app.globalData.setting.stoid,
86 team_id: self.data.team_id, 87 team_id: self.data.team_id,
  88 + pageSize: 20,
87 }); 89 });
88 }, 90 },
89 91
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.json
1 { 1 {
2 - "navigationBarTitleText": "参团成员", 2 + "navigationBarTitleText": "本期参团成员",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": {} 4 "usingComponents": {}
5 } 5 }
6 \ No newline at end of file 6 \ No newline at end of file
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.wxml
@@ -4,12 +4,12 @@ @@ -4,12 +4,12 @@
4 <view class="flex ai-center pdr20"> 4 <view class="flex ai-center pdr20">
5 <view class="img-container"><image class="img-block" src="{{item.head_pic}}"></image></view> 5 <view class="img-container"><image class="img-block" src="{{item.head_pic}}"></image></view>
6 <view> 6 <view>
7 - <text class="ellipsis-1x wbba">{{item.nickname}}</text>  
8 - <view class="c-8f pdt10">参团编号:{{item.team_sn}}</view> 7 + <text class="ellipsis-1x wbba fs30">{{item.nickname}}</text>
  8 + <!-- <view class="c-8f pdt10">参团编号:{{item.team_sn}}</view> -->
9 </view> 9 </view>
10 </view> 10 </view>
11 <view class="pdt6 shrink0"> 11 <view class="pdt6 shrink0">
12 - <view class="c-9">{{filters.format_time(item.create_time, 1)}}</view> 12 + <view class="c-9">{{filters.format_time(item.add_time, 1)}}</view>
13 <view class="t-r pdt10 c-red bold" wx:if="{{item.team_status == 0}}">待成团</view> 13 <view class="t-r pdt10 c-red bold" wx:if="{{item.team_status == 0}}">待成团</view>
14 <view class="t-r pdt10 c-8f bold" wx:elif="{{item.team_status == 1}}">未团中</view> 14 <view class="t-r pdt10 c-8f bold" wx:elif="{{item.team_status == 1}}">未团中</view>
15 <view class="t-r pdt10 c-red bold" wx:else="{{item.team_status == 2}}">已团中</view> 15 <view class="t-r pdt10 c-red bold" wx:else="{{item.team_status == 2}}">已团中</view>
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.wxss
  1 +page {
  2 + background-color: #f2f2f2;
  3 +}
1 .list { 4 .list {
2 padding-left: 20rpx; 5 padding-left: 20rpx;
3 padding-right: 20rpx; 6 padding-right: 20rpx;
  7 + background-color: white;
4 } 8 }
5 .list-item { 9 .list-item {
6 display: flex; 10 display: flex;
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
@@ -17,7 +17,8 @@ Page({ @@ -17,7 +17,8 @@ Page({
17 onLoad: function(e) { 17 onLoad: function(e) {
18 var th=this; 18 var th=this;
19 var r = void 0 !== e.isGoup && e.isGoup; 19 var r = void 0 !== e.isGoup && e.isGoup;
20 - 20 + // console.log('e*************>>>>>>', e);
  21 + this.data.group_id = e.group_id;
21 getApp().getConfig2(function (e) { 22 getApp().getConfig2(function (e) {
22 23
23 th.setData({conf: e,sales_rules:e.sales_rules, userInfo: getApp().globalData.userInfo}); 24 th.setData({conf: e,sales_rules:e.sales_rules, userInfo: getApp().globalData.userInfo});
@@ -317,429 +318,40 @@ Page({ @@ -317,429 +318,40 @@ Page({
317 318
318 //--------立即支付---------- 319 //--------立即支付----------
319 async jumpToCart4(e) { 320 async jumpToCart4(e) {
320 - var th=this;  
321 - if(this.data.optionIsGoup)  
322 - wx.navigateTo({  
323 - url: "/pages/team/team_confirm/team_confirm?orderSn=" + this.data.order.order_sn + "&orderPay=true"  
324 - })  
325 - var order=this.data.order;  
326 - var order_goods=order.order_goods;  
327 - var user_id=order.user_id;  
328 -  
329 - var wlist="";  
330 - for(var i in order_goods){  
331 - var good=order_goods[i];  
332 - //线下取价功能已经关闭或者过期  
333 - if(!th.data.is_open_offline && good.offline_cut>0){  
334 - wx.showModal({  
335 - title: '提示',  
336 - content: '线下取价功能已经关闭或者过期!'  
337 - });  
338 - return false;  
339 - }  
340 -  
341 - //要每件每件的商品进行检查,看有么有超出库存,超出限购  
342 - var good= order_goods[i],goodsbuynum=0,promgoodsbuynum=0,gg=null;  
343 - //获取单品的现在的活动状态  
344 - await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + good.goods_id, {  
345 - }).then(res=>{  
346 - gg=res.data.data;  
347 - })  
348 - var limit = gg.viplimited;  
349 - var store_count = gg.store_count;  
350 - good.erpwareid=gg.erpwareid;  
351 -  
352 - //---要获得商品,该用户买了多少件,同步应用---  
353 - await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {  
354 - data: {  
355 - store_id: os.stoid,  
356 - user_id: getApp().globalData.user_id,  
357 - goods_id: good.goods_id,  
358 - prom_type: good.prom_type,  
359 - prom_id: good.prom_id  
360 - },  
361 - }).then(res => {  
362 - var buy_num_data = res.data.data;  
363 - if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum;  
364 - goodsbuynum = buy_num_data.goodsbuynum;  
365 - })  
366 -  
367 - var buyed_mum2=goodsbuynum+good.goods_num;  
368 - if (buyed_mum2 > limit && limit > 0) {  
369 -  
370 - var content=gg.goods_name+'购买数量超出商品限购,请取消订单';  
371 - th.toast(content);  
372 - return false;  
373 - }  
374 -  
375 - //当是组合优惠的时候  
376 - if(good.prom_type==7){  
377 - //如果有组合购  
378 - var isok = 1;  
379 - var url="/api/weshop/prom/zhbuy/get/"+os.stoid+"/"+good.prom_id+"/"+getApp().globalData.userInfo.user_id;  
380 - await getApp().request.promiseGet(url, {}).then(res => {  
381 - if(res.data.code==0 && res.data.data){  
382 - if(res.data.data.is_show!=1){  
383 - isok=0;  
384 - }  
385 - //如果活动已经结束  
386 - if(res.data.data.is_end==1){  
387 - isok=0;  
388 - }  
389 - //已经结束  
390 - if(ut.gettimestamp()>res.data.data.end_time){  
391 - isok=0;  
392 - }  
393 - //还未开始  
394 - if(ut.gettimestamp()<res.data.data.start_time){  
395 - isok=0;  
396 - }  
397 -  
398 - }else{  
399 - //未找到商品的活动  
400 - isok = 0;  
401 - }  
402 -  
403 - })  
404 - if (!isok){  
405 - var content=gg.goods_name+'活动已经结束,请取消订单';  
406 - th.toast(content);  
407 - return false;  
408 - }  
409 -  
410 - var url1 = "/api/weshop/prom/zhbuyGoods/page";  
411 - var req_data = {  
412 - page: 1,  
413 - pageSize: 1,  
414 - store_id: os.stoid,  
415 - zh_id: good.prom_id,  
416 - goods_id:good.goods_id  
417 - }  
418 - await getApp().request.promiseGet(url1, {  
419 - data: req_data  
420 - }).then(res => {  
421 - if (ut.ajax_ok(res)) {  
422 - var gdlist = res.data.data.pageData[0];  
423 - good.buyqty=gdlist.buyqty;  
424 - }  
425 - })  
426 321
427 - var num=good['buyqty'];  
428 - console.log(1111);  
429 - console.log(num);  
430 - //---- 要计算商品的限购 -----  
431 - if(good['buyqty']>0){  
432 - if(good.goods_num+promgoodsbuynum>good['buyqty']){ 322 + // 幸运购检查库存量 api/weshop/activitylist/getActLen/{store_id}/{prom_type}/{prom_id}
  323 + if (parseInt(this.data.order.order_goods['0']['prom_type']) == 9) {
  324 + var aid = this.data.order.order_goods['0']['prom_id'];
  325 + var knum = 0;
  326 + await r.promiseGet('/api/weshop/activitylist/getActLen/' + os.stoid + '/9/' + aid, {
  327 + }).then(res => {
  328 + if (res.data.code == 0) {
  329 + knum = res.data.data;
  330 + }
  331 +
  332 + });
433 333
434 - var content= good['goods_name']+"超出活动限购\n";  
435 - th.toast(content);  
436 - return false;  
437 - }  
438 - }  
439 - } 334 + if (knum <= 0) {
  335 + getApp().confirmBox("库存为0,支付失败");
  336 + return false;
  337 + }
440 338
441 - //如果优惠促销和搭配购的时候  
442 - if((good.prom_type==3 || good.prom_type==5) && good.is_collocation!=1 && good.is_gift!=1){  
443 - var p_ok=1;  
444 - await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => {  
445 - if(res.data.code==0){  
446 - var r_data=res.data.data;  
447 - if(!r_data.collocationPromList && good.prom_type==5){  
448 -  
449 - var content=good.goods_name+'未找到活动,请取消订单重新购买';  
450 - th.toast(content);  
451 - p_ok=0;  
452 - }  
453 - if(!r_data.promGoodsLists && good.prom_type==3){  
454 -  
455 - var content=good.goods_name+'未找到活动,请取消订单重新购买';  
456 - th.toast(content);  
457 - p_ok=0;  
458 - }  
459 - }else{  
460 -  
461 - var content=good.goods_name+'未找到活动,请取消订单重新购买';  
462 - th.toast(content);  
463 - p_ok=0;  
464 - }  
465 - })  
466 - if(!p_ok) return false;  
467 } 339 }
468 -  
469 - //商品的普通购买 ,不要进行判断  
470 - if((good.prom_type==1 || good.prom_type==2 || good.prom_type==6 || good.prom_type==4) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal){  
471 - if(gg.prom_type!=good.prom_type && gg.prom_type>0) {  
472 - var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买';  
473 - th.toast(content);  
474 - return false;  
475 - }  
476 - }else{  
477 - if((gg.prom_type==1 || gg.prom_type==3 || gg.prom_type==5 || gg.prom_type==6 || gg.prom_type==4)  
478 - && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) {  
479 - var prom=null;  
480 - //---如果是活动的时候---  
481 - var prom=null,th=this;  
482 - if(gg.prom_type==1){  
483 - await getApp().request.promiseGet("/api/ms/flash_sale/getNew/"+os.stoid+"/"+user_id+"/"+gg.prom_id,{  
484 - }).then(res=>{  
485 - if(res.data.code==0){  
486 - prom=res.data.data;  
487 - prom.price=prom.user_price;  
488 - }  
489 - })  
490 - }  
491 -  
492 - if (gg.prom_type == 2) {  
493 - await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/"+ gg.goods_id + "/" + gg.prom_id, {}).then(res => {  
494 - if (res.data.code == 0) {  
495 - prom = res.data.data;  
496 - prom.price=prom.price;  
497 - }  
498 - })  
499 - }  
500 -  
501 -  
502 - if(gg.prom_type==6){  
503 - await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+gg.prom_id,{  
504 - }).then(res=>{  
505 - if(res.data.code==0){  
506 - prom=res.data.data;  
507 - }  
508 - })  
509 - }  
510 -  
511 - if(gg.prom_type==4){  
512 - await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{  
513 - data:{store_id:os.stoid,goods_id:gg.goods_id}  
514 - }).then(res=>{  
515 - if(res.data.code==0 && res.data.data && res.data.data.pageData){  
516 - prom=res.data.data.pageData[0];  
517 - }  
518 - })  
519 - }  
520 -  
521 - if(prom){  
522 - var t_now=ut.gettimestamp();  
523 - if(prom.is_end==0 && prom.start_time<t_now && prom.end_time>t_now){  
524 -  
525 - var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买';  
526 - th.toast(content);  
527 - return false;  
528 - }  
529 - }  
530 - }  
531 - else{  
532 - //不是赠品的时候  
533 - if(!good.is_gift && good.prom_type!=3){  
534 - var t_ok=1;  
535 - await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => {  
536 - if(res.data.code==0){  
537 - var r_data=res.data.data;  
538 - //-- 参加了全局的优惠活动 --  
539 - if(r_data.promGoodsLists){  
540 -  
541 - var content=gg.goods_name+'商品的活动发生了变化,请取消订单重新购买';  
542 - th.toast(content);  
543 - t_ok=0;  
544 - }  
545 - }  
546 - })  
547 - if(!t_ok) return false;  
548 - }  
549 -  
550 - //-- 如果有参加线下取价 --  
551 - if(good.offline_cut>0) wlist+=encodeURIComponent(gg.erpwareid)+",";  
552 - }  
553 - //赠品和搭配购不判断商品金额  
554 - var isok=1;  
555 - var card_field=th.data.card_field;  
556 - //如果会员是等级会员,商品有等级价,且不是活动商品  
557 - if(!good.is_gift && !good.is_collocation) {  
558 - if (card_field && gg[card_field] > 0) {  
559 - if (good.goods_price != gg[card_field] && good.offline_cut<=0) isok = 0;  
560 - if (good.goods_price >gg[card_field] && good.offline_cut>0) isok = 0; //如果线下价格比较贵,则不通过  
561 -  
562 - } else {  
563 - if (good.goods_price != gg.shop_price && good.offline_cut<=0) isok = 0;  
564 - if (good.goods_price> gg.shop_price && good.offline_cut>0) isok = 0; //如果线下价格比较贵,则不通过  
565 - }  
566 - var is_h=0;  
567 - if (!isok) {  
568 -  
569 - var content=gg.goods_name + '商品的价格发生了变化,请取消订单重新购买';  
570 - th.toast(content);  
571 - return false;  
572 - }  
573 - }  
574 -  
575 - //--如果是线下库存的时候--  
576 - if(th.data.conf.sales_rules==2){  
577 - var ob={};  
578 - await th.check_down_line_next(gg,good.goods_num,order.pickup_id,function(obj){  
579 - ob=obj;  
580 - })  
581 - if(ob.code==-1){  
582 -  
583 - var content=gg.goods_name+'门店库存不足,请取消订单';  
584 - th.toast(content);  
585 - return false;  
586 - }  
587 -  
588 - }else{  
589 - if(good.goods_num>store_count){  
590 -  
591 - var content=gg.goods_name+'商品的库存不足,请取消订单';  
592 - th.toast(content);  
593 - return false;  
594 - }  
595 -  
596 - }  
597 - }  
598 -  
599 - console.log("------------------------------------");  
600 - //---如果是活动的时候---  
601 - var prom=null,goodsinfo=good,th=this;  
602 - if(goodsinfo.prom_type==1){  
603 - await getApp().request.promiseGet("/api/ms/flash_sale/getNew/"+os.stoid+"/"+user_id+"/"+goodsinfo.prom_id,{  
604 - }).then(res=>{  
605 - if(res.data.code==0){  
606 - prom=res.data.data;  
607 - prom.price=prom.user_price;  
608 - }  
609 - })  
610 - }  
611 -  
612 - if (goodsinfo.prom_type == 2) {  
613 - await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/"+ good.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {  
614 - if (res.data.code == 0) {  
615 - prom = res.data.data;  
616 - prom.price=prom.price;  
617 - }  
618 - })  
619 - }  
620 -  
621 -  
622 - if(goodsinfo.prom_type==6 && !good.is_pd_normal){  
623 - await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{  
624 - }).then(res=>{  
625 - if(res.data.code==0){  
626 - prom=res.data.data;  
627 - }  
628 - })  
629 - }  
630 -  
631 - if(goodsinfo.prom_type==4 && !good.is_integral_normal){  
632 - await getApp().request.promiseGet("/api/weshop/integralbuy/pageIntegralBuyGoodsList?stype=1&stypeup=1",{  
633 - data:{store_id:os.stoid,goods_id:goodsinfo.goods_id}  
634 - }).then(res=>{  
635 - if(res.data.code==0 && res.data.data && res.data.data.pageData){  
636 - prom=res.data.data.pageData[0];  
637 - }  
638 - })  
639 - }  
640 -  
641 - //----------如果有活动,并且在进行中,就不计算线下库存---------------  
642 - if(prom){  
643 - var now=ut.gettimestamp();  
644 - if(prom.is_end==1 && prom.end_time<now){  
645 -  
646 - var content=goodsinfo.goods_name+'商品的活动已经结束,请取消订单重新购买';  
647 - th.toast(content);  
648 - return false;  
649 - }  
650 -  
651 - buyed_mum2=promgoodsbuynum+good.goods_num;  
652 - if (buyed_mum2 > prom.buy_limit && prom.buy_limit > 0) {  
653 -  
654 - var content=goodsinfo.goods_name+'购买数量超出商品活动限购,请取消订单重新购买';  
655 - th.toast(content);  
656 - return false;  
657 - }  
658 - //看一下会员的秒杀价格是不是发生了变化  
659 - if(goodsinfo.prom_type==1 && goodsinfo.goods_price!=prom.price){  
660 - var content=goodsinfo.goods_name+'秒杀活动的价格发生了变化';  
661 - th.toast(content);  
662 - return false;  
663 - }  
664 -  
665 - //看一下会员的团购价格是不是发生了变化  
666 - if(goodsinfo.prom_type==2 && goodsinfo.goods_price!=prom.price){  
667 - var content=goodsinfo.goods_name+'秒杀活动的价格发生了变化';  
668 - th.toast(content);  
669 - return false;  
670 - }  
671 340
672 - if(goodsinfo.prom_type==4){  
673 - if (good.goods_num > prom.limitqty-prom.buy_num) {  
674 -  
675 - var content=goodsinfo.goods_name+'购买数量超出商品活动库存,请取消订单';  
676 - th.toast(content);  
677 - return false;  
678 - }  
679 - }else if(goodsinfo.prom_type == 1 || goodsinfo.prom_type == 2 || goodsinfo.prom_type == 6 ) {  
680 - if(order.add_time+5*60<ut.gettimestamp()) {  
681 - var content = gg.goods_name + '该订单已经超时无法支付,请取消订单';  
682 - th.toast(content);  
683 - return false;  
684 - }  
685 - }  
686 -  
687 - }  
688 -  
689 - } 341 + var order=this.data.order;
  342 + var order_goods=order.order_goods;
  343 + var user_id=order.user_id;
  344 + // 检测活动是否结束
  345 +
690 346
691 - //-- 要判断一下线下取价价格是不是发生改变 --  
692 - if(wlist!="" && th.data.is_open_offline && th.data.is_open_offline>0){  
693 - wlist=ut.sub_last(wlist);  
694 - var keyid=order.pickup_id;  
695 - var user_info=getApp().globalData.userInfo;  
696 - if(!keyid) return false;  
697 - var offarr=null;  
698 - await getApp().request.promiseGet("/api/weshop/goods/listWarePrice", {  
699 - data:{  
700 - VIPId:encodeURIComponent(user_info.erpvipid),  
701 - store_id:os.stoid,  
702 - PickupId:keyid,  
703 - WareIds:wlist},  
704 - },  
705 - ).then(res=>{  
706 - if(res.data.code==0 && res.data.data && res.data.data.length>0){  
707 - offarr=res.data.data;  
708 - }  
709 - })  
710 - if(!offarr && offarr.length<=0 ){  
711 - wx.showModal({ title: '获取线下取价失败',});  
712 - }  
713 - var newarr=ut.convert_arr_key(offarr,'WareId');  
714 - //-- 循环判断线下的价格 --  
715 - for(var k in order_goods){  
716 - var good=order_goods[k];  
717 - //判断线下取价是不是一样  
718 - if(newarr[good.erpwareid] &&  
719 - parseFloat(newarr[good.erpwareid].WarePrice)!=parseFloat(good.goods_price)){  
720 -  
721 - var content=good.goods_name + '商品的价格发生了变化,请取消订单重新购买';  
722 - th.toast(content);  
723 - return false;  
724 - }  
725 - }  
726 -  
727 - }  
728 -  
729 - /*---  
730 - o.jumpToCart4({  
731 - order_sn: this.data.order.order_sn,  
732 - order_amount: this.data.order.order_amount,  
733 - type: 1 //正常单  
734 - }, 1);--*/  
735 -  
736 py.pay(this.data.order.order_sn, function() { 347 py.pay(this.data.order.order_sn, function() {
737 - wx.showToast({title: '支付成功'})  
738 - wx.navigateBack(); 348 + wx.showToast({title: '支付成功'})
  349 + wx.navigateBack();
739 },null,os.stoid,1); 350 },null,os.stoid,1);
740 351
741 352
742 - }, 353 + },
  354 +
743 checkTeam: function() { 355 checkTeam: function() {
744 wx.navigateTo({ 356 wx.navigateTo({
745 url: "/pages/team/team_detail/team_detail?foundId=" + this.data.order.orderTeamFound.found_id 357 url: "/pages/team/team_detail/team_detail?foundId=" + this.data.order.orderTeamFound.found_id
@@ -1472,27 +1084,41 @@ Page({ @@ -1472,27 +1084,41 @@ Page({
1472 1084
1473 //跳转到商品 1085 //跳转到商品
1474 go_gd:function (e) { 1086 go_gd:function (e) {
  1087 + // console.log(e);
1475 var gd= e.currentTarget.dataset.gd; 1088 var gd= e.currentTarget.dataset.gd;
1476 - var good_url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gd;  
1477 - var url="/api/weshop/activitylist/getGoodActInfo";  
1478 - var req_data={  
1479 - store_id:os.stoid,goodsidlist:gd,is_detail:1  
1480 - }; 1089 + var prom_type = this.data.order.order_goods[0].prom_type;
  1090 + // var good_url='';
  1091 + // if(prom_type == 9) {
  1092 + // good_url = '';
  1093 + // } else {
  1094 + // good_url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gd;
  1095 + // };
  1096 +
  1097 + var good_url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=" + gd + '&group_id=' + this.data.group_id;
  1098 + getApp().goto(good_url);
  1099 +
  1100 + // var url="/api/weshop/activitylist/getGoodActInfo";
  1101 + // var req_data={
  1102 + // store_id:os.stoid,goodsidlist:gd,is_detail:1
  1103 + // };
1481 //获取秒杀的多规格 1104 //获取秒杀的多规格
1482 - getApp().request.promiseGet(url, {data:req_data}).then(res=>{  
1483 - if(res.data.code==0 && res.data.data){  
1484 - if(res.data.data.length==1){  
1485 - good_url+="&prom_type="+res.data.data[0].prom_type+"&prom_id="+res.data.data[0].act_id;  
1486 - }  
1487 - getApp().goto(good_url); 1105 + // getApp().request.promiseGet(url, {data:req_data}).then(res=>{
  1106 + // if(res.data.code==0 && res.data.data){
  1107 + // if(res.data.data.length==1){
  1108 + // good_url+="&prom_type="+res.data.data[0].prom_type+"&prom_id="+res.data.data[0].act_id;
  1109 + // }
  1110 + // getApp().goto(good_url);
1488 1111
1489 - }else{  
1490 - getApp().goto(good_url);  
1491 - }  
1492 - }) 1112 + // }else{
  1113 + // getApp().goto(good_url);
  1114 + // }
  1115 + // })
1493 }, 1116 },
1494 1117
1495 1118
  1119 +
  1120 +
  1121 +
1496 1122
1497 1123
1498 1124
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.wxml
@@ -30,16 +30,16 @@ @@ -30,16 +30,16 @@
30 data-errorimg="order.order_goods[{{index}}].original_img"></image> 30 data-errorimg="order.order_goods[{{index}}].original_img"></image>
31 </view> 31 </view>
32 <!-- 跳转到商品 --> 32 <!-- 跳转到商品 -->
33 - <navigator class="order-cont pdh20" bindtap="go_gd" data-gd="{{item.goods_id}}"> 33 + <view class="order-cont pdh20" bindtap="go_gd" data-gd="{{item.goods_id}}">
34 <view class="goods-name ellipsis-2">{{item.goods_name}}</view> 34 <view class="goods-name ellipsis-2">{{item.goods_name}}</view>
35 <!--<view class="goods-color">{{item.goods_spec}} {{item.goods_color}}</view>--> 35 <!--<view class="goods-color">{{item.goods_spec}} {{item.goods_color}}</view>-->
36 <view class="goods-color">{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</view> 36 <view class="goods-color">{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</view>
37 - </navigator> 37 + </view>
38 </view> 38 </view>
39 39
40 40
41 <view class="order-num"> 41 <view class="order-num">
42 - <view class="goods-price">¥{{item.member_goods_price}}</view> 42 + <view class="goods-price">¥{{item.goods_price}}</view>
43 <view class="goods-num">×{{item.goods_num}}</view> 43 <view class="goods-num">×{{item.goods_num}}</view>
44 44
45 <!-- 不是整单退的时候 --> 45 <!-- 不是整单退的时候 -->
@@ -84,9 +84,10 @@ @@ -84,9 +84,10 @@
84 <view>{{order.addTimeFormat}}</view> 84 <view>{{order.addTimeFormat}}</view>
85 </view> 85 </view>
86 86
87 - <view class="item" wx:if="{{order.order_prom_type!=5}}"> 87 + <view class="item">
88 <view>配送方式</view> 88 <view>配送方式</view>
89 - <view>{{(order.shipping_name!=''&& order.shipping_name!=null) ?order.shipping_name:'无'}}</view> 89 + <view wx:if="{{order.exp_type == 0}}">{{order.shipping_name}}</view>
  90 + <view wx:if="{{order.exp_type == 1}}">自提</view>
90 </view> 91 </view>
91 <view class="item"> 92 <view class="item">
92 <view>买家留言</view> 93 <view>买家留言</view>
@@ -173,7 +174,7 @@ @@ -173,7 +174,7 @@
173 174
174 175
175 176
176 - <!-- <view class="btn-wrap"> 177 + <view class="btn-wrap">
177 178
178 <view bindtap="zfwk" class="tips-btn" wx:if="{{order.pt_tail_money>0 && order.pt_status==2 }}">支付尾款</view> 179 <view bindtap="zfwk" class="tips-btn" wx:if="{{order.pt_tail_money>0 && order.pt_status==2 }}">支付尾款</view>
179 <view bindtap="jumpToCart4" class="tips-btn" hidden="{{!order.pay_btn}}">立即付款</view> 180 <view bindtap="jumpToCart4" class="tips-btn" hidden="{{!order.pay_btn}}">立即付款</view>
@@ -183,9 +184,8 @@ @@ -183,9 +184,8 @@
183 </block> 184 </block>
184 185
185 <view class="tips-btn" wx:if="{{order.order_status==3}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view> 186 <view class="tips-btn" wx:if="{{order.order_status==3}}" bindtap="deleteOrderData" data-order_id="{{order.order_id}}" >删除订单</view>
186 -  
187 187
188 - <navigator class="tips-btn" hidden="{{!order.shipping_btn}}" url="/pages/user/express/express?order_id={{order.order_id}}">查看物流</navigator> --> 188 + <navigator class="tips-btn" hidden="{{!order.shipping_btn}}" url="/pages/user/express/express?order_id={{order.order_id}}">查看物流</navigator>
189 189
190 <!---has_rt部分退----> 190 <!---has_rt部分退---->
191 <!-- <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1 && order.has_rt!=1}}"> 191 <!-- <block wx:if="{{order.return_btn==undefined && order.is_all_return!=1 && order.has_rt!=1}}">
@@ -197,7 +197,8 @@ @@ -197,7 +197,8 @@
197 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==3 && order.order_status<2}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">重新退款</navigator> 197 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==3 && order.order_status<2}}" url="/pages/order/refund_order/refund_order?order_id={{order.order_id}}">重新退款</navigator>
198 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}" 198 <navigator class="tips-btn" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}"
199 url="/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator> 199 url="/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator>
200 - </block> 200 +
  201 + </block>-->
201 202
202 203
203 <block wx:if="{{order.order_status==2 && order.is_zsorder!=4}}"> 204 <block wx:if="{{order.order_status==2 && order.is_zsorder!=4}}">
@@ -205,12 +206,9 @@ @@ -205,12 +206,9 @@
205 url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator> 206 url="/packageB/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator>
206 <navigator wx:else class="tips-btn" 207 <navigator wx:else class="tips-btn"
207 url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator> 208 url="/packageB/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator>
208 - </block> -->  
209 - <!-- 积分购 拼团 搭配购没有有再来一单 -->  
210 - <!-- <block wx:if="{{ (order.pay_status==1 || order.order_status==3) && order.pt_prom_id<=0 && order.integral<=0 && order.order_goods[0].prom_type!=5}}">  
211 - <view style="background-color: #feca53;" class="tips-btn" bindtap="moreOrder" >再来一单</view>  
212 - </block>  
213 - </view> --> 209 + </block>
  210 +
  211 + </view>
214 </view> 212 </view>
215 213
216 <warn id="warn"></warn> 214 <warn id="warn"></warn>
packageC/pages/luckyGo/luckyGo_winners/luckyGo_winners.js
@@ -68,6 +68,7 @@ Page({ @@ -68,6 +68,7 @@ Page({
68 store_id: app.globalData.setting.stoid, 68 store_id: app.globalData.setting.stoid,
69 team_status: 2, 69 team_status: 2,
70 goods_id: self.data.options.goods_id, 70 goods_id: self.data.options.goods_id,
  71 + pageSize: 20,
71 }); 72 });
72 73
73 74
@@ -104,8 +105,9 @@ Page({ @@ -104,8 +105,9 @@ Page({
104 onReachBottom: function () { 105 onReachBottom: function () {
105 this.scrollToLower('/api/weshop/prom/luckyOrder/page', { 106 this.scrollToLower('/api/weshop/prom/luckyOrder/page', {
106 store_id: app.globalData.setting.stoid, 107 store_id: app.globalData.setting.stoid,
107 - team_status: 1, 108 + team_status: 2,
108 goods_id: this.data.options.goods_id, 109 goods_id: this.data.options.goods_id,
  110 + pageSize: 20,
109 }); 111 });
110 }, 112 },
111 113
packageC/pages/luckyGo/luckyGo_winners/luckyGo_winners.wxss
@@ -8,11 +8,11 @@ page { @@ -8,11 +8,11 @@ page {
8 } 8 }
9 9
10 .img-container { 10 .img-container {
11 - width: 60rpx;  
12 - height: 60rpx; 11 + width: 80rpx;
  12 + height: 80rpx;
13 border-radius: 50%; 13 border-radius: 50%;
14 overflow: hidden; 14 overflow: hidden;
15 - margin-right: 10rpx; 15 + margin-right: 20rpx;
16 flex-shrink: 0; 16 flex-shrink: 0;
17 } 17 }
18 18
@@ -32,7 +32,7 @@ page { @@ -32,7 +32,7 @@ page {
32 display: flex; 32 display: flex;
33 align-items: center; 33 align-items: center;
34 text-align: center; 34 text-align: center;
35 - font-size: 26rpx; 35 + font-size: 28rpx;
36 } 36 }
37 37
38 .list-hd { 38 .list-hd {
packageC/pages/payForAnother/payForAnother.wxml
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <view class="information bdr14 mgt20 fs26"> 21 <view class="information bdr14 mgt20 fs26">
22 <view class="pd20 bdb">代付订单信息</view> 22 <view class="pd20 bdb">代付订单信息</view>
23 <view> 23 <view>
24 - <view class="use-item bfff bdr_t-14 mgt20"> 24 + <view class="use-item bfff bdr_t-14">
25 <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image> 25 <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image>
26 <view>{{bn_pickname}}门店名称</view> 26 <view>{{bn_pickname}}门店名称</view>
27 </view> 27 </view>
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -25,40 +25,55 @@ Page({ @@ -25,40 +25,55 @@ Page({
25 curpage: 1, //当前分页数 25 curpage: 1, //当前分页数
26 pageSize: 10, //页大小 26 pageSize: 10, //页大小
27 total: 0, //总数量 27 total: 0, //总数量
28 - ad_data:null, 28 + ad_data: null,
29 first_leader: e.globalData.first_leader || 0, // 推荐人ID 29 first_leader: e.globalData.first_leader || 0, // 推荐人ID
30 }, 30 },
31 - onLoad: function(options) {  
32 - 31 + onLoad: function (options) {
33 var th = this; 32 var th = this;
34 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 33 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
35 my_confirm.open_cancel(0); 34 my_confirm.open_cancel(0);
36 th.setData({ 35 th.setData({
37 getStorageID: a.stoid, 36 getStorageID: a.stoid,
38 getUserID: d.user_id 37 getUserID: d.user_id
  38 + });
  39 + //-- 获取分享人的ID --
  40 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  41 + if (first_leader) {
  42 + this.setData({
  43 + first_leader,
  44 + })
  45 + //-- user_id代过来免登录 --
  46 + getApp().globalData.first_leader = first_leader;
  47 + //调用接口判断是不是会员
  48 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  49 + if (res.data.code == 0) {
  50 + getApp().globalData.guide_id = res.data.data.id;
  51 + }
  52 + })
  53 + }
  54 +
  55 + getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, {
  56 + data: {
  57 + enabled: 1
  58 + }
  59 + }).then(res => {
  60 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  61 + var a = res.data.data.pageData;
  62 + var tt = {
  63 + 'ad_code': os.imghost + a[0].ad_code,
  64 + 'media_link': '',
  65 + 'ad_weapplink': a[0].ad_weapplink,
  66 + 'bgcolor': a[0].bgcolor,
  67 + };
  68 + th.setData({
  69 + ad_data: tt
  70 + });
  71 + }
39 }) 72 })
40 -  
41 -  
42 - getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, {  
43 - data: {  
44 - enabled: 1  
45 - }  
46 - }).then(res => {  
47 - if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){  
48 - var a = res.data.data.pageData;  
49 - var tt = {  
50 - 'ad_code': os.imghost + a[0].ad_code,  
51 - 'media_link': '',  
52 - 'ad_weapplink':a[0].ad_weapplink,  
53 - 'bgcolor':a[0].bgcolor,  
54 - };  
55 - th.setData({ad_data:tt});  
56 - }  
57 - })  
58 - 73 +
59 74
60 }, 75 },
61 - onShow: function() { 76 + onShow: function () {
62 //--先判断会员状态-- 77 //--先判断会员状态--
63 var user_info = getApp().globalData.userInfo; 78 var user_info = getApp().globalData.userInfo;
64 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 79 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
@@ -69,7 +84,8 @@ Page({ @@ -69,7 +84,8 @@ Page({
69 84
70 }, 85 },
71 86
72 - GetBuyPrice: function(e) { 87 + //购买礼包
  88 + GetBuyPrice: function (e) {
73 var that = this.data; 89 var that = this.data;
74 var th = this; 90 var th = this;
75 var id = e.currentTarget.dataset.id; //活动id 91 var id = e.currentTarget.dataset.id; //活动id
@@ -80,10 +96,10 @@ Page({ @@ -80,10 +96,10 @@ Page({
80 "是否确定购买该礼包", 96 "是否确定购买该礼包",
81 "取消", 97 "取消",
82 "确定", 98 "确定",
83 - function() { 99 + function () {
84 my_confirm.open_cancel(0); 100 my_confirm.open_cancel(0);
85 }, 101 },
86 - function() { 102 + function () {
87 my_confirm.open_cancel(0); 103 my_confirm.open_cancel(0);
88 var json = { 104 var json = {
89 "actId": '', //活动Id 105 "actId": '', //活动Id
@@ -93,25 +109,22 @@ Page({ @@ -93,25 +109,22 @@ Page({
93 "storeId": that.getStorageID, //商家Id 109 "storeId": that.getStorageID, //商家Id
94 "userId": that.getUserID, //用户ID 110 "userId": that.getUserID, //用户ID
95 "buyFrom": 2, 111 "buyFrom": 2,
96 - "first_leader": that.first_leader 112 + "first_leader": that.first_leader,
97 }; 113 };
98 -  
99 - //-- 分享导购要记录 --  
100 - if(getApp().globalData.guide_id){  
101 - json.guide_id=getApp().globalData.guide_id;  
102 - }  
103 -  
104 - 114 +
  115 + //-- 分享导购要记录 --
  116 + if (getApp().globalData.guide_id) {
  117 + json.guide_id = getApp().globalData.guide_id;
  118 + }
  119 +
105 var data = JSON.stringify(json); 120 var data = JSON.stringify(json);
106 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; 121 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
107 getApp().request.json_post(url, json, 122 getApp().request.json_post(url, json,
108 - function(res) { 123 + function (res) {
109 if (res.data.code == 0 && res.data.data) { 124 if (res.data.code == 0 && res.data.data) {
110 -  
111 - var order_sn = res.data.data.orderSn;  
112 - res = res.data.data.result;  
113 - if(!res) return false;  
114 - 125 + var order_sn = res.data.data.orderSn;
  126 + res = res.data.data.result;
  127 + if (!res) return false;
115 var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; 128 var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;
116 wx.requestPayment({ 129 wx.requestPayment({
117 timeStamp: String(res.timeStamp), 130 timeStamp: String(res.timeStamp),
@@ -119,10 +132,10 @@ Page({ @@ -119,10 +132,10 @@ Page({
119 package: res.packageValue, 132 package: res.packageValue,
120 signType: res.signType, 133 signType: res.signType,
121 paySign: res.paySign, 134 paySign: res.paySign,
122 - success: function(res) { 135 + success: function (res) {
123 getApp().goto(url); 136 getApp().goto(url);
124 }, 137 },
125 - fail: function(res) { 138 + fail: function (res) {
126 getApp().my_warnning("取消支付", 0, th); 139 getApp().my_warnning("取消支付", 0, th);
127 } 140 }
128 }); 141 });
@@ -130,7 +143,7 @@ Page({ @@ -130,7 +143,7 @@ Page({
130 getApp().my_warnning(res.data.msg, 0, th); 143 getApp().my_warnning(res.data.msg, 0, th);
131 } 144 }
132 }, 145 },
133 - function(res) { 146 + function (res) {
134 147
135 } 148 }
136 149
@@ -144,20 +157,20 @@ Page({ @@ -144,20 +157,20 @@ Page({
144 157
145 }, 158 },
146 // 积分兑换 159 // 积分兑换
147 - GetBuyIntegral: function(e) { 160 + GetBuyIntegral: function (e) {
148 var that = this.data; 161 var that = this.data;
149 var th = this; 162 var th = this;
150 var id = e.currentTarget.dataset.id; //活动id 163 var id = e.currentTarget.dataset.id; //活动id
151 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 164 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
152 - 165 +
153 my_confirm.open( 166 my_confirm.open(
154 "是否确定兑换该礼包", 167 "是否确定兑换该礼包",
155 "取消", 168 "取消",
156 "确定", 169 "确定",
157 - function() { 170 + function () {
158 my_confirm.open_cancel(0); 171 my_confirm.open_cancel(0);
159 }, 172 },
160 - function() { 173 + function () {
161 my_confirm.open_cancel(0); 174 my_confirm.open_cancel(0);
162 var json = { 175 var json = {
163 "actId": '', //活动Id 176 "actId": '', //活动Id
@@ -169,71 +182,71 @@ Page({ @@ -169,71 +182,71 @@ Page({
169 "buyFrom": 2, 182 "buyFrom": 2,
170 "first_leader": that.first_leader 183 "first_leader": that.first_leader
171 }; 184 };
172 -  
173 -  
174 - //-- 分享导购要记录 --  
175 - if(getApp().globalData.guide_id){  
176 - json.guide_id=getApp().globalData.guide_id;  
177 - }  
178 185
  186 + //-- 分享导购要记录 --
  187 + if (getApp().globalData.guide_id) {
  188 + json.guide_id = getApp().globalData.guide_id;
  189 + }
  190 + console.log(json,'json');
179 var data = JSON.stringify(json); 191 var data = JSON.stringify(json);
180 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; 192 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
181 getApp().request.json_post(url, json, 193 getApp().request.json_post(url, json,
182 - function(res) { 194 + function (res) {
183 if (res.data.code == 0) { 195 if (res.data.code == 0) {
184 getApp().my_warnning("兑换成功!", 1, th); 196 getApp().my_warnning("兑换成功!", 1, th);
185 } else { 197 } else {
186 getApp().my_warnning(res.data.msg, 0, th); 198 getApp().my_warnning(res.data.msg, 0, th);
187 } 199 }
188 }, 200 },
189 - function(res) {}) 201 + function (res) {})
190 202
191 }) 203 })
192 204
193 }, 205 },
194 //免费领取 206 //免费领取
195 - GetFree:function (e){ 207 + GetFree: function (e) {
196 var that = this.data; 208 var that = this.data;
197 var th = this; 209 var th = this;
198 var id = e.currentTarget.dataset.id; //活动id 210 var id = e.currentTarget.dataset.id; //活动id
199 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 211 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
200 my_confirm.open( 212 my_confirm.open(
201 - "是否确定领取该礼包",  
202 - "取消",  
203 - "确定",  
204 - function() {  
205 - my_confirm.open_cancel(0);  
206 - },  
207 - function() {  
208 - my_confirm.open_cancel(0);  
209 - var json = {  
210 - "actId": '', //活动Id  
211 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
212 - "buyType": '3', //1=积分兑换 2=余额购买 3=免费领取  
213 - "giftBagId": id, //礼包Id  
214 - "storeId": that.getStorageID, //商家Id  
215 - "userId": that.getUserID, //用户ID  
216 - "buyFrom": 2  
217 - };  
218 - //-- 分享导购要记录 --  
219 - if(getApp().globalData.guide_id){  
220 - json.guide_id=getApp().globalData.guide_id;  
221 - }  
222 - var data = JSON.stringify(json);  
223 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
224 - getApp().request.json_post(url, json,  
225 - function(res) {  
226 - if (res.data.code == 0) {  
227 - getApp().my_warnning("领取成功!", 1, th);  
228 - } else {  
229 - getApp().my_warnning(res.data.msg, 0, th);  
230 - }  
231 - },  
232 - function(res) {})  
233 - }) 213 + "是否确定领取该礼包",
  214 + "取消",
  215 + "确定",
  216 + function () {
  217 + my_confirm.open_cancel(0);
  218 + },
  219 + function () {
  220 + my_confirm.open_cancel(0);
  221 + var json = {
  222 + "actId": '', //活动Id
  223 + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  224 + "buyType": '3', //1=积分兑换 2=余额购买 3=免费领取
  225 + "giftBagId": id, //礼包Id
  226 + "storeId": that.getStorageID, //商家Id
  227 + "userId": that.getUserID, //用户ID
  228 + "buyFrom": 2,
  229 + "first_leader": that.first_leader
  230 + };
  231 + //-- 分享导购要记录 --
  232 + if (getApp().globalData.guide_id) {
  233 + json.guide_id = getApp().globalData.guide_id;
  234 + }
  235 + var data = JSON.stringify(json);
  236 + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
  237 + getApp().request.json_post(url, json,
  238 + function (res) {
  239 + if (res.data.code == 0) {
  240 + getApp().my_warnning("领取成功!", 1, th);
  241 + } else {
  242 + getApp().my_warnning(res.data.msg, 0, th);
  243 + }
  244 + },
  245 + function (res) {})
  246 + })
234 }, 247 },
235 248
236 - getList: function(e) { 249 + getList: function (e) {
237 var th = this; 250 var th = this;
238 getApp().request.get('/api/weshop/marketing/giftbag/page', { 251 getApp().request.get('/api/weshop/marketing/giftbag/page', {
239 isShowLoading: true, 252 isShowLoading: true,
@@ -243,7 +256,7 @@ Page({ @@ -243,7 +256,7 @@ Page({
243 page: th.data.curpage, 256 page: th.data.curpage,
244 pageSize: th.data.pageSize 257 pageSize: th.data.pageSize
245 }, 258 },
246 - success: function(res) { 259 + success: function (res) {
247 if (res.data.code == 0) { 260 if (res.data.code == 0) {
248 th.data.curpage++; 261 th.data.curpage++;
249 var arr1 = th.data.wareCard; 262 var arr1 = th.data.wareCard;
@@ -260,7 +273,7 @@ Page({ @@ -260,7 +273,7 @@ Page({
260 } else { 273 } else {
261 th.setData({ 274 th.setData({
262 is_read: 1, 275 is_read: 1,
263 - ismore:1 276 + ismore: 1
264 }) 277 })
265 } 278 }
266 } 279 }
@@ -268,7 +281,7 @@ Page({ @@ -268,7 +281,7 @@ Page({
268 281
269 }, 282 },
270 //销毁界面跳转 283 //销毁界面跳转
271 - redirectTo: function(e) { 284 + redirectTo: function (e) {
272 var th = this; 285 var th = this;
273 var url = e.currentTarget.dataset.url; 286 var url = e.currentTarget.dataset.url;
274 //销毁跳转 287 //销毁跳转
@@ -277,14 +290,14 @@ Page({ @@ -277,14 +290,14 @@ Page({
277 }); 290 });
278 }, 291 },
279 //不销毁界面跳转 292 //不销毁界面跳转
280 - navigateTo: function(e) { 293 + navigateTo: function (e) {
281 var th = this; 294 var th = this;
282 var url = e.currentTarget.dataset.url; 295 var url = e.currentTarget.dataset.url;
283 getApp().goto(url); 296 getApp().goto(url);
284 297
285 }, 298 },
286 //下拉事件 299 //下拉事件
287 - onReachBottom: function() { 300 + onReachBottom: function () {
288 var th = this; 301 var th = this;
289 if (th.data.total <= th.data.pageSize) return; 302 if (th.data.total <= th.data.pageSize) return;
290 if (th.data.ismore) return; 303 if (th.data.ismore) return;
@@ -292,42 +305,44 @@ Page({ @@ -292,42 +305,44 @@ Page({
292 th.getList(); 305 th.getList();
293 }, 306 },
294 //图片失败,默认图片 307 //图片失败,默认图片
295 - bind_bnerr2: function(e) { 308 + bind_bnerr2: function (e) {
296 var _errImg = e.target.dataset.errorimg; 309 var _errImg = e.target.dataset.errorimg;
297 var _errObj = {}; 310 var _errObj = {};
298 _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; 311 _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
299 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 312 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
300 }, 313 },
301 - goto: function(e) { 314 + goto: function (e) {
302 var th = this; 315 var th = this;
303 var url = e.currentTarget.dataset.url; 316 var url = e.currentTarget.dataset.url;
304 getApp().goto(url); 317 getApp().goto(url);
305 }, 318 },
306 -  
307 - onShareAppMessage: function (e) {  
308 - var curPage=this;  
309 - var pagePath = curPage.route; //当前页面url  
310 - if (pagePath.indexOf('/') != 0) {  
311 - pagePath = '/' + pagePath;  
312 - }  
313 - return {  
314 - title: "专享礼包",  
315 - path:pagePath,  
316 - }  
317 - }, 319 +
  320 + onShareAppMessage: function (e) {
  321 + var curPage = this;
  322 + var pagePath = curPage.route; //当前页面url
  323 + if (pagePath.indexOf('/') != 0) {
  324 + pagePath = '/' + pagePath;
  325 + }
  326 + pagePath += "?first_leader="+this.data.getUserID;
  327 + return {
  328 + title: "专享礼包",
  329 + path: pagePath,
  330 + }
  331 + },
318 332
319 // 分享朋友圈 333 // 分享朋友圈
320 - onShareTimeline() {  
321 - var curPage=this;  
322 - var pagePath = curPage.route; //当前页面url  
323 - if (pagePath.indexOf('/') != 0) {  
324 - pagePath = '/' + pagePath;  
325 - }  
326 - return {  
327 - title: '专享礼包',  
328 - imageUrl: this.data.ad_data.ad_code,  
329 - path: pagePath,  
330 - }  
331 - },  
332 - 334 + onShareTimeline() {
  335 + var curPage = this;
  336 + var pagePath = curPage.route; //当前页面url
  337 + if (pagePath.indexOf('/') != 0) {
  338 + pagePath = '/' + pagePath;
  339 + }
  340 + pagePath += "?first_leader="+this.data.getUserID;
  341 + return {
  342 + title: '专享礼包',
  343 + imageUrl: this.data.ad_data.ad_code,
  344 + path: pagePath,
  345 + }
  346 + },
  347 +
333 }) 348 })
334 \ No newline at end of file 349 \ No newline at end of file
pages/giftpack/giftpacklist/giftpacklist.js
@@ -28,33 +28,36 @@ Page({ @@ -28,33 +28,36 @@ Page({
28 code: "", //核销码 28 code: "", //核销码
29 c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期 29 c_state: "0", //判断是否已经使用, 0正常 1已使用 2已过期
30 is_lb: 0, //是否有礼包 30 is_lb: 0, //是否有礼包
31 - default_color:null, 31 + default_color: null,
  32 + first_leader: e.globalData.first_leader || 0, // 推荐人ID
32 }, 33 },
33 - onLoad: function(options) { 34 + onLoad: function (options) {
34 var th = this; 35 var th = this;
35 th.setData({ 36 th.setData({
36 isBuy: options.isBuy, 37 isBuy: options.isBuy,
37 getGiftID: options.lbId, 38 getGiftID: options.lbId,
38 - orderSn: options.orderSn 39 + orderSn: options.orderSn,
  40 + getUserID: d.user_id,
39 }) 41 })
40 -  
41 - //-- 获取分享人的ID --  
42 - var first_leader=options.first_leader;  
43 - if(first_leader){  
44 - //-- user_id代过来免登录 --  
45 - getApp().globalData.first_leader=first_leader;  
46 - //调用接口判断是不是会员  
47 - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{  
48 - if(res.data.code==0){  
49 - getApp().globalData.guide_id=res.data.data.id;  
50 - }  
51 - })  
52 - }  
53 - 42 + //-- 获取分享人的ID --
  43 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  44 + if (first_leader) {
  45 + this.setData({
  46 + first_leader,
  47 + })
  48 + //-- user_id代过来免登录 --
  49 + getApp().globalData.first_leader = first_leader;
  50 + //调用接口判断是不是会员
  51 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  52 + if (res.data.code == 0) {
  53 + getApp().globalData.guide_id = res.data.data.id;
  54 + }
  55 + })
  56 + }
54 th.close(); 57 th.close();
55 }, 58 },
56 -  
57 - onShow: function() { 59 +
  60 + onShow: function () {
58 //--先判断会员状态-- 61 //--先判断会员状态--
59 var user_info = getApp().globalData.userInfo; 62 var user_info = getApp().globalData.userInfo;
60 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 63 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
@@ -68,14 +71,14 @@ Page({ @@ -68,14 +71,14 @@ Page({
68 } 71 }
69 72
70 }, 73 },
71 - GetBuyPrice: function(e) { 74 + GetBuyPrice: function (e) {
72 var that = this.data; 75 var that = this.data;
73 var th = this; 76 var th = this;
74 // var id = e.currentTarget.dataset.id;//活动id 77 // var id = e.currentTarget.dataset.id;//活动id
75 //如果还没有开始的话 78 //如果还没有开始的话
76 - if(th.data.isStart!=1){  
77 - getApp().my_warnning("活动还没有开始", 0, th);  
78 - return false; 79 + if (th.data.isStart != 1) {
  80 + getApp().my_warnning("活动还没有开始", 0, th);
  81 + return false;
79 } 82 }
80 83
81 84
@@ -85,10 +88,10 @@ Page({ @@ -85,10 +88,10 @@ Page({
85 "是否确定购买该礼包", 88 "是否确定购买该礼包",
86 "取消", 89 "取消",
87 "确定", 90 "确定",
88 - function() { 91 + function () {
89 my_confirm.open_cancel(0); 92 my_confirm.open_cancel(0);
90 }, 93 },
91 - function() { 94 + function () {
92 my_confirm.open_cancel(0); 95 my_confirm.open_cancel(0);
93 96
94 var json = { 97 var json = {
@@ -98,24 +101,25 @@ Page({ @@ -98,24 +101,25 @@ Page({
98 "giftBagId": that.getGiftID, //礼包Id 101 "giftBagId": that.getGiftID, //礼包Id
99 "storeId": a.stoid, //商家Id 102 "storeId": a.stoid, //商家Id
100 "userId": d.user_id, //用户ID 103 "userId": d.user_id, //用户ID
101 - "buyFrom": 2 104 + "buyFrom": 2,
  105 + "first_leader": that.first_leader,
102 }; 106 };
103 -  
104 - //-- 分享导购要记录 --  
105 - if(getApp().globalData.guide_id){  
106 - json.guide_id=getApp().globalData.guide_id;  
107 - }  
108 - 107 +
  108 + //-- 分享导购要记录 --
  109 + if (getApp().globalData.guide_id) {
  110 + json.guide_id = getApp().globalData.guide_id;
  111 + }
  112 +
109 var data = JSON.stringify(json); 113 var data = JSON.stringify(json);
110 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; 114 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
111 115
112 getApp().request.json_post(url, json, 116 getApp().request.json_post(url, json,
113 - function(res) { 117 + function (res) {
114 if (res.data.code == 0) { 118 if (res.data.code == 0) {
115 var res = res.data.data; 119 var res = res.data.data;
116 - if(!res) return false;  
117 - if(!res.result) return false;  
118 - 120 + if (!res) return false;
  121 + if (!res.result) return false;
  122 +
119 var order_sn = res.orderSn; 123 var order_sn = res.orderSn;
120 var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn; 124 var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;
121 wx.requestPayment({ 125 wx.requestPayment({
@@ -124,10 +128,10 @@ Page({ @@ -124,10 +128,10 @@ Page({
124 package: res.result.packageValue, 128 package: res.result.packageValue,
125 signType: res.result.signType, 129 signType: res.result.signType,
126 paySign: res.result.paySign, 130 paySign: res.result.paySign,
127 - success: function(n) { 131 + success: function (n) {
128 getApp().goto(url); 132 getApp().goto(url);
129 }, 133 },
130 - fail: function(n) { 134 + fail: function (n) {
131 getApp().my_warnning("取消支付", 0, th); 135 getApp().my_warnning("取消支付", 0, th);
132 } 136 }
133 }); 137 });
@@ -135,7 +139,7 @@ Page({ @@ -135,7 +139,7 @@ Page({
135 getApp().my_warnning(res.data.msg, 0, th); 139 getApp().my_warnning(res.data.msg, 0, th);
136 } 140 }
137 }, 141 },
138 - function(res) { 142 + function (res) {
139 143
140 } 144 }
141 145
@@ -147,12 +151,12 @@ Page({ @@ -147,12 +151,12 @@ Page({
147 ) 151 )
148 152
149 }, 153 },
150 - GetBuyIntegral: function(e) { 154 + GetBuyIntegral: function (e) {
151 var that = this.data; 155 var that = this.data;
152 var th = this; 156 var th = this;
153 157
154 //如果还没有开始的话 158 //如果还没有开始的话
155 - if(th.data.isStart!=1){ 159 + if (th.data.isStart != 1) {
156 getApp().my_warnning("活动还没有开始", 0, th); 160 getApp().my_warnning("活动还没有开始", 0, th);
157 return false; 161 return false;
158 } 162 }
@@ -162,10 +166,10 @@ Page({ @@ -162,10 +166,10 @@ Page({
162 "是否确定兑换该礼包", 166 "是否确定兑换该礼包",
163 "取消", 167 "取消",
164 "确定", 168 "确定",
165 - function() { 169 + function () {
166 my_confirm.open_cancel(0); 170 my_confirm.open_cancel(0);
167 }, 171 },
168 - function() { 172 + function () {
169 my_confirm.open_cancel(0); 173 my_confirm.open_cancel(0);
170 var json = { 174 var json = {
171 "actId": '', //活动Id 175 "actId": '', //活动Id
@@ -174,26 +178,25 @@ Page({ @@ -174,26 +178,25 @@ Page({
174 "giftBagId": that.getGiftID, //礼包Id 178 "giftBagId": that.getGiftID, //礼包Id
175 "storeId": a.stoid, //商家ID 179 "storeId": a.stoid, //商家ID
176 "userId": d.user_id, //用户ID 180 "userId": d.user_id, //用户ID
177 - "buyFrom":2 181 + "buyFrom": 2,
  182 + "first_leader": that.first_leader,
178 }; 183 };
179 -  
180 - //-- 分享导购要记录 --  
181 - if(getApp().globalData.guide_id){  
182 - json.guide_id=getApp().globalData.guide_id;  
183 - }  
184 -  
185 - 184 + //-- 分享导购要记录 --
  185 + if (getApp().globalData.guide_id) {
  186 + json.guide_id = getApp().globalData.guide_id;
  187 + }
  188 +
186 var data = JSON.stringify(json); 189 var data = JSON.stringify(json);
187 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; 190 var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
188 getApp().request.json_post(url, json, 191 getApp().request.json_post(url, json,
189 - function(res) { 192 + function (res) {
190 if (res.data.code == 0) { 193 if (res.data.code == 0) {
191 getApp().my_warnning("兑换成功!", 1, th); 194 getApp().my_warnning("兑换成功!", 1, th);
192 } else { 195 } else {
193 getApp().my_warnning(res.data.msg, 0, th); 196 getApp().my_warnning(res.data.msg, 0, th);
194 } 197 }
195 }, 198 },
196 - function(res) { 199 + function (res) {
197 200
198 } 201 }
199 202
@@ -203,7 +206,7 @@ Page({ @@ -203,7 +206,7 @@ Page({
203 206
204 }, 207 },
205 208
206 - GetMyGiftList: function() { 209 + GetMyGiftList: function () {
207 var _this = this; 210 var _this = this;
208 var th = this; 211 var th = this;
209 getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', { 212 getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', {
@@ -213,12 +216,12 @@ Page({ @@ -213,12 +216,12 @@ Page({
213 "userId": d.user_id, //用户ID 216 "userId": d.user_id, //用户ID
214 "orderSn": th.data.orderSn 217 "orderSn": th.data.orderSn
215 }, 218 },
216 - success: function(res) { 219 + success: function (res) {
217 if (res.data.code == 0) { 220 if (res.data.code == 0) {
218 th.setData({ 221 th.setData({
219 giftImage: th.data.iurl + res.data.data.lbUrl, 222 giftImage: th.data.iurl + res.data.data.lbUrl,
220 giftTitle: res.data.data.giftTitle, 223 giftTitle: res.data.data.giftTitle,
221 - default_color:res.data.data.bgcolor 224 + default_color: res.data.data.bgcolor
222 }) 225 })
223 if (res.data.data.giftRemark == '') { 226 if (res.data.data.giftRemark == '') {
224 th.setData({ 227 th.setData({
@@ -272,7 +275,7 @@ Page({ @@ -272,7 +275,7 @@ Page({
272 }); 275 });
273 276
274 }, 277 },
275 - GetBuyGiftList: function() { 278 + GetBuyGiftList: function () {
276 var _this2 = this; 279 var _this2 = this;
277 var th = this.data; 280 var th = this.data;
278 getApp().request.get('/api/weshop/marketing/giftbag/detail/get', { 281 getApp().request.get('/api/weshop/marketing/giftbag/detail/get', {
@@ -287,7 +290,7 @@ Page({ @@ -287,7 +290,7 @@ Page({
287 _this2.setData({ 290 _this2.setData({
288 giftImage: th.iurl + res.data.data.lbUrl, 291 giftImage: th.iurl + res.data.data.lbUrl,
289 giftTitle: res.data.data.giftTitle, 292 giftTitle: res.data.data.giftTitle,
290 - default_color:res.data.data.bgcolor 293 + default_color: res.data.data.bgcolor
291 }) 294 })
292 if (res.data.data.giftRemark == '') { 295 if (res.data.data.giftRemark == '') {
293 _this2.setData({ 296 _this2.setData({
@@ -299,13 +302,13 @@ Page({ @@ -299,13 +302,13 @@ Page({
299 }) 302 })
300 } 303 }
301 304
302 - var isStart=0;  
303 - var now=ut.gettimestamp(); 305 + var isStart = 0;
  306 + var now = ut.gettimestamp();
304 307
305 - var str = res.data.data.starTime.replace(/-/g,'/'); 308 + var str = res.data.data.starTime.replace(/-/g, '/');
306 var start = Date.parse(new Date(str)); 309 var start = Date.parse(new Date(str));
307 start = start / 1000; 310 start = start / 1000;
308 - if(start<now) isStart=1; 311 + if (start < now) isStart = 1;
309 312
310 _this2.setData({ 313 _this2.setData({
311 giftDate: res.data.data.endTime, 314 giftDate: res.data.data.endTime,
@@ -317,7 +320,7 @@ Page({ @@ -317,7 +320,7 @@ Page({
317 giftType: res.data.data.actType, 320 giftType: res.data.data.actType,
318 actTitle: res.data.data.actTitle, 321 actTitle: res.data.data.actTitle,
319 wareCard: res.data.data.wareCard, 322 wareCard: res.data.data.wareCard,
320 - isStart:isStart, 323 + isStart: isStart,
321 }) 324 })
322 } else { 325 } else {
323 getApp().my_warnning(res.data.msg, 0, _this2); 326 getApp().my_warnning(res.data.msg, 0, _this2);
@@ -328,7 +331,7 @@ Page({ @@ -328,7 +331,7 @@ Page({
328 331
329 }, 332 },
330 //显示核销码 333 //显示核销码
331 - code_show: function(e) { 334 + code_show: function (e) {
332 var th = this; 335 var th = this;
333 //--获取成功的时候-- 336 //--获取成功的时候--
334 var no = th.data.code; 337 var no = th.data.code;
@@ -340,17 +343,21 @@ Page({ @@ -340,17 +343,21 @@ Page({
340 qc_com.open(obj) 343 qc_com.open(obj)
341 }, 344 },
342 //获取核销码 345 //获取核销码
343 - getcode: function() { 346 + getcode: function (e) {
344 var th = this; 347 var th = this;
345 var orderSn = th.data.orderSn; //订单号 348 var orderSn = th.data.orderSn; //订单号
  349 + let codeId = e.currentTarget.dataset.codeid;
346 var json = { 350 var json = {
347 "storeId": a.stoid, 351 "storeId": a.stoid,
348 - "orderSn": orderSn  
349 - }; 352 + "orderSn": orderSn,
  353 + }
  354 + if (codeId && codeId !== "") {
  355 + json.id = codeId
  356 + }
350 var data = JSON.stringify(json); 357 var data = JSON.stringify(json);
351 var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址 358 var url = th.data.url + "/api/weshop/marketing/gift/goods/verify/code/get"; //预约接口地址
352 getApp().request.json_post(url, json, 359 getApp().request.json_post(url, json,
353 - function(res) { 360 + function (res) {
354 if (res.data.code == 0) { 361 if (res.data.code == 0) {
355 th.setData({ 362 th.setData({
356 code: res.data.data 363 code: res.data.data
@@ -360,7 +367,7 @@ Page({ @@ -360,7 +367,7 @@ Page({
360 getApp().my_warnning(res.data.msg, 0, th); 367 getApp().my_warnning(res.data.msg, 0, th);
361 } 368 }
362 }, 369 },
363 - function(res) { 370 + function (res) {
364 371
365 }, 372 },
366 "put" 373 "put"
@@ -368,13 +375,13 @@ Page({ @@ -368,13 +375,13 @@ Page({
368 375
369 }, 376 },
370 //界面跳转 377 //界面跳转
371 - goto: function(e) { 378 + goto: function (e) {
372 var th = this; 379 var th = this;
373 var url = e.currentTarget.dataset.url; 380 var url = e.currentTarget.dataset.url;
374 getApp().goto(url); 381 getApp().goto(url);
375 }, 382 },
376 //图片失败,默认图片 383 //图片失败,默认图片
377 - bind_bnerr2: function(e) { 384 + bind_bnerr2: function (e) {
378 var _errImg = e.target.dataset.errorimg; 385 var _errImg = e.target.dataset.errorimg;
379 var _errObj = {}; 386 var _errObj = {};
380 _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png"; 387 _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png";
@@ -392,7 +399,7 @@ Page({ @@ -392,7 +399,7 @@ Page({
392 }, 399 },
393 400
394 //关闭导航 401 //关闭导航
395 - close: function() { 402 + close: function () {
396 var th = this; 403 var th = this;
397 var nav_b = th.selectComponent("#nav_b"); //组件的id 404 var nav_b = th.selectComponent("#nav_b"); //组件的id
398 nav_b.close_box(); 405 nav_b.close_box();
@@ -401,76 +408,95 @@ Page({ @@ -401,76 +408,95 @@ Page({
401 408
402 //--- 分享设置 -- 409 //--- 分享设置 --
403 onShareAppMessage: function (e) { 410 onShareAppMessage: function (e) {
404 - var curPage=this; 411 + var curPage = this;
405 var pagePath = curPage.route; //当前页面url 412 var pagePath = curPage.route; //当前页面url
406 if (pagePath.indexOf('/') != 0) { 413 if (pagePath.indexOf('/') != 0) {
407 pagePath = '/' + pagePath; 414 pagePath = '/' + pagePath;
408 } 415 }
409 -  
410 - pagePath+="?isBuy="+this.data.isBuy;  
411 - if(this.data.isBuy==0){  
412 - pagePath+="&orderSn="+this.data.orderSn;  
413 - }else{  
414 - pagePath+="&lbId="+this.data.getGiftID; 416 + pagePath += "?isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader="+ this.data.getUserID;
  417 + // if (this.data.isBuy == 0) {
  418 + // pagePath += "&orderSn=" + this.data.orderSn;
  419 + // } else {
  420 + // pagePath += "&lbId=" + this.data.getGiftID;
  421 + // }
  422 + return {
  423 + title: "礼包详情",
  424 + path: pagePath,
415 } 425 }
  426 + },
416 427
  428 + /**
  429 + * 用户分享朋友圈
  430 + */
  431 + onShareTimeline() {
  432 + var curPage = this;
  433 + var pagePath = curPage.route; //当前页面url
  434 + if (pagePath.indexOf('/') != 0) {
  435 + pagePath = '/' + pagePath;
  436 + }
  437 + pagePath += "?isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader="+ this.data.getUserID;
  438 + // if (this.data.isBuy == 0) {
  439 + // pagePath += "&orderSn=" + this.data.orderSn;
  440 + // } else {
  441 + // pagePath += "&lbId=" + this.data.getGiftID;
  442 + // }
417 return { 443 return {
418 title: "礼包详情", 444 title: "礼包详情",
419 - path:pagePath, 445 + path: pagePath,
420 } 446 }
421 }, 447 },
422 448
423 //免费领取 449 //免费领取
424 - GetFree: function(e) { 450 + GetFree: function (e) {
425 var that = this.data; 451 var that = this.data;
426 var th = this; 452 var th = this;
427 453
428 //如果还没有开始的话 454 //如果还没有开始的话
429 - if(th.data.isStart!=1){ 455 + if (th.data.isStart != 1) {
430 getApp().my_warnning("活动还没有开始", 0, th); 456 getApp().my_warnning("活动还没有开始", 0, th);
431 return false; 457 return false;
432 } 458 }
433 // var id = e.currentTarget.dataset.id;//活动id 459 // var id = e.currentTarget.dataset.id;//活动id
434 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 460 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
435 my_confirm.open( 461 my_confirm.open(
436 - "是否确定领取该礼包",  
437 - "取消",  
438 - "确定",  
439 - function() {  
440 - my_confirm.open_cancel(0);  
441 - },  
442 - function() {  
443 - my_confirm.open_cancel(0);  
444 - var json = {  
445 - "actId": '', //活动Id  
446 - "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销  
447 - "buyType": '3', //1=积分兑换 2=余额购买  
448 - "giftBagId": that.getGiftID, //礼包Id  
449 - "storeId": a.stoid, //商家ID  
450 - "userId": d.user_id, //用户ID  
451 - "buyFrom":2  
452 - };  
453 -  
454 - //-- 分享导购要记录 --  
455 - if(getApp().globalData.guide_id){  
456 - json.guide_id=getApp().globalData.guide_id;  
457 - } 462 + "是否确定领取该礼包",
  463 + "取消",
  464 + "确定",
  465 + function () {
  466 + my_confirm.open_cancel(0);
  467 + },
  468 + function () {
  469 + my_confirm.open_cancel(0);
  470 + var json = {
  471 + "actId": '', //活动Id
  472 + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  473 + "buyType": '3', //1=积分兑换 2=余额购买
  474 + "giftBagId": that.getGiftID, //礼包Id
  475 + "storeId": a.stoid, //商家ID
  476 + "userId": d.user_id, //用户ID
  477 + "buyFrom": 2,
  478 + "first_leader": that.first_leader,
  479 + };
458 480
  481 + //-- 分享导购要记录 --
  482 + if (getApp().globalData.guide_id) {
  483 + json.guide_id = getApp().globalData.guide_id;
  484 + }
459 485
460 - var data = JSON.stringify(json);  
461 - var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";  
462 - getApp().request.json_post(url, json,  
463 - function(res) {  
464 - if (res.data.code == 0) {  
465 - getApp().my_warnning("领取成功!", 1, th);  
466 - } else {  
467 - getApp().my_warnning(res.data.msg, 0, th);  
468 - }  
469 - },  
470 - function(res) {} 486 + var data = JSON.stringify(json);
  487 + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
  488 + getApp().request.json_post(url, json,
  489 + function (res) {
  490 + if (res.data.code == 0) {
  491 + getApp().my_warnning("领取成功!", 1, th);
  492 + } else {
  493 + getApp().my_warnning(res.data.msg, 0, th);
  494 + }
  495 + },
  496 + function (res) {}
471 497
472 - )  
473 - }) 498 + )
  499 + })
474 500
475 501
476 }, 502 },
pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 <view class="box_ware_title data-v-3a5b7e36"> 47 <view class="box_ware_title data-v-3a5b7e36">
48 <text class="data-v-3a5b7e36">礼包内容</text> 48 <text class="data-v-3a5b7e36">礼包内容</text>
49 </view> 49 </view>
50 - <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index"> 50 + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id">
51 <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36"> 51 <view wx:if="{{item.couponName!=undefined}}" class="box_ware_box data-v-3a5b7e36">
52 <view class="box_ware_img data-v-3a5b7e36"> 52 <view class="box_ware_img data-v-3a5b7e36">
53 <block wx:if="{{item.lbType==1}}"> 53 <block wx:if="{{item.lbType==1}}">
@@ -73,15 +73,23 @@ @@ -73,15 +73,23 @@
73 <view class="box_ware_item_price data-v-3a5b7e36"> 73 <view class="box_ware_item_price data-v-3a5b7e36">
74 <text class="data-v-3a5b7e36"></text> 74 <text class="data-v-3a5b7e36"></text>
75 </view> 75 </view>
76 - <view class="box_ware_item_qty data-v-3a5b7e36"> 76 + <view class="box_ware_item_qty data-v-3a5b7e36 flex">
77 <text class="data-v-3a5b7e36 ellipsis-1"> 77 <text class="data-v-3a5b7e36 ellipsis-1">
78 - {{"数量:"+item.num}}  
79 - </text> 78 + {{"数量:"+item.num}}
  79 + </text>
  80 + <block wx:if="{{isBuy==0}}">
  81 + <text style="margin-left:10rpx" wx:if="{{item.useState}}">
  82 + 已核销
  83 + </text>
  84 + <text style="margin-left:10rpx" wx:else>
  85 + 未核销
  86 + </text>
  87 + </block>
80 </view> 88 </view>
81 <view class="box_ware_code data-v-3a5b7e36"> 89 <view class="box_ware_code data-v-3a5b7e36">
82 <!-- <block wx:if="{{c_state==0}}"> --> 90 <!-- <block wx:if="{{c_state==0}}"> -->
83 <block wx:if="{{isBuy==0&item.lbType==1}}"> 91 <block wx:if="{{isBuy==0&item.lbType==1}}">
84 - <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" class="data-v-3a5b7e36"></image> 92 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="getcode" data-codeId="{{item.Id}}" class="data-v-3a5b7e36"></image>
85 </block> 93 </block>
86 <!-- </block> --> 94 <!-- </block> -->
87 <!-- 95 <!--
pages/giftpack/mygiftpack/mygiftpack.js
@@ -25,18 +25,34 @@ Page({ @@ -25,18 +25,34 @@ Page({
25 curpage: 1, //当前分页数 25 curpage: 1, //当前分页数
26 pageSize: 10, //页大小 26 pageSize: 10, //页大小
27 total: 0, //总数量 27 total: 0, //总数量
28 - ad_data:null, 28 + ad_data:null,
  29 + first_leader: e.globalData.first_leader || 0, // 推荐人ID
29 }, 30 },
30 31
31 onLoad: function(options) { 32 onLoad: function(options) {
32 -  
33 var th = this; 33 var th = this;
34 th.setData({ 34 th.setData({
35 getStorageID: a.stoid, 35 getStorageID: a.stoid,
36 getUserID: d.user_id, 36 getUserID: d.user_id,
37 loadingType: 0, 37 loadingType: 0,
38 getDate: i.formatTime(new Date().getTime()) 38 getDate: i.formatTime(new Date().getTime())
39 - }) 39 + });
  40 +
  41 + //-- 获取分享人的ID --
  42 + var first_leader = options.first_leader || getApp().globalData.first_leader;
  43 + if (first_leader) {
  44 + this.setData({
  45 + first_leader,
  46 + })
  47 + //-- user_id代过来免登录 --
  48 + getApp().globalData.first_leader = first_leader;
  49 + //调用接口判断是不是会员
  50 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  51 + if (res.data.code == 0) {
  52 + getApp().globalData.guide_id = res.data.data.id;
  53 + }
  54 + })
  55 + }
40 56
41 getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, { 57 getApp().request.promiseGet("/api/weshop/ad/page?pid=901&store_id=" + os.stoid, {
42 data: { 58 data: {
@@ -125,13 +141,13 @@ Page({ @@ -125,13 +141,13 @@ Page({
125 if (th.data.ismore) return; 141 if (th.data.ismore) return;
126 th.getList(); 142 th.getList();
127 }, 143 },
  144 +
128 //图片失败,默认图片 145 //图片失败,默认图片
129 bind_bnerr2: function(e) { 146 bind_bnerr2: function(e) {
130 var _errImg = e.target.dataset.errorimg; 147 var _errImg = e.target.dataset.errorimg;
131 var _errObj = {}; 148 var _errObj = {};
132 _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; 149 _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
133 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; 150 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
134 -  
135 }, 151 },
136 152
137 153
@@ -142,6 +158,7 @@ onShareAppMessage: function (e) { @@ -142,6 +158,7 @@ onShareAppMessage: function (e) {
142 if (pagePath.indexOf('/') != 0) { 158 if (pagePath.indexOf('/') != 0) {
143 pagePath = '/' + pagePath; 159 pagePath = '/' + pagePath;
144 } 160 }
  161 + pagePath += "?first_leader="+ this.data.getUserID;
145 return { 162 return {
146 title: "专享礼包", 163 title: "专享礼包",
147 path:pagePath, 164 path:pagePath,
@@ -153,7 +170,8 @@ onShareAppMessage: function (e) { @@ -153,7 +170,8 @@ onShareAppMessage: function (e) {
153 var pagePath = curPage.route; //当前页面url 170 var pagePath = curPage.route; //当前页面url
154 if (pagePath.indexOf('/') != 0) { 171 if (pagePath.indexOf('/') != 0) {
155 pagePath = '/' + pagePath; 172 pagePath = '/' + pagePath;
156 - } 173 + }
  174 + pagePath += "?first_leader="+ this.data.getUserID;
157 return { 175 return {
158 title: '专享礼包', 176 title: '专享礼包',
159 imageUrl: this.data.ad_data.ad_code, 177 imageUrl: this.data.ad_data.ad_code,
pages/goods/goodsInfo/goodsInfo.js
@@ -702,7 +702,7 @@ Page({ @@ -702,7 +702,7 @@ Page({
702 702
703 //---展示--- 703 //---展示---
704 onShow: function () { 704 onShow: function () {
705 - console.log('djfijsaoifjoisadjfoij'); 705 + // console.log('djfijsaoifjoisadjfoij');
706 var goods_list = null, th = this, that = this; 706 var goods_list = null, th = this, that = this;
707 var show_prew_img = this.data.show_prew_img 707 var show_prew_img = this.data.show_prew_img
708 if (show_prew_img) { 708 if (show_prew_img) {
@@ -836,7 +836,6 @@ Page({ @@ -836,7 +836,6 @@ Page({
836 t.data.data.prom_type=ee.data.prom_type; 836 t.data.data.prom_type=ee.data.prom_type;
837 t.data.data.prom_id=ee.data.prom_id; 837 t.data.data.prom_id=ee.data.prom_id;
838 } 838 }
839 -  
840 ee.setData({ 839 ee.setData({
841 data: t.data.data, 840 data: t.data.data,
842 sele_g: t.data.data, 841 sele_g: t.data.data,
@@ -845,7 +844,7 @@ Page({ @@ -845,7 +844,7 @@ Page({
845 844
846 845
847 //获取统一条形码,普通商品和优惠促销的商品 846 //获取统一条形码,普通商品和优惠促销的商品
848 - if (ee.data.data.prom_type == 0 || ee.data.data.prom_type == 3 || ee.data.data.prom_type == 5 || ee.data.data.prom_type == 7) { 847 + if (ee.data.data.prom_type == 0 || ee.data.data.prom_type == 3 || ee.data.data.prom_type == 5 || ee.data.data.prom_type == 7 || ee.data.data.prom_type == 9) {
849 //默认门店要拿下门店库存 848 //默认门店要拿下门店库存
850 if (that.data.sales_rules == 2 && that.data.is_newsales_rules) { 849 if (that.data.sales_rules == 2 && that.data.is_newsales_rules) {
851 //获取门店 850 //获取门店
@@ -1838,7 +1837,20 @@ Page({ @@ -1838,7 +1837,20 @@ Page({
1838 return false; 1837 return false;
1839 } 1838 }
1840 1839
1841 - if(th.data.more_flash && open_store==1){ 1840 + var check_up=0;
  1841 + if(th.data.more_flash){
  1842 + for(var i in th.data.more_flash){
  1843 + var item=th.data.more_flash[i];
  1844 + if(item.prom_type==1){
  1845 + check_up=1;
  1846 + break
  1847 + }
  1848 + }
  1849 + }
  1850 +
  1851 +
  1852 +
  1853 + if(check_up && open_store==1){
1842 th.setData({is_pop_more:1}); 1854 th.setData({is_pop_more:1});
1843 }else{ 1855 }else{
1844 var ind = t.currentTarget.dataset.ind; 1856 var ind = t.currentTarget.dataset.ind;
@@ -2269,7 +2281,9 @@ Page({ @@ -2269,7 +2281,9 @@ Page({
2269 if (res.data.code == 0) prom = res.data.data; 2281 if (res.data.code == 0) prom = res.data.data;
2270 }) 2282 })
2271 break 2283 break
2272 - case 8: 2284 + //预售和幸运购不参与
  2285 + case 8:
  2286 + case 9:
2273 continue; 2287 continue;
2274 } 2288 }
2275 2289
@@ -2342,6 +2356,9 @@ Page({ @@ -2342,6 +2356,9 @@ Page({
2342 for (var i in sku_g) { 2356 for (var i in sku_g) {
2343 if (sku_g[i].goods_id == gid) { 2357 if (sku_g[i].goods_id == gid) {
2344 item = sku_g[i]; 2358 item = sku_g[i];
  2359 + if(item.original_img.indexOf(that.data.iurl)==-1){
  2360 + item.original_img=that.data.iurl+item.original_img;
  2361 + }
2345 break 2362 break
2346 } 2363 }
2347 } 2364 }
@@ -3015,7 +3032,7 @@ Page({ @@ -3015,7 +3032,7 @@ Page({
3015 var user_id=getApp().globalData.user_id; 3032 var user_id=getApp().globalData.user_id;
3016 if(!user_id) user_id=0; 3033 if(!user_id) user_id=0;
3017 3034
3018 - if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7) { 3035 + if (prom_type == 3 || prom_type == 0 || prom_type == 5 || prom_type == 7 || prom_type == 9) {
3019 this.setData({ 3036 this.setData({
3020 prom_type: 0,isshow: 1, 3037 prom_type: 0,isshow: 1,
3021 }); 3038 });
@@ -3096,9 +3113,8 @@ Page({ @@ -3096,9 +3113,8 @@ Page({
3096 }); 3113 });
3097 } 3114 }
3098 }) 3115 })
3099 -  
3100 -  
3101 } 3116 }
  3117 +
3102 if (prom_type == 1 && prom_id==0){ 3118 if (prom_type == 1 && prom_id==0){
3103 this.setData({ 3119 this.setData({
3104 prom_type: 0,isshow: 1, 3120 prom_type: 0,isshow: 1,
@@ -4355,6 +4371,12 @@ Page({ @@ -4355,6 +4371,12 @@ Page({
4355 context.fillText('强烈推荐', 64*unit, 672*unit); 4371 context.fillText('强烈推荐', 64*unit, 672*unit);
4356 // 7.商品价格 4372 // 7.商品价格
4357 let price = '¥' + this.data.data.shop_price; 4373 let price = '¥' + this.data.data.shop_price;
  4374 +
  4375 + if(this.data.card_field && this.data.data[this.data.card_field]){
  4376 + price = '¥' + this.data.data[this.data.card_field];
  4377 + }
  4378 +
  4379 +
4358 // if (th.data.prom_act) 4380 // if (th.data.prom_act)
4359 // pri0 = th.data.prom_act.price; 4381 // pri0 = th.data.prom_act.price;
4360 context.setFontSize(32*unit); 4382 context.setFontSize(32*unit);
@@ -4527,8 +4549,11 @@ Page({ @@ -4527,8 +4549,11 @@ Page({
4527 context.setFontSize(23 * unit) 4549 context.setFontSize(23 * unit)
4528 context.setFillStyle("red") 4550 context.setFillStyle("red")
4529 4551
4530 -  
4531 var pri0 = th.data.data.shop_price; 4552 var pri0 = th.data.data.shop_price;
  4553 + if(th.data.card_field && th.data.data[th.data.card_field]){
  4554 + pri0=th.data.data[th.data.card_field];
  4555 + }
  4556 +
4532 if (th.data.prom_act) 4557 if (th.data.prom_act)
4533 pri0 = th.data.prom_price; 4558 pri0 = th.data.prom_price;
4534 pri0 = parseFloat(pri0).toFixed(2); 4559 pri0 = parseFloat(pri0).toFixed(2);
pages/goods/goodsList/goodsList.wxml
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <view class="item-cont"> 62 <view class="item-cont">
63 <view class="title ellipsis-2">{{item.goods_name}}</view> 63 <view class="title ellipsis-2">{{item.goods_name}}</view>
64 <!-- 判断是否有活动价 --> 64 <!-- 判断是否有活动价 -->
65 - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 }}"> 65 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 }}">
66 <view class="flex on"> 66 <view class="flex on">
67 <!-- 活动价 --> 67 <!-- 活动价 -->
68 <view class="price"> 68 <view class="price">
pages/goods/search/g_filter.wxs
@@ -88,6 +88,11 @@ var g_filters = { @@ -88,6 +88,11 @@ var g_filters = {
88 if(item.prom_type==8){ 88 if(item.prom_type==8){
89 url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id 89 url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id
90 } 90 }
  91 + // 如果是幸运购活动商品
  92 + if(item.prom_type == 9){
  93 + url1 = "/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=" + item.goods_id + "&group_id=" + item.prom_id
  94 + }
  95 +
91 if(item.prom_type==1 && item.prom_id>0){ 96 if(item.prom_type==1 && item.prom_id>0){
92 url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1"; 97 url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1";
93 } 98 }
pages/goods/search/search.js
@@ -146,7 +146,6 @@ Page({ @@ -146,7 +146,6 @@ Page({
146 for(let i in res.data.data.pageData){ 146 for(let i in res.data.data.pageData){
147 let item=res.data.data.pageData[i]; 147 let item=res.data.data.pageData[i];
148 item.original_img = th.data.url + item.original_img; 148 item.original_img = th.data.url + item.original_img;
149 -  
150 var url="/api/weshop/activitylist/getGoodActInfo"; 149 var url="/api/weshop/activitylist/getGoodActInfo";
151 var req_data={ 150 var req_data={
152 store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1 151 store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1
@@ -184,7 +183,7 @@ Page({ @@ -184,7 +183,7 @@ Page({
184 var rd= { 183 var rd= {
185 store_id: oo.stoid, 184 store_id: oo.stoid,
186 presell_id: presell_id, 185 presell_id: presell_id,
187 - goods_id: val.goods_id 186 + goods_id: item.goods_id
188 } 187 }
189 //------获取预售从表---------- 188 //------获取预售从表----------
190 await getApp().request.promiseGet(url1, { 189 await getApp().request.promiseGet(url1, {
@@ -220,14 +219,13 @@ Page({ @@ -220,14 +219,13 @@ Page({
220 } 219 }
221 th.data.requestData.push(item); 220 th.data.requestData.push(item);
222 e.setData({requestData: e.data.requestData}); 221 e.setData({requestData: e.data.requestData});
223 - e.closeSearchModal();  
224 } 222 }
225 } 223 }
226 - 224 + e.closeSearchModal();
227 }) 225 })
228 -  
229 }, 226 },
230 onReachBottom: function() { 227 onReachBottom: function() {
  228 + this.data.currentPage++
231 this.data.openSearchModal || e.canloadMore() && this.requestSearch(this.data.requestUrl); 229 this.data.openSearchModal || e.canloadMore() && this.requestSearch(this.data.requestUrl);
232 }, 230 },
233 openFilterModal: function() { 231 openFilterModal: function() {
@@ -289,7 +287,7 @@ Page({ @@ -289,7 +287,7 @@ Page({
289 search: function(t) { 287 search: function(t) {
290 if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词"); 288 if ("string" != typeof t || "" == t) return a.showWarning("请输入搜索关键词");
291 this.data.key_str=t; 289 this.data.key_str=t;
292 - this.historyRecord(); 290 + this.historyRecord();
293 this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); 291 this.resetData(), this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
294 }, 292 },
295 293
pages/goods/search/search.wxml
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 <view class="item-cont"> 35 <view class="item-cont">
36 <view class="title ellipsis-2">{{item.goods_name}}</view> 36 <view class="title ellipsis-2">{{item.goods_name}}</view>
37 <!-- 判断是否有活动价,小程序没有有团购和拼单 --> 37 <!-- 判断是否有活动价,小程序没有有团购和拼单 -->
38 - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0}}"> 38 + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7}}">
39 <!-- 活动价 --> 39 <!-- 活动价 -->
40 <view class="price"> 40 <view class="price">
41 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text> 41 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
pages/index/index/index.js
@@ -87,7 +87,15 @@ Page({ @@ -87,7 +87,15 @@ Page({
87 }, 87 },
88 88
89 onLoad: async function (tt) { 89 onLoad: async function (tt) {
90 - var th = this; 90 + // onLoad生命周期内判断
  91 + let obj = wx.getLaunchOptionsSync();
  92 + console.log(obj.scene,'launch_scene');
  93 + if (obj.scene === 1011 || obj.scene === 1012 || obj.scene === 1013 || obj.scene === 1017 ||
  94 + obj.scene === 1047 ||obj.scene === 1089 || obj.scene === 1038) {
  95 + this.setData({is_ok_h5:1})
  96 + }
  97 +
  98 + var th = this;
91 var first_leader = tt.first_leader; 99 var first_leader = tt.first_leader;
92 if (!first_leader && tt.scene) { 100 if (!first_leader && tt.scene) {
93 var first_leader_str = decodeURIComponent(tt.scene); 101 var first_leader_str = decodeURIComponent(tt.scene);
@@ -383,6 +391,7 @@ Page({ @@ -383,6 +391,7 @@ Page({
383 var json_d = JSON.parse(e.switch_list); 391 var json_d = JSON.parse(e.switch_list);
384 th.setData({ is_closecoupon: json_d.is_closecoupon }) 392 th.setData({ is_closecoupon: json_d.is_closecoupon })
385 th.setData({ is_topstore: json_d.is_show_storeselect }) 393 th.setData({ is_topstore: json_d.is_show_storeselect })
  394 + th.setData({is_gz_h5:json_d.is_gz_h5})
386 }, 1) 395 }, 1)
387 396
388 if (typeof this.getTabBar === 'function' && this.getTabBar()) { 397 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
@@ -439,7 +448,6 @@ Page({ @@ -439,7 +448,6 @@ Page({
439 }); 448 });
440 449
441 450
442 -  
443 }, 451 },
444 //当隐藏的时候就关闭计时器 452 //当隐藏的时候就关闭计时器
445 onHide: function () { 453 onHide: function () {
@@ -617,14 +625,7 @@ Page({ @@ -617,14 +625,7 @@ Page({
617 }); 625 });
618 } 626 }
619 }) 627 })
620 -  
621 -  
622 -  
623 -  
624 -  
625 -  
626 -  
627 - 628 +
628 //---调用信息--- 629 //---调用信息---
629 // this.requestRecommend(); 630 // this.requestRecommend();
630 this.setData({ 631 this.setData({
@@ -937,10 +938,13 @@ Page({ @@ -937,10 +938,13 @@ Page({
937 getApp().goto("/pages/goods/categoryList/categoryList"); 938 getApp().goto("/pages/goods/categoryList/categoryList");
938 }, 939 },
939 940
  941 + // 幸运购跳转
940 go_url: function (e) { 942 go_url: function (e) {
  943 +
941 var url = e.currentTarget.dataset.url; 944 var url = e.currentTarget.dataset.url;
942 getApp().goto(url); 945 getApp().goto(url);
943 - }, 946 +
  947 + }, //
944 948
945 bind_bnerr_icon: function (e) { 949 bind_bnerr_icon: function (e) {
946 var def = "/miniapp/images/no_cate_def.png"; 950 var def = "/miniapp/images/no_cate_def.png";
pages/index/index/index.json
@@ -19,7 +19,8 @@ @@ -19,7 +19,8 @@
19 "service": "/components/diy_service/diy_service", 19 "service": "/components/diy_service/diy_service",
20 "scan": "/components/diy_scan/diy_scan", 20 "scan": "/components/diy_scan/diy_scan",
21 "store_select": "/components/diy_store_select/diy_store_select", 21 "store_select": "/components/diy_store_select/diy_store_select",
22 - "presell": "/components/diy_pregoods/diy_pregoods" 22 + "presell": "/components/diy_pregoods/diy_pregoods",
  23 + "luckyGo": "/components/diy_luckyGo/diy_luckyGo"
23 }, 24 },
24 "enablePullDownRefresh": false 25 "enablePullDownRefresh": false
25 } 26 }
26 \ No newline at end of file 27 \ No newline at end of file
pages/index/index/index.wxml
@@ -11,14 +11,17 @@ @@ -11,14 +11,17 @@
11 11
12 <view class="container rel nor" wx:if="{{ishow}}"> 12 <view class="container rel nor" wx:if="{{ishow}}">
13 <block wx:if="{{banner}}"> 13 <block wx:if="{{banner}}">
14 - <image class="xc-top-img abs" src="{{url}}/miniapp/images/top-img.png"></image> 14 + <image class="xc-top-img abs" src="{{url}}/miniapp/images/top-img.png"></image><!-- 红色背景 -->
15 </block> 15 </block>
16 - <view class="top-bar"> 16 +
  17 + <view class="top-bar">
  18 + <!-- 顶部关注公众号 -->
  19 + <view wx:if="{{is_gz_h5 && is_ok_h5}}"><official-account></official-account></view>
  20 +
17 <!-- 控制要不要显示顶部门店选择 --> 21 <!-- 控制要不要显示顶部门店选择 -->
18 <block wx:if="{{is_topstore}}"> 22 <block wx:if="{{is_topstore}}">
19 <store_select style="z-index: 999;"></store_select> 23 <store_select style="z-index: 999;"></store_select>
20 </block> 24 </block>
21 -  
22 <!--搜索框--> 25 <!--搜索框-->
23 <!-- <view class="search-box {{scrollTop>10?'search-fixed':''}} flex-center white " style="top:{{is_topstore?88:0}}rpx"> --> 26 <!-- <view class="search-box {{scrollTop>10?'search-fixed':''}} flex-center white " style="top:{{is_topstore?88:0}}rpx"> -->
24 <view class="search-box flex-center white"> 27 <view class="search-box flex-center white">
@@ -41,7 +44,9 @@ @@ -41,7 +44,9 @@
41 </view> 44 </view>
42 </view> 45 </view>
43 </view> 46 </view>
44 - 47 + <!-- 如果有关注,要 -->
  48 + <view wx:if="{{is_gz_h5 && is_ok_h5}}" style="height: 84px"></view>
  49 +
45 <!--滚动广告--> 50 <!--滚动广告-->
46 <view class="rel title-img" wx:if="{{banner}}"> 51 <view class="rel title-img" wx:if="{{banner}}">
47 <swiper circular="true" indicator-dots indicator-active-color="#fff" autoplay="true" class="swiper_box" duration="1000" interval="3000" vertical="" bindchange="bannerSwiperChange" style="height:{{max_sw_height}}rpx"> 52 <swiper circular="true" indicator-dots indicator-active-color="#fff" autoplay="true" class="swiper_box" duration="1000" interval="3000" vertical="" bindchange="bannerSwiperChange" style="height:{{max_sw_height}}rpx">
@@ -229,9 +234,8 @@ @@ -229,9 +234,8 @@
229 234
230 235
231 <!--幸运购--> 236 <!--幸运购-->
232 - <!--幸运购-->  
233 <view class="seckill" wx:if="{{luckGo_list && luckGo_list.length != 0}}"> 237 <view class="seckill" wx:if="{{luckGo_list && luckGo_list.length != 0}}">
234 - <navigator bindtap="go_url" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList" hover-class="none"> 238 + <navigator bindtap="go_url" data-remark="1" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList" hover-class="none">
235 <view class="seckill-time"> 239 <view class="seckill-time">
236 <view class="classname flex ai_c"> 240 <view class="classname flex ai_c">
237 <i class="iconfont icon-luck"></i> 241 <i class="iconfont icon-luck"></i>
@@ -243,8 +247,8 @@ @@ -243,8 +247,8 @@
243 </view> 247 </view>
244 </view> 248 </view>
245 </navigator> 249 </navigator>
246 - <view class="seckill-list luck">  
247 - <view class="list-item" wx:for="{{luckGo_list}}" bindtap="go_url" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&group_id={{item.id}}" wx:if="{{item.status == 1}}"> 250 + <view class=" luck">
  251 + <view class="list-item" wx:for="{{luckGo_list}}" bindtap="{{item.actLen == 0 ? '':'go_url'}}" data-aid="{{item.id}}" data-remark="2" data-url="/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id={{item.goods_id}}&group_id={{item.id}}" wx:if="{{item.status == 1}}">
248 <view class="flex ai-center"> 252 <view class="flex ai-center">
249 <view class="img-container"><image class="img-block" src="{{url + item.original_img}}" data-val="{{item.original_img}}" 253 <view class="img-container"><image class="img-block" src="{{url + item.original_img}}" data-val="{{item.original_img}}"
250 data-errorimg="luckGo_list[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image></view> 254 data-errorimg="luckGo_list[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image></view>
@@ -258,7 +262,8 @@ @@ -258,7 +262,8 @@
258 </view> 262 </view>
259 <view class="flex jc_sb"> 263 <view class="flex jc_sb">
260 <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> 264 <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>
261 - <view class="btn fs26">去参团</view> 265 + <view class="btn fs26 {{item.actLen == 0 ? 'gray':''}}" wx:if="{{item.actLen == 0}}">已抢光</view>
  266 + <view class="btn fs26" wx:else>去参团</view>
262 <!-- &title=狐狸3号测速003&prom_type=7&prom_id=468 --> 267 <!-- &title=狐狸3号测速003&prom_type=7&prom_id=468 -->
263 </view> 268 </view>
264 </view> 269 </view>
@@ -406,6 +411,9 @@ @@ -406,6 +411,9 @@
406 <view class="container" wx:if="{{isTemplate}}" style="background-color:{{bgcolor_t}}; padding-bottom: 10rpx"> 411 <view class="container" wx:if="{{isTemplate}}" style="background-color:{{bgcolor_t}}; padding-bottom: 10rpx">
407 <!-- 置顶层 --> 412 <!-- 置顶层 -->
408 <view class="dis_top"> 413 <view class="dis_top">
  414 + <!-- 关注公众号的显示 -->
  415 + <view wx:if="{{is_gz_h5 && is_ok_h5}}"><official-account></official-account></view>
  416 +
409 <block wx:for="{{template_arr}}" > 417 <block wx:for="{{template_arr}}" >
410 <block wx:if="{{item.content.is_top==1}}"> 418 <block wx:if="{{item.content.is_top==1}}">
411 <!--如果是搜索框的时候 --> 419 <!--如果是搜索框的时候 -->
@@ -420,6 +428,8 @@ @@ -420,6 +428,8 @@
420 </view> 428 </view>
421 <!-- 撑开层 --> 429 <!-- 撑开层 -->
422 <view> 430 <view>
  431 + <!-- 关注层的撑开 -->
  432 + <view wx:if="{{is_gz_h5 && is_ok_h5}}" style="height: 84px"></view>
423 <block wx:for="{{template_arr}}" > 433 <block wx:for="{{template_arr}}" >
424 <block wx:if="{{item.content.is_top==1 && item.ename=='searchbox'}}"> 434 <block wx:if="{{item.content.is_top==1 && item.ename=='searchbox'}}">
425 <view wx:if="{{item.content.style==1}}" style="height: 115rpx;"></view> 435 <view wx:if="{{item.content.style==1}}" style="height: 115rpx;"></view>
@@ -505,6 +515,11 @@ @@ -505,6 +515,11 @@
505 <block wx:if="{{item.ename=='groupbuy'}}"> 515 <block wx:if="{{item.ename=='groupbuy'}}">
506 <groupbuy object="{{item.content}}"></groupbuy> 516 <groupbuy object="{{item.content}}"></groupbuy>
507 </block> 517 </block>
  518 + <!-- 幸运购 -->
  519 + <block wx:if="{{item.ename=='luckyactivity'}}">
  520 + <luckyGo object="{{item.content}}"></luckyGo>
  521 + </block>
  522 +
508 523
509 </view> 524 </view>
510 525
pages/index/index/index.wxss
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 width: 48rpx; 64 width: 48rpx;
65 height: 48rpx; 65 height: 48rpx;
66 margin: 0 18rpx; 66 margin: 0 18rpx;
67 - border-radius: 50%; 67 + /* border-radius: 50%; */
68 overflow: hidden; 68 overflow: hidden;
69 } 69 }
70 70
@@ -663,6 +663,7 @@ @@ -663,6 +663,7 @@
663 border-radius: 8rpx; 663 border-radius: 8rpx;
664 white-space: nowrap; 664 white-space: nowrap;
665 height: 28rpx; 665 height: 28rpx;
  666 + align-items: center;
666 } 667 }
667 668
668 .xc-people-val-frame .val-img { 669 .xc-people-val-frame .val-img {
@@ -1014,7 +1015,7 @@ page { @@ -1014,7 +1015,7 @@ page {
1014 } 1015 }
1015 1016
1016 .container.nor{ 1017 .container.nor{
1017 - padding-top: 140rpx; 1018 + padding-top: 80rpx;
1018 } 1019 }
1019 1020
1020 /* page, 1021 /* page,
@@ -1130,8 +1131,8 @@ page { @@ -1130,8 +1131,8 @@ page {
1130 } 1131 }
1131 1132
1132 .luck .img-container { 1133 .luck .img-container {
1133 - width: 200rpx;  
1134 - height: 200rpx; 1134 + width: 220rpx;
  1135 + height: 220rpx;
1135 border-radius: 14rpx; 1136 border-radius: 14rpx;
1136 overflow: hidden; 1137 overflow: hidden;
1137 flex-shrink: 0; 1138 flex-shrink: 0;
@@ -1180,6 +1181,7 @@ page { @@ -1180,6 +1181,7 @@ page {
1180 1181
1181 .luck .name { 1182 .luck .name {
1182 height: 88rpx; 1183 height: 88rpx;
  1184 + word-break: break-all;
1183 } 1185 }
1184 1186
1185 1187
@@ -1195,3 +1197,7 @@ page { @@ -1195,3 +1197,7 @@ page {
1195 text-align: center; 1197 text-align: center;
1196 } 1198 }
1197 1199
  1200 +.luck .btn.gray {
  1201 + background-color: #ccc;
  1202 +}
  1203 +
pages/user/index/index.js
@@ -462,11 +462,11 @@ Page({ @@ -462,11 +462,11 @@ Page({
462 }, 462 },
463 setappdata: function(t) { 463 setappdata: function(t) {
464 var t=getApp().globalData.wxapp_buy_obj; 464 var t=getApp().globalData.wxapp_buy_obj;
465 - if (t.isout == 1) 465 + if (t && t.isout == 1)
466 wx.navigateTo({ 466 wx.navigateTo({
467 url: "/pages/error/error?msg=小程序已经过期", 467 url: "/pages/error/error?msg=小程序已经过期",
468 }); 468 });
469 - if (t.isbuy == 0) 469 + if (t && t.isbuy == 0)
470 wx.navigateTo({ 470 wx.navigateTo({
471 url: "/pages/error/error?msg=还未购买小程序", 471 url: "/pages/error/error?msg=还未购买小程序",
472 }); 472 });
@@ -642,7 +642,9 @@ Page({ @@ -642,7 +642,9 @@ Page({
642 } 642 }
643 643
644 var url = e.currentTarget.dataset.img; 644 var url = e.currentTarget.dataset.img;
645 - 645 + if(!url || url==""){
  646 + url=`/public/upload/userqy/quanbg.jpg`
  647 + }
646 switch (no) { 648 switch (no) {
647 case "01": 649 case "01":
648 getApp().goto("/packageB/pages/user/user_coupon/user_coupon?img=" + 650 getApp().goto("/packageB/pages/user/user_coupon/user_coupon?img=" +
pages/user/order_detail/order_detail.js
@@ -316,6 +316,7 @@ Page({ @@ -316,6 +316,7 @@ Page({
316 316
317 //--------立即支付---------- 317 //--------立即支付----------
318 async jumpToCart4(e) { 318 async jumpToCart4(e) {
  319 +
319 var th=this; 320 var th=this;
320 if(this.data.optionIsGoup) 321 if(this.data.optionIsGoup)
321 wx.navigateTo({ 322 wx.navigateTo({
@@ -567,8 +568,7 @@ Page({ @@ -567,8 +568,7 @@ Page({
567 return false; 568 return false;
568 } 569 }
569 } 570 }
570 - }  
571 - else{ 571 + }else{
572 //不是赠品的时候 572 //不是赠品的时候
573 if(!good.is_gift && good.prom_type!=3){ 573 if(!good.is_gift && good.prom_type!=3){
574 var t_ok=1; 574 var t_ok=1;
@@ -592,7 +592,7 @@ Page({ @@ -592,7 +592,7 @@ Page({
592 } 592 }
593 //赠品和搭配购不判断商品金额 593 //赠品和搭配购不判断商品金额
594 var isok=1; 594 var isok=1;
595 - var card_field=th.data.card_field; 595 + var card_field=th.data.card_field; // 会员等级
596 //如果会员是等级会员,商品有等级价,且不是活动商品 596 //如果会员是等级会员,商品有等级价,且不是活动商品
597 if(!good.is_gift && !good.is_collocation) { 597 if(!good.is_gift && !good.is_collocation) {
598 if (card_field && gg[card_field] > 0) { 598 if (card_field && gg[card_field] > 0) {
@@ -606,7 +606,7 @@ Page({ @@ -606,7 +606,7 @@ Page({
606 var is_h=0; 606 var is_h=0;
607 if (!isok) { 607 if (!isok) {
608 608
609 - var content=gg.goods_name + '商品的价格发生了变化,请取消订单重新购买'; 609 + var content=gg.goods_name + '商品的价格发生了变化,请取消订单重新购买22';
610 th.toast(content); 610 th.toast(content);
611 return false; 611 return false;
612 } 612 }
pages/user/order_detail/order_detail.wxml
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 77
78 <view class="item" wx:if="{{order.order_prom_type!=5}}"> 78 <view class="item" wx:if="{{order.order_prom_type!=5}}">
79 <view>配送方式</view> 79 <view>配送方式</view>
80 - <view>{{(order.shipping_name!=''&& order.shipping_name!=null) ?order.shipping_name:''}}</view> 80 + <view>{{(order.shipping_name!=''&& order.shipping_name!=null) ?order.shipping_name:'自提'}}</view>
81 </view> 81 </view>
82 <view class="item"> 82 <view class="item">
83 <view>买家留言</view> 83 <view>买家留言</view>
pages/user/order_list/order_list.js
@@ -195,6 +195,28 @@ Page({ @@ -195,6 +195,28 @@ Page({
195 } 195 }
196 }) 196 })
197 } 197 }
  198 + // 如果是幸运购活动
  199 + if(glist[0].prom_type==9){
  200 + await getApp().request.promiseGet('/api/weshop/prom/luckyOrder/list', {
  201 + data: {
  202 + store_id: os.stoid,
  203 + user_id: oo.user_id,
  204 + order_id: item.order_id,
  205 + }
  206 + }).then(res => {
  207 + if(res.data.code==0){
  208 + // console.log('luckyGo+++++++++>>>', res.data.data);
  209 + // data[ind]['team_status'] = res.data.data[0]['team_status'];
  210 + if(res.data.data[0] && res.data.data[0]['team_status']) {
  211 + data[ind]['team_status'] = res.data.data[0]['team_status'];
  212 + } else {
  213 + data[ind]['team_status'] = 0;
  214 + };
  215 +
  216 + // data[ind]['ord_url']='/packageC/pages/presell/cart/cart';
  217 + }
  218 + })
  219 + }
198 //------------对比一下有没有退款记录------------ 220 //------------对比一下有没有退款记录------------
199 await getApp().request.promiseGet("/api/weshop/order/returngoods/page", { 221 await getApp().request.promiseGet("/api/weshop/order/returngoods/page", {
200 data: { 222 data: {
@@ -462,6 +484,7 @@ Page({ @@ -462,6 +484,7 @@ Page({
462 }, 484 },
463 /*----------跳转支付-----------*/ 485 /*----------跳转支付-----------*/
464 async jumpToCart4(t) { 486 async jumpToCart4(t) {
  487 +
465 var o_index = t.currentTarget.dataset.idx; 488 var o_index = t.currentTarget.dataset.idx;
466 var e = this.data.orderList[o_index]; 489 var e = this.data.orderList[o_index];
467 var th = this; 490 var th = this;
@@ -469,6 +492,25 @@ Page({ @@ -469,6 +492,25 @@ Page({
469 var order_goods = e.order_goods; 492 var order_goods = e.order_goods;
470 var user_id=getApp().globalData.userInfo.user_id; 493 var user_id=getApp().globalData.userInfo.user_id;
471 494
  495 + // 幸运购检查库存量 api/weshop/activitylist/getActLen/{store_id}/{prom_type}/{prom_id}
  496 + if (parseInt(order_goods['0']['prom_type']) == 9) {
  497 + var aid = order_goods['0']['prom_id'];
  498 + var knum = 0;
  499 + await r.promiseGet('/api/weshop/activitylist/getActLen/' + os.stoid + '/9/' + aid, {
  500 + }).then(res => {
  501 + if (res.data.code == 0) {
  502 + knum = res.data.data;
  503 + }
  504 +
  505 + });
  506 +
  507 + if (knum <= 0) {
  508 + getApp().confirmBox("库存为0,支付失败");
  509 + return false;
  510 + }
  511 +
  512 + }
  513 +
472 var wlist = ""; 514 var wlist = "";
473 for (var i in order_goods) { 515 for (var i in order_goods) {
474 var good = order_goods[i]; 516 var good = order_goods[i];
@@ -577,7 +619,7 @@ Page({ @@ -577,7 +619,7 @@ Page({
577 } 619 }
578 620
579 //如果是预售的时候, 621 //如果是预售的时候,
580 - if(good.prom_type==8){ 622 + if(good.prom_type==8) {
581 await getApp().request.promiseGet("/api/weshop/order/orderPresell/countBuyGoodsSum",{ 623 await getApp().request.promiseGet("/api/weshop/order/orderPresell/countBuyGoodsSum",{
582 data: {store_id: os.stoid, user_id: user_id, goods_id: good.goods_id, prom_id: good.prom_id}, 624 data: {store_id: os.stoid, user_id: user_id, goods_id: good.goods_id, prom_id: good.prom_id},
583 }).then(e=>{ 625 }).then(e=>{
@@ -699,7 +741,7 @@ Page({ @@ -699,7 +741,7 @@ Page({
699 return false; 741 return false;
700 } 742 }
701 743
702 - } else { 744 + } else {
703 if ((gg.prom_type == 1 || good.prom_type == 2 || gg.prom_type == 3 || gg.prom_type == 5 || gg.prom_type == 6 || gg.prom_type == 4) 745 if ((gg.prom_type == 1 || good.prom_type == 2 || gg.prom_type == 3 || gg.prom_type == 5 || gg.prom_type == 6 || gg.prom_type == 4)
704 && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) { 746 && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) {
705 var prom = null; 747 var prom = null;
@@ -776,7 +818,7 @@ Page({ @@ -776,7 +818,7 @@ Page({
776 var card_field = th.data.card_field; 818 var card_field = th.data.card_field;
777 819
778 //-- 如果会员是等级会员,商品有等级价,且不是活动商品,同时线下取价的要放在最后来判断 -- 820 //-- 如果会员是等级会员,商品有等级价,且不是活动商品,同时线下取价的要放在最后来判断 --
779 - if (!good.is_gift && !good.is_collocation) { 821 + if (!good.is_gift && !good.is_collocation && gg.prom_type != 9) {
780 if (card_field && gg[card_field] > 0) { 822 if (card_field && gg[card_field] > 0) {
781 if (good.goods_price != gg[card_field] && good.offline_cut <= 0) isok = 0; 823 if (good.goods_price != gg[card_field] && good.offline_cut <= 0) isok = 0;
782 if (good.goods_price > gg[card_field] && good.offline_cut > 0) isok = 0; //如果线下价格比较贵,则不通过 824 if (good.goods_price > gg[card_field] && good.offline_cut > 0) isok = 0; //如果线下价格比较贵,则不通过
pages/user/order_list/order_list.wxml
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <text selectable='true'>订单编号:{{item.order_sn}}</text> 40 <text selectable='true'>订单编号:{{item.order_sn}}</text>
41 <!-- 商品评价状态 --> 41 <!-- 商品评价状态 -->
42 <view class="flex-center c-r"> 42 <view class="flex-center c-r">
43 - 43 + <!-- 这是预售的 -->
44 <block wx:if="{{item.presell}}"> 44 <block wx:if="{{item.presell}}">
45 <block wx:if="{{item.order_status==3}}"> 45 <block wx:if="{{item.order_status==3}}">
46 <text wx:if="{{item.presell.tail_pay_state==2}}">尾款支付失败</text> 46 <text wx:if="{{item.presell.tail_pay_state==2}}">尾款支付失败</text>
@@ -64,6 +64,19 @@ @@ -64,6 +64,19 @@
64 <block wx:else>退款中</block> 64 <block wx:else>退款中</block>
65 65
66 </block> 66 </block>
  67 + <!-- 幸运购 -->
  68 + <block wx:elif="{{item.order_goods[0].prom_type == 9}}">
  69 + <view wx:if="{{item.is_back ==1 && item.pay_status ==1}}">已退款</view>
  70 + <view wx:elif="{{item.is_back == 0 && item.pay_status ==1 && item.team_status == 0}}">已支付,待成团</view>
  71 + <view wx:if="{{(item.order_status==0&&item.pay_status==0)}}">未支付</view>
  72 + <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==0 && item.team_status == 2)}}">待发货</view>
  73 + <view wx:if="{{(item.order_status==1&&item.pay_status==1&&item.shipping_status==1 && item.team_status == 2)}}">待收货</view>
  74 + <view wx:if="{{(item.order_status==2)}}">待评价</view>
  75 + <view wx:if="{{item.order_status==4}}">已评价</view>
  76 + <view wx:if="{{item.pay_status == 0 && item.order_status==3 && item.pt_status!=6}}" 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>
  78 + </view>
  79 + </block>
67 <block wx:else> 80 <block wx:else>
68 <!-- 订单状态 --> 81 <!-- 订单状态 -->
69 <view wx:if="{{item.pt_status==1 && item.pt_prom_id>0}}">组团中</view> 82 <view wx:if="{{item.pt_status==1 && item.pt_prom_id>0}}">组团中</view>
@@ -82,6 +95,8 @@ @@ -82,6 +95,8 @@
82 </block> 95 </block>
83 <block wx:else>退款中</block> 96 <block wx:else>退款中</block>
84 </block> 97 </block>
  98 +
  99 +
85 100
86 </view> 101 </view>
87 </view> 102 </view>
@@ -91,7 +106,9 @@ @@ -91,7 +106,9 @@
91 <!-- 单个商品 --> 106 <!-- 单个商品 -->
92 <!-- wx:if="{{goods.return_btn!=4}}" --> 107 <!-- wx:if="{{goods.return_btn!=4}}" -->
93 <view> 108 <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}}"> 109 + <!-- url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}" wx:if="{{item.order_goods[0].prom_type==9}}"
  110 + {{item.ord_url}}?order_id={{item.order_id}} -->
  111 + <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 + '&group_id=' + item.order_goods[0].prom_id):(item.ord_url + '?order_id=' + item.order_id)}}">
95 <!-- 商品图片 --> 112 <!-- 商品图片 -->
96 <navigator class="rel"> 113 <navigator class="rel">
97 <image src="{{resourceUrl+goods.original_img}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].order_goods[{{pinx}}].original_img"></image> 114 <image src="{{resourceUrl+goods.original_img}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].order_goods[{{pinx}}].original_img"></image>
@@ -128,7 +145,10 @@ @@ -128,7 +145,10 @@
128 <!-- 商品价格 --> 145 <!-- 商品价格 -->
129 <view class="flex-vertical c-tb baseline"> 146 <view class="flex-vertical c-tb baseline">
130 <view class="fs24">¥</view> 147 <view class="fs24">¥</view>
131 - <view class="fs26">{{filters.toFix(goods.member_goods_price,2)}}</view> 148 + <!-- 幸运购prom_type等于9 -->
  149 + <!-- 如果是幸运购就显示幸运购参团价格 -->
  150 + <view class="fs26" wx:if="{{goods.prom_type == 9}}">{{filters.toFix(goods.goods_price,2)}}</view>
  151 + <view class="fs26" wx:else>{{filters.toFix(goods.member_goods_price,2)}}</view>
132 </view> 152 </view>
133 <view class="fs26 c-a9">x{{goods.goods_num}}</view> 153 <view class="fs26 c-a9">x{{goods.goods_num}}</view>
134 </view> 154 </view>
@@ -162,7 +182,8 @@ @@ -162,7 +182,8 @@
162 <view class="commodity_money flex baseline" wx:else> 182 <view class="commodity_money flex baseline" wx:else>
163 <view>合计<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view> 183 <view>合计<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view>
164 <view class="fs24 c-r">¥</view> 184 <view class="fs24 c-r">¥</view>
165 - <view class="c-r">{{filters.toFix(item.order_amount+item.user_money,2)}} 185 + <view class="c-r">
  186 + {{filters.toFix(item.order_amount+item.user_money,2)}}
166 <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text> 187 <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text>
167 <text wx:if="{{item.integral}}">+{{item.integral}}积分</text> 188 <text wx:if="{{item.integral}}">+{{item.integral}}积分</text>
168 </view> 189 </view>
@@ -196,7 +217,7 @@ @@ -196,7 +217,7 @@
196 <navigator class="commodity_To_evaluate flex-level View_evaluation" hidden="{{!(item.exp_type==0&&item.pay_status==1&&item.shipping_status==1)}}" url="/pages/user/express/express?order_id={{item.order_id}}">查看物流</navigator> 217 <navigator class="commodity_To_evaluate flex-level View_evaluation" hidden="{{!(item.exp_type==0&&item.pay_status==1&&item.shipping_status==1)}}" url="/pages/user/express/express?order_id={{item.order_id}}">查看物流</navigator>
197 <navigator class="commodity_To_evaluate flex-level View_evaluation" hidden="{{!(item.exp_type==0&&item.pay_status==1&&item.shipping_status==2)}}" url="/pages/user/express/express?order_id={{item.order_id}}">查看物流</navigator> 218 <navigator class="commodity_To_evaluate flex-level View_evaluation" hidden="{{!(item.exp_type==0&&item.pay_status==1&&item.shipping_status==2)}}" url="/pages/user/express/express?order_id={{item.order_id}}">查看物流</navigator>
198 219
199 - <navigator class="commodity_To_evaluate flex-level View_evaluation" url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}" wx:if="{{item.order_goods[0].prom_type==9}}">订单详情</navigator> 220 + <navigator class="commodity_To_evaluate flex-level View_evaluation" url="/packageC/pages/luckyGo/luckyGo_order/luckyGo_order?order_id={{item.order_id}}&&group_id={{item.order_goods[0].prom_id}}" wx:if="{{item.order_goods[0].prom_type==9}}">订单详情</navigator>
200 <navigator class="commodity_To_evaluate flex-level View_evaluation" url="{{item.ord_url}}?order_id={{item.order_id}}" wx:else>订单详情</navigator> 221 <navigator class="commodity_To_evaluate flex-level View_evaluation" url="{{item.ord_url}}?order_id={{item.order_id}}" wx:else>订单详情</navigator>
201 222
202 <block wx:if="{{!(item.has_rt || item.return_btn==2 || item.return_btn==4)}}"> 223 <block wx:if="{{!(item.has_rt || item.return_btn==2 || item.return_btn==4)}}">
pages/user/plus/plus.js
@@ -9,6 +9,7 @@ var t = getApp(), @@ -9,6 +9,7 @@ var t = getApp(),
9 t_pay = require("../../../utils/pay2.js"); 9 t_pay = require("../../../utils/pay2.js");
10 var regeneratorRuntime = require('../../../utils/runtime.js'); 10 var regeneratorRuntime = require('../../../utils/runtime.js');
11 11
  12 +
12 Page({ 13 Page({
13 /** 14 /**
14 * 页面的初始数据 15 * 页面的初始数据
@@ -38,6 +39,9 @@ Page({ @@ -38,6 +39,9 @@ Page({
38 def_recommon: null, //分享人的手机号 39 def_recommon: null, //分享人的手机号
39 def_serviceman: null, //分享人的营业员 40 def_serviceman: null, //分享人的营业员
40 fir_leader: 0, //分享人的ID 41 fir_leader: 0, //分享人的ID
  42 + staffNo_arr: [], //多个营业员
  43 + focus:false,
  44 + is_select: false, //是否选择营业员过
41 }, 45 },
42 swiperChange: function (e) { 46 swiperChange: function (e) {
43 var currentId = e.detail.current; 47 var currentId = e.detail.current;
@@ -280,6 +284,21 @@ Page({ @@ -280,6 +284,21 @@ Page({
280 }) 284 })
281 } 285 }
282 }, 286 },
  287 +
  288 + //选择营业员
  289 + select_serviceman(e) {
  290 + let StaffNo = e.currentTarget.dataset.staffno;
  291 + let {req_data,req} = this.data;
  292 + if (StaffNo && StaffNo !== "") {
  293 + req_data.staffNo = StaffNo;
  294 + req.serviceman = StaffNo;
  295 + };
  296 + this.setData({
  297 + is_select: 1,
  298 + staffNo_arr:[],
  299 + })
  300 + this.check_serviceman(req_data,req)
  301 + },
283 //--绑定邀请码的输入-- 302 //--绑定邀请码的输入--
284 b_input: function (e) { 303 b_input: function (e) {
285 var value = e.detail.value.trim(); 304 var value = e.detail.value.trim();
@@ -299,6 +318,7 @@ Page({ @@ -299,6 +318,7 @@ Page({
299 }, 318 },
300 //--立即购买卡-- 319 //--立即购买卡--
301 buy_card: async function () { 320 buy_card: async function () {
  321 + console.log(11111);
302 var th = this; 322 var th = this;
303 var is_card = 0; 323 var is_card = 0;
304 //--商家是不是有等级卡功能,开通的人数是不是够用,开通是时间是不是到期-- 324 //--商家是不是有等级卡功能,开通的人数是不是够用,开通是时间是不是到期--
@@ -341,6 +361,9 @@ Page({ @@ -341,6 +361,9 @@ Page({
341 if (th.data.is_salesman) { 361 if (th.data.is_salesman) {
342 if (!th.data.inp_serviceman) { 362 if (!th.data.inp_serviceman) {
343 getApp().my_warnning("请输入营业员", 0, th); 363 getApp().my_warnning("请输入营业员", 0, th);
  364 + th.setData({
  365 + focus:true
  366 + })
344 return false; 367 return false;
345 } 368 }
346 req.serviceman = th.data.inp_serviceman 369 req.serviceman = th.data.inp_serviceman
@@ -350,37 +373,94 @@ Page({ @@ -350,37 +373,94 @@ Page({
350 req.userId = getApp().globalData.user_id; 373 req.userId = getApp().globalData.user_id;
351 //--如果有邀请码,和营业员的情况下-- 374 //--如果有邀请码,和营业员的情况下--
352 if (req.recommon || req.serviceman) { 375 if (req.recommon || req.serviceman) {
  376 +
353 var req_data = { 377 var req_data = {
354 storeId: os.stoid, 378 storeId: os.stoid,
355 userId: req.userId 379 userId: req.userId
356 }; 380 };
357 if (req.recommon) req_data.inviteCode = req.recommon; 381 if (req.recommon) req_data.inviteCode = req.recommon;
358 if (req.serviceman) req_data.staffNo = req.serviceman; 382 if (req.serviceman) req_data.staffNo = req.serviceman;
359 - getApp().request.get("/api/weshop/plus/vip/mem/referee/code/check", {  
360 - data: req_data,  
361 - success: function (res) {  
362 - if (res.data.code == 0) {  
363 - t_pay.pay(req, th.success, function () {  
364 - getApp().my_warnning("支付失败", 0, th);  
365 - });  
366 - } else {  
367 - getApp().my_warnning(res.data.msg, 0, th);  
368 - }  
369 - } 383 + th.setData({
  384 + req_data,
  385 + req,
370 }) 386 })
  387 + th.check_serviceman(req_data,req)
  388 + // getApp().request.get("/api/weshop/plus/vip/mem/referee/code/check", {
  389 + // data: req_data,
  390 + // success: function (res) {
  391 + // if (res.data.code == 0) {
  392 + // if(res.data.data.length > 1 && !th.data.is_select){
  393 + // th.setData({
  394 + // staffNo_arr:res.data.data
  395 + // })
  396 + // }else{
  397 + // t_pay.pay(req, th.success, function () {
  398 + // getApp().my_warnning("支付失败", 0, th);
  399 + // th.setData({
  400 + // is_select:0,
  401 + // })
  402 + // });
  403 + // }
  404 + // } else {
  405 + // getApp().my_warnning(res.data.msg, 0, th);
  406 + // th.setData({
  407 + // is_select:0,
  408 + // })
  409 + // }
  410 + // }
  411 + // })
371 } else { 412 } else {
372 t_pay.pay(req, th.success, function () { 413 t_pay.pay(req, th.success, function () {
373 getApp().my_warnning("支付失败", 0, th); 414 getApp().my_warnning("支付失败", 0, th);
  415 + th.setData({
  416 + is_select:0,
  417 + focus:true,
  418 + })
374 }); 419 });
375 - } 420 + }
376 }, 421 },
377 //返回会员页面 422 //返回会员页面
378 OpeningClose: function () { 423 OpeningClose: function () {
379 this.setData({ 424 this.setData({
380 - open_yq: 0 425 + open_yq: 0,
  426 + inp_serviceman:""
381 }); 427 });
382 }, 428 },
383 - 429 + dialog_close() {
  430 + this.setData({
  431 + staffNo_arr: [],
  432 + });
  433 + },
  434 + check_serviceman(data,req) {
  435 + let th = this;
  436 + getApp().request.get("/api/weshop/plus/vip/mem/referee/code/check", {
  437 + data,
  438 + isShowLoading:true,
  439 + success: function (res) {
  440 + if (res.data.code == 0) {
  441 + if (res.data.data.length > 1 && !th.data.is_select) {
  442 + th.setData({
  443 + staffNo_arr: res.data.data
  444 + })
  445 + }else{
  446 + t_pay.pay(req, th.success, function () {
  447 + getApp().my_warnning("支付失败", 0, th);
  448 + th.setData({
  449 + is_select:0,
  450 + focus:true,
  451 + })
  452 + });
  453 + }
  454 + } else {
  455 + getApp().my_warnning(res.data.msg, 0, th);
  456 + th.setData({
  457 + is_select:0,
  458 + focus:true,
  459 + })
  460 + }
  461 + }
  462 + })
  463 + },
384 //返回会员中心 464 //返回会员中心
385 back_user: function () { 465 back_user: function () {
386 setTimeout(function () { 466 setTimeout(function () {
@@ -409,7 +489,6 @@ Page({ @@ -409,7 +489,6 @@ Page({
409 url: u_url 489 url: u_url
410 }) 490 })
411 } 491 }
412 -  
413 }, 492 },
414 493
415 494
pages/user/plus/plus.wxml
1 <block wx:if="{{is_show && (fir_leader?is_fengxiang:1)}}"> 1 <block wx:if="{{is_show && (fir_leader?is_fengxiang:1)}}">
2 -<!-- 我的会员背景图片 -->  
3 -<import src="../../../utils/wxParse/wxParse.wxml"></import>  
4 -<view>  
5 - <image class="Member_bk" src="{{url}}/miniapp/images/plus/page_bk.png"></image>  
6 -</view>  
7 -<view class="plus">  
8 - <!-- 开通会员模块 --> 2 + <!-- 我的会员背景图片 -->
  3 + <import src="../../../utils/wxParse/wxParse.wxml"></import>
  4 + <view>
  5 + <image class="Member_bk" src="{{url}}/miniapp/images/plus/page_bk.png"></image>
  6 + </view>
  7 + <view class="plus">
  8 + <!-- 开通会员模块 -->
9 9
10 - <block wx:if="{{is_plusCard}}">  
11 - <view class="Opening_plus">  
12 - <view class="Opening_bk">  
13 - <image src="{{url}}/miniapp/images/plus/card_bk.png"></image>  
14 - </view>  
15 - <view class="swiper"> 10 + <block wx:if="{{is_plusCard}}">
  11 + <view class="Opening_plus">
  12 + <view class="Opening_bk">
  13 + <image src="{{url}}/miniapp/images/plus/card_bk.png"></image>
  14 + </view>
  15 + <view class="swiper">
16 <!-- 未开通会员swiper-item --> 16 <!-- 未开通会员swiper-item -->
17 <swiper current="{{currentId}}" current-item-id="{{currentId}}" next-margin="60rpx" previous-margin="60rpx" bindchange="swiperChange"> 17 <swiper current="{{currentId}}" current-item-id="{{currentId}}" next-margin="60rpx" previous-margin="60rpx" bindchange="swiperChange">
18 <swiper-item class="flex" item-id="{{index}}" data-item-id="{{index}}" wx:for="{{is_plusCard}}"> 18 <swiper-item class="flex" item-id="{{index}}" data-item-id="{{index}}" wx:for="{{is_plusCard}}">
19 19
20 - <view class="Membership {{currentId==index?'enlarge':''}}" style=" background-image: url({{item.CardImg}});color:{{item.CardColor}}"> 20 + <view class="Membership {{currentId==index?'enlarge':''}}" style=" background-image: url({{item.CardImg}});color:{{item.CardColor}}">
21 <view class="flex-space-between Membership_go"> 21 <view class="flex-space-between Membership_go">
22 <view> 22 <view>
23 <view class="fs36">{{item.CardName}}</view> 23 <view class="fs36">{{item.CardName}}</view>
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 32
33 <view class="flex-vertical fs24" style="overflow:hidden"> 33 <view class="flex-vertical fs24" style="overflow:hidden">
34 34
35 - <view class="Member"style="background-image:url('{{url}}/miniapp/images/plus/privilege_o.png');filter: drop-shadow( 40rpx 0rpx 0rpx {{item.CardColor}});"></view> 35 + <view class="Member" style="background-image:url('{{url}}/miniapp/images/plus/privilege_o.png');filter: drop-shadow( 40rpx 0rpx 0rpx {{item.CardColor}});"></view>
36 <view style="margin-left:5rpx;white-space: nowrap;">按去年用户消费计算,开卡后一年预计省¥{{item.free}}元 36 <view style="margin-left:5rpx;white-space: nowrap;">按去年用户消费计算,开卡后一年预计省¥{{item.free}}元
37 </view> 37 </view>
38 </view> 38 </view>
@@ -41,76 +41,80 @@ @@ -41,76 +41,80 @@
41 41
42 </swiper-item> 42 </swiper-item>
43 </swiper> 43 </swiper>
  44 + </view>
44 </view> 45 </view>
45 - </view>  
46 - </block> 46 + </block>
47 47
48 - <!-- 会员礼遇 -->  
49 - <view class="Courtesy"> 48 + <!-- 会员礼遇 -->
  49 + <view class="Courtesy">
  50 +
  51 + <!-- 标题 -->
  52 + <view class="flex-center" style="width:100%;height:200rpx;">
  53 + <view>
  54 + <view class="Courtesy_title flex-center fs36">开通PLUS会员尊享礼遇
  55 + </view>
50 56
51 - <!-- 标题 -->  
52 - <view class="flex-center" style="width:100%;height:200rpx;">  
53 - <view>  
54 - <view class="Courtesy_title flex-center fs36">开通PLUS会员尊享礼遇  
55 - </view>  
56 -  
57 57
58 58
59 - <view class="flex-center">  
60 - <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image> 59 + <view class="flex-center">
  60 + <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image>
61 61
62 -  
63 - <view class="Courtesy_can fs24">PLUS会员可享受以下特权 62 +
  63 + <view class="Courtesy_can fs24">PLUS会员可享受以下特权
  64 + </view>
  65 +
  66 + <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image>
64 </view> 67 </view>
  68 + </view>
  69 + </view>
  70 +
65 71
66 - <image class="Courtesy_image" src="{{url}}/miniapp/images/plus/Courtesy.png"></image> 72 +
  73 + <!-- 会员权益内容 -->
  74 + <view class="Courtesy_comment " style="padding:0 20rpx" wx:if="{{is_card_rule!=null&&is_card_rule!=''}}">
  75 + <view class="wxParse">
  76 + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
67 </view> 77 </view>
68 </view> 78 </view>
69 </view> 79 </view>
70 80
71 - <!-- 会员权益内容 -->  
72 - <view class="Courtesy_comment " style="padding:0 20rpx" wx:if="{{is_card_rule!=null&&is_card_rule!=''}}">  
73 - <view class="wxParse">  
74 - <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>  
75 - </view>  
76 - </view>  
77 - </view> 81 + <!-- 好物推荐 -->
  82 + <!-- 好物推荐 -->
  83 + <view class="title">
  84 + <!-- 标题 -->
  85 + <view>
  86 + <!-- 中文名标题 -->
  87 + <view class="China flex-level">
  88 + <view class="line flex-vertical">
  89 + <view class="one"></view>
  90 + <view class="two"></view>
  91 + <view class="three"></view>
  92 + </view>
78 93
79 - <!-- 好物推荐 -->  
80 - <!-- 好物推荐 -->  
81 - <view class="title">  
82 - <!-- 标题 -->  
83 - <view>  
84 - <!-- 中文名标题 -->  
85 - <view class="China flex-level">  
86 - <view class="line flex-vertical">  
87 - <view class="one"></view><view class="two"></view><view class="three"></view>  
88 - </view> 94 + <view class="Recommend flex-level" bindtap="requestList">好物推荐</view>
89 95
90 - <view class="Recommend flex-level" bindtap="requestList">好物推荐</view> 96 + <view class="line flex-vertical">
  97 + <view class="three"></view>
  98 + <view class="two"></view>
  99 + <view class="one"></view>
  100 + </view>
  101 + </view>
91 102
92 - <view class="line flex-vertical">  
93 - <view class="three"></view>  
94 - <view class="two"></view>  
95 - <view class="one"></view> 103 + <!-- 英文标题 -->
  104 + <view class="english flex-center">
  105 + <view class="silk"></view>
  106 + <view class="esh five-level-word">GOOD HOT THING</view>
  107 + <view class="silk"></view>
96 </view> 108 </view>
97 - </view>  
98 109
99 - <!-- 英文标题 -->  
100 - <view class="english flex-center">  
101 - <view class="silk"></view>  
102 - <view class="esh five-level-word">GOOD HOT THING</view>  
103 - <view class="silk"></view>  
104 </view> 110 </view>
  111 + <!-- 商品列表组件 -->
  112 + <goods_recommend id="goods_list"></goods_recommend>
  113 + <!-- 商品列表 -->
105 114
106 </view> 115 </view>
107 - <!-- 商品列表组件 -->  
108 - <goods_recommend id="goods_list"></goods_recommend>  
109 - <!-- 商品列表 -->  
110 116
111 </view> 117 </view>
112 -  
113 -</view>  
114 </block> 118 </block>
115 119
116 <!-- 开通会员弹窗 --> 120 <!-- 开通会员弹窗 -->
@@ -127,32 +131,55 @@ @@ -127,32 +131,55 @@
127 <view class="fs36 flex-level perfect">请完善下面信息</view> 131 <view class="fs36 flex-level perfect">请完善下面信息</view>
128 <view class="fillin"> 132 <view class="fillin">
129 <!-- 输入推荐人手机号 --> 133 <!-- 输入推荐人手机号 -->
130 - <view class="flex ai_and Enter_phone" wx:if="{{isyaoqingma}}" > 134 + <view class="flex ai_and Enter_phone" wx:if="{{isyaoqingma}}">
131 <image class="phone_image" src="{{url}}/miniapp/images/plus/Invitation_code.png"></image> 135 <image class="phone_image" src="{{url}}/miniapp/images/plus/Invitation_code.png"></image>
132 <view class="phone"> 136 <view class="phone">
133 - <input bindinput="b_input" data-name="inp_recommon" class="fs30" placeholder="请输入邀请码(推荐人手机号)" type="number" maxlength="20" /> 137 + <input bindinput="b_input" bindconfirm="buy_card" data-name="inp_recommon" class="fs30" placeholder="请输入邀请码(推荐人手机号)" type="number" maxlength="20" />
134 </view> 138 </view>
135 </view> 139 </view>
136 <!-- 输入营业员 --> 140 <!-- 输入营业员 -->
137 <view class="flex ai_and enter_SalesClerk" wx:if="{{is_salesman}}"> 141 <view class="flex ai_and enter_SalesClerk" wx:if="{{is_salesman}}">
138 <image class="SalesClerk_image" src="{{url}}/miniapp/images/plus/Sales_Clerk.png"></image> 142 <image class="SalesClerk_image" src="{{url}}/miniapp/images/plus/Sales_Clerk.png"></image>
139 <view class="SalesClerk"> 143 <view class="SalesClerk">
140 - <input bindinput="b_input" class="fs30" data-name="inp_serviceman" placeholder="请输入营业员" maxlength="30" /> 144 + <input bindinput="b_input" bindconfirm="buy_card" class="fs30" focus="{{focus}}" data-name="inp_serviceman" value="{{inp_serviceman}}" placeholder="请输入营业员" maxlength="30" />
141 </view> 145 </view>
142 </view> 146 </view>
143 <!-- 确认购买 --> 147 <!-- 确认购买 -->
144 <view class="flex-center" bindtap="buy_card"> 148 <view class="flex-center" bindtap="buy_card">
145 - <view class="flex-center purchase"  
146 - style="background-image:url({{url}}/miniapp/images/plus/purchase_Bk.png);"> 149 + <view class="flex-center purchase" style="background-image:url({{url}}/miniapp/images/plus/purchase_Bk.png);">
147 确认购买 150 确认购买
148 </view> 151 </view>
149 </view> 152 </view>
150 </view> 153 </view>
151 </view> 154 </view>
  155 +
  156 +
152 <view class="flex-level"> 157 <view class="flex-level">
153 <image class="purchaseClose" bindtap="OpeningClose" src="{{url}}/miniapp/images/plus/Close.png"></image> 158 <image class="purchaseClose" bindtap="OpeningClose" src="{{url}}/miniapp/images/plus/Close.png"></image>
154 </view> 159 </view>
155 </view> 160 </view>
156 161
157 </view> 162 </view>
  163 +
  164 +<view class="Disgraceful" wx:if="{{staffNo_arr.length>0}}">
  165 + <view bindtap="OpeningClose"></view>
  166 + <view class="dialog_body">
  167 + <view style="background-color: #fff;">
  168 + <view class="dialog_choose">
  169 + <text>请选择营业员</text>
  170 + <text class="dialog_close" bindtap="dialog_close">X</text>
  171 + </view>
  172 + <view class="dialog_name">
  173 + <text class="w50">编号</text>
  174 + <text class="w50">姓名</text>
  175 + </view>
  176 + </view>
  177 + <view class="dialog_name" bindtap="select_serviceman" data-StaffNo="{{item.StaffNo}}" wx:for="{{staffNo_arr}}" wx:key="id" hover-class="weui-active" hover-start-time="200" style="background-color: #fff;">
  178 + <view class="w50">{{item.StaffNo}}</view>
  179 + <view class="w50">{{item.StaffName}}</view>
  180 + </view>
  181 + </view>
  182 +</view>
  183 +
  184 +
158 <warn id="warn"></warn> 185 <warn id="warn"></warn>
159 \ No newline at end of file 186 \ No newline at end of file
pages/user/plus/plus.wxss
@@ -16,7 +16,48 @@ page { @@ -16,7 +16,48 @@ page {
16 width: 100%; 16 width: 100%;
17 height: 100%; 17 height: 100%;
18 } 18 }
19 - 19 +.dialogful{
  20 + position: fixed;
  21 + left: 0;
  22 + top: 15%;
  23 + right: 0;
  24 + bottom: 0;
  25 + z-index: 11;
  26 + background: rgba(0, 0, 0, 0.6);
  27 + width: 100%;
  28 + height: 100%;
  29 +}
  30 +.dialog_body {
  31 + margin:30% auto;
  32 + width: 660rpx;
  33 +}
  34 +.dialog_close{
  35 + float: right;
  36 + width: 50rpx;
  37 + height: 50rpx;
  38 + text-align: right;
  39 +}
  40 +.dialog_choose{
  41 + position: relative;
  42 + padding: 20rpx;
  43 + border-bottom: 1rpx solid #eee;
  44 +}
  45 +.dialog_name,
  46 +.dialog_content {
  47 + padding: 10rpx;
  48 + display: flex;
  49 + border-bottom: 1rpx solid #f7f7f7;
  50 + justify-content: space-around;
  51 +
  52 +}
  53 +.weui-active{
  54 + opacity: 0.9;
  55 + background: #f7f7f7;
  56 +}
  57 +.w50 {
  58 + width: 50%;
  59 + text-align: center;
  60 +}
20 .Opening_bk image { 61 .Opening_bk image {
21 position: absolute; 62 position: absolute;
22 z-index: 2; 63 z-index: 2;
pages/user/user_spsy/user_spsy.js
@@ -15,7 +15,7 @@ Page({ @@ -15,7 +15,7 @@ Page({
15 page: 1, 15 page: 1,
16 isLoading: 0, 16 isLoading: 0,
17 no_more: 0, 17 no_more: 0,
18 - is_use:0 //领取状态 18 + is_use: 0 //领取状态
19 }, 19 },
20 /** 20 /**
21 * 生命周期函数--监听页面加载 21 * 生命周期函数--监听页面加载
@@ -35,7 +35,7 @@ Page({ @@ -35,7 +35,7 @@ Page({
35 now, 35 now,
36 }); 36 });
37 this.requestData() 37 this.requestData()
38 - this.getQrCode(FormId) 38 + this.getQrCode(FormId,GradeId)
39 }, 39 },
40 /** 40 /**
41 * 生命周期函数--监听页面显示 41 * 生命周期函数--监听页面显示
@@ -44,20 +44,21 @@ Page({ @@ -44,20 +44,21 @@ Page({
44 44
45 45
46 }, 46 },
47 - async getQrCode(id) { 47 + async getQrCode(FormId,GradeId) {
48 const res = await getApp().request.promiseGet("/api/weshop/users/grade/wares/code/get", { 48 const res = await getApp().request.promiseGet("/api/weshop/users/grade/wares/code/get", {
49 data: { 49 data: {
50 - privilegeId: id, 50 + privilegeId: FormId,
51 storeId: os.stoid, 51 storeId: os.stoid,
  52 + GradeId:GradeId,
52 userId: getApp().globalData.user_id, 53 userId: getApp().globalData.user_id,
53 }, 54 },
54 }); 55 });
55 if (res.data.code == 0 && res.data.data) { 56 if (res.data.code == 0 && res.data.data) {
56 - if(res.data.data.VerifyDate || res.data.data.VerifyNo){ 57 + if (res.data.data.VerifyDate || res.data.data.VerifyNo) {
57 this.setData({ 58 this.setData({
58 - is_use:1 59 + is_use: 1
59 }) 60 })
60 - }else{ 61 + } else {
61 this.setData({ 62 this.setData({
62 qr_code_object: res.data.data, 63 qr_code_object: res.data.data,
63 }) 64 })
@@ -82,7 +83,8 @@ Page({ @@ -82,7 +83,8 @@ Page({
82 userId: getApp().globalData.user_id, 83 userId: getApp().globalData.user_id,
83 } 84 }
84 const res = await getApp().request.promiseGet("/api/weshop/users/grade/wechat/wares/page", { 85 const res = await getApp().request.promiseGet("/api/weshop/users/grade/wechat/wares/page", {
85 - data: req_data 86 + data: req_data,
  87 + isShowLoading:true,
86 }); 88 });
87 89
88 if (ut.ajax_ok(res)) { 90 if (ut.ajax_ok(res)) {
@@ -128,28 +130,35 @@ Page({ @@ -128,28 +130,35 @@ Page({
128 130
129 //--领取商品-- 131 //--领取商品--
130 async show_hxm(e) { 132 async show_hxm(e) {
131 - let qr_code_object = this.data.qr_code_object;  
132 - if (qr_code_object !== {}) {  
133 - let { Number: val, BeginDate, EndDate} = qr_code_object;  
134 - let qr_code = this.selectComponent("#qc_com");  
135 - let obj = {  
136 - val,  
137 - content: "请将二维码展示给核销员,抵券更快捷",  
138 - now: BeginDate,  
139 - validay: EndDate,  
140 - is_quan: 1,  
141 - };  
142 - qr_code.open(obj)  
143 - }else{  
144 - wx.showToast({  
145 - title: "获取失败",  
146 - icon: 'none',  
147 - duration: 1000  
148 - })  
149 - } 133 + setTimeout(() => {
  134 + let qr_code_object = this.data.qr_code_object;
  135 + if (qr_code_object !== {}) {
  136 + let {
  137 + WriteOffCode: val,
  138 + BeginDate,
  139 + EndDate
  140 + } = qr_code_object;
  141 + let qr_code = this.selectComponent("#qc_com");
  142 + let obj = {
  143 + val,
  144 + content: "当前核销码仅限当面使用",
  145 + now: BeginDate,
  146 + validay: EndDate,
  147 + is_quan: 0,
  148 + is_fw:0,
  149 + };
  150 + qr_code.open(obj)
  151 + } else {
  152 + wx.showToast({
  153 + title: "获取失败",
  154 + icon: 'none',
  155 + duration: 1000
  156 + })
  157 + }
  158 + }, 500);
150 }, 159 },
151 160
152 - close:function (){ 161 + close: function () {
153 this.getQrCode(this.data.FormId) 162 this.getQrCode(this.data.FormId)
154 } 163 }
155 }) 164 })
156 \ No newline at end of file 165 \ No newline at end of file
pages/user/user_spsy/user_spsy.wxml
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <!-- <view wx:if="{{details.isget}}" data-type="1" class="btn" style="background-color:#aaa;color: #fff"> 12 <!-- <view wx:if="{{details.isget}}" data-type="1" class="btn" style="background-color:#aaa;color: #fff">
13 已使用{{list[0].freebh}} 13 已使用{{list[0].freebh}}
14 </view> --> 14 </view> -->
15 - <view wx:if="{{is_use}}" class="btn">已使用</view> 15 + <view wx:if="{{is_use}}" class="btn1">已使用</view>
16 <view wx:else bindtap="show_hxm" data-type="1" class="btn">立即使用</view> 16 <view wx:else bindtap="show_hxm" data-type="1" class="btn">立即使用</view>
17 <!-- <view bindtap="right_use" class="btn">立即使用</view></view> --> 17 <!-- <view bindtap="right_use" class="btn">立即使用</view></view> -->
18 </view> 18 </view>
pages/user/user_spsy/user_spsy.wxss
@@ -27,4 +27,10 @@ page{ @@ -27,4 +27,10 @@ page{
27 text-align: center; 27 text-align: center;
28 /* border-radius: 8rpx; */ 28 /* border-radius: 8rpx; */
29 } 29 }
30 - 30 +.btn1 {
  31 + background-color: #ccc;
  32 + color: white;
  33 + padding: 26rpx;
  34 + text-align: center;
  35 + /* border-radius: 8rpx; */
  36 +}
pages/user/userqy/userqy.js
@@ -187,7 +187,9 @@ Page({ @@ -187,7 +187,9 @@ Page({
187 } 187 }
188 188
189 var url=e.currentTarget.dataset.img; 189 var url=e.currentTarget.dataset.img;
190 - 190 + if(!url || url==""){
  191 + url=`/public/upload/userqy/quanbg.jpg`
  192 + }
191 switch (no) { 193 switch (no) {
192 case "01": 194 case "01":
193 getApp().goto("/packageB/pages/user/user_coupon/user_coupon?img=" 195 getApp().goto("/packageB/pages/user/user_coupon/user_coupon?img="
pages/user/userqy/userqy.wxml
@@ -88,12 +88,13 @@ @@ -88,12 +88,13 @@
88 </view> 88 </view>
89 </view> 89 </view>
90 90
  91 +
91 <view class="project-frame"> 92 <view class="project-frame">
92 <view class="item t-c" wx:for="{{qy_list}}" data-no="{{item.PrivilegeType}}" 93 <view class="item t-c" wx:for="{{qy_list}}" data-no="{{item.PrivilegeType}}"
93 data-img="{{item.PrivilegeImageUrl}}" 94 data-img="{{item.PrivilegeImageUrl}}"
94 bindtap="go_url" data-ind="{{index}}" data-name='{{item.PrivilegeName}}' > 95 bindtap="go_url" data-ind="{{index}}" data-name='{{item.PrivilegeName}}' >
95 <image class="xc-project-img {{item.ishas==1?'':'img_gray'}} " src="{{item.PrivilegeICOUrl}}"></image> 96 <image class="xc-project-img {{item.ishas==1?'':'img_gray'}} " src="{{item.PrivilegeICOUrl}}"></image>
96 - <view class="three-level-word xc-project-word">{{item.PrivilegeName}}</view> 97 + <view class="three-level-word xc-project-word ellipsis-1">{{item.PrivilegeName}}</view>
97 </view> 98 </view>
98 </view> 99 </view>
99 </view> 100 </view>
utils/filter.wxs
@@ -143,6 +143,10 @@ var filters = { @@ -143,6 +143,10 @@ var filters = {
143 return val / 100; 143 return val / 100;
144 }, 144 },
145 145
  146 + div100: function(val) {
  147 + return val / 100;
  148 + },
  149 +
146 // 计算百分比, 不带百分号 150 // 计算百分比, 不带百分号
147 percent: function(num1, num2) { 151 percent: function(num1, num2) {
148 // console.log('百分比',Math.round(num1/num2 * 10000) / 100); 152 // console.log('百分比',Math.round(num1/num2 * 10000) / 100);
@@ -188,5 +192,6 @@ module.exports = { @@ -188,5 +192,6 @@ module.exports = {
188 difference: filters.difference, 192 difference: filters.difference,
189 multiply: filters.multiply, 193 multiply: filters.multiply,
190 price: filters.price, 194 price: filters.price,
  195 + div100: filters.div100,
191 JSONStringify: filters.JSONStringify, 196 JSONStringify: filters.JSONStringify,
192 } 197 }
193 \ No newline at end of file 198 \ No newline at end of file