feat:增加tabbar

This commit is contained in:
dzc committed 2026-05-18 18:35:35 +08:00
1 parent cc39f190d0
commit 108521704f
47 files changed
+201 -79

No files matched your search

+2 -1
View File
@@ -3,7 +3,8 @@ import { ref, reactive, computed } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { boxesApi } from "@@/api"
import { SERVICE_IMAGE } from "@@/constant/index"
+2 -1
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
const emit = defineEmits(["update:modelValue", "add", "remove"])
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { hooks } from "@@/index"
import * as hooks from "@@/hooks"
const emit = defineEmits(["submit", "doContainer"])
+2 -1
View File
@@ -3,7 +3,8 @@ import { reactive, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { merchantApi, foodApi, payApi, orderApi } from "@@/api"
import { filePath } from "@@/utils/file"
import { SERVICE_IMAGE } from "@@/constant/index"
+2 -1
View File
@@ -4,7 +4,8 @@ import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import dayjs from "dayjs"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { foodApi } from "@@/api"
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
import CustomWaterfallsFlow from "@@/components/other/custom-waterfalls-flow/custom-waterfalls-flow.vue"
+1 -1
View File
@@ -5,7 +5,7 @@ import { isEmpty } from "radash"
import { productApi } from "@@/api"
import { filePath } from "@@/utils/file"
import { hooks } from "@@/index"
import * as hooks from "@@/hooks"
import { SERVICE_IMAGE } from "@@/constant/index"
const state = reactive<any>({
+3 -2
View File
@@ -3,7 +3,8 @@ import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import PlateNum from "@@/components/tongtong-plate/plate-number.vue";
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { userCarApi } from "@@/api"
import { serviceEnum } from "@/sheep/constant"
import { SERVICE_IMAGE } from "@@/constant/index"
@@ -110,4 +111,4 @@ const doSubmit = async () => {
padding-bottom: 10rpx !important;
}
}
</style>
</style>
+3 -2
View File
@@ -2,7 +2,8 @@
import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { userCarApi } from "@@/api"
import { serviceEnum } from "@/sheep/constant"
import { SERVICE_IMAGE } from "@@/constant/index"
@@ -79,4 +80,4 @@ const doApply = () => {
</template>
</z-paging>
</crud-layout>
</template>
</template>
+2 -1
View File
@@ -3,7 +3,8 @@ import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { faceApi } from "@@/api"
import { SERVICE_IMAGE } from "@@/constant/index"
+2 -1
View File
@@ -2,7 +2,8 @@
import { ref, reactive } from "vue"
import { onShow } from "@dcloudio/uni-app"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { faceApi } from "@@/api"
import { SERVICE_IMAGE } from "@@/constant/index"
+1 -1
View File
@@ -87,7 +87,7 @@
import { ref, computed, onMounted, watch, nextTick } from 'vue'
import { onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { hooks } from '@@/index'
import * as hooks from '@@/hooks'
import maintenanceApi from '@/sheep/api/maintenance'
import { filePath } from '@/sheep/utils/file'
@@ -113,7 +113,8 @@ import { onShow } from "@dcloudio/uni-app"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
import { invitationApi } from "@/sheep/api"
+2 -1
View File
@@ -2,7 +2,8 @@
import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { merchantApi } from "@@/api"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { filePath } from "@@/utils/file"
const pageRef = ref<any>(null)
+1 -1
View File
@@ -54,7 +54,7 @@ import { reactive, ref } from "vue"
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
import { hooks } from "@/sheep"
import * as hooks from "@@/hooks"
const tabs = [
{ id: null, name: "全部", disabled: false, color: "#7f7f7f77" },
+2 -1
View File
@@ -119,7 +119,8 @@
import { reactive, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { foodApi, merchantApi, orderApi, payApi, shopApi } from "@@/api"
import { filePath } from "@@/utils/file"
import { SERVICE_IMAGE } from "@@/constant/index"
+2 -1
View File
@@ -87,7 +87,8 @@ import { reactive, ref, nextTick } from "vue"
import { onLoad } from "@dcloudio/uni-app"
import { actCancel, actComApi, actCouponApi, userApi } from "@/sheep/api"
import { hooks, router } from "@/sheep"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { serviceEnum, storageConstant, SERVICE_IMAGE } from "@@/constant"
import { filePath } from "@@/utils/file"
+2 -2
View File
@@ -2,7 +2,7 @@
import { reactive, ref, computed } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { router } from "@/sheep"
import * as router from "@@/router"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
@@ -10,7 +10,7 @@ import uqrcode from "@@/utils/uqrcode"
import * as CryptoJS from "crypto-js"
import { actCancel, actComApi, actCouponApi, applyApi } from "@@/api"
import { hooks } from "@/sheep"
import * as hooks from "@@/hooks"
import { serviceEnum } from "@@/constant"
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
+2 -1
View File
@@ -3,7 +3,8 @@ import { reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { orderApi, refundApi } from "@@/api"
import { SERVICE_IMAGE } from "@@/constant/index"
+2 -2
View File
@@ -36,8 +36,8 @@ import { onLoad, onShow } from "@dcloudio/uni-app"
import payApi from "@@/api/pay"
import { merchantApi, orderApi, walletApi } from "@/sheep/api"
import { hooks } from "@@/index"
import { router } from "@/sheep"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { filePath } from "@/sheep/utils/file"
import { displayPrice, storePrice } from "@/sheep/utils/format-money"
import { usePayStore } from "@/sheep/stores/pay"
+2 -1
View File
@@ -67,7 +67,8 @@ import { ref, computed, reactive } from "vue"
import { onLoad } from "@dcloudio/uni-app"
import NumberKeyboard from "@/sheep/components/number-keyboard.vue"
import { payApi, walletApi } from "@/sheep/api"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { filePath } from "@/sheep/utils/file"
import { storePrice } from "@/sheep/utils/format-money"
import { usePayStore } from "@/sheep/stores/pay"
@@ -63,7 +63,7 @@ import { onLoad } from "@dcloudio/uni-app"
import { reactive, ref } from "vue"
import NodeTree from "@/sheep/components/node-tree.vue"
import { useCategaryManage } from "./use-categary-manage"
import { hooks } from "@@/index"
import * as hooks from "@@/hooks"
import { filePath } from "@/sheep/utils/file"
import { SERVICE_IMAGE } from "@@/constant/index"
@@ -41,7 +41,7 @@
<script setup lang="ts">
import { filePath } from "@/sheep/utils/file"
import { SERVICE_IMAGE } from "@/sheep/constant/index"
import { hooks } from "@/sheep"
import * as hooks from "@@/hooks"
import useCartBuy from "../use-cart-buy"
@@ -15,7 +15,7 @@
</template>
<script setup lang="ts">
import { hooks } from "@@/index"
import * as hooks from "@@/hooks"
import useCartBuy from "../use-cart-buy"
const emit = defineEmits(["submit", "doContainer"])
+1 -1
View File
@@ -152,7 +152,7 @@
<script setup lang="ts">
import { reactive, ref, watch } from "vue"
import { hooks } from "@@/index"
import * as hooks from "@@/hooks"
import { prosperityShopApi } from "@/sheep/api"
import ShopCategaryPicker from "@/sheep/components/shop-categary-picker.vue"
+1 -1
View File
@@ -100,7 +100,7 @@
import { reactive, ref } from "vue"
import { prosperityShopApi } from "@/sheep/api"
import { hooks } from "@/sheep"
import * as hooks from "@@/hooks"
import { filePath } from "@/sheep/utils/file"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { displayPrice } from "@/sheep/utils/format-money"
+1 -1
View File
@@ -69,7 +69,7 @@
</template>
<script setup lang="ts">
import { hooks } from "@/sheep"
import * as hooks from "@@/hooks"
import { prosperityShopApi } from "@/sheep/api"
import { reactive, ref } from "vue"
+1 -1
View File
@@ -104,7 +104,7 @@
<script setup lang="ts">
import { computed, reactive, ref } from "vue"
import { hooks } from "@/sheep"
import * as hooks from "@@/hooks"
import useCartBuy from "./use-cart-buy"
import { filePath } from "@/sheep/utils/file"
import { onLoad } from "@dcloudio/uni-app"
+16 -12
View File
@@ -2,7 +2,7 @@
import { ref, reactive, computed, nextTick, onMounted } from "vue"
import { onHide, onShow } from "@dcloudio/uni-app"
import { router } from "@@/index"
import { router, constant } from "@@/index"
import { noticeApi, appApi } from "@@/api/index"
import { getAppInfo } from "@@/utils/app"
import { SERVICE_IMAGE } from "@@/constant/index"
@@ -25,12 +25,14 @@ const state = reactive<any>({
appMenuList: [],
})
const groupSize = 3
const shouldScroll = computed(() => state.noticeList.length > groupSize)
const noticeListSafe = computed(() => (Array.isArray(state.noticeList) ? state.noticeList : []).filter(Boolean))
const appMenuListSafe = computed(() => (Array.isArray(state.appMenuList) ? state.appMenuList : []).filter(Boolean))
const shouldScroll = computed(() => noticeListSafe.value.length > groupSize)
const groupedNoticeList = computed(() => {
const base = state.noticeList
const base = noticeListSafe.value
if (!base || base.length === 0) return []
if (base.length <= groupSize) return base
if (base.length <= groupSize) return [base]
const groups: any[] = []
for (let i = 0; i < base.length; i += groupSize) {
const group = base.slice(i, i + groupSize)
@@ -61,6 +63,7 @@ onHide(() => {
})
const doMenu = async (v: any) => {
if (!v) return
if (v.page.includes("thirdApp")) {
router.jump("/pages/third-app/happyMall")
return
@@ -79,7 +82,7 @@ const getNoticeList = async () => {
if (code != 0) {
throw new Error()
}
state.noticeList = data?.records || []
state.noticeList = (data?.records || []).filter(Boolean)
} catch (error) {
console.log("获取通知公告列表意外的错误error:", error);
}
@@ -97,7 +100,7 @@ const getAppMenuList = async () => {
if (code != 0) {
throw new Error()
}
state.appMenuList = data || []
state.appMenuList = (data || []).filter(Boolean)
} catch (error) {
console.log("获取应用菜单列表意外的错误error:", error);
}
@@ -105,7 +108,7 @@ const getAppMenuList = async () => {
</script>
<template>
<crud-layout title="智慧后勤系统" :bg="filePath(SERVICE_IMAGE.blueBg)" ref="crudLayoutRef">
<crud-layout title="智慧后勤系统" mainIsScroll :bg="filePath(SERVICE_IMAGE.blueBg)" ref="crudLayoutRef">
<view class="h-20rpx" />
<swiper class="w-full h-280rpx rounded-16rpx overflow-hidden" circular :indicator-dots="true"
indicator-active-color="#0779FD" indicator-color="#ffffff" :autoplay="true">
@@ -125,7 +128,7 @@ const getAppMenuList = async () => {
查看更多
</view>
<view class="w-full h-50rpx" />
<view class="h-300rpx overflow-hidden" v-if="state?.noticeList?.length > 0">
<view class="h-300rpx overflow-hidden" v-if="noticeListSafe.length > 0">
<swiper class="w-full h-full" :vertical="true" :circular="shouldScroll" :autoplay="shouldScroll"
:interval="2500" :duration="500" :indicator-dots="false" :disable-touch="true">
<swiper-item v-for="(group, i) in groupedNoticeList" :key="i">
@@ -151,13 +154,13 @@ const getAppMenuList = async () => {
常用功能
</view>
<view class="w-full h-50rpx" />
<view v-if="state?.appMenuList?.length > 0">
<view v-if="appMenuListSafe.length > 0">
<view class="grid grid-cols-3 h-full items-center gap-y-30rpx p-y-30rpx">
<view class="flex flex-col items-center justify-center" v-for="(v, i) in state.appMenuList" :key="i"
<view class="flex flex-col items-center justify-center" v-for="(v, i) in appMenuListSafe" :key="i"
@tap="doMenu(v)">
<view class="flex-col-center">
<image class="size-100rpx" :src="filePath(v.icon)" mode="aspectFill" />
<view class="m-t-10rpx sub-text-26">{{ v.title }}</view>
<image class="size-100rpx" :src="filePath(v?.icon)" mode="aspectFill" />
<view class="m-t-10rpx sub-text-26">{{ v?.title || "" }}</view>
</view>
</view>
</view>
@@ -166,6 +169,7 @@ const getAppMenuList = async () => {
<empty text="暂无App" />
</view>
</view>
<view class="h-30rpx" />
</crud-layout>
</template>
+2 -1
View File
@@ -29,7 +29,8 @@
<script setup lang="ts">
import { ref, onMounted, nextTick } from "vue"
import { hooks, router } from "@/sheep"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { doorApi } from "@/sheep/api"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { filePath } from "@@/utils/file"
+4 -2
View File
@@ -3,7 +3,9 @@ import { ref, reactive, nextTick, onMounted } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import dayjs from "dayjs"
import { hooks, router, constant } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import * as constant from "@@/constant"
import { accessStatsApi, merchantApi } from "@@/api"
import { filePath } from "@@/utils/file"
import { SERVICE_IMAGE } from "@@/constant/index"
@@ -81,4 +83,4 @@ const toDetail = async (v: any) => {
</template>
</z-paging>
</crud-layout>
</template>
</template>
+1 -1
View File
@@ -83,7 +83,7 @@ import { ref, onMounted, nextTick } from "vue"
import qiunDataCharts from "@/components/qiun-data-charts/qiun-data-charts.vue"
import { totalApi } from "@/sheep/api"
import { hooks } from "@/sheep"
import * as hooks from "@@/hooks"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
+2 -1
View File
@@ -3,7 +3,8 @@ import { ref, reactive, onMounted, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { merchantApi } from "@@/api"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { filePath } from "@@/utils/file"
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
import { SERVICE_IMAGE } from "@@/constant/index"
+1 -1
View File
@@ -36,7 +36,7 @@ import { filePath } from "@@/utils/file"
import { SERVICE_IMAGE } from "@@/constant/index"
import integratedApi from "@/sheep/api/integrated"
import { hooks } from "@@/index"
import * as hooks from "@@/hooks"
const todoCount = ref(0)
const crudLayoutRef = ref<any>(null)
+6 -4
View File
@@ -57,7 +57,7 @@
<view class="w-10rpx" />
<view @click="doPhone('15657370065')">15657370065</view>
</view>
<view class="h-30rpx" />
<view class="h-60rpx" />
</crud-layout>
<modify-user ref="modifyUserRef" warnText="填写出生日期即可领取生日兑换券" @close="storage.getUserInfo" />
@@ -76,13 +76,15 @@
</template>
<script setup lang="ts">
import { ref, reactive, computed, onMounted, nextTick } from "vue"
import { ref, reactive, onMounted, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import dayjs from "dayjs"
import { filePath } from "@@/utils/file"
import { getAppInfo } from "@@/utils/app"
import { hooks, router, constant } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import * as constant from "@@/constant"
import { accessStatsApi, actCancelApi, userApi } from "@@/api"
import { APPENV } from "@/sheep/constant"
import { SERVICE_IMAGE } from "@@/constant/index"
@@ -90,7 +92,7 @@ import { SERVICE_IMAGE } from "@@/constant/index"
import ModifyUser from "@@/components/modify-user.vue"
const crudLayoutRef = ref<any>(null)
const modifyUserRef = ref(null)
const modifyUserRef = ref<InstanceType<typeof ModifyUser> | null>(null)
const state = reactive<any>({
wallet: [],
userInfo: {},
+2 -1
View File
@@ -2,7 +2,8 @@
import { ref, reactive, onMounted, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { orderApi } from "@@/api"
import { filePath } from "@@/utils/file"
+2 -1
View File
@@ -71,7 +71,8 @@
</template>
<script setup lang="ts">
import { hooks, router } from "@/sheep"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { prosperityShopApi } from "@/sheep/api"
import { onLoad } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
+2 -1
View File
@@ -3,7 +3,8 @@ import { ref, reactive, onMounted, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { merchantApi } from "@@/api"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { filePath } from "@@/utils/file"
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
import { SERVICE_IMAGE } from "@@/constant/index"
+2 -1
View File
@@ -3,7 +3,8 @@ import { ref, reactive, onMounted, nextTick } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { merchantApi } from "@@/api"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { filePath } from "@@/utils/file"
import { SERVICE_IMAGE } from "@@/constant/index"
+2 -1
View File
@@ -19,7 +19,8 @@
import { ref } from "vue"
import { onLoad } from "@dcloudio/uni-app"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { merchantApi } from "@@/api"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
+1 -1
View File
@@ -5,7 +5,7 @@ import { isEmpty } from "radash"
import { SERVICE_IMAGE } from "@@/constant/index"
import { filePath } from "@@/utils/file"
import { hooks } from "@@/index"
import * as hooks from "@@/hooks"
import { walletApi } from "@@/api"
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
+2 -1
View File
@@ -3,7 +3,8 @@ import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import uqrcode from "@@/utils/uqrcode"
import { hooks, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as router from "@@/router"
import { walletApi } from "@@/api"
import { SERVICE_IMAGE } from "@@/constant/index"
+3 -1
View File
@@ -3,7 +3,9 @@ import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { isEmpty } from "radash"
import { hooks, constant, router } from "@@/index"
import * as hooks from "@@/hooks"
import * as constant from "@@/constant"
import * as router from "@@/router"
import { walletApi, payApi, miniPlatformApi, type MiniPayDto } from "@@/api"
import { SERVICE_IMAGE, storageConstant } from "@@/constant/index"
import { filePath } from "@@/utils/file"