修改密码bug
This commit is contained in:
parent
91ea925413
commit
3ce89c21cf
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 -->
|
||||||
|
|
@ -73,14 +79,14 @@
|
||||||
<u-popup v-model="showNickName" :closeable="true" mode="center" border-radius="20">
|
<u-popup v-model="showNickName" :closeable="true" mode="center" border-radius="20">
|
||||||
<view class="px-[50rpx] py-[40rpx] bg-white" style="width: 85vw">
|
<view class="px-[50rpx] py-[40rpx] bg-white" style="width: 85vw">
|
||||||
<view class="mb-[70rpx] text-xl text-center">修改昵称</view>
|
<view class="mb-[70rpx] text-xl text-center">修改昵称</view>
|
||||||
<u-form-item borderBottom>
|
<u-form-item borderBottom>
|
||||||
<u-input
|
<u-input
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
v-model="newNickname"
|
v-model="newNickname"
|
||||||
placeholder="请输入昵称"
|
placeholder="请输入昵称"
|
||||||
:border="false"
|
:border="false"
|
||||||
/>
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="mt-[80rpx]">
|
<view class="mt-[80rpx]">
|
||||||
<u-button @click="changeNameConfirm" type="primary" shape="circle"> 确定 </u-button>
|
<u-button @click="changeNameConfirm" type="primary" shape="circle"> 确定 </u-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -91,14 +97,14 @@
|
||||||
<u-popup v-model="showUserName" :closeable="true" mode="center" border-radius="20">
|
<u-popup v-model="showUserName" :closeable="true" mode="center" border-radius="20">
|
||||||
<view class="px-[50rpx] py-[40rpx] bg-white" style="width: 85vw">
|
<view class="px-[50rpx] py-[40rpx] bg-white" style="width: 85vw">
|
||||||
<view class="mb-[70rpx] text-xl text-center">修改账号</view>
|
<view class="mb-[70rpx] text-xl text-center">修改账号</view>
|
||||||
<u-form-item borderBottom>
|
<u-form-item borderBottom>
|
||||||
<u-input
|
<u-input
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
v-model="newUsername"
|
v-model="newUsername"
|
||||||
placeholder="请输入账号"
|
placeholder="请输入账号"
|
||||||
:border="false"
|
:border="false"
|
||||||
/>
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="mt-[80rpx]">
|
<view class="mt-[80rpx]">
|
||||||
<u-button @click="changeUserNameConfirm" type="primary" shape="circle">
|
<u-button @click="changeUserNameConfirm" type="primary" shape="circle">
|
||||||
确定
|
确定
|
||||||
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue