更新若干
This commit is contained in:
1 parent
54c90072fb
commit
5682069553
59 files changed
+3813
-1617
No files matched your search
@@ -1,9 +1,18 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="nav-bar" :style="headPad">
|
||||
<view class="nav-back" @tap="goBack">
|
||||
<FaIcon name="chevron-left" color="#1e293b" :size="20" />
|
||||
<text class="nav-back-text">返回</text>
|
||||
</view>
|
||||
<text class="nav-title">设置登录密码</text>
|
||||
<view class="nav-side" />
|
||||
</view>
|
||||
|
||||
<view class="hero">
|
||||
<text class="eyebrow">YUNZE WORKSPACE</text>
|
||||
<text class="title">设置登录密码</text>
|
||||
<text class="desc">手机号 {{ mobileMask || '已验证' }} 尚未注册,设置密码后即可使用工作台</text>
|
||||
<text class="title">设置登录密码(可选)</text>
|
||||
<text class="desc">手机号 {{ mobileMask || '已验证' }} 尚未注册。可设置密码解锁完整服务,也可直接返回,继续免登录体验公开功能</text>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
@@ -15,11 +24,12 @@
|
||||
<text class="label">确认密码</text>
|
||||
<input v-model="confirmPassword" class="input" type="password" placeholder="再输入一次" :maxlength="32" />
|
||||
</view>
|
||||
<text class="hint">密码至少 6 位;当前账号会在注册时自动绑定,下次可直接进入</text>
|
||||
<text class="hint">密码至少 6 位;此步骤为可选,跳过不影响继续浏览公开功能</text>
|
||||
<view v-if="errorMsg" class="error"><text>{{ errorMsg }}</text></view>
|
||||
<button class="submit" :disabled="loading" @tap="handleSubmit">
|
||||
{{ loading ? '注册中…' : '完成注册' }}
|
||||
</button>
|
||||
<view class="skip" @tap="goBack"><text>暂不设置,返回工作台</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -27,12 +37,15 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { mpHeadPad } from '@/utils/mpHead.js'
|
||||
import FaIcon from '@/components/FaIcon.vue'
|
||||
import { onboardingRegister } from '@/api/onboarding.js'
|
||||
import { setAuthTokens, setTid, setTenantName } from '@/utils/auth.js'
|
||||
import { guestMerge } from '@/api/guest.js'
|
||||
import { getGuestToken, clearGuestToken } from '@/utils/guest.js'
|
||||
import { clearHomeCache } from '@/api/workspace.js'
|
||||
|
||||
const headPad = mpHeadPad()
|
||||
const token = ref('')
|
||||
const mobileMask = ref('')
|
||||
const password = ref('')
|
||||
@@ -44,15 +57,21 @@ onLoad((options = {}) => {
|
||||
token.value = options.token || ''
|
||||
mobileMask.value = decodeURIComponent(options.mobile_mask || '')
|
||||
if (!token.value) {
|
||||
errorMsg.value = '验证会话已失效,请返回工作台重新验证手机号'
|
||||
errorMsg.value = '验证会话已失效,可返回工作台继续使用公开功能'
|
||||
}
|
||||
})
|
||||
|
||||
function goBack() {
|
||||
const pages = (typeof getCurrentPages === 'function' && getCurrentPages()) || []
|
||||
if (pages.length > 1) uni.navigateBack()
|
||||
else uni.reLaunch({ url: '/pages/nav/nav' })
|
||||
}
|
||||
|
||||
async function handleSubmit() {
|
||||
if (loading.value) return
|
||||
errorMsg.value = ''
|
||||
if (!token.value) {
|
||||
errorMsg.value = '验证会话已失效,请返回工作台重新验证手机号'
|
||||
errorMsg.value = '验证会话已失效,可返回工作台继续使用公开功能'
|
||||
return
|
||||
}
|
||||
if (password.value.length < 6) {
|
||||
@@ -103,7 +122,24 @@ async function handleSubmit() {
|
||||
background: linear-gradient(160deg, #eaf3ff 0%, #f8fafc 42%, #f8fafc 100%);
|
||||
}
|
||||
|
||||
.hero { padding: 120rpx 8rpx 56rpx; }
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 16rpx;
|
||||
}
|
||||
.nav-back {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
min-width: 120rpx;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.nav-back-text { font-size: 28rpx; color: #1e293b; }
|
||||
.nav-title { flex: 1; text-align: center; font-size: 30rpx; font-weight: 600; color: #1e293b; }
|
||||
.nav-side { min-width: 120rpx; }
|
||||
|
||||
.hero { padding: 56rpx 8rpx 48rpx; }
|
||||
.eyebrow { display: block; font-size: 20rpx; font-weight: 700; letter-spacing: 3rpx; color: #6e9de5; }
|
||||
.title { display: block; margin-top: 14rpx; font-size: 46rpx; font-weight: 700; color: #17345f; }
|
||||
.desc { display: block; margin-top: 16rpx; font-size: 25rpx; line-height: 1.6; color: #64748b; }
|
||||
@@ -142,4 +178,11 @@ async function handleSubmit() {
|
||||
&::after { border: none; }
|
||||
&[disabled] { opacity: .6; }
|
||||
}
|
||||
.skip {
|
||||
margin-top: 28rpx;
|
||||
padding: 18rpx 0;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #64748b;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user