| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <template>
- <view class="page">
- <view class="info">
- <u--form labelPosition="left" :model="info" ref="ownerForm" labelWidth="80" errorType="message"
- :labelStyle="{fontWeight:'bold',color:'#333'}">
- <u-form-item label="登录密码" borderBottom>
- <u--input v-model="info.password" border="none" clearable placeholder="请输入登录密码"
- placeholderStyle="color:#999" :password="isHidePassword"></u--input>
- <image class="icon-img"
- :src="isHidePassword?'/static/image/login/icon-hide.png':'/static/image/login/icon-show.png'"
- mode="" @tap="isHidePassword=!isHidePassword"></image>
- </u-form-item>
- </u--form>
- </view>
- <view class="btn dis a-c j-c " @click="validateMethod">
- 确定
- </view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations
- } from "vuex"
- export default {
- data() {
- return {
- isHidePassword: true, //是否隐藏密码
- info: {
- mobile: "",
- password: "",
- },
- userId: "",
- }
- },
- onShow() {
- },
- onLoad(options) {
- if (options.userId) {
- this.info.mobile = options.mobile;
- this.userId = options.userId;
- }
- },
- computed: {},
- methods: {
- async validateMethod() {
- if (!this.info.mobile) {
- uni.showToast({
- title: '手机号为空',
- icon: 'none'
- });
- return;
- }
- if (!this.info.password) {
- uni.showToast({
- title: '密码为空',
- icon: 'none'
- });
- return;
- }
- let res = await this.$http.post('/appUser/validateCode', this.info);
- if (res.code == '200' && res.data) {
- setTimeout(() => {
- uni.navigateTo({
- url: '/pages/my/changePhoneNumber?userId=' + this.userId,
- })
- }, 1000)
- } else {
- uni.showToast({
- title: "密码校验错误",
- icon: 'none'
- });
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- background-color: #fff;
- padding: 30rpx 60rpx;
- box-sizing: border-box;
- }
- .icon-img {
- width: 30rpx;
- height: 30rpx;
- }
- .btn {
- padding: 20rpx;
- box-sizing: border-box;
- background: #FDE935;
- border-radius: 45rpx 45rpx 45rpx 45rpx;
- margin-top: 100rpx;
- font-size: 36rpx;
- color: #1F1F1F;
- font-weight: bold;
- }
- ::v-deep {
- .u-form-item__body {
- padding: 34rpx 0;
- }
- }
- .u-page__code-text {
- padding: 4rpx 18rpx;
- background: rgba(253, 233, 53, 0.2);
- border-radius: 6rpx 6rpx 6rpx 6rpx;
- border: 1rpx solid #FDE935;
- color: #333333;
- font-size: 26rpx;
- }
- </style>
|