diff --git a/pages/book/component/bookingSelected.vue b/pages/book/component/bookingSelected.vue
index 1aa00ea..0f0b497 100644
--- a/pages/book/component/bookingSelected.vue
+++ b/pages/book/component/bookingSelected.vue
@@ -11,7 +11,7 @@
拍摄人数
@@ -75,7 +75,7 @@
说明
定金:
- ¥129.00
+ ¥{{ totalPrice.toFixed(2) }}
确定
@@ -96,6 +96,8 @@
const number = ref(1)
const field = ref('室内')
const feeTips = ref(null)
+ const obj = ref('')
+ const totalPrice = ref(0)
onMounted(() => {
emitter.on('closeFeeTips', () => {
@@ -105,19 +107,30 @@
}
})
})
+
+ emitter.on('getProductObj', (val:any) => {
+ obj.value = val
+ totalPrice.value = val.price
+ console.log(totalPrice.value)
+ })
})
const sub = () => {
if (number.value > 1) {
number.value --
+ totalPrice.value = number.value * obj.value.price
}
}
const add = () => {
- number.value ++
+ if (number.value < obj.value.maxNumber) {
+ number.value ++
+ totalPrice.value = number.value * obj.value.price
+ }
}
const handlerRadioChange = (e:any) => {
field.value = e.detail.value
+ console.log(field.value)
}
const closePopup = () => {
@@ -130,7 +143,7 @@
const jumpToOrder = () => {
uni.navigateTo({
- url: '/pages/book/photoProductsOrder/photoProductsOrder'
+ url: '/pages/book/photoProductsOrder/photoProductsOrder?field=' + field.value + '&number=' + number.value + '&id=' + obj.value.id
})
}
diff --git a/pages/book/component/cancelOrder.vue b/pages/book/component/cancelOrder.vue
index 8912d9d..11ea614 100644
--- a/pages/book/component/cancelOrder.vue
+++ b/pages/book/component/cancelOrder.vue
@@ -3,16 +3,47 @@
确认取消该订单?
取消
- 确定
+ 确定
\ No newline at end of file
diff --git a/pages/book/photoProductDetail/photoProductDetail.vue b/pages/book/photoProductDetail/photoProductDetail.vue
index ae1f27a..ea599e3 100644
--- a/pages/book/photoProductDetail/photoProductDetail.vue
+++ b/pages/book/photoProductDetail/photoProductDetail.vue
@@ -63,13 +63,18 @@
import {nextTick, onMounted, ref} from 'vue'
import emitter from "../../../utils/emitter";
import bookingSelectedVue from "../component/bookingSelected.vue";
- const obj = ref({})
+ import { baseUrl } from "../../../api/request";
+ const cookie = wx.getStorageSync("cookie") //请求头
+ const id = ref({})
const bookingSelected = ref(null)
+ const obj = ref({})
onLoad((options) => {
console.log(options)
- obj.value = JSON.parse(options.obj)
+ id.value = options.id
+ getPhotoProductsById()
})
+
onMounted(() => {
emitter.on('closeBookingPopup', () => {
nextTick(() => {
@@ -81,7 +86,24 @@
})
+ const getPhotoProductsById = async () => {
+ const res = await uni.request({
+ url: baseUrl + '/photoProducts/list/detail',
+ method: 'POST',
+ header: {
+ cookie
+ },
+ data: {
+ id: id.value
+ }
+ })
+ console.log(res.data.data)
+ obj.value = res.data.data
+ }
+
+
const openBookingPopup = () => {
+ emitter.emit('getProductObj', obj.value)
bookingSelected.value.open('bottom')
}
diff --git a/pages/book/photoProducts/photoProducts.vue b/pages/book/photoProducts/photoProducts.vue
index 84add1f..56614e5 100644
--- a/pages/book/photoProducts/photoProducts.vue
+++ b/pages/book/photoProducts/photoProducts.vue
@@ -38,7 +38,7 @@
{{ categoryName }}
-
{
uni.navigateTo({
- url: '../photoProductDetail/photoProductDetail?obj=' + JSON.stringify(val)
+ url: '../photoProductDetail/photoProductDetail?id=' + val
})
}
diff --git a/pages/book/photoProductsOrder/photoProductsOrder.vue b/pages/book/photoProductsOrder/photoProductsOrder.vue
index bc5c5f2..ebff554 100644
--- a/pages/book/photoProductsOrder/photoProductsOrder.vue
+++ b/pages/book/photoProductsOrder/photoProductsOrder.vue
@@ -14,7 +14,7 @@
class="shrink-0 image_2"
src="https://ide.code.fun/api/image?token=67be7f674ae84d0012275313&name=d756fec34c69604dfbd42c6d155690f0.png"
/>
- {{ contactInfo.name }} {{ contactInfo.phone }}
+ {{ contactTemplateString }}
{{ photoProduct.name }}
- 拍摄人数:1人
- 拍摄场地:室外
+ 拍摄人数:{{ number }}人
+ 拍摄场地:{{ field }}
预约门店:哈尔滨师范大学
@@ -75,7 +75,7 @@
定金:
- ¥{{ photoProduct.price.toFixed(2) }}
+ ¥{{ totalPrice.toFixed(2) }}
确定
@@ -99,6 +99,8 @@
+
+