初始化商家端
This commit is contained in:
224
pages/xtsz/changePsw/changePsw.vue
Normal file
224
pages/xtsz/changePsw/changePsw.vue
Normal file
@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<view class="page" :style="themeColor">
|
||||
<view class="flex benben-position-layout flex flex-wrap align-center changePsw_flex_0"
|
||||
:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub changePsw_fd0_0'>
|
||||
<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
|
||||
<text class='fu-iconfont2 changePsw_fd0_0_c0_c0'></text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-stretch justify-center flex-sub'>
|
||||
<text class='changePsw_fd0_0_c1_c0'>修改密码</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center changePsw_fd0_0_c2'>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
|
||||
<!---验证码flex布局开始-->
|
||||
<view class="flex flex-direction align-center benben-flex-layout changePsw_flex_1">
|
||||
<text class='changePsw_fd1_0'>我们要对您绑定的手机号进行验证:</text>
|
||||
<text class='changePsw_fd1_1'>{{mobile}}</text>
|
||||
</view>
|
||||
|
||||
<!---验证码flex布局结束-->
|
||||
<benben-digital-password v-model='code' :box-num='4' mode='number'
|
||||
class-name='flex flex align-center justify-center changePsw_flex_password_2'>
|
||||
<template #default="{ content, active, index }">
|
||||
<view :key="index" v-if="active"
|
||||
class="flex align-center justify-center active-digital-password changePsw_flex_password_active_2">
|
||||
{{ content }}
|
||||
</view>
|
||||
<view :key="index" v-else class="flex align-center justify-center changePsw_flex_password_noActive_2">
|
||||
{{ content }}
|
||||
</view>
|
||||
</template>
|
||||
</benben-digital-password>
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex flex-direction flex-wrap align-stretch justify-center benben-flex-layout">
|
||||
<view class='flex flex-wrap align-center justify-center'>
|
||||
<benben-send-verification-code class='flex changePsw_fd3_0_c0' after-text='后重新获取' before-text='获取验证码'
|
||||
type='4' :phone="phone"></benben-send-verification-code>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
<view
|
||||
class="flex flex-direction flex-wrap align-center justify-center benben-position-layout flex changePsw_flex_4">
|
||||
<button class='changePsw_fd4_0' @tap.stop="changePswFunc()">下一步</button>
|
||||
|
||||
</view>
|
||||
<view :style="{height: '88rpx'}"></view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
validate
|
||||
} from '@/common/utils/validate.js'
|
||||
export default {
|
||||
components: {},
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
"phone": "",
|
||||
"code": "",
|
||||
mobile:""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
themeColor() {
|
||||
return this.$store.getters.themeColor
|
||||
},
|
||||
|
||||
},
|
||||
watch: {},
|
||||
onLoad(options) {
|
||||
console.log()
|
||||
this.phone = global.userInfo._mobile
|
||||
this.mobile = global.userInfo.mobile
|
||||
},
|
||||
methods: {
|
||||
//修改密码
|
||||
changePswFunc() {
|
||||
if (!validate(this.code, 'require')) {
|
||||
this.$message.info('验证码不能为空');
|
||||
return false;
|
||||
}
|
||||
if (!validate(this.code, 'captcha')) {
|
||||
this.$message.info('请输入正确的验证码');
|
||||
return false;
|
||||
}
|
||||
if (!validate(this.code, 'length', '4')) {
|
||||
this.$message.info('请输入4位验证码数字');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 请求接口时携带的数据
|
||||
// let data = {
|
||||
// mobile: this.phone,
|
||||
// code: this.code,
|
||||
// type: 4
|
||||
// };
|
||||
// this.$api.post(global.apiUrls.post5f6db4db8abcf, data).then((res) => {
|
||||
// res = res.data;
|
||||
// if (res.code == 1) {
|
||||
// this.$urouter.redirectTo({
|
||||
// url: "/pages/xtsz/inputNewPhone/inputNewPhone?phone=" + this.phone,
|
||||
// });
|
||||
// } else {
|
||||
// this.$message.info("验证码错误");
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
this.$urouter.navigateTo(`/pages/xtsz/setnewPwd/setnewPwd?phone=${this.phone}&code=${this.code}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
min-height: calc(100vh - var(--window-bottom));
|
||||
background: #fff;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.changePsw_flex_0 {
|
||||
border-bottom: 1px solid #eee;
|
||||
background: #fff;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
top: 0rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.changePsw_fd0_0_c2 {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.changePsw_fd0_0_c1_c0 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.changePsw_fd0_0_c0_c0 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.changePsw_fd0_0 {
|
||||
margin: 0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.changePsw_flex_1 {
|
||||
padding: 103rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.changePsw_fd1_1 {
|
||||
margin: 51rpx 0rpx 71rpx 0rpx;
|
||||
line-height: 37rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #484848;
|
||||
}
|
||||
|
||||
.changePsw_fd1_0 {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.changePsw_flex_password_noActive_2 {
|
||||
border: 1px solid var(--benbenbdColor0);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.changePsw_flex_password_active_2 {
|
||||
border: 1px solid var(--benbenbdColor0);
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
::v-deep .changePsw_flex_password_2 {
|
||||
margin: 24rpx 0rpx 48rpx 0rpx;
|
||||
}
|
||||
|
||||
.changePsw_fd3_0_c0 {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(29, 138, 240, 1);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.changePsw_flex_4 {
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
bottom: calc(40rpx + var(--window-bottom));
|
||||
}
|
||||
|
||||
.changePsw_fd4_0 {
|
||||
background: rgba(255, 147, 0, 1);
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
width: 686rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user