diff --git a/pages.json b/pages.json
index 103d48b..ada062a 100644
--- a/pages.json
+++ b/pages.json
@@ -1,5 +1,12 @@
{
"pages": [
+ {
+ "path" : "pages/testPage/testPage",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
{
"path" : "pages/test/test",
"style" :
diff --git a/pages/testPage/testPage.vue b/pages/testPage/testPage.vue
new file mode 100644
index 0000000..ea38051
--- /dev/null
+++ b/pages/testPage/testPage.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff --git a/pages/workshop/component/images/add.png b/pages/workshop/component/images/add.png
new file mode 100644
index 0000000..fbe2eea
Binary files /dev/null and b/pages/workshop/component/images/add.png differ
diff --git a/pages/workshop/component/images/cha.png b/pages/workshop/component/images/cha.png
new file mode 100644
index 0000000..f579189
Binary files /dev/null and b/pages/workshop/component/images/cha.png differ
diff --git a/pages/workshop/component/images/sub.png b/pages/workshop/component/images/sub.png
new file mode 100644
index 0000000..09296b1
Binary files /dev/null and b/pages/workshop/component/images/sub.png differ
diff --git a/pages/workshop/component/images/yyxz.png b/pages/workshop/component/images/yyxz.png
new file mode 100644
index 0000000..b9dd0e2
Binary files /dev/null and b/pages/workshop/component/images/yyxz.png differ
diff --git a/pages/workshop/component/timeSelect.vue b/pages/workshop/component/timeSelect.vue
new file mode 100644
index 0000000..28132da
--- /dev/null
+++ b/pages/workshop/component/timeSelect.vue
@@ -0,0 +1,410 @@
+
+
+
+
+
+
+
+
+ ¥99
+ 请选择
+
+
+
+ 当前日期:{{appointmentDateVOList[appIdx].specificDate}}
+
+ 剩余预约人数:{{ restNumber }}
+
+
+ 预约须知
+
+
+
+
+
+ 星期二
+ {{item.specificDate.substring(5)}}
+
+
+
+
+
+
+ {{item.timeSlot}}
+
+
+
+
+
+
+ 数量
+
+
+
+ {{cnt}}
+
+
+
+
+
+ 下一步
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/workshop/component/tip.vue b/pages/workshop/component/tip.vue
new file mode 100644
index 0000000..7834195
--- /dev/null
+++ b/pages/workshop/component/tip.vue
@@ -0,0 +1,51 @@
+
+
+ 本次课程活动需要到达指定人数才能进行授课
+
+ 知道了
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/workshop/productmain/productmain.vue b/pages/workshop/productmain/productmain.vue
index 4cfccda..3e29fae 100644
--- a/pages/workshop/productmain/productmain.vue
+++ b/pages/workshop/productmain/productmain.vue
@@ -66,7 +66,7 @@
@@ -75,24 +75,24 @@
import { ref,onMounted } from 'vue'
import { onLoad } from "@dcloudio/uni-app";
import { baseUrl } from '../../../api/request';
-import timePopUpVue from '../component/timePopUp.vue';
+import timeSelectVue from '../component/timeSelect.vue';
import emitter from '../../../utils/emitter' //导入emitter传值组件
const pid = ref(0) //商品id
const cookie = wx.getStorageSync("cookie") //请求头
const productObject = ref({})
const popup = ref(null) //弹窗对象
-const specificDate = ref('') //渲染最近可预约日期
-const specificTime = ref('') //渲染最近可预约时间段
+const pObj = {}
onMounted(()=>{
- emitter.on('close',()=>{
+ emitter.on('closeTimeDialog',()=>{
close()
})
})
onLoad((options)=>{
pid.value = JSON.parse(options.info)
getProduct()
+ getBookingNumberMap()
})
-const getProduct = async() =>{
+const getProduct = async () =>{
const res = await uni.request({
url: baseUrl + '/goods/service/list/id',
method: 'POST',
@@ -105,9 +105,6 @@ const getProduct = async() =>{
})
if(res.data.code === 1) {
productObject.value = res.data.data
- specificDate.value = res.data.data.appointmentDateVOList[0].specificDate //最近可预约日期
- specificTime.value = res.data.data.appointmentDateVOList[0].timePeriodVOList[0].timeSlot //最近可预约时间
- console.log('商品对象为--->',productObject.value);
} else {
uni.showToast({
icon: 'error',
@@ -116,17 +113,40 @@ const getProduct = async() =>{
return;
}
}
+
+let countMap = new Map()
+
+const getBookingNumberMap = async () => {
+ const res = await uni.request({
+ url: baseUrl + '/pending/list/advance/count',
+ method: 'POST',
+ data: {
+ id: pid.value
+ },
+ header: {
+ cookie
+ }
+ })
+ countMap = res.data.data
+ console.log(countMap)
+}
+
const close =()=> { //关闭弹窗
popup.value.close()
}
const loadPop =()=> {
+ emitter.emit('getGoodData', productObject.value)
+ emitter.emit('getBookingNumberMap', countMap)
popup.value.open('bottom') //从底部弹
}
+
+
+