Showing
3 changed files
with
37 additions
and
14 deletions
| ... | @@ -2,10 +2,11 @@ | ... | @@ -2,10 +2,11 @@ |
| 2 | VITE_BASE = / | 2 | VITE_BASE = / |
| 3 | 3 | ||
| 4 | # 测试open-id | 4 | # 测试open-id |
| 5 | -VITE_OPENID = api-test-openid | 5 | +# VITE_OPENID = api-test-openid |
| 6 | # VITE_OPENID = o8BRf1gLDWieH3Y3JvbrI_4IjaME | 6 | # VITE_OPENID = o8BRf1gLDWieH3Y3JvbrI_4IjaME |
| 7 | # VITE_OPENID = oJLZq5t9PIKLW9tm1oSUNAuPwssA | 7 | # VITE_OPENID = oJLZq5t9PIKLW9tm1oSUNAuPwssA |
| 8 | # VITE_OPENID = oJLZq5uT_6GwIh2tQWh1F9IoHZ3U | 8 | # VITE_OPENID = oJLZq5uT_6GwIh2tQWh1F9IoHZ3U |
| 9 | +VITE_OPENID = o5CsxuF5AfUirRn4VUwaCSNZrUoM | ||
| 9 | # VITE_OPENID = | 10 | # VITE_OPENID = |
| 10 | 11 | ||
| 11 | # B端账号 | 12 | # B端账号 |
| ... | @@ -15,8 +16,8 @@ VITE_ID = 13761653761 | ... | @@ -15,8 +16,8 @@ VITE_ID = 13761653761 |
| 15 | VITE_PIN = | 16 | VITE_PIN = |
| 16 | 17 | ||
| 17 | # 反向代理服务器地址 | 18 | # 反向代理服务器地址 |
| 18 | -VITE_PROXY_TARGET = https://oa-dev.onwall.cn | 19 | +# VITE_PROXY_TARGET = https://oa-dev.onwall.cn |
| 19 | -# VITE_PROXY_TARGET = http://oa.onwall.cn | 20 | +VITE_PROXY_TARGET = http://oa.onwall.cn |
| 20 | 21 | ||
| 21 | # PC端地址 | 22 | # PC端地址 |
| 22 | VITE_MOBILE_URL = http://localhost:5173/ | 23 | VITE_MOBILE_URL = http://localhost:5173/ | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-01-16 10:06:47 | 2 | * @Date: 2024-01-16 10:06:47 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-24 17:44:15 | 4 | + * @LastEditTime: 2024-01-25 16:10:17 |
| 5 | * @FilePath: /xysBooking/src/components/qrCode.vue | 5 | * @FilePath: /xysBooking/src/components/qrCode.vue |
| 6 | - * @Description: 文件描述 | 6 | + * @Description: 预约码卡组件 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <div class="qr-code-page"> | 9 | <div class="qr-code-page"> |
| ... | @@ -20,7 +20,9 @@ | ... | @@ -20,7 +20,9 @@ |
| 20 | </div> | 20 | </div> |
| 21 | <div class="center"> | 21 | <div class="center"> |
| 22 | <img :src="userList[select_index].qr_code_url "> | 22 | <img :src="userList[select_index].qr_code_url "> |
| 23 | - <div v-if="useStatus === '7'" class="qrcode-used"><p>二维码{{ qr_code_status[useStatus] }}</p></div> | 23 | + <div v-if="useStatus === STATUS_CODE.CANCELED || useStatus === STATUS_CODE.USED" class="qrcode-used"> |
| 24 | + <p>二维码{{ qr_code_status[useStatus] }}</p> | ||
| 25 | + </div> | ||
| 24 | </div> | 26 | </div> |
| 25 | <div class="right" @click="nextCode"> | 27 | <div class="right" @click="nextCode"> |
| 26 | <img src="https://cdn.ipadbiz.cn/xys/booking/%E5%8F%B3@2x.png"> | 28 | <img src="https://cdn.ipadbiz.cn/xys/booking/%E5%8F%B3@2x.png"> |
| ... | @@ -134,6 +136,13 @@ const qr_code_status = { | ... | @@ -134,6 +136,13 @@ const qr_code_status = { |
| 134 | '7': '已使用' | 136 | '7': '已使用' |
| 135 | }; | 137 | }; |
| 136 | 138 | ||
| 139 | +const STATUS_CODE = { | ||
| 140 | + APPLY: '1', | ||
| 141 | + SUCCESS: '3', | ||
| 142 | + CANCELED: '5', | ||
| 143 | + USED: '7' | ||
| 144 | +}; | ||
| 145 | + | ||
| 137 | const refreshBtn = async () => { | 146 | const refreshBtn = async () => { |
| 138 | const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code }); | 147 | const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code }); |
| 139 | if (code) { | 148 | if (code) { |
| ... | @@ -200,7 +209,7 @@ onMounted(async () => { | ... | @@ -200,7 +209,7 @@ onMounted(async () => { |
| 200 | // 定义轮询函数 | 209 | // 定义轮询函数 |
| 201 | const poll = async () => { | 210 | const poll = async () => { |
| 202 | // 二维码未使用不停轮询接口 | 211 | // 二维码未使用不停轮询接口 |
| 203 | - if (userList.value.length && useStatus.value !== '7') { | 212 | + if (userList.value.length && (useStatus.value !== STATUS_CODE.CANCELED || useStatus === STATUS_CODE.USED)) { |
| 204 | const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code }); | 213 | const { code, data } = await qrcodeStatusAPI({ qr_code: userList.value[select_index.value].qr_code }); |
| 205 | if (code) { | 214 | if (code) { |
| 206 | useStatus.value = data.status; | 215 | useStatus.value = data.status; | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-01-24 16:38:13 | 2 | * @Date: 2024-01-24 16:38:13 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-25 15:13:04 | 4 | + * @LastEditTime: 2024-01-25 16:08:56 |
| 5 | * @FilePath: /xysBooking/src/components/reserveCard.vue | 5 | * @FilePath: /xysBooking/src/components/reserveCard.vue |
| 6 | - * @Description: 文件描述 | 6 | + * @Description: 预约记录卡组件 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <div class="booking-list-item" @click="goToDetail(props.data)"> | 9 | <div class="booking-list-item" @click="goToDetail(props.data)"> |
| ... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
| 13 | </div> | 13 | </div> |
| 14 | <div class="booking-list-item-body"> | 14 | <div class="booking-list-item-body"> |
| 15 | <div class="booking-num"> | 15 | <div class="booking-num"> |
| 16 | - <div class="num-body">预约人数:<span>{{ props.data.total_qty }} 人</span></div> | 16 | + <div class="num-body van-ellipsis">预约人数:<span>{{ props.data.total_qty }} 人</span> <span>({{ props.data.person_name }})</span></div> |
| 17 | <div v-if="(props.data.status === CodeStatus.SUCCESS || props.data.status === CodeStatus.USED || props.data.status === CodeStatus.CANCEL)"> | 17 | <div v-if="(props.data.status === CodeStatus.SUCCESS || props.data.status === CodeStatus.USED || props.data.status === CodeStatus.CANCEL)"> |
| 18 | <van-icon name="arrow" /> | 18 | <van-icon name="arrow" /> |
| 19 | </div> | 19 | </div> |
| ... | @@ -22,15 +22,13 @@ | ... | @@ -22,15 +22,13 @@ |
| 22 | <div class="booking-time">下单时间:<span>{{ props.data.order_time }}</span></div> | 22 | <div class="booking-time">下单时间:<span>{{ props.data.order_time }}</span></div> |
| 23 | </div> | 23 | </div> |
| 24 | <div class="booking-list-item-footer"> | 24 | <div class="booking-list-item-footer"> |
| 25 | - <div style="display: flex; justify-content: space-between; padding: 0 1rem 1rem 1rem; align-items: center;"> | 25 | + <div v-if="pay_show" class="pay-time"> |
| 26 | - <div v-if="pay_show" style="font-size: 0.85rem; color: red;"> | ||
| 27 | <span>支付剩余时间 </span> | 26 | <span>支付剩余时间 </span> |
| 28 | <span>{{ formatTime(remain_time) }}</span> | 27 | <span>{{ formatTime(remain_time) }}</span> |
| 29 | </div> | 28 | </div> |
| 30 | <div v-if="showBtn"> | 29 | <div v-if="showBtn"> |
| 31 | <van-button v-if="pay_show" @click="payOrder()" type="primary" color="#A67939" size="small">重新支付</van-button> | 30 | <van-button v-if="pay_show" @click="payOrder()" type="primary" color="#A67939" size="small">重新支付</van-button> |
| 32 | - <div v-if="delay_pay_show" style="font-size: 23rpx; color: red; font-size: 0.85rem;">支付超时,请重新下单!</div> | 31 | + <div v-if="delay_pay_show" class="delay-pay">支付超时,请重新下单!</div> |
| 33 | - </div> | ||
| 34 | </div> | 32 | </div> |
| 35 | </div> | 33 | </div> |
| 36 | </div> | 34 | </div> |
| ... | @@ -251,6 +249,21 @@ const payOrder = () => { | ... | @@ -251,6 +249,21 @@ const payOrder = () => { |
| 251 | } | 249 | } |
| 252 | } | 250 | } |
| 253 | } | 251 | } |
| 252 | + .booking-list-item-footer { | ||
| 253 | + display: flex; | ||
| 254 | + justify-content: space-between; | ||
| 255 | + padding: 0 1rem 1rem 1rem; | ||
| 256 | + align-items: center; | ||
| 257 | + .pay-time { | ||
| 258 | + font-size: 0.85rem; | ||
| 259 | + color: red; | ||
| 260 | + } | ||
| 261 | + .delay-pay { | ||
| 262 | + font-size: 23rpx; | ||
| 263 | + color: red; | ||
| 264 | + font-size: 0.85rem; | ||
| 265 | + } | ||
| 266 | + } | ||
| 254 | } | 267 | } |
| 255 | 268 | ||
| 256 | 269 | ... | ... |
-
Please register or login to post a comment