完善功能
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: '加载中'
|
title: '加载中'
|
||||||
});
|
});
|
||||||
// 1. 协议文件地址(可替换为实际后端返回的 word 文件 url)
|
// 1. 协议文件地址(可替换为实际后端返回的 word 文件 url)
|
||||||
const url = 'https://xh.stnav.com/czxy.doc';
|
const url = 'https://xh.stnav.com/czxy20260205.doc';
|
||||||
// 2. 下载 word 文件
|
// 2. 下载 word 文件
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url,
|
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 time
|
||||||
* @param status
|
* @param status
|
||||||
*/
|
*/
|
||||||
handleSelectTime(title, time, status) {
|
handleSelectTime(title, time, status, room_id, price, light_price) {
|
||||||
let self = this
|
let self = this
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
return;
|
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区分
|
// 多选逻辑,selectedTime为对象,按title区分
|
||||||
if (!this.selectedTime[title]) {
|
if (!this.selectedTime[title]) {
|
||||||
this.$set(this.selectedTime, title, []);
|
this.$set(this.selectedTime, title, []);
|
||||||
@ -726,6 +757,11 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/bundle/reserve/confirm?venueId=${self.venue.id}&roomId=${self.id}&typeId=${self.typeId}&orderId=${res.data.lists.id}`
|
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'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1025,6 +1025,12 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "recharge/record",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "face/face-info",
|
"path": "face/face-info",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@ -135,7 +135,7 @@
|
|||||||
<button class="theme-btn del-btn" @click="onDelOrder(item.id)">删除订单</button>
|
<button class="theme-btn del-btn" @click="onDelOrder(item.id)">删除订单</button>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block v-if="item.order_status == 3 && item.fp_status == 0">
|
<block v-if="item.order_status == 3 && item.fp_status == 0 && item.pay_type == 0">
|
||||||
<button class="theme-btn pay-btn" @click="toInvoice(item.id)">去开票</button>
|
<button class="theme-btn pay-btn" @click="toInvoice(item.id)">去开票</button>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
@ -606,7 +606,7 @@
|
|||||||
toInvoice(order_id) {
|
toInvoice(order_id) {
|
||||||
console.log("🚀 ~ methods.toInvoice:")
|
console.log("🚀 ~ methods.toInvoice:")
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/order/invoice?order_id=${order_id}`
|
url: `/pages/order/invoice?order_id=${order_id}&type=1`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
order_id: 0,
|
order_id: 0,
|
||||||
|
type: 1, // 1是订单发票 2是充值发票
|
||||||
form: {
|
form: {
|
||||||
gmfnsrsbh: '',
|
gmfnsrsbh: '',
|
||||||
gmfmc: '',
|
gmfmc: '',
|
||||||
@ -32,7 +33,7 @@
|
|||||||
},
|
},
|
||||||
onLoad(args) {
|
onLoad(args) {
|
||||||
this.order_id = args.order_id;
|
this.order_id = args.order_id;
|
||||||
console.log('order_id', this.order_id);
|
this.type = args.type || 1;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
@ -68,6 +69,7 @@
|
|||||||
'invoice.invoice/getInvoice',
|
'invoice.invoice/getInvoice',
|
||||||
{
|
{
|
||||||
order_id: self.order_id,
|
order_id: self.order_id,
|
||||||
|
type: self.type,
|
||||||
emails: self.form.emials,
|
emails: self.form.emials,
|
||||||
gmfmc: self.form.gmfmc,
|
gmfmc: self.form.gmfmc,
|
||||||
gmfnsrsbh: self.form.gmfnsrsbh
|
gmfnsrsbh: self.form.gmfnsrsbh
|
||||||
|
|||||||
6
uni_modules/hao-camera/changelog.md
Normal file
6
uni_modules/hao-camera/changelog.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
## 1.0.2(2025-12-22)
|
||||||
|
代码优化
|
||||||
|
## 1.0.1(2025-12-22)
|
||||||
|
封面图上传
|
||||||
|
## 1.0.0(2025-12-22)
|
||||||
|
组件代码上传
|
||||||
164
uni_modules/hao-camera/components/hao-camera/hao-camera.vue
Normal file
164
uni_modules/hao-camera/components/hao-camera/hao-camera.vue
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content"
|
||||||
|
style="position: fixed;top: 0;left: 0;z-index: 777;width: 100%;height: 100vh;background-color: #FFFFFF;">
|
||||||
|
<camera @error="handleCameraError" :device-position="localDevicePosition" flash="off" v-if="!cameraImage"
|
||||||
|
style="width: 100%; height: 100vh;">
|
||||||
|
<cover-image src="@/uni_modules/hao-camera/static/person.png"
|
||||||
|
style="width: 100vw; height: 770rpx; margin:10vh 0vw 0 0vw;"></cover-image>
|
||||||
|
<view
|
||||||
|
style="top: 20rpx;left: 40rpx;width: 380rpx;position: fixed;height: 202rpx; border-radius: 20rpx;border: 1px solid rgba(51, 51, 51,0.6);background-color: rgba(51, 51, 51,0.6);">
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="top: 20rpx;left: 40rpx;width: 380rpx;position: fixed;height: 202rpx; border-radius: 20rpx;font-size: 26rpx;color: white;display: flex;flex-direction: column;box-sizing: border-box;padding:25rpx;">
|
||||||
|
<text>1. 保持光线充足</text>
|
||||||
|
<text style="margin-top: 20rpx;">2. 人物轮廓清晰无阴影</text>
|
||||||
|
<text style="margin-top: 20rpx;">3. 姿势端正,眼睛直视镜头</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 准备拍照 -->
|
||||||
|
<view v-if="!cameraImage" class="btns"
|
||||||
|
style="width: 100%;height: 16vh;background-color: rgba(51, 51, 51, 0.5); padding-bottom: 25rpx;position: fixed;bottom: 0;">
|
||||||
|
<!-- <image class="item" @tap="chooseImage" src="@/uni_modules/hao-camera/static/xiangce.png"></image> -->
|
||||||
|
<image class="item_center" @tap="takePhotoByHead" src="@/uni_modules/hao-camera/static/cameraImg.png">
|
||||||
|
</image>
|
||||||
|
<image class="item" @tap="reverseCamera" src="@/uni_modules/hao-camera/static/fanzhuan.png"></image>
|
||||||
|
</view>
|
||||||
|
</camera>
|
||||||
|
<!-- 确认拍照照片 -->
|
||||||
|
<image v-if="cameraImage" :src="cameraImage" style="width: 100%; height: 100vh;" mode="aspectFit"></image>
|
||||||
|
|
||||||
|
<!-- 拍照完成 -->
|
||||||
|
<view v-if="cameraImage" class="btns"
|
||||||
|
style="width: 100%;height: 16vh;background-color: rgba(51, 51, 51, 0.5); padding-bottom: 25rpx;position: fixed;bottom: 0;">
|
||||||
|
<image class="img_btn" @tap="cameraImage = ''" src="@/uni_modules/hao-camera/static/back.png"></image>
|
||||||
|
<image class="img_btn"></image>
|
||||||
|
<image class="img_btn" @tap="confirmPhoto" src="@/uni_modules/hao-camera/static/confirm.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="error-handler" v-if="!authCamera">
|
||||||
|
<button class="nobtn" openType="openSetting">获取相机权限失败</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
quality: {
|
||||||
|
type: String,
|
||||||
|
default: 'high'
|
||||||
|
},
|
||||||
|
devicePosition: {
|
||||||
|
type: String,
|
||||||
|
default: 'back'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
ctxHeader: null,
|
||||||
|
cameraImage: '',
|
||||||
|
authCamera: true,
|
||||||
|
localDevicePosition: this.devicePosition
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
devicePosition(newVal) {
|
||||||
|
this.localDevicePosition = newVal;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.checkCameraAuth();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
onShow() {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.checkCameraAuth();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
checkCameraAuth() {
|
||||||
|
uni.getSetting({
|
||||||
|
success: (res) => {
|
||||||
|
if (res.authSetting["scope.camera"]) {
|
||||||
|
this.authCamera = true;
|
||||||
|
} else {
|
||||||
|
this.authCamera = false;
|
||||||
|
uni.showToast({
|
||||||
|
title: '请确认是否允许获取您的相机权限!',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// ...existing code...
|
||||||
|
//拍摄头像
|
||||||
|
takePhotoByHead() {
|
||||||
|
this.ctxHeader = uni.createCameraContext();
|
||||||
|
this.ctxHeader.takePhoto({
|
||||||
|
// quality: this.quality,
|
||||||
|
quality: 'low',
|
||||||
|
success: (res) => {
|
||||||
|
this.cameraImage = res.tempImagePath; //图片
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '拍照失败',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCameraError() {
|
||||||
|
uni.showToast({
|
||||||
|
title: '用户拒绝使用摄像头',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
reverseCamera() {
|
||||||
|
this.localDevicePosition = (("back" === this.localDevicePosition) ? "front" : "back")
|
||||||
|
console.log("🚀 ~ localDevicePosition:", this.localDevicePosition)
|
||||||
|
},
|
||||||
|
confirmPhoto() {
|
||||||
|
this.$emit('confirmPhoto', this.cameraImage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
background: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100%;
|
||||||
|
width: 100vw;
|
||||||
|
|
||||||
|
.btns {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.img_btn {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_center {
|
||||||
|
width: 130rpx;
|
||||||
|
height: 130rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
99
uni_modules/hao-camera/package.json
Normal file
99
uni_modules/hao-camera/package.json
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
"id": "hao-camera",
|
||||||
|
"displayName": "小程序证件照、人脸拍照相机",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"description": "小程序相机拍照,证件照人脸头像框辅助拍照",
|
||||||
|
"keywords": [
|
||||||
|
"人脸拍照",
|
||||||
|
"相机翻转",
|
||||||
|
"证件照"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.0",
|
||||||
|
"uni-app": "^3.6.15",
|
||||||
|
"uni-app-x": ""
|
||||||
|
},
|
||||||
|
"cover": "http://rk-pos.oss-cn-beijing.aliyuncs.com/appupdate/ruipay/lyhStatic/cameraCover.png",
|
||||||
|
"dcloudext": {
|
||||||
|
"type": "component-vue",
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "插件不采集任何数据",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "",
|
||||||
|
"darkmode": "x",
|
||||||
|
"i18n": "x",
|
||||||
|
"widescreen": "x"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": [],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "√",
|
||||||
|
"aliyun": "√",
|
||||||
|
"alipay": "√"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"uni-app": {
|
||||||
|
"vue": {
|
||||||
|
"vue2": {
|
||||||
|
"extVersion": "1.0.0",
|
||||||
|
"minVersion": ""
|
||||||
|
},
|
||||||
|
"vue3": {
|
||||||
|
"extVersion": "1.0.0",
|
||||||
|
"minVersion": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"web": {
|
||||||
|
"safari": "-",
|
||||||
|
"chrome": "-"
|
||||||
|
},
|
||||||
|
"app": {
|
||||||
|
"vue": "-",
|
||||||
|
"nvue": "-",
|
||||||
|
"android": "-",
|
||||||
|
"ios": "-",
|
||||||
|
"harmony": "-"
|
||||||
|
},
|
||||||
|
"mp": {
|
||||||
|
"weixin": {
|
||||||
|
"extVersion": "1.0.0",
|
||||||
|
"minVersion": ""
|
||||||
|
},
|
||||||
|
"alipay": "-",
|
||||||
|
"toutiao": "-",
|
||||||
|
"baidu": "-",
|
||||||
|
"kuaishou": "-",
|
||||||
|
"jd": "-",
|
||||||
|
"harmony": "-",
|
||||||
|
"qq": "-",
|
||||||
|
"lark": "-"
|
||||||
|
},
|
||||||
|
"quickapp": {
|
||||||
|
"huawei": "-",
|
||||||
|
"union": "-"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.1.0",
|
||||||
|
"uni-app": "^3.6.15",
|
||||||
|
"uni-app-x": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
32
uni_modules/hao-camera/readme.md
Normal file
32
uni_modules/hao-camera/readme.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# hao-camera 证件照相机拍照
|
||||||
|
|
||||||
|
**示例使用方法**
|
||||||
|
|
||||||
|
```
|
||||||
|
<template>
|
||||||
|
<!-- <@devicePosition: 摄像头位置 前置或后置摄像头,值为front, back
|
||||||
|
@quality: 成像质量,值为high(高质量)、normal(普通质量)、low(低质量) -->
|
||||||
|
<view>
|
||||||
|
<hao-camera
|
||||||
|
:devicePosition="back"
|
||||||
|
:quality="high"
|
||||||
|
@confirmPhoto="confirmPhoto"
|
||||||
|
></hao-camera>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import haoCamera from '@/uni_modules/hao-camera/components/hao-camera/hao-camera.vue';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
haoCamera
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
confirmPhoto(filePath){
|
||||||
|
console.log('图片: ' + filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
BIN
uni_modules/hao-camera/static/back.png
Normal file
BIN
uni_modules/hao-camera/static/back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
uni_modules/hao-camera/static/cameraImg.png
Normal file
BIN
uni_modules/hao-camera/static/cameraImg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
uni_modules/hao-camera/static/confirm.png
Normal file
BIN
uni_modules/hao-camera/static/confirm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
uni_modules/hao-camera/static/fanzhuan.png
Normal file
BIN
uni_modules/hao-camera/static/fanzhuan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
BIN
uni_modules/hao-camera/static/person.png
Normal file
BIN
uni_modules/hao-camera/static/person.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
uni_modules/hao-camera/static/xiangce.png
Normal file
BIN
uni_modules/hao-camera/static/xiangce.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
Reference in New Issue
Block a user