feat:基座页面

This commit is contained in:
dzc committed 2026-03-13 11:08:08 +08:00
1 parent 36a8665bae
commit 4b1e41b550
6 files changed
+86 -17

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import request from "@/sheep/utils/request"
export default {
appList: (params: any) =>
request({
url: "/app/app-menu/app/list",
method: "GET",
params,
}),
}
+1
View File
@@ -5,6 +5,7 @@ export { default as actCouponApi } from "./act-coupon"
export { default as actCancelApi } from "./act-cancel"
export { default as applyApi } from "./apply"
export { default as adApi } from "./ad"
export { default as appApi } from "./app"
export { default as boxesApi } from "./boxes"
export { default as faceApi } from "./face"
export { default as feedbackApi } from "./feedback"
@@ -39,16 +39,30 @@ const isTabbar = computed(() => {
return router.hasTabbar()
})
const isDashboard = computed(() => {
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
if (!currentPage) {
return true
}
return currentPage.route != "pages/root/dashboard"
})
function doBackClick() {
router.back()
}
function doToDashboard() {
router.jump("/pages/root/dashboard", {}, 3)
}
</script>
<template>
<view class="navbar" :style="{ backgroundColor: bgColor, height: '44px' }">
<view class="navbar_left" v-if="showLeft && !isTabbar" @tap="doBackClick">
<text class="sicon-back icon" v-if="isHistiry" />
<text class="sicon-home icon" v-else />
<view class="navbar_left">
<view class="sicon-back icon" @tap="doBackClick" />
<view v-if="isDashboard" class="navbar_left_line" />
<view v-if="isDashboard" class="sicon-home icon" @tap="doToDashboard" />
</view>
<view class="navbar_title" :style="{ color: titleColor }">{{ props.title }}</view>
<view v-if="props.rightIcon" class="navbar_right" @tap="emit('rightClick')">
@@ -68,14 +82,25 @@ function doBackClick() {
&_left {
position: absolute;
left: 20rpx;
display: flex;
align-items: center;
height: 56rpx;
border-radius: 28rpx;
background: #fff;
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
border-radius: 28rpx;
width: 56rpx;
height: 56rpx;
display: flex;
justify-content: center;
align-items: center;
&_line {
width: 1rpx;
height: 25rpx;
background: #999;
}
&>.icon {
display: flex;
justify-content: center;
align-items: center;
width: 56rpx;
}
}
&_right {