Commit 2be7c24b1be8c06d6ed07a97e7f06dfcafefb56c

Authored by 后端研发-苏明海
2 parents 67b8130d 1d47db29

Merge branch 'test' into 'qa'

Test

See merge request !603
Showing 56 changed files with 2768 additions and 368 deletions
app.wxss
... ... @@ -446,12 +446,12 @@ background: #ffe3e2;
446 446 /* 图标字体(ty) */
447 447 @font-face {
448 448 font-family: 'iconfont'; /* project id 2054717 */
449   - src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot');
450   - src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot?#iefix') format('embedded-opentype'),
451   - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff2') format('woff2'),
452   - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff') format('woff'),
453   - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.ttf') format('truetype'),
454   - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.svg#iconfont') format('svg');
  449 + src: url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.eot');
  450 + src: url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.eot?#iefix') format('embedded-opentype'),
  451 + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.woff2') format('woff2'),
  452 + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.woff') format('woff'),
  453 + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.ttf') format('truetype'),
  454 + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.svg#iconfont') format('svg');
455 455 }
456 456  
457 457 .iconfont {
... ... @@ -462,6 +462,10 @@ background: #ffe3e2;
462 462 -moz-osx-font-smoothing: grayscale;
463 463 }
464 464  
  465 +.icon-riqi:before {
  466 + content: "\e64c";
  467 +}
  468 +
465 469 .icon-shanchu:before {
466 470 content: "\e61b";
467 471 }
... ...
components/diy_advertising/diy_advertising.wxml
... ... @@ -401,7 +401,7 @@
401 401 <block wx:if='{{object.style==4}}'>
402 402  
403 403  
404   - <swiper class="swiper" autoplay="{{autoplay}}" current="{{object.sw_index}}"
  404 + <swiper class="swiper" circular="true" autoplay="{{autoplay}}" current="{{object.sw_index}}"
405 405 indicator-dots="true"
406 406 indicator-color="{{object.dot_color}}"
407 407 indicator-active-color="{{object.dot_color_act}}"
... ...
components/diy_advertising/diy_advertising.wxss
... ... @@ -314,8 +314,7 @@
314 314  
315 315 .swiper {
316 316 height: auto;
317   - width: 98%;
318   - padding:0 7rpx;
  317 + width: 100%;
319 318 padding-bottom: 7rpx;
320 319 padding-top: 7rpx;
321 320 /* background-color: palevioletred; */
... ...
components/diy_pingd_buy/diy_pingd_buy.js
... ... @@ -37,6 +37,20 @@ Component({
37 37 timer: null,
38 38 iurl:o.imghost,
39 39 },
  40 +
  41 + pageLifetimes:{
  42 + //要处理一下,游客登录后的界面的变化,主要还该是改变会员
  43 + show: function () {
  44 + var th=this;
  45 + if(this.data.goods_array.length>0){
  46 + th.data.timer = setInterval(function() {
  47 + th.countDown2(th);
  48 + }, 1000);
  49 + }
  50 + }
  51 + },
  52 +
  53 +
40 54 ready: function() {
41 55 console.log("ready");
42 56 var g_id = this.data.object.data;
... ... @@ -55,50 +69,83 @@ Component({
55 69 app = getApp(), all_array = [],
56 70 index = 0,
57 71 goodsidlist="";
  72 +
  73 + //-- 当是默认的调用的时候 --
  74 + if(!g_id || g_id.length<=0 ){
  75 + th.no_gid_set();
  76 + }else{
  77 + //--先把商品ID串起来--
  78 + g_id.forEach(function(val, ind) {
  79 + var item = {};
  80 + goodsidlist+=val.goodsid+",";
  81 + })
  82 + goodsidlist= goodsidlist.substr(0,goodsidlist.length-1);
58 83  
59   - //--先把商品ID串起来--
60   - g_id.forEach(function(val, ind) {
61   - var item = {};
62   - goodsidlist+=val.goodsid+",";
63   - })
64   - goodsidlist= goodsidlist.substr(0,goodsidlist.length-1);
65   -
66   - //--调用接口,读取拼单--
67   - app.request.promiseGet("/api/weshop/teamlist/getGoodsList?store_id="
68   - +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
69   -
70   - //如果拼单的数组为空的时候
71   - var goodslist=res.data.data;
72   - if(!goodslist || goodslist.length==0) return false;
73   -
74   - /*--商品队列按照添加的顺序排列--*/
75   - g_id.forEach(function(val, ind) {
76   - goodslist.forEach(function (vy,indy) {
77   - if(val.goodsid==vy.goods_id){
78   - all_array.push(vy);
79   - }
80   - })
81   - })
82   - if(all_array.length==0){
83   - all_array=goodslist;
84   - }
85   -
86   - var arr = new Array();
87   - //--三个三个一组---
88   - for(var i=0;i< all_array.length;i+=3){
89   - arr.push(all_array.slice(i,i+3));
90   - }
91   - /*--熏染到前台--*/
92   - th.setData({goods_array:arr});
93   - var newTime = ut.gettimestamp();
94   - th.setData({ newTime: newTime });
95   -
96   - th.data.timer = setInterval(function() {
97   - th.countDown2(th);
98   - }, 1000);
99   - });
  84 + //--调用接口,读取拼单--
  85 + app.request.promiseGet("/api/weshop/teamlist/getGoodsList?store_id="
  86 + +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
  87 + //如果拼单的数组为空的时候
  88 + var goodslist=res.data.data;
  89 + if(goodslist && goodslist.length>0){
  90 + th.set_goods_list(g_id,goodslist);
  91 + }
  92 +
  93 + });
  94 + }
100 95 },
101   - //---小于10的格式化函数----
  96 +
  97 + no_gid_set(){
  98 + var th=this;
  99 + var url= "/api/weshop/teamlist/pageteam/2?page=1&pageSize=9";
  100 + getApp().request.promiseGet(url, {
  101 + data: {
  102 + store_id: os.stoid,is_end: 0,is_show: 1,
  103 + }
  104 + }).then(res => {
  105 + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
  106 + var goodslist=res.data.data.pageData;
  107 + th.set_goods_list(null,goodslist);
  108 + }
  109 + })
  110 + },
  111 +
  112 + //设置商品列表
  113 + set_goods_list:function(g_id,goodslist){
  114 + var th=this,all_array=[];
  115 + if(g_id){
  116 + /*--商品队列按照添加的顺序排列--*/
  117 + g_id.forEach(function(val, ind) {
  118 + goodslist.forEach(function (vy,indy) {
  119 + if(val.goodsid==vy.goods_id){
  120 + all_array.push(vy);
  121 + //th.setData({goods_array:arr});
  122 + }
  123 + })
  124 + })
  125 + }else{
  126 + all_array=goodslist;
  127 + }
  128 +
  129 + if(all_array.length==0){
  130 + all_array=goodslist;
  131 + }
  132 +
  133 + var arr = new Array();
  134 + //--三个三个一组---
  135 + for(var i=0;i< all_array.length;i+=3){
  136 + arr.push(all_array.slice(i,i+3));
  137 + }
  138 + /*--熏染到前台--*/
  139 + th.setData({goods_array:arr});
  140 + var newTime = ut.gettimestamp();
  141 + th.setData({ newTime: newTime });
  142 +
  143 + th.data.timer = setInterval(function() {
  144 + th.countDown2(th);
  145 + }, 1000);
  146 + },
  147 +
  148 + //---小于10的格式化函数----
102 149 timeFormat: function(param) {
103 150 return param < 10 ? '0' + param : param;
104 151 },
... ... @@ -108,6 +155,8 @@ Component({
108 155 var ee = ob;
109 156 // 获取当前时间,同时得到活动结束时间数组
110 157 var newTime = ut.gettimestamp();
  158 + this.setData({newTime:newTime});
  159 +
111 160 var List = ee.data.goods_array;
112 161 if (List.length == 0) return false;
113 162 for (var j = 0; j < List.length; j++) {
... ...
components/diy_pingd_buy/diy_pingd_buy.wxml
1 1 <!--pages/wp/wp.wxml-->
2   -<block wx:if="goods_array.length>0">
  2 +<block wx:if="{{goods_array.length>0}}">
3 3 <!--拼单-->
4 4 <view class='top_p' bindtap="go_to_pindlist">
5 5 <view class="top">
... ... @@ -21,11 +21,10 @@
21 21  
22 22 <block wx:if="{{aitem.start_time>newTime}}">
23 23 <span class='s_top_p' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>
24   - </block>
25   - <block wx:if="{{aitem.start_time<newTime}}">
  24 + </block>
  25 + <block wx:if="{{aitem.start_time<newTime && aitem.end_time>newTime}}">
26 26 <span class='s_top_p'>火热进行</span>
27 27 </block>
28   -
29 28 <!-- <span class='s_top_p'>火热进行</span> -->
30 29  
31 30 <view class='s_img_p'>
... ... @@ -50,12 +49,17 @@
50 49 <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>-->
51 50  
52 51 <view class="tuan_set_num">
53   - <view class="co-red2">{{aitem.ct_num}}人团</view>
54   -
55   - <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去参团</view>
56   - <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
57   - <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
58   - <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="cantuan huise">已抢光</view>
  52 + <view class="co-red2">{{aitem.ct_num}}人团</view>
  53 + <!-- 判断有没有过期 -->
  54 + <block wx:if="{{aitem.end_time<=newTime}}">
  55 + <view class="cantuan huise">已结束</view>
  56 + </block>
  57 + <block wx:else>
  58 + <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去参团</view>
  59 + <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
  60 + <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
  61 + <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="cantuan huise">已抢光</view>
  62 + </block>
59 63 </view>
60 64 </view>
61 65 </view>
... ... @@ -89,16 +93,21 @@
89 93 <view class='sp_jg_p'>¥{{aitem.price}}</view>
90 94 <view class='sp_jgx_p'>¥{{aitem.market_price}}</view>
91 95 </view>
92   - <view class="o1_sj_p">
  96 + <view class="o1_sj_p" wx:if="{{aitem.end_time>newTime}}">
93 97 <image class="time_img" src="/public/static/images/model/time.png"></image>
94   - <block wx:if="aitem.djs.day>0">{{aitem.djs.day}}天</block>{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒
  98 + <block wx:if="{{aitem.djs.day>0 }}">{{aitem.djs.day}}天</block>{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒
95 99 </view>
96   -
97   - <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
98   - <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去开团</view>
99   - <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
100   - <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="wo_p huise">已抢光</view>
101   -
  100 +
  101 + <!-- 判断有没有过期 -->
  102 + <block wx:if="{{aitem.end_time<=newTime}}">
  103 + <view class="wo_p huise">已结束</view>
  104 + </block>
  105 + <block wx:else>
  106 + <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
  107 + <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去开团</view>
  108 + <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
  109 + <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="wo_p huise">已抢光</view>
  110 + </block>
102 111 </view>
103 112 </view>
104 113 </navigator>
... ...
components/diy_pingd_buy/diy_pingd_buy.wxss
... ... @@ -362,4 +362,5 @@ swiper {
362 362 display: flex;
363 363 align-items: center;
364 364 margin:5rpx 0rpx;
365   -}
366 365 \ No newline at end of file
  366 +}
  367 +.o1_right_p .wo_p.huise{ background-color: #eee;}
367 368 \ No newline at end of file
... ...
components/diy_seckill/diy_seckill.js
... ... @@ -36,6 +36,19 @@ Component({
36 36 imghost: os.imghost,
37 37 timer: null,
38 38 },
  39 +
  40 + pageLifetimes:{
  41 + //要处理一下,游客登录后的界面的变化,主要还该是改变会员
  42 + show: function () {
  43 + var th=this;
  44 + if(this.data.goods_array.length>0){
  45 + th.data.timer = setInterval(function() {
  46 + th.countDown2(th);
  47 + }, 1000);
  48 + }
  49 + }
  50 + },
  51 +
39 52 ready: function() {
40 53 console.log("ready");
41 54 var g_id = this.data.object.data;
... ... @@ -50,66 +63,82 @@ Component({
50 63 // 这里是一个自定义方法
51 64 customMethod: function() {},
52 65 init: function(g_id) {
53   - var th = this, app = getApp(),all_array = [], goodsidlist="";
54   -
55   - //--先把商品ID串起来--
56   - g_id.forEach(function(val, ind) {
57   - var item = {};
58   - goodsidlist+=val.goodsid+",";
59   - })
60   - goodsidlist=ut.sub_last(goodsidlist);
61   -
62   - //--调用接口,读取秒杀--
63   - app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id="
64   - +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
65   - //如果秒杀的数组为空的时候
66   -
67   - var goodslist=res.data.data;
68   - if(!goodslist || goodslist.length==0) return false;
69   -
70   - // 判断火热,预热
71   - var newTime = ut.gettimestamp();
72   - th.setData({newTime:newTime});
73   - // for(var a=0;a< goodslist.length;a++){
74   - // var starTime=goodslist[a].start_time;
75   - // var msStr=[];
76   - // console.log(2222222222)
77   - // console.log(starTime+":"+newTime)
78   - // if (starTime>newTime){
79   - // msStr.push()
80   - // //th.setData({msText:'即将开始'});
81   - // }
82   - // if (starTime<newTime){
83   - // th.setData({msText:'火热进行'});
84   - // }
85   - // }
86   - /*--商品队列按照添加的顺序排列--*/
87   - g_id.forEach(function(val, ind) {
88   - goodslist.forEach(function (vy,indy) {
89   - if(val.goodsid==vy.goods_id){
90   - all_array.push(vy);
91   - th.setData({goods_array:arr});
92   - }
93   - })
94   - })
95   - if(all_array.length==0){
96   - all_array=goodslist;
97   - }
98   -
99   - var arr = new Array();
100   - //--三个三个一组---
101   - for(var i=0;i< all_array.length;i+=3){
102   - arr.push(all_array.slice(i,i+3));
103   - }
104   - /*--熏染到前台--*/
105   -
106   - th.setData({goods_array:arr});
107   -
108   - th.data.timer = setInterval(function() {
109   - th.countDown2(th);
110   - }, 1000);
111   - });
  66 + var th = this, app = getApp(), goodsidlist="";
  67 + if(g_id && g_id.length>0){
  68 + //--先把商品ID串起来--
  69 + g_id.forEach(function(val, ind) {
  70 + var item = {};
  71 + goodsidlist+=val.goodsid+",";
  72 + })
  73 + goodsidlist=ut.sub_last(goodsidlist);
  74 +
  75 + //--调用接口,读取秒杀--
  76 + app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id="
  77 + +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
  78 + //如果秒杀的数组为空的时候
  79 + var goodslist=res.data.data;
  80 + //就算是添加的活动已经过期,就要用最新的进行中活动
  81 + if(goodslist && goodslist.length>0) {
  82 + th.set_goods_list(g_id,goodslist);
  83 + }
  84 + });
  85 + }else{
  86 + th.no_gid_set();
  87 + }
112 88 },
  89 +
  90 + //当是默认的情况
  91 + no_gid_set(){
  92 + getApp().request.promiseGet("/api/ms/flash_sale/spikepage?page=1&pageSize=9",
  93 + {isShowLoading:1,data:{store_id:os.stoid,is_end:0,is_show:1}}
  94 + ).then(res=>{
  95 + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) {
  96 + goodsidlist=res.data.data.pageData;
  97 + th.set_goods_list(null,goodslist);
  98 + }
  99 + });
  100 + },
  101 +
  102 + //就算是添加的活动已经过期,就要用最新的活动
  103 + set_goods_list(g_id,goodslist){
  104 + // 判断火热,预热
  105 + var newTime = ut.gettimestamp(),all_array = [],th=this;
  106 + th.setData({newTime:newTime});
  107 + if(g_id){
  108 + /*--商品队列按照添加的顺序排列--*/
  109 + g_id.forEach(function(val, ind) {
  110 + goodslist.forEach(function (vy,indy) {
  111 + if(val.goodsid==vy.goods_id){
  112 + all_array.push(vy);
  113 + //th.setData({goods_array:arr});
  114 + }
  115 + })
  116 + })
  117 + }else{
  118 + all_array=goodslist;
  119 + }
  120 +
  121 +
  122 + if(all_array.length==0){
  123 + all_array=goodslist;
  124 + }
  125 +
  126 + var arr = new Array();
  127 + //--三个三个一组---
  128 + for(var i=0;i< all_array.length;i+=3){
  129 + arr.push(all_array.slice(i,i+3));
  130 + }
  131 + /*--熏染到前台--*/
  132 +
  133 + th.setData({goods_array:arr});
  134 +
  135 + th.data.timer = setInterval(function() {
  136 + th.countDown2(th);
  137 + }, 1000);
  138 + },
  139 +
  140 +
  141 +
113 142 //---小于10的格式化函数----
114 143 timeFormat: function(param) {
115 144 return param < 10 ? '0' + param : param;
... ... @@ -120,6 +149,8 @@ Component({
120 149 var ee = ob;
121 150 // 获取当前时间,同时得到活动结束时间数组
122 151 var newTime = ut.gettimestamp();
  152 + this.setData({newTime:newTime});
  153 +
123 154 var List = ee.data.goods_array;
124 155 if (List.length == 0) return false;
125 156 for (var j = 0; j < List.length; j++) {
... ...
components/diy_seckill/diy_seckill.wxml
1   -<block wx:if="goods_array.length>0">
  1 +<block wx:if="{{goods_array.length>0}}">
2 2 <!--秒杀-->
3 3 <view class='top' bindtap="go_to_skill">
4 4 <view class="flex">
... ... @@ -24,16 +24,26 @@
24 24 <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>
25 25 </view>
26 26 </block>
27   - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}">
28   - <view class="rob">
29   - <span class='s_top_kill'>火热进行</span>
30   - </view>
31   - </block>
32   - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}">
33   - <view class="rob">
34   - <span class='s_top_kill gray'>已抢光</span>
35   - </view>
36   - </block>
  27 +
  28 + <block wx:if="{{aitem.end_time<=newTime}}">
  29 + <view class="rob">
  30 + <span class='s_top_kill gray'>活动已结束</span>
  31 + </view>
  32 + </block>
  33 + <block wx:else>
  34 + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}">
  35 + <view class="rob">
  36 + <span class='s_top_kill'>火热进行</span>
  37 + </view>
  38 + </block>
  39 + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}">
  40 + <view class="rob">
  41 + <span class='s_top_kill gray'>已抢光</span>
  42 + </view>
  43 + </block>
  44 + </block>
  45 +
  46 +
37 47  
38 48 <view class='clear'></view>
39 49  
... ... @@ -92,17 +102,25 @@
92 102 <view class="wo" style="background-color: #adadad">正在预热</view>
93 103 </view>
94 104 </block>
95   - <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}">
96   - <view class="rob">
97   - <view class="wo">我要抢</view>
98   - </view>
99   - </block>
100   -
101   - <block wx:if="{{aitem.goods_num<=aitem.buy_num}}">
102   - <view class="rob">
103   - <view class="wo" style="background-color: #adadad">已抢光</view>
104   - </view>
105   - </block>
  105 +
  106 + <block wx:if="{{aitem.end_time<newTime}}">
  107 + <view class="rob">
  108 + <view class="wo" style="background-color: #adadad">已结束</view>
  109 + </view>
  110 + </block>
  111 + <block wx:else>
  112 + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}">
  113 + <view class="rob">
  114 + <view class="wo">我要抢</view>
  115 + </view>
  116 + </block>
  117 +
  118 + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}">
  119 + <view class="rob">
  120 + <view class="wo" style="background-color: #adadad">已抢光</view>
  121 + </view>
  122 + </block>
  123 + </block>
106 124  
107 125  
108 126 </view>
... ...
components/diy_shopname/diy_shopname.wxml
... ... @@ -10,7 +10,7 @@
10 10 <view style="position: relative; height: 150rpx;">
11 11 <view class="big_border" >
12 12 <view class="circle">
13   - <view class="border">
  13 + <view class="border" style="width: 100%; height: 100%;">
14 14 <image class="wxd_ww" src='{{sto}}' bindtap="go_user"></image>
15 15 </view>
16 16 </view>
... ...
components/diy_shopname/diy_shopname.wxss
... ... @@ -139,9 +139,9 @@ left:-116rpx;
139 139 width: 100%;
140 140 height: 260rpx;
141 141 position: absolute;
142   - top: -130rpx;
  142 + margin-top: -130rpx;
143 143 text-align: center;
144   - margin-top: 50%;
  144 + top: 50%;
145 145 }
146 146  
147 147 /* 小图片2圆边框 */
... ...
components/full_screen/filter.wxs 0 → 100644
  1 +var format = function (text) {
  2 +
  3 + if (!text) {
  4 + return
  5 + }
  6 + var reg = getRegExp('\\\\n', 'g')
  7 + return text.replace(reg, '\n')
  8 +}
  9 +
  10 +module.exports = {
  11 + format: format
  12 +}
... ...
components/full_screen/full_screen.js 0 → 100644
  1 +// components/userqy_pop_up/userqy_pop_up.js
  2 +var o = getApp().globalData.setting
  3 +Component({
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + control: 1,
  9 + is_full_screen_show:0, //全屏显示
  10 + sec_show:3, //倒计时的秒数
  11 + full_ad:null, //全屏广告
  12 + url:o.imghost,
  13 + full_screen:0,
  14 + is_full_screen_men:1,
  15 + hidden:0,
  16 + },
  17 +
  18 + pageLifetimes:{
  19 + hide: function() {
  20 + // 页面被隐藏
  21 + clearInterval(this.data.full_screen);
  22 + },
  23 + },
  24 +
  25 + ready: function () {
  26 + var th=this;
  27 + setTimeout(function(){
  28 + th.setData({hidden:1,})
  29 + },2600)
  30 + },
  31 +
  32 + properties: {},
  33 + methods: {
  34 + close_full_screen(){
  35 + this.setData({is_full_screen_show:0,sec_show:0,is_full_screen_men:0});
  36 + },
  37 + //-- 跳转到满屏广告的链接 --
  38 + go_full_ad(){
  39 + if(!this.data.full_ad) return false;
  40 + if(!this.data.full_ad.ad_weapplink) return false;
  41 + getApp().goto(this.data.full_ad.ad_weapplink);
  42 + this.setData({is_full_screen_show:0,is_full_screen_men:0});
  43 + },
  44 + get_the_full_screen(){
  45 + if(this.data.full_ad) return false;
  46 + var th=this;
  47 + //获取全屏的广告
  48 + getApp().request.promiseGet("/api/weshop/ad/page?pid=1001&store_id=" + o.stoid,{
  49 + data: { enabled: 1 }
  50 + }).then(res=>{
  51 + //判断是不是有全屏广告
  52 + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
  53 + th.setData({
  54 + is_full_screen_show:1,
  55 + full_ad:res.data.data.pageData[0],
  56 + })
  57 +
  58 + //--定时关闭--
  59 + th.data.full_screen=setInterval(function(){
  60 + if(!th.data.sec_show) {
  61 + clearInterval(th.data.full_screen);
  62 + th.close_full_screen();
  63 + return false;
  64 + }
  65 + th.data.sec_show--;
  66 + th.setData({sec_show:th.data.sec_show});
  67 + },1000)
  68 +
  69 +
  70 + setTimeout(function(){
  71 + th.setData({is_full_screen_men:0});
  72 + },1000)
  73 + }else{
  74 + th.setData({
  75 + is_full_screen_men:0
  76 + })
  77 + }
  78 + })
  79 + }
  80 + },
  81 +
  82 +})
0 83 \ No newline at end of file
... ...
components/full_screen/full_screen.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 5 \ No newline at end of file
... ...
components/full_screen/full_screen.wxml 0 → 100644
  1 +<!-- 全屏控制 -->
  2 +<view hidden="{{!is_full_screen_men || hidden}}" class="full_screen" style="background-color: #fff;"></view>
  3 +<view wx:if="{{is_full_screen_show}}" class="full_screen" bindtap="go_full_ad" style="background-image: url('{{url+full_ad.ad_code}}');">
  4 + <view catchtap="close_full_screen" class="skip_box">跳过 <text>{{sec_show}}</text></view>
  5 +</view>
  6 +
  7 +
  8 +
... ...
components/full_screen/full_screen.wxss 0 → 100644
  1 +.full_screen{
  2 + position: fixed;left: 0;top: 0;
  3 + z-index: 1000000000000;
  4 + background-color: rgba(0,0,0,0.4);
  5 + width: 100%;
  6 + height: 100%;
  7 + background-position: center;
  8 + background-size: 100% 100%;
  9 + background-repeat: no-repeat;
  10 +}
  11 +
  12 +
  13 +.skip_box{
  14 + float: right; margin-top: 10rpx; margin-right: 10rpx;
  15 + background-color: gainsboro; width: 120rpx;
  16 + height: 48rpx; font-size: 28rpx; line-height: 48rpx;
  17 + text-align: center; border-radius: 20rpx;
  18 + }
0 19 \ No newline at end of file
... ...
packageA/pages/activity_share/activity_share.js
... ... @@ -182,9 +182,14 @@ Page({
182 182 th.setData({share_hidden:1,share_good:null});
183 183  
184 184 var ind=3;//秒杀活动分享
185   - if(item.prom_type==6){
186   - ind=4;
187   - }
  185 + if(th.data.currentIndex==0){
  186 + ind=3;//秒杀活动分享
  187 + }else if(th.data.currentIndex==1){
  188 + ind=4;//拼团
  189 + }else if(th.data.currentIndex==2){
  190 + ind=5;//促销
  191 + }
  192 +
188 193 //插入活动
189 194 if(item.prom_type==3){
190 195 var hui_active=this.data.hui_active;
... ... @@ -210,8 +215,12 @@ Page({
210 215 title: title,path:url,
211 216 };
212 217 th.setData({share_hidden:1,share_good:null});
  218 +
  219 + var ind=0;//促销
  220 + if(th.data.currentIndex==2){ ind=5;}
  221 +
213 222 //插入活动
214   - th.insert_act_share(title,hui_active.id);
  223 + th.insert_act_share(title,hui_active.id,ind);
215 224 return ob;
216 225 }
217 226 }
... ... @@ -533,10 +542,15 @@ Page({
533 542 scene+="_"+user_id;
534 543 }
535 544  
  545 + var ind=3;
  546 + if(that.data.currentIndex==1){
  547 + ind=4;
  548 + }
  549 +
536 550 if(th.data.share_good.prom_type==3){
537   - th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id); //插入分享
  551 + th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id,5); //插入分享
538 552 }else{
539   - th.insert_act_share(th.data.share_good.title,th.data.share_good.id); //插入分享
  553 + th.insert_act_share(th.data.share_good.title,th.data.share_good.id,ind); //插入分享
540 554 }
541 555  
542 556  
... ...
packageA/pages/checkin/checkin.js
1 1 // packageA//pages/checkin/checkin.js
2 2 const app = getApp();
3   -
  3 +let self;
4 4 Page({
5 5  
6 6 /**
... ... @@ -12,6 +12,9 @@ Page({
12 12 day: '',
13 13 weekArr: ['日', '一', '二', '三', '四', '五', '六'],
14 14 dateArr: [],
  15 + n_dateArr:[], //本月的日期
  16 + s_dateArr:[], //上月的日期
  17 +
15 18 firstDay: '',
16 19 lastDay: '',
17 20 param: null,
... ... @@ -25,19 +28,27 @@ Page({
25 28 checkInNums: 0, //补签次数
26 29 isCheckInDay: '',
27 30  
28   -
29 31 flag: true,
  32 + isLogin: false,
  33 +
30 34 },
31 35  
32 36 loadQd(callback) {
33   - let self = this;
34 37 app.request.get('/api/weshop/qdrecord/getUser/'+ app.globalData.setting.stoid + '/' + app.globalData.user_id, {
35 38 success: function (res) {
36   - if(callback) callback();
37   - self.setData({
38   - res: res.data.data
39   - });
40   - self.loadCheckedRecord();
  39 + if(res.data.code==0){
  40 + if(callback) callback();
  41 + self.setData({
  42 + res: res.data.data
  43 + });
  44 + self.loadCheckedRecord();
  45 + }else{
  46 + wx.showToast({
  47 + title: "网络繁忙,请重试",
  48 + icon: 'none',
  49 + duration: 2000
  50 + })
  51 + }
41 52 },
42 53 });
43 54 },
... ... @@ -46,18 +57,60 @@ Page({
46 57 * 生命周期函数--监听页面加载
47 58 */
48 59 onLoad: function(options) {
49   - let self = this;
  60 + console.log('执行onload');
  61 + self = this;
50 62 this.getDate();
51 63 this.setDate();
52 64 var res = wx.getSystemInfoSync();
53 65 this.setData({
54   - param: res.windowHeight / 12,
  66 + param: res.windowHeight / 12,
55 67 })
56 68  
57   - this.loadQd();
  69 + // 判断会员是否授权登录,
  70 + // 没有登录则跳转到登录页,
  71 + // 已登录则设置已登录状态,请求加载签到数据
  72 + this.isLogin().then(function() {
  73 + console.log('loginnnn',app.globalData.userInfo);
  74 + self.setData({
  75 + isLogin: true
  76 + });
  77 + self.loadQd();
  78 + });
  79 +
58 80  
59 81 },
60   -
  82 +
  83 + onShow() {
  84 + if(app.globalData.userInfo instanceof Object) {
  85 + if(this.data.isLogin) {
  86 + return;
  87 + } else {
  88 + this.setData({
  89 + isLogin: true
  90 + });
  91 + this.loadQd();
  92 + };
  93 + }
  94 + },
  95 +
  96 + onHide() {
  97 + console.log('执行onHide');
  98 + },
  99 +
  100 + // 是否登录
  101 + isLogin() {
  102 + return new Promise(function(resolve, reject) {
  103 + let user_info = getApp().globalData.userInfo;
  104 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  105 + wx.navigateTo({
  106 + url: '/pages/togoin/togoin',
  107 + })
  108 + return false;
  109 + } else {
  110 + resolve();
  111 + };
  112 + });
  113 + },
61 114  
62 115 // 点击"我的积分"和"去购物"进行跳转
63 116 goto(e) {
... ... @@ -65,7 +118,6 @@ Page({
65 118 app.goto(url);
66 119 },
67 120  
68   -
69 121 // 点击显示签到规则
70 122 showRules() {
71 123 if(this.data.isShowRules) {
... ... @@ -82,34 +134,87 @@ Page({
82 134  
83 135 // 加载签到记录
84 136 loadCheckedRecord() {
85   - let newDateArr = this.data.dateArr;
  137 + let newDateArr=[];
86 138 let list;
87 139 let bqlist;
88   - if(this.data.res.qddaylist) {
  140 + //--判断什么日子是签到的,上个月的--
  141 + if(this.data.res && this.data.res.qdsdaylist) {
  142 + list = this.data.res.qdsdaylist.split(',');
  143 + for(var i in this.data.s_dateArr){
  144 + var item=this.data.s_dateArr[i];
  145 + if(this.check_is_qd(item,list)){
  146 + item.isCheckIn = true;
  147 + }else{
  148 + item.isCheckIn = false;
  149 + }
  150 + }
  151 + }
  152 + newDateArr=newDateArr.concat(this.data.s_dateArr);
  153 + //--判断什么日子是签到的,这个月的--
  154 + if(this.data.res && this.data.res.qddaylist) {
89 155 list = this.data.res.qddaylist.split(',');
90   - for(let item of list) {
91   - newDateArr[item-1].isCheckIn = true;
92   - };
  156 + for(var i in this.data.n_dateArr){
  157 + var item=this.data.n_dateArr[i];
  158 + if(this.check_is_qd(item,list)){
  159 + item.isCheckIn = true;
  160 + }else{
  161 + item.isCheckIn = false;
  162 + }
  163 + }
93 164 }
94   - if(this.data.res.curbqdaynum) {
  165 + newDateArr=newDateArr.concat(this.data.n_dateArr);
  166 +
  167 + //--判断什么日子是要补签的--
  168 + if(this.data.res && this.data.res.curbqdaynum) {
95 169 bqlist = this.data.res.curbqdaynum.split(',');
96   - for(let item of bqlist) {
97   - var date = new Date(item);
98   - newDateArr[date.getDate()-1].isBq = true;
99   - }
  170 + for(var i in newDateArr){
  171 + var item=newDateArr[i];
  172 + if(this.check_is_bq(item,bqlist)){
  173 + item.isBq = true;
  174 + }else{
  175 + item.isBq = false;
  176 + }
  177 + }
100 178 }
101 179 this.setData({
102 180 dateArr: newDateArr
103 181 });
104 182 },
105 183  
  184 +
  185 + //判断是不是同一个日期,签到的
  186 + check_is_qd(item,bqlist){
  187 + for(var i in bqlist){
  188 + var c_item=JSON.parse(JSON.stringify(item));
  189 + if(c_item.num<10) c_item.num="0"+c_item.num;
  190 + if(c_item.num==bqlist[i]){
  191 + return true;
  192 + }
  193 + }
  194 + return false;
  195 + },
  196 +
  197 + //判断是不是同一个日期,补签到的
  198 + check_is_bq(item,bqlist){
  199 + for(var i in bqlist){
  200 + if(item.date==bqlist[i]){
  201 + return true;
  202 + }
  203 + }
  204 + return false;
  205 + },
  206 +
106 207 // 点击签到
107 208 checkInToday() {
108 209 const self = this;
109 210 // 获取今天的签到状态
110   - let isCheckInToday = this.data.dateArr[this.data.day-1].isCheckIn;
  211 + //let isCheckInToday = this.data.dateArr[this.data.day-1].isCheckIn;
  212 + var ck=this.data.day;
  213 + if(parseInt(ck)<10) ck="0"+ck;
  214 + var isCheckInToday=this.data.res.qddaylist.indexOf(ck);
  215 +
111 216 // 如果还没签到, 可以点击签到
112   - if(!isCheckInToday) {
  217 + if(isCheckInToday==-1) {
113 218 app.request.promisePost('/api/weshop/qdrecord/saveQd', {
114 219 data: {
115 220 store_id: app.globalData.setting.stoid,
... ... @@ -118,8 +223,16 @@ Page({
118 223 }).then(res => {
119 224 // 改变签到状态,由false置为true
120 225 // let newDateArr = self.data.dateArr;
121   - // newDateArr[self.data.day-1].isCheckIn = true;
122   -
  226 + // newDateArr[self.data.day-1].isCheckIn = true;
  227 +
  228 + for(var i in self.data.dateArr) {
  229 + self.data.dateArr[i].isCheckIn=false;
  230 + self.data.dateArr[i].isBq=false;
  231 + }
  232 + self.setData({
  233 + dateArr: self.data.dateArr
  234 + });
  235 +
123 236 self.loadQd(function() {
124 237 wx.showToast({
125 238 title: self.data.res.qdintro,
... ... @@ -147,26 +260,29 @@ Page({
147 260 data: {
148 261 store_id: app.globalData.setting.stoid,
149 262 user_id: app.globalData.user_id,
150   - daynum: self.data.res.getBQIntegral,
  263 + daynum: self.data.res.getBQIntegral1,
151 264 bqnum: self.data.res.getbqnum2,
152   - bqintegral: self.data.res.getBQIntegral1,
  265 + bqintegral: self.data.res.getBQIntegral,
153 266 }
154 267 }).then(res => {
155 268 // 改变签到状态,由false置为true
156   - // let newDateArr = self.data.dateArr;
157   - // newDateArr[self.data.day-1].isCheckIn = true;
158   - var bqlist = self.data.res.curbqdaynum.split(',').sort();
159   - var list = [];
  269 + // let newDateArr = self.data.dateArr;
  270 + // newDateArr[self.data.day-1].isCheckIn = true;
  271 + //var bqlist = self.data.res.curbqdaynum.split(',').sort();
  272 + //var list = [];
  273 + /*--
160 274 for(let item of bqlist) {
161 275 var date = new Date(item);
162 276 list.push(date.getDate());
163   - }
164   -
165   - self.data.dateArr[list[0]-1].isBq = false;
  277 + }--*/
  278 +
  279 + for(var i in self.data.dateArr) {
  280 + self.data.dateArr[i].isCheckIn=false;
  281 + self.data.dateArr[i].isBq=false;
  282 + }
166 283 self.setData({
167 284 dateArr: self.data.dateArr
168   - });
169   -
  285 + });
170 286 self.loadQd(function() {
171 287 self.data.flag = true;
172 288 wx.showToast({
... ... @@ -182,10 +298,6 @@ Page({
182 298 }
183 299 },
184 300  
185   -
186   -
187   -
188   -
189 301 getDate: function() { //获取当月日期
190 302 var mydate = new Date();
191 303 var year = mydate.getFullYear();
... ... @@ -195,7 +307,7 @@ Page({
195 307 this.data.month = months;
196 308 this.data.day = mydate.getDate(); //获取当月日期: 1~31
197 309 var fist = new Date(year, month, 1);
198   - this.data.firstDay = fist.getDay(); //获取当月第一天
  310 + this.data.firstDay = fist.getDay(); //获取当月第一天
199 311 var last = new Date(year, months, 0); //0表示当月最后一天
200 312 this.data.lastDay = last.getDate(); //获取当月最后一天
201 313  
... ... @@ -204,88 +316,43 @@ Page({
204 316 month: this.data.month,
205 317 day: this.data.day,
206 318 firstDay: this.data.firstDay,
207   - lastDay: this.data.lastDay
  319 + lastDay: this.data.lastDay,
  320 + fist:fist
208 321 })
209 322 console.log("今天:" + this.data.day);
210 323 },
211 324  
212 325 setDate: function() {
213 326 var day;
214   - for (var i = 1; i < this.data.lastDay + 1; i++) {
215   - day = {
216   - num: i,
217   - };
218   - this.data.dateArr.push(day);
  327 + for(var i=0;i<this.data.firstDay;i++){
  328 + //获取前几天的时间数组
  329 + var arr_d=this.getNextDate(this.data.fist,i-this.data.firstDay)
  330 + day = {num: arr_d[1],date:arr_d[0]};
  331 + this.data.s_dateArr.push(day);
  332 + }
  333 +
  334 + for (var i = 1; i < this.data.lastDay + 1; i++) {
  335 + var date=this.data.month+"";
  336 + if(this.data.month<10) date="0"+date;
  337 + if(i<10) {
  338 + date=date+"-0"+i;
  339 + }else{
  340 + date=date+"-"+i;
  341 + }
  342 + day = {num: i,date:date};
  343 + this.data.n_dateArr.push(day);
219 344 }
220   - this.setData({
221   - dateArr: this.data.dateArr,
222   - // firstDay: this.data.firstDay
223   - });
224 345 },
225 346  
226   - // prevMonth: function() { //上一月
227   - // var months = "";
228   - // var years = "";
229   - // if (this.data.month == 1) {
230   - // years = this.data.year - 1
231   - // this.data.month = 12;
232   - // months = this.data.month;
233   - // } else {
234   - // years = this.data.year;
235   - // months = this.data.month - 1;
236   - // }
237   -
238   - // var first = new Date(years, months - 1, 1);
239   - // this.data.firstDay = first.getDay();
240   - // var last = new Date(years, months, 0);
241   - // this.data.lastDay = last.getDate();
242   -
243   - // this.setData({
244   - // month: months,
245   - // year: years,
246   - // firstDay: this.data.firstDay,
247   - // lastDay: this.data.lastDay
248   - // })
249   -
250   - // this.data.dateArr = [];
251   - // for (var i = 1; i < this.data.lastDay + 1; i++) {
252   - // this.data.dateArr.push(i);
253   - // }
254   - // this.setData({
255   - // dateArr: this.data.dateArr
256   - // })
257   - // },
  347 + //获取相隔是多少天的日期
  348 + getNextDate(date,day) {
  349 + var dd = date;
  350 + dd.setDate(dd.getDate() + day);
  351 + //var y = dd.getFullYear();
  352 + var m = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1;
  353 + var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
  354 + //return y + "-" + m + "-" + d;
  355 + return [m + "-" + d,dd.getDate()];
  356 + }
258 357  
259   - // nextMonth: function() { //下一月
260   - // var months = "";
261   - // var years = "";
262   - // if (this.data.month == 12) {
263   - // this.data.month = 0;
264   - // months = this.data.month;
265   - // years = this.data.year + 1;
266   - // } else {
267   - // months = this.data.month + 1;
268   - // years = this.data.year;
269   - // }
270   - // var months = this.data.month + 1;
271   - // var first = new Date(years, months - 1, 1);
272   - // this.data.firstDay = first.getDay();
273   - // var last = new Date(years, months, 0);
274   - // this.data.lastDay = last.getDate();
275   - // this.setData({
276   - // month: months,
277   - // year: years,
278   - // firstDay: this.data.firstDay,
279   - // lastDay: this.data.lastDay
280   - // })
281   -
282   - // this.data.dateArr = [];
283   - // for (var i = 1; i < this.data.lastDay + 1; i++) {
284   - // this.data.dateArr.push(i);
285   - // }
286   - // this.setData({
287   - // dateArr: this.data.dateArr
288   - // })
289   - // },
290   -
291 358 })
... ...
packageA/pages/checkin/checkin.wxml
... ... @@ -2,61 +2,66 @@
2 2 <wxs src="checkin.wxs" module="myUtil"></wxs>
3 3 <view class="checkin-container">
4 4 <view class="rule-container flex">
5   - <view class="points" bindtap="goto" data-url="/pages/user/integral/integral"><image class="coin" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/integral/coins.png"></image>我的积分</view>
6 5 <view class="rule" bindtap="showRules">规则</view>
  6 + <view class="points" bindtap="goto" data-url="/pages/user/integral/integral"><image class="coin" src="https://mshop-lib.yolipai.net/template/mobile/new/static/images/integral/coins.png"></image>我的积分</view>
  7 +
7 8 </view>
8 9  
9   - <view class="list flex">
10   - <view class="list-item {{dateArr[myUtil.setDate(year, res.sday2, 0)-1].isCheckIn ? 'active':''}}">
  10 + <view class="list flex" wx:if="{{res}}">
  11 + <view class="list-item active}}">
11 12 <view class="circle">+{{res.cday1}}</view>
12   - <view class="fs26">{{myUtil.setDate(year, res.sday2, 0)}}日</view>
  13 + <view class="fs26">{{res.sday2}}</view>
13 14 </view>
14   - <view class="list-item {{dateArr[myUtil.setDate(year, res.sday2, 1)-1].isCheckIn ? 'active':''}}">
  15 + <view class="list-item {{myUtil.setDate_is_act(year, res.sday3, 0,res.qddaylist)? 'active':''}}">
15 16 <view class="circle">+{{res.daynum}}</view>
16   - <view class="fs26">{{myUtil.setDate(year, res.sday2, 1)}}日</view>
  17 + <view class="fs26">日</view>
17 18 </view>
18   - <view class="list-item {{dateArr[myUtil.setDate(year, res.sday2, 2)-1].isCheckIn ? 'active':''}}">
  19 + <view class="list-item {{myUtil.setDate_is_act(year, res.sday3, 1,res.qddaylist)? 'active':''}}">
19 20 <view class="circle">+{{res.tdayc1}}</view>
20   - <view class="fs26">{{myUtil.setDate(year, res.sday2, 2)}}日</view>
  21 + <view class="fs26">日</view>
21 22 </view>
22   - <view class="list-item {{dateArr[myUtil.setDate(year, res.sday2, 3)-1].isCheckIn ? 'active':''}}">
  23 + <view class="list-item {{myUtil.setDate_is_act(year, res.sday3, 2,res.qddaylist)? 'active':''}}">
23 24 <view class="circle">+{{res.tdayc2}}</view>
24   - <view class="fs26">{{myUtil.setDate(year, res.sday2, 3)}}日</view>
  25 + <view class="fs26">{{myUtil.setDate(year, res.sday3, 2)}}日</view>
25 26 </view>
26   - <view class="list-item {{dateArr[myUtil.setDate(year, res.sday2, 4)-1].isCheckIn ? 'active':''}}">
  27 + <view class="list-item {{myUtil.setDate_is_act(year, res.sday3, 3,res.qddaylist)? 'active':''}}">
27 28 <view class="circle">+{{res.tdayc3}}</view>
28   - <view class="fs26">{{myUtil.setDate(year, res.sday2, 4)}}日</view>
  29 + <view class="fs26">{{myUtil.setDate(year, res.sday3, 3)}}日</view>
29 30 </view>
30   - <view class="list-item {{dateArr[myUtil.setDate(year, res.sday2, 5)-1].isCheckIn ? 'active':''}}">
  31 + <view class="list-item {{myUtil.setDate_is_act(year, res.sday3, 4,res.qddaylist)? 'active':''}}">
31 32 <view class="circle">+{{res.tdayc4}}</view>
32   - <view class="fs26">{{myUtil.setDate(year, res.sday2, 5)}}日</view>
  33 + <view class="fs26">{{myUtil.setDate(year, res.sday3, 4)}}日</view>
33 34 </view>
34   - <view class="list-item {{dateArr[myUtil.setDate(year, res.sday2, 6)-1].isCheckIn ? 'active':''}}">
  35 + <view class="list-item {{myUtil.setDate_is_act(year, res.sday3, 5,res.qddaylist)? 'active':''}}">
35 36 <view class="circle">+{{res.tdayc5}}</view>
36   - <view class="fs26">{{myUtil.setDate(year, res.sday2, 6)}}日</view>
  37 + <view class="fs26">{{myUtil.setDate(year, res.sday3, 5)}}日</view>
37 38 </view>
38 39 </view>
  40 + <view wx:else style="height: 100rpx;"></view>
39 41  
40   - <view class="btn-container">
41   - <view class="btn" bindtap="checkInToday">
42   - <text class="iconfont icon-rili"></text>{{!dateArr[day-1].isCheckIn ? '立即签到':'今日已签到'}}
  42 + <view class="btn-container" wx:if="{{res}}">
  43 + <view class="btn" bindtap="checkInToday" wx:if="{{isLogin}}">
  44 + <text class="iconfont icon-rili"></text>{{!myUtil.setDate_is_act(year, res.sday3, 0,res.qddaylist) ? '立即签到':'今日已签到'}}
43 45 </view>
44   - <view class="btn" wx:if="{{res.curbqdaynum}}" bindtap="reCheckIn"><text class="iconfont icon-buqian"></text>补签(-10分)</view>
  46 + <view class="btn" bindtap="isLogin" wx:else>
  47 + <text class="iconfont icon-rili"></text>签到请登录
  48 + </view>
  49 + <view class="btn" wx:if="{{res.curbqdaynum}}" bindtap="reCheckIn"><text class="iconfont icon-buqian"></text>补签(-{{res.getBQIntegral}}分)</view>
45 50 </view>
46 51  
47 52  
48 53 <!-- <view class="current">
49 54 <view class="f-vc">当前连续签到:<text class="days fs34">{{res.getlxnum}}</text> 天</view>
50 55 <view class="f-vc">当前积分:<text class="fs34">{{integral}}</text></view>
51   - </view> -->
52   -
  56 + </view> -->
53 57 <!-- <view class="goleft iconfont icon-jianzuo" bindtap="prevMonth">a</view> -->
54 58  
55 59 <view class="calendar-container">
56 60 <view class="calendar-wrapper">
57 61 <view class="calendar-title">
58 62 <view>{{year}}年{{month}}月</view>
59   - <view class="fs24" style="color:#999;">补签卡:{{res.getkbqnum}}</view>
  63 + <!-- 有补签,才要补签卡 -->
  64 + <view wx:if="{{res.getkbqnum}}" class="fs24" style="color:#999;font-weight:bold">补签卡:{{res.getkbqnum}}</view>
60 65 </view>
61 66 <view class="calendar">
62 67 <!-- <view class="selectDate"> -->
... ... @@ -73,7 +78,7 @@
73 78 <view class="date">
74 79 <block wx:for="{{dateArr}}" wx:for-index="index" wx:for-item="item" wx:key="key">
75 80 <!-- <view style="{{index ==0?'margin-left:calc(100%/7 * ' + firstDay + ');':''}}width:calc(100%/7);line-height:80rpx;" class="{{index+1==day?'today':''}} {{index+1==day&&isClock?'clockOn':''}}" ><view class="day">{{item}}</view></view> -->
76   - <view style="{{index ==0?'margin-left:calc(100%/7 * ' + firstDay + ');':''}}width:calc(100%/7);line-height:80rpx;" class="{{item.isCheckIn ? 'active':''}} {{res.curbqdaynum&&item.isBq ? 'bq':''}}" bindtap="clickDay" data-day="{{item.num}}">
  81 + <view style="{{index ==0?'margin-left:calc(100%/7 * 0);':''}}width:calc(100%/7);line-height:80rpx;" class="{{item.isCheckIn ? 'active':''}} {{res.curbqdaynum&&item.isBq ? 'bq':''}}" bindtap="clickDay" data-day="{{item.num}}">
77 82 <view class="day">{{item.num}}</view>
78 83 </view>
79 84 </block>
... ... @@ -103,7 +108,7 @@
103 108 <view class="popup-wrapper">
104 109 <view class="popup">
105 110 <view class="popup-title">签到规则</view>
106   - <view class="popup-content">1.每日签到领积分</view>
  111 + <view class="popup-content">{{res.qdrules}}</view>
107 112 </view>
108 113 <view class="popup-close">
109 114 <text class="btn-close" bindtap="showRules">X</text>
... ...
packageA/pages/checkin/checkin.wxs
1 1 var myUtil = {
2   - setDate: function(year, startDate, num) {
  2 + setDate_is_act: function(year, startDate, num,qdlist) {
3 3 var date = getDate(year + '-' + startDate);
4 4 date.setDate(date.getDate() + num);
5 5 date = getDate(date).getDate();
6   - return date;
  6 + if(date<10) date="0"+date;
  7 + if(!qdlist) return false;
  8 + if(qdlist.indexOf(date)!=-1){
  9 + return true
  10 + }
  11 + return false;
7 12 },
8 13  
9   - // dateDiff: function(firstDate,secondDate) {
10   - // var firstDate = new Date(firstDate);
11   - // var secondDate = new Date(secondDate);
12   - // var diff = Math.abs(firstDate.getTime() - secondDate.getTime());
13   - // var result = parseInt(diff / (1000 * 60 * 60 * 24));
14   - // return result;
15   - // },
  14 + setDate:function(year, startDate, num){
  15 + var date = getDate(year + '-' + startDate);
  16 + date.setDate(date.getDate() + num);
  17 + date = getDate(date).getDate();
  18 + return date;
  19 + }
16 20 };
17 21  
18 22 module.exports = {
19 23 setDate: myUtil.setDate,
  24 + setDate_is_act: myUtil.setDate_is_act,
20 25 };
21 26 \ No newline at end of file
... ...
packageA/pages/checkin/checkin.wxss
... ... @@ -25,8 +25,8 @@ page,
25 25 background-color: #FFBC47;
26 26 color: #333;
27 27 font-size: 26rpx;
28   - border-top-right-radius: 25rpx;
29   - border-bottom-right-radius: 25rpx;
  28 + border-top-left-radius: 25rpx;
  29 + border-bottom-left-radius: 25rpx;
30 30 display: flex;
31 31 align-items: center;
32 32 padding-right: 20rpx;
... ... @@ -34,7 +34,7 @@ page,
34 34 }
35 35 .rule {
36 36 padding: 10rpx 20rpx;
37   - color: #FFBC47;
  37 + color: white;
38 38 font-size: 26rpx;
39 39 }
40 40  
... ...
packageA/pages/hongBao/hongBao.js 0 → 100644
  1 +// packageA//pages/hongBao/hongBao.js
  2 +const app = getApp();
  3 +let self = null;
  4 +
  5 +let ut = require("../../../utils/util.js")
  6 +
  7 +Page({
  8 +
  9 + /**
  10 + * 页面的初始数据
  11 + */
  12 + data: {
  13 + url: app.globalData.setting.imghost,
  14 + qiangHongBao: false,
  15 + qianging: false,
  16 + time: null,
  17 +
  18 + // hongBaoData: null, //保存抢红包活动的相关时间等信息
  19 + isStart: 0, //记录抢红包活动是否开始
  20 + result: null, //保存抢红包的结果
  21 + },
  22 +
  23 + /**
  24 + * 生命周期函数--监听页面加载
  25 + */
  26 + onLoad: function (options) {
  27 + console.log('onload');
  28 + self = this;
  29 +
  30 + this.isLogin()
  31 + .then(function(data) {
  32 +
  33 + self.requestData('/api/weshop/redmoney/redConfig/get/'+app.globalData.setting.stoid, {})
  34 + .then(function(data) {
  35 + self.data.hongBaoData = data.data.data;
  36 + self.countDown();
  37 + self.setData({
  38 + storeName: app.globalData.config.store_name
  39 + });
  40 + });
  41 +
  42 + });
  43 + },
  44 +
  45 + // 判断是否授权登录
  46 + isLogin() {
  47 + return new Promise((resolve, reject) => {
  48 + let user_info = app.globalData.userInfo;
  49 + if(user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  50 + wx.navigateTo({
  51 + url: '/pages/togoin/togoin',
  52 + })
  53 + } else {
  54 + resolve();
  55 + };
  56 + });
  57 + },
  58 +
  59 + /**
  60 + * 生命周期函数--监听页面初次渲染完成
  61 + */
  62 + onReady: function () {
  63 + console.log('onready');
  64 +
  65 +
  66 + },
  67 +
  68 + /**
  69 + * 生命周期函数--监听页面显示
  70 + */
  71 + onShow: function () {
  72 + console.log('onshow');
  73 +
  74 +
  75 +
  76 +
  77 + },
  78 +
  79 + /**
  80 + * 生命周期函数--监听页面隐藏
  81 + */
  82 + onHide: function () {
  83 + console.log('onhide');
  84 + },
  85 +
  86 + /**
  87 + * 生命周期函数--监听页面卸载
  88 + */
  89 + onUnload: function () {
  90 +
  91 + },
  92 +
  93 + /**
  94 + * 页面相关事件处理函数--监听用户下拉动作
  95 + */
  96 + onPullDownRefresh: function () {
  97 +
  98 + },
  99 +
  100 + /**
  101 + * 页面上拉触底事件的处理函数
  102 + */
  103 + onReachBottom: function () {
  104 +
  105 + },
  106 +
  107 + /**
  108 + * 用户点击右上角分享
  109 + */
  110 + onShareAppMessage: function () {
  111 +
  112 + },
  113 +
  114 + // 请求数据
  115 + requestData(url, data) {
  116 + return new Promise((resolve, reject) => {
  117 + app.request.promiseGet(url, {data: data})
  118 + .then(res => {
  119 + if(res.data.code == 0) {
  120 + console.log('resolve', res);
  121 + resolve(res);
  122 + } else {
  123 + reject(res);
  124 + };
  125 + })
  126 + });
  127 + },
  128 +
  129 + //秒杀倒计时
  130 + //---小于10的格式化函数----
  131 + timeFormat(param) {
  132 + return param < 10 ? '0' + param : param;
  133 + },
  134 +
  135 + handleTime(time) {
  136 + var day = parseInt(time / (60 * 60 * 24));
  137 + var hou = parseInt(time % (60 * 60 * 24) / 3600);
  138 + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  139 + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  140 + return {
  141 + day: this.timeFormat(day),
  142 + hou: this.timeFormat(hou),
  143 + min: this.timeFormat(min),
  144 + sec: this.timeFormat(sec),
  145 + };
  146 + },
  147 +
  148 + //----秒杀倒计时函数-----
  149 + countDown() {
  150 + // if (!this.data.is_timer) return false;
  151 + var time;
  152 + // 获取当前时间,同时得到活动结束时间数组
  153 + var newTime = ut.gettimestamp();
  154 + // var List = this.data.saleGoods;
  155 + // for (var j = 0; j < List.length; j++) {
  156 + // var endTimeList = List[j];
  157 + // 对结束时间进行处理渲染到页面
  158 + // for (var i = 0; i < endTimeList.length; i++) {
  159 + // var o = endTimeList[i];
  160 + var startTime = this.data.hongBaoData.start_time;
  161 + // var startTime = 1600;
  162 + var endTime = this.data.hongBaoData.end_time;
  163 + // if (o.status == 0) endTime = o.start_time
  164 + var obj = null;
  165 +
  166 + if(startTime - newTime > 0) { //活动还没开始
  167 + this.setData({
  168 + isStart: 0,
  169 + });
  170 + time = startTime - newTime;
  171 + // var day = parseInt(time / (60 * 60 * 24));
  172 + // var hou = parseInt(time % (60 * 60 * 24) / 3600);
  173 + // var min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  174 + // var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  175 + // obj = {
  176 + // day: this.timeFormat(day),
  177 + // hou: this.timeFormat(hou),
  178 + // min: this.timeFormat(min),
  179 + // sec: this.timeFormat(sec),
  180 + // };
  181 +
  182 + obj = this.handleTime(time);
  183 + }
  184 + // 如果活动未结束,对时间进行处理
  185 + if (endTime - newTime > 0) { //活动还没结束
  186 + this.setData({
  187 + isStart: 1,
  188 + });
  189 + time = endTime - newTime;
  190 + // 获取天、时、分、秒
  191 + // var day = parseInt(time / (60 * 60 * 24));
  192 + // var hou = parseInt(time % (60 * 60 * 24) / 3600);
  193 + // var min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  194 + // var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  195 + // obj = {
  196 + // day: this.timeFormat(day),
  197 + // hou: this.timeFormat(hou),
  198 + // min: this.timeFormat(min),
  199 + // sec: this.timeFormat(sec),
  200 + // };
  201 +
  202 + obj = this.handleTime(time);
  203 +
  204 + } else { //活动已经结束
  205 + //活动已结束,全部设置为'00'
  206 + this.setData({
  207 + isStart: 2,
  208 + });
  209 + obj = {
  210 + day: '00',
  211 + hou: '00',
  212 + min: '00',
  213 + sec: '00'
  214 + }
  215 + }
  216 + // var txt = "saleGoods[" + j + "][" + i + "].djs";
  217 + self.setData({
  218 + time: obj,
  219 + });
  220 + // }
  221 +
  222 + // }
  223 + setTimeout(self.countDown, 1000);
  224 + },
  225 +
  226 + qiangHongBao() {
  227 + if(!this.data.qianging) {
  228 + this.data.qianging = true;
  229 + app.request.promisePost('/api/weshop/redmoney/redRecord/saveRecord', {
  230 + data: {
  231 + store_id: app.globalData.setting.stoid,
  232 + user_id: app.globalData.user_id,
  233 + redid: this.data.hongBaoData.id,
  234 + }
  235 + })
  236 + .then(res => {
  237 + // if(res.data.code == 0){
  238 + // // wx.hideLoading();
  239 + // // wx.showToast({
  240 + // // title: '领取成功',
  241 + // // icon: 'success',
  242 + // // duration: 2000
  243 + // // });
  244 + // console.log('请求提交成功',res.data);
  245 +
  246 + // // if(callback) {
  247 + // // callback(res.data.data);
  248 + // // }
  249 + // } else if(res.data.code === -1) {
  250 + // // wx.hideLoading();
  251 + // // wx.showToast({
  252 + // // title: '领取失败:' + res.data.msg,
  253 + // // icon: 'none',
  254 + // // duration: 2000
  255 + // // });
  256 + // // self.setData({
  257 + // // result: res.data
  258 + // // });
  259 +
  260 + // };
  261 + self.setData({
  262 + result: res.data,
  263 + qiangHongBao: true,
  264 + });
  265 + })
  266 + }
  267 +
  268 +
  269 + },
  270 +
  271 + receive() {
  272 + // app.postData('/api/wemd/stafftask/saveGuideTaskListGive', {
  273 + // store_id: app.globalData.userInfo.store_id,
  274 + // StaffId: _this.data.StaffId,
  275 + // Id: _this.data.details.Id,
  276 + // TaskType: _this.data.details.TaskType,
  277 + // });
  278 +
  279 + // postData(url, data, callback) {
  280 + wx.showLoading({
  281 + title: '奖励领取中'
  282 + });
  283 + app.request.promisePost('/api/wemd/stafftask/saveGuideTaskListGive', {
  284 + data: {
  285 + store_id: app.globalData.userInfo.store_id,
  286 + StaffId: _this.data.StaffId,
  287 + Id: _this.data.details.Id,
  288 + TaskType: _this.data.details.TaskType,
  289 + }
  290 + })
  291 + .then(res => {
  292 + if(res.data.code == 0){
  293 + wx.hideLoading();
  294 + wx.showToast({
  295 + title: '领取成功',
  296 + icon: 'success',
  297 + duration: 2000
  298 + });
  299 + // console.log('请求提交成功',res.data.data);
  300 + // if(callback) {
  301 + // callback(res.data.data);
  302 + // }
  303 + } else if(res.data.code === -1) {
  304 + wx.hideLoading();
  305 + wx.showToast({
  306 + title: '领取失败:' + res.data.msg,
  307 + icon: 'none',
  308 + duration: 2000
  309 + });
  310 + };
  311 + })
  312 + // },
  313 + },
  314 +
  315 +
  316 + closePopup() {
  317 + this.setData({
  318 + qiangHongBao: false,
  319 + qianging: false,
  320 + });
  321 + },
  322 +
  323 +
  324 + gotoDetails() {
  325 + // this.data.qiangHongBao = false;
  326 + this.setData({
  327 + qiangHongBao: false
  328 + });
  329 + app.goto('/packageA/pages/hongBaoDetails/hongBaoDetails?redid=' + this.data.hongBaoData.id);
  330 + },
  331 +
  332 +
  333 +})
0 334 \ No newline at end of file
... ...
packageA/pages/hongBao/hongBao.json 0 → 100644
  1 +{
  2 + "usingComponents": {},
  3 + "enablePullDownRefresh": false,
  4 + "navigationBarTitleText": "抢红包"
  5 +}
0 6 \ No newline at end of file
... ...
packageA/pages/hongBao/hongBao.wxml 0 → 100644
  1 +<!--packageA//pages/hongBao/hongBao.wxml-->
  2 +<view class="hongBao-container">
  3 + <view class="white fs26">由{{storeName}}发起抢红包</view>
  4 + <view class="btn-container">
  5 + <image src="{{url + 'miniapp/images/redmoney/redbag_btn.png'}}" class="btn" mode="aspectFit" bindtap="qiangHongBao"></image>
  6 + </view>
  7 + <view class="countdown-container">
  8 + <view class="countdown-txt">{{isStart == 0 ? '距离活动开始还有':(isStart == 1 ? '距离活动结束还有':'活动已经结束')}}</view>
  9 + <view class="countdown">
  10 + <view class="countdown-item">{{time.day}}天</view>
  11 + <view class="countdown-item">{{time.hou}}时</view>
  12 + <view class="countdown-item">{{time.min}}分</view>
  13 + <view class="countdown-item">{{time.sec}}秒</view>
  14 + </view>
  15 + </view>
  16 +</view>
  17 +
  18 +<!-- 弹窗 -->
  19 +<view class="popup-container" wx:if="{{qiangHongBao}}" bindtap="closePopup">
  20 + <view class="popup">
  21 + <block wx:if="{{result.code == 0}}">
  22 + <image src="{{url + 'miniapp/images/redmoney/hbtit.png'}}" mode="aspectFit"></image>
  23 + <view class="amount-container">
  24 + <view class="amount">¥{{result.data.redmoney}}</view>
  25 + <view class="btn-receive" catchtap="gotoDetails" data-redid="{{hongBaoData.id}}">
  26 + <image src="{{url + 'miniapp/images/redmoney/srhb.png'}}" class="btn-img"></image>
  27 + </view>
  28 + </view>
  29 + </block>
  30 +
  31 + <block wx:if="{{result.code == -1}}">
  32 + <image src="{{url + 'miniapp/images/redmoney/hbtit2.png'}}" mode="aspectFit"></image>
  33 + <!-- <view class="none">来晚了,红包已抢空~</view> -->
  34 + <view class="none">{{result.msg}}</view>
  35 + <view class="see" catchtap="gotoDetails" data-redid="{{hongBaoData.id}}">看看大家的手气 ></view>
  36 + </block>
  37 + </view>
  38 +</view>
  39 +
  40 +<!-- 弹窗 -->
  41 +<!-- <view class="popup-container">
  42 + <view class="popup">
  43 + <image src="{{url + 'miniapp/images/redmoney/hbtit2.png'}}" mode="aspectFit"></image>
  44 + <view class="none">来晚了,红包已抢空~</view>
  45 + <view class="see">看看大家的手气 ></view>
  46 + </view>
  47 +</view> -->
... ...
packageA/pages/hongBao/hongBao.wxss 0 → 100644
  1 +/* packageA//pages/hongBao/hongBao.wxss */
  2 +page {
  3 + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/hongbao_bg.jpg') center top;
  4 + background-size: 100% auto;
  5 +}
  6 +
  7 +.hongBao-container {
  8 + padding: 20rpx;
  9 +}
  10 +
  11 +.btn-container {
  12 + padding-top: 60rpx;
  13 + padding-bottom: 60rpx;
  14 + -webkit-animation: free_download 600ms linear alternate infinite;
  15 + animation: free_download 600ms linear alternate infinite;
  16 +}
  17 +
  18 +@-webkit-keyframes free_download{
  19 + 0% {-webkit-transform:scale(0.9);}
  20 + 100% {-webkit-transform:scale(1.1);}
  21 +}
  22 +
  23 +@keyframes free_download{
  24 + 0% {transform:scale(0.9);}
  25 + 100% {transform:scale(1.1);}
  26 +}
  27 +
  28 +.countdown-container {
  29 + position: fixed;
  30 + left: 0;
  31 + bottom: 0;
  32 + width: 100%;
  33 + height: 688rpx;
  34 + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/indexbot.png') no-repeat left bottom;
  35 + background-size: 100% auto;
  36 + text-align: center;
  37 +}
  38 +
  39 +.countdown {
  40 + display: flex;
  41 + justify-content: space-around;
  42 + padding: 200rpx 160rpx 0;
  43 +}
  44 +
  45 +.countdown-item {
  46 + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/timebox.png') no-repeat;
  47 + background-size: 100% 100%;
  48 + width: 90rpx;
  49 + height: 100rpx;
  50 + line-height: 120rpx;
  51 + color: white;
  52 +}
  53 +
  54 +.btn {
  55 + width: 100%;
  56 + height: 400rpx;
  57 +}
  58 +
  59 +.countdown-txt {
  60 + color: #ff6768;
  61 + text-align: center;
  62 + padding-top: 120rpx;
  63 + font-size: 36rpx;
  64 + font-weight: bold;
  65 +}
  66 +
  67 +.popup-container {
  68 + position: fixed;
  69 + width: 100%;
  70 + height: 100%;
  71 + top: 0;
  72 + background-color: rgba(0,0,0,.7);
  73 +}
  74 +
  75 +.popup {
  76 + position: relative;
  77 + top: 50%;
  78 + left: 50%;
  79 + transform: translate(-50%, -50%);
  80 + text-align: center;
  81 +}
  82 +
  83 +
  84 +.btn-img {
  85 + width: 200rpx;
  86 + height: 50rpx;
  87 +}
  88 +
  89 +.amount-container {
  90 + position: absolute;
  91 + left: 50%;
  92 + top: 50%;
  93 + transform: translateX(-55%);
  94 +}
  95 +
  96 +.amount {
  97 + color: #fff005;
  98 + font-size: 68rpx;
  99 + text-align: center;
  100 + padding-top: 10rpx;
  101 + padding-bottom: 20rpx;
  102 +}
  103 +
  104 +
  105 +
  106 +.none,
  107 +.see {
  108 + position: absolute;
  109 + font-size: 26rpx;
  110 + color: white;
  111 + left: 50%;
  112 + transform: translateX(-60%);
  113 +}
  114 +
  115 +.none {
  116 + font-size: 20rpx;
  117 + top: 36%;
  118 + margin-left: 55rpx;
  119 +}
  120 +
  121 +.see {
  122 + top: 82%;
  123 + left: 50%;
  124 + transform: translateX(-58%);
  125 +}
  126 +
  127 +.late {
  128 + font-size: 38;
  129 + color: #fff005;
  130 + padding-top: 40rpx;
  131 +}
0 132 \ No newline at end of file
... ...
packageA/pages/hongBaoDetails/hongBaoDetails.js 0 → 100644
  1 +// packageA//pages/hongBao/hongBao.js
  2 +const app = getApp();
  3 +let reqData = {};
  4 +let _this = null;
  5 +
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: app.globalData.setting.imghost,
  13 + list: null,
  14 + isLoading: false, // 检测是否已经发送请求,防止重复发送请求
  15 + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
  16 + pageNum: 1, // 当前页数
  17 + },
  18 +
  19 + /**
  20 + * 生命周期函数--监听页面加载
  21 + */
  22 + onLoad: function (options) {
  23 + _this = this;
  24 + console.log('options', options);
  25 +
  26 + this.isLogin()
  27 + .then(function(data) {
  28 +
  29 + _this.data.options = options;
  30 + reqData.url = '/api/weshop/redmoney/redRecord/page',
  31 + reqData.data = {
  32 + store_id: app.globalData.setting.stoid,
  33 + redid: _this.data.options.redid,
  34 + };
  35 + reqData.data2 = {
  36 + store_id: app.globalData.setting.stoid,
  37 + user_id: app.globalData.user_id,
  38 + redid: _this.data.options.redid,
  39 + pageSize: 1,
  40 + page: 1,
  41 + };
  42 + _this.getData(true, reqData.url, reqData.data);
  43 + _this.requestData(reqData.url, reqData.data2)
  44 + .then(function(data) {
  45 + _this.setData({
  46 + myRed: data.data.data.pageData[0]
  47 + });
  48 + // console.log('123', data.data.data.pageData[0]);
  49 + });
  50 +
  51 + });
  52 +
  53 +
  54 + },
  55 +
  56 + /**
  57 + * 生命周期函数--监听页面初次渲染完成
  58 + */
  59 + onReady: function () {
  60 +
  61 + },
  62 +
  63 + /**
  64 + * 生命周期函数--监听页面显示
  65 + */
  66 + onShow: function () {
  67 +
  68 + },
  69 +
  70 + /**
  71 + * 生命周期函数--监听页面隐藏
  72 + */
  73 + onHide: function () {
  74 +
  75 + },
  76 +
  77 + /**
  78 + * 生命周期函数--监听页面卸载
  79 + */
  80 + onUnload: function () {
  81 +
  82 + },
  83 +
  84 + /**
  85 + * 页面相关事件处理函数--监听用户下拉动作
  86 + */
  87 + onPullDownRefresh: function () {
  88 +
  89 + },
  90 +
  91 + /**
  92 + * 页面上拉触底事件的处理函数
  93 + */
  94 + onReachBottom: function () {
  95 + this.scrollToLower(reqData.url, reqData.data);
  96 + },
  97 +
  98 + /**
  99 + * 用户点击右上角分享
  100 + */
  101 + onShareAppMessage: function () {
  102 +
  103 + },
  104 +
  105 + // 判断是否授权登录
  106 + isLogin() {
  107 + return new Promise((resolve, reject) => {
  108 + let user_info = app.globalData.userInfo;
  109 + if(user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  110 + wx.navigateTo({
  111 + url: '/pages/togoin/togoin',
  112 + })
  113 + } else {
  114 + resolve();
  115 + };
  116 + });
  117 + },
  118 +
  119 + // 请求数据
  120 + requestData(url, data) {
  121 + return new Promise((resolve, reject) => {
  122 + app.request.promiseGet(url, {data: data})
  123 + .then(res => {
  124 + if(res.data.code == 0) {
  125 + console.log('resolve', res);
  126 + resolve(res);
  127 + } else {
  128 + reject(res);
  129 + };
  130 + })
  131 + });
  132 + },
  133 +
  134 +
  135 +
  136 + // 上拉加载请求数据
  137 + getData: function(isInit, url, data) {
  138 + wx.showLoading({
  139 + title: '加载中',
  140 + })
  141 + this.requestData(url, data)
  142 + .then(function(res) {
  143 + wx.hideLoading();
  144 + console.log('res--->', res);
  145 + _this.setData({
  146 + isLoading: false
  147 + });
  148 +
  149 + if(isInit) {// 第一次加载
  150 + _this.setData({
  151 + list: res.data.data
  152 + });
  153 + } else {
  154 +
  155 + _this.setData({
  156 + 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData)
  157 + });
  158 + };
  159 +
  160 + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) {
  161 + _this.setData({
  162 + noMore: true
  163 + });
  164 + };
  165 +
  166 + })
  167 + .catch(function(reason) {
  168 + wx.hideLoading();
  169 + wx.showToast({
  170 + title: reason.data.msg,
  171 + icon: 'none',
  172 + duration: 2000
  173 + })
  174 + _this.setData({
  175 + 'list.pageData': []
  176 + });
  177 + });
  178 + },
  179 +
  180 +
  181 + // 上拉加载
  182 + scrollToLower(url, requestData, callback) {
  183 + // 页面数据
  184 + // let pageData = this.data.list.pageData;
  185 + // 数据总量
  186 + let total = this.data.list.total;
  187 + // 单页最大数据量
  188 + let pageSize = this.data.list.pageSize;
  189 + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’
  190 + if((total != 0)&&(total <= pageSize)) {
  191 + this.setData({
  192 + noMore: true
  193 + });
  194 + };
  195 +
  196 + if(!this.data.isLoading && !this.data.noMore) {
  197 + this.setData({
  198 + isLoading: true,
  199 + pageNum: this.data.pageNum + 1
  200 + });
  201 + requestData.page = this.data.pageNum;
  202 + this.getData(false, url, requestData);
  203 + };
  204 + },
  205 +
  206 +
  207 +
  208 +})
0 209 \ No newline at end of file
... ...
packageA/pages/hongBaoDetails/hongBaoDetails.json 0 → 100644
  1 +{
  2 + "usingComponents": {
  3 + "nodata": "/components/nodata/nodata",
  4 + "nav_box": "/components/nav_box/nav_box"
  5 + },
  6 + "enablePullDownRefresh": false,
  7 + "navigationBarTitleText": "抢红包"
  8 +}
0 9 \ No newline at end of file
... ...
packageA/pages/hongBaoDetails/hongBaoDetails.wxml 0 → 100644
  1 +<!--packageA//pages/hongBao/hongBao.wxml-->
  2 +<wxs module="filter" src="../../../utils/filter.wxs"></wxs>
  3 +<view class="hongBao-container">
  4 + <!-- <view class="white fs26">由美得得美妆商城发起抢红包</view> -->
  5 + <view class="btn-container">
  6 + <image src="{{url + 'miniapp/images/redmoney/redbag_pro.png'}}" class="btn" mode="aspectFit"></image>
  7 + <view class="amount">¥{{filter.show_default(myRed.redmoney, '0.00')}}</view>
  8 + </view>
  9 + <view class="list-container">
  10 + <!-- <view class="countdown-txt">获奖名单</view> -->
  11 + <image src="{{url + 'miniapp/images/redmoney/listit.png'}}" class="list-img" mode=""></image>
  12 + <view class="list">
  13 + <view class="list-item" wx:for="{{list.pageData}}">
  14 + <view class="flex ai-center">
  15 + <view class="avatar-container">
  16 + <image src="{{item.userimg}}" class="avatar"></image>
  17 + </view>
  18 + <view>
  19 + <view>{{item.vipname}}</view>
  20 + <view class="xc-ash fs24 pdt20">{{filter.format_time(item.addtime, 1)}}</view>
  21 + </view>
  22 + </view>
  23 + <view class="co-red">¥{{item.redmoney}}</view>
  24 + </view>
  25 + <nodata nodataContainer="txt-center" wx:if="{{list.pageData.length == 0}}"></nodata>
  26 + <!-- <view class="list-item">
  27 + <view class="flex ai-center">
  28 + <view class="avatar-container">
  29 + <image src="../../images/wx2.png" class="avatar"></image>
  30 + </view>
  31 + <view>
  32 + <view>good</view>
  33 + <view class="xc-ash fs24 pdt20">2020-12-12 18:00:00</view>
  34 + </view>
  35 + </view>
  36 + <view class="co-red">¥100.00</view>
  37 + </view> -->
  38 + <!-- <view class="countdown-item">50天</view>
  39 + <view class="countdown-item">9时</view>
  40 + <view class="countdown-item">23分</view>
  41 + <view class="countdown-item">43秒</view> -->
  42 + </view>
  43 + </view>
  44 + <view class="nodata" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 没有更多了 -</view>
  45 + <!-- <view class="no-more txt-center" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 没有更多了 -</view> -->
  46 +</view>
  47 +
  48 +<nav_box></nav_box>
  49 +
  50 +<!-- 弹窗 -->
  51 +<!-- <view class="popup-container">
  52 + <view class="popup">
  53 + <image src="{{url + 'miniapp/images/redmoney/hbtit.png'}}" mode="aspectFit"></image>
  54 + <view class="amount-container">
  55 + <view class="amount">0.53</view>
  56 + <view class="btn-receive">
  57 + <image src="{{url + 'miniapp/images/redmoney/srhb.png'}}" class="btn-img"></image>
  58 + </view>
  59 + </view>
  60 + </view>
  61 +</view> -->
  62 +
  63 +<!-- 弹窗 -->
  64 +<!-- <view class="popup-container">
  65 + <view class="popup">
  66 + <image src="{{url + 'miniapp/images/redmoney/hbtit2.png'}}" mode="aspectFit"></image>
  67 + <view class="none">来晚了,红包已抢空~</view>
  68 + <view class="see">看看大家的手气 ></view>
  69 + </view>
  70 +</view> -->
... ...
packageA/pages/hongBaoDetails/hongBaoDetails.wxss 0 → 100644
  1 +/* packageA//pages/hongBao/hongBao.wxss */
  2 +page {
  3 + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/hongbao_bg.jpg') center top;
  4 + background-size: 100% auto;
  5 +}
  6 +
  7 +.hongBao-container {
  8 + padding: 20rpx;
  9 +}
  10 +
  11 +.btn-container {
  12 + padding-top: 60rpx;
  13 + /* padding-bottom: 60rpx; */
  14 + /* transform:scale(1.2); */
  15 + position: relative;
  16 + /* -webkit-animation: free_download 600ms linear alternate infinite;
  17 + animation: free_download 600ms linear alternate infinite; */
  18 +}
  19 +
  20 +/* @-webkit-keyframes free_download{
  21 + 0% {-webkit-transform:scale(0.9);}
  22 + 100% {-webkit-transform:scale(1.1);}
  23 +}
  24 +
  25 +@keyframes free_download{
  26 + 0% {transform:scale(0.9);}
  27 + 100% {transform:scale(1.1);}
  28 +} */
  29 +
  30 +.countdown-container {
  31 + /* position: fixed;
  32 + left: 0;
  33 + bottom: 0;
  34 + width: 100%;
  35 + height: 688rpx;
  36 + background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/indexbot.png') no-repeat left bottom;
  37 + background-size: 100% auto;
  38 + text-align: center; */
  39 +}
  40 +
  41 +.countdown {
  42 + /* display: flex;
  43 + justify-content: space-around;
  44 + padding: 200rpx 160rpx 0; */
  45 +}
  46 +
  47 +.countdown-item {
  48 + /* background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/timebox.png') no-repeat;
  49 + background-size: 100% 100%;
  50 + width: 90rpx;
  51 + height: 100rpx;
  52 + line-height: 120rpx;
  53 + color: white; */
  54 +}
  55 +
  56 +.btn {
  57 + width: 100%;
  58 + height: 400rpx;
  59 + transform: scale(1.1);
  60 +}
  61 +
  62 +.countdown-txt {
  63 + /* color: #ff6768;
  64 + text-align: center;
  65 + padding-top: 120rpx;
  66 + font-size: 36rpx;
  67 + font-weight: bold; */
  68 +}
  69 +
  70 +.popup-container {
  71 + position: fixed;
  72 + width: 100%;
  73 + height: 100%;
  74 + top: 0;
  75 + background-color: rgba(0,0,0,.7);
  76 +}
  77 +
  78 +.popup {
  79 + position: relative;
  80 + top: 50%;
  81 + left: 50%;
  82 + transform: translate(-50%, -50%);
  83 + text-align: center;
  84 +}
  85 +
  86 +
  87 +.btn-img {
  88 + /* width: 200rpx;
  89 + height: 50rpx; */
  90 +}
  91 +
  92 +.amount-container {
  93 + /* position: absolute;
  94 + left: 50%;
  95 + top: 50%;
  96 + transform: translateX(-55%); */
  97 +}
  98 +
  99 +.amount {
  100 + color: #fff005;
  101 + font-size: 60rpx;
  102 + text-align: center;
  103 + position: absolute;
  104 + left: 49%;
  105 + top: 50%;
  106 + transform: translate(-50%);
  107 + padding-top: 30rpx;
  108 + /* padding-top: 10rpx;
  109 + padding-bottom: 20rpx; */
  110 +}
  111 +
  112 +
  113 +
  114 +/* .none,
  115 +.see {
  116 + position: absolute;
  117 + font-size: 26rpx;
  118 + color: white;
  119 + left: 50%;
  120 + transform: translateX(-60%);
  121 +}
  122 +
  123 +.none {
  124 + font-size: 20rpx;
  125 + top: 36%;
  126 + margin-left: 55rpx;
  127 +}
  128 +
  129 +.see {
  130 + top: 82%;
  131 + left: 50%;
  132 + transform: translateX(-58%);
  133 +} */
  134 +
  135 +
  136 +/* .list-container {
  137 + /* background: url('https://mshopimg.yolipai.net/miniapp/images/redmoney/timebox.png') no-repeat;
  138 +} */
  139 +
  140 +.list-container {
  141 + border-radius: 12rpx;
  142 + overflow: hidden;
  143 +}
  144 +
  145 +.list {
  146 + /* position: relative; */
  147 + margin-top: -8rpx;
  148 +}
  149 +
  150 +.list-img {
  151 + width: 100%;
  152 + height: 326rpx;
  153 +}
  154 +
  155 +.list-item {
  156 + display: flex;
  157 + justify-content: space-between;
  158 + align-items: center;
  159 + background-color: white;
  160 + padding: 30rpx 20rpx;
  161 + border-bottom: 2rpx solid #f8f8f8;
  162 +}
  163 +
  164 +.list-item:last-child {
  165 + border-bottom: none;
  166 +}
  167 +
  168 +.avatar-container {
  169 + width: 100rpx;
  170 + height: 100rpx;
  171 + border-radius: 50%;
  172 + overflow: hidden;
  173 + margin-right: 20rpx;
  174 +}
  175 +
  176 +.avatar {
  177 + display: block;
  178 + width: 100%;
  179 + height: 100%;
  180 +}
  181 +
  182 +.nodata {
  183 + color: white;
  184 + font-size: 24rpx;
  185 + text-align: center;
  186 + padding-top: 20rpx;
  187 +}
... ...
packageA/pages/jfbuy/jfbuy.wxml
... ... @@ -43,7 +43,7 @@
43 43 data-errorimg="list2[{{index}}].original_img"></image>
44 44 </view>
45 45 <view class="details">
46   - <view class="ellipsis-2 fs30 name">{{item.goods_name}}</view>
  46 + <view class="ellipsis-2 fs30 name">{{item.name}}</view>
47 47 <view>
48 48 <view class="red">
49 49 <text>{{item.integral}}积分 + ¥{{item.addmoney}}</text>
... ...
packageA/pages/quan/quan.js
... ... @@ -17,6 +17,7 @@ Page({
17 17 currentPage:1, //当前的页码
18 18 share_hidden:1, //-- 分享的按钮隐藏 --
19 19 hiddenPopup:1,
  20 + imghost: oo.imghost,
20 21 },
21 22  
22 23 /**
... ...
packageA/pages/quan/quan.wxml
... ... @@ -29,7 +29,8 @@
29 29 <text wx:if="{{item.starttype==1}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}至</text> <text wx:if="{{item.days>0}}">{{filters.format_time(getcurday+3600*24*item.days)}}</text><text wx:else>不限</text>
30 30 </view>
31 31 </view>
32   - <view class="price">¥<text class="fs40">{{filters.toFix(item.money,2)}}</text></view>
  32 + <view class="price">¥<text class="fs40">{{filters.toFix(item.money,2)}}</text> <image src="{{imghost}}miniapp/images/coupon_img/sharelinke.png" class="sharelink"></image></view>
  33 +
33 34 </view>
34 35 <view class="flex ai-center jc_sb pdt20">
35 36 <view wx:if="{{item.useobjecttype==0}}" class="coupon-ft ellipsis-2 fs28">全场任意产品通用</view>
... ...
packageA/pages/quan/quan.wxss
... ... @@ -507,7 +507,7 @@ radio .wx-radio-input.wx-radio-input-checked::before{
507 507 .active {
508 508 background-color: #f2f2f2;
509 509 }
510   -
  510 +.sharelink{ width: 40rpx; height: 40rpx; padding-left:10rpx;}
511 511  
512 512  
513 513  
... ...
packageA/pages/quan_list/quan_list.js
... ... @@ -52,7 +52,7 @@ Page({
52 52 th.data.loading=1;
53 53 var user_id=getApp().globalData.user_id;
54 54 getApp().request.promiseGet("/api/weshop/prom/coupon/pageCouponList", {
55   - data:{store_id:os.stoid,type:1,pageSize:10,page:th.data.curpage,user_id:user_id}
  55 + data:{store_id:os.stoid,type:1,pageSize:10,page:th.data.curpage,user_id:user_id,is_share:0}
56 56 }).then(res => {
57 57 th.data.loading=0;
58 58 if(res.data.code==0){
... ...
packageA/pages/service_record/service_record.js 0 → 100644
  1 +const app = getApp();
  2 +let _this = null;
  3 +let reqData = {};
  4 +
  5 +Page({
  6 +
  7 + data: {
  8 + list: null,
  9 + isLoading: false, // 检测是否已经发送请求,防止重复发送请求
  10 + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
  11 + pageNum: 1, // 当前页数
  12 +
  13 + startDate: '开始日期',
  14 + endDate: '结束日期',
  15 + },
  16 +
  17 + onLoad: function(t) {
  18 + _this = this;
  19 +
  20 + this.setData({
  21 + currentDate: this.currentDate(),
  22 + });
  23 +
  24 +
  25 +
  26 +
  27 + },
  28 +
  29 + onShow: function() {
  30 + this.isLogin()
  31 + .then(function(data) {
  32 + reqData.url = '/api/weshop/marketing/servicewrite/page';
  33 + reqData.data = {
  34 + storeId: app.globalData.setting.stoid,
  35 + userId: app.globalData.user_id,
  36 + };
  37 + _this.getData(true, reqData.url, reqData.data);
  38 + });
  39 + },
  40 +
  41 +
  42 + onReachBottom: function() {
  43 + this.scrollToLower(reqData.url, reqData.data);
  44 + },
  45 +
  46 + // 判断是否授权登录
  47 + isLogin() {
  48 + return new Promise((resolve, reject) => {
  49 + let user_info = app.globalData.userInfo;
  50 + if(user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  51 + wx.navigateTo({
  52 + url: '/pages/togoin/togoin',
  53 + })
  54 + } else {
  55 + resolve();
  56 + };
  57 + });
  58 + },
  59 +
  60 +
  61 + bindDateChange1: function(e) {
  62 + console.log('picker发送选择改变,携带值为', e.detail.value)
  63 + this.setData({
  64 + startDate: e.detail.value
  65 + })
  66 + },
  67 +
  68 + bindDateChange2: function(e) {
  69 + console.log('picker发送选择改变,携带值为', e.detail.value)
  70 + this.setData({
  71 + endDate: e.detail.value
  72 + })
  73 + },
  74 +
  75 + searchOffline() {
  76 + console.log('执行查询');
  77 +
  78 + let startDate = this.data.startDate;
  79 + let endDate = this.data.endDate;
  80 +
  81 +
  82 +
  83 + if(startDate == '开始日期' || endDate == '结束日期') {
  84 + wx.showToast({
  85 + title: '请选择完整的查询日期!',
  86 + icon: 'none',
  87 + })
  88 + } else if(new Date(startDate) > new Date(endDate)) {
  89 + wx.showToast({
  90 + title: '出错了,开始日期不能晚于结束日期!',
  91 + icon: 'none',
  92 + })
  93 + return;
  94 + } else {
  95 + this.setData({
  96 + list: null,
  97 + isLoading: false, // 检测是否已经发送请求,防止重复发送请求
  98 + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
  99 + pageNum: 1, // 当前页数
  100 + });
  101 +
  102 + reqData.data.BeginDate = startDate;
  103 + reqData.data.EndDate = endDate;
  104 + reqData.data.page = 1;
  105 + this.getData(true, reqData.url, reqData.data);
  106 + };
  107 +
  108 +
  109 + },
  110 +
  111 + currentDate() {
  112 + var now = new Date();
  113 + var year = now.getFullYear(); //年
  114 + var month = now.getMonth() + 1; //月
  115 + var day = now.getDate(); //日
  116 +
  117 + var clock = year + "-";
  118 +
  119 + if(month < 10) month += "0";
  120 + clock += month + "-";
  121 +
  122 + if(day < 10) day += "0";
  123 + clock += day;
  124 +
  125 + // if(hh < 10)
  126 + // clock += "0";
  127 +
  128 + // clock += hh + ":";
  129 + // if (mm < 10) clock += '0';
  130 + // clock += mm + ":";
  131 +
  132 + // if (ss < 10) clock += '0';
  133 + // clock += ss;
  134 + return clock;
  135 + },
  136 +
  137 +
  138 + // 请求数据
  139 + requestData(url, data) {
  140 + return new Promise((resolve, reject) => {
  141 + app.request.promiseGet(url, {data: data})
  142 + .then(res => {
  143 + if(res.data.code == 0) {
  144 + console.log('resolve', res);
  145 + resolve(res);
  146 + } else {
  147 + reject(res);
  148 + };
  149 + })
  150 + });
  151 + },
  152 +
  153 +
  154 + // 上拉加载请求数据
  155 + getData: function(isInit, url, data) {
  156 +
  157 + wx.showLoading({
  158 + title: '加载中',
  159 + });
  160 + this.requestData(url, data).then(function(res) {
  161 +
  162 + wx.hideLoading();
  163 + console.log('res--->', res);
  164 + _this.setData({
  165 + isLoading: false
  166 + });
  167 +
  168 + if(isInit) {// 第一次加载
  169 + _this.setData({
  170 + list: res.data.data
  171 + });
  172 +
  173 + } else {
  174 + _this.setData({
  175 + 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData)
  176 + });
  177 + };
  178 +
  179 + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) {
  180 + _this.setData({
  181 + noMore: true
  182 + });
  183 + };
  184 +
  185 + }).catch(function() {
  186 + wx.hideLoading();
  187 + _this.setData({
  188 + 'list.pageData': []
  189 + });
  190 + });
  191 + // .catch(function(reason) {
  192 + // wx.hideLoading();
  193 + // wx.showToast({
  194 + // title: reason.data.msg,
  195 + // icon: 'none',
  196 + // duration: 2000
  197 + // })
  198 + // _this.setData({
  199 + // 'list.pageData': []
  200 + // });
  201 + // })
  202 + // ;
  203 +
  204 + },
  205 +
  206 +
  207 + // 上拉加载
  208 + scrollToLower(url, requestData, callback) {
  209 + // 页面数据
  210 + // let pageData = this.data.list.pageData;
  211 + // 数据总量
  212 + let total = this.data.list.total;
  213 + // 单页最大数据量
  214 + let pageSize = this.data.list.pageSize;
  215 + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’
  216 + if((total != 0)&&(total <= pageSize)) {
  217 + this.setData({
  218 + noMore: true
  219 + });
  220 + };
  221 +
  222 + if(!this.data.isLoading && !this.data.noMore) {
  223 + this.setData({
  224 + isLoading: true,
  225 + pageNum: this.data.pageNum + 1
  226 + });
  227 + requestData.page = this.data.pageNum;
  228 + this.getData(false, url, requestData);
  229 + };
  230 + },
  231 +
  232 +
  233 +});
0 234 \ No newline at end of file
... ...
packageA/pages/service_record/service_record.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "服务记录",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "nodata": "/components/nodata/nodata"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageA/pages/service_record/service_record.wxml 0 → 100644
  1 +<!--packageA//pages/service_record/service_record.wxml-->
  2 +<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  3 +<view class="container">
  4 + <view class="search-container">
  5 + <view class="flex jc_sb">
  6 + <view class="picker-container flex f1">
  7 + <picker class="picker-date" mode="date" start="2015-01-01" end="{{currentDate}}" bindchange="bindDateChange1">
  8 + <view class="picker">{{startDate}}</view>
  9 + </picker>
  10 + <view class="fs28 pdh10">至</view>
  11 + <picker class="picker-date" mode="date" start="2015-01-01" end="{{currentDate}}" bindchange="bindDateChange2">
  12 + <view class="picker">{{endDate}}</view>
  13 + </picker>
  14 + </view>
  15 + <view class="search-btn search-btn2" bindtap="searchOffline">查询</view>
  16 + </view>
  17 + </view>
  18 +</view>
  19 +
  20 +<view class="offline-container">
  21 + <view class="offline-list">
  22 + <view class="item" wx:for="{{list.pageData}}">
  23 + <view class="subtitle">服务时间:{{item.EffectiveDay}}</view>
  24 + <view>
  25 + <view class="flex">
  26 + <view class="subitem">
  27 + <view class="key">项目名称</view>
  28 + <view class="val">{{item.ProjectName}}</view>
  29 + </view>
  30 + <view class="subitem">
  31 + <view class="key">服务门店</view>
  32 + <view class="val">{{item.StorageName}}</view>
  33 + </view>
  34 + <view class="subitem">
  35 + <view class="key">剩余次数</view>
  36 + <view class="val">{{item.EndQty}}</view>
  37 + </view>
  38 + </view>
  39 + </view>
  40 + </view>
  41 + <!-- 暂无数据 -->
  42 + <nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>
  43 + <!-- 没有更多了 -->
  44 + <view class="no-more t-c" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 没有更多了 -</view>
  45 + </view>
  46 +</view>
  47 +
  48 +
  49 +
... ...
packageA/pages/service_record/service_record.wxss 0 → 100644
  1 +/* 背景色相关 */
  2 +bg-white {
  3 + background-color: white;
  4 +}
  5 +
  6 +/* 外边距相关 */
  7 +mgt12 {
  8 + margin-top: 12rpx;
  9 +}
  10 +
  11 +/* 边框相关 */
  12 +.bdt {
  13 + border-top: 2rpx solid #F6F6F6;
  14 +}
  15 +
  16 +/* 颜色相关 */
  17 +.c-a9{
  18 + color: #A9A9A9;
  19 +}
  20 +.c-9 {
  21 + color: #999;
  22 +}
  23 +
  24 +.c-tb {
  25 + color: #ff5000;
  26 +}
  27 +
  28 +.c-r {
  29 + color: #FF3B3D;
  30 +}
  31 +
  32 +/* 内边距 */
  33 +.pdt20 {
  34 + padding-top: 20rpx;
  35 +}
  36 +
  37 +.bold {
  38 + font-weight: bold;
  39 +}
  40 +
  41 +.f1 {
  42 + flex: 1;
  43 +}
  44 +
  45 +.pdh10 {
  46 + padding-left: 10rpx;
  47 + padding-right: 10rpx;
  48 +}
  49 +
  50 +
  51 +page {
  52 + font-family: microsoft yahei;
  53 + background-color: #F5F5F5;
  54 + height: 100%;
  55 +}
  56 +
  57 +.type-navbar {
  58 + white-space: nowrap;
  59 + display: flex;
  60 + height: 88rpx;
  61 + background-color: #fff;
  62 + justify-content: space-between;
  63 + /* border-top: 2rpx solid #f6f6f6; */
  64 +}
  65 +
  66 +.type-box {
  67 + box-sizing: border-box;
  68 + width: 20%;
  69 + line-height: 88rpx;
  70 + text-align: center;
  71 + display: inline-block;
  72 + overflow: hidden;
  73 +}
  74 +
  75 +.type-navbar-item {
  76 + /* border-bottom: 4rpx solid #fff; */
  77 +}
  78 +
  79 +.type-item-on {
  80 + /* background-color: #FF3B3D; */
  81 + color: #FF3B3D;
  82 + font-weight: bold;
  83 + /* border-bottom: 4rpx solid #ED3036; */
  84 + position: relative;
  85 +}
  86 +.type-item-on:after {
  87 + content: '';
  88 + position: absolute;
  89 + left: 0;
  90 + right: 0;
  91 + bottom: 0;
  92 + width: 40%;
  93 + height: 4rpx;
  94 + background-color: #FF3B3D;
  95 + margin: 0 auto;
  96 +}
  97 +
  98 +.container {
  99 + position: fixed;
  100 + width: 100%;
  101 + top: 0;
  102 + z-index: 4;
  103 + /* position: -webkit-sticky;
  104 + position:sticky;
  105 + top: 0; */
  106 +}
  107 +
  108 +.list-container {
  109 + padding-left: 20rpx;
  110 + padding-right: 20rpx;
  111 + overflow: hidden;
  112 + /* height: calc(100% - 282rpx); */
  113 + padding-top: 282rpx;
  114 +}
  115 +
  116 +.stay_evaluate {
  117 + background-color: white;
  118 + margin-top: 20rpx;
  119 + border-radius: 8rpx;
  120 +}
  121 +
  122 +/* 原 */
  123 +
  124 +.goods-container {
  125 + display: flex;
  126 + justify-content: space-between;
  127 + flex-wrap: wrap;
  128 + box-sizing: content-box;
  129 + padding: 20rpx 0;
  130 +}
  131 +
  132 +.goods-box {
  133 + width: 100%;
  134 + background-color: #fff;
  135 + padding: 0 25rpx;
  136 + margin-bottom: 20rpx;
  137 + font-size: 28rpx;
  138 + border-bottom: 1rpx solid #eee;
  139 + padding-bottom: 25rpx;
  140 +}
  141 +
  142 +.goods-title {
  143 + display: flex;
  144 + justify-content: space-between;
  145 + align-items: center;
  146 + height: 100rpx;
  147 +}
  148 +
  149 +.order-number {
  150 + font-size: 32rpx;
  151 + color: #666;
  152 +}
  153 +
  154 +.pay-status {
  155 + color: #f23030;
  156 +}
  157 +
  158 +.goods-cont {
  159 + padding: 20rpx 0;
  160 + display: flex;
  161 + justify-content: space-between;
  162 + position: relative;
  163 +}
  164 +
  165 +.img-box {
  166 + width: 180rpx;
  167 + height: 180rpx;
  168 +}
  169 +
  170 +.goods-mes {
  171 + width: 490rpx;
  172 +}
  173 +
  174 +.goods-name {
  175 + height: 30rpx;
  176 + margin-bottom: 16rpx;
  177 + overflow: hidden;
  178 + line-height: 30rpx;
  179 + color: #333;
  180 + word-break: keep-all;
  181 + white-space: nowrap;
  182 + text-overflow: ellipsis;
  183 + font-size: 30rpx;
  184 +}
  185 +
  186 +.goods-price {
  187 + color: #f23030;
  188 + padding-bottom: 20rpx;
  189 + font-size: 30rpx;
  190 +}
  191 +
  192 +.goods-num {
  193 + color: #999;
  194 + font-size: 30rpx;
  195 +}
  196 +
  197 +.goods-tips {
  198 + height: 60rpx;
  199 + padding: 10rpx 0;
  200 + display: flex;
  201 + justify-content: space-between;
  202 + align-items: center;
  203 +}
  204 +
  205 +.order-total {
  206 + display: flex;
  207 + justify-content: flex-end;
  208 + padding-top: 24rpx;
  209 + padding-bottom: 24rpx;
  210 +}
  211 +
  212 +.goods-total {
  213 + margin-right: 20rpx;
  214 +}
  215 +
  216 +.order-btn {
  217 + width: 150rpx;
  218 + height: 50rpx;
  219 + line-height: 50rpx;
  220 + text-align: center;
  221 + /* border: 1px solid #eee; */
  222 + margin-left: 10rpx;
  223 + /* float: right; */
  224 + border-radius: 6rpx;
  225 + overflow: hidden;
  226 + background-color: #FF3B3D;
  227 +}
  228 +
  229 +.order-btn-pay {
  230 + color: #fff;
  231 + background-color: #f23030;
  232 + border-color: #f23030;
  233 +}
  234 +
  235 +.return-btn.co-red {
  236 + color: #e02e24;
  237 +}
  238 +
  239 +.check-btn {
  240 + margin-bottom: 20rpx;
  241 +}
  242 +
  243 +/* 新 */
  244 +
  245 +
  246 +.Commodity_number {
  247 + height: 80rpx;
  248 + color: #696969;
  249 + /* border-top: 13rpx solid rgb(245, 245, 245); */
  250 +}
  251 +
  252 +.Commodity_number .lin {
  253 + border-right: 1rpx solid #C4182E;
  254 + margin: 0rpx 11rpx; width: 2rpx;
  255 + height: 31rpx;
  256 +}
  257 +
  258 +.Commodity_number image {
  259 + width: 30rpx;
  260 + height: 30rpx;
  261 +}
  262 +
  263 +.padding {
  264 + padding: 0 18rpx;
  265 +}
  266 +
  267 +/* 文字基线对齐 */
  268 +
  269 +.baseline {
  270 + align-items: baseline;
  271 +}
  272 +
  273 +.border_bottom {
  274 + border-bottom: 2rpx solid rgb(245, 245, 245);
  275 +}
  276 +
  277 +/* 单个商品框架 */
  278 +
  279 +.detail_commodity {
  280 + height: 231rpx;
  281 +}
  282 +
  283 +.detail_commodity image {
  284 + display: block;
  285 + /* width: 186rpx;
  286 + height: 186rpx; */
  287 + width: 100%;
  288 + height: 100%;
  289 +}
  290 +
  291 +.detail_commodity .goods_name {
  292 + width: 485rpx;
  293 + /* height: 75rpx; */
  294 + line-height: 37rpx;
  295 + text-align: justify;
  296 +}
  297 +
  298 +.Commodity_content {
  299 + height: 185rpx;
  300 + margin-left: 21rpx;
  301 +}
  302 +
  303 +.Commodity_content .Commodity_goods {
  304 + height: 150rpx;
  305 +}
  306 +
  307 +.Commodity_content .Commodity_money {
  308 + font-size: 16rpx;
  309 + letter-spacing: 1rpx;
  310 +}
  311 +
  312 +/* 商品评价按钮框架 */
  313 +
  314 +.commodity_evaluate {
  315 + /* padding-top: 15rpx;
  316 + padding-bottom: 15rpx; */
  317 + /* border-bottom: 4rpx solid rgb(245, 245, 245); */
  318 +}
  319 +
  320 +.commodity_evaluate .commodity_smy .commodity_money {
  321 + margin-left: 29rpx;
  322 + letter-spacing: 1rpx;
  323 + /* font-weight: bold; */
  324 +
  325 +}
  326 +
  327 +.commodity_evaluate .links {
  328 + /* height: 92rpx; */
  329 + /* height: auto; */
  330 + padding-top: 20rpx;
  331 + padding-bottom: 20rpx;
  332 + border-top: 2rpx solid #F6F6F6;
  333 + display: flex;
  334 + align-items: center;
  335 +}
  336 +
  337 +.commodity_evaluate .commodity_To_evaluate {
  338 + width: 155rpx;
  339 + height: 48rpx;
  340 + border-radius: 6rpx;
  341 + line-height: 48rpx;
  342 + /* margin-bottom: 10rpx; */
  343 +}
  344 +
  345 +.commodity_evaluate .commodity_To_evaluate view {
  346 + height: 39rpx;
  347 + line-height: 39rpx;
  348 +}
  349 +
  350 +.commodity_evaluate .comment_go {
  351 + /* background-color: rgb(211, 28, 52); */
  352 + background-color: #FF3B3D;
  353 + color: white;
  354 + margin-left: 18rpx;
  355 + width: 155rpx;
  356 + height: 48rpx;
  357 + line-height: 48rpx;
  358 +}
  359 +
  360 +.Commodity_spec {
  361 + height: 37rpx;
  362 + line-height: 37rpx;
  363 + max-width: 160rpx;
  364 + background-color: rgb(236, 236, 236);
  365 + border-radius: 6rpx;
  366 + font-size: 22rpx;
  367 + margin-top: 10rpx;
  368 + padding:0rpx 10rpx;
  369 +}
  370 +
  371 +.Commodity_evaluation .Comment_content {
  372 + color: rgb(153, 153, 153);
  373 + letter-spacing: 1rpx;
  374 +}
  375 +
  376 +.Commodity_evaluation .starss {
  377 + height: 58rpx;
  378 + /* // line-height: 58rpx; */
  379 + align-items: center;
  380 +}
  381 +
  382 +.Commodity_evaluation .commen {
  383 + height: 58rpx;
  384 + line-height: 58rpx;
  385 +}
  386 +
  387 +.Commodity_evaluation .starss .stars {
  388 + line-height: 58rpx;
  389 +}
  390 +
  391 +.Commodity_evaluation .starss .stars image {
  392 + width: 29rpx;
  393 + height: 26rpx;
  394 + margin-right: 5rpx;
  395 +}
  396 +
  397 +.Commodity_evaluation .Comment_images image {
  398 + width: 100rpx;
  399 + height: 100rpx;
  400 + margin-right: 8rpx;
  401 + margin-top: 18rpx;
  402 + border-radius: 6rpx;
  403 + border: 3rpx solid rgb(245, 245, 245);
  404 +}
  405 +
  406 +.commodity_evaluate .View_evaluation {
  407 + border: 1px solid #E5E5E5;
  408 + color: rgb(0, 0, 0);
  409 + background-color: rgb(255, 255, 255);
  410 + margin-left: 18rpx;
  411 +}
  412 +
  413 +.comment_addtime {
  414 + height: 50rpx;
  415 +}
  416 +
  417 +.title_width {
  418 + width: 146rpx;
  419 + text-align: center;
  420 +}
  421 +
  422 +.After_all {
  423 + height: 80rpx;
  424 + background-color: rgb(245, 245, 245);
  425 +}
  426 +
  427 +.After_all .Line {
  428 + border-top: 1rpx solid rgb(0, 0, 0);
  429 + width: 130rpx;
  430 +}
  431 +
  432 +.After_all .end {
  433 + margin: 0rpx 15rpx;
  434 + color: #ccc;
  435 +}
  436 +
  437 +/* 无订单 */
  438 +
  439 +.empty_order image {
  440 + width: 292rpx;
  441 + height: 268rpx;
  442 + margin-top: 202rpx;
  443 +}
  444 +
  445 +.empty_order .xc-ash {
  446 + margin-top: 10rpx;
  447 + font-weight: 600px;
  448 +}
  449 +
  450 +.empty_order navigator {
  451 + margin-top: 60rpx;
  452 + border-radius: 40rpx;
  453 +}
  454 +
  455 +.empty_order navigator view {
  456 + width: 247rpx;
  457 + height: 60rpx;
  458 + line-height: 60rpx;
  459 + background-color: rgb(255, 72, 72);
  460 + border-radius: 8rpx;
  461 +}
  462 +
  463 +.rel {
  464 + box-sizing: border-box;
  465 + width: 180rpx;
  466 + height: 180rpx;
  467 + overflow: hidden;
  468 + /* border: 2rpx solid rgb(236, 236, 236); */
  469 +}
  470 +
  471 +.abs {
  472 + top: 15rpx;
  473 + left: -39rpx;
  474 + width: 154rpx;
  475 + height: 40rpx;
  476 + background-color: rgb(214, 1, 33);
  477 + transform: rotate(320deg);
  478 + color: rgb(255, 255, 255);
  479 + line-height: 40rpx;
  480 +}
  481 +.code{
  482 + width: 44rpx;
  483 + height: 44rpx;
  484 +}
  485 +.refund{
  486 + margin-top: 20rpx;
  487 +}
  488 +
  489 +.tab-container {
  490 + display: flex;
  491 + justify-content: space-between;
  492 + text-align: center;
  493 + font-size: 28rpx;
  494 + border-bottom: 2rpx solid #f2f2f2;
  495 +}
  496 +.tab-container .iconfont {
  497 + margin-right: 10rpx;
  498 +}
  499 +.tab {
  500 + flex: 1;
  501 + line-height: 80rpx;
  502 + background-color: white;
  503 + position: relative;
  504 +}
  505 +.tab.active {
  506 + color: #FF3B3D;
  507 + font-weight: bold;
  508 +}
  509 +.tab.active::after {
  510 + content: '';
  511 + position: absolute;
  512 + left: 0;
  513 + right: 0;
  514 + bottom: 0;
  515 + width: 50%;
  516 + height: 2px;
  517 + margin: 0 auto;
  518 + background-color: #FF3B3D;
  519 +}
  520 +.search-container {
  521 + /* display: flex; */
  522 + padding: 10px;
  523 + background-color: white;
  524 +}
  525 +.search-input {
  526 + background-color: #f2f2f2;
  527 + flex: 1;
  528 + border-radius: 4px 0 0 4px;
  529 + height: 70rpx;
  530 + line-height: 70rpx;
  531 + font-size: 14px;
  532 + padding: 0 10px;
  533 +}
  534 +.search-btn {
  535 + color: white;
  536 + font-size: 14px;
  537 + background-color: #FF3B3D;
  538 + padding: 8px 20px;
  539 + border-radius: 0 4px 4px 0;
  540 +}
  541 +.picker-container {
  542 + padding-right: 10rpx;
  543 + align-items: center;
  544 +
  545 +}
  546 +.picker-date {
  547 + background-color: #f5f5f5;
  548 + flex: 1;
  549 + border-radius: 10rpx;
  550 +}
  551 +/* .picker-date:before {
  552 + font-family: iconfont;
  553 + content: '\e64c';
  554 +} */
  555 +.picker {
  556 + color: #ccc;
  557 + line-height: 70rpx;
  558 + font-size: 26rpx;
  559 + position: relative;
  560 + padding-left: 70rpx;
  561 +}
  562 +
  563 +.picker:before {
  564 + position: absolute;
  565 + font-family: iconfont;
  566 + content: '\e64c';
  567 + left: 30rpx;
  568 +}
  569 +
  570 +.list2 {
  571 + padding-left: 18rpx;
  572 + padding-right: 18rpx;
  573 +}
  574 +.title {
  575 + padding: 20rpx;
  576 + font-size: 26rpx;
  577 + display: flex;
  578 + align-items: center;
  579 +}
  580 +.icon-order {
  581 + font-size: 26rpx;
  582 + color: #FF3B3D;
  583 + margin-right: 10rpx;
  584 +}
  585 +.subtitle {
  586 + display: flex;
  587 + font-size: 24rpx;
  588 + justify-content: space-between;
  589 + background-color: #f0f0f0;
  590 + line-height: 60rpx;
  591 + padding: 0 20rpx;
  592 + color: #999;
  593 +}
  594 +.item {
  595 + background-color: white;
  596 + border-radius: 16rpx;
  597 + margin-top: 20rpx;
  598 + overflow: hidden;
  599 +}
  600 +.subitem {
  601 + width: calc(100% / 3);
  602 + text-align: center;
  603 + font-size: 26rpx;
  604 +}
  605 +.name {
  606 + padding: 0 20rpx;
  607 + margin: 20rpx 0;
  608 + font-size: 26rpx;
  609 + word-break: break-all;
  610 + text-align: justify;
  611 +}
  612 +.key {
  613 + padding: 20rpx 0;
  614 + color: #999;
  615 +}
  616 +.val {
  617 + padding-bottom: 20rpx;
  618 + color: red;
  619 +}
  620 +
  621 +.offline-container {
  622 + padding: 106rpx 20rpx 20rpx;
  623 +}
  624 +
  625 +.search-btn2 {
  626 + border-top-left-radius: 8rpx;
  627 + border-bottom-left-radius: 8rpx;
  628 +}
  629 +
  630 +
  631 +.no-more {
  632 + font-size: 28rpx;
  633 + line-height: 3;
  634 + color: #909090;
  635 +}
  636 +
  637 +
  638 +
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -249,7 +249,7 @@ Page({
249 249 bind_bnerr2: function(e) {
250 250 var _errImg = e.target.dataset.errorimg;
251 251 var _errObj = {};
252   - _errObj[_errImg] = "/public/images/empty.jpg";
  252 + _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
253 253 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
254 254 },
255 255 goto: function(e) {
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxml
... ... @@ -24,7 +24,10 @@
24 24 <view class="content_box">
25 25 <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''">
26 26 <view class="content_box_img">
27   - <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  27 + <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}"
  28 + data-errorimg="wareCard[{{index}}].cover_img"></image>
  29 + <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else
  30 + data-errorimg="wareCard[{{index}}].lbUrl"></image>
28 31 </view>
29 32 <view class="content_box_title">
30 33 <view class="content_ware_title">
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxss
... ... @@ -84,7 +84,7 @@ page {
84 84 }
85 85  
86 86 .content_box_img image {
87   - width: 100%;
  87 + width: 230rpx;
88 88 height: 230rpx;
89 89 }
90 90  
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -129,7 +129,7 @@ Page({
129 129 bind_bnerr2: function(e) {
130 130 var _errImg = e.target.dataset.errorimg;
131 131 var _errObj = {};
132   - _errObj[_errImg] = "/public/images/empty.jpg";
  132 + _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
133 133 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
134 134  
135 135 },
... ...
pages/giftpack/mygiftpack/mygiftpack.wxml
... ... @@ -26,7 +26,9 @@
26 26 <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}">
27 27 <view class="content_box_img">
28 28 <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> -->
29   - <image src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  29 + <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image>
  30 + <image wx:else src="{{iurl+item.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].lbUrl"></image>
  31 +
30 32 <block wx:if="{{item.actType!=0}}">
31 33 <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}">
32 34 <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}" lazy-load="true"></image>
... ...
pages/giftpack/mygiftpack/mygiftpack.wxss
... ... @@ -80,7 +80,7 @@
80 80 }
81 81  
82 82 .content_box_img image {
83   - width: 100%;
  83 + width: 230rpx;
84 84 height: 230rpx;
85 85 }
86 86  
... ...
pages/goods/goodsInfo/buy_integral.wxml
... ... @@ -26,7 +26,7 @@
26 26 <!-- 选择门店模块 -->
27 27 <view class="flex-space-between address ai_end xc-width ">
28 28  
29   - <view class="flex ai_end" wx:if="{{def_pick_store}}">
  29 + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
30 30 <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
31 31 <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}">
32 32 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
... ... @@ -53,7 +53,7 @@
53 53 </block>
54 54 </block>
55 55  
56   - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view>
  56 + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view>
57 57  
58 58  
59 59 <!--商品的属性项目-->
... ...
pages/goods/goodsInfo/buy_integral_normal.wxml
... ... @@ -28,7 +28,7 @@
28 28 <!-- 选择门店模块 -->
29 29 <view class="flex-space-between address ai_end xc-width ">
30 30  
31   - <view class="flex ai_end" wx:if="{{def_pick_store}}">
  31 + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
32 32 <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
33 33 <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}">
34 34 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
... ... @@ -54,7 +54,7 @@
54 54 <view wx:if="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view>
55 55 </block>
56 56 </block>
57   - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view>
  57 + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view>
58 58  
59 59  
60 60 <!--商品的属性项目-->
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -492,9 +492,8 @@ Page({
492 492 })
493 493 }
494 494 }
495   -
496 495 }, 500)
497   - },1500)
  496 + },700)
498 497  
499 498 });
500 499  
... ... @@ -2075,8 +2074,9 @@ Page({
2075 2074  
2076 2075 var timer_get = setInterval(function() {
2077 2076 if (th.data.is_get_local_ok == 0) return false;
2078   - var dd = null,
2079   - i = getApp().request;
  2077 + var dd = null,i = getApp().request;
  2078 + if (!th.data.sele_g) return false;
  2079 +
2080 2080 var g_distr_type = th.data.sele_g.distr_type;
2081 2081 if (g_distr_type != 0) {
2082 2082 dd = {
... ... @@ -2160,9 +2160,12 @@ Page({
2160 2160  
2161 2161 },
2162 2162  
  2163 +
2163 2164 //------------处理门店---------------
2164 2165 deal_pickup(e){
2165 2166 var th=this;
  2167 + if(!th.data.sele_g) return false
  2168 +
2166 2169 var g_distr_type=th.data.sele_g.distr_type;
2167 2170 wx.hideLoading();
2168 2171  
... ... @@ -2323,6 +2326,8 @@ Page({
2323 2326 //------------处理线下门店库存--------
2324 2327 deal_pickup_dline(e){
2325 2328 var pkno=[],th=this;
  2329 + if(!th.data.sele_g) return false;
  2330 +
2326 2331 if(this.data.def_pick_store){
2327 2332 pkno.push(this.data.def_pick_store.pickup_no);
2328 2333 }
... ... @@ -2698,6 +2703,7 @@ Page({
2698 2703 }else{
2699 2704 ee.setData({prom_type: 0, isshow: 1,});
2700 2705 ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2706 + ee.get_sto();
2701 2707 return false;
2702 2708 }
2703 2709 })
... ... @@ -4596,8 +4602,8 @@ Page({
4596 4602  
4597 4603 getApp().request.put('/api/weshop/users/update', {
4598 4604 data: {
4599   - user_id,
4600   - def_pickup_id
  4605 + user_id:user_id,
  4606 + def_pickup_id:def_pickup_id
4601 4607 },
4602 4608 success: function(res) {
4603 4609 if (res.data.code == 0) {
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -433,7 +433,7 @@
433 433 </view>
434 434 </view>
435 435  
436   - <view wx:if="{{def_pick_store}}">
  436 + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
437 437 <view class="flex-space-between address ai_end ">
438 438 <view>
439 439 <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
... ... @@ -1031,7 +1031,7 @@
1031 1031 <!-- 选择门店模块 -->
1032 1032 <view class="flex-space-between address ai_end xc-width ">
1033 1033  
1034   - <view class="flex ai_end" wx:if="{{def_pick_store}}">
  1034 + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
1035 1035 <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
1036 1036 <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}">
1037 1037 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
... ... @@ -1058,7 +1058,7 @@
1058 1058 </block>
1059 1059 </block>
1060 1060  
1061   - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store}}">地址:{{def_pick_store.fulladdress}}</view>
  1061 + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view>
1062 1062 </view>
1063 1063  
1064 1064 <!--商品的属性项目-->
... ...
pages/index/index/index.js
... ... @@ -75,6 +75,8 @@ Page({
75 75 new_nav: "", //新人页面跳转地址
76 76 w_holiday_pop:0,
77 77  
  78 + showHongbao: true,
  79 + showHongbaoSmall: false,
78 80 },
79 81  
80 82 onLoad: async function(tt) {
... ... @@ -94,7 +96,27 @@ Page({
94 96 }
95 97 })
96 98 }
97   -
  99 +
  100 + // 判断是否有红包活动
  101 + getApp().request.promiseGet('/api/weshop/redmoney/redConfig/get/'+getApp().globalData.setting.stoid, {
  102 + data: {}
  103 + }).then(function(data) {
  104 + // console.log('909090909090----->', data.data.code);
  105 + let code = data.data.code;
  106 + if(code == 0) {
  107 +
  108 + th.setData({
  109 + showHongbao: true,
  110 + });
  111 + } else if(code == -1) {
  112 + th.setData({
  113 + showHongbao: false,
  114 + });
  115 + };
  116 + });
  117 +
  118 +
  119 + // console.log(9090909);
98 120  
99 121  
100 122 //看一下商家是否开通了权益
... ... @@ -184,8 +206,7 @@ Page({
184 206 }
185 207 })
186 208  
187   -
188   -
  209 +
189 210 },
190 211 //关闭新用户领取广告
191 212 close_disgraceful: function() {
... ... @@ -205,7 +226,18 @@ Page({
205 226 getApp().requestCardNum(this);
206 227 }
207 228  
208   - var th = this
  229 + var th = this
  230 + var show=getApp().globalData.isLoad_ad;
  231 + var userInfo=getApp().globalData.userInfo;
  232 + //有加载过一次首页,就显示.或者有会员就显示
  233 + if(show || userInfo || getApp().globalData.user_id){
  234 + var full_screen = th.selectComponent("#full_screen"); //组件的id
  235 + full_screen.get_the_full_screen();
  236 + }else{
  237 + getApp().globalData.isLoad_ad=1;
  238 + }
  239 +
  240 +
209 241 },
210 242 //当隐藏的时候就关闭计时器
211 243 onHide: function() {
... ... @@ -251,6 +283,7 @@ Page({
251 283 }
252 284 })
253 285  
  286 +
254 287  
255 288 //--首页的问题--
256 289 if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) {
... ... @@ -261,7 +294,10 @@ Page({
261 294 wx.setNavigationBarTitle({
262 295 title: getApp().globalData.setting.appName,
263 296 });
264   - }
  297 + };
  298 +
  299 +
  300 +
265 301 },
266 302 //---读取数据内容---
267 303 async init_fir() {
... ... @@ -273,21 +309,24 @@ Page({
273 309 enabled: 1
274 310 }
275 311 }).then(res => {
276   - var a = res.data.data.pageData;
277   - var arr = new Array();
278   - for (var i = 0; i < a.length; i++) {
279   - var tt = {
280   - 'ad_code': o.imghost + a[i].ad_code,
281   - 'media_link': '',
282   - 'ad_weapplink':a[i].ad_weapplink
283   - };
284   - arr.push(tt);
285   - }
286   - if (arr.length > 0) e.setData({
287   - banner: arr,
288   - });
  312 +
  313 + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
  314 + var a = res.data.data.pageData;
  315 + var arr = new Array();
  316 + for (var i = 0; i < a.length; i++) {
  317 + var tt = {
  318 + 'ad_code': o.imghost + a[i].ad_code,
  319 + 'media_link': '',
  320 + 'ad_weapplink':a[i].ad_weapplink
  321 + };
  322 + arr.push(tt);
  323 + }
  324 + if (arr.length > 0) e.setData({
  325 + banner: arr,
  326 + });
289 327  
290   - wx.stopPullDownRefresh();
  328 + wx.stopPullDownRefresh();
  329 + }
291 330 })
292 331  
293 332 //-----秒杀-----
... ... @@ -875,10 +914,16 @@ Page({
875 914  
876 915 //导航跳转
877 916 nav_goto:function(e){
878   - var url=e.currentTarget.dataset.url;
879   - if(!url || url=='') return;
880   - if(url[0]!='/') url='/'+url;
881   - getApp().goto(url);
  917 + var url=e.currentTarget.dataset.url;
  918 + if(!url || url=='') return;
  919 + if(url[0]!='/') url='/'+url;
  920 + getApp().goto(url);
  921 + if(this.data.showHongbao) {
  922 + this.setData({
  923 + showHongbao: false,
  924 + showHongbaoSmall: true, //显示抢红包小图标
  925 + });
  926 + }
882 927 },
883 928  
884 929 //----跳转到搭配购买----
... ... @@ -898,6 +943,14 @@ Page({
898 943 title: '首页-' + getApp().globalData.config.store_name,
899 944 }
900 945 },
901   -
  946 +
  947 +
  948 + // 关闭首页抢红包主弹窗,显示侧边栏抢红包小图标
  949 + closeHongbao() {
  950 + this.setData({
  951 + showHongbao: false, //关闭抢红包主弹窗
  952 + showHongbaoSmall: true, //显示抢红包小图标
  953 + });
  954 + },
902 955  
903 956 });
904 957 \ No newline at end of file
... ...
pages/index/index/index.json
... ... @@ -17,7 +17,8 @@
17 17 "picMax": "/components/diy_picMax/diy_picMax",
18 18 "mvideo": "/components/diy_video/diy_video",
19 19 "service": "/components/diy_service/diy_service",
20   - "scan": "/components/diy_scan/diy_scan"
  20 + "scan": "/components/diy_scan/diy_scan",
  21 + "full_screen": "/components/full_screen/full_screen"
21 22 },
22 23 "enablePullDownRefresh": false
23 24 }
24 25 \ No newline at end of file
... ...
pages/index/index/index.wxml
... ... @@ -287,8 +287,11 @@
287 287 <!-- 商品列表 -->
288 288  
289 289 </view>
  290 +
  291 +
290 292  
291 293 </view>
  294 +
292 295 <!--是否是自定义-->
293 296 <view class="container" wx:if="{{isTemplate}}" style="background-color:{{bgcolor_t}}">
294 297 <block wx:for="{{template_arr}}" wx:key="{{index}}">
... ... @@ -377,6 +380,27 @@
377 380 </view>
378 381 </block>
379 382  
  383 +<!-- 抢红包 -->
  384 +<block wx:if="{{showHongbao}}">
  385 + <view class="hongbao-container">
  386 + <view class="hongbao">
  387 + <image src="{{url + 'miniapp/images/redmoney/hongBao.png'}}" class="hongbao-img" bindtap="nav_goto" data-url="/packageA/pages/hongBao/hongBao"/>
  388 + <image src="{{url + 'miniapp/images/redmoney/xlose.png'}}" class="close" bindtap="closeHongbao"/>
  389 + </view>
  390 + </view>
  391 +</block>
  392 +
  393 +
  394 +
  395 +<block wx:if="{{showHongbaoSmall}}">
  396 + <view>
  397 + <image src="{{url + 'miniapp/images/redmoney/hongbao_sm.gif'}}" class="hongbao_sm-img" bindtap="nav_goto" data-url="/packageA/pages/hongBao/hongBao"/>
  398 + </view>
  399 +</block>
  400 +
  401 +<!-- <hongbao id="hongbao" bind:closeHongbao="closeHongbao" wx:if="{{showHongbao}}" url="{{url}}"></hongbao> -->
  402 + <full_screen id="full_screen"></full_screen>
  403 +
380 404  
381 405  
382 406  
... ...
pages/index/index/index.wxss
... ... @@ -925,4 +925,43 @@ page {
925 925 overflow-x: hidden;
926 926 padding-bottom: 120rpx;
927 927 }
928   -.container{ overflow: hidden;}
929 928 \ No newline at end of file
  929 +.container{ overflow: hidden;}
  930 +
  931 +
  932 +.hongbao-container {
  933 + position: fixed;
  934 + width: 100%;
  935 + height: 100%;
  936 + top: 0;
  937 + left: 0;
  938 + background-color: rgba(0,0,0,.5);
  939 + z-index: 999;
  940 +}
  941 +
  942 +.hongbao {
  943 + position: absolute;
  944 + top: 50%;
  945 + left: 50%;
  946 + transform: translate(-50%, -50%);
  947 +}
  948 +
  949 +.hongbao-img {
  950 + width: 440rpx;
  951 + height: 640rpx;
  952 +}
  953 +
  954 +.close {
  955 + position: absolute;
  956 + top: 0;
  957 + right: 0;
  958 +}
  959 +
  960 +.hongbao_sm-img {
  961 + width: 124rpx;
  962 + height: 170rpx;
  963 + position: fixed;
  964 + top: 50%;
  965 + right: 0;
  966 + /* transform: translateY(-50%); */
  967 + z-index: 10000;
  968 +}
930 969 \ No newline at end of file
... ...
pages/user/coupons/coupons.wxml
... ... @@ -63,7 +63,7 @@
63 63 <view wx:else>
64 64 <view class="text">有效期:不限</view>
65 65 </view>
66   - <view wx:if="{{detail.Remark}}" class="textss">{{detail.Remark}}</view>
  66 + <view wx:if="{{detail.Remark1}}" class="textss"> {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark1}}</view>
67 67 <view wx:else class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
68 68 </view>
69 69  
... ...
pages/user/coupons/query/index.wxml
... ... @@ -102,7 +102,8 @@
102 102 <view wx:else>
103 103 <view class="text">有效期: 不限</view>
104 104 </view>
105   - <view class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{detail.UseObjectID==null || detail.UseObjectID==''?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
  105 + <view wx:if="{{detail.Remark1}}" class="textss"> {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}}</view>
  106 + <view wx:else class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
106 107 </view>
107 108 </view>
108 109 </view>
... ...
pages/user/coupons/query/index.wxss
... ... @@ -350,7 +350,8 @@ color:#999999;
350 350 font-size: 25rpx;
351 351 text-align: center;
352 352  
353   - height: 47rpx;
  353 + min-height: 47rpx;
  354 + height:auto;
354 355 color: #999999;
355 356 }
356 357  
... ...
utils/auth.js
... ... @@ -48,6 +48,7 @@ module.exports = {
48 48 console.log("thirdLogin");
49 49 console.log(e);
50 50 a.request.get("/api/weshop/users/openidandkey", {
  51 + isShowLoading:0,
51 52 data: {
52 53 js_code: e,
53 54 store_id: a.globalData.setting.stoid,
... ... @@ -174,6 +175,7 @@ module.exports = {
174 175 if (app_d.user_id != "" && app_d.user_id != null) {
175 176 var ab = this.app().request;
176 177 ab.get("/api/weshop/users/get/" + oo.stoid + "/" + app_d.user_id, {
  178 + isShowLoading:0,
177 179 success: function (e) {
178 180 app_d.userInfo = e.data.data;
179 181 "function" == typeof t && t(e.data.data);
... ...
utils/filter.wxs
... ... @@ -29,7 +29,7 @@ var filters = {
29 29 var fm = [d.getFullYear(), d.getMonth() + 1, d.getDate()].join('-');
30 30 var md = (d.getMonth() + 1) + '月' + d.getDate() + '日';
31 31 if (isFull == 1)
32   - fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':');
  32 + fm = fm + ' ' + [appendZero(d.getHours()), appendZero(d.getMinutes()), appendZero(d.getSeconds())].join(':');
33 33 if (isFull == 2) {
34 34 fm = md + ' ' + [appendZero(d.getHours()), appendZero(d.getMinutes())].join(':');
35 35 }
... ... @@ -55,7 +55,30 @@ var filters = {
55 55 return spec + "/" + color;
56 56 }
57 57 }
58   - }
  58 + },
  59 +
  60 +
  61 + show_default: function (value, placeholder, multiple) {
  62 + if(typeof value === 'number') {
  63 + if(isNaN(value) || value === 0) {
  64 + return placeholder || '0';
  65 + } else {
  66 + if(multiple) {
  67 + return value / multiple;
  68 + } else {
  69 + return value;
  70 + }
  71 + };
  72 + } else if(value === '' || value === undefined || value === null) {
  73 + return placeholder || '-';
  74 + } else {
  75 + return value;
  76 + }
  77 + },
  78 +
  79 +
  80 +
  81 +
59 82 };
60 83  
61 84 module.exports = {
... ... @@ -65,4 +88,5 @@ module.exports = {
65 88 format_time: filters.format_time,
66 89 pInt: filters.pInt,
67 90 show_gui_ge: filters.show_gui_ge,
  91 + show_default: filters.show_default,
68 92 }
69 93 \ No newline at end of file
... ...