deming/pageE/mine/UpdatePhone.vue

122 lines
2.8 KiB
Vue
Raw Normal View History

2020-06-08 15:23:23 +08:00
<template>
<view class="update-phone">
<view class="update-main">
<view class="old-phone">
<view class="phone-number">
<view class="title">原手机号</view>
2020-06-19 18:07:11 +08:00
<input type="text" v-model="oldNumber" placeholder="请输入手机号码" />
2020-06-08 15:23:23 +08:00
</view>
<view class="code">
<view class="title">验证码</view>
2020-06-19 18:07:11 +08:00
<input type="text" v-model="oldCode" placeholder="请输入验证码" />
2020-06-08 15:23:23 +08:00
<view class="get-code">获取验证码</view>
</view>
</view>
<view class="new-phone">
<view class="phone-number">
<view class="title">新手机号</view>
2020-06-19 18:07:11 +08:00
<input type="text" v-model="newNumber" placeholder="请输入手机号码" />
2020-06-08 15:23:23 +08:00
</view>
<view class="code">
<view class="title">验证码</view>
2020-06-19 18:07:11 +08:00
<input type="text" v-model="newCode" placeholder="请输入验证码" />
2020-06-08 15:23:23 +08:00
<view class="get-code">获取验证码</view>
</view>
</view>
</view>
<view class="tips">注意修改手机号需要原手机号获取验证码无原手机验证码请联系后台</view>
2020-06-19 18:07:11 +08:00
<view class="btn">保存</view>
2020-06-08 15:23:23 +08:00
</view>
</template>
<script>
export default {
data() {
2020-06-19 18:07:11 +08:00
return {
oldNumber: '',
oldCode: '',
newNumber: '',
newCode: ''
}
},
methods: {
verifyValue() {
if (this.$u.test.mobile(this.oldNumber)) this.$u.toast('请填写正确的原手机号');
if (this.$u.test.mobile(this.newNumber)) this.$u.toast('请填写正确的新手机号');
}
},
2020-06-08 15:23:23 +08:00
};
</script>
<style lang="scss" scoped>
.update-phone {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
padding-top: 1rpx;
.update-main {
@mixin update-General() {
> view {
display: flex;
align-items: center;
padding: 35rpx 30rpx;
background-color: #ffffff;
.title {
width: 156rpx;
font-size: 28rpx;
color: rgba(51,51,51,1);
}
.input {
flex: 1;
font-size: 26rpx;
}
.get-code {
font-size: 28rpx;
color: rgba(153,153,153,1);
position: relative;
padding: 0 25rpx;
margin-left: 20rpx;
&::after {
position: absolute;
content: "";
width: 2rpx;
height: 43rpx;
background: rgba(242,242,242,1);
left: 0;
top: 50%;
transform: translate(0, -50%);
}
}
}
.code {
display: flex;
align-items: center;
.title {
font-size: 28rpx;
color: rgba(51,51,51,1);
}
}
}
.old-phone {
@include update-General()
}
.new-phone {
@include update-General()
}
}
.tips {
padding: 20rpx 30rpx;
font-size: 24rpx;
color: rgba(102,102,102,1);
line-height: 40rpx;
}
2020-06-19 18:07:11 +08:00
.btn {
margin: 120rpx auto 0;
width: 690rpx;
height: 98rpx;
background: rgba(255,120,15,1);
border-radius: 49rpx;
font-size: 36rpx;
color: rgba(255,255,255,1);
line-height: 98rpx;
text-align: center;
}
2020-06-08 15:23:23 +08:00
}
</style>