Merged
Merge Request #478 · created by 后端研发-苏明海


Dev


From dev into test

Merged by 后端研发-苏明海

1 participants


packageA/pages/quan_list/quan_list.js
@@ -19,6 +19,7 @@ Page({ @@ -19,6 +19,7 @@ Page({
19 loading:0, 19 loading:0,
20 get_item:null, 20 get_item:null,
21 show_success:0, 21 show_success:0,
  22 + getcurday:null,
22 }, 23 },
23 //------初始化加载---------- 24 //------初始化加载----------
24 onLoad: function(t) { 25 onLoad: function(t) {
@@ -36,6 +37,8 @@ Page({ @@ -36,6 +37,8 @@ Page({
36 //券的模拟数据 37 //券的模拟数据
37 //var data = [{ is_get:0,money:50,condition:500,id:1,name: "券名字", endtype: 0, use_start_time: 1579596090, use_end_time: 1611218490, everyone_num: 2,interval_time:1,color:"red"}]; 38 //var data = [{ is_get:0,money:50,condition:500,id:1,name: "券名字", endtype: 0, use_start_time: 1579596090, use_end_time: 1611218490, everyone_num: 2,interval_time:1,color:"red"}];
38 //th.setData({dataList: data}); 39 //th.setData({dataList: data});
  40 +
  41 + this.setData({getcurday:ut.gettimestamp()});
39 }, 42 },
40 43
41 onHide: function() { 44 onHide: function() {
packageA/pages/quan_list/quan_list.wxml
@@ -18,11 +18,12 @@ @@ -18,11 +18,12 @@
18 <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative"> 18 <view class="right fs24 co_g pding" style="background-image:url({{iurl}}/miniapp/images/coupon_img/white.png); position: relative">
19 <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view> 19 <view class="fs28 co_b" style="margin-top: 15rpx">{{item.name}}</view>
20 <view style="margin-top: 5rpx">所有门店通用</view> 20 <view style="margin-top: 5rpx">所有门店通用</view>
21 - <view wx:if="{{item.endtype==0}}">有效期  
22 - <text wx:if="{{item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至 21 + <view wx:if="{{item.endtype==0}}">有效期
  22 + <text wx:if="{{item.starttype==1 && item.startdays>0}}">{{filters.format_time(getcurday+3600*24*item.startdays)}}</text>
  23 + <text wx:if="{{item.starttype==0 && item.use_start_time>0}}"> {{filters.format_time(item.use_start_time)}}</text>至
23 <text wx:if="{{item.use_start_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text> 24 <text wx:if="{{item.use_start_time>0}}"> {{filters.format_time(item.use_end_time)}}</text><text wx:else>不限</text>
24 </view> 25 </view>
25 - <view wx:else>有效期<text wx:if="{{item.days>0}}">{{item.days}}天</text><text wx:else>不限</text></view> 26 + <view wx:else>有效期 <text wx:if="{{item.starttype==1 && item.startdays>0}}">{{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></view>
26 <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view> 27 <view>每人限领:<text wx:if="{{item.everyone_num>0}}">{{item.everyone_num}}</text><text wx:else>不限</text></view>
27 <!-- 领取按钮 --> 28 <!-- 领取按钮 -->
28 <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan"> 29 <view data-ind="{{index}}" data-cid="{{item.id}}" catchtap="get_quan">
packageA/pages/quan_pro/quan_pro.js
@@ -14,6 +14,7 @@ Page({ @@ -14,6 +14,7 @@ Page({
14 q_data: null, 14 q_data: null,
15 id:null, 15 id:null,
16 config2:null, 16 config2:null,
  17 + getcurday:null
17 18
18 }, 19 },
19 //------初始化加载---------- 20 //------初始化加载----------
@@ -38,6 +39,8 @@ Page({ @@ -38,6 +39,8 @@ Page({
38 th.setData({q_data:res.data.data.pageData[0]}); 39 th.setData({q_data:res.data.data.pageData[0]});
39 } 40 }
40 }); 41 });
  42 +
  43 + th.setData({getcurday:ut.gettimestamp()});
41 }, 44 },
42 45
43 onHide: function() { 46 onHide: function() {
packageA/pages/quan_pro/quan_pro.wxml
@@ -23,11 +23,15 @@ @@ -23,11 +23,15 @@
23 <view class="fs28">满{{filters.toFix(q_data.condition,2)}}可用</view> 23 <view class="fs28">满{{filters.toFix(q_data.condition,2)}}可用</view>
24 </view> 24 </view>
25 </view> 25 </view>
26 - <view wx:if="{{item.endtype==0}}" class="lower fs30">有效期  
27 - <text wx:if="{{q_data.use_start_time>0}}"> {{filters.format_time(q_data.use_start_time)}}</text>至  
28 - <text wx:if="{{q_data.use_start_time>0}}"> {{filters.format_time(q_data.use_end_time)}}</text><text wx:else>不限</text> 26 + <view wx:if="{{q_data.endtype==0}}" class="lower fs30">有效期
  27 + <text wx:if="{{q_data.startdays>0 && q_data.starttype==1}}"> {{filters.format_time(getcurday+3600*24*q_data.startdays)}}</text>
  28 + <text wx:if="{{q_data.use_start_time>0 && q_data.starttype==0}}"> {{filters.format_time(q_data.use_start_time)}}</text>至
  29 + <text wx:if="{{q_data.use_end_time>0}}"> {{filters.format_time(q_data.use_end_time)}}</text><text wx:else>不限</text>
29 </view> 30 </view>
30 - <view wx:else class="lower fs30">有效期<text wx:if="{{q_data.days>0}}">{{q_data.days}}天</text><text wx:else>不限</text></view> 31 + <view wx:else class="lower fs30">有效期
  32 +
  33 + <text wx:if="{{q_data.startdays>0 && q_data.starttype==1}}"> {{filters.format_time(getcurday+3600*24*q_data.startdays)}}至</text>
  34 + <text wx:if="{{q_data.days>0}}"> {{filters.format_time(getcurday+3600*24*q_data.days)}}</text><text wx:else>不限</text></view>
31 35
32 </view> 36 </view>
33 </view> 37 </view>
pages/cart/cart2/c_filter.wxs
@@ -15,6 +15,7 @@ var filters = { @@ -15,6 +15,7 @@ var filters = {
15 if(ind==2) return "blue"; 15 if(ind==2) return "blue";
16 if(ind==11) return "green"; 16 if(ind==11) return "green";
17 if(ind==12) return "blue"; 17 if(ind==12) return "blue";
  18 + if(ind==20) return "green";
18 return ""; 19 return "";
19 }, 20 },
20 setbgcolor: function (ind) { 21 setbgcolor: function (ind) {
@@ -23,6 +24,7 @@ var filters = { @@ -23,6 +24,7 @@ var filters = {
23 if (ind == 2) return "#a3bcff"; 24 if (ind == 2) return "#a3bcff";
24 if (ind == 11) return "#59e1d2"; 25 if (ind == 11) return "#59e1d2";
25 if (ind == 12) return "#a3bcff"; 26 if (ind == 12) return "#a3bcff";
  27 + if (ind == 20) return "#6d87cd";
26 return ""; 28 return "";
27 }, 29 },
28 30
@@ -32,6 +34,7 @@ var filters = { @@ -32,6 +34,7 @@ var filters = {
32 if (ind == 2) return "品类"; 34 if (ind == 2) return "品类";
33 if (ind == 11) return "用途"; 35 if (ind == 11) return "用途";
34 if (ind == 12) return "分类1"; 36 if (ind == 12) return "分类1";
  37 + if (ind == 20) return "指定单品";
35 return ""; 38 return "";
36 }, 39 },
37 get_type_card:function(ind){ 40 get_type_card:function(ind){
@@ -40,6 +43,7 @@ var filters = { @@ -40,6 +43,7 @@ var filters = {
40 if (ind == 2) return "指定品类"; 43 if (ind == 2) return "指定品类";
41 if (ind == 11) return "指定用途"; 44 if (ind == 11) return "指定用途";
42 if (ind == 12) return "指定分类1"; 45 if (ind == 12) return "指定分类1";
  46 + if (ind == 20) return "指定单品";
43 return ""; 47 return "";
44 }, 48 },
45 format_huiche:function (text) { 49 format_huiche:function (text) {
pages/cart/cart2/cart2.js
@@ -707,8 +707,7 @@ Page({ @@ -707,8 +707,7 @@ Page({
707 } 707 }
708 708
709 //-- 如果系统要平摊到单品 -- 709 //-- 如果系统要平摊到单品 --
710 - if(!th.data.ispt_goods){  
711 - 710 + //if(!th.data.ispt_goods){
712 var pt_data={ 711 var pt_data={
713 'prom_id':item_map.prom_id, 712 'prom_id':item_map.prom_id,
714 'dis': parseFloat((item_map.price-item_map.prom_price).toFixed(2)), 713 'dis': parseFloat((item_map.price-item_map.prom_price).toFixed(2)),
@@ -722,11 +721,15 @@ Page({ @@ -722,11 +721,15 @@ Page({
722 if(pt_res){ 721 if(pt_res){
723 for (var io in item_map.goods){ 722 for (var io in item_map.goods){
724 //平摊赋值 723 //平摊赋值
725 - item_map.goods[io].account=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account;  
726 - item_map.goods[io].account_yu=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account_yu; 724 + item_map.goods[io].account_fir=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account;
  725 + item_map.goods[io].account_yu_fir=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account_yu;
  726 + if(!th.data.ispt_goods){
  727 + item_map.goods[io].account=item_map.goods[io].account_fir;
  728 + item_map.goods[io].account_yu=item_map.goods[io].account_yu_fir;
  729 + }
727 } 730 }
728 } 731 }
729 - } 732 + // }
730 733
731 o_price-=(item_map.price-item_map.prom_price); 734 o_price-=(item_map.price-item_map.prom_price);
732 //如果有限制使用优惠券,就要减掉参与的活动商品的钱 735 //如果有限制使用优惠券,就要减掉参与的活动商品的钱
@@ -738,6 +741,8 @@ Page({ @@ -738,6 +741,8 @@ Page({
738 if(item[j].prom_type==3 && item[j].prom_id==item_map.prom_id){ 741 if(item[j].prom_type==3 && item[j].prom_id==item_map.prom_id){
739 item[j].is_xz_yh= item_map.is_xz_yh; 742 item[j].is_xz_yh= item_map.is_xz_yh;
740 item[j].is_past= item_map.is_past; 743 item[j].is_past= item_map.is_past;
  744 + item[j].account_fir= th.item_map_get_goods(item[j].goods_id,item_map).account_fir;
  745 + item[j].account_yu_fir= th.item_map_get_goods(item[j].goods_id,item_map).account_yu_fir;
741 item[j].account= th.item_map_get_goods(item[j].goods_id,item_map).account; 746 item[j].account= th.item_map_get_goods(item[j].goods_id,item_map).account;
742 item[j].account_yu= th.item_map_get_goods(item[j].goods_id,item_map).account_yu; 747 item[j].account_yu= th.item_map_get_goods(item[j].goods_id,item_map).account_yu;
743 } 748 }
@@ -2134,17 +2139,60 @@ Page({ @@ -2134,17 +2139,60 @@ Page({
2134 2139
2135 /*--点击选择券--*/ 2140 /*--点击选择券--*/
2136 sele_quan_item:function(e) { 2141 sele_quan_item:function(e) {
  2142 +
  2143 + var ind = e.currentTarget.dataset.ind;
  2144 + var quan_item=this.data.selected_quan_list[ind];
  2145 + var pickid=this.data.selected_quan_pick; //现在选择的是哪一个门店
  2146 + //--如果券是单品使用的时候--
  2147 + if(quan_item.UseObjectType=="20"){
  2148 + //---只有多件购买的时候才要计算,//购物车购买和搭配勾的时候---
  2149 + var gg=getApp().get_b_now();
  2150 + if(this.data.is_b_now==0 || this.data.gg.prom_type==5){
  2151 + var arr=this.data.order_prom_list_cart;
  2152 + var t_pk_item=null;
  2153 + for(var ii in arr){
  2154 + var ep=arr[ii];
  2155 + if(pickid==ep.pickup_id){
  2156 + t_pk_item=ep; break;
  2157 + }
  2158 + }
  2159 + //--寻找券指定的商品--
  2160 + var gd=null;
  2161 + if(t_pk_item){
  2162 + var goods=t_pk_item.goods;
  2163 + for(var gid in goods){
  2164 + if(quan_item.UseObjectID==goods[gid].erpwareid){ gd=goods[gid]; }
  2165 + }
  2166 + }
  2167 + if(!gd){
  2168 + getApp().my_warnning("未找到指定商品使用",0,this,600);
  2169 + return false;
  2170 + }
  2171 + //计算价格,如果有平摊的实收要计算实收的金额
  2172 + var item_price=gd.goods_price*gd.goods_num;
  2173 + //-- 如果有平摊下去,有实收价格的时候,就要用account_fir来计算价格 --
  2174 + if(gd.account_fir!=null && gd.account_fir!=undefined){
  2175 + item_price=gd.account_fir*gd.goods_num;
  2176 + }
  2177 +
  2178 + if(item_price< parseFloat(quan_item.BuySum)){
  2179 + getApp().my_warnning("该单品金额没有大于等于"+quan_item.BuySum+"元时不能使用优惠券",0,this,600);
  2180 + return false;
  2181 + }
  2182 + }
  2183 + }
  2184 +
2137 var no_use=e.currentTarget.dataset.no, quanlist=this.data.selected_quan_list; 2185 var no_use=e.currentTarget.dataset.no, quanlist=this.data.selected_quan_list;
2138 //---所有的券的显示红色选择都清理一遍--- 2186 //---所有的券的显示红色选择都清理一遍---
2139 - for(var ind in quanlist){  
2140 - quanlist[ind].show_red=0; 2187 + for(var i in quanlist){
  2188 + quanlist[i].show_red=0;
2141 } 2189 }
2142 this.setData({selected_quan_list:quanlist}); 2190 this.setData({selected_quan_list:quanlist});
2143 var by_quanlist=this.data.get_by_quan_list; 2191 var by_quanlist=this.data.get_by_quan_list;
2144 if(by_quanlist){ 2192 if(by_quanlist){
2145 //---所有的券的显示红色选择都清理一遍--- 2193 //---所有的券的显示红色选择都清理一遍---
2146 - for(var ind in by_quanlist){  
2147 - by_quanlist[ind].show_red=0; 2194 + for(var inb in by_quanlist){
  2195 + by_quanlist[inb].show_red=0;
2148 } 2196 }
2149 this.setData({get_by_quan_list:by_quanlist}); 2197 this.setData({get_by_quan_list:by_quanlist});
2150 } 2198 }
@@ -2173,11 +2221,9 @@ Page({ @@ -2173,11 +2221,9 @@ Page({
2173 return; 2221 return;
2174 } 2222 }
2175 2223
2176 - var ind = e.currentTarget.dataset.ind;  
2177 -  
2178 - var quan_item = this.data.selected_quan_list[ind]; 2224 +
  2225 +
2179 var txt = "selected_quan_list[" + ind + "].show_red"; 2226 var txt = "selected_quan_list[" + ind + "].show_red";
2180 -  
2181 var obj = {}; 2227 var obj = {};
2182 obj[txt] = 1; 2228 obj[txt] = 1;
2183 if (quan_item.show_red) { 2229 if (quan_item.show_red) {
@@ -2527,8 +2573,8 @@ Page({ @@ -2527,8 +2573,8 @@ Page({
2527 is_xz_yh=0; 2573 is_xz_yh=0;
2528 var item_price=gd.goods_price*gd.goods_num; 2574 var item_price=gd.goods_price*gd.goods_num;
2529 //-- 如果有平摊下去,有实收价格的时候,就要用account来计算价格 -- 2575 //-- 如果有平摊下去,有实收价格的时候,就要用account来计算价格 --
2530 - if(gd.account!=null && gd.account!=undefined){  
2531 - item_price=gd.account*gd.goods_num; 2576 + if(gd.account_fir!=null && gd.account_fir!=undefined){
  2577 + item_price=gd.account_fir*gd.goods_num;
2532 } 2578 }
2533 ckeck_quan_price+=item_price; 2579 ckeck_quan_price+=item_price;
2534 2580
pages/user/Detailed/Detailed.js
@@ -33,6 +33,10 @@ Page({ @@ -33,6 +33,10 @@ Page({
33 imagePath:"", //分享的生成图片 33 imagePath:"", //分享的生成图片
34 34
35 canvasHidden:true, 35 canvasHidden:true,
  36 + isBind:true,
  37 + isBinds:true,
  38 +
  39 + input_val:null,
36 }, 40 },
37 41
38 /** 42 /**
@@ -108,20 +112,36 @@ Page({ @@ -108,20 +112,36 @@ Page({
108 112
109 selectDetailed: function() { 113 selectDetailed: function() {
110 var th = this, e = th; 114 var th = this, e = th;
  115 + var r_data={
  116 + storeId: o.stoid,
  117 + userId: r.user_id,
  118 + page: th.data.page,
  119 + pageSize: th.data.pageSize
  120 + };
  121 +
  122 + if(th.data.datet!="" && th.data.datet){
  123 + r_data.Sdate=th.data.datet;
  124 + }
  125 + if(th.data.dates!="" && th.data.dates){
  126 + r_data.Edate=th.data.dates;
  127 + }
  128 + if(th.data.input_val!="" && th.data.input_val){
  129 + r_data.MobileTel=th.data.input_val;
  130 + }
  131 +
111 getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", { 132 getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", {
112 - data: {  
113 - storeId: o.stoid,  
114 - userId: r.user_id,  
115 - page: th.data.page,  
116 - pageSize: th.data.pageSize  
117 - } 133 + data:r_data
118 }).then(res => { 134 }).then(res => {
119 -  
120 - th.setData({isDetailed:1}) 135 +
  136 + setTimeout(function () {
  137 + th.setData({isDetailed: 1 });
  138 + },300)
121 if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { 139 if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) {
122 th.data.page++;//当前页数+1 140 th.data.page++;//当前页数+1
123 var arr1 = th.data.arrayDetailed;//获取明细数组 141 var arr1 = th.data.arrayDetailed;//获取明细数组
124 var arr2 = res.data.data.pageData;//获取当前查询数据 142 var arr2 = res.data.data.pageData;//获取当前查询数据
  143 + if(!arr1) arr1=[];
  144 +
125 var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 145 var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面
126 var ismore = 0; 146 var ismore = 0;
127 if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 147 if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断
@@ -129,8 +149,9 @@ Page({ @@ -129,8 +149,9 @@ Page({
129 arrayDetailed: arr3, 149 arrayDetailed: arr3,
130 total: res.data.data.total, 150 total: res.data.data.total,
131 ismore: ismore, 151 ismore: ismore,
132 - isDetailed: 1  
133 }) 152 })
  153 +
  154 +
134 } 155 }
135 }) 156 })
136 157
@@ -152,7 +173,6 @@ Page({ @@ -152,7 +173,6 @@ Page({
152 * 页面上拉触底事件的处理函数 173 * 页面上拉触底事件的处理函数
153 */ 174 */
154 onReachBottom: function() { 175 onReachBottom: function() {
155 -  
156 if (this.data.total <= this.data.pageSize) return; 176 if (this.data.total <= this.data.pageSize) return;
157 if (this.data.ismore) { 177 if (this.data.ismore) {
158 t.my_warnning("加载完啦!", 0, this); 178 t.my_warnning("加载完啦!", 0, this);
@@ -183,7 +203,7 @@ Page({ @@ -183,7 +203,7 @@ Page({
183 var privilege_o = th.data.privilege_o;//勋章图片 203 var privilege_o = th.data.privilege_o;//勋章图片
184 var img_square=th.data.img_square; 204 var img_square=th.data.img_square;
185 var app = getApp(); 205 var app = getApp();
186 - var user=app.globalData.userInfo; 206 + var user=app.globalData.userInfo;
187 var unit = th.data.screenWidth / 750 * 1.35; 207 var unit = th.data.screenWidth / 750 * 1.35;
188 var scene = getApp().globalData.user_id; 208 var scene = getApp().globalData.user_id;
189 var nickname = user.nickname; 209 var nickname = user.nickname;
@@ -368,10 +388,7 @@ Page({ @@ -368,10 +388,7 @@ Page({
368 },300) 388 },300)
369 }) 389 })
370 }) 390 })
371 -  
372 -  
373 -  
374 - 391 +
375 } 392 }
376 393
377 }) 394 })
@@ -435,9 +452,66 @@ Page({ @@ -435,9 +452,66 @@ Page({
435 452
436 }) 453 })
437 }, 454 },
438 -  
439 -  
440 -  
441 -  
442 - 455 +
  456 +
  457 + //起始时间
  458 + bindDateChenge: function(e) {
  459 + var isBind = false;
  460 + this.setData({
  461 + datet: e.detail.value,
  462 + isBind: isBind
  463 + });
  464 + },
  465 + // 结束时间
  466 + bindDateChenges: function(e) {
  467 + var isBinds = false;
  468 + this.setData({
  469 + dates: e.detail.value,
  470 + isBinds: isBinds
  471 + });
  472 + },
  473 + //catchtap阻止冒泡,点击清除开始时间的按钮
  474 + eliminate: function() {
  475 + var isBind = true;
  476 + var data = "";
  477 + this.setData({
  478 + datet: data,
  479 + isBind: isBind
  480 + })
  481 + },
  482 + //catchtap阻止冒泡,点击清除结束时间的按钮
  483 + eliminates: function() {
  484 + var isBinds = true;
  485 + var dates = "";
  486 + this.setData({
  487 + dates: dates,
  488 + isBinds: isBinds
  489 + })
  490 + },
  491 +
  492 + get_input:function (e) {
  493 + this.data.input_val=e.detail.value;
  494 + },
  495 +
  496 + //点击的搜索事件
  497 + get_search:function () {
  498 + var th=this;
  499 +
  500 + if(th.data.datet && th.data.dates){
  501 + var oDate1 = new Date(th.data.datet);
  502 + var oDate2 = new Date(th.data.dates);
  503 + if(oDate2<oDate1){
  504 + getApp().my_warnning("结束时间不能小于开始时间",0,th);
  505 + return false;
  506 + }
  507 + }
  508 + this.data.total = 0;
  509 + this.data.page = 1;
  510 + this.data.ismore = 0;
  511 + this.setData({isDetailed:0});
  512 + th.setData({arrayDetailed:[]});
  513 + th.selectDetailed();
  514 + }
  515 +
  516 +
443 }) 517 })
444 \ No newline at end of file 518 \ No newline at end of file
pages/user/Detailed/Detailed.wxml
  1 +<view class="big-rim">
  2 + <form bindsubmit='get_search'>
  3 + <view class="min-rim">
  4 + <view class="rq">日期:</view>
  5 +
  6 + <picker class='pi' mode="date" value='{{datet}}' start="2019/1/1" bindchange='bindDateChenge'>
  7 + <view class="rq-rim">
  8 + <view class='kssj'><text class="wz"name="datat"value='{{datet}}'bindinput='watchPassWord'>{{datet}}</text></view>
  9 + <!-- 清除输入框中的内容-->
  10 + <view hidden='{{isBind}}' class="qc-rim">
  11 + <button class="empty" catchtap="eliminate">x</button>
  12 + </view>
  13 + </view>
  14 + </picker>
  15 +
  16 + <view class="zi">至 </view>
  17 + <picker class="pis"mode="date" value='{{dates}}' start="2019/1/1" end="" bindchange='bindDateChenges'>
  18 + <view class="kssj">
  19 + <text class='wz' name="datas" value='{{dates}}'>{{dates}}</text>
  20 + </view>
  21 + <!-- 清除输入框中的内容 -->
  22 + <view class="end-rim" hidden="{{isBinds}}">
  23 + <button class="end" catchtap="eliminates">x</button>
  24 + </view>
  25 + </picker>
  26 + </view>
  27 +
  28 + <view class="xknr-rim">
  29 + <view class="cxnr">查询内容 </view>
  30 + <view class='top'>
  31 + <input class="input" maxlength="13" bindinput="get_input" placeholder="输入手机号"/>
  32 + </view>
  33 + </view>
  34 + <button class="botton" form-type='submit' data-query='{{item}}'>查询明细</button>
  35 + </form>
  36 +</view>
  37 +
1 <view wx:if="{{arrayDetailed.length>0}}"> 38 <view wx:if="{{arrayDetailed.length>0}}">
2 <view class="flex-space-between fs28 title"> 39 <view class="flex-space-between fs28 title">
3 <view class="flex-vertical Nickname"> 40 <view class="flex-vertical Nickname">
pages/user/Detailed/Detailed.wxss
@@ -14,7 +14,6 @@ @@ -14,7 +14,6 @@
14 } 14 }
15 15
16 16
17 -  
18 .phone { 17 .phone {
19 width: 250rpx; 18 width: 250rpx;
20 } 19 }
@@ -59,4 +58,247 @@ @@ -59,4 +58,247 @@
59 height: 56rpx; 58 height: 56rpx;
60 background-color: rgb(255, 72, 72); 59 background-color: rgb(255, 72, 72);
61 border-radius: 40rpx; 60 border-radius: 40rpx;
  61 +}
  62 +
  63 +
  64 +.big-rim{
  65 + margin-top: 15rpx;
  66 + width: 100%;
  67 + height: 305rpx;
  68 + border-bottom: 8px solid #EEEEEE;
  69 +}
  70 +/* 单据时间 */
  71 +.time{
  72 +
  73 + font-size: 25rpx;
  74 + color: #999999;
  75 + width: 100%;
  76 +}
  77 +.min-rim{
  78 + display: flex;
  79 + width: 100%;
  80 + height: auto;
  81 + margin-left: 30rpx;
  82 +}
  83 +/* 日期 */
  84 +.rq{
  85 + height: 25rpx;
  86 + font-size: 28rpx;
  87 + margin-top:12rpx;
  88 + font-family:'SimHei',Arial;
  89 +}
  90 +/* 日期控件 */
  91 +.pi{
  92 + width:200rpx;
  93 + height:auto;
  94 + margin-left:10rpx;
  95 +
  96 +}
  97 +.pis{
  98 + width:200rpx;
  99 + height:auto;
  100 + margin-left:30rpx;
  101 +}
  102 +/* 日期边框 */
  103 +.rq-rim{
  104 + position:relative;
  105 + left:0;
  106 + top:0
  107 +}
  108 +/* 开始时间边框*/
  109 +.kssj{
  110 + display: inline-block;
  111 + height: 50rpx;
  112 + background-color: #EEEEEE;
  113 + border: 1px solid #DADADA;
  114 + width:200rpx;
  115 + border-radius: 3px;
  116 + line-height:40rpx;
  117 + position:relative;
  118 + top:0rpx;
  119 + left:0rpx;
  120 +
  121 +}
  122 +/* 开始时间的文字 */
  123 +.wz{
  124 + display: inline-block;
  125 + font-size: 25rpx;
  126 + color: #333;
  127 +}
  128 +
  129 +/* 开始清空按钮的 边框*/
  130 +.qc-rim{
  131 + position:absolute;
  132 + top:10rpx;
  133 + left:173rpx;
  134 +
  135 +}
  136 +/* 结束时间清空输入框的按钮的边框 */
  137 +.end-rim{
  138 + position: absolute;
  139 + top: 23rpx;
  140 + left:547rpx;
  141 + width: 25rpx;
  142 + height: 25rpx;
  143 +}
  144 +/* 查询内容 */
  145 +.cxnr{
  146 + margin-left:30rpx;
  147 + font-size:28rpx;
  148 + font-family: 'SimHei',Arial;
  149 +}
  150 +/* 至 */
  151 +.zi{
  152 + margin-top:14rpx;
  153 + font-weight:600;
  154 + font-size:28rpx;
  155 + font-family: 'SimHei',Arial;
  156 + margin-left:30rpx;
  157 +}
  158 +/* 结束时间 */
  159 +
  160 +.jssj{
  161 + padding-left: 10rpx;
  162 + margin-left: 30rpx;
  163 + padding-bottom: 10rpx;
  164 + height: 35rpx;
  165 + font-size: 25rpx;
  166 + color: #333;
  167 + background-color: #EEEEEE;
  168 + border: 1px solid #DADADA;
  169 + width:85%;
  170 + border-radius: 5px;
  171 +
  172 +}
  173 +/* 查询内容的备考的边框 */
  174 +.xknr-rim{
  175 + display: flex;
  176 + width: 100%;
  177 + height: 55rpx;
  178 + line-height:105rpx;
  179 + margin-top:20rpx;
  180 +}
  181 +/* 明细查询 */
  182 +.botton{
  183 + margin-left: 30rpx;
  184 + margin-top: 50rpx;
  185 + background-color: #C4182E;
  186 + width: 95%;
  187 + border-radius:10rpx;
  188 + text-align: center;
  189 + height: 70rpx;
  190 + line-height: 70rpx;
  191 + color: #FFF;
  192 + font-size: 29rpx;
  193 + border: none;
  194 + font-family: 'SimHei',Arial;
  195 +}
  196 +
  197 +/*开始时间清空输入框的按钮*/
  198 +.empty{
  199 + width: 25rpx;
  200 + height: 25rpx;
  201 + border-radius:50%;
  202 + background: #767676;
  203 + color: #fff;
  204 + font-size: 25rpx;
  205 + text-align: center;
  206 + line-height:19rpx;
  207 +}
  208 +/*结束时间清空输入框的按钮*/
  209 +.end{
  210 + width: 25rpx;
  211 + height: 25rpx;
  212 + border-radius:50%;
  213 + background: #767676;
  214 + color: #fff;
  215 + font-size: 25rpx;
  216 + text-align: center;
  217 + line-height:19rpx;
  218 +}
  219 +
  220 +/* 顶部 */
  221 +.top{
  222 + width: 170rpx;
  223 + height: 50rpx;
  224 + padding: 0 10rpx;
  225 + line-height: 50rpx;
  226 + font-size: 34rpx;
  227 + margin-top: 25rpx;
  228 + border-radius:3rpx;
  229 +}
  230 +.images{
  231 + width:35rpx;
  232 + height:35rpx;
  233 + margin-left:-9rpx;
  234 + margin-top:6rpx;
  235 +}
  236 +.rim-images{
  237 + width: 62rpx;
  238 + height: 46rpx;
  239 + line-height: 37rpx;
  240 + /* border-style: inset;padding:4rpx;text-align: center; */
  241 + background: #f1f1f1;
  242 + border-color:#000000;
  243 + border-width: 1rpx;
  244 + transform:translateX(28%);
  245 + margin-top:-3rpx;
  246 + border-radius:5rpx;
  247 +}
  248 +/* 下拉框 */
  249 +.top-selected{
  250 + width: 100%;
  251 + display: flex;
  252 + align-items: center;
  253 + justify-content: space-between;
  254 + border: 1px solid #ccc;
  255 + padding: 0 10rpx;
  256 + font-size: 30rpx;
  257 + background:#eeeeee;
  258 + height:50rpx;
  259 + border-radius:6rpx;
  260 +
  261 +}
  262 +.texts{
  263 + margin:0 auto;
  264 + font-size: 25rpx;
  265 +}
  266 +
  267 +/* 下拉内容 */
  268 +.select-box {
  269 + background-color: #eeeeee;
  270 + width:190rpx;
  271 + position: relative;
  272 + z-index:1;
  273 + overflow: hidden;
  274 + text-align: left;
  275 + animation: myfirst 0.5s;
  276 + font-size: 25rpx;
  277 + border: 1px solid #DADADA;
  278 +}
  279 +.select_one {
  280 + padding-left: 20rpx;
  281 + width: 100%;
  282 + height: 60rpx;
  283 + line-height: 60rpx;
  284 +}
  285 +/* 注释 */
  286 +.zs{
  287 + margin-left: 30rpx;
  288 + font-size: 25rpx;
  289 + color: #999999;
  290 + font-family: 'SimHei',Arial;
  291 + margin-top: 42rpx;
  292 + margin-bottom: 30rpx;
  293 +}
  294 +
  295 +.input{
  296 + width: 300rpx;
  297 + background-color: #EEEEEE;
  298 + border-radius: 10rpx;
  299 + font-size: 24rpx;
  300 + text-indent: 5rpx;
  301 + height: 56rpx;
  302 + border: 1rpx solid #ccc;
  303 +
62 } 304 }
63 \ No newline at end of file 305 \ No newline at end of file
pages/user/userinfo/userinfo.js
@@ -812,7 +812,7 @@ Page({ @@ -812,7 +812,7 @@ Page({
812 } 812 }
813 var identity_card = th.data.identity_card; //身份证 813 var identity_card = th.data.identity_card; //身份证
814 814
815 - if (identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) { 815 + if (identity_card!=null && identity_card!=undefined && identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) {
816 getApp().my_warnning("身份证号码错误", 0, th); 816 getApp().my_warnning("身份证号码错误", 0, th);
817 return false; 817 return false;
818 } 818 }
pages/user/userqy/userqy.js
@@ -27,6 +27,7 @@ Page({ @@ -27,6 +27,7 @@ Page({
27 is_full:0, //是否满级 27 is_full:0, //是否满级
28 28
29 cur_g_num:0,//当前级需要多少钱 29 cur_g_num:0,//当前级需要多少钱
  30 + userqy_color:null,//颜色值
30 }, 31 },
31 32
32 swiperChange: function (e) { 33 swiperChange: function (e) {
@@ -57,6 +58,14 @@ Page({ @@ -57,6 +58,14 @@ Page({
57 var gl_data=getApp().globalData; 58 var gl_data=getApp().globalData;
58 var sw_cur_id=0; 59 var sw_cur_id=0;
59 var th=this; 60 var th=this;
  61 + //颜色值
  62 + getApp().getConfig2(function(e) {
  63 + var getuserqy_color=e.userqy_color;
  64 + if (getuserqy_color) getuserqy_color = JSON.parse(getuserqy_color)
  65 + if(getuserqy_color){
  66 + th.setData({userqy_color:getuserqy_color})
  67 + }
  68 + })
60 //获取成长值 69 //获取成长值
61 await getApp().request.promiseGet("/api/weshop/users/grade/aftervipinfo/get",{ 70 await getApp().request.promiseGet("/api/weshop/users/grade/aftervipinfo/get",{
62 data:{ storeId:os.stoid,userId:gl_data.user_id } 71 data:{ storeId:os.stoid,userId:gl_data.user_id }
pages/user/userqy/userqy.wxml
@@ -2,22 +2,22 @@ @@ -2,22 +2,22 @@
2 <view class="xc-userqy-frame"> 2 <view class="xc-userqy-frame">
3 <!-- 顶部 --> 3 <!-- 顶部 -->
4 <view class='user-frame rel'> 4 <view class='user-frame rel'>
5 - <image class="arc" src="{{iurl}}/miniapp/images/userqy/user_userqy_arc.jpg"></image> 5 + <view class="arc" style="background:{{userqy_color.first_bgcolor}}"></view>
6 <image class="user-img circle abs" src="{{userinfo.head_pic?userinfo.head_pic:defaultAvatar}}"> </image> 6 <image class="user-img circle abs" src="{{userinfo.head_pic?userinfo.head_pic:defaultAvatar}}"> </image>
7 - <view class="user-name abs "> 7 + <view class="user-name abs " style="color:{{userqy_color.font_color}}">
8 {{userinfo.nickname}} <view class="hvip"><image class="vip-mem" src="{{iurl}}/miniapp/images/vip_hg0.png"></image>{{GradeName}}</view> 8 {{userinfo.nickname}} <view class="hvip"><image class="vip-mem" src="{{iurl}}/miniapp/images/vip_hg0.png"></image>{{GradeName}}</view>
9 </view> 9 </view>
10 <!-- 当前是什么等级卡 --> 10 <!-- 当前是什么等级卡 -->
11 11
12 <view class='flex abs xc-grow-frame' bindtap='go_cz'> 12 <view class='flex abs xc-grow-frame' bindtap='go_cz'>
13 - <view class="four-level-word new xc-grow-val">成长值</view>  
14 - <view class="progress-bar-not" >  
15 - <view class="progress-bar-yes" wx:if="{{cz_val>full_cz_val}}" style='width:100%'></view>  
16 - <view class="progress-bar-yes" wx:else style='width:{{cz_val/need_money*100}}%'></view> 13 + <view class="four-level-word new xc-grow-val" style="color:{{userqy_color.font_color}}; background:{{userqy_color.secord_bgcolor}}">成长值</view>
  14 + <view class="progress-bar-not">
  15 + <view class="progress-bar-yes" wx:if="{{cz_val>full_cz_val}}" style='width:100%;background:{{userqy_color.secord_bgcolor}}'></view>
  16 + <view class="progress-bar-yes" wx:else style='width:{{cz_val/need_money*100}}%;background:{{userqy_color.secord_bgcolor}}'></view>
17 </view> 17 </view>
18 18
19 - <view class="progress-bar-val four-level-word new" wx:if="{{cz_val<full_cz_val}}">{{filter.pInt(cz_val)}} / {{need_money}}</view>  
20 - <view class="progress-bar-val four-level-word new" wx:else>{{filter.pInt(cz_val)}}</view> 19 + <view class="progress-bar-val four-level-word new" style="color:{{userqy_color.font_color}}; " wx:if="{{cz_val<full_cz_val}}" >{{filter.pInt(cz_val)}} / {{need_money}}</view>
  20 + <view class="progress-bar-val four-level-word new" style="color:{{userqy_color.font_color}}; " wx:else>{{filter.pInt(cz_val)}}</view>
21 21
22 </view> 22 </view>
23 23
pages/user/userqy/userqy.wxss
@@ -9,7 +9,13 @@ @@ -9,7 +9,13 @@
9 } 9 }
10 .xc-userqy-frame .user-frame .arc{ 10 .xc-userqy-frame .user-frame .arc{
11 width: 750rpx; 11 width: 750rpx;
12 - height: 444rpx; 12 + height: 444rpx;
  13 + left: -20%;
  14 + top: 0;
  15 + z-index: -1;
  16 + content: '';
  17 + border-radius: 0 0 20% 20%;
  18 + background: #ff7295;
13 19
14 } 20 }
15 .xc-userqy-frame .user-frame .user-img{ 21 .xc-userqy-frame .user-frame .user-img{