mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
【修复】修改个人信息设置界面,百分比进度效果计算误差。
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
</u-navbar>
|
||||
<view class="coreshop-bg-white coreshop-solid-top coreshop-padding-left-40 coreshop-padding-right-40 coreshop-padding-top-20 coreshop-padding-bottom-20 coreshop-margin-bottom-10">
|
||||
<view class="coreshop-text-center coreshop-margin-bottom-10">
|
||||
<text class="coreshop-text-black">完成</text>
|
||||
<text class="coreshop-text-orange coreshop-font-40">100%</text>
|
||||
<text class="coreshop-text-black">加油</text>
|
||||
<text class="coreshop-text-orange coreshop-font-40">{{percentage}}%</text>
|
||||
<text class="coreshop-text-black">,太棒啦!</text>
|
||||
</view>
|
||||
<u-line-progress percentage="100" activeColor="#5FB878"></u-line-progress>
|
||||
<u-line-progress :percentage="percentage" activeColor="#5FB878"></u-line-progress>
|
||||
</view>
|
||||
<view class="coreshop-list menu coreshop-bg-white coreshop-padding-15">
|
||||
<u--form :model="model" :rules="rules" ref="uForm" errorType="message" labelPosition="left" labelWidth="80">
|
||||
@@ -110,7 +110,9 @@
|
||||
],
|
||||
},
|
||||
index: 2,
|
||||
submitStatus: false
|
||||
submitStatus: false,
|
||||
percentage: 0,
|
||||
|
||||
}
|
||||
},
|
||||
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
||||
@@ -211,6 +213,19 @@
|
||||
_this.model.nickname = res.data.nickName;
|
||||
_this.model.mobile = res.data.mobile;
|
||||
|
||||
if (res.data.birthday) {
|
||||
_this.percentage += 25;
|
||||
}
|
||||
if (res.data.nickName) {
|
||||
_this.percentage += 25;
|
||||
}
|
||||
if (res.data.mobile) {
|
||||
_this.percentage += 25;
|
||||
}
|
||||
if (res.data.avatarImage) {
|
||||
_this.percentage += 25;
|
||||
}
|
||||
|
||||
if (res.data.sex && res.data.sex == 0) {
|
||||
_this.model.sex = _this.actionSheetList[2].name;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user