Commit fd1126a299f3571018d8f4aa1121bd0b194f1405

Authored by 前端研发-钱巧玲
1 parent 372be683

个人资料的启动密码bug修改,首页新人有礼数据填充

pages/index/index/index.js
... ... @@ -73,6 +73,7 @@ Page({
73 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 613 //计算的高度值
613 614 var viewHeight = 715 / ratio;
614 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 639 \ No newline at end of file
... ...
pages/user/userinfo/userinfo.js
... ... @@ -49,7 +49,7 @@ Page({
49 49 only_pk: 0,
50 50 open_ind_store: 0, //哪里打开的门店列表的控制属性
51 51 ispwhid: 1, //是否隐藏密码显示
52   - isstcsp: 1, //是否启动密码消费
  52 + isstcsp: 0, //是否启动密码消费
53 53 isGender: 1, //什么性别
54 54 iscalendar: 1, //是否是农历
55 55 consumption: "", //消费密码
... ... @@ -638,7 +638,7 @@ Page({
638 638 identity_card: a.idcard,
639 639 address: a.address,
640 640 isGender: a.sex,
641   - isstcsp: a.isLock
  641 + isstcsp: a.vipnopwd
642 642 });
643 643 }
644 644 })
... ... @@ -717,12 +717,9 @@ Page({
717 717 lose_focus: function(e) {
718 718 var th = this;
719 719 var val = e.detail.value;
720   - if (val.length > 6 || val != "") {
721   -
722 720 this.setData({
723 721 consumption: val
724   - });
725   - }
  722 + })
726 723 },
727 724  
728 725 //地址
... ... @@ -812,7 +809,7 @@ Page({
812 809 data: datas,
813 810 success: function(res) {
814 811 if (res.data.code == 0) {
815   - getApp().my_warnning("修改成功", 0, th);
  812 + getApp().my_warnning("修改成功", 1, th);
816 813 } else {
817 814 getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
818 815 }
... ...
pages/user/userinfo/userinfo.wxml
... ... @@ -70,10 +70,10 @@
70 70 <view class="user-txt">消费密码</view>
71 71 <view class="flex">
72 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 74 </block>
75 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 77 </block>
78 78  
79 79 <block wx:if="{{ispwhid}}">
... ...