合完了
This commit is contained in:
parent
42a5ea5c1c
commit
2e55f6586d
|
@ -281,7 +281,8 @@
|
||||||
"path" : "pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail",
|
"path" : "pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : ""
|
"navigationBarTitleText" : "",
|
||||||
|
"enablePullDownRefresh":true //开启下拉刷新
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
<text class="self-center text">请确认您的预约信息</text>
|
<text class="self-center text">请确认您的预约信息</text>
|
||||||
<text class="self-start font text_2">写真产品:{{ orderObj.name }}</text>
|
<text class="self-start font text_2">写真产品:{{ orderObj.name }}</text>
|
||||||
<text class="self-start font text_3">拍摄时间:{{ orderObj.bookingDate }} {{ orderObj.bookingTime }}</text>
|
<text class="self-start font text_3">拍摄时间:{{ orderObj.bookingDate }} {{ orderObj.bookingTime }}</text>
|
||||||
<text class="self-start font text_4">拍摄人数:{{ orderObj.number }}人</text>
|
<text class="self-start font text_4">妆造服务:{{ orderObj.isMakeup ? '本店上妆' : '无需妆造' }}</text>
|
||||||
<text class="self-start font text_5">拍摄场地:{{ orderObj.field }}</text>
|
<text class="self-start font text_5">拍摄场地:{{ orderObj.scene }}</text>
|
||||||
<view @click="closeConfirmBookingPopup" class="flex-col justify-start items-center self-stretch text-wrapper">
|
<view @click="closeConfirmBookingPopup" class="flex-col justify-start items-center self-stretch text-wrapper">
|
||||||
<text class="font text_6">确定</text>
|
<text class="font text_6">确定</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import { onMounted, onUnmounted, ref } from 'vue';
|
import { onMounted, onUnmounted, ref } from 'vue';
|
||||||
import emitter from '../../../utils/emitter';
|
import emitter from '../../../utils/emitter';
|
||||||
import { baseUrl } from '../../../api/request';
|
import { baseUrl } from '../../../api/request';
|
||||||
|
@ -27,11 +27,7 @@ onLoad(() => {
|
||||||
const cookie = wx.getStorageSync("cookie") //请求头
|
const cookie = wx.getStorageSync("cookie") //请求头
|
||||||
|
|
||||||
const orderObj = ref({})
|
const orderObj = ref({})
|
||||||
const isIndoors = ref(0)
|
const getBookingOrderDataHandler = (val) => {
|
||||||
const isMakeup = ref(1)
|
|
||||||
const isPhotography = ref(1)
|
|
||||||
|
|
||||||
const getBookingOrderDataHandler = (val:any) => {
|
|
||||||
orderObj.value = val
|
orderObj.value = val
|
||||||
console.log(val)
|
console.log(val)
|
||||||
}
|
}
|
||||||
|
@ -52,15 +48,7 @@ const cookie = wx.getStorageSync("cookie") //请求头
|
||||||
|
|
||||||
|
|
||||||
const createOrder = async () => {
|
const createOrder = async () => {
|
||||||
if (orderObj.value.field === '室内') {
|
|
||||||
isIndoors.value = 1
|
|
||||||
}
|
|
||||||
if (orderObj.value.type === '妆造') {
|
|
||||||
isPhotography.value = 0
|
|
||||||
|
|
||||||
} else if (orderObj.value.type === '摄影') {
|
|
||||||
isMakeup.value = 0
|
|
||||||
}
|
|
||||||
const res = await uni.request({
|
const res = await uni.request({
|
||||||
url: baseUrl + '/advanceOrder/add',
|
url: baseUrl + '/advanceOrder/add',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
@ -72,10 +60,8 @@ const cookie = wx.getStorageSync("cookie") //请求头
|
||||||
contactsId: orderObj.value.contactId,
|
contactsId: orderObj.value.contactId,
|
||||||
bookingDateId: orderObj.value.bookingDateId,
|
bookingDateId: orderObj.value.bookingDateId,
|
||||||
bookingTimeId: orderObj.value.bookingTimeId,
|
bookingTimeId: orderObj.value.bookingTimeId,
|
||||||
isIndoors: isIndoors.value,
|
isIndoors: orderObj.value.scene === '室内' ? 1 : 0,
|
||||||
isMakeup: isMakeup.value,
|
isMakeup: orderObj.value.isMakeup ? 1 : 0
|
||||||
isPhotography: isPhotography.value,
|
|
||||||
quantity: orderObj.value.number
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log('订单id==========================>', res.data.data)
|
console.log('订单id==========================>', res.data.data)
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
const isShow = ref(true)
|
const isShow = ref(true)
|
||||||
const id = ref(0)
|
const id = ref(0)
|
||||||
const obj = ref({})
|
const obj = ref({})
|
||||||
|
const bookingDateVOList = ref([])
|
||||||
|
|
||||||
|
|
||||||
const closeClothesAttributePopupHandler = () => {
|
const closeClothesAttributePopupHandler = () => {
|
||||||
|
@ -101,6 +102,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
obj.value = res.data.data
|
obj.value = res.data.data
|
||||||
|
bookingDateVOList.value = res.data.data.bookingDateVOList
|
||||||
console.log(obj.value)
|
console.log(obj.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,6 +123,14 @@
|
||||||
|
|
||||||
const openPopup = () => {
|
const openPopup = () => {
|
||||||
if (isShow.value) {
|
if (isShow.value) {
|
||||||
|
if (bookingDateVOList.value.length === 0) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '当前写真产品的所有时段已约满',
|
||||||
|
showCancel: false
|
||||||
|
})
|
||||||
|
return ;
|
||||||
|
}
|
||||||
emitter.emit('getPhotoProductsInfo', obj.value)
|
emitter.emit('getPhotoProductsInfo', obj.value)
|
||||||
book.value.open('bottom')
|
book.value.open('bottom')
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<view class="flex-row items-center section_2 pos">
|
<view class="flex-row items-center section_2 pos">
|
||||||
<image
|
<image
|
||||||
class="image"
|
class="image"
|
||||||
:src="bookUrl + '/myPhotoProductsOrder/dzf.png'"
|
:src="bookUrl + '/myPhotoProductsOrderDetail/dzf.png'"
|
||||||
/>
|
/>
|
||||||
<view class="flex-col items-start flex-1 ml-6">
|
<view class="flex-col items-start flex-1 ml-6">
|
||||||
<text class="font text">等待买家付款</text>
|
<text class="font text">等待买家付款</text>
|
||||||
|
@ -13,76 +13,341 @@
|
||||||
<view class="flex-row items-center section_3 pos_2">
|
<view class="flex-row items-center section_3 pos_2">
|
||||||
<image
|
<image
|
||||||
class="image_2"
|
class="image_2"
|
||||||
:src="bookUrl + '/myPhotoProductsOrder/lxr.png'"
|
:src="bookUrl + '/myPhotoProductsOrderDetail/lxr.png'"
|
||||||
/>
|
/>
|
||||||
<text class="font_2 text_3 ml-9">张三 15888610253</text>
|
<text class="font_2 text_3 ml-9">{{ order.contactsSnapshot.name }} {{ order.contactsSnapshot.phone }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row section_4 pos_3">
|
<view class="flex-row section_4 pos_3">
|
||||||
<view class="flex-row items-center group pos_13">
|
<view class="flex-row items-center group pos_13">
|
||||||
<image
|
<image
|
||||||
class="image_3"
|
class="image_3"
|
||||||
src="https://ide.code.fun/api/image?token=67dd57af4ae84d00122a84d1&name=0c34cbad13bda42b94fffa906d29960d.png"
|
:src="publicPath + order.photoProductsSnapshot.introImg"
|
||||||
/>
|
/>
|
||||||
<view class="flex-col items-start flex-1 ml-12">
|
<view class="flex-col items-start flex-1 ml-12">
|
||||||
<text class="font_3 text_4">汉服—曲裾系列</text>
|
<text class="font_3 text_4">{{ order.photoProductsSnapshot.name }}</text>
|
||||||
<text class="font_3 text_5 mt-59">¥138.00</text>
|
<text class="font_3 text_5 mt-59">¥{{ order.photoProductsSnapshot.price.toFixed(2) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col section_5 pos_1">
|
<view class="flex-col section_5 pos_1">
|
||||||
<text class="self-start font text_6">预约门店:哈尔滨师范大学</text>
|
<text class="self-start font text_6">预约门店:哈尔滨师范大学</text>
|
||||||
<view class="flex-row justify-between self-stretch mt-8">
|
<view class="flex-row justify-between self-stretch mt-8">
|
||||||
<view class="flex-col items-start">
|
<view class="flex-col items-start">
|
||||||
<text class="font text_7">到店时间:2025-03-10 16:00</text>
|
<text class="font text_7">到店时间:{{ order.specificDate }} {{ order.timePoint }}</text>
|
||||||
<text class="font mt-9">附加服务:妆造</text>
|
<text class="font mt-9">妆造服务:{{ order.isMakeup === 1 ? '本店上妆' : '无需妆造' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col items-center group_2">
|
<view @click="nav" class="flex-col items-center group_2">
|
||||||
<image
|
<image
|
||||||
class="image_4"
|
class="image_4"
|
||||||
:src="bookUrl + '/myPhotoProductsOrder/nav.png'"
|
:src="bookUrl + '/myPhotoProductsOrderDetail/nav.png'"
|
||||||
/>
|
/>
|
||||||
<text class="text_8 mt-3">导航</text>
|
<text class="text_8 mt-3">导航</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="self-start font text_9 mt-8">拍摄场地:室外</text>
|
<text class="self-start font text_9 mt-8">拍摄场地:{{ order.isIndoors === 1 ? '室内' : '室外' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-end items-center group_3 pos_6">
|
<view class="flex-row justify-end items-center group_3 pos_6">
|
||||||
<text class="font_3 text_10">实付款:</text>
|
<text class="font_3 text_10">实付款:</text>
|
||||||
<text class="text_11">¥138.00</text>
|
<text class="text_11">¥{{ order.photoProductsSnapshot.price.toFixed(2) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-between items-baseline view pos_7">
|
<view class="flex-row justify-between items-baseline view pos_7">
|
||||||
<text class="font_2 text_12">创建时间:</text>
|
<text class="font_2 text_12">创建时间:</text>
|
||||||
<text class="font_4 text_13">2024-10-05 09:58:41</text>
|
<text class="font_4 text_13">{{ order.createTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="font_2 text_14 pos_8">订单编号:</text>
|
<text class="font_2 text_14 pos_8">订单编号:</text>
|
||||||
<view class="flex-row items-center pos_9">
|
<view class="flex-row items-center pos_9">
|
||||||
<text class="font_4 text_15">E20241005095840091406189</text>
|
<text class="font_4 text_15">{{ order.orderNumber }}</text>
|
||||||
<view class="flex-col justify-start items-center shrink-0 text-wrapper ml-4">
|
<view class="flex-col justify-start items-center shrink-0 text-wrapper ml-4" @click="copy(order.orderNumber)">
|
||||||
<text class="text_16">复制</text>
|
<text class="text_16">复制</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="font_3 text_17 pos_11">在线客服</text>
|
|
||||||
<image
|
<button class="button-pos" style="display: flex; align-items: center; justify-content: space-around; height: 60rpx; width: 175rpx;" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
|
||||||
class="image_4 pos_4"
|
<image
|
||||||
:src="bookUrl + '/myPhotoProductsOrder/lxkf.png'"
|
class="image_4"
|
||||||
/>
|
:src="bookUrl + '/myPhotoProductsOrderDetail/lxkf.png'"
|
||||||
|
/>
|
||||||
|
<text class="font_3 text_17">在线客服</text>
|
||||||
|
</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-between items-center section_6 pos_5">
|
<view class="flex-row justify-between items-center section_6 pos_5">
|
||||||
<view class="flex-row">
|
<view class="flex-row">
|
||||||
<text class="font text_18">应付款:</text>
|
<text class="font text_18">应付款:</text>
|
||||||
<text class="text_19">¥138.00</text>
|
<text class="text_19">¥{{ order.photoProductsSnapshot.price.toFixed(2) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col justify-start items-center text-wrapper_2"><text class="font text_20">去支付</text></view>
|
|
||||||
|
<view v-if="order.operationList[0]" class="flex-col justify-start items-center text-wrapper_2" @click="wxPayFd(order)">
|
||||||
|
<text class="font text_20">去支付</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="order.operationList[1]" class="flex-col justify-start items-center text-wrapper_2" @click="gotoDeleteOrder(order.id)">
|
||||||
|
<text class="font text_20">删除订单</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="order.operationList[2]" style="background-color: #fff;" class="flex-col justify-start items-center text-wrapper_3">
|
||||||
|
<text class="font text_24"></text>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 遮罩层 -->
|
||||||
|
<view v-if="isShow" class="overlay"></view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {ref} from 'vue'
|
import {onMounted, ref} from 'vue'
|
||||||
import { bookUrl } from '../../../common/globalImagesUrl';
|
import { bookUrl } from '../../../common/globalImagesUrl';
|
||||||
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
import { baseUrl } from '../../../api/request';
|
||||||
|
import { publicPath } from '../../../common/globalImagesUrl';
|
||||||
|
import { getFonts } from '../../../common/globalFont';
|
||||||
|
import { onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
|
import emitter from '../../../utils/emitter';
|
||||||
const bkgUrl = ref(bookUrl + '/myPhotoProductsOrderDetail/bkg.png')
|
const bkgUrl = ref(bookUrl + '/myPhotoProductsOrderDetail/bkg.png')
|
||||||
|
const id = ref(0)
|
||||||
|
const cookie = wx.getStorageSync('cookie')
|
||||||
|
const order = ref({})
|
||||||
|
|
||||||
|
let wxPayTimer = null;
|
||||||
|
let loading = false;
|
||||||
|
let isLoading = ref(false)
|
||||||
|
let isShow = ref(false)
|
||||||
|
|
||||||
|
const flushOrderListHandler = () => {
|
||||||
|
getMyOrder()
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
getFonts()
|
||||||
|
id.value = options.id
|
||||||
|
})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getAdvanceOrderById(id.value)
|
||||||
|
})
|
||||||
|
|
||||||
|
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||||
|
await getAdvanceOrderById(id.value)
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.stopPullDownRefresh() //停止下拉刷新
|
||||||
|
},1000)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const getAdvanceOrderById = async (val) => {
|
||||||
|
const res = await uni.request({
|
||||||
|
url: baseUrl + '/advanceOrder/get/id',
|
||||||
|
method: 'POST',
|
||||||
|
header: {
|
||||||
|
cookie
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
id: val
|
||||||
|
}
|
||||||
|
})
|
||||||
|
order.value = res.data.data
|
||||||
|
if (order.value.orderStatus === '待支付') {
|
||||||
|
order.value.operationList = [true, false, false]
|
||||||
|
// orderStatusObj.value = stateList[0]
|
||||||
|
} else if (order.value.orderStatus === '待发货') {
|
||||||
|
order.value.operationList = [false, false, true]
|
||||||
|
// orderStatusObj.value = stateList[5]
|
||||||
|
} else if (order.value.orderStatus === '已退款') {
|
||||||
|
order.value.operationList = [false, false, true]
|
||||||
|
// orderStatusObj.value = stateList[2]
|
||||||
|
} else if (order.value.orderStatus === '交易成功') {
|
||||||
|
order.value.operationList = [false, false, true]
|
||||||
|
// orderStatusObj.value = stateList[4]
|
||||||
|
} else if (order.value.orderStatus === '交易关闭') {
|
||||||
|
order.value.operationList = [false, true, false]
|
||||||
|
// orderStatusObj.value = stateList[3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const wxPayFd = (order) => { //微信支付按钮防抖
|
||||||
|
clearTimeout(wxPayTimer)
|
||||||
|
showLoading()
|
||||||
|
isShow.value = true //打开遮罩
|
||||||
|
wxPayTimer = setTimeout(async () => {
|
||||||
|
await wxPay(order.id)
|
||||||
|
}, 1000)
|
||||||
|
setTimeout(()=>{
|
||||||
|
hideLoading()
|
||||||
|
isShow.value = false //关闭遮罩
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
|
||||||
|
function showLoading() { //加载弹窗
|
||||||
|
if (!loading) {
|
||||||
|
wx.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
});
|
||||||
|
loading = true;
|
||||||
|
isLoading.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideLoading() { //关闭弹窗
|
||||||
|
if (loading) {
|
||||||
|
wx.hideLoading();
|
||||||
|
loading = false;
|
||||||
|
isLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const wxPay = async( oid )=> { //传入订单id
|
||||||
|
try {
|
||||||
|
const res = await uni.request({
|
||||||
|
url: baseUrl + '/wechat/payment/photo/create',
|
||||||
|
method: 'POST',
|
||||||
|
header: {
|
||||||
|
'cookie': wx.getStorageSync("cookie")
|
||||||
|
},
|
||||||
|
data: { id: oid }
|
||||||
|
})
|
||||||
|
const paymentData = res.data.data
|
||||||
|
wx.requestPayment({
|
||||||
|
appid: paymentData.appId,
|
||||||
|
nonceStr: paymentData.nonceStr,
|
||||||
|
package: paymentData.packageVal,
|
||||||
|
paySign: paymentData.paySign,
|
||||||
|
timeStamp: paymentData.timeStamp,
|
||||||
|
signType: paymentData.signType,
|
||||||
|
success(res) {
|
||||||
|
uni.showModal({
|
||||||
|
content: '支付成功',
|
||||||
|
showCancel: false
|
||||||
|
})
|
||||||
|
getAdvanceOrderById(oid)
|
||||||
|
console.log('支付成功res--->',res);
|
||||||
|
},
|
||||||
|
fail(e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}catch(error) {
|
||||||
|
console.error('支付请求失败');
|
||||||
|
uni.showModal({
|
||||||
|
content: '支付请求失败,请重试。',
|
||||||
|
showCancel: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const gotoDeleteOrder = (val) => {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您确定要删除订单吗?',
|
||||||
|
success: async (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
await deleteOrder(val)
|
||||||
|
await emitter.emit('flushAdvanceOrderList')
|
||||||
|
routerJump('pages/book/photoProductsOrderDetail/photoProductsOrderDetail')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const deleteOrder = async (val) => {
|
||||||
|
const res = await uni.request({
|
||||||
|
url: baseUrl + '/advanceOrder/delete',
|
||||||
|
method: 'POST',
|
||||||
|
header: {
|
||||||
|
cookie
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
id: val
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log(res.data.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const copy = ( orderNumber ) => {
|
||||||
|
console.log('订单编号为--->',orderNumber);
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: orderNumber,
|
||||||
|
success: () => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '成功复制到剪贴板'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const nav = () => {
|
||||||
|
wx.openLocation({
|
||||||
|
latitude: 45.867741,
|
||||||
|
longitude: 126.560037,
|
||||||
|
name: '哈尔滨师范大学(松北校区)',
|
||||||
|
address: '黑龙江省哈尔滨市呼兰区利民经济开发区师大路1号',
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const routerJump = (val) => {
|
||||||
|
let pages = getCurrentPages();
|
||||||
|
var num = pages.length
|
||||||
|
if (num == 1) return ;
|
||||||
|
console.log(pages)
|
||||||
|
//当前页面栈总数
|
||||||
|
var backnum = num
|
||||||
|
for( var i = 0; i < num; i ++ ) {
|
||||||
|
//循环找到指定页面路由所在的页数
|
||||||
|
if(pages[i].route == val){
|
||||||
|
//'pages/mypage/mypage'替换成A页面的路由地址
|
||||||
|
backnum = num - i - 1
|
||||||
|
//计算返回的层数,总数-指定页面页数-1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uni.navigateBack({
|
||||||
|
delta:backnum
|
||||||
|
//返回的页面数,如果 delta 大于现有页面数,则返回到首页。
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
.overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4); /* 半透明黑色背景 */
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
button::after{
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-pos {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 20rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
}
|
||||||
.ml-9 {
|
.ml-9 {
|
||||||
margin-left: 16.88rpx;
|
margin-left: 16.88rpx;
|
||||||
}
|
}
|
||||||
|
@ -142,10 +407,7 @@
|
||||||
border-radius: 18.75rpx;
|
border-radius: 18.75rpx;
|
||||||
}
|
}
|
||||||
.pos_2 {
|
.pos_2 {
|
||||||
position: absolute;
|
margin: 165rpx 24.38rpx 0 22.5rpx;
|
||||||
left: 22.5rpx;
|
|
||||||
right: 24.38rpx;
|
|
||||||
top: 165rpx;
|
|
||||||
}
|
}
|
||||||
.image_2 {
|
.image_2 {
|
||||||
width: 46.88rpx;
|
width: 46.88rpx;
|
||||||
|
@ -168,10 +430,8 @@
|
||||||
height: 703.13rpx;
|
height: 703.13rpx;
|
||||||
}
|
}
|
||||||
.pos_3 {
|
.pos_3 {
|
||||||
position: absolute;
|
position: relative;
|
||||||
left: 22.5rpx;
|
margin: 30rpx 24.38rpx 0 22.5rpx;
|
||||||
right: 24.38rpx;
|
|
||||||
top: 285rpx;
|
|
||||||
}
|
}
|
||||||
.group {
|
.group {
|
||||||
padding: 30rpx 15rpx 24.38rpx;
|
padding: 30rpx 15rpx 24.38rpx;
|
||||||
|
@ -242,7 +502,7 @@
|
||||||
.pos_6 {
|
.pos_6 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 16.88rpx;
|
left: 16.88rpx;
|
||||||
right: 11.27rpx;
|
right: 23.27rpx;
|
||||||
top: 414.38rpx;
|
top: 414.38rpx;
|
||||||
}
|
}
|
||||||
.text_10 {
|
.text_10 {
|
||||||
|
@ -252,7 +512,7 @@
|
||||||
color: #c35c5d;
|
color: #c35c5d;
|
||||||
font-size: 33.75rpx;
|
font-size: 33.75rpx;
|
||||||
font-family: FZSongKeBenXiuKaiS-R-GB;
|
font-family: FZSongKeBenXiuKaiS-R-GB;
|
||||||
line-height: 22.54rpx;
|
line-height: 26.7rpx;
|
||||||
}
|
}
|
||||||
.view {
|
.view {
|
||||||
padding-left: 15.22rpx;
|
padding-left: 15.22rpx;
|
||||||
|
@ -287,7 +547,7 @@
|
||||||
}
|
}
|
||||||
.pos_9 {
|
.pos_9 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 33.77rpx;
|
right: 23rpx;
|
||||||
top: 570rpx;
|
top: 570rpx;
|
||||||
}
|
}
|
||||||
.text_15 {
|
.text_15 {
|
||||||
|
@ -329,7 +589,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 1515rpx;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
.text_18 {
|
.text_18 {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|
|
@ -59,8 +59,8 @@
|
||||||
/>
|
/>
|
||||||
<view class="flex-col items-start ml-11">
|
<view class="flex-col items-start ml-11">
|
||||||
<text class="font_2 text_8">{{ photoProduct.name }}</text>
|
<text class="font_2 text_8">{{ photoProduct.name }}</text>
|
||||||
<text class="font_6 text_9 mt-10">拍摄人数:{{ number }}人</text>
|
<text class="font_6 text_9 mt-10">妆造服务:{{ isMakeup ? '本店上妆' : '无需妆造' }}</text>
|
||||||
<text class="font_6 text_10 mt-10">拍摄场地:{{ field }}</text>
|
<text class="font_6 text_10 mt-10">拍摄场地:{{ scene }}</text>
|
||||||
<text class="font_6 text_12 mt-10">预约门店:哈尔滨师范大学</text>
|
<text class="font_6 text_12 mt-10">预约门店:哈尔滨师范大学</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
<view v-if="isShow" class="overlay"></view>
|
<view v-if="isShow" class="overlay"></view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import {nextTick, onMounted, onUnmounted, ref} from 'vue'
|
import {nextTick, onMounted, onUnmounted, ref} from 'vue'
|
||||||
import emitter from '../../../utils/emitter';
|
import emitter from '../../../utils/emitter';
|
||||||
import bookingTipsVue from '../component/bookingTips.vue';
|
import bookingTipsVue from '../component/bookingTips.vue';
|
||||||
|
@ -138,15 +138,14 @@
|
||||||
const confirmBookingInfo = ref(null)
|
const confirmBookingInfo = ref(null)
|
||||||
|
|
||||||
const contactInfo = ref({})
|
const contactInfo = ref({})
|
||||||
const field = ref('')
|
const scene = ref('')
|
||||||
const number = ref(0)
|
|
||||||
const id = ref(0)
|
const id = ref(0)
|
||||||
|
const isMakeup = ref(false)
|
||||||
const totalPrice = ref(0)
|
const totalPrice = ref(0)
|
||||||
|
|
||||||
const isShow = ref(false)
|
const isShow = ref(false)
|
||||||
let loading = false;
|
let loading = false;
|
||||||
const type = ref('')
|
|
||||||
|
|
||||||
const contactTemplateString = ref('请选择')
|
const contactTemplateString = ref('请选择')
|
||||||
const bkgUrl = ref(bookUrl + '/photoProductsOrder/bkg.png')
|
const bkgUrl = ref(bookUrl + '/photoProductsOrder/bkg.png')
|
||||||
|
|
||||||
|
@ -177,14 +176,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
if (contactTemplateString.value === null || contactTemplateString.value === undefined || contactTemplateString.value === '请选择') {
|
if (contactTemplateString.value === null || contactTemplateString.value === undefined || contactTemplateString.value === '请选择联系人') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择联系人',
|
title: '请选择联系人',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
})
|
})
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
if (bookingTime.value === null || bookingTime.value == undefined || bookingTime.value === '请选择') {
|
if (bookingTime.value === null || bookingTime.value == undefined || bookingTime.value === '请选择联系人') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请填写预约时间',
|
title: '请填写预约时间',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
|
@ -192,27 +191,24 @@
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
emitter.emit('getBookingOrderData', {
|
emitter.emit('getBookingOrderData', {
|
||||||
field: field.value,
|
|
||||||
number: number.value,
|
|
||||||
id: id.value,
|
id: id.value,
|
||||||
contactId: contactInfo.value.id,
|
contactId: contactInfo.value.id,
|
||||||
|
isMakeup: isMakeup.value,
|
||||||
name: photoProduct.value.name,
|
name: photoProduct.value.name,
|
||||||
|
scene: scene.value,
|
||||||
bookingDateId: bookingDateId.value,
|
bookingDateId: bookingDateId.value,
|
||||||
bookingTimeId: bookingTimeId.value,
|
bookingTimeId: bookingTimeId.value,
|
||||||
bookingDate: bookingDate.value,
|
bookingDate: bookingDate.value,
|
||||||
bookingTime: bookingTime.value,
|
bookingTime: bookingTime.value,
|
||||||
type: type.value
|
|
||||||
})
|
})
|
||||||
confirmBookingInfo.value.open('center')
|
confirmBookingInfo.value.open('center')
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
getFonts()
|
getFonts()
|
||||||
console.log(options)
|
isMakeup.value = JSON.parse(options.isMakeup)
|
||||||
field.value = options.field
|
scene.value = options.scene
|
||||||
number.value = options.number
|
id.value = JSON.parse(options.id)
|
||||||
id.value = options.id
|
|
||||||
type.value = options.type
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const closeBookingTipsHandler = () => {
|
const closeBookingTipsHandler = () => {
|
||||||
|
@ -255,9 +251,24 @@
|
||||||
isShow.value = false
|
isShow.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const delContactByIdHandler = (val) => {
|
||||||
|
if (contactInfo.value.id === val) {
|
||||||
|
contactInfo.value = {}
|
||||||
|
// contactInfo.value.name = '请选择联系人'
|
||||||
|
contactTemplateString.value = '请选择联系人'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const updateContactObjHandler = (val) => {
|
||||||
|
if (contactInfo.value.id === val.id) {
|
||||||
|
contactInfo.value = val
|
||||||
|
contactTemplateString.value = val.name + ' ' + val.phone
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getFonts()
|
getDefaultContact()
|
||||||
getDefaultAddress()
|
|
||||||
getPhotoProductsById()
|
getPhotoProductsById()
|
||||||
emitter.on('closeBookingTips', closeBookingTipsHandler)
|
emitter.on('closeBookingTips', closeBookingTipsHandler)
|
||||||
|
|
||||||
|
@ -270,6 +281,10 @@
|
||||||
emitter.on('openMask', openMaskHandler)
|
emitter.on('openMask', openMaskHandler)
|
||||||
|
|
||||||
emitter.on('closeMask', closeMaskHandler)
|
emitter.on('closeMask', closeMaskHandler)
|
||||||
|
|
||||||
|
emitter.on('delContactById', delContactByIdHandler)
|
||||||
|
|
||||||
|
emitter.on('updateContactObj', updateContactObjHandler)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -287,6 +302,9 @@
|
||||||
|
|
||||||
emitter.off('closeMask', closeMaskHandler)
|
emitter.off('closeMask', closeMaskHandler)
|
||||||
|
|
||||||
|
emitter.off('delContactById', delContactByIdHandler)
|
||||||
|
|
||||||
|
emitter.off('updateContactObj', updateContactObjHandler)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -303,7 +321,7 @@
|
||||||
})
|
})
|
||||||
console.log(res.data.data)
|
console.log(res.data.data)
|
||||||
photoProduct.value = res.data.data
|
photoProduct.value = res.data.data
|
||||||
totalPrice.value = photoProduct.value.price * number.value
|
totalPrice.value = photoProduct.value.price
|
||||||
bookingDateVOList.value = res.data.data.bookingDateVOList
|
bookingDateVOList.value = res.data.data.bookingDateVOList
|
||||||
timeSelectedStyle.value = new Array(bookingDateVOList.value.length).fill(null).map(() => ({
|
timeSelectedStyle.value = new Array(bookingDateVOList.value.length).fill(null).map(() => ({
|
||||||
backgroundColor: '#F3F3F3',
|
backgroundColor: '#F3F3F3',
|
||||||
|
@ -334,7 +352,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const selectTime = (index:any) => {
|
const selectTime = (index) => {
|
||||||
if (bid.value === index) return ;
|
if (bid.value === index) return ;
|
||||||
bookingTime.value = '请选择'
|
bookingTime.value = '请选择'
|
||||||
bookingTimeId.value = 0
|
bookingTimeId.value = 0
|
||||||
|
@ -358,7 +376,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectTpTime = (index:any) => {
|
const selectTpTime = (index) => {
|
||||||
bookingTime.value = bookingDateVOList.value[bid.value].bookingTimeVOList[index].timePoint
|
bookingTime.value = bookingDateVOList.value[bid.value].bookingTimeVOList[index].timePoint
|
||||||
bookingTimeId.value = bookingDateVOList.value[bid.value].bookingTimeVOList[index].id
|
bookingTimeId.value = bookingDateVOList.value[bid.value].bookingTimeVOList[index].id
|
||||||
let len = bookingDateVOList.value[bid.value].bookingTimeVOList.length
|
let len = bookingDateVOList.value[bid.value].bookingTimeVOList.length
|
||||||
|
@ -388,7 +406,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getWeekday(dateStr:any) {
|
function getWeekday(dateStr) {
|
||||||
const date = new Date(dateStr);
|
const date = new Date(dateStr);
|
||||||
const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
||||||
return weekdays[date.getDay()];
|
return weekdays[date.getDay()];
|
||||||
|
@ -396,7 +414,7 @@
|
||||||
|
|
||||||
|
|
||||||
//获取用户默认联系人
|
//获取用户默认联系人
|
||||||
const getDefaultAddress = async () =>{
|
const getDefaultContact = async () =>{
|
||||||
const res = await uni.request({
|
const res = await uni.request({
|
||||||
url: baseUrl + '/contacts/list',
|
url: baseUrl + '/contacts/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
@ -719,6 +737,7 @@
|
||||||
.text_14 {
|
.text_14 {
|
||||||
margin-left: -10.14rpx;
|
margin-left: -10.14rpx;
|
||||||
line-height: 25.05rpx;
|
line-height: 25.05rpx;
|
||||||
|
color: #E79EA1;
|
||||||
}
|
}
|
||||||
.text-wrapper_2 {
|
.text-wrapper_2 {
|
||||||
margin-right: 4.72rpx;
|
margin-right: 4.72rpx;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<!-- <view class="flex-col justify-start items-center group_2"><view class="section_3"></view></view> -->
|
<!-- <view class="flex-col justify-start items-center group_2"><view class="section_3"></view></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col pos_2">
|
<view class="flex-col pos_2">
|
||||||
<view class="flex-col mt-20 list-item" v-for="(item, index) in advanceOrderList" :key="index">
|
<view class="flex-col mt-20 list-item" v-for="(item, index) in advanceOrderList" :key="index" @click="gotoDetailPage(item.id)">
|
||||||
<view class="flex-col">
|
<view class="flex-col">
|
||||||
<view class="flex-row items-center group_3" style="display: flex; justify-content: space-between; align-items: center;">
|
<view class="flex-row items-center group_3" style="display: flex; justify-content: space-between; align-items: center;">
|
||||||
|
|
||||||
|
@ -58,12 +58,12 @@
|
||||||
<image
|
<image
|
||||||
class="image_2"
|
class="image_2"
|
||||||
:src="bookUrl + '/photoProductsOrderDetail/nav.png'"
|
:src="bookUrl + '/photoProductsOrderDetail/nav.png'"
|
||||||
@click="nav"
|
@click.stop="nav"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-between items-baseline self-stretch">
|
<view class="flex-row justify-between items-baseline self-stretch">
|
||||||
<text class="font_9">拍摄人数:{{ item.quantity }}人</text>
|
<text class="font_9">妆造服务:{{ item.isMakeup === 1 ? '本店上妆' : '无需妆造' }}</text>
|
||||||
<text class="font_10 text_12" @click="nav">导航</text>
|
<text class="font_10 text_12" @click.stop="nav">导航</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="mt-8 self-start font_7 text_13">拍摄场地:{{ item.isIndoors == 1 ? '室内' : '室外' }}</text>
|
<text class="mt-8 self-start font_7 text_13">拍摄场地:{{ item.isIndoors == 1 ? '室内' : '室外' }}</text>
|
||||||
|
@ -78,17 +78,18 @@
|
||||||
</view>
|
</view>
|
||||||
<view style="opacity: 0; border: none" v-if="item.orderStatus !== '待支付'" class="ml-10 flex-col justify-start items-center text-wrapper_3">
|
<view style="opacity: 0; border: none" v-if="item.orderStatus !== '待支付'" class="ml-10 flex-col justify-start items-center text-wrapper_3">
|
||||||
</view>
|
</view>
|
||||||
|
<view @click.stop>
|
||||||
<button v-if="item.orderStatus !== '交易关闭'" open-type="contact" bindcontact="handleContact" session-from="sessionFrom" class="flex-col justify-start items-center text-wrapper_2">
|
<button v-if="item.orderStatus !== '交易关闭'" open-type="contact" bindcontact="handleContact" session-from="sessionFrom" class="flex-col justify-start items-center text-wrapper_2">
|
||||||
<text class="font_6 text_15">联系客服</text>
|
<text class="font_6 text_15">联系客服</text>
|
||||||
</button>
|
</button>
|
||||||
<view v-if="item.orderStatus === '交易关闭'" class="ml-10 flex-col justify-start items-center text-wrapper_2" @click="openDeleteBookingOrderPopup(item.id)">
|
</view>
|
||||||
|
<view v-if="item.orderStatus === '交易关闭'" class="ml-10 flex-col justify-start items-center text-wrapper_2" @click.stop="openDeleteBookingOrderPopup(item.id)">
|
||||||
<text class="font_6">删除订单</text>
|
<text class="font_6">删除订单</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.orderStatus === '待支付'" class="ml-10 flex-col justify-start items-center text-wrapper_2" @click="openCancelBookingOrderPopup(item.id)">
|
<view v-if="item.orderStatus === '待支付'" class="ml-10 flex-col justify-start items-center text-wrapper_2" @click.stop="openCancelBookingOrderPopup(item.id)">
|
||||||
<text class="font_6">取消订单</text>
|
<text class="font_6">取消订单</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.orderStatus === '待支付'" @click="wxPay(item.id)" class="ml-10 flex-col justify-start items-center text-wrapper_3">
|
<view v-if="item.orderStatus === '待支付'" @click.stop="wxPay(item.id)" class="ml-10 flex-col justify-start items-center text-wrapper_3">
|
||||||
<text class="font_11 text_16">去付款</text>
|
<text class="font_11 text_16">去付款</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -115,7 +116,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {computed, nextTick, onBeforeUnmount, onMounted, onUnmounted, ref} from 'vue'
|
import {nextTick, onBeforeUnmount, onMounted, onUnmounted, ref} from 'vue'
|
||||||
import { bookUrl } from '../../../common/globalImagesUrl';
|
import { bookUrl } from '../../../common/globalImagesUrl';
|
||||||
import emitter from '../../../utils/emitter';
|
import emitter from '../../../utils/emitter';
|
||||||
import cancelOrderVue from '../component/cancelOrder.vue';
|
import cancelOrderVue from '../component/cancelOrder.vue';
|
||||||
|
@ -135,6 +136,12 @@
|
||||||
getFonts()
|
getFonts()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const gotoDetailPage = (val) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail?id=' + val
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const flushAdvanceOrderListHandler = () => {
|
const flushAdvanceOrderListHandler = () => {
|
||||||
getAdvanceOrder()
|
getAdvanceOrder()
|
||||||
};
|
};
|
||||||
|
@ -255,7 +262,7 @@
|
||||||
},
|
},
|
||||||
complete() {
|
complete() {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/book/photoProductsOrderDetail/photoProductsOrderDetail'
|
url: '/pages/book/myPhotoProductsOrderDetail/myPhotoProductsOrderDetail?id=' + oid
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -426,23 +433,10 @@
|
||||||
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
routerJump('pages/book/photoProducts/photoProducts')
|
// routerJump('/pages/book/myPhotoProductDetail/myPhotoProductDetail')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
//获取字体
|
|
||||||
const getFonts =()=>{
|
|
||||||
uni.loadFontFace({
|
|
||||||
family: 'FangZhengFonts',
|
|
||||||
source: `url("https://carbon2.obs.cn-north-4.myhuaweicloud.com/fonts/FangZhengFonts.TTF")`,
|
|
||||||
success:(res) =>{
|
|
||||||
console.log('success',res);
|
|
||||||
},
|
|
||||||
fail:(err) => {
|
|
||||||
console.log('err',err);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@ -536,13 +530,14 @@ button::after{
|
||||||
}
|
}
|
||||||
.pos_2 {
|
.pos_2 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 37.5rpx;
|
left: 15rpx;
|
||||||
right: 37.5rpx;
|
right: 15rpx;
|
||||||
top: 112.5rpx;
|
top: 100.5rpx;
|
||||||
}
|
}
|
||||||
.list-item {
|
.list-item {
|
||||||
padding: 22.5rpx 0 22.5rpx;
|
padding: 22.5rpx;
|
||||||
background-color: #fffcfa;
|
box-sizing: content-box;
|
||||||
|
background-color: #fff;
|
||||||
border-radius: 18.75rpx;
|
border-radius: 18.75rpx;
|
||||||
}
|
}
|
||||||
.list-item:first-child {
|
.list-item:first-child {
|
||||||
|
@ -620,7 +615,7 @@ button::after{
|
||||||
color: #e79ea1;
|
color: #e79ea1;
|
||||||
}
|
}
|
||||||
.section_4 {
|
.section_4 {
|
||||||
margin: 0 22.5rpx;
|
margin: 0 12.5rpx;
|
||||||
padding: 22.5rpx 18.75rpx;
|
padding: 22.5rpx 18.75rpx;
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
border-radius: 9.38rpx;
|
border-radius: 9.38rpx;
|
||||||
|
@ -680,7 +675,7 @@ button::after{
|
||||||
line-height: 26.7rpx;
|
line-height: 26.7rpx;
|
||||||
}
|
}
|
||||||
.group_9 {
|
.group_9 {
|
||||||
padding: 20.63rpx 22.5rpx 0 150rpx;
|
padding: 20.63rpx 0 0 180rpx;
|
||||||
}
|
}
|
||||||
.text_15 {
|
.text_15 {
|
||||||
line-height: 25.54rpx;
|
line-height: 25.54rpx;
|
||||||
|
@ -691,10 +686,7 @@ button::after{
|
||||||
border-radius: 75rpx;
|
border-radius: 75rpx;
|
||||||
width: 153.75rpx;
|
width: 153.75rpx;
|
||||||
height: 56.25rpx;
|
height: 56.25rpx;
|
||||||
border-left: solid 1.88rpx #e79ea1;
|
border: solid 1.88rpx #e79ea1;
|
||||||
border-right: solid 1.88rpx #e79ea1;
|
|
||||||
border-top: solid 1.88rpx #e79ea1;
|
|
||||||
border-bottom: solid 1.88rpx #e79ea1;
|
|
||||||
}
|
}
|
||||||
.text-wrapper_3 {
|
.text-wrapper_3 {
|
||||||
padding: 15rpx 0;
|
padding: 15rpx 0;
|
||||||
|
|
|
@ -25,44 +25,53 @@
|
||||||
<text class="font_2 text_4 pos">妆造服务</text>
|
<text class="font_2 text_4 pos">妆造服务</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row">
|
<view class="flex-row">
|
||||||
<view :style="styleObj1" class="flex-col justify-start items-center text-wrapper" @click="selectStatus1(true)">
|
<view :style="styleObj1" class="flex-col justify-start items-center text-wrapper" @click="selectStatus(true)">
|
||||||
<text class="font_3 text_5">本店上妆</text>
|
<text :style="fontObj1" class="font_3 text_5">本店上妆</text>
|
||||||
</view>
|
</view>
|
||||||
<view :style="styleObj2" class="flex-col justify-start items-center text-wrapper ml-17" @click="selectStatus(false)">
|
<view :style="styleObj2" class="flex-col justify-start items-center text-wrapper ml-17" @click="selectStatus(false)">
|
||||||
<text class="font_3 text_6">无需妆造</text>
|
<text :style="fontObj2" class="font_3 text_6">无需妆造</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<text class="self-start font_2 text_7">拍摄场地</text>
|
<text class="self-start font_2 text_7">拍摄场地</text>
|
||||||
<view class="flex-row equal-division">
|
|
||||||
<view class="flex-col section equal-division-item">
|
<radio-group class="flex-row equal-division my-radio" @change="changeRadioStatus">
|
||||||
|
|
||||||
|
<view class="flex-col section equal-division-item" v-if="isShow1">
|
||||||
<view class="flex-row justify-between items-end self-stretch">
|
<view class="flex-row justify-between items-end self-stretch">
|
||||||
<image
|
<image
|
||||||
class="image_3"
|
class="image_3"
|
||||||
:src="clothesRentUrl + '/component/indoor.png'"
|
:src="clothesRentUrl + '/component/indoor.png'"
|
||||||
/>
|
/>
|
||||||
<view class="section_2"></view>
|
<!-- <view class="section_2"></view> -->
|
||||||
|
<radio class="section_2" color="#FFB6B9" value="室内" :checked="checked1"></radio>
|
||||||
</view>
|
</view>
|
||||||
<text class="self-start font_3 text_8 mt-5">室内</text>
|
<text class="self-start font_3 text_8 mt-5">室内</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col section equal-division-item ml-19">
|
|
||||||
|
<view class="flex-col section equal-division-item" v-if="isShow2">
|
||||||
<view class="flex-row justify-between items-end self-stretch">
|
<view class="flex-row justify-between items-end self-stretch">
|
||||||
<image
|
<image
|
||||||
class="image_4"
|
class="image_4"
|
||||||
:src="clothesRentUrl + '/component/outdoor.png'"
|
:src="clothesRentUrl + '/component/outdoor.png'"
|
||||||
/>
|
/>
|
||||||
<view class="section_2"></view>
|
<!-- <view class="section_2"></view> -->
|
||||||
|
<radio class="section_2" color="#FFB6B9" value="室外" :checked="checked2"></radio>
|
||||||
</view>
|
</view>
|
||||||
<text class="self-start font_3 text_8 mt-5">室外</text>
|
<text class="self-start font_3 text_8 mt-5">室外</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
</radio-group>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-row justify-between items-center group_5">
|
<view class="flex-row justify-between items-center group_5">
|
||||||
<view class="flex-row items-baseline">
|
<view class="flex-row items-baseline">
|
||||||
<text class="font text_9">定金:</text>
|
<text class="font text_9">定金:</text>
|
||||||
<text class="font text_10">¥{{ photoProductsInfo.price.toFixed(2) }}</text>
|
<text class="font text_10">¥{{ photoProductsInfo.price.toFixed(2) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col justify-start items-center text-wrapper_2"><text class="text_11">确定</text></view>
|
<view @click="gotoSubmitOrderPage" class="flex-col justify-start items-center text-wrapper_2"><text class="text_11">确定</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -72,12 +81,27 @@
|
||||||
import { clothesRentUrl } from '../../../common/globalImagesUrl';
|
import { clothesRentUrl } from '../../../common/globalImagesUrl';
|
||||||
import emitter from '../../../utils/emitter';
|
import emitter from '../../../utils/emitter';
|
||||||
import { publicPath } from '../../../common/globalImagesUrl';
|
import { publicPath } from '../../../common/globalImagesUrl';
|
||||||
let style1 = { color: '#323232', borderColor: '#C3C3C3', backgroundColor: '#fff' }
|
import { dealResult } from '../../../common/globalFunction';
|
||||||
let style2 = { color: '#E79EA1', borderColor: '#FFB6B9', backgroundColor: '#FBDEDF'}
|
import { baseUrl } from '../../../api/request';
|
||||||
|
let style1 = { borderColor: '#FFB6B9', backgroundColor: '#FBDEDF'}
|
||||||
|
let style2 = { borderColor: '#C3C3C3', backgroundColor: '#fff' }
|
||||||
|
|
||||||
|
let fontStyle1 = { color: '#E79EA1' }
|
||||||
|
let fontStyle2 = { color: '#323232' }
|
||||||
|
|
||||||
|
const cookie = wx.getStorageSync('cookie')
|
||||||
|
const isShow1 = ref(true)
|
||||||
|
const isShow2 = ref(true)
|
||||||
|
const checked1 = ref(true)
|
||||||
|
const checked2 = ref(false)
|
||||||
|
|
||||||
const photoProductsInfo = ref({})
|
const photoProductsInfo = ref({})
|
||||||
const styleObj1 = ref({})
|
const styleObj1 = ref(style1)
|
||||||
const styleObj2 = ref({})
|
const styleObj2 = ref(style2)
|
||||||
let point = -1
|
const fontObj1 = ref(fontStyle1)
|
||||||
|
const fontObj2 = ref(fontStyle2)
|
||||||
|
let point = true
|
||||||
|
let scene = '室内'
|
||||||
|
|
||||||
const closePopup = () => {
|
const closePopup = () => {
|
||||||
emitter.emit('closeClothesAttributePlusPopup')
|
emitter.emit('closeClothesAttributePlusPopup')
|
||||||
|
@ -85,11 +109,38 @@
|
||||||
const getPhotoProductsInfoHandler = (val) => {
|
const getPhotoProductsInfoHandler = (val) => {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
photoProductsInfo.value = val
|
photoProductsInfo.value = val
|
||||||
|
if (val.shotScene === '室内') {
|
||||||
|
isShow2.value = false
|
||||||
|
checked1.value = true
|
||||||
|
scene = '室内'
|
||||||
|
} else if (val.shotScene === '室外') {
|
||||||
|
isShow1.value = false
|
||||||
|
checked2.value = true
|
||||||
|
scene = '室外'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeRadioStatus = (e) => {
|
||||||
|
scene = e.detail.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectStatus = (val) => {
|
const selectStatus = (val) => {
|
||||||
if (val && point ) {
|
if (point && !val ) {
|
||||||
|
styleObj1.value = style2
|
||||||
|
styleObj2.value = style1
|
||||||
|
fontObj1.value = fontStyle2
|
||||||
|
fontObj2.value = fontStyle1
|
||||||
|
|
||||||
|
point = !point
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!point && val) {
|
||||||
|
styleObj1.value = style1
|
||||||
|
styleObj2.value = style2
|
||||||
|
fontObj1.value = fontStyle1
|
||||||
|
fontObj2.value = fontStyle2
|
||||||
|
|
||||||
|
point = !point
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,9 +152,37 @@
|
||||||
emitter.off('getPhotoProductsInfo', getPhotoProductsInfoHandler)
|
emitter.off('getPhotoProductsInfo', getPhotoProductsInfoHandler)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const gotoSubmitOrderPage = async () => {
|
||||||
|
let res = await checkPhotoProducts()
|
||||||
|
if (!dealResult(res)) return ;
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/book/photoProductsOrder/photoProductsOrder?isMakeup=' + point + '&scene=' + scene + '&id=' + photoProductsInfo.value.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const checkPhotoProducts = async () => {
|
||||||
|
const res = await uni.request({
|
||||||
|
url: baseUrl + '/advanceOrder/check/photoProducts',
|
||||||
|
method: 'POST',
|
||||||
|
header: {
|
||||||
|
cookie
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
id: photoProductsInfo.value.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.my-radio {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
.ml-13 {
|
.ml-13 {
|
||||||
margin-left: 24.38rpx;
|
margin-left: 24.38rpx;
|
||||||
}
|
}
|
||||||
|
@ -214,17 +293,15 @@
|
||||||
margin: 41.25rpx 15rpx 0;
|
margin: 41.25rpx 15rpx 0;
|
||||||
}
|
}
|
||||||
.section {
|
.section {
|
||||||
flex: 1 1 320.63rpx;
|
position: relative;
|
||||||
|
width: 320.63rpx;
|
||||||
}
|
}
|
||||||
.equal-division-item {
|
.equal-division-item {
|
||||||
padding: 18.75rpx 22.5rpx;
|
padding: 18.75rpx 22.5rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 18.75rpx;
|
border-radius: 18.75rpx;
|
||||||
height: 157.5rpx;
|
height: 157.5rpx;
|
||||||
border-left: solid 1.88rpx #c3c3c3;
|
border: solid 1.88rpx #c3c3c3;
|
||||||
border-right: solid 1.88rpx #c3c3c3;
|
|
||||||
border-top: solid 1.88rpx #c3c3c3;
|
|
||||||
border-bottom: solid 1.88rpx #c3c3c3;
|
|
||||||
}
|
}
|
||||||
.image_3 {
|
.image_3 {
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
@ -238,10 +315,6 @@
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 45rpx;
|
width: 45rpx;
|
||||||
height: 45rpx;
|
height: 45rpx;
|
||||||
border-left: solid 1.88rpx #c3c3c3;
|
|
||||||
border-right: solid 1.88rpx #c3c3c3;
|
|
||||||
border-top: solid 1.88rpx #c3c3c3;
|
|
||||||
border-bottom: solid 1.88rpx #c3c3c3;
|
|
||||||
}
|
}
|
||||||
.text_8 {
|
.text_8 {
|
||||||
margin-left: 45rpx;
|
margin-left: 45rpx;
|
||||||
|
|
|
@ -592,10 +592,7 @@ button::after{
|
||||||
margin-right: 11.25rpx;
|
margin-right: 11.25rpx;
|
||||||
padding: 3.75rpx 0;
|
padding: 3.75rpx 0;
|
||||||
border-radius: 9.38rpx;
|
border-radius: 9.38rpx;
|
||||||
border-left: solid 1.88rpx #ffffff;
|
border: solid 1.88rpx #ffffff;
|
||||||
border-right: solid 1.88rpx #ffffff;
|
|
||||||
border-top: solid 1.88rpx #ffffff;
|
|
||||||
border-bottom: solid 1.88rpx #ffffff;
|
|
||||||
}
|
}
|
||||||
.text_14 {
|
.text_14 {
|
||||||
margin-right: 7.5rpx;
|
margin-right: 7.5rpx;
|
||||||
|
@ -623,10 +620,7 @@ button::after{
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
width: 65.63rpx;
|
width: 65.63rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
border-left: solid 0.94rpx #d1d1d1;
|
border: solid 0.94rpx #d1d1d1;
|
||||||
border-right: solid 0.94rpx #d1d1d1;
|
|
||||||
border-top: solid 0.94rpx #d1d1d1;
|
|
||||||
border-bottom: solid 0.94rpx #d1d1d1;
|
|
||||||
}
|
}
|
||||||
.font_8 {
|
.font_8 {
|
||||||
font-size: 22.5rpx;
|
font-size: 22.5rpx;
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
let isShow = ref(false)
|
let isShow = ref(false)
|
||||||
const bkgUrl = ref(myOrderUrl + '/myOrderList/bkg.png')
|
const bkgUrl = ref(myOrderUrl + '/myOrderList/bkg.png')
|
||||||
|
|
||||||
const flushOrderList = () => {
|
const flushOrderListHandler = () => {
|
||||||
getMyOrder()
|
getMyOrder()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
} else {
|
} else {
|
||||||
getMyOrder()
|
getMyOrder()
|
||||||
}
|
}
|
||||||
emitter.on('flushOrderList', flushOrderList)
|
emitter.on('flushOrderList', flushOrderListHandler)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
} else {
|
} else {
|
||||||
getMyOrder()
|
getMyOrder()
|
||||||
}
|
}
|
||||||
emitter.on('flushOrderList', flushOrderList)
|
emitter.on('flushOrderList', flushOrderListHandler)
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.stopPullDownRefresh() //停止下拉刷新
|
uni.stopPullDownRefresh() //停止下拉刷新
|
||||||
},1000)
|
},1000)
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
emitter.off('flushOrderList', flushOrderList)
|
emitter.off('flushOrderList', flushOrderListHandler)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user