Commit 0be84011e4d0f3f71b7cbd664d0826bf653e79c7
Merge branch 'dev_20191114' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev_20191114
Showing
4 changed files
with
250 additions
and
74 deletions
pages/user/userinfo/userinfo.js
@@ -5,7 +5,7 @@ function e(e, a, r) { | @@ -5,7 +5,7 @@ function e(e, a, r) { | ||
5 | configurable: !0, | 5 | configurable: !0, |
6 | writable: !0 | 6 | writable: !0 |
7 | }) : e[a] = r, e; | 7 | }) : e[a] = r, e; |
8 | -} | 8 | +} |
9 | 9 | ||
10 | var a = getApp(), | 10 | var a = getApp(), |
11 | r = a.globalData.setting, | 11 | r = a.globalData.setting, |
@@ -50,6 +50,13 @@ Page({ | @@ -50,6 +50,13 @@ Page({ | ||
50 | isstcsp:1,//是否启动密码消费 | 50 | isstcsp:1,//是否启动密码消费 |
51 | isGender:1,//什么性别 | 51 | isGender:1,//什么性别 |
52 | iscalendar:1,//是否是农历 | 52 | iscalendar:1,//是否是农历 |
53 | + consumption:"",//消费密码 | ||
54 | + identity_card:"",//身份证值 | ||
55 | + address:"",//地址 | ||
56 | + openid:"",//openid | ||
57 | + pulscardname:"",//puls会员的卡 | ||
58 | + gradename:"",//会员权益的卡 | ||
59 | + isBool:"", | ||
53 | }, | 60 | }, |
54 | //是否启动密码消费 | 61 | //是否启动密码消费 |
55 | isstcsp:function(){ | 62 | isstcsp:function(){ |
@@ -80,24 +87,21 @@ Page({ | @@ -80,24 +87,21 @@ Page({ | ||
80 | } | 87 | } |
81 | }, | 88 | }, |
82 | //性别 | 89 | //性别 |
83 | - isGender:function(){ | 90 | + isGender:function(e){ |
84 | var th = this; | 91 | var th = this; |
85 | - | ||
86 | - var isGender = th.data.isGender; | ||
87 | - if (isGender == 2) { | 92 | + var sex = e.currentTarget.dataset.sex; |
93 | + console.log("点击选择性别",sex); | ||
88 | th.setData({ | 94 | th.setData({ |
89 | - isGender: 1 | 95 | + isGender:sex |
90 | }) | 96 | }) |
91 | - } else { | ||
92 | - th.setData({ | ||
93 | - isGender: 2 | ||
94 | - }) | ||
95 | - } | 97 | + |
98 | + | ||
96 | }, | 99 | }, |
97 | //密码是否隐藏显示 | 100 | //密码是否隐藏显示 |
98 | ispwhid:function(){ | 101 | ispwhid:function(){ |
99 | var th = this; | 102 | var th = this; |
100 | var ispwhid = th.data.ispwhid; | 103 | var ispwhid = th.data.ispwhid; |
104 | + | ||
101 | if (ispwhid == 0) { | 105 | if (ispwhid == 0) { |
102 | th.setData({ | 106 | th.setData({ |
103 | ispwhid: 1 | 107 | ispwhid: 1 |
@@ -139,7 +143,6 @@ Page({ | @@ -139,7 +143,6 @@ Page({ | ||
139 | var th = this; | 143 | var th = this; |
140 | var item = null; | 144 | var item = null; |
141 | var openindstore = th.data.open_ind_store; | 145 | var openindstore = th.data.open_ind_store; |
142 | - | ||
143 | if (th.data.choice_sort_store == 0) { | 146 | if (th.data.choice_sort_store == 0) { |
144 | var index = th.data.fir_pick_index; | 147 | var index = th.data.fir_pick_index; |
145 | if (th.data.is_show_sto_cat == 1) { | 148 | if (th.data.is_show_sto_cat == 1) { |
@@ -156,6 +159,7 @@ Page({ | @@ -156,6 +159,7 @@ Page({ | ||
156 | console.log("选择门店刷新", "def_pick_store", item); | 159 | console.log("选择门店刷新", "def_pick_store", item); |
157 | th.setData({ | 160 | th.setData({ |
158 | def_pick_store: item, | 161 | def_pick_store: item, |
162 | + stoname: item.pickup_name, | ||
159 | sto_sele_name: item.pickup_name, | 163 | sto_sele_name: item.pickup_name, |
160 | sto_sele_id: item.pickup_id, | 164 | sto_sele_id: item.pickup_id, |
161 | sto_sele_distr: item.distr_type, | 165 | sto_sele_distr: item.distr_type, |
@@ -173,14 +177,12 @@ Page({ | @@ -173,14 +177,12 @@ Page({ | ||
173 | th.setData({ | 177 | th.setData({ |
174 | openSpecModal: !0, | 178 | openSpecModal: !0, |
175 | openSpecModal_ind: openindstore, | 179 | openSpecModal_ind: openindstore, |
176 | - | ||
177 | openSpecModal_pt: 1 | 180 | openSpecModal_pt: 1 |
178 | }); | 181 | }); |
179 | } | 182 | } |
180 | }, | 183 | }, |
181 | choose_for_store_fir: function(e) { | 184 | choose_for_store_fir: function(e) { |
182 | var index_c = e.currentTarget.dataset.ind; | 185 | var index_c = e.currentTarget.dataset.ind; |
183 | - | ||
184 | this.setData({ | 186 | this.setData({ |
185 | fir_pick_index: index_c | 187 | fir_pick_index: index_c |
186 | }) | 188 | }) |
@@ -202,13 +204,11 @@ Page({ | @@ -202,13 +204,11 @@ Page({ | ||
202 | if (th.data.is_gps == 0) { | 204 | if (th.data.is_gps == 0) { |
203 | getApp().confirmBox("请开启GPS定位", null, 10000, !1); | 205 | getApp().confirmBox("请开启GPS定位", null, 10000, !1); |
204 | } | 206 | } |
205 | - | ||
206 | } else { | 207 | } else { |
207 | th.setData({ | 208 | th.setData({ |
208 | is_gps: "3" | 209 | is_gps: "3" |
209 | }); | 210 | }); |
210 | } | 211 | } |
211 | - | ||
212 | th.data.is_get_local_ok = 1; | 212 | th.data.is_get_local_ok = 1; |
213 | } | 213 | } |
214 | }) | 214 | }) |
@@ -502,10 +502,57 @@ Page({ | @@ -502,10 +502,57 @@ Page({ | ||
502 | }, | 502 | }, |
503 | //------初始化加载---------- | 503 | //------初始化加载---------- |
504 | onLoad: function(t) { | 504 | onLoad: function(t) { |
505 | - var th = this; | ||
506 | - th.setData({ | ||
507 | - isGender:th.data.user.sex | ||
508 | - })//设置性别 | 505 | + this.puls_user(); |
506 | + this.equity_user(); | ||
507 | + this.initial_user(); | ||
508 | + }, | ||
509 | + //-----------会员是否初始化--------------------- | ||
510 | + initial_user: function () { | ||
511 | + | ||
512 | + var th = this; | ||
513 | + getApp().request.get("/api/weshop/users/grade/vip/init/get", { | ||
514 | + data: { | ||
515 | + storeId: r.stoid, | ||
516 | + }, | ||
517 | + success: function (su) { | ||
518 | + var isBool = su.data.data.isBool; | ||
519 | + console.log("会员是否初始化", isBool); | ||
520 | + th.setData({isBool:isBool}); | ||
521 | + } | ||
522 | + }); | ||
523 | + }, | ||
524 | + //-----会员等级卡获取--------------- | ||
525 | + equity_user:function(){ | ||
526 | + var th = this; | ||
527 | + getApp().request.get("/api/weshop/users/grade/aftervipinfo/get", { | ||
528 | + data: { | ||
529 | + storeId: r.stoid, | ||
530 | + userId: getApp().globalData.user_id, | ||
531 | + }, | ||
532 | + success: function (su) { | ||
533 | + var gradename=su.data.data.GradeName; | ||
534 | + th.setData({gradename: gradename}); | ||
535 | + | ||
536 | + } | ||
537 | + }); | ||
538 | + }, | ||
539 | + | ||
540 | + //-----Plus会员获取----------- | ||
541 | + puls_user:function(){ | ||
542 | + var th=this; | ||
543 | + getApp().request.get("/api/weshop/plus/vip/mem/list", { | ||
544 | + data: { | ||
545 | + storeId: r.stoid, | ||
546 | + userId: getApp().globalData.user_id, }, | ||
547 | + success: function (su) { | ||
548 | + | ||
549 | + if (su.data.code == 0) { | ||
550 | + var cardname=su.data.data[0].MemCardName; | ||
551 | + console.log("卡的名字", cardname); | ||
552 | + th.setData({pulscardname:cardname}); | ||
553 | + } | ||
554 | + } | ||
555 | + }); | ||
509 | }, | 556 | }, |
510 | onShow: function() { | 557 | onShow: function() { |
511 | 558 | ||
@@ -522,8 +569,7 @@ Page({ | @@ -522,8 +569,7 @@ Page({ | ||
522 | if (a.pickup_id!=null) { | 569 | if (a.pickup_id!=null) { |
523 | req.get("/api/weshop/pickup/get/" + r.stoid + "/" + a.pickup_id, { | 570 | req.get("/api/weshop/pickup/get/" + r.stoid + "/" + a.pickup_id, { |
524 | success: function(da) { | 571 | success: function(da) { |
525 | - console.log('getsto'); | ||
526 | - console.log(da); | 572 | + |
527 | //设置门店 | 573 | //设置门店 |
528 | e.setData({ | 574 | e.setData({ |
529 | stoname: da.data.data.pickup_name | 575 | stoname: da.data.data.pickup_name |
@@ -531,13 +577,18 @@ Page({ | @@ -531,13 +577,18 @@ Page({ | ||
531 | } | 577 | } |
532 | }) | 578 | }) |
533 | } | 579 | } |
534 | - var phone = ""; | ||
535 | - phone+=a.mobile.substr(0, 3)+"****"; | ||
536 | - phone += a.mobile.substr(7, 12); | 580 | + // var phone = ""; |
581 | + // phone+=a.mobile.substr(0, 3)+"****"; | ||
582 | + // phone += a.mobile.substr(7, 12); | ||
583 | + | ||
584 | + | ||
537 | e.setData({ | 585 | e.setData({ |
538 | - phone:phone, | ||
539 | - user: a | 586 | + phone: a.mobile, |
587 | + user: a, | ||
588 | + openid: a.openid, | ||
589 | + consumption: a.paypwd, | ||
540 | }); | 590 | }); |
591 | + | ||
541 | e.setData({ | 592 | e.setData({ |
542 | isGender:e.data.user.sex | 593 | isGender:e.data.user.sex |
543 | }) | 594 | }) |
@@ -585,4 +636,118 @@ Page({ | @@ -585,4 +636,118 @@ Page({ | ||
585 | tc_hide: true, | 636 | tc_hide: true, |
586 | }); | 637 | }); |
587 | }, | 638 | }, |
639 | + //消费密码输入框失去焦点事件 | ||
640 | + lose_focus:function(e){ | ||
641 | + var th=this; | ||
642 | + var val=e.detail.value; | ||
643 | + console.log("是什么东西",val); | ||
644 | + if (val.length > 6 || val!=""){ | ||
645 | + | ||
646 | + this.setData({ consumption: val }); | ||
647 | + } | ||
648 | + | ||
649 | + | ||
650 | + }, | ||
651 | + | ||
652 | +//地址 | ||
653 | + address:function(e){ | ||
654 | + var val = e.detail; | ||
655 | + console.log("地址55555555", val.value); | ||
656 | + this.setData({ address: val.value }); | ||
657 | + }, | ||
658 | + | ||
659 | + //身份证验证 | ||
660 | + identity_card:function(e){ | ||
661 | + var val = e.detail; | ||
662 | + | ||
663 | + this.setData({ identity_card: val.value }); | ||
664 | + | ||
665 | + }, | ||
666 | + //用户名字 | ||
667 | + user_name:function(e){ | ||
668 | + var name = e.detail.value; | ||
669 | + if (name !=""||name!=null){ | ||
670 | + | ||
671 | + this.setData({ user_name: name }); | ||
672 | + | ||
673 | + } | ||
674 | + | ||
675 | + }, | ||
676 | + | ||
677 | + //点击确认修改信息 | ||
678 | + confirm_revision:function(){ | ||
679 | + var th=this; | ||
680 | + var phone=th.data.phone;//手机号码 | ||
681 | + if (phone == "" || phone==null){ | ||
682 | + getApp().my_warnning("手机不能为空", 0, th); | ||
683 | + | ||
684 | + return false; | ||
685 | + } | ||
686 | + var consumption = th.data.consumption;//消费密码 | ||
687 | + var isstcsp = th.data.isstcsp; | ||
688 | + if(isstcsp==1){ | ||
689 | + if (consumption.length < 6 && consumption==""){ | ||
690 | + getApp().my_warnning("消费密码不能为空及小于6位数", 0, th); | ||
691 | + return false; | ||
692 | + } | ||
693 | + } | ||
694 | + var sex = th.data.isGender;//性别 | ||
695 | + console.log(sex,"性别"); | ||
696 | + if (sex!="1"&&sex!="2" ) { | ||
697 | + getApp().my_warnning("请选择性别", 0, th); | ||
698 | + return false; | ||
699 | + } | ||
700 | + var user_name = th.data.user.vipname;//用户姓名 | ||
701 | + if (user_name == ""&& user_name!= null) { | ||
702 | + getApp().my_warnning("请输入名字", 0, th); | ||
703 | + return false; | ||
704 | + } | ||
705 | + var identity_card = th.data.identity_card;//身份证 | ||
706 | + console.log("身份证",identity_card); | ||
707 | + | ||
708 | + if (identity_card == "" && identity_card != null ) { | ||
709 | + getApp().my_warnning("请输入身份证", 0, th); | ||
710 | + return false; | ||
711 | + } else if (!(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))){ | ||
712 | + getApp().my_warnning("身份证号码错误",0, th); | ||
713 | + return false; | ||
714 | + } | ||
715 | + var address = th.data.address;//地址 | ||
716 | + console.log("地址1010101", address) | ||
717 | + if (address == "" && address != null) { | ||
718 | + getApp().my_warnning("请输入地址", 0, th); | ||
719 | + return false; | ||
720 | + } | ||
721 | + //保存所属门店的id | ||
722 | + var sto_sele_id=th.data.sto_sele_id; | ||
723 | + console.log("请输入所属门店的id", sto_sele_id); | ||
724 | + if (sto_sele_id == null && sto_sele_id==""){ | ||
725 | + getApp().my_warnning("请输入所属门店", 0, th); | ||
726 | + } | ||
727 | + console.log("要保存的数据", sex, consumption, identity_card, address, user_name); | ||
728 | + var datas = { | ||
729 | + mobile: phone,//手机号码 | ||
730 | + store_id: r.stoid, | ||
731 | + user_id: getApp().globalData.user_id, | ||
732 | + openid: th.data.openid, | ||
733 | + paypwd: consumption,//消费密码 | ||
734 | + sex: sex,//性别 | ||
735 | + nickname:user_name,//昵称 | ||
736 | + idcard:identity_card,//身份证 | ||
737 | + address:address, | ||
738 | + } | ||
739 | + getApp().request.put("/api/weshop/users/update", { | ||
740 | + data: datas, | ||
741 | + success: function (res) { | ||
742 | + | ||
743 | + if (res.data.code==0){ | ||
744 | + getApp().showWarning("修改成功"); | ||
745 | + }else{ | ||
746 | + getApp().showWarning("修改失败"); | ||
747 | + } | ||
748 | + | ||
749 | + } | ||
750 | + }) | ||
751 | + } | ||
752 | + | ||
588 | }); | 753 | }); |
589 | \ No newline at end of file | 754 | \ No newline at end of file |
pages/user/userinfo/userinfo.json
pages/user/userinfo/userinfo.wxml
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | 3 | ||
4 | <!-- 头像,昵称,多个卡 --> | 4 | <!-- 头像,昵称,多个卡 --> |
5 | <view class="head flex-space-between"> | 5 | <view class="head flex-space-between"> |
6 | - <view class="flex-center"> | 6 | + <view class="flex-center"> |
7 | 7 | ||
8 | <view class="flex-center"> | 8 | <view class="flex-center"> |
9 | <image class="Headportrait" src="{{user.head_pic}}"></image> | 9 | <image class="Headportrait" src="{{user.head_pic}}"></image> |
@@ -16,18 +16,22 @@ | @@ -16,18 +16,22 @@ | ||
16 | </view> | 16 | </view> |
17 | 17 | ||
18 | <view class="flex-center fs22 vip"> | 18 | <view class="flex-center fs22 vip"> |
19 | + <block wx:if="{{isBool&&gradename}}"> | ||
19 | <navigator url=""> | 20 | <navigator url=""> |
20 | <view class="flex-center AncrownMax"> | 21 | <view class="flex-center AncrownMax"> |
21 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> | 22 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> |
22 | - <view>黑卡会员</view> | 23 | + <view>{{gradename}}</view> |
23 | </view> | 24 | </view> |
24 | </navigator> | 25 | </navigator> |
26 | + </block> | ||
27 | + <block wx:if="{{user.card_field!=''&& user.card_field!=null && user.card_expiredate!=null&&user.card_expiredate!=null}}"> | ||
25 | <navigator url="/pages/user/plus/plus"> | 28 | <navigator url="/pages/user/plus/plus"> |
26 | <view class="flex-center plusMax"> | 29 | <view class="flex-center plusMax"> |
27 | <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 30 | <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
28 | - <view>PULS会员</view> | 31 | + <view>{{pulscardname}}</view> |
29 | </view> | 32 | </view> |
30 | </navigator> | 33 | </navigator> |
34 | + </block> | ||
31 | </view> | 35 | </view> |
32 | </view> | 36 | </view> |
33 | </view> | 37 | </view> |
@@ -67,46 +71,37 @@ | @@ -67,46 +71,37 @@ | ||
67 | 消费密码 | 71 | 消费密码 |
68 | </view> | 72 | </view> |
69 | <view class="flex"> | 73 | <view class="flex"> |
70 | - <block wx:if="{{ispwhid}}"> | ||
71 | - <input class="fs28 hion user-txt-right" maxlength="6" value="{{user.paypwd.length>0?user.paypwd:'******'}}" type="number" password="true"/> | ||
72 | - </block> | ||
73 | - <block wx:else> | ||
74 | - <input class="fs20 hion user-txt-right" maxlength="6" value="{{user.paypwd.length>0?user.paypwd:'未设置'}}" type="number"/> | ||
75 | - </block> | 74 | + <block wx:if="{{ispwhid}}"> |
75 | + <input bindblur="lose_focus" class="fs28 hion user-txt-right"value="{{consumption}}" password="true"/> | ||
76 | + </block> | ||
77 | + <block wx:else> | ||
78 | + <input bindblur="lose_focus" class="fs28 hion user-txt-right"value="{{consumption}}"/> | ||
79 | + </block> | ||
80 | + | ||
76 | <block wx:if="{{ispwhid}}"> | 81 | <block wx:if="{{ispwhid}}"> |
77 | <image class="eye" src="{{iurl}}/miniapp/images/userinfo/userinfo/Eye.png" bindtap="ispwhid"></image> | 82 | <image class="eye" src="{{iurl}}/miniapp/images/userinfo/userinfo/Eye.png" bindtap="ispwhid"></image> |
78 | </block> | 83 | </block> |
79 | <block wx:else> | 84 | <block wx:else> |
80 | - <image class="eye" src="../../../images/open_eye.png" bindtap="ispwhid"></image> | 85 | + <image class="eye" src="{{iurl}}/miniapp/images/userinfo/open_eye.png" bindtap="ispwhid"></image> |
81 | </block> | 86 | </block> |
82 | - | ||
83 | - </view> | 87 | + |
88 | +</view> | ||
84 | </view> | 89 | </view> |
85 | 90 | ||
86 | 91 | ||
87 | - | ||
88 | - | ||
89 | - | ||
90 | - | ||
91 | - | ||
92 | - | ||
93 | - | ||
94 | - | ||
95 | - | ||
96 | - | ||
97 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex"> | 92 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex"> |
98 | <view>性别</view> | 93 | <view>性别</view> |
99 | - <view class="flex" wx:if="{{isGender!=0}}"> | ||
100 | - <view class="flex-center {{isGender==1?'Gendercheck':'Gender'}}" bindtap="isGender"> | 94 | + <view class="flex"> |
95 | + <view class="flex-center {{isGender==1?'Gendercheck':'Gender'}}" data-sex="1" bindtap="isGender"> | ||
101 | <block wx:if="{{isGender==1}}"> | 96 | <block wx:if="{{isGender==1}}"> |
102 | <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/malealready.png"></image> | 97 | <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/malealready.png"></image> |
103 | </block> | 98 | </block> |
104 | <block wx:else> | 99 | <block wx:else> |
105 | - <image class="GenderImage" src="../../../images/userinfo/malenot.png"></image> | 100 | + <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/malenot.png"></image> |
106 | </block> | 101 | </block> |
107 | <view class="fs24">男</view> | 102 | <view class="fs24">男</view> |
108 | </view> | 103 | </view> |
109 | - <view class="flex-center {{isGender==2?'Gendercheck':'Gender'}}" bindtap="isGender"> | 104 | + <view class="flex-center {{isGender==2?'Gendercheck':'Gender'}}" data-sex="2"bindtap="isGender" > |
110 | <block wx:if="{{isGender==2}}"> | 105 | <block wx:if="{{isGender==2}}"> |
111 | <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/femalealready.png"></image> | 106 | <image class="GenderImage" src="{{iurl}}/miniapp/images/userinfo/userinfo/femalealready.png"></image> |
112 | </block> | 107 | </block> |
@@ -116,16 +111,14 @@ | @@ -116,16 +111,14 @@ | ||
116 | <view class="fs26">女</view> | 111 | <view class="fs26">女</view> |
117 | </view> | 112 | </view> |
118 | </view> | 113 | </view> |
119 | - <view class="user-txt-right" wx:if="{{isGender==0}}" bindtap="isGender">保密</view> | 114 | + |
120 | </view> | 115 | </view> |
121 | 116 | ||
122 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex"> | 117 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="sex"> |
123 | <view>出生日期</view> | 118 | <view>出生日期</view> |
124 | - | ||
125 | - | ||
126 | <view class="flex flex-vertical-between fs28 Birth"> | 119 | <view class="flex flex-vertical-between fs28 Birth"> |
127 | <view class="flex" bindtap="iscalendar"> | 120 | <view class="flex" bindtap="iscalendar"> |
128 | - <block wx:if="{{iscalendar}}"> | 121 | + <block wx:if="{{iscalendar&&user.birthday==null&&user.birthday==''}}"> |
129 | <view class="flex-center"> | 122 | <view class="flex-center"> |
130 | <icon size="20" type="success" color="rgb(212,2,31)"></icon> | 123 | <icon size="20" type="success" color="rgb(212,2,31)"></icon> |
131 | </view> | 124 | </view> |
@@ -139,10 +132,15 @@ | @@ -139,10 +132,15 @@ | ||
139 | </view> | 132 | </view> |
140 | <view class="user-txt-right"> | 133 | <view class="user-txt-right"> |
141 | <!-- 填充数据的时候要判断是否已经有出生日期,有值的话就不可修改 --> | 134 | <!-- 填充数据的时候要判断是否已经有出生日期,有值的话就不可修改 --> |
135 | + <block wx:if="{{user.birthday==''||user.birthday==null}}"> | ||
142 | <picker bindchange='bindChange' value="{{datet}}" mode="date" | 136 | <picker bindchange='bindChange' value="{{datet}}" mode="date" |
143 | start="{{year-70}}-1-1" end="{{year}}-12-31"> | 137 | start="{{year-70}}-1-1" end="{{year}}-12-31"> |
138 | + </picker> | ||
139 | + </block> | ||
140 | + <block wx:else> | ||
144 | <view>{{datet==""?user.birthday:datet}}</view> | 141 | <view>{{datet==""?user.birthday:datet}}</view> |
145 | - </picker> | 142 | + </block> |
143 | + | ||
146 | </view> | 144 | </view> |
147 | </view> | 145 | </view> |
148 | </view> | 146 | </view> |
@@ -150,17 +148,18 @@ | @@ -150,17 +148,18 @@ | ||
150 | <view class="Bbottom"> | 148 | <view class="Bbottom"> |
151 | <view bindtap="editUserInfo1" class="user-name mt flex-vertical-between" data-type="nickname"> | 149 | <view bindtap="editUserInfo1" class="user-name mt flex-vertical-between" data-type="nickname"> |
152 | <view class="user-name-txt">姓名</view> | 150 | <view class="user-name-txt">姓名</view> |
153 | - <input class="user-txt-right" style="text-indent:300rpx;" placeholder="{{user.vipname.length>0?user.vipname:'*姓名'}}"/> | 151 | + <input bindblur="user_name" class="user-txt-right t-r" placeholder="*姓名" value='{{user.vipname}}'/> |
154 | </view> | 152 | </view> |
155 | 153 | ||
156 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="nickname"> | 154 | <view bindtap="editUserInfo1" class="user-name flex-vertical-between" data-type="nickname"> |
157 | <view class="user-name-txt">身份证</view> | 155 | <view class="user-name-txt">身份证</view> |
158 | - <block wx:if="{{user.idcard.length>0}}"> | ||
159 | - <view class="user-txt-right">{{user.idcard}}</view> | ||
160 | - </block> | ||
161 | - <block wx:else> | 156 | + |
157 | + <input bindblur="identity_card" class="user-txt-right t-r" value="{{user.idcard}}" placeholder="*身份证"></input> | ||
158 | + | ||
159 | + | ||
160 | + <!-- <block wx:else> | ||
162 | <input class="user-txt-right" bindblur="IdentityIDCard" value="" type="idcard" maxlength="18" placeholder="*身份证" /> | 161 | <input class="user-txt-right" bindblur="IdentityIDCard" value="" type="idcard" maxlength="18" placeholder="*身份证" /> |
163 | - </block> | 162 | + </block> --> |
164 | </view> | 163 | </view> |
165 | <navigator url="/pages/user/Change_phone/Change_phone?mobile={{user.mobile}}" class="user-name flex-vertical-between" data-type="mobile"> | 164 | <navigator url="/pages/user/Change_phone/Change_phone?mobile={{user.mobile}}" class="user-name flex-vertical-between" data-type="mobile"> |
166 | <view class="user-name-txt">更换手机</view> | 165 | <view class="user-name-txt">更换手机</view> |
@@ -175,14 +174,16 @@ | @@ -175,14 +174,16 @@ | ||
175 | <view>{{user.address}}</view> | 174 | <view>{{user.address}}</view> |
176 | </block> | 175 | </block> |
177 | <block wx:else> | 176 | <block wx:else> |
178 | - <input maxlength="30" class="user-txt-right" placeholder="*地址" style=" text-indent: 370rpx;" /> | 177 | + <input bindblur="address" maxlength="30" class="user-txt-right" placeholder="*地址" style="text-align:right" /> |
179 | </block> | 178 | </block> |
180 | </view> | 179 | </view> |
181 | 180 | ||
182 | <view bindtap="onclickstore" class="user-name flex-vertical-between" data-type="email"> | 181 | <view bindtap="onclickstore" class="user-name flex-vertical-between" data-type="email"> |
183 | <view class="user-name-txt">所属门店</view> | 182 | <view class="user-name-txt">所属门店</view> |
184 | <view class="flex-center user-txt-right"> | 183 | <view class="flex-center user-txt-right"> |
185 | - <view class="one-line">{{def_pick_store.pickup_name}}</view> | 184 | + <view class="one-line">{{stoname}} |
185 | + </view> | ||
186 | + | ||
186 | <view class="angle">∟</view> | 187 | <view class="angle">∟</view> |
187 | </view> | 188 | </view> |
188 | </view> | 189 | </view> |
@@ -190,7 +191,7 @@ | @@ -190,7 +191,7 @@ | ||
190 | <navigator class="user-name mt flex-vertical-between" url="/pages/user/address_list/address_list"> | 191 | <navigator class="user-name mt flex-vertical-between" url="/pages/user/address_list/address_list"> |
191 | <view class="user-name-txt">收货地址</view> | 192 | <view class="user-name-txt">收货地址</view> |
192 | <view class="flex-center user-txt-right"> | 193 | <view class="flex-center user-txt-right"> |
193 | - <view class="flex">{{user.address_id}}</view> | 194 | + <!-- <view class="flex">{{user.address_id}}</view> --> |
194 | <view class="angle">∟</view> | 195 | <view class="angle">∟</view> |
195 | </view> | 196 | </view> |
196 | </navigator> | 197 | </navigator> |
@@ -202,7 +203,7 @@ | @@ -202,7 +203,7 @@ | ||
202 | </view> | 203 | </view> |
203 | <!-- 确认修改按钮 --> | 204 | <!-- 确认修改按钮 --> |
204 | <view class="flex-center confirm"> | 205 | <view class="flex-center confirm"> |
205 | - <view class="flex-center fs30 confirmtext"> | 206 | + <view class="flex-center fs30 confirmtext"bindtap="confirm_revision"> |
206 | <view>确认修改</view> | 207 | <view>确认修改</view> |
207 | </view> | 208 | </view> |
208 | </view> | 209 | </view> |
@@ -368,4 +369,5 @@ | @@ -368,4 +369,5 @@ | ||
368 | </view> | 369 | </view> |
369 | </block> | 370 | </block> |
370 | </view> | 371 | </view> |
371 | -</block> | ||
372 | \ No newline at end of file | 372 | \ No newline at end of file |
373 | +</block> | ||
374 | +<warn id="warn"></warn> | ||
373 | \ No newline at end of file | 375 | \ No newline at end of file |
pages/user/userinfo/userinfo.wxss
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | padding-bottom:165rpx; | 2 | padding-bottom:165rpx; |
3 | } | 3 | } |
4 | .user-container { | 4 | .user-container { |
5 | - font-size: 30rpx; | 5 | + font-size: 30rpx; |
6 | } | 6 | } |
7 | input{ | 7 | input{ |
8 | width: 450rpx; | 8 | width: 450rpx; |
@@ -32,11 +32,14 @@ input{ | @@ -32,11 +32,14 @@ input{ | ||
32 | 32 | ||
33 | .AncrownMax { | 33 | .AncrownMax { |
34 | background-color: rgb(57, 57, 57); | 34 | background-color: rgb(57, 57, 57); |
35 | - width: 150rpx; | 35 | + |
36 | height: 36rpx; | 36 | height: 36rpx; |
37 | border-radius: 20rpx; | 37 | border-radius: 20rpx; |
38 | margin-right: 20rpx; | 38 | margin-right: 20rpx; |
39 | line-height: 36rpx; | 39 | line-height: 36rpx; |
40 | + padding-right: 14rpx; | ||
41 | +padding-left: 10rpx; | ||
42 | + | ||
40 | } | 43 | } |
41 | .Nickname{ | 44 | .Nickname{ |
42 | max-width:170rpx; | 45 | max-width:170rpx; |
@@ -49,10 +52,12 @@ input{ | @@ -49,10 +52,12 @@ input{ | ||
49 | 52 | ||
50 | .plusMax { | 53 | .plusMax { |
51 | background-color: rgb(212, 58, 30); | 54 | background-color: rgb(212, 58, 30); |
52 | - width: 150rpx; | ||
53 | height: 36rpx; | 55 | height: 36rpx; |
54 | border-radius: 20rpx; | 56 | border-radius: 20rpx; |
55 | line-height: 36rpx; | 57 | line-height: 36rpx; |
58 | + padding-left: 10rpx; | ||
59 | +padding-right: 14rpx; | ||
60 | + | ||
56 | } | 61 | } |
57 | 62 | ||
58 | .fuls { | 63 | .fuls { |
@@ -118,7 +123,8 @@ input{ | @@ -118,7 +123,8 @@ input{ | ||
118 | } | 123 | } |
119 | 124 | ||
120 | .hion { | 125 | .hion { |
121 | - width:85rpx; | 126 | + width: 97%; |
127 | +text-align: right; | ||
122 | margin-top: 3rpx; | 128 | margin-top: 3rpx; |
123 | margin-right: 5rpx; | 129 | margin-right: 5rpx; |
124 | } | 130 | } |