调整体重记录bug显示重复数据bug,变更钱包设置密码,验证密码键盘key
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
"name" : "健康监测",
|
"name" : "健康监测",
|
||||||
"appid" : "__UNI__C29473D",
|
"appid" : "__UNI__C29473D",
|
||||||
"description" : "ZH健康监测,您手上的健康管理专家",
|
"description" : "ZH健康监测,您手上的健康管理专家",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.2",
|
||||||
"versionCode" : "100",
|
"versionCode" : 102,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
no : val.order_no,
|
no : val.order_no,
|
||||||
cover : val.items[0].sku.cover,
|
cover : val.items[0].sku.cover,
|
||||||
name : val.items[0].sku.goods_name,
|
name : val.items[0].sku.goods_name,
|
||||||
price : val.items[0].price,
|
price : val.total,
|
||||||
sum : val.items[0].qty,
|
sum : val.items[0].qty,
|
||||||
stateText : val.state,
|
stateText : val.state,
|
||||||
cans : val.can
|
cans : val.can
|
||||||
|
|||||||
@@ -142,6 +142,9 @@ export default {
|
|||||||
//获取体重首页接口
|
//获取体重首页接口
|
||||||
getWeights() {
|
getWeights() {
|
||||||
weights(this.page).then((res) => {
|
weights(this.page).then((res) => {
|
||||||
|
if(res.lists.page.current === 1) {
|
||||||
|
this.lists = []
|
||||||
|
}
|
||||||
this.lists = this.lists.concat(res.lists.data);
|
this.lists = this.lists.concat(res.lists.data);
|
||||||
this.has_more = res.lists.page.has_more;
|
this.has_more = res.lists.page.has_more;
|
||||||
this.weightInfo = res.weight;
|
this.weightInfo = res.weight;
|
||||||
|
|||||||
@@ -100,6 +100,20 @@
|
|||||||
},
|
},
|
||||||
// 确认订单
|
// 确认订单
|
||||||
subOrder(){
|
subOrder(){
|
||||||
|
if(this.address === ""){
|
||||||
|
uni.showModal({
|
||||||
|
title : '提示',
|
||||||
|
content : '暂未添加收货地址,无法下单',
|
||||||
|
showCancel : true,
|
||||||
|
confirmText : '添加',
|
||||||
|
success : res => {
|
||||||
|
if(res.confirm){
|
||||||
|
this.$Router.push({name: 'Address'})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
verify({
|
verify({
|
||||||
goods_sku_id: this.$Route.query.skuId,
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
qty : this.qty,
|
qty : this.qty,
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
case 0:
|
case 0:
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '开通提示',
|
title: '开通提示',
|
||||||
content: '平台新用户完成手笔订单,即可获赠ZH健康会员',
|
content: '平台新用户完成首笔订单,即可获赠ZH健康会员',
|
||||||
showCancel:false,
|
showCancel:false,
|
||||||
cancelText: '去完成',
|
cancelText: '去完成',
|
||||||
success: res => {
|
success: res => {
|
||||||
|
|||||||
@@ -4,14 +4,42 @@
|
|||||||
<view class="password">
|
<view class="password">
|
||||||
<view class="prompt">请设置6位数字密码,建议不要使用连续的数字</view>
|
<view class="prompt">请设置6位数字密码,建议不要使用连续的数字</view>
|
||||||
<view class="group">
|
<view class="group">
|
||||||
<view class="inputs">
|
<view class="inputs" @click="onShowKet('password')">
|
||||||
<input type="digit" password v-model="password" maxlength="6" placeholder="请设置密码" />
|
<block v-if="password.length > 0">
|
||||||
|
<text v-for="item in password.length" :key="item">•</text>
|
||||||
|
</block>
|
||||||
|
<block v-if="keyShow && valKye === 'password'">
|
||||||
|
<text class="flicker-animation">|</text>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<text v-if="password.length === 0" class="placeholder">请设置密码</text>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="inputs">
|
<view class="inputs" :class="{'hide': verify === ''}" @click="onShowKet('verify')">
|
||||||
<input type="digit" password v-model="verify" maxlength="6" placeholder="请确认密码" />
|
<block v-if="verify.length > 0">
|
||||||
|
<text v-for="item in verify.length" :key="item">•</text>
|
||||||
|
</block>
|
||||||
|
<block v-if="keyShow && valKye === 'verify'">
|
||||||
|
<text class="flicker-animation">|</text>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<text v-if="verify.length === 0" class="placeholder">请确认密码</text>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- key键盘 -->
|
||||||
|
<u-keyboard
|
||||||
|
mode="number"
|
||||||
|
random
|
||||||
|
dotDisabled
|
||||||
|
:overlay="false"
|
||||||
|
:show="keyShow"
|
||||||
|
:showCancel="false"
|
||||||
|
@change="keyValChange"
|
||||||
|
@backspace="keyValBackspace"
|
||||||
|
@confirm="keyShow = false"
|
||||||
|
></u-keyboard>
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view class="buttons">
|
<view class="buttons">
|
||||||
<button type="default" form-type="submit" @click="createWallet">确认激活</button>
|
<button type="default" form-type="submit" @click="createWallet">确认激活</button>
|
||||||
@@ -25,10 +53,26 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
password: '',
|
password: '',
|
||||||
verify : ''
|
verify : '',
|
||||||
|
valKye : '',
|
||||||
|
keyShow : false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 唤起key
|
||||||
|
onShowKet(key){
|
||||||
|
this.valKye = key
|
||||||
|
this.keyShow = true
|
||||||
|
},
|
||||||
|
// 键盘输入
|
||||||
|
keyValChange(e){
|
||||||
|
if(this[this.valKye].length >= 6) return
|
||||||
|
this[this.valKye] += e
|
||||||
|
},
|
||||||
|
// 键盘删除
|
||||||
|
keyValBackspace(e){
|
||||||
|
if(this[this.valKye].length) this[this.valKye] = this[this.valKye].substr(0, this[this.valKye].length - 1)
|
||||||
|
},
|
||||||
// 激活钱包
|
// 激活钱包
|
||||||
createWallet() {
|
createWallet() {
|
||||||
if (this.password === '' || this.verify === '') {
|
if (this.password === '' || this.verify === '') {
|
||||||
@@ -63,6 +107,16 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.flicker-animation{
|
||||||
|
animation: flicker .8s infinite;
|
||||||
|
}
|
||||||
|
@keyframes flicker{
|
||||||
|
0%{opacity: 0;}
|
||||||
|
100{opacity: 1;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 副标题
|
// 副标题
|
||||||
.sub-title {
|
.sub-title {
|
||||||
@@ -89,14 +143,16 @@ export default {
|
|||||||
margin-top: $margin;
|
margin-top: $margin;
|
||||||
border-radius: $radius-m;
|
border-radius: $radius-m;
|
||||||
background-color: $window-color;
|
background-color: $window-color;
|
||||||
&:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
text{
|
||||||
|
padding: 0 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.placeholder{
|
||||||
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,17 +23,30 @@
|
|||||||
<view class="ios-bottom"></view>
|
<view class="ios-bottom"></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 钱包密码 -->
|
<!-- 钱包密码 -->
|
||||||
<u-popup :show="passwordShow" @close="resetPassword" closeable borderRadius="10">
|
<u-popup :show="passwordShow" @close="resetPassword" mode="center" round="10" borderRadius="10">
|
||||||
<view class="validationPassword">
|
<view class="validationPassword">
|
||||||
<view class="from">
|
<view class="from">
|
||||||
<view class="title">钱包密码</view>
|
<view class="title">验证钱包密码</view>
|
||||||
<input type="number" v-model="password" maxlength="6" placeholder="请输入钱包密码" />
|
<view class="inputs">
|
||||||
|
<text v-for="item in password.length" :key="item">•</text>
|
||||||
|
<text class="flicker-animation">|</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="buttons">
|
|
||||||
<view class="button confirm" @click="payPassword('confirm', passwordPages)">验证</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<!-- key -->
|
||||||
|
<u-keyboard
|
||||||
|
mode="number"
|
||||||
|
random
|
||||||
|
dotDisabled
|
||||||
|
:overlay="false"
|
||||||
|
:show="passwordShow"
|
||||||
|
confirmText="验证"
|
||||||
|
@change="keyValChange"
|
||||||
|
@backspace="keyValBackspace"
|
||||||
|
@confirm="payPassword('confirm', passwordPages)"
|
||||||
|
@cancel="passwordShow = false"
|
||||||
|
></u-keyboard>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -69,6 +82,15 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 键盘输入
|
||||||
|
keyValChange(e){
|
||||||
|
if(this.password.length >= 6) return
|
||||||
|
this.password += e
|
||||||
|
},
|
||||||
|
// 键盘删除
|
||||||
|
keyValBackspace(e){
|
||||||
|
if(this.password.length) this.password = this.password.substr(0, this.password.length - 1)
|
||||||
|
},
|
||||||
// 弹出私钥
|
// 弹出私钥
|
||||||
showPrivatekey(pages){
|
showPrivatekey(pages){
|
||||||
this.passwordShow = true
|
this.passwordShow = true
|
||||||
@@ -161,9 +183,20 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.flicker-animation{
|
||||||
|
animation: flicker .8s infinite;
|
||||||
|
}
|
||||||
|
@keyframes flicker{
|
||||||
|
0%{opacity: 0;}
|
||||||
|
100{opacity: 1;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 验证密码弹出层
|
// 验证密码弹出层
|
||||||
.validationPassword{
|
.validationPassword{
|
||||||
|
width: 80vw;
|
||||||
.from{
|
.from{
|
||||||
padding: $padding*2;
|
padding: $padding*2;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -176,12 +209,27 @@
|
|||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
padding-bottom: $padding;
|
padding-bottom: $padding;
|
||||||
}
|
}
|
||||||
input{
|
// input{
|
||||||
background: $window-color;
|
// background: $window-color;
|
||||||
|
// height: 90rpx;
|
||||||
|
// left: 90rpx;
|
||||||
|
// font-size: $title-size-lg;
|
||||||
|
// border-radius: 45rpx;
|
||||||
|
// }
|
||||||
|
.inputs {
|
||||||
|
background-color: $window-color;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
left: 90rpx;
|
line-height: 90rpx;
|
||||||
font-size: $title-size-lg;
|
|
||||||
border-radius: 45rpx;
|
border-radius: 45rpx;
|
||||||
|
font-size: $title-size-lg;
|
||||||
|
text-align: center;
|
||||||
|
text{
|
||||||
|
padding: 0 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.placeholder{
|
||||||
|
color: $text-gray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.buttons{
|
.buttons{
|
||||||
|
|||||||
@@ -4,14 +4,42 @@
|
|||||||
<view class="password">
|
<view class="password">
|
||||||
<view class="prompt">请设置6位数字密码,建议不要使用连续的数字</view>
|
<view class="prompt">请设置6位数字密码,建议不要使用连续的数字</view>
|
||||||
<view class="group">
|
<view class="group">
|
||||||
<view class="inputs">
|
<view class="inputs" @click="onShowKet('password')">
|
||||||
<input type="digit" password v-model="password" maxlength="6" placeholder="请设置密码" />
|
<block v-if="password.length > 0">
|
||||||
|
<text v-for="item in password.length" :key="item">•</text>
|
||||||
|
</block>
|
||||||
|
<block v-if="keyShow && valKye === 'password'">
|
||||||
|
<text class="flicker-animation">|</text>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<text v-if="password.length === 0" class="placeholder">请设置密码</text>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="inputs">
|
<view class="inputs" :class="{'hide': verify === ''}" @click="onShowKet('verify')">
|
||||||
<input type="digit" password v-model="verify" maxlength="6" placeholder="请确认密码" />
|
<block v-if="verify.length > 0">
|
||||||
|
<text v-for="item in verify.length" :key="item">•</text>
|
||||||
|
</block>
|
||||||
|
<block v-if="keyShow && valKye === 'verify'">
|
||||||
|
<text class="flicker-animation">|</text>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<text v-if="verify.length === 0" class="placeholder">请确认密码</text>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- key键盘 -->
|
||||||
|
<u-keyboard
|
||||||
|
mode="number"
|
||||||
|
random
|
||||||
|
dotDisabled
|
||||||
|
:overlay="false"
|
||||||
|
:show="keyShow"
|
||||||
|
:showCancel="false"
|
||||||
|
@change="keyValChange"
|
||||||
|
@backspace="keyValBackspace"
|
||||||
|
@confirm="keyShow = false"
|
||||||
|
></u-keyboard>
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<view class="buttons">
|
<view class="buttons">
|
||||||
<button type="default" form-type="submit" @click="createWallet">确认修改</button>
|
<button type="default" form-type="submit" @click="createWallet">确认修改</button>
|
||||||
@@ -26,13 +54,30 @@
|
|||||||
return {
|
return {
|
||||||
password: '',
|
password: '',
|
||||||
verify: '',
|
verify: '',
|
||||||
oldPassword: ''
|
oldPassword: '',
|
||||||
|
|
||||||
|
valKye : '',
|
||||||
|
keyShow : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.oldPassword = this.$Route.query.password
|
this.oldPassword = this.$Route.query.password
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 唤起key
|
||||||
|
onShowKet(key){
|
||||||
|
this.valKye = key
|
||||||
|
this.keyShow = true
|
||||||
|
},
|
||||||
|
// 键盘输入
|
||||||
|
keyValChange(e){
|
||||||
|
if(this[this.valKye].length >= 6) return
|
||||||
|
this[this.valKye] += e
|
||||||
|
},
|
||||||
|
// 键盘删除
|
||||||
|
keyValBackspace(e){
|
||||||
|
if(this[this.valKye].length) this[this.valKye] = this[this.valKye].substr(0, this[this.valKye].length - 1)
|
||||||
|
},
|
||||||
// 修改密码
|
// 修改密码
|
||||||
createWallet() {
|
createWallet() {
|
||||||
if (this.password === '' || this.verify === '') {
|
if (this.password === '' || this.verify === '') {
|
||||||
@@ -72,6 +117,17 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.flicker-animation{
|
||||||
|
animation: flicker .8s infinite;
|
||||||
|
}
|
||||||
|
@keyframes flicker{
|
||||||
|
0%{opacity: 0;}
|
||||||
|
100{opacity: 1;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 副标题
|
// 副标题
|
||||||
.sub-title {
|
.sub-title {
|
||||||
@@ -98,14 +154,16 @@
|
|||||||
margin-top: $margin;
|
margin-top: $margin;
|
||||||
border-radius: $radius-m;
|
border-radius: $radius-m;
|
||||||
background-color: $window-color;
|
background-color: $window-color;
|
||||||
&:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
text{
|
||||||
|
padding: 0 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.placeholder{
|
||||||
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user