consumer模块完成度85%,测试连接supabase
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<view class="settings-page">
|
||||
<!-- 顶部栏 -->
|
||||
<!--<view class="settings-header">
|
||||
<!--<view class="settings-header" :style="{ paddingTop: statusBarHeight + 'px' }">
|
||||
<text class="back-btn" @click="goBack">‹</text>
|
||||
<text class="header-title">设置</text>
|
||||
</view>-->
|
||||
@@ -192,8 +192,20 @@
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { onBackPress } from '@dcloudio/uni-app'
|
||||
// import supa from '@/components/supadb/aksupainstance.uts'
|
||||
|
||||
// 拦截返回事件,强制跳转到个人中心页
|
||||
onBackPress((options) => {
|
||||
// 无论是什么触发的返回(系统返回键或导航栏返回按钮),都跳转到profile
|
||||
// 注意:onBackPress 只能在 page 中使用,component 中无效
|
||||
uni.switchTab({
|
||||
url: '/pages/mall/consumer/profile'
|
||||
})
|
||||
// 返回 true 表示阻止默认返回行为
|
||||
return true
|
||||
})
|
||||
|
||||
type UserType = {
|
||||
id: string
|
||||
phone: string | null
|
||||
@@ -236,8 +248,12 @@ const currentLanguage = ref<string>('简体中文')
|
||||
const currentTheme = ref<string>('自动')
|
||||
const appVersion = ref<string>('1.0.0')
|
||||
|
||||
const statusBarHeight = ref(0)
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
statusBarHeight.value = systemInfo.statusBarHeight || 0
|
||||
loadUserInfo()
|
||||
loadSettings()
|
||||
})
|
||||
@@ -564,11 +580,6 @@ const deleteAccount = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user