优化功能
This commit is contained in:
@ -60,7 +60,8 @@
|
|||||||
useStore.setDefaultStore({
|
useStore.setDefaultStore({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
index
|
index,
|
||||||
|
operationType: item.operation_type
|
||||||
})
|
})
|
||||||
|
|
||||||
// 跳转首页
|
// 跳转首页
|
||||||
|
|||||||
@ -195,9 +195,9 @@
|
|||||||
|
|
||||||
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(form.mobile) })
|
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(form.mobile) })
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
})
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -152,11 +152,9 @@
|
|||||||
await getVerificationCode({ scene: SMS_ENUM.BGSJHM, mobile: String(model.mobile)})
|
await getVerificationCode({ scene: SMS_ENUM.BGSJHM, mobile: String(model.mobile)})
|
||||||
|
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
|
}, 100)
|
||||||
// 发送验证码请求
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证码倒计时结束
|
// 验证码倒计时结束
|
||||||
|
|||||||
@ -125,11 +125,9 @@
|
|||||||
await getVerificationCode({ scene: SMS_ENUM.ZHDLMM, mobile: String(model.mobile)})
|
await getVerificationCode({ scene: SMS_ENUM.ZHDLMM, mobile: String(model.mobile)})
|
||||||
|
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
|
}, 100)
|
||||||
// 发送验证码请求
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证码倒计时结束
|
// 验证码倒计时结束
|
||||||
|
|||||||
@ -184,11 +184,9 @@
|
|||||||
// 发送验证码
|
// 发送验证码
|
||||||
handleCountDown: () => {
|
handleCountDown: () => {
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
|
}, 100)
|
||||||
// 发送验证码请求
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证码倒计时结束
|
// 验证码倒计时结束
|
||||||
|
|||||||
@ -232,11 +232,9 @@
|
|||||||
// 发送验证码
|
// 发送验证码
|
||||||
handleCountDown: () => {
|
handleCountDown: () => {
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
|
}, 100)
|
||||||
// 发送验证码请求
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证码倒计时结束
|
// 验证码倒计时结束
|
||||||
|
|||||||
@ -338,11 +338,9 @@
|
|||||||
// 发送验证码
|
// 发送验证码
|
||||||
handleCountDown: () => {
|
handleCountDown: () => {
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
|
}, 100)
|
||||||
// 发送验证码请求
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证码倒计时结束
|
// 验证码倒计时结束
|
||||||
|
|||||||
@ -190,8 +190,6 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
const EditStore = {
|
const EditStore = {
|
||||||
fileList: [],
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取店铺详情
|
* 获取店铺详情
|
||||||
*/
|
*/
|
||||||
@ -221,7 +219,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
fileList.value = (d.image_arr || []).map((item: string) => ({ url: item, name: item}))
|
fileList.value = (d.image_arr || []).map((item: string) => ({ url: item, name: item}))
|
||||||
EditStore.fileList = fileList.value
|
|
||||||
|
|
||||||
address.value = [
|
address.value = [
|
||||||
String(d.province_id),
|
String(d.province_id),
|
||||||
@ -243,29 +240,6 @@
|
|||||||
form.value.district_id = Number(item.selectedItems[2].value)
|
form.value.district_id = Number(item.selectedItems[2].value)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 图片选择/删除
|
|
||||||
*/
|
|
||||||
// handleUploadFile: ({ fileList: files }) => {
|
|
||||||
// let url = ''
|
|
||||||
// let name = ''
|
|
||||||
// let response = null
|
|
||||||
|
|
||||||
// const res = files.map(item => {
|
|
||||||
// if (item.response) {
|
|
||||||
// response = JSON.parse(item.response)
|
|
||||||
// url = response.data.url
|
|
||||||
// name = response.data.name
|
|
||||||
// }
|
|
||||||
// return {
|
|
||||||
// name: name || item.name,
|
|
||||||
// url: url || item.url
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// EditStore.fileList = res
|
|
||||||
// },
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存门店信息
|
* 保存门店信息
|
||||||
*/
|
*/
|
||||||
@ -295,7 +269,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EditStore.fileList.length === 0) {
|
if (fileList.value.length === 0) {
|
||||||
toast.info('请上传门店图片')
|
toast.info('请上传门店图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,15 +40,15 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view >
|
<view >
|
||||||
<!-- 其他说明 -->
|
<!-- 使用说明 -->
|
||||||
<view class="bg-white rounded-16rpx py-26rpx px-30rpx mt-24rpx mx-30rpx">
|
<view class="bg-white rounded-16rpx py-26rpx px-30rpx mt-24rpx mx-30rpx">
|
||||||
<view class="text-[#303133] text-32rpx leading-44rpx font-bold mb-24rpx">其他说明</view>
|
<view class="text-[#303133] text-32rpx leading-44rpx font-bold mb-24rpx">使用说明</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<rich-text :nodes="teaRoom.room.other_describe"></rich-text>
|
<rich-text :nodes="teaRoom.room.other_describe"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 其他说明 -->
|
<!-- 起订时间 -->
|
||||||
<view class="bg-white rounded-16rpx py-26rpx px-30rpx mt-24rpx mx-30rpx">
|
<view class="bg-white rounded-16rpx py-26rpx px-30rpx mt-24rpx mx-30rpx">
|
||||||
<view class="text-[#303133] text-32rpx leading-44rpx font-bold mb-24rpx">起订时间</view>
|
<view class="text-[#303133] text-32rpx leading-44rpx font-bold mb-24rpx">起订时间</view>
|
||||||
<view class="text-[26rpx] text-[#606266] leading-36rpx">{{ teaRoom?.room?.hours }}小时起订</view>
|
<view class="text-[26rpx] text-[#606266] leading-36rpx">{{ teaRoom?.room?.hours }}小时起订</view>
|
||||||
@ -89,9 +89,11 @@
|
|||||||
*/
|
*/
|
||||||
handleInitReserveRoom: async () => {
|
handleInitReserveRoom: async () => {
|
||||||
const res = await getStoreOrderDetails(roomId.value)
|
const res = await getStoreOrderDetails(roomId.value)
|
||||||
console.log("🚀 ~ res:", res)
|
|
||||||
teaRoom.value = res.details
|
teaRoom.value = res.details
|
||||||
console.log("🚀 ~ teaRoom.value:", teaRoom.value)
|
if (teaRoom.value.room.other_describe) {
|
||||||
|
let content = teaRoom.value.room.other_describe.replace(/\n/g,"<br/>")
|
||||||
|
teaRoom.value.room.other_describe = content.replace(/\r\n/g,"<br/>")
|
||||||
|
}
|
||||||
swiperList.value = teaRoom.value.room.room_arr
|
swiperList.value = teaRoom.value.room.room_arr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,10 +155,11 @@
|
|||||||
|
|
||||||
// 门店列表
|
// 门店列表
|
||||||
const storeList = ref<Array<any>>([])
|
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,
|
id: 0,
|
||||||
name: '',
|
name: '',
|
||||||
index: 0
|
index: 0,
|
||||||
|
operationType: 1
|
||||||
})
|
})
|
||||||
const store = ref<any>({})
|
const store = ref<any>({})
|
||||||
const statistics = ref({
|
const statistics = ref({
|
||||||
@ -175,7 +176,10 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
onLoad(async() => {
|
onLoad(async() => {
|
||||||
|
// uni.setTabBarItem({
|
||||||
|
// index: 2,
|
||||||
|
// visible: false
|
||||||
|
// })
|
||||||
})
|
})
|
||||||
|
|
||||||
const Index = {
|
const Index = {
|
||||||
@ -201,7 +205,8 @@
|
|||||||
useStore.setDefaultStore({
|
useStore.setDefaultStore({
|
||||||
id: storeList.value[0].id,
|
id: storeList.value[0].id,
|
||||||
name: storeList.value[0].name,
|
name: storeList.value[0].name,
|
||||||
index: 0
|
index: 0,
|
||||||
|
operationType: storeList.value[0].operation_type,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,11 +149,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
|
}, 100)
|
||||||
// 发送验证码请求
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证码倒计时结束
|
// 验证码倒计时结束
|
||||||
|
|||||||
@ -143,11 +143,9 @@
|
|||||||
|
|
||||||
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(model.mobile) })
|
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(model.mobile) })
|
||||||
startCountDown.value = true
|
startCountDown.value = true
|
||||||
nextTick(() => {
|
setTimeout(() => {
|
||||||
countDown.value?.start()
|
countDown.value.start()
|
||||||
|
}, 100)
|
||||||
// 发送验证码请求
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 验证码倒计时结束
|
// 验证码倒计时结束
|
||||||
|
|||||||
@ -275,16 +275,16 @@
|
|||||||
custom-textarea-class="!bg-[#F8F9FA]" placeholder="请输入套餐介绍,每条内容换行输入" />
|
custom-textarea-class="!bg-[#F8F9FA]" placeholder="请输入套餐介绍,每条内容换行输入" />
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<!-- 其他说明 -->
|
<!-- 使用说明 -->
|
||||||
<view class="add-textarea mt-30rpx">
|
<view class="add-textarea mt-30rpx">
|
||||||
<view class="mb-20rpx flex items-center">
|
<view class="mb-20rpx flex items-center">
|
||||||
<view class="mr-10rpx text-30rpx text-[#303133] font-bold leading-44rpx">
|
<view class="mr-10rpx text-30rpx text-[#303133] font-bold leading-44rpx">
|
||||||
其他说明
|
使用说明
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<wd-textarea v-model="form.other_describe"
|
<wd-textarea v-model="form.other_describe"
|
||||||
custom-class="!rounded-18rpx !border-2rpx !border-[#EFF0EF] !bg-[#F8F9FA] !mt-20rpx"
|
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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -731,7 +731,6 @@
|
|||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
handleSave: async () => {
|
handleSave: async () => {
|
||||||
// TODO: 实现保存功能
|
|
||||||
if (!form.title) {
|
if (!form.title) {
|
||||||
toast.info('请输入包间名称')
|
toast.info('请输入包间名称')
|
||||||
return
|
return
|
||||||
|
|||||||
@ -7,77 +7,74 @@
|
|||||||
}</route>
|
}</route>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { router } from '@/utils/tools'
|
import { router } from '@/utils/tools'
|
||||||
|
import { useStoreStore } from '@/store'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
const navbarHeight = inject('navbarHeight')
|
const navbarHeight = inject('navbarHeight')
|
||||||
|
const useStore = useStoreStore()
|
||||||
|
|
||||||
console.log(`${OSS}/images/store/store/room.png`)
|
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',
|
|
||||||
},
|
|
||||||
])
|
|
||||||
|
|
||||||
const Store = {
|
// 功能卡片数据
|
||||||
/**
|
const storeMenus = ref([
|
||||||
* 点击功能卡片
|
{
|
||||||
*/
|
id: 1,
|
||||||
handleClickMenu: (item: any) => {
|
title: '包间管理',
|
||||||
router.navigateTo(item.path)
|
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',
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
/**
|
const auth = ref<boolean>(true)
|
||||||
* 点击更多选项
|
|
||||||
*/
|
|
||||||
handleMore: () => {
|
|
||||||
// TODO: 实现更多选项功能
|
|
||||||
console.log('更多选项')
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
onShow(() => {
|
||||||
* 点击目标图标
|
// 直营店才能操作菜单
|
||||||
*/
|
auth.value = useStore.defaultStore.operationType == 1 ? true : false
|
||||||
handleTarget: () => {
|
})
|
||||||
// TODO: 实现目标功能
|
|
||||||
console.log('目标功能')
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
const Store = {
|
||||||
|
/**
|
||||||
|
* 点击功能卡片
|
||||||
|
*/
|
||||||
|
handleClickMenu: (item: any) => {
|
||||||
|
router.navigateTo(item.path)
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 导航栏 -->
|
<!-- 导航栏 -->
|
||||||
<view>
|
<view>
|
||||||
<navbar title="门店管理" custom-class="!bg-white" />
|
<navbar title="门店管理" custom-class="!bg-white" icon-left-color="#fff"/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 功能卡片网格 -->
|
<!-- 功能卡片网格 -->
|
||||||
<view class="px-30rpx pt-40rpx">
|
<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"
|
<view v-for="item in storeMenus" :key="item.id"
|
||||||
class="flex flex-col items-center rounded-16rpx bg-white p-40rpx"
|
class="flex flex-col items-center rounded-16rpx bg-white p-40rpx"
|
||||||
@click="Store.handleClickMenu(item)">
|
@click="Store.handleClickMenu(item)">
|
||||||
|
|||||||
@ -4,12 +4,14 @@ interface IDefaultStoreVo {
|
|||||||
id: number
|
id: number
|
||||||
name: string
|
name: string
|
||||||
index: number
|
index: number
|
||||||
|
operationType: number // type 1: 直营店 2: 加盟店
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultStoreState: IDefaultStoreVo = {
|
const defaultStoreState: IDefaultStoreVo = {
|
||||||
id: 0,
|
id: 0,
|
||||||
name: '',
|
name: '',
|
||||||
index: 0,
|
index: 0,
|
||||||
|
operationType: 1, // type 1: 直营店 2: 加盟店
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useStoreStore = defineStore(
|
export const useStoreStore = defineStore(
|
||||||
|
|||||||
Reference in New Issue
Block a user