feat: 上线前修改

This commit is contained in:
anonymous
2025-01-08 08:30:28 +08:00
parent 71862ec3d5
commit 853f679d0b
50 changed files with 427 additions and 402 deletions
+55 -51
View File
@@ -15,67 +15,38 @@
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
<input
v-model="form.account"
@blur="handleBlur"
type="text"
placeholder-class="text-#889BC6"
class="text-right flex-1 text-14"
placeholder="请输入用户名"
placeholder="请输入手机号"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/message.png" mode="aspectFit" />
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
v-model="form.newpassword"
class="text-right flex-1 text-14"
placeholder="请输入新密码"
/>
</view>
<view class="flex items-center py-15" v-if="form.nosuth">
<image class="w-24 h-24" src="@/static/images/login/invite.png" mode="aspectFit" />
<input
v-model="form.cardnum"
placeholder-class="text-#889BC6"
type="text"
placeholder-class="text-#889BC6"
class="text-right flex-1 text-14"
placeholder="请输入短信验证码"
/>
<view
class="py-6 rounded-full ml-15 px-15 text-12 text-white btn-gradient text-14 text-#889BC6"
@click="handleGetCode"
>
获取验证码
</view>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请输入登录密码"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请再次输入登录密码"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请输入支付密码"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请再次输入支付密码"
placeholder="请输入身份证号"
/>
</view>
</view>
<view
class="mt-50 text-center py-12 rounded-full mx-15 text-15 text-white btn-gradient"
@click="handleRegister"
@click="handleSubmit"
>
确认
</view>
@@ -86,19 +57,52 @@
<script lang="ts" setup>
import NavBar from '@/components/NavBar.vue'
import { isLogged } from '@/interceptors/route'
import { editPasswordFirstAPI, editPasswordSecondAPI } from '@/service'
import { useUserStore } from '@/store/user'
import { showModal } from '@/utils'
const userStore = useUserStore()
const form = ref({
account: '',
newpassword: '',
cardnum: '',
nosuth: 0,
})
let redirect = '/'
onLoad((options) => {
redirect = options.redirect ?? '/'
})
const handleRegister = () => {
userStore.setUserInfo({
token: '123456',
})
async function handleBlur() {
const account = form.value.account
if (account) {
const { data } = await editPasswordFirstAPI({
account,
})
form.value.nosuth = data?.nosuth ?? 0
}
}
const handleSubmit = async () => {
if (!form.value.account || !form.value.newpassword) {
uni.showToast({
title: '请填写完整信息',
icon: 'none',
})
return
}
if (form.value.nosuth) {
if (!form.value.cardnum) {
uni.showToast({
title: '请填写身份证号',
icon: 'none',
})
return
}
}
await editPasswordSecondAPI(form.value)
await showModal('修改成功')
uni.reLaunch({
url: redirect,
})
+2 -2
View File
@@ -36,9 +36,9 @@
/>
</view>
</view>
<!-- <view class="ml-auto mr-0 w-fit text-gradient text-14 p-15" @click="handleEditPassword">
<view class="ml-auto mr-0 w-fit text-gradient text-14 p-15" @click="handleEditPassword">
忘记密码
</view> -->
</view>
<view
class="mt-30 text-center py-12 rounded-full mx-15 text-15 text-white btn-gradient"
@click="handleLogin"
+5 -4
View File
@@ -111,7 +111,7 @@ import NavBar from '@/components/NavBar.vue'
import { loginRoute } from '@/interceptors/route'
import { downloadAppAPI } from '@/service'
import { useUserStore } from '@/store/user'
import { getImageUrl } from '@/utils'
import { getImageUrl, showModal } from '@/utils'
const userStore = useUserStore()
@@ -128,9 +128,10 @@ const handleWithdrawalDetail = () => {
}
const handleWithdrawal = () => {
uni.navigateTo({
url: '/pages-sub/withdrawal/index',
})
showModal('1月26号开放提现')
// uni.navigateTo({
// url: '/pages-sub/withdrawal/index',
// })
}
const handleTeam = () => {
+2 -1
View File
@@ -104,7 +104,8 @@ onLoad(async (options) => {
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
<input
v-model="form.username"
type="text"
type="number"
maxlength="11"
placeholder-class="text-#889BC6"
class="text-right flex-1 text-14"
placeholder="请输入手机号"