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