修改密码bug

This commit is contained in:
Jason 2022-09-16 17:13:12 +08:00
parent 91ea925413
commit 3ce89c21cf
4 changed files with 32 additions and 24 deletions

View File

@ -5,7 +5,7 @@
<view> <view>
<u-image :src="appStore.config.website.logo" mode="widthFix" height="160" width="160" /> <u-image :src="appStore.config.website.logo" mode="widthFix" height="160" width="160" />
</view> </view>
<view class="mt-4">{{ appStore.config.website.name }}</view> <view class="mt-4 text-xl font-medium">{{ appStore.config.website.name }}</view>
<view class="w-full mt-[60rpx] pb-[60rpx]"> <view class="w-full mt-[60rpx] pb-[60rpx]">
<u-form borderBottom> <u-form borderBottom>
<template <template

View File

@ -48,16 +48,22 @@
<u-button <u-button
open-type="getPhoneNumber" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" @getphonenumber="getPhoneNumber"
size="mini"
type="primary" type="primary"
shape="circle" shape="circle"
size="mini"
:plain="true" :plain="true"
> >
{{ userInfo?.mobile == '' ? '绑定手机号' : '更换手机号' }} {{ userInfo?.mobile == '' ? '绑定手机号' : '更换手机号' }}
</u-button> </u-button>
<!-- #endif --> <!-- #endif -->
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<u-button @click="" size="mini" type="primary" shape="circle" :plain="true"> <u-button
@click="showMobilePop = true"
size="mini"
type="primary"
shape="circle"
:plain="true"
>
{{ userInfo?.mobile == '' ? '绑定手机号' : '更换手机号' }} {{ userInfo?.mobile == '' ? '绑定手机号' : '更换手机号' }}
</u-button> </u-button>
<!-- #endif --> <!-- #endif -->
@ -159,10 +165,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, shallowRef } from 'vue' import { ref, shallowRef } from 'vue'
import { onShow, onUnload } from '@dcloudio/uni-app' import { onShow, onUnload } from '@dcloudio/uni-app'
import { getUserInfo, userEdit, userBindMobile, userMnpMobile } from '@/api/user.ts' import { getUserInfo, userEdit, userBindMobile, userMnpMobile } from '@/api/user'
import { smsSend } from '@/api/app' import { smsSend } from '@/api/app'
import { FieldType, SMSEnum } from '@/enums/appEnums' import { FieldType, SMSEnum } from '@/enums/appEnums'
import { uploadFile } from '@/utils/util.ts' import { uploadFile } from '@/utils/util'
// //
const userInfo = ref<any | null>(null) const userInfo = ref<any | null>(null)
@ -222,6 +228,8 @@ const changeCodeMobile = async () => {
mobile: newMobile.value, mobile: newMobile.value,
code: mobileCode.value code: mobileCode.value
}) })
uni.$u.toast('修改成功')
showMobilePop.value = false
getUser() getUser()
} }

View File

@ -410,14 +410,14 @@ export default {
&__input { &__input {
//height: $u-form-item-height; //height: $u-form-item-height;
font-size: 28rpx; font-size: 30rpx;
color: $u-main-color; color: $u-main-color;
flex: 1; flex: 1;
} }
&__textarea { &__textarea {
width: auto; width: auto;
font-size: 28rpx; font-size: 30rpx;
color: $u-main-color; color: $u-main-color;
padding: 10rpx 0; padding: 10rpx 0;
line-height: normal; line-height: normal;

View File

@ -336,7 +336,7 @@ export default {
&__text { &__text {
color: $u-content-color; color: $u-content-color;
font-size: 26rpx; font-size: 22rpx;
line-height: 28rpx; line-height: 28rpx;
position: absolute; position: absolute;
bottom: 14rpx; bottom: 14rpx;