Commit 2bdfae0d257d872e6d5cf157f9923556b3224087

Authored by 后端研发-苏明海
2 parents e62e8218 20d25ed3

Merge branch 'dev' into 'test'

Dev

See merge request !17
app.wxss
... ... @@ -12,7 +12,7 @@
12 12 box-sizing: border-box;
13 13 }
14 14 page {
15   - /*background-color: #f2f2f2;*/
  15 + overflow-x: hidden;
16 16 }
17 17 button {
18 18 border-radius: 0; padding-left: 0;
... ... @@ -158,6 +158,8 @@ align-items:center;
158 158 display:flex;
159 159 justify-content:space-around;
160 160 }
  161 +.jc_sb{ justify-content: space-between}
  162 +
161 163 /* 相对定位 */
162 164 .rel{
163 165 position: relative;
... ...
pages/cart/cart2/cart2.js
... ... @@ -683,7 +683,9 @@ Page({
683 683 console.log("buy_new");
684 684  
685 685 if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){
686   - ff = false; getApp().confirmBox("请新建收货地址"); }
  686 + ff = false; getApp().my_warnning("请选择收货地址",0,th);
  687 + this.data.is_summit_ing = 0;
  688 + }
687 689 if (!ff) return false;
688 690 var addr = th.data.user_addr;
689 691 if (th.data.bn_exp_type == 1) addr=null;
... ... @@ -694,7 +696,7 @@ Page({
694 696  
695 697 if(th.data.bn_exp_type==0)
696 698 if(th.data.wu_arr==null || th.data.wu_arr.length<=0){
697   - getApp().confirmBox("读取物流失败");
  699 + getApp().my_warnning("读取物流失败",0,th);
698 700 return false;
699 701 }
700 702  
... ...
pages/cart/cart2_pt/cart2_pt.js
... ... @@ -341,7 +341,11 @@ Page({
341 341 //------------立即购买-------------
342 342 console.log("buy_new");
343 343  
344   - if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){ ff = false; confirmBox("请新建收货地址"); }
  344 + if(th.data.bn_exp_type == 0 && th.data.user_addr==null ){
  345 + ff = false;
  346 + getApp().my_warnning("请选择收货地址",0,this);
  347 + this.data.is_summit_ing = 0;
  348 + }
345 349 if (!ff) return false;
346 350 var addr = th.data.user_addr;
347 351 if (th.data.bn_exp_type == 1) addr=null;
... ... @@ -352,7 +356,8 @@ Page({
352 356  
353 357 if(th.data.bn_exp_type==0) {
354 358 if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
355   - confirmBox("读取物流失败");
  359 + getApp().my_warnning("读取物流失败",0,this);
  360 + this.data.is_summit_ing = 0;
356 361 return false;
357 362 }
358 363 }
... ...
pages/cart/cart_wk/cart_wk.js
... ... @@ -301,6 +301,11 @@ Page({
301 301 },
302 302 //--弹起支付框--
303 303 to_pay(){
  304 + //--物流支付时要有地址--
  305 + if (this.data.exp_type == 0 && this.data.user_addr == null) {
  306 + return getApp().my_warnning("请选择收货地址", 0, this);
  307 + }
  308 +
304 309 this.setData({show_pay_type:1});
305 310 },
306 311  
... ... @@ -316,7 +321,7 @@ Page({
316 321  
317 322 //--物流支付时要有地址--
318 323 if (th.data.exp_type == 0 && th.data.user_addr==null){
319   - return getApp().my_warnning("请先建地址",0,th);
  324 + return getApp().my_warnning("请选择收货地址",0,th);
320 325 }
321 326  
322 327 //---支付参数--
... ...
pages/cart/cart_wk/cart_wk.json
1 1 {
  2 + "navigationBarTitleText": "支付尾款",
2 3 "usingComponents": {
3 4 "warn": "/components/long_warn/long_warn"
4 5 }
... ...
pages/cart/cart_wk/cart_wk.wxml
... ... @@ -73,15 +73,15 @@
73 73  
74 74 <!--成团人数-->
75 75 <view class='chentuan'>
76   - <view class='ct_one'>
  76 + <view class='ct_one jc_sb'>
77 77 <view class='ct_one_left'>成团人数</view>
78 78 <view class='ct_one_right'><text class='redwz'>1</text>人</view>
79 79 </view>
80   - <view class='ct_one'>
  80 + <view class='ct_one jc_sb'>
81 81 <view class='ct_one_left'>成团单价</view>
82 82 <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}</text></view>
83 83 </view>
84   - <view class='ct_one'>
  84 + <view class='ct_one jc_sb'>
85 85 <view class='ct_one_left'>支付定金</view>
86 86 <view class='ct_one_right'>¥<text class='redwz'>{{order.order_amount+order.user_money}}</text>
87 87 </view>
... ... @@ -90,13 +90,13 @@
90 90  
91 91 <!--尾款-->
92 92 <view class='chentuan'>
93   - <view class='ct_one'>
  93 + <view class='ct_one jc_sb'>
94 94 <view class='ct_one_left'>尾款金额</view>
95 95 <view class='ct_one_right'>¥<text class='redwz'>{{order.pt_tail_money}}</text>
96 96 </view>
97 97 </view>
98 98  
99   - <view class='ct_one'>
  99 + <view class='ct_one jc_sb'>
100 100 <view class='ct_one_left'>配送费用</view>
101 101 <view class='ct_one_right'>¥<text class='redwz'>{{exp_price}}</text>
102 102 </view>
... ...
pages/cart/cart_wk/cart_wk.wxss
... ... @@ -3,7 +3,7 @@
3 3 .user-mes {
4 4 position: relative;
5 5 background-color: #fff;
6   - font-size: 32rpx;
  6 + font-size: 30rpx;
7 7 color: #444;
8 8 }
9 9 .user-contact {
... ... @@ -60,13 +60,14 @@
60 60 }
61 61  
62 62 .top {
63   - widows: 100%;
64   - background-color: white;
65   - min-height: 70rpx;
66   - display: flex;
67   - padding: 10rpx;
68   - border-bottom: 2rpx solid rgb(238, 238, 238);
69   - margin-top: 20rpx;
  63 +
  64 + background-color: white;
  65 +height: 40px;
  66 +display: flex;
  67 +padding: 10rpx 0 0 0;
  68 +border-bottom: 2rpx solid rgb(238, 238, 238);
  69 +margin-top: 10rpx;
  70 +
70 71 }
71 72  
72 73 .t_img image {
... ... @@ -75,7 +76,7 @@
75 76 }
76 77  
77 78 .t_wz {
78   - font-size: 36rpx;
  79 + font-size: 30rpx;
79 80 font-weight: bold;
80 81 color: rgb(0, 0, 0);
81 82 line-height: 65rpx;
... ... @@ -104,7 +105,7 @@
104 105 .center .cen_name {
105 106 height: 120rpx;
106 107 width: 370rpx;
107   - font-size: 36rpx;
  108 + font-size: 30rpx;
108 109 padding-left: 10rpx;
109 110 overflow:hidden;
110 111 text-overflow:ellipsis;
... ... @@ -113,7 +114,7 @@
113 114  
114 115 .center .cen_jg {
115 116 color: #c4182e;
116   - font-size: 40rpx;
  117 + font-size: 32rpx;
117 118 width: 200rpx;
118 119 height: 40rpx;
119 120 text-align: right;
... ... @@ -121,8 +122,7 @@
121 122  
122 123 .center .cen_jg .cen_sl {
123 124 color: black;
124   - font-size: 32rpx;
125   - font-weight: bold;
  125 + font-size: 26rpx;
126 126 width: 200rpx;
127 127 height: 38rpx;
128 128 }
... ... @@ -137,20 +137,20 @@
137 137 }
138 138  
139 139 .quhou .qu_fs {
140   - font-size: 38rpx;
  140 + font-size: 30rpx;
141 141 display: flex;
142   - height: 80rpx;
  142 + height: 60rpx;
143 143 margin-left: 25rpx;
144 144 line-height: 62rpx;
145 145 }
146 146  
147 147 .quhou .qu_fs image {
148   - width: 46rpx;
149   - height: 46rpx;
  148 + width: 34rpx;
  149 + height: 34rpx;
150 150 margin-right: 18rpx;
151 151 vertical-align: center;
152 152 position: relative;
153   - top:8rpx
  153 + top:14rpx
154 154 }
155 155  
156 156 .quhou .qu_fs .qu_wz {}
... ... @@ -161,14 +161,14 @@
161 161 background-color: white;
162 162 padding: 20rpx 10rpx;
163 163 margin-top: 20rpx;
164   - font-size: 36rpx;
  164 + font-size: 28rpx;
165 165 }
166 166  
167 167 .chentuan .ct_one {
168 168 height: 40rpx;
169 169 margin-bottom: 10rpx;
170 170 display: flex;
171   - width: 100%;
  171 + width: 708rpx;
172 172 }
173 173  
174 174 .chentuan .ct_one .ct_one_left {
... ... @@ -177,7 +177,6 @@
177 177  
178 178 .chentuan .ct_one .ct_one_right {
179 179 text-align: right;
180   - margin-left: 358rpx;
181 180 width: 200rpx;
182 181 }
183 182  
... ... @@ -190,7 +189,7 @@
190 189 width: 100%;
191 190 min-height: 80rpx;
192 191 line-height: 80rpx;
193   - font-size: 38rpx;
  192 + font-size: 30rpx;
194 193 position: fixed;
195 194 bottom: 0;
196 195 text-align: right;
... ... @@ -208,7 +207,7 @@
208 207 .zf .zf_btn {
209 208 color: white;
210 209 background-color: #c4182e;
211   - font-size: 30rpx;
  210 + font-size: 28rpx;
212 211 width: 170rpx;
213 212 text-align: center;
214 213 line-height: 80rpx;
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -1478,8 +1478,6 @@ Page({
1478 1478 });
1479 1479 th.data.wk_order_id=odr.order_id;
1480 1480 }
1481   -
1482   -
1483 1481 }
1484 1482 },
1485 1483 });
... ... @@ -2562,6 +2560,13 @@ Page({
2562 2560 go_pay_wk:function () {
2563 2561 var url = "/pages/cart/cart_wk/cart_wk?order_id="+ this.data.wk_order_id;
2564 2562 getApp().goto(url);
  2563 + },
  2564 +
  2565 + pop_err_img:function(e){
  2566 + var txt = e.currentTarget.dataset.errorimg;
  2567 + var ob={};
  2568 + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  2569 + this.setData(ob);
2565 2570 }
2566 2571  
2567 2572 });
2568 2573 \ No newline at end of file
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -2,9 +2,7 @@
2 2 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
3 3  
4 4 <wxs module="" src="filter.wxs"></wxs>
5   -
6 5 <block wx:if="{{isshow}}">
7   -
8 6 <view class="container">
9 7 <view class="type-navbar">
10 8 <view class="type-box" wx:for="{{categories}}" wx:key="categories">
... ... @@ -712,7 +710,7 @@
712 710 <view class="pding">
713 711 <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon>
714 712 <view class="spec-goods">
715   - <image class="wh100 spec-img" src="{{data.original_img}}" binderror="" data-errorimg="data.original_img"></image>
  713 + <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
716 714 <view class="spec-goods-info">
717 715 <view class="spec-goods-name">{{data.goods_name}}</view>
718 716 <view class="spec-goods-price" wx:if="{{prom_price==null}}">¥ {{sele_g.shop_price}}</view>
... ... @@ -797,7 +795,7 @@
797 795 <view class="pding">
798 796 <icon bindtap="closeSpecModal" class="modal-close" color="gray" size="22" type="cancel"></icon>
799 797 <view class="spec-goods">
800   - <image class="wh100 spec-img" src="{{data.original_img}}" binderror="" data-errorimg="data.original_img"></image>
  798 + <image class="wh100 spec-img" src="{{data.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
801 799 <view class="spec-goods-info">
802 800 <view class="spec-goods-name">{{data.goods_name}}</view>
803 801 <view class="spec-goods-price" wx:if="{{is_normal==1}}">¥ {{sele_g.shop_price}}
... ...
pages/team/team_ping/team_ping.wxss
... ... @@ -284,7 +284,7 @@ margin-right: 20rpx;
284 284 display: inline-block;
285 285 width: 33.33%;
286 286 color: #777777;
287   - font-size: 36rpx;
  287 + font-size: 32rpx;
288 288 }
289 289 .on{ color:#e4374d;
290 290 border-bottom: 5rpx solid #e4374d;}
... ...
pages/team/team_show/team_show.wxml
... ... @@ -184,11 +184,19 @@
184 184 <view class='buy-option'>
185 185 <!--头部图片-->
186 186 <view class='buy-top'>
187   - <view class='buy-image'>
  187 + <view class='buy-image mimg'>
188 188 <image src='{{image}}'></image>
189   - <span class='t1'>¥</span>
190   - <text class='t2'>{{teamlist.price}}</text>
  189 + <view style='float:left'>
  190 + <view>
  191 + <span class='t1'>¥</span><text class='t2'>{{teamlist.price}}</text>
  192 + </view>
  193 + <view class="ellipsis-1">
  194 + {{goods.goods_name}}
  195 + </view>
  196 + </view>
  197 +
191 198 </view>
  199 +
192 200 <view class='buy-cou' bindtap='cbcou'>⊗</view>
193 201 <view class='clear'></view>
194 202 </view>
... ...
pages/team/team_show/team_show.wxss
... ... @@ -589,7 +589,6 @@ flex-grow:1.7;
589 589 }
590 590  
591 591 .buy-image text {
592   - float: left;
593 592 margin-left: 10rpx;
594 593 color: red;
595 594 }
... ... @@ -709,7 +708,7 @@ flex-grow:1.7;
709 708  
710 709 .buy-image {
711 710 margin-right: 20rpx;
712   - width: 320rpx;
  711 + width: 630rpx;
713 712 height: 200rpx;
714 713 float: left;
715 714 }
... ... @@ -722,8 +721,8 @@ flex-grow:1.7;
722 721 margin-right: 16rpx;
723 722 }
724 723  
  724 +
725 725 .buy-image text {
726   - float: left;
727 726 margin-left: 10rpx;
728 727 color: red;
729 728 }
... ... @@ -742,7 +741,6 @@ flex-grow:1.7;
742 741 }
743 742  
744 743 .t1 {
745   - float: left;
746 744 font-size: 28rpx;
747 745 padding-left: 4rpx;
748 746 color: red;
... ...
pages/team/team_success/team_success.js
... ... @@ -658,6 +658,14 @@ Page({
658 658 go_pay_wk:function(){
659 659 var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id;
660 660 getApp().goto(url);
  661 + },
  662 +
  663 + img_show_err:function(e){
  664 + var err_img = e.currentTarget.dataset.err;
  665 + var ob={};
  666 + ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  667 + this.setData(ob);
  668 +
661 669 }
662 670  
663 671 })
... ...
pages/team/team_success/team_success.wxml
... ... @@ -4,7 +4,7 @@
4 4  
5 5 <view class='center'>
6 6 <view class='cenleft'>
7   - <image src='{{image}}'></image>
  7 + <image src='{{image}}' binderror='img_show_err' data-err="image"></image>
8 8 </view>
9 9 <view class='cenright'>
10 10 <!----//图片区域---->
... ...
pages/user/add_address/add_address.js
... ... @@ -50,9 +50,18 @@ Page({
50 50 var a= this.data.address, b=a,th=this;
51 51 Object.assign(a, s.detail.value), a.is_default = Number(a.is_default);
52 52 a.store_id = os.stoid;
  53 +
  54 + var ob = ut.check_mobile(a.mobile);
  55 + if(ob.code!=1){
  56 + return getApp().my_warnning(ob.title,0,th);
  57 + }
  58 +
53 59 if (a.more_address == null || a.more_address == undefined || a.more_address=="" ){
54   - wx.showModal({title: "请选择地区"}); return false;
  60 + getApp().my_warnning("请选择地区",0,th);
  61 + return false;
55 62 }
  63 +
  64 +
56 65 //判断是不是空对象
57 66 //--------如果是修改地址----------
58 67 if (!th.data.isnew){
... ...
pages/user/add_address/add_address.json
1 1 {
2 2 "navigationBarTitleText": "收货地址",
3   - "enablePullDownRefresh": false
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
4 7 }
5 8 \ No newline at end of file
... ...
pages/user/add_address/add_address.wxml
... ... @@ -7,7 +7,7 @@
7 7 </view>
8 8 <view class="item">
9 9 <view class="item-name">手机号码:</view>
10   - <input class="item-input" name="mobile" value="{{address.mobile}}"></input>
  10 + <input type="number" class="item-input" name="mobile" value="{{address.mobile}}"></input>
11 11 </view>
12 12 <view bindtap="openRegionsModal" class="item" data-id="0">
13 13 <view class="item-name">所在地区:</view>
... ... @@ -31,3 +31,5 @@
31 31 </form>
32 32 </view>
33 33 <template is="regions" data="{{regions:regions}}"></template>
  34 +
  35 +<warn id="warn"></warn>
... ...
pages/user/express/express.js
... ... @@ -6,6 +6,7 @@ Page({
6 6 resourceUrl: e.globalData.setting.imghost,
7 7 delivery: null,
8 8 express: null,
  9 + re_arr:null,//反转后的数组
9 10 error: "快递信息异常"
10 11 },
11 12 onLoad: function(e) {
... ... @@ -27,9 +28,9 @@ Page({
27 28 wx.request({
28 29 url: this.data.url + "/api/weshop/order/wuliu/" + this.data.delivery.shipping_code + "/" + this.data.delivery.invoice_no, success: function(e) {
29 30  
30   - console.log("success", e.data.data.data);
  31 + var re_arr = e.data.data.Traces.reverse();
31 32 s.setData({
32   - express: e.data.data,
  33 + express: e.data.data, re_arr: re_arr,
33 34 });
34 35 },
35 36 fail: function(s) {
... ...
pages/user/express/express.wxml
... ... @@ -4,19 +4,30 @@
4 4 <view class="logistics-cont">{{delivery.invoice_no}}</view>
5 5 </view>
6 6 <view class="logistics-num">
7   - <view class="logistics-title">国内承运人 : </view>
  7 + <view class="logistics-title">承运公司 : </view>
8 8 <view class="logistics-cont">{{delivery.shipping_name}}</view>
9 9 </view>
  10 +
  11 + <view class="logistics-num">
  12 + <view class="logistics-title">物流状态 : </view>
  13 + <view wx:if="{{express.State==2}}" class="logistics-cont">在途中</view>
  14 + <view wx:if="{{express.State==3}}" class="logistics-cont">已签收</view>
  15 + <view wx:if="{{express.State==4}}" class="logistics-cont">问题件</view>
  16 + </view>
  17 +
10 18 </view>
11 19 <view class="apply-state">
12 20 <view class="state-item">
13   - <view class="item-wrap" wx:if="{{express.status!='200'}}">
14   - <view class="state-title">{{express.message}}</view>
  21 + <!-- <view class="item-wrap">
  22 + <view wx:if="{{express.State==2}}" class="state-title">在途中</view>
  23 + <view wx:if="{{express.State==3}}" class="state-title">已签收</view>
  24 + <view wx:if="{{express.State==4}}" class="state-title">问题件</view>
15 25 <view class="state-time">{{' '}}</view>
16   - </view>
17   - <view class="item-wrap" wx:for="{{express.data}}" wx:key="{{index}}">
18   - <view class="state-title">{{item.context}}</view>
19   - <view class="state-time">{{item.time}}</view>
  26 + </view> -->
  27 +
  28 + <view class="item-wrap" wx:for="{{re_arr}}" wx:key="{{index}}">
  29 + <view class="state-title">{{item.AcceptStation}}</view>
  30 + <view class="state-time">{{item.AcceptTime}}</view>
20 31 </view>
21 32 </view>
22 33 </view>
... ...
pages/user/express/express.wxss
... ... @@ -27,7 +27,7 @@
27 27  
28 28 .state-item {
29 29 border-left: 1px solid #ccc;
30   - padding-left: 40rpx;
  30 + padding:0 40rpx;
31 31 }
32 32  
33 33 .item-wrap {
... ... @@ -57,4 +57,5 @@
57 57 font-weight: bold;
58 58 color: #666;
59 59 padding-bottom: 20rpx;
  60 + line-height: 40rpx
60 61 }
61 62 \ No newline at end of file
... ...
pages/user/index/index.wxss
... ... @@ -42,9 +42,9 @@
42 42 }
43 43 .xc-uesr-name{
44 44 color: #fff;
45   - font-size: 35rpx;
  45 + font-size: 32rpx;
46 46 margin-top:17rpx;
47   - margin-left:20rpx;
  47 + margin-left:20rpx;
48 48  
49 49 }
50 50 .xc-user-grade{
... ... @@ -525,6 +525,8 @@ border-radius:20rpx;
525 525 background:#ffbdce;
526 526 padding-left: 16rpx;
527 527 padding-right: 16rpx;padding-bottom: 3rpx;
  528 +margin-right: 5rpx;
  529 +
528 530 }
529 531  
530 532 .hvip{display: inline-block; font-size: 20rpx; height: 40rpx;line-height: 40rpx; color:#e7bf77; background: #383838; padding: 0 15rpx; border-radius:20rpx; vertical-align: middle }
... ...
pages/user/order_detail/order_detail.js
... ... @@ -137,7 +137,7 @@ Page({
137 137 var t = this, o = this.data.order.order_id,order=this.data.order;
138 138 var is_zsorder=order.is_zsorder;
139 139 wx.showModal({
140   - title: "是否确定收货",
  140 + title: "是否确认收货?",
141 141 success: function(e) {
142 142 e.confirm && r.put("/api/weshop/order/updatebyId", {
143 143 data: {
... ...
pages/user/order_detail/order_detail.wxml
... ... @@ -99,7 +99,7 @@
99 99 <view>¥ {{order.order_prom_amount}}元</view>
100 100 </view>
101 101  
102   - <view class="item" wx:if="{{order.pt_tail_money>0}}">
  102 + <view class="item">
103 103 <view>订单总价</view>
104 104 <view>¥ {{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money)}}元</view>
105 105 </view>
... ...
pages/user/order_list/order_list.js
... ... @@ -234,7 +234,7 @@ Page({
234 234 console.log(is_zsorder);
235 235  
236 236 wx.showModal({
237   - title: "是否确定收货",
  237 + title: "是否确认收货?",
238 238 success: function(t) {
239 239 t.confirm && rq.put("/api/weshop/order/updatebyId", {
240 240 data: {
... ...
pages/user/userqy/userqy.wxml
... ... @@ -40,7 +40,7 @@
40 40 [{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum }}可保级
41 41 </block>
42 42 </view>
43   - <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}">会员将在{{filter.replace_time(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计成长值≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum}}可保级</text>
  43 + <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}">会员将在{{filter.replace_time2(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计成长值≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum}}可保级</text>
44 44 </view>
45 45 <view class=" abs white discounts four-level-word" wx:if="{{gradeId!=item.Id && cz_val>item.BuyGradeSum }}">
46 46 [{{item.GradeName}}]365天累计成长值≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}]
... ...
pages/user/userqy/userqy.wxss
... ... @@ -177,7 +177,7 @@ margin-top:60rpx;
177 177 .li .discounts{
178 178 top:115rpx;
179 179 left: 36rpx;
180   - width: 435rpx;
  180 + width: 440rpx;
181 181 }
182 182 .li .money{
183 183 left: 41rpx;
... ...
utils/util.js
... ... @@ -230,6 +230,22 @@ function measureText(text, fontSize = 10) {
230 230 return width * fontSize / 10;
231 231 }
232 232  
  233 +//验证手机号
  234 +function check_mobile(phoneMobile){
  235 + var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
  236 + var ob={code:1};
  237 + if (phoneMobile.length === 0) {
  238 + ob.title='输入的手机号为空';
  239 + ob.code=-1;
  240 + } else if (phoneMobile.length < 11) {
  241 + ob.title ='手机号长度有误!';
  242 + ob.code = -1;
  243 + } else if (!myreg.test(phoneMobile)) {
  244 + ob.title = '手机号格式有误!';
  245 + ob.code = -1;
  246 + }
  247 + return ob;
  248 +}
233 249  
234 250 module.exports = {
235 251 formatTime: function(e, r) {
... ... @@ -319,4 +335,5 @@ module.exports = {
319 335 isArray: isArray,
320 336 sub_last: sub_last,//去掉末尾一个字符
321 337 measureText: measureText,//画布需要的函数
  338 + check_mobile: check_mobile,//验证手机
322 339 };
... ...