this is lastest update 3.27

This commit is contained in:
chen-xin-zhi 2025-03-27 14:01:00 +08:00
parent 9ff3350729
commit 53f03a5893
3 changed files with 1 additions and 646 deletions

View File

@ -77,13 +77,7 @@
}
},
{
"path": "pages/book/photoProductDetail/photoProductDetail",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/book/photoProducts/photoProducts",
"path": "pages/book/myPhotoProductDetail/myPhotoProductDetail",
"style": {
"navigationBarTitleText": ""
}
@ -243,24 +237,11 @@
"enablePullDownRefresh": true //
}
},
{
"path": "pages/book/myPhotoProductDetail/myPhotoProductDetail",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/book/myPhotoProducts/myPhotoProducts",
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "pages/testPage/testPage",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"plugins": {

View File

@ -1,293 +0,0 @@
<template>
<view class="flex-col justify-start relative page" :style="{ backgroundImage: 'url(' + bkgPubilcPath + ')'}">
<view class="section" :style="{ backgroundImage: 'url(' + bkgPubilcPath + ')'}"></view>
<image
class="image pos" mode="aspectFill"
:src="publicPath + obj.introImg"
/>
<view class="flex-col items-start section_2 pos_2">
<text class="font text">{{ obj.name }}</text>
<text class="mt-18 font text_2">{{ obj.totalAmountPrice.toFixed(2) }}</text>
</view>
<text class="font_2 pos_3">服务&交付标准</text>
<view class="flex-row equal-division">
<view class="flex-col items-center group equal-division-item">
<image
class="image_2"
:src="bookUrl + '/photoProductDetail/zx.png'"
/>
<text class="font_3 mt-11">1组造型</text>
</view>
<view class="ml-38 flex-col items-center group equal-division-item">
<image
class="image_2"
:src="bookUrl + '/photoProductDetail/fz.png'"
/>
<text class="font_3 mt-11">1套服装</text>
</view>
<view class="ml-38 flex-col items-center group equal-division-item">
<image
class="image_2"
:src="bookUrl + '/photoProductDetail/bj.png'"
/>
<text class="font_3 mt-11">1种背景</text>
</view>
</view>
<image
class="image_3 pos_4"
src="https://ide.code.fun/api/image?token=67be7f674ae84d0012275313&name=6697ed477f5159bddd4ba87ba7ccd849.png"
/>
<text class="font_2 text_3 pos_5">产品详情</text>
<text class="font_2 text_4 pos_6">服务说明</text>
<image
class="image_4 pos_7" mode="aspectFill"
:src="publicPath + obj.detailImg"
/>
<view class="flex-col justify-start items-end section_3 pos_8">
<view class="flex-col justify-start items-center text-wrapper" @click="openBookingPopup">
<text class="font_3 text_5">立即预约</text></view>
</view>
</view>
<uni-popup ref="bookingSelected" :maskClick="false">
<view class="book-selected">
<bookingSelectedVue></bookingSelectedVue>
</view>
</uni-popup>
</template>
<script setup>
import { onLoad } from "@dcloudio/uni-app";
import {nextTick, onMounted, onUnmounted, ref} from 'vue'
import emitter from "../../../utils/emitter";
import bookingSelectedVue from "../component/bookingSelected.vue";
import { baseUrl } from "../../../api/request";
import { bookUrl,bkgPubilcPath } from "../../../common/globalImagesUrl";
import { getFonts } from '../../../common/globalFont';
import { publicPath } from "../../../common/globalImagesUrl";
const cookie = wx.getStorageSync("cookie") //
const id = ref({})
const bookingSelected = ref(null)
const obj = ref({})
const type = ref('')
const bookingDateVOList = ref([])
const bkgUrl = ref(bookUrl + '/photoProductDetail/bkg.png')
onLoad((options) => {
getFonts()
console.log(options)
id.value = options.id
if (options.type) {
type.value = options.type
}
getPhotoProductsById()
})
const closeBookingPopupHandler = () => {
nextTick(() => {
if (bookingSelected.value) {
bookingSelected.value.close()
}
})
}
onMounted(() => {
emitter.on('closeBookingPopup', closeBookingPopupHandler)
})
onUnmounted(() => {
emitter.off('closeBookingPopup', closeBookingPopupHandler)
})
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
obj.value.totalAmountPrice = obj.value.minNumber * obj.value.price
bookingDateVOList.value = res.data.data.bookingDateVOList
}
const openBookingPopup = () => {
if (bookingDateVOList.value.length === 0) {
uni.showModal({
title: '提示',
content: '当前写真产品的所有时段已约满',
showCancel: false
})
return ;
}
emitter.emit('getProductObj', obj.value)
emitter.emit('getProductsType', type.value)
bookingSelected.value.open('bottom')
}
</script>
<style lang="scss" scoped>
.book-selected {
height: 1100rpx;
justify-content: center;
background-color: #fff;
border-radius: 20rpx 20rpx 0 0;
}
.mt-11 {
margin-top: 20.63rpx;
}
.page {
background-color: #ffffff;
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
}
.section {
background-size: 100% 100%;
background-repeat: no-repeat;
width: 750rpx;
height: 2726.25rpx;
}
.image {
width: 100vw;
height: 106vw;
}
.pos {
position: absolute;
left: 0;
right: 0;
top: 0;
}
.section_2 {
padding: 37.5rpx 56.25rpx 41.25rpx;
background-color: #ebe6e3;
border-radius: 18.75rpx;
box-shadow: 0rpx 7.5rpx 7.5rpx #04040440;
}
.pos_2 {
position: absolute;
left: 22.5rpx;
right: 22.5rpx;
top: 750rpx;
}
.font {
font-size: 45rpx;
font-family: FangZhengFonts;
color: #323232;
}
.text {
line-height: 43.76rpx;
}
.text_2 {
margin-left: 7.5rpx;
line-height: 40.26rpx;
}
.font_2 {
font-size: 37.5rpx;
font-family: FangZhengFonts;
line-height: 36.34rpx;
color: #323232;
}
.pos_3 {
position: absolute;
left: 29.74rpx;
top: 1003.65rpx;
}
.equal-division {
position: absolute;
left: 0;
right: 0;
top: 1077.51rpx;
}
.image_2 {
width: 128.01rpx;
height: 128.01rpx;
}
.font_3 {
font-size: 30rpx;
font-family: FangZhengFonts;
line-height: 27.3rpx;
color: #323232;
}
.group {
flex: 1 1 202.5rpx;
}
.equal-division-item {
padding: 11.25rpx 0;
}
.image_3 {
width: 256.88rpx;
height: 76.88rpx;
}
.pos_4 {
position: absolute;
left: 116.25rpx;
top: 1280.63rpx;
}
.text_3 {
line-height: 36.62rpx;
}
.pos_5 {
position: absolute;
left: 106.61rpx;
top: 50%;
transform: translateY(-50%);
}
.text_4 {
line-height: 35.89rpx;
}
.pos_6 {
position: absolute;
right: 103.39rpx;
top: 50%;
transform: translateY(-50%);
}
.image_4 {
width: 100vw;
height: 150vw;
}
.pos_7 {
position: absolute;
left: 0;
right: 0;
bottom: 183.75rpx;
}
.section_3 {
padding: 18.75rpx 0;
background-color: #ffffff;
}
.pos_8 {
position: fixed;
left: 0;
right: 0;
bottom: 0;
margin: 0 auto;
}
.text-wrapper {
margin-right: 11.25rpx;
padding: 26.25rpx 0;
background-color: #ffb6b9;
border-radius: 187.5rpx;
width: 241.88rpx;
}
.text_5 {
color: #ffffff;
line-height: 27.43rpx;
}
@import url(../../../common/css/global.css);
</style>

View File

@ -1,333 +0,0 @@
<template>
<view class="flex-col justify-start relative page" :style="{ backgroundImage: 'url(' + bkgPubilcPath + ')' }">
<view class="section" :style="{ backgroundImage: 'url(' + bkgPubilcPath + ')'}"></view>
<view class="flex-row equal-division">
<view class="flex-col items-center equal-division-item">
<image
class="image"
:src="bookUrl + '/photoProducts/type1.png'"
/>
<text class="font text_1 mt-7">写真专区</text>
</view>
<view class="flex-col items-center equal-division-item_2 ml-48" @click="jumpNextToDetail('摄影')">
<image
class="image"
:src="bookUrl + '/photoProducts/type2.png'"
/>
<text class="font mt-7">摄影服务</text>
</view>
<view class="flex-col items-center equal-division-item_3 ml-48" @click="jumpNextToDetail('妆造')">
<image
class="image"
:src="bookUrl + '/photoProducts/type3.png'"
/>
<text class="font mt-4">妆造服务</text>
</view>
</view>
<view class="divider pos"></view>
<view class="flex-col justify-start section_2 pos_2">
<view class="flex-col">
<view
class="flex-col justify-start items-center relative list-item mt-16" @click="isSelected(item, index)" :style="asideStyle[index]"
v-for="(item, index) in categoryList"
:key="index"
>
<text class="font_2 text_2">{{ item.name }}</text>
</view>
</view>
</view>
<text class="font_2 text pos_3">{{ categoryName }}</text>
<view class="flex-col group pos_4">
<view class="flex-row justify-between relative list-item_2 mt-13" @click="jumpToDetail(item.id)"
v-for="(item, index) in photoProducts" :key="index">
<view class="flex-row self-center">
<image
class="image_2" mode="aspectFill"
:src="publicPath + item.introImg"
/>
<view class="flex-col items-start ml-12">
<text class="font_2 text_3">{{ item.name }}</text>
<text class="font_2 text_4 mt-32">{{ item.totalAmountPrice.toFixed(2) }}元起</text>
</view>
</view>
<view class="flex-col justify-start items-center self-start text-wrapper_2">
<text class="font_3">立即预约</text>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import {onMounted, ref} from 'vue'
import { baseUrl } from '../../../api/request';
import { bookUrl,bkgPubilcPath } from '../../../common/globalImagesUrl';
import { onLoad } from "@dcloudio/uni-app";
import { getFonts } from '../../../common/globalFont';
import { publicPath } from '../../../common/globalImagesUrl';
const cookie = wx.getStorageSync("cookie") //
const categoryList = ref([])
const photoProducts = ref([])
const asideStyle = ref([])
const categoryId = ref(0)
const categoryName = ref('')
const ids = ref([])
const point = ref(0)
onLoad(() => {
getFonts()
})
onMounted( async () => {
await getAllCategory()
await getPhotoProductsByCategoryId(categoryName.value)
getSpecialIds()
})
const getSpecialIds = async () => {
const res = await uni.request({
url: baseUrl + '/photoProducts/special/get',
method: 'POST',
header: {
cookie
}
})
ids.value = res.data.data
}
const isSelected = (item:any, index:any) => {
if (categoryId.value === item.id) return
categoryId.value = item.id
categoryName.value = item.name
for (var i = 0; i < asideStyle.value.length; i ++ ) {
if (i == index) {
asideStyle.value[i].backgroundColor = '#FFB6B9'
} else {
asideStyle.value[i].backgroundColor = '#ffb6b936'
}
}
getPhotoProductsByCategoryId(categoryName.value)
}
const getAllCategory = async () => {
const res = await uni.request({
url: baseUrl + '/photoCategory/list/users',
method: 'POST',
header: {
cookie
}
})
categoryList.value = res.data.data
categoryName.value = res.data.data[0].name
asideStyle.value = Array(categoryList.value.length).fill(null).map(() => ({
backgroundColor: '#ffb6b936'
}))
asideStyle.value[0].backgroundColor = '#FFB6B9'
}
const getPhotoProductsByCategoryId = async (val:any) => {
const res = await uni.request({
url: baseUrl + '/photoCategory/list/type',
method: 'POST',
header: {
cookie
},
data: {
type: val
}
})
photoProducts.value = res.data.data
console.log(photoProducts.value)
for (var i = 0; i < photoProducts.value.length; i ++ ) {
let minNumber = photoProducts.value[i].minNumber
let price = photoProducts.value[i].price
photoProducts.value[i].totalAmountPrice = minNumber * price
}
}
const jumpToDetail = (val:any) => {
uni.navigateTo({
url: '../photoProductDetail/photoProductDetail?id=' + val
})
}
const jumpNextToDetail = async (type:any) => {
await getSpecialIds()
if (type === '摄影') {
point.value = ids.value[0]
} else {
point.value = ids.value[1]
}
if (point.value === 0) {
uni.showModal({
title: '提示',
content: '当前写真产品未上架',
showCancel: false
})
return ;
}
uni.navigateTo({
url: '../photoProductDetail/photoProductDetail?id=' + point.value + "&type=" + type
})
}
</script>
<style scoped lang="scss">
.mt-7 {
margin-top: 13.13rpx;
}
.mt-13 {
margin-top: 24.38rpx;
}
.page {
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100vh;
}
.section {
background-size: 100% 100%;
background-repeat: no-repeat;
width: 750rpx;
}
.equal-division {
position: absolute;
left: 12.32rpx;
right: 22.61rpx;
top: 8.76rpx;
}
.equal-division-item {
padding: 8.25rpx 0 9.99rpx;
}
.image {
width: 176.01rpx;
height: 176.01rpx;
}
.font {
font-size: 30rpx;
font-family: FangZhengFonts;
line-height: 28.71rpx;
color: #323232;
}
.text_1 {
line-height: 29.18rpx;
}
.equal-division-item_2 {
padding: 8.25rpx 0 10.35rpx;
}
.equal-division-item_3 {
padding: 8.25rpx 0 17.85rpx;
}
.divider {
background-color: #a1a1a1;
height: 1.88rpx;
}
.pos {
position: absolute;
left: 30rpx;
right: 33.77rpx;
top: 273.75rpx;
}
.section_2 {
padding-bottom: 40rpx;
// background-color: #ffffff96;
border-radius: 18.75rpx 18.75rpx 0rpx 0rpx;
// box-shadow: 0rpx 7.5rpx 7.5rpx #32323240;
width: 159.38rpx;
height: 1140rpx;
overflow-y: auto;
}
.pos_2 {
position: absolute;
left: 0;
top: 309.38rpx;
}
/* 隐藏滚动条,但仍然允许滚动 */
::-webkit-scrollbar {
display: none;
}
.list-item {
padding: 47.94rpx 0 49.93rpx;
background-color: #ffb6b936;
border-radius: 18.75rpx;
box-shadow: 0rpx 7.5rpx 7.5rpx #5a5a5a40;
width: 159.38rpx;
}
.list-item:first-child {
margin-top: 0;
}
.font_2 {
font-size: 26.25rpx;
font-family: FangZhengFonts;
line-height: 25.16rpx;
color: #323232;
}
.text_2 {
line-height: 24rpx;
}
.text {
font-size: 28.13rpx;
line-height: 25.71rpx;
}
.pos_3 {
position: absolute;
left: 180.77rpx;
top: 312.66rpx;
}
.group {
width: 555rpx;
height: 1050rpx;
padding-bottom: 40rpx;
overflow-y: auto;
}
.pos_4 {
position: absolute;
right: 15rpx;
top: 360rpx;
}
.list-item_2 {
padding: 31.88rpx 20.63rpx 27.58rpx;
background-color: #ffffff96;
border-radius: 18.75rpx;
box-shadow: 0rpx 7.5rpx 7.5rpx #32323240;
}
.list-item_2:first-child {
margin-top: 0;
}
.image_2 {
margin-bottom: 2.42rpx;
width: 99.38rpx;
height: 108.75rpx;
}
.text_3 {
line-height: 25.54rpx;
}
.text_4 {
font-size: 28.13rpx;
}
.text-wrapper_2 {
margin-right: 5.63rpx;
margin-top: 50.63rpx;
padding: 14.91rpx 0 16.71rpx;
background-color: #ffb6b9;
border-radius: 28.13rpx;
width: 108.75rpx;
height: 48.75rpx;
}
.font_3 {
font-size: 18.75rpx;
font-family: FangZhengFonts;
line-height: 17.14rpx;
color: #ffffff;
}
@import url(../../../common/css/global.css);
</style>