|
@@ -10,17 +10,13 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { getCode, register } from '@/api/login'
|
|
|
import { t } from '@/locale'
|
|
|
-import { goBack, toPage } from '@/utils/page'
|
|
|
+import { toPage } from '@/utils/page'
|
|
|
import { toast } from '@/utils/toast'
|
|
|
|
|
|
defineOptions({
|
|
|
name: 'Register', // 注册
|
|
|
})
|
|
|
|
|
|
-// 获取屏幕边界到安全区域距离
|
|
|
-const systemInfo = uni.getSystemInfoSync()
|
|
|
-const safeAreaInsets = systemInfo.safeAreaInsets
|
|
|
-
|
|
|
// 表单数据
|
|
|
const formData = ref({
|
|
|
name: '',
|
|
@@ -29,7 +25,11 @@ const formData = ref({
|
|
|
pwd: '',
|
|
|
code: '',
|
|
|
})
|
|
|
-
|
|
|
+onLoad((options) => {
|
|
|
+ if (options.referrer) {
|
|
|
+ formData.value.code = options.referrer as string
|
|
|
+ }
|
|
|
+})
|
|
|
// 验证码倒计时
|
|
|
const countdown = ref(0)
|
|
|
const countdownTimer = ref<any>(null)
|
|
@@ -180,19 +180,8 @@ onUnmounted(() => {
|
|
|
<view class="register-page min-h-screen bg-white">
|
|
|
<!-- 背景图片区域 -->
|
|
|
<view class="auth-bg-section relative">
|
|
|
- <!-- 自定义导航栏 -->
|
|
|
- <view :style="{ paddingTop: `${safeAreaInsets?.top}px` }">
|
|
|
- <view class="h-88rpx flex items-center px-24rpx">
|
|
|
- <wd-icon name="thin-arrow-left" size="32rpx" @click="() => goBack()" />
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
<!-- Logo和标语 -->
|
|
|
- <view class="pb-40rpx pt-60rpx text-center">
|
|
|
- <view class="mb-20rpx flex items-center justify-center">
|
|
|
- <image src="/static/logo.png" class="mr-16rpx h-60rpx w-60rpx" />
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="pb-40rpx pt-60rpx text-center" />
|
|
|
</view>
|
|
|
|
|
|
<!-- 表单内容区域 -->
|