consumer模块完成95%,在和商家端对接聊天购物闭环
This commit is contained in:
@@ -158,9 +158,27 @@
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { onShow, onLoad, onBackPress } from '@dcloudio/uni-app'
|
||||
import { supabaseService } from '@/utils/supabaseService.uts'
|
||||
|
||||
// 拦截返回事件,避免跳回登录页
|
||||
onBackPress((options) => {
|
||||
if (options.from === 'navigateBack') {
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length > 1) {
|
||||
const prevPage = pages[pages.length - 2]
|
||||
// 如果上一页是登录页,则重定向到个人中心
|
||||
if (prevPage.route.includes('login')) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/mall/consumer/profile'
|
||||
})
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
// 响应式数据
|
||||
const orders = ref<any[]>([])
|
||||
const allOrdersList = ref<any[]>([]) // Store all fetched orders for client-side filtering
|
||||
@@ -642,6 +660,8 @@ const goShopping = () => {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 0 10px;
|
||||
/* 关键:确保宽度包含所有子元素,允许滚动 */
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user