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


Test


From test into qa

Merged by 后端研发-苏明海

1 participants




components/diy_advertising/diy_advertising.wxml
@@ -410,11 +410,17 @@ @@ -410,11 +410,17 @@
410 <block wx:for="{{object.data}}" wx:for-index="index" > 410 <block wx:for="{{object.data}}" wx:for-index="index" >
411 411
412 <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}"> 412 <navigator url="{{item.wxapp_imgurl}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.wxapp_imgurl,'plugin')>=0}}">
413 - <swiper-item><image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" /></swiper-item> 413 + <swiper-item>
  414 + <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" />
  415 + <view class="title">{{item.title}}</view>
  416 + </swiper-item>
414 </navigator> 417 </navigator>
415 418
416 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else> 419 <view data-url="{{item.wxapp_imgurl}}" class="s1_gk_a1" bindtap="go_url" wx:else>
417 - <swiper-item><image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" /></swiper-item> 420 + <swiper-item>
  421 + <image src="{{item.src}}" bindload="imageLoad" data-index="{{index}}" class="slide-image" mode="widthFix" />
  422 + <view class="title">{{item.title}}</view>
  423 + </swiper-item>
418 </view> 424 </view>
419 425
420 </block> 426 </block>
components/diy_advertising/diy_advertising.wxss
@@ -331,3 +331,5 @@ @@ -331,3 +331,5 @@
331 } 331 }
332 .clicle{ width: 20rpx; height: 20rpx} 332 .clicle{ width: 20rpx; height: 20rpx}
333 .dots{ position: absolute; bottom: 10rpx; width: 100%; display: flex; justify-content: center} 333 .dots{ position: absolute; bottom: 10rpx; width: 100%; display: flex; justify-content: center}
  334 +.title{ position: absolute; left: 0; bottom: 0; background-color: rgba(6,6,6,0.5); font-size: 30rpx;
  335 + text-indent: 10rpx;width: 100%; height: 50rpx; line-height: 50rpx; color: #fff}
components/diy_service/diy_service.js 0 → 100644
  1 +Component({
  2 + properties: {
  3 + // 这里定义了innerText属性,属性值可以在组件使用时指定
  4 + object:{
  5 + type: Object,
  6 + value:null
  7 + },
  8 + },
  9 + data: {
  10 + iurl:getApp().globalData.setting.imghost
  11 + },
  12 +
  13 + lifetimes: {
  14 + attached: function() {
  15 + var th=this;
  16 + //----获取系统参数-----
  17 + getApp().getConfig2(function(e) {
  18 + var json_d = JSON.parse(e.switch_list);
  19 + th.setData({ sys_switch:json_d, })
  20 + })
  21 + }
  22 + },
  23 +
  24 + methods: {
  25 + berror:function(e){
  26 + var iurl=getApp().globalData.setting.imghost;
  27 + var ob={};
  28 + var txt="object.title_img";
  29 + ob[txt] = iurl +'/miniapp/images/logo.png';
  30 + this.setData(ob);
  31 + },
  32 +
  33 + //-- 跳到绑定注册会员 --
  34 + go_user:function(){
  35 + getApp().goto('/pages/getphone/getphone');
  36 + return false;
  37 + },
  38 +
  39 + //---------联系客服------------
  40 + contactService: function() {
  41 + getApp().getConfig(function(t) {
  42 + if (t.store_tel == undefined) {
  43 + getApp().request.get("/api/weshop/store/get/" + os.stoid, {
  44 + isShowLoading: 1,
  45 + data: {},
  46 + success: function(rs) {
  47 + getApp().globalData.config = rs.data.data;
  48 + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {
  49 + getApp().my_warnning("商家未设置电话", 0, th);
  50 + return false;
  51 + }
  52 + wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, })
  53 + }
  54 + })
  55 + } else {
  56 + wx.makePhoneCall({ phoneNumber: t.store_tel, })
  57 + }
  58 + });
  59 + },
  60 + }
  61 +})
components/diy_service/diy_service.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 \ No newline at end of file 5 \ No newline at end of file
components/diy_service/diy_service.wxml 0 → 100644
  1 +<!--有在线客户 和 打电话-->
  2 +<block wx:if="{{sys_switch.weapp_customertype}}">
  3 + <!-- 判断是不是有登陆 -->
  4 + <view wx:if="{{userInfo}}" class="custom-service" bindtap="go_user" >
  5 + <view style="text-align: center;">
  6 + <image class="cs-img" src="{{object.img}}"></image>
  7 + <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view>
  8 + </view>
  9 + </view>
  10 +
  11 + <button wx:else class="custom-service" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
  12 + <view style="text-align: center;">
  13 + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
  14 + <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view>
  15 + </view>
  16 + </button>
  17 +</block>
  18 +
  19 +<block wx:else>
  20 + <view class="custom-service cart-ico new_split" bindtap="contactService">
  21 + <view style="text-align: center;">
  22 + <image class="cs-img" src="{{object.img}}"></image>
  23 + <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view>
  24 + </view>
  25 + </view>
  26 +</block>
0 \ No newline at end of file 27 \ No newline at end of file
components/diy_service/diy_service.wxss 0 → 100644
  1 +.custom-service{ width: 116rpx; height: 116rpx; border-radius: 50%; background-color: #fff;z-index: 100;
  2 + border: 1px solid #adadad; box-shadow: 0 0 10px 2px #adadad; line-height: 28rpx;
  3 + position: fixed; top: 40%; right: 2rpx; display: flex;align-items: center;justify-content: center;}
  4 +
  5 + .cs-img{ width: 36rpx; height: 36rpx;}
  6 +.s_title{ font-size: 20rpx;}
0 \ No newline at end of file 7 \ No newline at end of file
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
@@ -706,16 +706,43 @@ Page({ @@ -706,16 +706,43 @@ Page({
706 cart_item.prom_pt_json=[{"prom_id":item_map.prom_id,"dis":(item_map.price-item_map.prom_price).toFixed(2),"ispt":0}]; 706 cart_item.prom_pt_json=[{"prom_id":item_map.prom_id,"dis":(item_map.price-item_map.prom_price).toFixed(2),"ispt":0}];
707 } 707 }
708 708
  709 + //-- 如果系统要平摊到单品 --
  710 + //if(!th.data.ispt_goods){
  711 + var pt_data={
  712 + 'prom_id':item_map.prom_id,
  713 + 'dis': parseFloat((item_map.price-item_map.prom_price).toFixed(2)),
  714 + 'goods':item_map.goods
  715 + }
  716 +
  717 + var pt_res=null;
  718 + await getApp().request.promisePost("/api/weshop/order/getGoodsSplit",{is_json:1,data:pt_data}).then(res=>{
  719 + if(res.data.code==0){ pt_res=res.data.data; }
  720 + })
  721 + if(pt_res){
  722 + for (var io in item_map.goods){
  723 + //平摊赋值
  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 + }
  730 + }
  731 + }
  732 + // }
  733 +
709 o_price-=(item_map.price-item_map.prom_price); 734 o_price-=(item_map.price-item_map.prom_price);
710 //如果有限制使用优惠券,就要减掉参与的活动商品的钱 735 //如果有限制使用优惠券,就要减掉参与的活动商品的钱
711 if(!item_map.is_xz_yh) q_conditin=o_price; 736 if(!item_map.is_xz_yh) q_conditin=o_price;
712 } 737 }
713 - 738 +
714 //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表----------- 739 //--------循环计算商品是不是包邮,是不是使用优惠券,此时循环是商品从表-----------
715 for(var j=0;j<item.length;j++){ 740 for(var j=0;j<item.length;j++){
716 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){
717 item[j].is_xz_yh= item_map.is_xz_yh; 742 item[j].is_xz_yh= item_map.is_xz_yh;
718 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;
719 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;
720 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;
721 } 748 }
@@ -1473,6 +1500,29 @@ Page({ @@ -1473,6 +1500,29 @@ Page({
1473 return false; 1500 return false;
1474 } 1501 }
1475 } 1502 }
  1503 +
  1504 + //--- 如果有优惠促销的金额,要把金额先平摊下去 ---
  1505 + if(th.data.formData.cut_price>0 && !th.data.ispt_goods){
  1506 + var g_arr=new Array();
  1507 + g_arr.push(goods);
  1508 + var pt_data={
  1509 + 'prom_id':goods.prom_id,
  1510 + 'dis': parseFloat(th.data.formData.cut_price),
  1511 + 'goods':g_arr,
  1512 + }
  1513 +
  1514 + var pt_res=null;
  1515 + await getApp().request.promisePost("/api/weshop/order/getGoodsSplit",{is_json:1,data:pt_data}).then(res=>{
  1516 + if(res.data.code==0){ pt_res=res.data.data; }
  1517 + })
  1518 + if(pt_res){
  1519 + //平摊赋值
  1520 + goods.account=pt_res[0].fisrt_account;
  1521 + goods.account_yu=pt_res[0].fisrt_account_yu;
  1522 + }
  1523 + }
  1524 +
  1525 +
1476 //--组装优惠券的钱-- 1526 //--组装优惠券的钱--
1477 if(th.data.formData.coupon_price){ 1527 if(th.data.formData.coupon_price){
1478 item.coupon_price=th.data.formData.coupon_price; 1528 item.coupon_price=th.data.formData.coupon_price;
@@ -1653,6 +1703,13 @@ Page({ @@ -1653,6 +1703,13 @@ Page({
1653 } 1703 }
1654 } 1704 }
1655 1705
  1706 + //把优惠的平摊结果写进去
  1707 + if(g_item.account>=0 || g_item.account_yu!=0){
  1708 + if(g_item.account>=0) goods.account=g_item.account;
  1709 + if(g_item.account_yu!=0) goods.account_yu=g_item.account_yu;
  1710 + item.is_discount_amount=1;
  1711 + }
  1712 +
1656 //导购ID 1713 //导购ID
1657 if(g_item.guide_id){ 1714 if(g_item.guide_id){
1658 goods.guide_id=g_item.guide_id; 1715 goods.guide_id=g_item.guide_id;
@@ -2082,17 +2139,60 @@ Page({ @@ -2082,17 +2139,60 @@ Page({
2082 2139
2083 /*--点击选择券--*/ 2140 /*--点击选择券--*/
2084 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 +
2085 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;
2086 //---所有的券的显示红色选择都清理一遍--- 2186 //---所有的券的显示红色选择都清理一遍---
2087 - for(var ind in quanlist){  
2088 - quanlist[ind].show_red=0; 2187 + for(var i in quanlist){
  2188 + quanlist[i].show_red=0;
2089 } 2189 }
2090 this.setData({selected_quan_list:quanlist}); 2190 this.setData({selected_quan_list:quanlist});
2091 var by_quanlist=this.data.get_by_quan_list; 2191 var by_quanlist=this.data.get_by_quan_list;
2092 if(by_quanlist){ 2192 if(by_quanlist){
2093 //---所有的券的显示红色选择都清理一遍--- 2193 //---所有的券的显示红色选择都清理一遍---
2094 - for(var ind in by_quanlist){  
2095 - by_quanlist[ind].show_red=0; 2194 + for(var inb in by_quanlist){
  2195 + by_quanlist[inb].show_red=0;
2096 } 2196 }
2097 this.setData({get_by_quan_list:by_quanlist}); 2197 this.setData({get_by_quan_list:by_quanlist});
2098 } 2198 }
@@ -2121,11 +2221,9 @@ Page({ @@ -2121,11 +2221,9 @@ Page({
2121 return; 2221 return;
2122 } 2222 }
2123 2223
2124 - var ind = e.currentTarget.dataset.ind;  
2125 -  
2126 - var quan_item = this.data.selected_quan_list[ind]; 2224 +
  2225 +
2127 var txt = "selected_quan_list[" + ind + "].show_red"; 2226 var txt = "selected_quan_list[" + ind + "].show_red";
2128 -  
2129 var obj = {}; 2227 var obj = {};
2130 obj[txt] = 1; 2228 obj[txt] = 1;
2131 if (quan_item.show_red) { 2229 if (quan_item.show_red) {
@@ -2474,7 +2572,12 @@ Page({ @@ -2474,7 +2572,12 @@ Page({
2474 } 2572 }
2475 is_xz_yh=0; 2573 is_xz_yh=0;
2476 var item_price=gd.goods_price*gd.goods_num; 2574 var item_price=gd.goods_price*gd.goods_num;
  2575 + //-- 如果有平摊下去,有实收价格的时候,就要用account来计算价格 --
  2576 + if(gd.account_fir!=null && gd.account_fir!=undefined){
  2577 + item_price=gd.account_fir*gd.goods_num;
  2578 + }
2477 ckeck_quan_price+=item_price; 2579 ckeck_quan_price+=item_price;
  2580 +
2478 //--组装价格list-- 2581 //--组装价格list--
2479 if (check_quan_price_list) { 2582 if (check_quan_price_list) {
2480 check_quan_price_list += "," +item_price; 2583 check_quan_price_list += "," +item_price;
@@ -2755,11 +2858,17 @@ Page({ @@ -2755,11 +2858,17 @@ Page({
2755 }, 2858 },
2756 2859
2757 //从优惠的映射中拿出商品从表的item 2860 //从优惠的映射中拿出商品从表的item
2758 - item_map_get_goods:function(goods_id,map){  
2759 - for(var i in map.goods){  
2760 - if(map.goods[i].goods_id==goods_id) return map.goods[i];  
2761 - }  
2762 - } 2861 + item_map_get_goods:function(goods_id,map){
  2862 + for(var i in map.goods){
  2863 + if(map.goods[i].goods_id==goods_id) return map.goods[i];
  2864 + }
  2865 + },
  2866 + //从优惠的映射中拿出商品从表的item
  2867 + arr_get_goods:function(goods_id,arr){
  2868 + for(var i in arr){
  2869 + if(arr[i].goods_id==goods_id) return arr[i];
  2870 + }
  2871 + }
2763 2872
2764 2873
2765 }); 2874 });
pages/index/index/index.json
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
16 "richtext": "/components/diy_richtext/diy_richtext", 16 "richtext": "/components/diy_richtext/diy_richtext",
17 "assist":"/components/diy_assist/diy_assist", 17 "assist":"/components/diy_assist/diy_assist",
18 "picMax": "/components/diy_picMax/diy_picMax", 18 "picMax": "/components/diy_picMax/diy_picMax",
19 - "mvideo": "/components/diy_video/diy_video" 19 + "mvideo": "/components/diy_video/diy_video",
  20 + "service": "/components/diy_service/diy_service"
20 } 21 }
21 } 22 }
22 \ No newline at end of file 23 \ No newline at end of file
pages/index/index/index.wxml
@@ -339,7 +339,12 @@ @@ -339,7 +339,12 @@
339 <!--图片组合--> 339 <!--图片组合-->
340 <block wx:if="{{item.ename=='picMix'}}"> 340 <block wx:if="{{item.ename=='picMix'}}">
341 <picMax object="{{item.content}}"></picMax> 341 <picMax object="{{item.content}}"></picMax>
342 - </block> 342 + </block>
  343 + <!--在线上客服-->
  344 + <block wx:if="{{item.ename=='onlineService'}}">
  345 + <service object="{{item.content}}"></service>
  346 + </block>
  347 +
343 </view> 348 </view>
344 </block> 349 </block>
345 </view> 350 </view>
pages/template/index.json
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
17 "richtext": "/components/diy_richtext/diy_richtext", 17 "richtext": "/components/diy_richtext/diy_richtext",
18 "assist":"/components/diy_assist/diy_assist", 18 "assist":"/components/diy_assist/diy_assist",
19 "picMax": "/components/diy_picMax/diy_picMax", 19 "picMax": "/components/diy_picMax/diy_picMax",
20 - "mvideo": "/components/diy_video/diy_video" 20 + "mvideo": "/components/diy_video/diy_video",
  21 + "service": "/components/diy_service/diy_service"
21 } 22 }
22 } 23 }
23 \ No newline at end of file 24 \ No newline at end of file
pages/template/index.wxml
@@ -53,6 +53,10 @@ @@ -53,6 +53,10 @@
53 <block wx:if="{{item.ename=='picMix'}}"> 53 <block wx:if="{{item.ename=='picMix'}}">
54 <picMax object="{{item.content}}"></picMax> 54 <picMax object="{{item.content}}"></picMax>
55 </block> 55 </block>
  56 + <!--在线上客服-->
  57 + <block wx:if="{{item.ename=='onlineService'}}">
  58 + <service object="{{item.content}}"></service>
  59 + </block>
56 </view> 60 </view>
57 </block> 61 </block>
58 </view> 62 </view>
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/coupons/exchange/exchange.js
@@ -60,9 +60,17 @@ Page({ @@ -60,9 +60,17 @@ Page({
60 * 点击兑换 60 * 点击兑换
61 */ 61 */
62 async click(e) { 62 async click(e) {
63 - var monye=e.currentTarget.dataset.monye;  
64 - var integr=e.currentTarget.dataset.integr;  
65 - //var integr = "-" + integr; 63 + var th=this;
  64 + this.data.monye=e.currentTarget.dataset.monye;
  65 + this.data.integr=e.currentTarget.dataset.integr;
  66 + var my_con = this.selectComponent("#my_con"); //组件的id
  67 + var title="是否使用"+th.data.integr+"积分兑换代金券面值"+th.data.monye+"元";
  68 + my_con.open(title, "确定", "取消", th.sure_pay, null)
  69 + },
  70 +
  71 + sure_pay:function(){
  72 + var monye=this.data.monye;
  73 + var integr=this.data.integr;
66 74
67 var user_id = getApp().globalData.user_id; 75 var user_id = getApp().globalData.user_id;
68 console.log(integr,"是什么微卷",typeof integr,monye); 76 console.log(integr,"是什么微卷",typeof integr,monye);
@@ -81,10 +89,11 @@ Page({ @@ -81,10 +89,11 @@ Page({
81 getApp().showWarning("积分不足"); 89 getApp().showWarning("积分不足");
82 } 90 }
83 } 91 }
84 -  
85 - })  
86 92
  93 + })
87 }, 94 },
  95 +
  96 +
88 /** 97 /**
89 * 生命周期函数--监听页面显示 98 * 生命周期函数--监听页面显示
90 */ 99 */
pages/user/coupons/exchange/exchange.json
1 { 1 {
2 - "usingComponents": {} 2 + "usingComponents": {
  3 + "my_confirm": "/components/my_confirm/my_confirm"
  4 + }
3 } 5 }
4 \ No newline at end of file 6 \ No newline at end of file
pages/user/coupons/exchange/exchange.wxml
@@ -8,4 +8,5 @@ @@ -8,4 +8,5 @@
8 <view class='mb20'>{{result.Integral}}积分兑换{{filter.getNum(result.ToSum)}}元微券</view> 8 <view class='mb20'>{{result.Integral}}积分兑换{{filter.getNum(result.ToSum)}}元微券</view>
9 <view class='jf-btn' bindtap='click' data-monye='{{result.ToSum}}' data-integr="{{result.Integral}}">立即兑换</view> 9 <view class='jf-btn' bindtap='click' data-monye='{{result.ToSum}}' data-integr="{{result.Integral}}">立即兑换</view>
10 </view> 10 </view>
11 -</block>  
12 \ No newline at end of file 11 \ No newline at end of file
  12 +</block>
  13 +<my_confirm id="my_con"></my_confirm>
13 \ No newline at end of file 14 \ 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{
utils/request.js
@@ -191,13 +191,19 @@ module.exports = { @@ -191,13 +191,19 @@ module.exports = {
191 promisePost:function(url,data){ 191 promisePost:function(url,data){
192 var th=this; 192 var th=this;
193 if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url; 193 if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url;
  194 + var post_data=data.data;
  195 + var header={"content-type": "application/x-www-form-urlencoded" };
  196 + if(data.is_json){
  197 + header={ 'content-type': 'application/json'};
  198 + post_data=JSON.stringify(post_data);
  199 + }
194 return new Promise((resolve, reject) => { 200 return new Promise((resolve, reject) => {
195 data.isShowLoading && th.showLoading(); 201 data.isShowLoading && th.showLoading();
196 wx.request({ 202 wx.request({
197 url, 203 url,
198 method: 'POST', 204 method: 'POST',
199 - header: {"content-type": "application/x-www-form-urlencoded" },  
200 - data:data.data, 205 + header: header,
  206 + data:post_data,
201 success(res) { 207 success(res) {
202 data.isShowLoading && th.hideLoading(); 208 data.isShowLoading && th.hideLoading();
203 resolve(res); 209 resolve(res);