Commit 3b8d99173f8335b53aa7ccf926d12edd9bf31bdd

Authored by 后端研发-苏明海
2 parents 707f21a9 2cf88516

Merge branch 'test' into 'qa'

Test

See merge request !655
components/diy_advertising/diy_advertising.js
... ... @@ -18,6 +18,23 @@ Component({
18 18 someData: {},
19 19 max_sw_height:260,
20 20 },
  21 +
  22 + ready: function () {
  23 + var data_arr=this.properties.object.data;
  24 + var is_show=0;
  25 + for(var i in data_arr){
  26 + var item=data_arr[i];
  27 + var now=new Date();
  28 + if((!item.beg_date || now>new Date(item.beg_date))
  29 + && (!item.end_date || now<new Date(item.end_date)))
  30 + {
  31 + this.setData({is_show:1});
  32 + break;
  33 + }
  34 + }
  35 +
  36 +
  37 + },
21 38 methods: {
22 39  
23 40 customMethod: function () { },
... ...
components/diy_advertising/diy_advertising.wxml
... ... @@ -398,7 +398,7 @@
398 398 </view>
399 399  
400 400 <!--幻灯片-->
401   -<block wx:if='{{object.style==4}}'>
  401 +<block wx:if='{{object.style==4 && is_show}}'>
402 402  
403 403  
404 404 <swiper class="swiper" circular="true" autoplay="{{autoplay}}" current="{{object.sw_index}}"
... ... @@ -409,19 +409,21 @@
409 409 style="height:{{max_sw_height}}rpx" >
410 410 <block wx:for="{{object.data}}" wx:for-index="index" >
411 411  
  412 + <block wx:if="{{(!item.begin_date || g_filter.beg_time(item.begin_date) ) && (!item.end_date || g_filter.end_time(item.end_date) )}}">
412 413 <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
413 414 <swiper-item>
414 415 <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
415   - <view class="title" wx:if="{{title}}">{{item.title}}</view>
  416 + <view class="title" wx:if="{{item.title}}">{{item.title}}</view>
416 417 </swiper-item>
417 418 </navigator>
418 419  
419 420 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" style="height:{{max_sw_height}}rpx" bindtap="go_url" wx:else>
420 421 <swiper-item>
421 422 <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
422   - <view class="title" wx:if="{{title}}">{{item.title}}</view>
  423 + <view class="title" wx:if="{{item.title}}">{{item.title}}</view>
423 424 </swiper-item>
424 425 </view>
  426 + </block>
425 427  
426 428 </block>
427 429 </swiper>
... ...
components/diy_notice/g_filter.wxs
... ... @@ -2,8 +2,28 @@ var g_filters = {
2 2 has_char:function(url,key){
3 3 if(!url) return -1;
4 4 return url.indexOf(key);
  5 + },
  6 + beg_time:function(beg_date){
  7 + var fmt1 = beg_date.substring(0, 19);
  8 + var reg = getRegExp("-", "g");
  9 + var fmt2 = fmt1.replace(reg, '/');
  10 + var t1 = getDate(fmt2);
  11 + var tnow=getDate();
  12 + if(t1<=tnow) return 1;
  13 + return 0;
  14 + },
  15 + end_time:function(end_date){
  16 + var fmt1 = end_date.substring(0, 19);
  17 + var reg = getRegExp("-", "g");
  18 + var fmt2 = fmt1.replace(reg, '/');
  19 + var t1 = getDate(fmt2);
  20 + var tnow=getDate();
  21 + if(t1>=tnow) return 1;
  22 + return 0;
5 23 }
6 24 }
7 25 module.exports = {
8   - has_char: g_filters.has_char
  26 + has_char: g_filters.has_char,
  27 + beg_time: g_filters.beg_time,
  28 + end_time: g_filters.end_time,
9 29 }
10 30 \ No newline at end of file
... ...
components/diy_scan/diy_scan.wxml
1   -<view class="scan_view" disable-scroll="true" bindtap='getScancode' style="top:{{top}}px;left:{{left}}px;" bindtouchmove="setTouchMove">
  1 +<block wx:if="{{object.bg_color}}">
  2 +<view class="scan_view" disable-scroll="true" bindtap='getScancode'
  3 + style="top:{{top}}px;left:{{left}}px; background-color:{{object.bg_color}}; opacity: 0.5 " bindtouchmove="setTouchMove">
2 4 <view style="text-align: center;">
3 5 <image class="cs-img" src="{{object.img}}"></image>
4   - <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view>
  6 + <view class="s_title" wx:if="{{object.title!=''}}">
  7 + <text wx:if="{{object.word_color}}" style="color:{{object.word_color}}">{{object.title}}</text>
  8 + <text wx:else >{{object.title}}</text>
  9 + </view>
5 10 </view>
6 11 </view>
7   -
  12 +</block>
  13 +
  14 +<block wx:else>
  15 +<view class="scan_view" disable-scroll="true" bindtap='getScancode' style="top:{{top}}px;left:{{left}}px;" bindtouchmove="setTouchMove">
  16 + <view style="text-align: center;">
  17 + <image class="cs-img" src="{{object.img}}"></image>
  18 + <view class="s_title" wx:if="{{object.title!=''}}">
  19 + <text wx:if="{{object.word_color}}" style="color:{{object.word_color}}">{{object.title}}</text>
  20 + <text wx:else>{{object.title}}</text>
  21 + </view>
  22 + </view>
  23 +</view>
  24 +</block>
... ...
packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -2166,8 +2166,12 @@ Page({
2166 2166 },
2167 2167  
2168 2168 onShareTimeline() {
  2169 + var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
  2170 + if(!store_name)
  2171 + store_name=getApp().globalData.setting.appName;
  2172 +
2169 2173 return {
2170   - title:this.data.data.goods_name + '-' + getApp().globalData.config.store_name,
  2174 + title:this.data.data.goods_name + '-' + store_name,
2171 2175 imageUrl:this.data.gallery[0].image_url,
2172 2176 }
2173 2177 },
... ...
packageA/pages/goods_share/goods_share.js
... ... @@ -24,7 +24,9 @@ Page({
24 24 dis_switch:0, //-- 分销开关 --
25 25 pattern:0, //-- 分成的方式 --
26 26 share_hidden:1, //-- 分享的按钮隐藏 --
27   - share_good:null //--- 要分享的商品 ---
  27 + share_good:null ,//--- 要分享的商品 ---
  28 +
  29 + is_no_distri:0
28 30 },
29 31 /**
30 32 * 生命周期函数--监听页面加载
... ... @@ -90,17 +92,47 @@ Page({
90 92 }
91 93 });
92 94  
  95 +
  96 + //看有没有开启分销功能
  97 + getApp().promiseGet("/api/weshop/storeDistribut/get/"+os.stoid,{}).then(rs=>{
  98 + var dis=rs.data.data;
  99 + if( dis && dis.switch==0){
  100 + th.setData({is_no_distri:1})
  101 + }
  102 + })
  103 + //看有没有开启分销功能
  104 + getApp().promiseGet("/store/storemoduleendtime/page?store_id=" +os.stoid + "&type=5",{}).then(res=>{
  105 + if(res.data.code==0){
  106 + var arr = res.data.data.pageData;
  107 + if (arr.length > 0) {
  108 + var item=arr[0];
  109 + if(item.is_sy==0){
  110 + var now = Date.parse(new Date());now = now / 1000;
  111 + if(item.end_time<now) th.setData({is_no_distri:1})
  112 + }
  113 + }
  114 + }
  115 + })
  116 +
  117 + if(!app.globalData.userInfo) {
  118 + getApp().goto("/pages/togoin/togoin");
  119 + }
  120 +
  121 +
93 122 },
94 123  
95 124 /*** 生命周期函数--监听页面显示***/
96 125 onShow: function () {
97 126 var th=this;
98 127  
99   -
100   - this.setData({
101   - //用来判断是否是分销商,是分销商才显示分成佣金
102   - is_distribut: app.globalData.userInfo.is_distribut
103   - });
  128 +
  129 + if(app.globalData.userInfo) {
  130 + this.setData({
  131 + //用来判断是否是分销商,是分销商才显示分成佣金
  132 + is_distribut: app.globalData.userInfo.is_distribut
  133 + });
  134 + }
  135 +
104 136  
105 137 getApp().getConfig2(function(rs){
106 138 //计算等级价相关
... ...
packageA/pages/goods_share/goods_share.wxml
... ... @@ -19,12 +19,14 @@
19 19 <view class="title-item" bindtap="sort1">价格<text class="iconfont icon-shang"></text></view>
20 20 </block>
21 21  
  22 + <block wx:if="{{!is_no_distri}}">
22 23 <block wx:if="{{orderField=='commission'}}">
23 24 <view class="title-item" bindtap="sort2">佣金<text class="iconfont {{orderType=='asc'?'icon-shang':'icon-xia'}}"></text></view>
24 25 </block>
25 26 <block wx:else>
26 27 <view class="title-item" bindtap="sort2">佣金<text class="iconfont icon-xia"></text></view>
27 28 </block>
  29 + </block>
28 30  
29 31 <view class="title-item" bindtap='new_sort'>最新</view>
30 32 </view>
... ... @@ -77,7 +79,7 @@
77 79  
78 80 <view class="flex jc_sb fs24 pdt14">
79 81 <view class="gray">已售:<text class="red">{{item.sales_sum}}</text></view>
80   - <view class="gray" wx:if="{{is_distribut}}">分成金额:
  82 + <view class="gray" wx:if="{{is_distribut && !is_no_distri}}">分成金额:
81 83 <text wx:if="{{!pattern}}" class="red">¥{{item.commission}}</text>
82 84 <text wx:else class="red">¥{{item.fir_rate+item.sec_rate+item.thi_rate}}</text>
83 85 </view>
... ...
packageA/pages/goods_share/goods_share.wxss
... ... @@ -40,6 +40,7 @@ page {
40 40 display: flex;
41 41 font-size: 30rpx;
42 42 border-bottom: 2rpx solid #f8f8f8;
  43 + justify-content: space-around;
43 44 }
44 45 .title .iconfont {
45 46 color: #ccc;
... ... @@ -47,7 +48,7 @@ page {
47 48 margin-left: 8rpx;
48 49 }
49 50 .title-item {
50   - width: 25%;
  51 + /* width: 25%; */
51 52 box-sizing: border-box;
52 53 text-align: center;
53 54 padding: 20rpx;
... ...
pages/activity/pind_list/g_filter.wxs 0 → 100644
  1 +var g_filters = {
  2 + has_char:function(url,key){
  3 + if(!url) return -1;
  4 + return url.indexOf(key);
  5 + },
  6 + beg_time:function(beg_date){
  7 + var fmt1 = beg_date.substring(0, 19);
  8 + var reg = getRegExp("-", "g");
  9 + var fmt2 = fmt1.replace(reg, '/');
  10 + var t1 = getDate(fmt2);
  11 + var tnow=getDate();
  12 + if(t1<=tnow) return 1;
  13 + return 0;
  14 + },
  15 + end_time:function(end_date){
  16 + var fmt1 = end_date.substring(0, 19);
  17 + var reg = getRegExp("-", "g");
  18 + var fmt2 = fmt1.replace(reg, '/');
  19 + var t1 = getDate(fmt2);
  20 + var tnow=getDate();
  21 + if(t1>=tnow) return 1;
  22 + return 0;
  23 + }
  24 +}
  25 +module.exports = {
  26 + has_char: g_filters.has_char,
  27 + beg_time: g_filters.beg_time,
  28 + end_time: g_filters.end_time,
  29 +}
0 30 \ No newline at end of file
... ...
pages/activity/pind_list/pind_list.js
... ... @@ -16,6 +16,7 @@ Page({
16 16 isshow:0,
17 17 iurl: os.imghost,
18 18 ad_data:null,
  19 + max_sw_height:200,
19 20 },
20 21  
21 22 //------初始化加载----------
... ... @@ -26,6 +27,7 @@ Page({
26 27  
27 28 console.log("------------");
28 29 console.log(first_leader);
  30 + getApp().getConfig();
29 31  
30 32 if (first_leader) {
31 33 getApp().globalData.first_leader = first_leader;
... ... @@ -44,12 +46,17 @@ Page({
44 46 }).then(res => {
45 47 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
46 48 var a = res.data.data.pageData;
47   - var tt = {
48   - 'ad_code': os.imghost + a[0].ad_code,
49   - 'media_link': '',
50   - 'ad_weapplink':a[0].ad_weapplink
51   - };
52   - th.setData({ad_data:tt});
  49 + var narr=[];
  50 + for(var i in a){
  51 + var tt = {
  52 + 'ad_code': os.imghost + a[i].ad_code,
  53 + 'media_link': '',
  54 + 'ad_weapplink':a[i].ad_weapplink
  55 + };
  56 + narr.push(tt);
  57 + }
  58 +
  59 + th.setData({ad_data:narr});
53 60 }
54 61 })
55 62 },
... ... @@ -201,6 +208,29 @@ Page({
201 208 _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
202 209 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
203 210 }
204   - }
  211 + },
  212 +
  213 + imageLoad:function(e){
  214 + var imgwidth = e.detail.width;
  215 + var imgheight = e.detail.height;
  216 + //宽高比
  217 + var ratio = imgwidth / imgheight;
  218 + //计算的高度值
  219 + var viewHeight = 750 / ratio;
  220 + var hei=this.data.max_sw_height;
  221 +
  222 + if (hei< viewHeight) {
  223 + this.setData({ max_sw_height: viewHeight });
  224 + }
  225 + },
  226 +
  227 + onShareTimeline() {
  228 + var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
  229 + if(!store_name)
  230 + store_name=getApp().globalData.setting.appName;
  231 + return {
  232 + title: '秒杀活动-' + store_name,
  233 + }
  234 + },
205 235  
206 236 });
... ...
pages/activity/pind_list/pind_list.wxml
  1 +<wxs module="g_filter" src="g_filter.wxs"></wxs>
1 2 <view class=" body_frame">
2 3  
3 4 <block wx:if="{{ad_data}}">
4   - <image mode="widthFix" src="{{ad_data.ad_code}}" style="width: 100%;"></image>
  5 + <swiper class="swiper" circular="true"
  6 + indicator-dots="true"
  7 + style="height:{{max_sw_height}}rpx" >
  8 + <block wx:for="{{ad_data}}">
  9 +
  10 + <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}">
  11 + <swiper-item>
  12 + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
  13 + </swiper-item>
  14 + </navigator>
  15 +
  16 + <view data-url="{{item.ad_weapplink}}" class="s1_gk_a1" bindtap="go_url" wx:else>
  17 + <swiper-item>
  18 + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
  19 + </swiper-item>
  20 + </view>
  21 +
  22 + </block>
  23 + </swiper>
5 24 </block>
6 25 <block wx:else>
7 26 <image class="xc-top-img" src="{{url}}/miniapp/images/team.jpg"></image>
... ...
pages/activity/pind_list/pind_list.wxss
... ... @@ -3,7 +3,7 @@ page{
3 3 }
4 4 .kill-list{
5 5 width: 95%;
6   - margin-top: -50rpx;
  6 + margin-top: -10rpx;
7 7 position:absolute;
8 8 left: 2.5%;
9 9  
... ...
pages/activity/seckill_list/g_filter.wxs 0 → 100644
  1 +var g_filters = {
  2 + has_char:function(url,key){
  3 + if(!url) return -1;
  4 + return url.indexOf(key);
  5 + },
  6 + beg_time:function(beg_date){
  7 + var fmt1 = beg_date.substring(0, 19);
  8 + var reg = getRegExp("-", "g");
  9 + var fmt2 = fmt1.replace(reg, '/');
  10 + var t1 = getDate(fmt2);
  11 + var tnow=getDate();
  12 + if(t1<=tnow) return 1;
  13 + return 0;
  14 + },
  15 + end_time:function(end_date){
  16 + var fmt1 = end_date.substring(0, 19);
  17 + var reg = getRegExp("-", "g");
  18 + var fmt2 = fmt1.replace(reg, '/');
  19 + var t1 = getDate(fmt2);
  20 + var tnow=getDate();
  21 + if(t1>=tnow) return 1;
  22 + return 0;
  23 + }
  24 +}
  25 +module.exports = {
  26 + has_char: g_filters.has_char,
  27 + beg_time: g_filters.beg_time,
  28 + end_time: g_filters.end_time,
  29 +}
0 30 \ No newline at end of file
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -12,6 +12,7 @@ Page({
12 12 ismore:1, //是否可以加载更多
13 13 isshow:0,
14 14 ad_data:null,
  15 + max_sw_height:200,
15 16 },
16 17  
17 18 //------初始化加载----------
... ... @@ -22,7 +23,8 @@ Page({
22 23 var th=this;
23 24  
24 25 console.log("------------");
25   - console.log(first_leader);
  26 + console.log(first_leader);
  27 + getApp().getConfig();
26 28  
27 29 if (first_leader) {
28 30 getApp().globalData.first_leader = first_leader;
... ... @@ -41,12 +43,16 @@ Page({
41 43 }).then(res => {
42 44 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
43 45 var a = res.data.data.pageData;
44   - var tt = {
45   - 'ad_code': os.imghost + a[0].ad_code,
46   - 'media_link': '',
47   - 'ad_weapplink':a[0].ad_weapplink
48   - };
49   - th.setData({ad_data:tt});
  46 + var narr=[];
  47 + for(var i in a){
  48 + var tt = {
  49 + 'ad_code': os.imghost + a[i].ad_code,
  50 + 'media_link': '',
  51 + 'ad_weapplink':a[i].ad_weapplink
  52 + };
  53 + narr.push(tt);
  54 + }
  55 + th.setData({ad_data:narr});
50 56 }
51 57 })
52 58  
... ... @@ -199,9 +205,26 @@ Page({
199 205 },
200 206  
201 207 onShareTimeline() {
  208 + var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
  209 + if(!store_name)
  210 + store_name=getApp().globalData.setting.appName;
202 211 return {
203   - title: '秒杀活动-' + getApp().globalData.config.store_name,
  212 + title: '秒杀活动-' + store_name,
204 213 }
205 214 },
  215 +
  216 + imageLoad:function(e){
  217 + var imgwidth = e.detail.width;
  218 + var imgheight = e.detail.height;
  219 + //宽高比
  220 + var ratio = imgwidth / imgheight;
  221 + //计算的高度值
  222 + var viewHeight = 750 / ratio;
  223 + var hei=this.data.max_sw_height;
  224 +
  225 + if (hei< viewHeight) {
  226 + this.setData({ max_sw_height: viewHeight });
  227 + }
  228 + }
206 229  
207 230 });
... ...
pages/activity/seckill_list/seckill_list.wxml
1 1 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2   -
  2 +<wxs module="g_filter" src="g_filter.wxs"></wxs>
3 3 <view class=" body_frame">
4 4  
5 5 <block wx:if="{{ad_data}}">
6   - <image mode="widthFix" src="{{ad_data.ad_code}}" style="width: 100%;"></image>
  6 +
  7 + <swiper class="swiper" circular="true"
  8 + indicator-dots="true"
  9 + style="height:{{max_sw_height}}rpx" >
  10 + <block wx:for="{{ad_data}}">
  11 +
  12 + <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}">
  13 + <swiper-item>
  14 + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
  15 + </swiper-item>
  16 + </navigator>
  17 +
  18 + <view data-url="{{item.ad_weapplink}}" class="s1_gk_a1" bindtap="go_url" wx:else>
  19 + <swiper-item>
  20 + <image src="{{item.ad_code}}" style="width: 100%;" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
  21 + </swiper-item>
  22 + </view>
  23 +
  24 + </block>
  25 + </swiper>
  26 +
  27 +
7 28 </block>
8 29 <block wx:else>
9 30 <image class="xc-top-img" src="{{url}}/miniapp/images/seckill_top_img.jpg"></image>
... ...
pages/activity/seckill_list/seckill_list.wxss
... ... @@ -17,7 +17,7 @@
17 17 /* overflow-y: scroll; */
18 18 }
19 19 .seckill_list{
20   -margin-top: -50rpx;
  20 +margin-top: -10rpx;
21 21 left: 2%;
22 22 }
23 23 .seckill{
... ...
pages/cart/cart/cart.js
... ... @@ -31,6 +31,7 @@ Page({
31 31 btn_click:1,
32 32  
33 33 service_data:null,
  34 + max_sw_height:200,
34 35 },
35 36 onLoad: function() {
36 37 var a = this,ee=a;
... ... @@ -100,12 +101,16 @@ Page({
100 101 }).then(res => {
101 102 if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
102 103 var a = res.data.data.pageData;
103   - var tt = {
104   - 'ad_code': os.imghost + a[0].ad_code,
105   - 'media_link': '',
106   - 'ad_weapplink':a[0].ad_weapplink
107   - };
108   - th.setData({ad_data:tt});
  104 + var narr=[];
  105 + for(var i in a){
  106 + var tt = {
  107 + 'ad_code': os.imghost + a[i].ad_code,
  108 + 'media_link': '',
  109 + 'ad_weapplink':a[i].ad_weapplink
  110 + };
  111 + narr.push(tt);
  112 + }
  113 + th.setData({ad_data:narr});
109 114 }else{
110 115 //--获取是否又秒杀活动--
111 116 getApp().request.promiseGet("/api/ms/flash_sale/spikepage", {
... ... @@ -2038,5 +2043,19 @@ Page({
2038 2043  
2039 2044 refresh_input:function(){
2040 2045 this.data.btn_click=0;
2041   - }
  2046 + },
  2047 +
  2048 + imageLoad:function(e){
  2049 + var imgwidth = e.detail.width;
  2050 + var imgheight = e.detail.height;
  2051 + //宽高比
  2052 + var ratio = imgwidth / imgheight;
  2053 + //计算的高度值
  2054 + var viewHeight = 715 / ratio;
  2055 + var hei=this.data.max_sw_height;
  2056 +
  2057 + if (hei< viewHeight) {
  2058 + this.setData({ max_sw_height: viewHeight });
  2059 + }
  2060 + }
2042 2061 });
2043 2062 \ No newline at end of file
... ...
pages/cart/cart/cart.wxml
  1 +<wxs module="g_filter" src="g_filter.wxs"></wxs>
1 2 <!-- <import src="../../tabbar/tabbar.wxml" />
2 3 <template is="tabBar" data="{{tabBar}}" />
3 4 -->
... ... @@ -7,9 +8,30 @@
7 8 <image mode="widthFix" class="picture" src="{{iurl}}miniapp/images/stores/Seckill.png"></image>
8 9 </navigator>
9 10  
10   -<navigator bindtap="nav_goto" class="picture" data-url="{{ad_data.ad_weapplink}}" wx:if="{{ad_data}}">
11   - <image mode="widthFix" class="picture" src="{{ad_data.ad_code}}"></image>
12   -</navigator>
  11 +<block wx:if="{{ad_data}}">
  12 + <swiper class="swiper" circular="true"
  13 + indicator-dots="true"
  14 + style="height:{{max_sw_height}}rpx" >
  15 + <block wx:for="{{ad_data}}">
  16 +
  17 + <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}">
  18 + <swiper-item>
  19 + <image src="{{item.ad_code}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
  20 + </swiper-item>
  21 + </navigator>
  22 +
  23 + <view data-url="{{item.ad_weapplink}}" class="s1_gk_a1" bindtap="go_url" wx:else>
  24 + <swiper-item>
  25 + <image src="{{item.ad_code}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" lazy-load="true"/>
  26 + </swiper-item>
  27 + </view>
  28 +
  29 + </block>
  30 + </swiper>
  31 +</block>
  32 +
  33 +
  34 +
13 35  
14 36  
15 37  
... ...
pages/cart/cart/cart.wxss
... ... @@ -353,3 +353,12 @@ page {
353 353 .quan_color{ background-color: #ff5306; height: 40rpx;color: #fff; padding: 0 10rpx; border-radius: 10rpx; margin-left: 10rpx}
354 354 .red_c{color:#ff5306}
355 355 .title_show{ margin: 10rpx 0 10px 0;padding: 0 20rpx}
  356 +
  357 +
  358 +.swiper image {
  359 + height: auto;
  360 + width: 100%;
  361 + margin: 0;
  362 + padding: 0;
  363 + vertical-align: top;
  364 +}
... ...
pages/cart/cart/g_filter.wxs 0 → 100644
  1 +var g_filters = {
  2 + has_char:function(url,key){
  3 + if(!url) return -1;
  4 + return url.indexOf(key);
  5 + },
  6 + beg_time:function(beg_date){
  7 + var fmt1 = beg_date.substring(0, 19);
  8 + var reg = getRegExp("-", "g");
  9 + var fmt2 = fmt1.replace(reg, '/');
  10 + var t1 = getDate(fmt2);
  11 + var tnow=getDate();
  12 + if(t1<=tnow) return 1;
  13 + return 0;
  14 + },
  15 + end_time:function(end_date){
  16 + var fmt1 = end_date.substring(0, 19);
  17 + var reg = getRegExp("-", "g");
  18 + var fmt2 = fmt1.replace(reg, '/');
  19 + var t1 = getDate(fmt2);
  20 + var tnow=getDate();
  21 + if(t1>=tnow) return 1;
  22 + return 0;
  23 + }
  24 +}
  25 +module.exports = {
  26 + has_char: g_filters.has_char,
  27 + beg_time: g_filters.beg_time,
  28 + end_time: g_filters.end_time,
  29 +}
0 30 \ No newline at end of file
... ...
pages/cart/cart2/cart2.js
... ... @@ -1118,6 +1118,7 @@ Page({
1118 1118 }
1119 1119 //如果有设置不包邮区商品
1120 1120 if(by_qc.goods_list!="" && by_qc.goods_list!=undefined && by_qc!=null && freight_free>0){
  1121 + freight_free=0;
1121 1122 no_ex_good=by_qc.goods_list;
1122 1123 }
1123 1124 }
... ... @@ -1210,24 +1211,34 @@ Page({
1210 1211 continue;
1211 1212 }
1212 1213  
  1214 +
  1215 + var no_ex_good_arr=null;
  1216 + if(no_ex_good) no_ex_good_arr=no_ex_good.split(',');
  1217 +
1213 1218 //----------------如果是选择了物流---------------------
1214   - if(cart_item.exp_type == 0 && item[j].is_free_shipping==0){
1215   - //如果地址不为空
1216   - if (th.data.user_addr!=null){
1217   - switch (item[j]['exp_sum_type']) {
1218   - case 1:
1219   - //统一运费
1220   - o_shipping_price += item[j]['uniform_exp_sum'];break;
1221   - case 2:
1222   - if (goods_weight < 0) goods_weight = 0;
1223   - //累积商品重量 每种商品的重量 * 数量
1224   - goods_weight += item[j]['weight'] * item[j]['goods_num']; break;
1225   - case 3:
1226   - if (goods_piece < 0) goods_piece = 0;
1227   - //累积商品数量
1228   - goods_piece += item[j]['goods_num'];break;
1229   - }
1230   - }
  1219 + if(cart_item.exp_type == 0 && item[j].is_free_shipping==0 && (!no_ex_good_arr || no_ex_good_arr.indexOf(item[j].goods_id+'')>-1 )){
  1220 +
  1221 +
  1222 + //如果地址不为空
  1223 + if (th.data.user_addr!=null){
  1224 + switch (item[j]['exp_sum_type']) {
  1225 + case 1:
  1226 + //统一运费
  1227 + o_shipping_price += item[j]['uniform_exp_sum'];break;
  1228 + case 2:+''
  1229 + if (goods_weight < 0) goods_weight = 0;
  1230 + //累积商品重量 每种商品的重量 * 数量
  1231 + goods_weight += item[j]['weight'] * item[j]['goods_num'];
  1232 +
  1233 + break;
  1234 + case 3:
  1235 + if (goods_piece < 0) goods_piece = 0;
  1236 + //累积商品数量
  1237 + goods_piece += item[j]['goods_num'];
  1238 + break;
  1239 + }
  1240 + }
  1241 +
1231 1242 }
1232 1243 }
1233 1244  
... ...
pages/distribution/distribution.js
... ... @@ -171,20 +171,33 @@ Page({
171 171 title: "全部满足成为分销商",
172 172 icon: 'none',
173 173 duration: 2000
174   - });
175   - //-- 会员的分销的内容要进行存储 --
176   - app.globalData.userInfo.is_distribut=1;
177   - wx.setStorageSync("userinfo",app.globalData.userInfo);
178   - setTimeout(function(){
179   - self.getDis_data();
180   - self.setData({
181   - userInfo: app.globalData.userInfo,
182   - });
183   - },2000)
  174 + });
  175 +
  176 + if(app.globalData.userInfo) {
  177 + //-- 会员的分销的内容要进行存储 --
  178 + app.globalData.userInfo.is_distribut=1;
  179 + wx.setStorageSync("userinfo",app.globalData.userInfo);
  180 + setTimeout(function(){
  181 + self.getDis_data();
  182 + self.setData({
  183 + userInfo: app.globalData.userInfo,
  184 + });
  185 + },2000)
  186 + }
  187 +
184 188 }
185   - }
186   -
187   -
  189 + }
  190 + else{
  191 + wx.showToast({
  192 + title: res.data.msg,
  193 + icon: 'none',
  194 + duration: 2000
  195 + });
  196 + setTimeout(function(){
  197 + getApp().goto("/pages/user/index/index");
  198 + },1500)
  199 +
  200 + }
188 201  
189 202 }else{
190 203 self.getDis_data()
... ... @@ -284,7 +297,7 @@ Page({
284 297 var txt="fenxiao["+index+"].pass";
285 298 var txt2="data.is_distribut";
286 299 var txt3="userInfo.is_distribut";
287   - getApp().globalData.userInfo.is_distribut=1;
  300 + if(getApp().globalData.userInfo) getApp().globalData.userInfo.is_distribut=1;
288 301  
289 302  
290 303 setTimeout(function(){
... ...
pages/goods/categoryList/categoryList.js
... ... @@ -578,7 +578,7 @@ Page({
578 578 //---------分享配置--------
579 579 onShareAppMessage: function (e) {
580 580  
581   - url="pages/goods/categoryList/categoryList";
  581 + var url="pages/goods/categoryList/categoryList";
582 582 var userInfo=getApp().globalData.userInfo;
583 583 //是分销商才带
584 584 if(userInfo){
... ... @@ -1042,8 +1042,11 @@ Page({
1042 1042 },
1043 1043  
1044 1044 onShareTimeline(){
  1045 + var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
  1046 + if(!store_name)
  1047 + store_name=getApp().globalData.setting.appName;
1045 1048 return {
1046   - title:'商品分类-'+getApp().globalData.config.store_name,
  1049 + title:'商品分类-'+store_name,
1047 1050 }
1048 1051 }
1049 1052  
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -4452,7 +4452,7 @@ Page({
4452 4452 }
4453 4453  
4454 4454 var img_url=ee.data.data.original_img;
4455   - if((this.data.prom_type==1 && this.data.prom_type==6) || this.data.prom_act.share_imgurl){
  4455 + if((this.data.prom_type==1 || this.data.prom_type==6) && this.data.prom_act.share_imgurl){
4456 4456 img_url=this.data.iurl+this.data.prom_act.share_imgurl;
4457 4457 }
4458 4458  
... ... @@ -5233,8 +5233,11 @@ Page({
5233 5233  
5234 5234  
5235 5235 onShareTimeline() {
  5236 + var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
  5237 + if(!store_name)
  5238 + store_name=getApp().globalData.setting.appName;
5236 5239 return {
5237   - title:this.data.data.goods_name + '-' + getApp().globalData.config.store_name,
  5240 + title:this.data.data.goods_name + '-' + store_name,
5238 5241 imageUrl:this.data.gallery[0].image_url,
5239 5242 }
5240 5243 },
... ...
pages/index/index/index.js
... ... @@ -668,7 +668,7 @@ Page({
668 668 }
669 669  
670 670 var ob={
671   - title: getApp().globalData.config.store_name,
  671 + title: title,
672 672 path:url,
673 673 };
674 674 console.log(ob);
... ... @@ -1042,9 +1042,11 @@ Page({
1042 1042 // title: '首页-' + getApp().globalData.config.store_name,
1043 1043 // }
1044 1044 // });
1045   -
  1045 + var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
  1046 + if(!store_name)
  1047 + store_name=getApp().globalData.setting.appName;
1046 1048 return {
1047   - title: '首页-' + getApp().globalData.config.store_name,
  1049 + title: '首页-' + store_name,
1048 1050 }
1049 1051 },
1050 1052  
... ...
pages/user/assistance/assistance.js
... ... @@ -241,8 +241,11 @@ Page({
241 241 },
242 242  
243 243 onShareTimeline() {
  244 + var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
  245 + if(!store_name)
  246 + store_name=getApp().globalData.setting.appName;
244 247 return {
245   - title: '好友助力-' + getApp().globalData.config.store_name,
  248 + title: '好友助力-' + store_name,
246 249 }
247 250 },
248 251  
... ...
pages/user/coupons/coupons.js
... ... @@ -178,37 +178,40 @@ Page({
178 178 data.cashcount = parseInt(data.CashCount);
179 179 getApp().globalData.Integral = data.Integral;
180 180  
181   - getApp().request.promiseGet("/api/weshop/userfeemail/pageAndArea",{data:{user_id: user_id, store_id: os.stoid, pageSize:200}}).then(res=>{
182   - if(res.data.code==0 && res.data.data && res.data.data.total>0 ){
183   - var b_arr=res.data.data.pageData;
184   - var b_can_arr=[]; //未使用
185   - var b_out_arr=[]; //已过期
186   - var b_isuse_arr=[]; //已过期
187   - for(var i in b_arr){
188   - b_arr[i].isby=1;
189   - if(b_arr[i].isuse==0){
190   - if(b_arr[i].use_end_time<=ut.gettimestamp()){
191   - b_out_arr.push(b_arr[i]);
192   - }else{
193   - b_can_arr.push(b_arr[i]);
194   - }
195   -
196   - }else{
197   - b_isuse_arr.push(b_arr[i]);
198   - }
199   - }
200   - data.cashcount= data.cashcount+b_can_arr.length; //加上包邮券的数量
201   - th.data.b_can_arr=b_can_arr; //可使用
202   - th.data.b_out_arr=b_out_arr; //过期
203   - th.data.b_isuse_arr=b_isuse_arr; //已使用
204   - th.setData({ udata: data});
205   - func();s_guoqi();
206   -
207   - }else{
208   - th.setData({ udata: data});
209   - func();s_guoqi();
210   - }
211   - })
  181 + getApp().request.get("/api/weshop/userfeemail/pageAndArea",{
  182 + data:{user_id: user_id, store_id: os.stoid, pageSize:200},
  183 + success:function(res){
  184 + if(res.data.code==0 && res.data.data && res.data.data.total>0 ){
  185 + var b_arr=res.data.data.pageData;
  186 + var b_can_arr=[]; //未使用
  187 + var b_out_arr=[]; //已过期
  188 + var b_isuse_arr=[]; //已过期
  189 + for(var i in b_arr){
  190 + b_arr[i].isby=1;
  191 + if(b_arr[i].isuse==0){
  192 + if(b_arr[i].use_end_time<=ut.gettimestamp()){
  193 + b_out_arr.push(b_arr[i]);
  194 + }else{
  195 + b_can_arr.push(b_arr[i]);
  196 + }
  197 +
  198 + }else{
  199 + b_isuse_arr.push(b_arr[i]);
  200 + }
  201 + }
  202 + data.cashcount= data.cashcount+b_can_arr.length; //加上包邮券的数量
  203 + th.data.b_can_arr=b_can_arr; //可使用
  204 + th.data.b_out_arr=b_out_arr; //过期
  205 + th.data.b_isuse_arr=b_isuse_arr; //已使用
  206 + th.setData({ udata: data});
  207 + func();s_guoqi();
  208 +
  209 + }else{
  210 + th.setData({ udata: data});
  211 + func();s_guoqi();
  212 + }
  213 + }
  214 + })
212 215  
213 216 }
214 217 })
... ... @@ -227,23 +230,21 @@ Page({
227 230 page: 1
228 231 };
229 232  
230   - getApp().request.promiseGet("/api/weshop/users/listQuan", {
231   - data:get_data
232   - }).then(res=>{
233   -
234   - if(res.data.code==0 && res.data){
235   - var a = res.data,val = a.data.total;
236   - var details = a.data.pageData;
237   - if (details.length == 0){
238   - if(th.data.b_out_arr) th.setData({ number: th.data.b_out_arr.length});
239   - return false;
240   - }
241   - var all_length=val;
242   - if(th.data.b_out_arr) all_length+=th.data.b_out_arr.length;
243   - th.setData({ number: all_length});
244   - }
245   -
246   -
  233 + getApp().request.get("/api/weshop/users/listQuan", {
  234 + data:get_data,
  235 + success:function(res){
  236 + if(res.data.code==0 && res.data){
  237 + var a = res.data,val = a.data.total;
  238 + var details = a.data.pageData;
  239 + if (details.length == 0){
  240 + if(th.data.b_out_arr) th.setData({ number: th.data.b_out_arr.length});
  241 + return false;
  242 + }
  243 + var all_length=val;
  244 + if(th.data.b_out_arr) all_length+=th.data.b_out_arr.length;
  245 + th.setData({ number: all_length});
  246 + }
  247 + }
247 248 })
248 249 },
249 250  
... ... @@ -272,47 +273,48 @@ Page({
272 273 if(this.data.b_can_arr) init_num=this.data.b_can_arr.length;
273 274  
274 275 wx.showLoading(); th.data.isloading=1;
275   - getApp().request.promiseGet("/api/weshop/users/listQuan", {
  276 + getApp().request.get("/api/weshop/users/listQuan", {
276 277 data: get_data,
277   - }).then(res => {
278   - th.data.isloading=0;
279   - var a = res.data;
280   - val = a.data.total;
281   - var details = a.data.pageData;
282   - th.setData({isset:1});
283   -
284   - //没有找到优惠券的时候
285   - if (details.length == 0 && th.data.current_page==1) {
286   - this.setData({sheng:0});
287   - getApp().showWarning("未找更多数据");
288   - if(big_arr.length>0) {
289   - th.setData({ details: big_arr, });
290   - th.setData({ val: init_num});
291   - setTimeout(function(){
292   - details=big_arr;
293   - for (var i = 0; i < details.length; i++) {
294   - var no = i + len;
295   - qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
296   - }
297   - },1000)
298   - }
299   - return false;
300   - }
301   -
302   - th.setData({ val: val+init_num });
303   - //数组合并
304   - big_arr=big_arr.concat(details);
305   - //设置数组
306   - th.setData({ details: big_arr, });
307   - //延迟显示二维码的内容
308   - setTimeout(function () {
309   - if(th.data.current_page==1) details=big_arr;
310   - for (var i = 0; i < details.length; i++) {
311   - var no = i + len;
312   - qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
313   - }
314   - wx.hideLoading();
315   - }, 1200)
  278 + success:function(res){
  279 + th.data.isloading=0;
  280 + var a = res.data;
  281 + val = a.data.total;
  282 + var details = a.data.pageData;
  283 + th.setData({isset:1});
  284 +
  285 + //没有找到优惠券的时候
  286 + if (details.length == 0 && th.data.current_page==1) {
  287 + th.setData({sheng:0});
  288 + getApp().showWarning("未找更多数据");
  289 + if(big_arr.length>0) {
  290 + th.setData({ details: big_arr, });
  291 + th.setData({ val: init_num});
  292 + setTimeout(function(){
  293 + details=big_arr;
  294 + for (var i = 0; i < details.length; i++) {
  295 + var no = i + len;
  296 + qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
  297 + }
  298 + },1000)
  299 + }
  300 + return false;
  301 + }
  302 +
  303 + th.setData({ val: val+init_num });
  304 + //数组合并
  305 + big_arr=big_arr.concat(details);
  306 + //设置数组
  307 + th.setData({ details: big_arr, });
  308 + //延迟显示二维码的内容
  309 + setTimeout(function () {
  310 + if(th.data.current_page==1) details=big_arr;
  311 + for (var i = 0; i < details.length; i++) {
  312 + var no = i + len;
  313 + qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
  314 + }
  315 + wx.hideLoading();
  316 + }, 1200)
  317 + }
316 318 })
317 319  
318 320  
... ... @@ -341,54 +343,55 @@ Page({
341 343 if(big_arr.length==0 && this.data.b_out_arr){
342 344 big_arr=this.data.b_out_arr;
343 345 }
344   - init_num=this.data.b_out_arr.length;
  346 + if(this.data.b_out_arr)
  347 + init_num=this.data.b_out_arr.length;
345 348  
346 349  
347 350 wx.showLoading();th.data.isloading=1;
348   - getApp().request.promiseGet("/api/weshop/users/listQuan"
  351 + getApp().request.get("/api/weshop/users/listQuan"
349 352 , {
350 353 data: get_data,
351   - }).then(res => {
352   -
353   - th.data.isloading=0;
354   - var a = res.data;
355   - number = a.data.total;
356   - var details = a.data.pageData;
357   -
358   - if (details.length == 0) {
359   - this.setData({overdue_sheng:0});
360   - getApp().showWarning("未找更多数据");
361   - if( big_arr.length>0 && th.data.current_page==1) {
362   - th.setData({ details: big_arr, });
363   - th.setData({ number: init_num});
364   - setTimeout(function(){
365   - details=big_arr;
366   - for (var i = 0; i < details.length; i++) {
367   - var no = i + len;
368   - qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
369   - }
370   - },1000)
371   -
372   - }
373   - return false;
374   - }
375   -
376   - big_arr=big_arr.concat(details);
377   -
378   - this.setData({
379   - details: big_arr, number:number+init_num,
380   - });
381   -
382   -
383   - setTimeout(function () {
384   - if(th.data.current_page==1) details=big_arr;
385   - for (var i = 0; i < details.length; i++) {
386   - var no = i + len;
387   - qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
388   -
389   - }
390   - wx.hideLoading();
391   - }, 800)
  354 + success:function(res){
  355 + th.data.isloading=0;
  356 + var a = res.data;
  357 + number = a.data.total;
  358 + var details = a.data.pageData;
  359 +
  360 + if (details.length == 0) {
  361 + this.setData({overdue_sheng:0});
  362 + getApp().showWarning("未找更多数据");
  363 + if( big_arr.length>0 && th.data.current_page==1) {
  364 + th.setData({ details: big_arr, });
  365 + th.setData({ number: init_num});
  366 + setTimeout(function(){
  367 + details=big_arr;
  368 + for (var i = 0; i < details.length; i++) {
  369 + var no = i + len;
  370 + qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
  371 + }
  372 + },1000)
  373 +
  374 + }
  375 + return false;
  376 + }
  377 +
  378 + big_arr=big_arr.concat(details);
  379 +
  380 + this.setData({
  381 + details: big_arr, number:number+init_num,
  382 + });
  383 +
  384 +
  385 + setTimeout(function () {
  386 + if(th.data.current_page==1) details=big_arr;
  387 + for (var i = 0; i < details.length; i++) {
  388 + var no = i + len;
  389 + qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no, 460, 460);
  390 +
  391 + }
  392 + wx.hideLoading();
  393 + }, 800)
  394 + }
392 395 })
393 396 },
394 397  
... ...
pages/user/index/index.js
... ... @@ -60,33 +60,36 @@ Page({
60 60 onLoad: function(options) {
61 61 var th=this;
62 62 //-- 读取会员中心按钮列表 --
63   - getApp().request.promiseGet("/api/weshop/userTool/page?pageSize=100", {
64   - }).then(res => {
65   - if(res.data.code==0 ){
66   - var d_list=res.data.data.pageData;
67   - getApp().promiseGet("/api/weshop/storeDistribut/get/"+os.stoid,{}).then(rs=>{
68   - var dis=rs.data.data;
69   - for(var i in d_list){
70   - if(d_list[i].name=='我的分销' && dis && dis.switch==0){
71   - d_list.splice(i,1);
72   - }
73   - }
74   - th.setData({user_tool:d_list});
75   - })
76   - }
77   - })
  63 + getApp().request.get("/api/weshop/userTool/page?pageSize=100", {
  64 + success:function(res){
  65 + if(res.data.code==0 ){
  66 + var d_list=res.data.data.pageData;
  67 + getApp().promiseGet("/api/weshop/storeDistribut/get/"+os.stoid,{}).then(rs=>{
  68 + var dis=rs.data.data;
  69 + for(var i in d_list){
  70 + if(d_list[i].name=='我的分销' && dis && dis.switch==0){
  71 + d_list.splice(i,1);
  72 + }
  73 + }
  74 + th.setData({user_tool:d_list});
  75 + })
  76 + }
  77 + }
  78 + })
78 79 this.birthday();
79   - getApp().request.promiseGet("/api/weshop/ad/page?pid=401&store_id=" + os.stoid, {
  80 + getApp().request.get("/api/weshop/ad/page?pid=401&store_id=" + os.stoid, {
80 81 data: {
81 82 enabled: 1
82   - }
83   - }).then(res => {
84   - if(res.data.code==0 && res.data.data){
85   - var item=res.data.data.pageData[0];
86   - if (item && item.ad_code)
87   - th.setData({ad_img:item.ad_code})
88   - }
89   - })
  83 + },
  84 + success:function(res){
  85 + if(res.data.code==0 && res.data.data){
  86 + var item=res.data.data.pageData[0];
  87 + if (item && item.ad_code) th.setData({ad_img:item.ad_code})
  88 + }
  89 + }
  90 + })
  91 +
  92 +
90 93 app.getUserFir();
91 94  
92 95 },
... ...
pages/user/my_service/hist_service.wxml
... ... @@ -39,7 +39,12 @@
39 39 </view>
40 40 <!-- right -->
41 41 <view class="serState fs32">
42   - <view wx:if="{{item.State==0}}">未服务</view>
  42 + <view wx:if="{{item.State==0}}" >
  43 + <navigator url="/pages/user/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">
  44 + <view>未服务</view>
  45 + <view>更改时间</view>
  46 + </navigator>
  47 + </view>
43 48 <view wx:if="{{item.State==1}}">已服务</view>
44 49 <view wx:if="{{item.State==2}}">已过期</view>
45 50 <view wx:if="{{item.State==3}}">已取消</view>
... ...
pages/user/my_service/hist_service.wxss
... ... @@ -64,6 +64,7 @@ page {
64 64  
65 65 .serState {
66 66 color: rgb(255, 82, 125);
  67 + text-align: right;
67 68 }
68 69  
69 70 .container {
... ...
utils/util.js
... ... @@ -467,6 +467,21 @@ function convert_arr_key(list,key){
467 467 })
468 468 return keyObs;
469 469 }
  470 +
  471 +function ajax_ok(res){
  472 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  473 + return 1;
  474 + }
  475 + return 0;
  476 +}
  477 +function ajax_ok2(res){
  478 + if(res.data.code==0 && res.data.data && res.data.data.length>0){
  479 + return 1;
  480 + }
  481 + return 0;
  482 +}
  483 +
  484 +
470 485 module.exports = {
471 486 formatTime: function(e, r) {
472 487 var t = e ? new Date(1e3 * e) : new Date(), n = t.getFullYear(), o = t.getMonth() + 1, a = t.getDate(), u = t.getHours(), i = t.getMinutes(), f = t.getSeconds(), s = function(e) {
... ... @@ -574,5 +589,7 @@ module.exports = {
574 589 base64_encode:base64_encode, //64位加密
575 590 ob_to_parm:ob_to_parm ,//对象变成参数
576 591 sha1:sha1, //sha1进行签名
577   - convert_arr_key:convert_arr_key //将JS数组对象按其某个键值重组成Map对象
  592 + convert_arr_key:convert_arr_key, //将JS数组对象按其某个键值重组成Map对象
  593 + ajax_ok:ajax_ok, //将JS数组对象按其某个键值重组成Map对象
  594 + ajax_ok2:ajax_ok2 //将JS数组对象按其某个键值重组成Map对象
578 595 };
... ...