Commit fd1126a299f3571018d8f4aa1121bd0b194f1405
1 parent
372be683
个人资料的启动密码bug修改,首页新人有礼数据填充
Showing
3 changed files
with
28 additions
and
10 deletions
pages/index/index/index.js
| @@ -73,6 +73,7 @@ Page({ | @@ -73,6 +73,7 @@ Page({ | ||
| 73 | th.setData({ is_boot: is_init }); | 73 | th.setData({ is_boot: is_init }); |
| 74 | } | 74 | } |
| 75 | }) | 75 | }) |
| 76 | + th.is_new(); | ||
| 76 | 77 | ||
| 77 | }, | 78 | }, |
| 78 | //关闭新用户领取广告 | 79 | //关闭新用户领取广告 |
| @@ -612,6 +613,26 @@ Page({ | @@ -612,6 +613,26 @@ Page({ | ||
| 612 | //计算的高度值 | 613 | //计算的高度值 |
| 613 | var viewHeight = 715 / ratio; | 614 | var viewHeight = 715 / ratio; |
| 614 | if(this.data.max_sw_height<viewHeight) this.setData({ max_sw_height:viewHeight }); | 615 | if(this.data.max_sw_height<viewHeight) this.setData({ max_sw_height:viewHeight }); |
| 615 | - } | 616 | + }, |
| 617 | + //判断该用户是否是新会员 | ||
| 618 | + is_new: function () { | ||
| 619 | + var th = this; | ||
| 620 | + var url = "/api/weshop/marketing/newpeople/get"; | ||
| 621 | + getApp().request.promiseGet(res, { | ||
| 622 | + data: { | ||
| 623 | + storeId: r.stoid, | ||
| 624 | + userId: d.user_id | ||
| 625 | + } | ||
| 626 | + }).then(res => { | ||
| 627 | + var swiperimage = th.data.swiperimage; | ||
| 628 | + swiperimage.push("/miniapp/images/newpeople/newpeople.png"); | ||
| 629 | + if (res.data.code == 0) { | ||
| 630 | + th.setData({ | ||
| 631 | + is_disgraceful:1, | ||
| 632 | + swiperimage: swiperimage | ||
| 633 | + }) | ||
| 634 | + } | ||
| 635 | + }) | ||
| 636 | + } | ||
| 616 | 637 | ||
| 617 | }); | 638 | }); |
| 618 | \ No newline at end of file | 639 | \ No newline at end of file |
pages/user/userinfo/userinfo.js
| @@ -49,7 +49,7 @@ Page({ | @@ -49,7 +49,7 @@ Page({ | ||
| 49 | only_pk: 0, | 49 | only_pk: 0, |
| 50 | open_ind_store: 0, //哪里打开的门店列表的控制属性 | 50 | open_ind_store: 0, //哪里打开的门店列表的控制属性 |
| 51 | ispwhid: 1, //是否隐藏密码显示 | 51 | ispwhid: 1, //是否隐藏密码显示 |
| 52 | - isstcsp: 1, //是否启动密码消费 | 52 | + isstcsp: 0, //是否启动密码消费 |
| 53 | isGender: 1, //什么性别 | 53 | isGender: 1, //什么性别 |
| 54 | iscalendar: 1, //是否是农历 | 54 | iscalendar: 1, //是否是农历 |
| 55 | consumption: "", //消费密码 | 55 | consumption: "", //消费密码 |
| @@ -638,7 +638,7 @@ Page({ | @@ -638,7 +638,7 @@ Page({ | ||
| 638 | identity_card: a.idcard, | 638 | identity_card: a.idcard, |
| 639 | address: a.address, | 639 | address: a.address, |
| 640 | isGender: a.sex, | 640 | isGender: a.sex, |
| 641 | - isstcsp: a.isLock | 641 | + isstcsp: a.vipnopwd |
| 642 | }); | 642 | }); |
| 643 | } | 643 | } |
| 644 | }) | 644 | }) |
| @@ -717,12 +717,9 @@ Page({ | @@ -717,12 +717,9 @@ Page({ | ||
| 717 | lose_focus: function(e) { | 717 | lose_focus: function(e) { |
| 718 | var th = this; | 718 | var th = this; |
| 719 | var val = e.detail.value; | 719 | var val = e.detail.value; |
| 720 | - if (val.length > 6 || val != "") { | ||
| 721 | - | ||
| 722 | this.setData({ | 720 | this.setData({ |
| 723 | consumption: val | 721 | consumption: val |
| 724 | - }); | ||
| 725 | - } | 722 | + }) |
| 726 | }, | 723 | }, |
| 727 | 724 | ||
| 728 | //地址 | 725 | //地址 |
| @@ -812,7 +809,7 @@ Page({ | @@ -812,7 +809,7 @@ Page({ | ||
| 812 | data: datas, | 809 | data: datas, |
| 813 | success: function(res) { | 810 | success: function(res) { |
| 814 | if (res.data.code == 0) { | 811 | if (res.data.code == 0) { |
| 815 | - getApp().my_warnning("修改成功", 0, th); | 812 | + getApp().my_warnning("修改成功", 1, th); |
| 816 | } else { | 813 | } else { |
| 817 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | 814 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); |
| 818 | } | 815 | } |
pages/user/userinfo/userinfo.wxml
| @@ -70,10 +70,10 @@ | @@ -70,10 +70,10 @@ | ||
| 70 | <view class="user-txt">消费密码</view> | 70 | <view class="user-txt">消费密码</view> |
| 71 | <view class="flex"> | 71 | <view class="flex"> |
| 72 | <block wx:if="{{ispwhid}}"> | 72 | <block wx:if="{{ispwhid}}"> |
| 73 | - <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" password="true" /> | 73 | + <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" password="true" type="number"/> |
| 74 | </block> | 74 | </block> |
| 75 | <block wx:else> | 75 | <block wx:else> |
| 76 | - <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" /> | 76 | + <input bindblur="lose_focus" class="fs28 hion user-txt-right" value="{{consumption}}" type="number"/> |
| 77 | </block> | 77 | </block> |
| 78 | 78 | ||
| 79 | <block wx:if="{{ispwhid}}"> | 79 | <block wx:if="{{ispwhid}}"> |