动态tabbar

This commit is contained in:
weiwei committed 2025-03-25 10:56:13 +08:00
1 parent 2a2ba187e8
commit 30e0432017
6 files changed
+98 -13

No files matched your search

+5 -2
View File
@@ -50,11 +50,11 @@
<view class="h-20rpx" />
<view class="bg-white rounded-16rpx p-2 mb-2 shadow-md" v-for="(v, i) in list" :key="i">
<view class="bg-white rounded-16rpx p-2 mb-1 shadow-md" v-for="(v, i) in list" :key="i">
<view class="flex justify-between items-center text-sm text-gray-800 mb-1">
<view class="flex items-center">
<image class="w-50rpx h-50rpx rounded-8rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
<view>{{ v.merchantName }}</view>
<view class="ml-2">{{ v.merchantName }}</view>
</view>
<view>{{ v.day }}</view>
</view>
@@ -120,6 +120,9 @@ onLoad(() => {
onShow(() => {
const isLogin = hooks.useCheckLogin()
if (!isLogin) return
if (pageRef.value) {
pageRef.value.reload(false)
}
})
const query = (page: number, pagesize: number) => {
+5 -1
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref, reactive } from "vue"
import { onShow } from "@dcloudio/uni-app"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { hooks, router } from "@@/index"
import { merchantApi } from "@@/api"
import { filePath } from "@@/utils/file"
@@ -12,6 +12,10 @@ const state = reactive<any>({
},
})
onLoad(() => {
const app = getApp()
app._initTabbar()
})
onShow(() => {
if (pageRef.value) {
pageRef.value.reload(false)
+3
View File
@@ -261,6 +261,9 @@ const getStorageUserInfo = () => {
}
onLoad(() => {
const app = getApp()
app._initTabbar()
isDevEnv()
? state.menuList.push({
text: "测试登录",
+4 -4
View File
@@ -31,9 +31,9 @@ onLoad(() => {
onShow(async () => {
const isLogin = await hooks.useCheckLogin()
if (!isLogin) return
if (pageRef.value) {
pageRef.value.reload(false)
}
// if (pageRef.value) {
// pageRef.value.reload(false)
// }
})
const doTab = (e: any) => {
const target = data.tabs[e]
@@ -100,7 +100,7 @@ const doRefund = (v: any) => {
<!-- <view class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" /> -->
</view>
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">待核销</tm-tag>
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">已支付</tm-tag>
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs">售后</tm-tag>
<tm-tag v-if="v.orderStatus == 20" size="xs">已核销</tm-tag>
</view>
+5 -1
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref, reactive } from "vue"
import { onShow } from "@dcloudio/uni-app"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { merchantApi } from "@@/api"
import { hooks, router } from "@@/index"
import { filePath } from "@@/utils/file"
@@ -18,6 +18,10 @@ const query = (page: number, pagesize: number) => {
startPage(page, pagesize, false, state.pa)
}
onLoad(() => {
const app = getApp()
app._initTabbar()
})
onShow(() => {
pageRef.value && pageRef.value.reload(false)
})