优化功能

This commit is contained in:
wangxiaowei
2026-01-30 01:14:20 +08:00
parent fdc80c876f
commit a923ca9d9c
15 changed files with 100 additions and 134 deletions

View File

@ -155,10 +155,11 @@
// 门店列表
const storeList = ref<Array<any>>([])
const defaultStore = ref<{ id: number; name: string; index: number }>({
const defaultStore = ref<{ id: number; name: string; index: number, operationType: number }>({
id: 0,
name: '',
index: 0
index: 0,
operationType: 1
})
const store = ref<any>({})
const statistics = ref({
@ -175,7 +176,10 @@
})
onLoad(async() => {
// uni.setTabBarItem({
// index: 2,
// visible: false
// })
})
const Index = {
@ -201,7 +205,8 @@
useStore.setDefaultStore({
id: storeList.value[0].id,
name: storeList.value[0].name,
index: 0
index: 0,
operationType: storeList.value[0].operation_type,
})
}
}

View File

@ -149,11 +149,9 @@
}
startCountDown.value = true
nextTick(() => {
countDown.value?.start()
// 发送验证码请求
})
setTimeout(() => {
countDown.value.start()
}, 100)
},
// 验证码倒计时结束

View File

@ -143,11 +143,9 @@
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(model.mobile) })
startCountDown.value = true
nextTick(() => {
countDown.value?.start()
// 发送验证码请求
})
setTimeout(() => {
countDown.value.start()
}, 100)
},
// 验证码倒计时结束

View File

@ -275,16 +275,16 @@
custom-textarea-class="!bg-[#F8F9FA]" placeholder="请输入套餐介绍,每条内容换行输入" />
</view> -->
<!-- 其他说明 -->
<!-- 使用说明 -->
<view class="add-textarea mt-30rpx">
<view class="mb-20rpx flex items-center">
<view class="mr-10rpx text-30rpx text-[#303133] font-bold leading-44rpx">
其他说明
使用说明
</view>
</view>
<wd-textarea v-model="form.other_describe"
custom-class="!rounded-18rpx !border-2rpx !border-[#EFF0EF] !bg-[#F8F9FA] !mt-20rpx"
custom-textarea-class="!bg-[#F8F9FA]" placeholder="请输入其他说明" />
custom-textarea-class="!bg-[#F8F9FA]" placeholder="请输入使用说明" />
</view>
</view>
@ -731,7 +731,6 @@
* 保存
*/
handleSave: async () => {
// TODO: 实现保存功能
if (!form.title) {
toast.info('请输入包间名称')
return

View File

@ -7,77 +7,74 @@
}</route>
<script lang="ts" setup>
import { router } from '@/utils/tools'
import { router } from '@/utils/tools'
import { useStoreStore } from '@/store'
const OSS = inject('OSS')
const navbarHeight = inject('navbarHeight')
const OSS = inject('OSS')
const navbarHeight = inject('navbarHeight')
const useStore = useStoreStore()
console.log(`${OSS}/images/store/store/room.png`)
// 功能卡片数据
const storeMenus = ref([
{
id: 1,
title: '包间管理',
icon: `${OSS}images/store/store/room.png`,
path: '/pages/store/room-manage',
},
{
id: 2,
title: '设备控制',
icon: `${OSS}images/store/store/device.png`,
path: '/pages/store/device',
},
{
id: 3,
title: '包间预定',
icon: `${OSS}images/store/store/bookroom.png`,
path: '/pages/store/reserve',
},
{
id: 4,
title: '订单续订',
icon: `${OSS}images/store/store/renew.png`,
path: '/pages/store/renew',
},
])
console.log(`${OSS}/images/store/store/room.png`)
const Store = {
/**
* 点击功能卡片
*/
handleClickMenu: (item: any) => {
router.navigateTo(item.path)
},
// 功能卡片数据
const storeMenus = ref([
{
id: 1,
title: '包间管理',
icon: `${OSS}images/store/store/room.png`,
path: '/pages/store/room-manage',
},
{
id: 2,
title: '设备控制',
icon: `${OSS}images/store/store/device.png`,
path: '/pages/store/device',
},
{
id: 3,
title: '包间预定',
icon: `${OSS}images/store/store/bookroom.png`,
path: '/pages/store/reserve',
},
{
id: 4,
title: '订单续订',
icon: `${OSS}images/store/store/renew.png`,
path: '/pages/store/renew',
},
])
/**
* 点击更多选项
*/
handleMore: () => {
// TODO: 实现更多选项功能
console.log('更多选项')
},
const auth = ref<boolean>(true)
/**
* 点击目标图标
*/
handleTarget: () => {
// TODO: 实现目标功能
console.log('目标功能')
},
onShow(() => {
// 直营店才能操作菜单
auth.value = useStore.defaultStore.operationType == 1 ? true : false
})
}
const Store = {
/**
* 点击功能卡片
*/
handleClickMenu: (item: any) => {
router.navigateTo(item.path)
},
}
</script>
<template>
<view>
<!-- 导航栏 -->
<view>
<navbar title="门店管理" custom-class="!bg-white" />
<navbar title="门店管理" custom-class="!bg-white" icon-left-color="#fff"/>
</view>
<!-- 功能卡片网格 -->
<view class="px-30rpx pt-40rpx">
<view class="grid grid-cols-2 gap-30rpx">
<view class="text-center mt-40rpx" v-if="!auth">
暂无权限操作
</view>
<view class="grid grid-cols-2 gap-30rpx" v-if="auth">
<view v-for="item in storeMenus" :key="item.id"
class="flex flex-col items-center rounded-16rpx bg-white p-40rpx"
@click="Store.handleClickMenu(item)">