预订 bug 修复
Showing
4 changed files
with
21 additions
and
34 deletions
| ... | @@ -47,8 +47,8 @@ | ... | @@ -47,8 +47,8 @@ |
| 47 | <h3 class="name flex">{{ r.carType }} | 47 | <h3 class="name flex">{{ r.carType }} |
| 48 | <div class="tagbox"> | 48 | <div class="tagbox"> |
| 49 | <span class="tag">{{r.carColor}}</span> | 49 | <span class="tag">{{r.carColor}}</span> |
| 50 | <span class="tag" v-show="r.checkOut==1">可送车</span> | 50 | <span class="tag" v-show="r.checkOut==1">{{ language==0?'可送车':'drop-off' }}</span> |
| 51 | <span class="tag" v-show="r.checkIn==1">可接车</span> | 51 | <span class="tag" v-show="r.checkIn==1">{{ language==0?'可接车':'pick-up' }}</span> |
| 52 | </div> | 52 | </div> |
| 53 | </h3> | 53 | </h3> |
| 54 | <div class="text-gray mt20"> | 54 | <div class="text-gray mt20"> | ... | ... |
| ... | @@ -3,10 +3,8 @@ | ... | @@ -3,10 +3,8 @@ |
| 3 | <div class="box"> | 3 | <div class="box"> |
| 4 | <el-card class="mt30" v-loading="loading"> | 4 | <el-card class="mt30" v-loading="loading"> |
| 5 | <el-row v-if="form" class="hotel" align="middle" :gutter="20"> | 5 | <el-row v-if="form" class="hotel" align="middle" :gutter="20"> |
| 6 | <!-- <el-col :span="6">--> | 6 | |
| 7 | <!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>--> | 7 | <el-col :lg="16" :sm="24"> |
| 8 | <!-- </el-col>--> | ||
| 9 | <el-col :span="16"> | ||
| 10 | <h3 class="esp flex">{{ form?.name }} | 8 | <h3 class="esp flex">{{ form?.name }} |
| 11 | </h3> | 9 | </h3> |
| 12 | 10 | ||
| ... | @@ -18,25 +16,18 @@ | ... | @@ -18,25 +16,18 @@ |
| 18 | {{ form?.addName }} | 16 | {{ form?.addName }} |
| 19 | </p> | 17 | </p> |
| 20 | </el-col> | 18 | </el-col> |
| 19 | <el-col :lg="8" :sm="24"> | ||
| 20 | <el-carousel height="120px"> | ||
| 21 | <el-carousel-item v-for="item in form.photos?.split(',')" :key="item"> | ||
| 22 | <el-image class="w100 h100" fit="contain" :src="fillImgUrl(item)"/> | ||
| 23 | </el-carousel-item> | ||
| 24 | </el-carousel> | ||
| 25 | </el-col> | ||
| 21 | </el-row> | 26 | </el-row> |
| 22 | <el-empty v-else :image="`/img/order_no.png`" :image-size="228" description=""/> | 27 | <el-empty v-else :image="`/img/order_no.png`" :image-size="228" description=""/> |
| 23 | </el-card> | 28 | </el-card> |
| 24 | 29 | ||
| 25 | <div class="mt30"> | 30 | <div class="mt30"> |
| 26 | <el-row :gutter="20"> | ||
| 27 | <el-col :span="10"> | ||
| 28 | <div class="imgbox hotelImg"> | ||
| 29 | <el-image :src="fillImgUrl(form?.photos?.split(',')[0])" fit="cover" :preview-src-list="form?.photos?.split(',')"/> | ||
| 30 | </div> | ||
| 31 | </el-col> | ||
| 32 | <el-col :span="14"> | ||
| 33 | <el-row class="h100" :gutter="20"> | ||
| 34 | <el-col :span="8" v-for="(p,index) in form?.photos?.split(',').slice(1,7)" style="height: calc(50% - 10px)"> | ||
| 35 | <div class="imgbox hotelImg"><el-image :src="fillImgUrl(p)" fit="cover" :preview-src-list="form?.photos?.split(',')"/></div> | ||
| 36 | </el-col> | ||
| 37 | </el-row> | ||
| 38 | </el-col> | ||
| 39 | </el-row> | ||
| 40 | </div> | 31 | </div> |
| 41 | 32 | ||
| 42 | <el-card class="mt30 mb60"> | 33 | <el-card class="mt30 mb60"> |
| ... | @@ -57,8 +48,8 @@ | ... | @@ -57,8 +48,8 @@ |
| 57 | <h3 class="name">{{ r.name }}<span class="text-primary">({{ r.categoryName }})</span></h3> | 48 | <h3 class="name">{{ r.name }}<span class="text-primary">({{ r.categoryName }})</span></h3> |
| 58 | <el-row :gutter="10"> | 49 | <el-row :gutter="10"> |
| 59 | <el-col :span="24"> | 50 | <el-col :span="24"> |
| 60 | <p>{{ language==0?'配送时间':'Delivery time' }}:{{ r.psStart }}~{{ r.psEnd }}</p> | 51 | <p>{{ language == 0 ? '配送时间' : 'Delivery time' }}:{{ r.psStart }}~{{ r.psEnd }}</p> |
| 61 | <p>{{ language==0?'配送地址':'Delivery address' }}:{{ r.address }}</p> | 52 | <p>{{ language == 0 ? '配送地址' : 'Delivery address' }}:{{ r.address }}</p> |
| 62 | </el-col> | 53 | </el-col> |
| 63 | </el-row> | 54 | </el-row> |
| 64 | </el-col> | 55 | </el-col> |
| ... | @@ -83,9 +74,9 @@ | ... | @@ -83,9 +74,9 @@ |
| 83 | </template> | 74 | </template> |
| 84 | 75 | ||
| 85 | <script setup> | 76 | <script setup> |
| 86 | import {useRouter,useRoute} from "vue-router"; | 77 | import {useRouter, useRoute} from "vue-router"; |
| 87 | import {ref, onMounted} from "vue"; | 78 | import {ref, onMounted} from "vue"; |
| 88 | import { getMenuById} from "@/apiPc/booking" | 79 | import {getMenuById} from "@/apiPc/booking" |
| 89 | import {useStorage} from "@vueuse/core/index"; | 80 | import {useStorage} from "@vueuse/core/index"; |
| 90 | import useUserStore from "@/store/modules/user"; | 81 | import useUserStore from "@/store/modules/user"; |
| 91 | import {fillImgUrl} from "@/utils/ruoyi"; | 82 | import {fillImgUrl} from "@/utils/ruoyi"; |
| ... | @@ -118,7 +109,7 @@ function getData() { | ... | @@ -118,7 +109,7 @@ function getData() { |
| 118 | var arr = [] | 109 | var arr = [] |
| 119 | m.photosList = [] | 110 | m.photosList = [] |
| 120 | arr = m.photos?.split(',') | 111 | arr = m.photos?.split(',') |
| 121 | for (var a of arr){ | 112 | for (var a of arr) { |
| 122 | m.photosList.push(fillImgUrl(a)) | 113 | m.photosList.push(fillImgUrl(a)) |
| 123 | } | 114 | } |
| 124 | m.num = 0 | 115 | m.num = 0 |
| ... | @@ -135,7 +126,7 @@ function getData() { | ... | @@ -135,7 +126,7 @@ function getData() { |
| 135 | 126 | ||
| 136 | function goOrder(n) { | 127 | function goOrder(n) { |
| 137 | if (!user) { | 128 | if (!user) { |
| 138 | useUserStore().setReLogin() | 129 | useUserStore().setVisitor() |
| 139 | return | 130 | return |
| 140 | } | 131 | } |
| 141 | router.push({ | 132 | router.push({ | ... | ... |
| ... | @@ -113,6 +113,7 @@ const canOrderNum = ref(0) | ... | @@ -113,6 +113,7 @@ const canOrderNum = ref(0) |
| 113 | const form = ref({ | 113 | const form = ref({ |
| 114 | num: 1, | 114 | num: 1, |
| 115 | phone: user.phonenumber||'', | 115 | phone: user.phonenumber||'', |
| 116 | total:0 | ||
| 116 | }) | 117 | }) |
| 117 | const rzRange = ref([]) | 118 | const rzRange = ref([]) |
| 118 | const rzUserArr = ref([]) | 119 | const rzUserArr = ref([]) |
| ... | @@ -126,11 +127,7 @@ onMounted(() => { | ... | @@ -126,11 +127,7 @@ onMounted(() => { |
| 126 | food.value = JSON.parse(decodeURIComponent(route.query.food)) | 127 | food.value = JSON.parse(decodeURIComponent(route.query.food)) |
| 127 | form.value = food.value | 128 | form.value = food.value |
| 128 | restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant)) | 129 | restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant)) |
| 129 | if(language.value == 0){ | 130 | form.value.total = 0 |
| 130 | form.value.total = food.value.foodPrice | ||
| 131 | } else { | ||
| 132 | form.value.total = food.value.foodPriceEn | ||
| 133 | } | ||
| 134 | console.log(food.value,restaurant.value) | 131 | console.log(food.value,restaurant.value) |
| 135 | initDays() | 132 | initDays() |
| 136 | const today = dayjs() | 133 | const today = dayjs() | ... | ... |
| ... | @@ -82,9 +82,8 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -82,9 +82,8 @@ export default defineConfig(({ mode, command }) => { |
| 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 83 | }, | 83 | }, |
| 84 | '/dev-api': { | 84 | '/dev-api': { |
| 85 | target: 'http://192.168.1.118:8081/', | 85 | // target: 'http://192.168.1.118:8081/', |
| 86 | // target: 'https://jijin.wtwuxicenter.com/stage-api', | 86 | target: 'https://jijin.wtwuxicenter.com/stage-api', |
| 87 | // target: 'https://jijin.wtwuxicenter.com/stage-api', | ||
| 88 | changeOrigin: true, | 87 | changeOrigin: true, |
| 89 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 88 | rewrite: (p) => p.replace(/^\/dev-api/, '') |
| 90 | } | 89 | } | ... | ... |
-
Please register or sign in to post a comment