consumer模块完成度95%,准备部署消费者端测试

This commit is contained in:
cyh666666
2026-03-05 08:45:00 +08:00
parent cceb556c62
commit 7f7f723d93
1043 changed files with 53958 additions and 3445 deletions

View File

@@ -75,7 +75,8 @@
</template>
<script setup lang="uts">
import { ref, onShow } from 'vue'
import { ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { supabaseService } from '@/utils/supabaseService.uts'
type ProfileType = {

View File

@@ -160,6 +160,10 @@ const account = ref<string>('')
const password = ref<string>('')
const captcha = ref<string>('')
// 测试账号(开发测试用)
const TEST_ACCOUNT = 'test@mall.com'
const TEST_PASSWORD = 'Hf2152111'
const isLoading = ref<boolean>(false)
const codeDisabled = ref<boolean>(false)
@@ -193,6 +197,9 @@ const checkLoginStatus = (): void => {
onMounted(() => {
checkLoginStatus()
// 自动填充测试账号密码
account.value = TEST_ACCOUNT
password.value = TEST_PASSWORD
})
const validateAccount = (): boolean => {

View File

@@ -351,7 +351,8 @@ const onWeightInput = (e: UniInputEvent): void => {
}
const showGenderPickerNow = (): void => {
const idx = genderOptions.indexOf(profile.value.gender)
const genderValue = profile.value.gender
const idx = genderValue != null ? genderOptions.indexOf(genderValue) : -1
tempGenderIndex.value = [idx >= 0 ? idx : 0]
showGenderPicker.value = true
}
@@ -401,10 +402,17 @@ onMounted(() => {
display: flex;
flex-direction: column;
background-color: #f8f9fa;
flex: 1;
/* 使用 100% 替代 100vh 以增强安卓兼容性 */
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.top-section {
flex-shrink: 0;
height: 100rpx;
position: relative;
background-color: #f8f9fa;
@@ -412,14 +420,15 @@ onMounted(() => {
.main-section {
flex: 1;
overflow: hidden;
/* 显式声明高度为 0 是 flex 容器内 scroll-view 生效的关键 */
height: 0;
}
.profile-container {
width: 100%;
height: 100%;
padding: 20rpx;
background-color: #f8f9fa;
display: flex;
flex-direction: column;
box-sizing: border-box;
}