完善功能
This commit is contained in:
46
bundle/face/face-photo_bck.vue
Normal file
46
bundle/face/face-photo_bck.vue
Normal file
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<view>
|
||||
<face-bio-assay :isDev="false" :action="['StraightenHead']" ref="faceDetect" @detectFailed="photoChange" @photoChange="photoChange">
|
||||
</face-bio-assay>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import faceBioAssay from '@/uni_modules/face-bio-assay/components/face-bio-assay/face-bio-assay.vue'
|
||||
export default {
|
||||
components: {
|
||||
faceBioAssay,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
order_id: 0,
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(args) {
|
||||
this.order_id = args.order_id || 0;
|
||||
this.$refs.faceDetect.initData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
detectFailed() {
|
||||
uni.showToast({
|
||||
title: "人脸核验失败~",
|
||||
icon: 'none'
|
||||
})
|
||||
uni.navigateBack()
|
||||
},
|
||||
|
||||
photoChange(path) {
|
||||
let self = this
|
||||
uni.navigateBack()
|
||||
this.getOpenerEventChannel().emit('data',{path: path, order_id: self.order_id});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -267,7 +267,7 @@ export default {
|
||||
title: '加载中'
|
||||
});
|
||||
// 1. 协议文件地址(可替换为实际后端返回的 word 文件 url)
|
||||
const url = 'https://xh.stnav.com/czxy.doc';
|
||||
const url = 'https://xh.stnav.com/czxy20260205.doc';
|
||||
// 2. 下载 word 文件
|
||||
uni.downloadFile({
|
||||
url,
|
||||
|
||||
211
bundle/recharge/record.vue
Normal file
211
bundle/recharge/record.vue
Normal file
@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<view class="" style="padding-bottom: 20rpx;">
|
||||
<navbar title="充值记录"></navbar>
|
||||
|
||||
<view v-if="listData.length>0" class="pbenv">
|
||||
<view class="address-list">
|
||||
<view class="address bg-white d-b-c" v-for="(item,index) in listData" :key="index">
|
||||
<view class="">
|
||||
<view class=" flex-1 mb10">
|
||||
<view class="user f32 address-info">
|
||||
<text>充值金额:{{ item.order_amount }}</text>
|
||||
</view>
|
||||
<view class="pt20 f26 gray3">
|
||||
订单编号:{{ item.order_sn }}
|
||||
</view>
|
||||
<view class="pt20 f26 gray3">
|
||||
订单创建时间:{{ item.create_time }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="d-f a-i-c" @click="toInvoice(item.id)" v-if="item.fp_status == 0">
|
||||
<image class="add_icon_img" src="/static/icon/edit.png" mode="aspectFill" style="width: 24rpx; height: 24rpx;"></image>
|
||||
<view class="" style="margin-left: 10rpx;">
|
||||
开票
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar.vue';
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
/*是否加载完成*/
|
||||
loadding: true,
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 2000,
|
||||
duration: 500,
|
||||
/*数据*/
|
||||
listData: [],
|
||||
/*默认地址id*/
|
||||
default_id: '0',
|
||||
options: {}
|
||||
}
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.options = options;
|
||||
},
|
||||
|
||||
onShow: function() {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
/*获取地址列表*/
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
/*获取数据*/
|
||||
getData() {
|
||||
let self = this;
|
||||
let dataType = self.dataType;
|
||||
self._get('order.groundOrder/rechangeList', {}, function(res) {
|
||||
console.log("🚀 ~ res:", res)
|
||||
self.listData = res.data.lists;
|
||||
self.loadding = false;
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
// 去开票
|
||||
toInvoice(order_id) {
|
||||
console.log("🚀 ~ methods.toInvoice:")
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/invoice?order_id=${order_id}&type=2`
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: $xh-bg;
|
||||
}
|
||||
|
||||
.address-list {
|
||||
margin-top: 20rpx;
|
||||
border-top: 16rpx solid #F2F2F2;
|
||||
padding: 0 30rpx;
|
||||
padding-bottom: 90rpx;
|
||||
}
|
||||
|
||||
.foot-btns {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.foot-btns .btn-red {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.none_add {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 318rpx;
|
||||
}
|
||||
|
||||
.no_add {
|
||||
width: 292rpx;
|
||||
height: 202rpx;
|
||||
}
|
||||
|
||||
.no_add_add {
|
||||
width: 630rpx;
|
||||
margin: 0 60rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 8rpx;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
background: #365A9A !important;
|
||||
color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.add_add {
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #0777CD;
|
||||
padding: 0 35rpx;
|
||||
border-bottom: 1rpx solid #D9D9D9;
|
||||
}
|
||||
|
||||
.defaul_add {
|
||||
padding: 9rpx 14rpx 10rpx 15rpx;
|
||||
@include background_color('bg-op');
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #F6220C;
|
||||
@include font_color('font_color');
|
||||
}
|
||||
|
||||
.add_icon_img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.none_line {
|
||||
width: 1rpx;
|
||||
height: 44rpx;
|
||||
background: #D9D9D9;
|
||||
}
|
||||
.add_add-btn{
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
width:690rpx;
|
||||
margin: 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 28rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 8rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #365A9A !important;
|
||||
color: #fff;
|
||||
}
|
||||
.pbenv{
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-info {
|
||||
font-size: 30rpx;
|
||||
color: #121212;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
|
||||
.address {
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
.info {
|
||||
padding: 30rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -468,11 +468,42 @@ export default {
|
||||
* @param time
|
||||
* @param status
|
||||
*/
|
||||
handleSelectTime(title, time, status) {
|
||||
handleSelectTime(title, time, status, room_id, price, light_price) {
|
||||
let self = this
|
||||
if (status == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 新增逻辑:限制只能选择一个场地的免费时间段
|
||||
const isClickingFree = (Number(price) || 0) <= 0;
|
||||
const isCurrentlySelected = this.selectedTime[title] && this.selectedTime[title].includes(time);
|
||||
|
||||
// 如果是准备选中一个免费时间段(不在已选列表中)
|
||||
if (isClickingFree && !isCurrentlySelected) {
|
||||
let hasOtherRoomFree = false;
|
||||
Object.keys(this.selectedTime).forEach(roomTitle => {
|
||||
if (roomTitle !== title && this.selectedTime[roomTitle].length > 0) {
|
||||
const otherRoom = this.cdList.find(cd => cd.title === roomTitle);
|
||||
if (otherRoom) {
|
||||
this.selectedTime[roomTitle].forEach(t => {
|
||||
const tObj = otherRoom.time && otherRoom.time.find(item => item.t === t);
|
||||
if (tObj && (Number(tObj.price) || 0) <= 0) {
|
||||
hasOtherRoomFree = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (hasOtherRoomFree) {
|
||||
uni.showToast({
|
||||
title: '只能选择同一场地的免费时间段',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 多选逻辑,selectedTime为对象,按title区分
|
||||
if (!this.selectedTime[title]) {
|
||||
this.$set(this.selectedTime, title, []);
|
||||
@ -726,6 +757,11 @@ export default {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/reserve/confirm?venueId=${self.venue.id}&roomId=${self.id}&typeId=${self.typeId}&orderId=${res.data.lists.id}`
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg || '订单提交失败,请重试',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user