合并后台端

This commit is contained in:
comlibmb
2026-02-03 11:38:00 +08:00
57 changed files with 24996 additions and 5613 deletions

135
pages/user/bind-email.uvue Normal file
View File

@@ -0,0 +1,135 @@
<template>
<view class="page-container">
<view class="form-group">
<view class="input-item">
<text class="label">邮箱</text>
<input class="input" type="text" placeholder="请输入邮箱地址" v-model="email" />
</view>
<view class="input-item">
<text class="label">验证码</text>
<input class="input" type="number" placeholder="请输入验证码" v-model="code" maxlength="6" />
<text class="code-btn" @click="sendCode">{{ counting ? `${count}s` : '获取验证码' }}</text>
</view>
</view>
<button class="submit-btn" @click="handleSubmit">确认绑定</button>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const email = ref('')
const code = ref('')
const counting = ref(false)
const count = ref(60)
const sendCode = () => {
if (counting.value) return
if (!email.value || !email.value.includes('@')) {
uni.showToast({
title: '请输入正确的邮箱',
icon: 'none'
})
return
}
counting.value = true
count.value = 60
const timer = setInterval(() => {
count.value--
if (count.value <= 0) {
clearInterval(timer)
counting.value = false
}
}, 1000)
uni.showToast({
title: '验证码已发送',
icon: 'none'
})
}
const handleSubmit = () => {
if (!email.value || !code.value) {
uni.showToast({
title: '请填写完整信息',
icon: 'none'
})
return
}
// TODO: Call API to bind email
uni.showLoading({ title: '提交中...' })
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '绑定成功',
icon: 'success'
})
// 更新本地存储的用户信息
const userInfo = uni.getStorageSync('userInfo')
if (userInfo) {
// @ts-ignore
userInfo.email = email.value
uni.setStorageSync('userInfo', userInfo)
}
setTimeout(() => {
uni.navigateBack()
}, 1500)
}, 1000)
}
</script>
<style>
.page-container {
padding: 20px;
background-color: #f5f5f5;
min-height: 100vh;
}
.form-group {
background-color: #fff;
border-radius: 8px;
padding: 0 15px;
margin-bottom: 30px;
}
.input-item {
display: flex;
align-items: center;
height: 50px;
border-bottom: 1px solid #eee;
}
.input-item:last-child {
border-bottom: none;
}
.label {
width: 70px;
font-size: 14px;
color: #333;
}
.input {
flex: 1;
font-size: 14px;
}
.code-btn {
color: #007aff;
font-size: 14px;
padding: 5px 10px;
}
.submit-btn {
background-color: #007aff;
color: #fff;
border-radius: 25px;
font-size: 16px;
}
</style>

135
pages/user/bind-phone.uvue Normal file
View File

@@ -0,0 +1,135 @@
<template>
<view class="page-container">
<view class="form-group">
<view class="input-item">
<text class="label">手机号</text>
<input class="input" type="number" placeholder="请输入新手机号" v-model="phone" maxlength="11" />
</view>
<view class="input-item">
<text class="label">验证码</text>
<input class="input" type="number" placeholder="请输入验证码" v-model="code" maxlength="6" />
<text class="code-btn" @click="sendCode">{{ counting ? `${count}s` : '获取验证码' }}</text>
</view>
</view>
<button class="submit-btn" @click="handleSubmit">确认绑定</button>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const phone = ref('')
const code = ref('')
const counting = ref(false)
const count = ref(60)
const sendCode = () => {
if (counting.value) return
if (!phone.value || phone.value.length !== 11) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return
}
counting.value = true
count.value = 60
const timer = setInterval(() => {
count.value--
if (count.value <= 0) {
clearInterval(timer)
counting.value = false
}
}, 1000)
uni.showToast({
title: '验证码已发送',
icon: 'none'
})
}
const handleSubmit = () => {
if (!phone.value || !code.value) {
uni.showToast({
title: '请填写完整信息',
icon: 'none'
})
return
}
// TODO: Call API to bind phone
uni.showLoading({ title: '提交中...' })
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '绑定成功',
icon: 'success'
})
// 更新本地存储的用户信息
const userInfo = uni.getStorageSync('userInfo')
if (userInfo) {
// @ts-ignore
userInfo.phone = phone.value
uni.setStorageSync('userInfo', userInfo)
}
setTimeout(() => {
uni.navigateBack()
}, 1500)
}, 1000)
}
</script>
<style>
.page-container {
padding: 20px;
background-color: #f5f5f5;
min-height: 100vh;
}
.form-group {
background-color: #fff;
border-radius: 8px;
padding: 0 15px;
margin-bottom: 30px;
}
.input-item {
display: flex;
align-items: center;
height: 50px;
border-bottom: 1px solid #eee;
}
.input-item:last-child {
border-bottom: none;
}
.label {
width: 70px;
font-size: 14px;
color: #333;
}
.input {
flex: 1;
font-size: 14px;
}
.code-btn {
color: #007aff;
font-size: 14px;
padding: 5px 10px;
}
.submit-btn {
background-color: #007aff;
color: #fff;
border-radius: 25px;
font-size: 16px;
}
</style>

View File

@@ -0,0 +1,103 @@
<template>
<view class="page-container">
<view class="form-group">
<view class="input-item">
<text class="label">旧密码</text>
<input class="input" type="password" placeholder="请输入旧密码" v-model="oldPassword" />
</view>
<view class="input-item">
<text class="label">新密码</text>
<input class="input" type="password" placeholder="请输入新密码" v-model="newPassword" />
</view>
<view class="input-item">
<text class="label">确认密码</text>
<input class="input" type="password" placeholder="请再次输入新密码" v-model="confirmPassword" />
</view>
</view>
<button class="submit-btn" @click="handleSubmit">确认修改</button>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const oldPassword = ref('')
const newPassword = ref('')
const confirmPassword = ref('')
const handleSubmit = () => {
if (!oldPassword.value || !newPassword.value || !confirmPassword.value) {
uni.showToast({
title: '请填写完整信息',
icon: 'none'
})
return
}
if (newPassword.value !== confirmPassword.value) {
uni.showToast({
title: '两次输入的密码不一致',
icon: 'none'
})
return
}
// TODO: Call API to change password
uni.showLoading({ title: '提交中...' })
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '修改成功',
icon: 'success'
})
setTimeout(() => {
uni.navigateBack()
}, 1500)
}, 1000)
}
</script>
<style>
.page-container {
padding: 20px;
background-color: #f5f5f5;
min-height: 100vh;
}
.form-group {
background-color: #fff;
border-radius: 8px;
padding: 0 15px;
margin-bottom: 30px;
}
.input-item {
display: flex;
align-items: center;
height: 50px;
border-bottom: 1px solid #eee;
}
.input-item:last-child {
border-bottom: none;
}
.label {
width: 80px;
font-size: 14px;
color: #333;
}
.input {
flex: 1;
font-size: 14px;
}
.submit-btn {
background-color: #007aff;
color: #fff;
border-radius: 25px;
font-size: 16px;
}
</style>

View File

@@ -255,6 +255,35 @@ const getCode = async () => {
const handleLogin = async () => {
if (!validateAccount()) return
// 特殊账号处理admin/admin 直接跳转
if (account.value === 'admin' && password.value === 'admin') {
setIsLoggedIn(true)
const adminProfile = {
id: 'admin',
username: 'Admin',
email: 'admin@mall.com',
gender: 'unknown',
birthday: '',
height_cm: 0,
weight_kg: 0,
bio: 'Administrator',
avatar_url: '/static/logo.png',
preferred_language: 'zh-CN',
role: 'admin',
school_id: '',
grade_id: '',
class_id: ''
} as UserProfile
setUserProfile(adminProfile)
uni.showToast({ title: '管理员登录成功', icon: 'success' })
setTimeout(() => {
uni.switchTab({ url: '/pages/mall/consumer/index' })
}, 500)
return
}
if (loginType.value === 0) {
if (!validatePassword()) return
} else {
@@ -307,6 +336,16 @@ const handleLogin = async () => {
console.error('获取用户信息失败(忽略,不阻塞登录):', e)
}
// 显式保存用户ID到本地存储确保页面刷新或重启后 SupabaseService 能恢复身份
const currentSession = supa.getSession()
if (currentSession.user != null) {
const uid = currentSession.user?.getString('id')
if (uid != null) {
uni.setStorageSync('user_id', uid)
console.log('用户ID已保存到本地存储:', uid)
}
}
uni.showToast({ title: '登录成功', icon: 'success' })
if (!IS_TEST_MODE) {
setTimeout(() => {

690
pages/user/loginn.uvue Normal file
View File

@@ -0,0 +1,690 @@
<template>
<view class="page-wrapper">
<scroll-view class="login-container" scroll-y="true" show-scrollbar="false">
<!-- Language switch button -->
<view class="language-switch">
<button class="language-btn" @click="toggleLanguage">
{{ currentLocale === 'zh-CN' ? 'EN' : '中' }}
</button>
</view>
<!-- Unified content container -->
<view class="content-wrapper">
<!-- Logo section -->
<view class="logo-section">
<text class="app-title">Trainning Monitor</text>
<text class="page-title">{{ $t('user.login.title') }}</text>
<text class="page-subtitle">{{ $t('user.login.subtitle') }}</text>
</view>
<!-- Form container -->
<view class="form-container">
<form @submit="onSubmit">
<!-- Email input -->
<view class="input-group" :class="{ 'input-error': emailError }">
<text class="input-label">{{ $t('user.login.email') }}</text>
<input class="input-field" name="email" type="text" :value="email"
:placeholder="$t('user.login.email_placeholder')" @blur="validateEmail" />
<text v-if="emailError" class="error-text">{{ emailError }}</text>
</view>
<!-- Password input -->
<view class="input-group" :class="{ 'input-error': passwordError }">
<text class="input-label">{{ $t('user.login.password') }}</text>
<view class="password-input-container">
<input class="input-field" name="password" :type="showPassword ? 'text' : 'password'"
:value="password" :placeholder="$t('user.login.password_placeholder')"
@blur="validatePassword" />
<view class="password-toggle" @click="showPassword = !showPassword">
<text class="toggle-icon">{{ showPassword ? '👁' : '🙈' }}</text>
</view>
</view>
<text v-if="passwordError" class="error-text">{{ passwordError }}</text>
</view>
<!-- Additional options -->
<view class="options-row">
<view class="remember-me">
<checkbox value="rememberMe" color="#2196f3" />
<text class="remember-me-text">{{ $t('user.login.remember_me') }}</text>
</view>
<text class="forgot-password" @click="navigateToForgotPassword">
{{ $t('user.login.forgot_password') }}
</text>
</view>
<!-- Login button -->
<button form-type="submit" class="login-button" :disabled="isLoading" :loading="isLoading">
{{ $t('user.login.login_button') }}
</button>
<!-- General error message -->
<text v-if="generalError" class="general-error">{{ generalError }}</text>
</form>
<!-- Social login options -->
<view class="social-login">
<text class="social-login-text">{{ $t('user.login.or_login_with') }}</text>
<view class="social-buttons">
<button class="social-button wechat" @click="socialLogin('WeChat')">
<text class="social-icon">🟩</text>
</button>
<button class="social-button qq" @click="socialLogin('QQ')">
<text class="social-icon">🔵</text>
</button>
<button class="social-button sms" @click="socialLogin('SMS')">
<text class="social-icon">✉️</text>
</button>
</view>
</view>
<!-- Register option -->
<view class="register-option">
<text class="register-text">{{ $t('user.login.no_account') }}</text>
<text class="register-link"
@click="navigateToRegister">{{ $t('user.login.register_now') }}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script lang="uts">
import {HOME_REDIRECT,TABORPAGE} from '@/ak/config.uts'
import type { AkReqOptions, AkReqResponse, AkReqError } from '@/uni_modules/ak-req/index.uts';
import supa from '@/components/supadb/aksupainstance.uts';
import { getCurrentUser, logout } from '@/utils/store.uts';
import { switchLocale, getCurrentLocale } from '@/utils/utils.uts';
export default {
data() {
return {
// email: "akoo@163.com",
// password: "Hf2152111",
email: "am@163.com",
password: "kookoo",
emailError: "",
passwordError: "",
generalError: "",
isLoading: false,
showPassword: false,
rememberMe: false,
currentLocale: getCurrentLocale()
};
},
onLoad() {
// Try to restore saved email if "remember me" was selected
// this.tryRestoreEmail();
console.log('akkkk')
}, methods: {
toggleLanguage() {
const newLocale = this.currentLocale === 'zh-CN' ? 'en-US' : 'zh-CN';
switchLocale(newLocale);
this.currentLocale = newLocale;
uni.showToast({
title: this.$t('user.login.language_switched'),
icon: 'success'
});
}, tryRestoreEmail() {
try {
const savedEmail = uni.getStorageSync('rememberEmail') as string;
if (savedEmail.trim() !== "") {
this.email = savedEmail;
this.rememberMe = true;
}
} catch (e) {
console.error("Error restoring email:", e);
}
},
onSubmit(e : UniFormSubmitEvent) {
this.handleLogin();
},
validateEmail() {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (this.email.trim() === "") {
this.emailError = this.$t('user.login.email_required');
return false;
} else if (!emailRegex.test(this.email)) {
this.emailError = this.$t('user.login.email_invalid');
return false;
} else {
this.emailError = '';
return true;
}
}, validatePassword() {
if (this.password.trim() === "") {
this.passwordError = this.$t('user.login.password_required');
return false;
} else if (this.password.length < 6) {
this.passwordError = this.$t('user.login.password_too_short');
return false;
} else {
this.passwordError = '';
return true;
}
},
validateForm() {
const emailValid = this.validateEmail();
const passwordValid = this.validatePassword();
return emailValid && passwordValid;
},
async handleLogin() {
this.generalError = '';
// 清除旧用户数据
logout();
if (!this.validateForm()) {
return;
}
this.isLoading = true;
try {
// Save email if remember me is checked
if (this.rememberMe) {
uni.setStorageSync('rememberEmail', this.email);
} else {
uni.removeStorageSync('rememberEmail');
} // Call signin method from Supabase
const result = await supa.signIn(
this.email,
this.password);
if (result.user !== null) {
// 获取并更新当前用户,确保数据已生效
const profile = await getCurrentUser();
if (profile==null) throw new Error(this.$t('user.login.profile_update_failed'));
// 登录成功提示
uni.showToast({ title: this.$t('user.login.login_success'), icon: 'success' });
// 跳转至运动页面
if(TABORPAGE)
{
uni.switchTab({ url: HOME_REDIRECT });
}
else{
uni.navigateTo({ url: HOME_REDIRECT });
}
return;
} else {
throw new Error(this.$t('user.login.login_failed'));
}
} catch (err) {
console.error("Login error:", err);
// Show error dialog to user
let errorMessage = this.$t('user.login.login_failed');
if (err !== null && typeof err === 'object') {
const error = err as Error;
if (error.message !== null && error.message.trim() !== '') {
errorMessage = error.message;
}
}
uni.showModal({
title: this.$t('user.login.error_title'),
content: errorMessage,
showCancel: false,
confirmText: this.$t('user.login.confirm'),
success: () => {
// Clear any existing error states
this.generalError = '';
this.emailError = '';
this.passwordError = '';
}
});
} finally {
this.isLoading = false;
}
},
socialLogin(provider : string) {
// This would be implemented to handle OAuth login with different providers
uni.showToast({
title: `${provider} ${this.$t('user.login.coming_soon')}`,
icon: 'none'
});
},
navigateToRegister() {
uni.navigateTo({
url: '/pages/user/register'
});
},
navigateToForgotPassword() {
uni.navigateTo({
url: '/pages/user/forgot-password'
});
}
}
};
</script>
<style>
/* Page wrapper for full screen */
.page-wrapper {
width: 100%;
}
.login-container {
width: 100%;
background-image: linear-gradient(to bottom right, #f8f9fa, #e9ecef);
}
/* Content wrapper - single scrollable container */
.content-wrapper {
width: 100%;
/* #ifdef APP-PLUS */
padding: 20rpx 15rpx;
min-height: 800rpx;
/* #endif */
/* #ifndef APP-PLUS */
padding: 30rpx 25rpx;
min-height: 1000rpx;
/* #endif */
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
}
/* Language switch button - adjusted for single container */
.language-switch {
position: absolute;
/* #ifdef APP-PLUS */
top: 30rpx;
right: 25rpx;
/* #endif */
/* #ifndef APP-PLUS */
top: 40rpx;
right: 35rpx;
/* #endif */
z-index: 100;
}
.language-btn {
/* #ifdef APP-PLUS */
width: 50rpx;
height: 50rpx;
border-radius: 25rpx;
font-size: 18rpx;
/* #endif */
/* #ifndef APP-PLUS */
width: 70rpx;
height: 70rpx;
border-radius: 35rpx;
font-size: 24rpx;
/* #endif */
background-color: rgba(33, 150, 243, 0.8);
color: #fff;
font-weight: normal;
border: 1rpx solid rgba(255, 255, 255, 0.3);
text-align: center;
box-shadow: 0 3rpx 10rpx rgba(33, 150, 243, 0.3);
}
/* Logo section - very compact */
.logo-section {
display: flex;
flex-direction: column;
align-items: center;
/* #ifdef APP-PLUS */
margin: 15rpx 0 20rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin: 25rpx 0 30rpx;
/* #endif */
}
.app-title {
/* #ifdef APP-PLUS */
font-size: 28rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 36rpx;
/* #endif */
font-weight: bold;
color: #2196f3;
}
.page-title {
/* #ifdef APP-PLUS */
font-size: 32rpx;
margin-top: 8rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 48rpx;
margin-top: 15rpx;
/* #endif */
font-weight: bold;
color: #333;
}
.page-subtitle {
/* #ifdef APP-PLUS */
font-size: 18rpx;
margin-top: 4rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
margin-top: 8rpx;
/* #endif */
color: #666;
}
/* Form container - optimized for tablets */
.form-container {
width: 100%;
/* #ifdef APP-PLUS */
max-width: 620rpx;
padding: 18rpx;
margin: 0 auto;
/* #endif */
/* #ifndef APP-PLUS */
max-width: 560rpx;
padding: 32rpx;
margin: 0 auto;
/* #endif */
background-color: #ffffff;
border-radius: 12rpx;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.06);
box-sizing: border-box;
}
/* Input groups - more compact */
.input-group {
/* #ifdef APP-PLUS */
margin-bottom: 18rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin-bottom: 25rpx;
/* #endif */
}
.input-label {
/* #ifdef APP-PLUS */
font-size: 20rpx;
margin-bottom: 6rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 26rpx;
margin-bottom: 8rpx;
/* #endif */
font-weight: normal;
color: #333;
display: block;
}
.input-field {
width: 100%;
/* #ifdef APP-PLUS */
height: 60rpx;
padding: 0 20rpx;
font-size: 22rpx;
/* #endif */
/* #ifndef APP-PLUS */
height: 80rpx;
padding: 0 25rpx;
font-size: 26rpx;
/* #endif */
border-radius: 8rpx;
border: 2rpx solid #ddd;
background-color: #f9f9f9;
box-sizing: border-box;
}
.input-error .input-field {
border-color: #f44336;
}
.error-text {
/* #ifdef APP-PLUS */
font-size: 20rpx;
margin-top: 5rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
margin-top: 6rpx;
/* #endif */
color: #f44336;
}
/* Password input */
.password-input-container {
position: relative;
}
.password-toggle {
position: absolute;
/* #ifdef APP-PLUS */
right: 12rpx;
top: 16rpx;
/* #endif */
/* #ifndef APP-PLUS */
right: 18rpx;
top: 22rpx;
/* #endif */
z-index: 1;
}
.toggle-icon {
/* #ifdef APP-PLUS */
font-size: 20rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 26rpx;
/* #endif */
color: #666;
}
/* Options row - more compact */
.options-row {
display: flex;
justify-content: flex-start;
align-items: center;
flex-direction: row;
/* #ifdef APP-PLUS */
margin: 10rpx 0 18rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin: 15rpx 0 25rpx;
/* #endif */
}
.remember-me {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.remember-me-text {
/* #ifdef APP-PLUS */
font-size: 18rpx;
margin-left: 6rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
margin-left: 8rpx;
/* #endif */
color: #666;
}
.forgot-password {
/* #ifdef APP-PLUS */
font-size: 18rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
/* #endif */
color: #2196f3;
}
/* Login button - more compact */
.login-button {
width: 100%;
/* #ifdef APP-PLUS */
height: 60rpx;
font-size: 24rpx;
margin: 12rpx 0;
border-radius: 30rpx;
/* #endif */
/* #ifndef APP-PLUS */
height: 80rpx;
font-size: 30rpx;
margin: 18rpx 0; border-radius: 40rpx;
/* #endif */
background-image: linear-gradient(to right, #2196f3, #03a9f4);
color: #fff;
font-weight: normal;
text-align: center;
box-shadow: 0 8rpx 16rpx rgba(3, 169, 244, 0.2);
}
.login-button:disabled {
background: #ccc;
box-shadow: none;
}
/* General error */
.general-error {
width: 100%;
text-align: center;
color: #f44336;
/* #ifdef APP-PLUS */
font-size: 18rpx;
margin-top: 10rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
margin-top: 15rpx;
/* #endif */
}
/* Social login - very compact */
.social-login {
/* #ifdef APP-PLUS */
margin-top: 15rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin-top: 25rpx;
/* #endif */
display: flex;
flex-direction: column;
align-items: center;
}
.social-login-text {
/* #ifdef APP-PLUS */
font-size: 18rpx;
margin-bottom: 10rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
margin-bottom: 15rpx;
/* #endif */
color: #666;
}
.social-buttons {
display: flex;
flex-direction: row;
justify-content: center;
}
.social-buttons .social-button {
/* #ifdef APP-PLUS */
margin-left: 10rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin-left: 12rpx;
/* #endif */
}
.social-buttons .social-button:first-child {
margin-left: 0;
}
.social-button {
/* #ifdef APP-PLUS */
width: 50rpx;
height: 50rpx;
border-radius: 25rpx;
/* #endif */
/* #ifndef APP-PLUS */
width: 70rpx;
height: 70rpx;
border-radius: 35rpx;
/* #endif */
text-align: center;
}
.social-icon {
/* #ifdef APP-PLUS */
font-size: 24rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 32rpx;
/* #endif */
color: #fff;
}
.google {
background-color: #db4437;
}
.facebook {
background-color: #4267B2;
}
.apple {
background-color: #000;
}
.wechat {
background-color: #1aad19;
}
.qq {
background-color: #498ad5;
}
.sms {
background-color: #ffb300;
}
/* Register option - compact */
.register-option {
display: flex;
justify-content: center;
/* #ifdef APP-PLUS */
margin-top: 15rpx;
margin-bottom: 5rpx;
/* #endif */
/* #ifndef APP-PLUS */
margin-top: 25rpx;
margin-bottom: 10rpx;
/* #endif */
}
.register-text {
/* #ifdef APP-PLUS */
font-size: 18rpx;
margin-right: 4rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
margin-right: 6rpx;
/* #endif */
color: #666;
}
.register-link {
/* #ifdef APP-PLUS */
font-size: 18rpx;
/* #endif */
/* #ifndef APP-PLUS */
font-size: 24rpx;
/* #endif */
color: #2196f3;
font-weight: normal;
}
</style>

View File

@@ -41,7 +41,7 @@ docker-compose logs auth | grep -i error
### 4. 验证配置是否生效
在 Supabase Dashboard (http://192.168.1.63:3000) 的 SQL Editor 中执行:
在 Supabase Dashboard (http://192.168.1.61:3000) 的 SQL Editor 中执行:
```sql
-- 检查当前配置(需要访问 GoTrue 配置)
@@ -59,7 +59,7 @@ docker-compose logs auth | grep -i error
确认 `ak/config.uts` 中的配置正确:
```typescript
export const SUPA_URL: string = 'http://192.168.1.63:8000'
export const SUPA_URL: string = 'http://192.168.1.61:8000'
export const SUPA_KEY: string = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
```

View File

@@ -58,7 +58,7 @@ grep ENABLE_EMAIL_AUTOCONFIRM supabase_pro/.env
## 🔍 验证用户是否创建
在 Supabase Dashboard (http://192.168.1.63:3000) 的 SQL Editor 中执行:
在 Supabase Dashboard (http://192.168.1.61:3000) 的 SQL Editor 中执行:
```sql
-- 检查最新注册的用户

View File

@@ -16,7 +16,7 @@
**执行步骤**
1. **在 Supabase Dashboard (http://192.168.1.63:3000) 中打开 SQL Editor**
1. **在 Supabase Dashboard (http://192.168.1.61:3000) 中打开 SQL Editor**
2. **执行 `USER_AUTH_SCHEMA.sql`**
- 创建 `ak_users` 表和 RLS 策略

View File

@@ -44,7 +44,7 @@ docker-compose restart auth
### 方法一:在 Supabase Dashboard 中手动确认
1. 打开 Supabase Dashboard: http://192.168.1.63:3000
1. 打开 Supabase Dashboard: http://192.168.1.61:3000
2. 进入 **Authentication****Users**
3. 找到对应的用户
4. 点击用户,在详情页中点击 **Confirm Email** 按钮