优化功能
This commit is contained in:
@ -60,7 +60,8 @@
|
||||
useStore.setDefaultStore({
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
index
|
||||
index,
|
||||
operationType: item.operation_type
|
||||
})
|
||||
|
||||
// 跳转首页
|
||||
|
||||
@ -195,9 +195,9 @@
|
||||
|
||||
await getVerificationCode({ scene: SMS_ENUM.BANK, mobile: String(form.mobile) })
|
||||
startCountDown.value = true
|
||||
nextTick(() => {
|
||||
countDown.value?.start()
|
||||
})
|
||||
setTimeout(() => {
|
||||
countDown.value.start()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -152,11 +152,9 @@
|
||||
await getVerificationCode({ scene: SMS_ENUM.BGSJHM, mobile: String(model.mobile)})
|
||||
|
||||
startCountDown.value = true
|
||||
nextTick(() => {
|
||||
countDown.value?.start()
|
||||
|
||||
// 发送验证码请求
|
||||
})
|
||||
setTimeout(() => {
|
||||
countDown.value.start()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
// 验证码倒计时结束
|
||||
|
||||
@ -125,11 +125,9 @@
|
||||
await getVerificationCode({ scene: SMS_ENUM.ZHDLMM, mobile: String(model.mobile)})
|
||||
|
||||
startCountDown.value = true
|
||||
nextTick(() => {
|
||||
countDown.value?.start()
|
||||
|
||||
// 发送验证码请求
|
||||
})
|
||||
setTimeout(() => {
|
||||
countDown.value.start()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
// 验证码倒计时结束
|
||||
|
||||
@ -184,11 +184,9 @@
|
||||
// 发送验证码
|
||||
handleCountDown: () => {
|
||||
startCountDown.value = true
|
||||
nextTick(() => {
|
||||
countDown.value?.start()
|
||||
|
||||
// 发送验证码请求
|
||||
})
|
||||
setTimeout(() => {
|
||||
countDown.value.start()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
// 验证码倒计时结束
|
||||
|
||||
@ -232,11 +232,9 @@
|
||||
// 发送验证码
|
||||
handleCountDown: () => {
|
||||
startCountDown.value = true
|
||||
nextTick(() => {
|
||||
countDown.value?.start()
|
||||
|
||||
// 发送验证码请求
|
||||
})
|
||||
setTimeout(() => {
|
||||
countDown.value.start()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
// 验证码倒计时结束
|
||||
|
||||
@ -338,11 +338,9 @@
|
||||
// 发送验证码
|
||||
handleCountDown: () => {
|
||||
startCountDown.value = true
|
||||
nextTick(() => {
|
||||
countDown.value?.start()
|
||||
|
||||
// 发送验证码请求
|
||||
})
|
||||
setTimeout(() => {
|
||||
countDown.value.start()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
// 验证码倒计时结束
|
||||
|
||||
@ -190,8 +190,6 @@
|
||||
})
|
||||
|
||||
const EditStore = {
|
||||
fileList: [],
|
||||
|
||||
/**
|
||||
* 获取店铺详情
|
||||
*/
|
||||
@ -221,7 +219,6 @@
|
||||
}
|
||||
|
||||
fileList.value = (d.image_arr || []).map((item: string) => ({ url: item, name: item}))
|
||||
EditStore.fileList = fileList.value
|
||||
|
||||
address.value = [
|
||||
String(d.province_id),
|
||||
@ -243,29 +240,6 @@
|
||||
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
|
||||
}
|
||||
|
||||
if (EditStore.fileList.length === 0) {
|
||||
if (fileList.value.length === 0) {
|
||||
toast.info('请上传门店图片')
|
||||
return
|
||||
}
|
||||
|
||||
@ -40,15 +40,15 @@
|
||||
</view>
|
||||
|
||||
<view >
|
||||
<!-- 其他说明 -->
|
||||
<!-- 使用说明 -->
|
||||
<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="">
|
||||
<rich-text :nodes="teaRoom.room.other_describe"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 其他说明 -->
|
||||
<!-- 起订时间 -->
|
||||
<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-[26rpx] text-[#606266] leading-36rpx">{{ teaRoom?.room?.hours }}小时起订</view>
|
||||
@ -89,9 +89,11 @@
|
||||
*/
|
||||
handleInitReserveRoom: async () => {
|
||||
const res = await getStoreOrderDetails(roomId.value)
|
||||
console.log("🚀 ~ res:", res)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,11 +149,9 @@
|
||||
}
|
||||
|
||||
startCountDown.value = true
|
||||
nextTick(() => {
|
||||
countDown.value?.start()
|
||||
|
||||
// 发送验证码请求
|
||||
})
|
||||
setTimeout(() => {
|
||||
countDown.value.start()
|
||||
}, 100)
|
||||
},
|
||||
|
||||
// 验证码倒计时结束
|
||||
|
||||
@ -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)
|
||||
},
|
||||
|
||||
// 验证码倒计时结束
|
||||
|
||||
@ -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
|
||||
|
||||
@ -7,14 +7,17 @@
|
||||
}</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([
|
||||
console.log(`${OSS}/images/store/store/room.png`)
|
||||
|
||||
// 功能卡片数据
|
||||
const storeMenus = ref([
|
||||
{
|
||||
id: 1,
|
||||
title: '包间管理',
|
||||
@ -39,45 +42,39 @@ const storeMenus = ref([
|
||||
icon: `${OSS}images/store/store/renew.png`,
|
||||
path: '/pages/store/renew',
|
||||
},
|
||||
])
|
||||
])
|
||||
|
||||
const Store = {
|
||||
const auth = ref<boolean>(true)
|
||||
|
||||
onShow(() => {
|
||||
// 直营店才能操作菜单
|
||||
auth.value = useStore.defaultStore.operationType == 1 ? true : false
|
||||
})
|
||||
|
||||
const Store = {
|
||||
/**
|
||||
* 点击功能卡片
|
||||
*/
|
||||
handleClickMenu: (item: any) => {
|
||||
router.navigateTo(item.path)
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击更多选项
|
||||
*/
|
||||
handleMore: () => {
|
||||
// TODO: 实现更多选项功能
|
||||
console.log('更多选项')
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击目标图标
|
||||
*/
|
||||
handleTarget: () => {
|
||||
// TODO: 实现目标功能
|
||||
console.log('目标功能')
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</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)">
|
||||
|
||||
@ -4,12 +4,14 @@ interface IDefaultStoreVo {
|
||||
id: number
|
||||
name: string
|
||||
index: number
|
||||
operationType: number // type 1: 直营店 2: 加盟店
|
||||
}
|
||||
|
||||
const defaultStoreState: IDefaultStoreVo = {
|
||||
id: 0,
|
||||
name: '',
|
||||
index: 0,
|
||||
operationType: 1, // type 1: 直营店 2: 加盟店
|
||||
}
|
||||
|
||||
export const useStoreStore = defineStore(
|
||||
|
||||
Reference in New Issue
Block a user