Aiden 9 months ago
parent e981786eb6
commit cabc13bf92

2
.gitignore vendored

@ -0,0 +1,2 @@
/node_modules
*unpackage

@ -12,6 +12,7 @@
}
</script>
<style>
<style lang="scss">
/*每个页面公共css */
@import "uview-plus/index.scss";
</style>

@ -0,0 +1,169 @@
/**
* 通用uni-app网络请求
* 基于 Promise 对象实现更简单的 request 使用方式支持请求和响应拦截
*/
export default {
config: {
baseUrl: "https://warehouse.szjixun.cn", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",//'https://warehouse.szjixun.cn'
header: {
"Content-Type": "application/json;charset=UTF-8",
// 'Content-Type':'application/x-www-form-urlencoded'
},
data: {},
method: "GET",
dataType: "json" /* 如设为json会对返回的数据做一次 JSON.parse */,
responseType: "text",
success() {},
fail() {},
complete() {},
},
interceptor: {
request: null,
response: null,
},
request(options) {
if (!options) {
options = {};
}
options.baseUrl = options.baseUrl || this.config.baseUrl;
options.dataType = options.dataType || this.config.dataType;
options.url = options.baseUrl + options.url;
options.data = options.data || {};
options.method = options.method || this.config.method;
//TODO 加密数据
options.header = options.header || this.config.header;
//TODO 数据签名
let _token = {
Authorization: uni.getStorageSync("token") || "undefined",
};
options.header = Object.assign({}, options.header, _token);
/*
_sign = {'sign': sign(JSON.stringify(options.data))}
options.header = Object.assign({}, options.header, _token,_sign)
*/
return new Promise((resolve, reject) => {
let _config = null;
options.complete = (response) => {
let statusCode = response.statusCode;
response.config = _config;
if (process.env.NODE_ENV === "development") {
if (statusCode === 200) {
// console.log("【" + _config.requestId + "】 结果:" + JSON.stringify(response.data))
}
}
if (this.interceptor.response) {
let newResponse = this.interceptor.response(response);
if (newResponse) {
response = newResponse;
}
}
if (response.data?.status === 401) {
let curPage = getCurrentPages();
let route = curPage[curPage.length - 1].route; //获取当前页面的路由
if (route !== "pages/login/index") {
uni.navigateTo({
url: "/pages/login/index",
});
}
}
// 统一的响应日志记录
_reslog(response);
if (statusCode === 200) {
//成功
resolve(response.data);
} else {
reject(response);
}
};
_config = Object.assign({}, this.config, options);
_config.requestId = new Date().getTime();
if (this.interceptor.request) {
this.interceptor.request(_config);
}
// 统一的请求日志记录
_reqlog(_config);
uni.request(_config);
});
},
get(url, data, options) {
if (!options) {
options = {};
}
options.url = url;
options.data = data;
options.method = "GET";
return this.request(options);
},
post(url, data, options, header) {
if (!options) {
options = {};
}
options.url = url;
options.data = data;
options.header = header;
options.method = "POST";
return this.request(options);
},
put(url, data, options) {
if (!options) {
options = {};
}
options.url = url;
options.data = data;
options.method = "PUT";
return this.request(options);
},
delete(url, data, options) {
if (!options) {
options = {};
}
options.url = url;
options.data = data;
options.method = "DELETE";
return this.request(options);
},
};
/**
* 请求接口日志记录
*/
function _reqlog(req) {
if (process.env.NODE_ENV === "development") {
// console.log("【" + req.requestId + "】 地址:" + req.url)
if (req.data) {
// console.log("【" + req.requestId + "】 请求参数:" + JSON.stringify(req.data))
}
}
//TODO 调接口异步写入日志数据库
}
/**
* 响应接口日志记录
*/
function _reslog(res) {
let _statusCode = res.statusCode;
if (process.env.NODE_ENV === "development") {
// console.log("【" + res.config.requestId + "】 地址:" + res.config.url)
if (res.config.data) {
// console.log("【" + res.config.requestId + "】 请求参数:" + JSON.stringify(res.config.data))
}
// console.log("【" + res.config.requestId + "】 响应结果:" + JSON.stringify(res))
}
//TODO 除了接口服务错误外,其他日志调接口异步写入日志数据库
switch (_statusCode) {
case 200:
break;
case 401:
break;
case 404:
break;
default:
break;
}
}

@ -0,0 +1,72 @@
<template>
<div class="content2" :style="styleColor">
<div class="wrap1" v-for="item in result">
<div class="wrap1_1">
<slot :name="Object.keys(item).find(x => x.includes('l'))"></slot>
</div>
<div class="wrap1_2">
<slot :name="Object.keys(item).find(x => x.includes('r'))"></slot>
</div>
</div>
</div>
</template>
<script setup>
import { useSlots, ref, defineProps } from 'vue'
const slots = useSlots();
const prop = defineProps({
styleColor: {
type: Object,
default: () => {
return { backgroundColor: '#fff' }
}
}
})
const groupObjectsByNumberKeys = (obj) => {
const grouped = {};
for (const key in obj) {
const numericPart = key.slice(1);
if (!grouped[numericPart]) {
grouped[numericPart] = {};
}
grouped[numericPart][key] = obj[key];
}
return Object.values(grouped);
}
const result = ref(groupObjectsByNumberKeys(slots))
</script>
<style lang="scss" scoped>
.content2 {
border-radius: 24rpx;
padding-left: 18rpx;
padding-right: 32rpx;
.wrap1 {
padding-left: 14rpx;
padding-top: 26rpx;
padding-bottom: 22rpx;
border-bottom: 1rpx solid #E4EAF1;
display: flex;
&:last-child {
border-bottom: none;
}
.wrap1_2 {
flex-grow: 1;
padding-left: 36rpx;
font-size: 24rpx;
color: #939393;
}
.wrap1_1 {
display: flex;
align-items: center;
width: 192rpx;
border-right: 1rpx solid #E4EAF1;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,443 @@
<template>
<view class="container">
<view class="canvasBox">
<template v-if="isUse">
<view class="box">
<view class="line"></view>
<view class="angle"></view>
</view>
<view class="box2" v-if="isUseTorch">
<view class="track" @click="openTrack">
<svg t="1653920715959" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="1351" width="32" height="32">
<path
d="M651.353043 550.479503H378.752795L240.862609 364.315031c-3.688944-4.897391-5.660621-10.876025-5.660621-17.045466v-60.040745c0-15.773416 12.847702-28.621118 28.621118-28.621118h502.459627c15.773416 0 28.621118 12.847702 28.621118 28.621118v59.977143c0 6.105839-1.971677 12.084472-5.660621 17.045466l-137.890187 186.228074zM378.752795 598.308571v398.024348c0 15.328199 12.402484 27.667081 27.667081 27.667081h217.266087c15.328199 0 27.667081-12.402484 27.66708-27.667081V598.308571H378.752795z m136.300124 176.942112c-14.564969 0-26.331429-11.76646-26.331428-26.331428v-81.283975c0-14.564969 11.76646-26.331429 26.331428-26.331429 14.564969 0 26.331429 11.76646 26.331429 26.331429v81.283975c0 14.564969-11.76646 26.331429-26.331429 26.331428zM512 222.608696c-17.554286 0-31.801242-14.246957-31.801242-31.801243V31.801242c0-17.554286 14.246957-31.801242 31.801242-31.801242s31.801242 14.246957 31.801242 31.801242v159.006211c0 17.554286-14.246957 31.801242-31.801242 31.801243zM280.932174 205.881242c-9.47677 0-18.889938-4.197764-25.122981-12.275279L158.242981 67.991056a31.864845 31.864845 0 0 1 5.597019-44.648944 31.864845 31.864845 0 0 1 44.648944 5.597018l97.502609 125.551305a31.864845 31.864845 0 0 1-5.597019 44.648944c-5.787826 4.579379-12.656894 6.741863-19.46236 6.741863zM723.987081 205.881242c-6.805466 0-13.674534-2.162484-19.462361-6.678261a31.794882 31.794882 0 0 1-5.597018-44.648944l97.566211-125.551304a31.794882 31.794882 0 0 1 44.648944-5.597019 31.794882 31.794882 0 0 1 5.597019 44.648944l-97.566211 125.551305c-6.360248 8.077516-15.709814 12.27528-25.186584 12.275279z"
fill="#ffffff" p-id="1352" />
</svg>
{{ trackStatus ? '关闭闪光灯' : '打开闪光灯' }}
</view>
</view>
<view class="mask1 mask" :style="'height:' + maskHeight + 'px;'"></view>
<view class="mask2 mask"
:style="'width:' + maskWidth + 'px;top:' + maskHeight + 'px;height:' + canvasHeight + 'px'"></view>
<view class="mask3 mask" :style="'height:' + maskHeight + 'px;'"></view>
<view class="mask4 mask"
:style="'width:' + maskWidth + 'px;top:' + maskHeight + 'px;height:' + canvasHeight + 'px'"></view>
</template>
<template v-else>
<slot name="error">
<view class="error">
<view class="on1">相机权限被拒绝请尝试如下操作</view>
<view>· 刷新页面后重试</view>
<view>· 在系统中检测当前App或浏览器的相机权限是否被禁用</view>
<view>· 如果依然不能体验建议在微信中打开链接</view>
</view>
</slot>
</template>
</view>
</view>
</template>
<script>
import * as jsQR from './jsQR.js'
export default {
props: {
continue: {
type: Boolean,
default: false // false true
},
exact: {
type: String,
default: "environment" // environment user
},
size: {
type: String,
default: "whole" // whole balf
},
definition: {
type: Boolean,
default: false // fasle true
}
},
data() {
return {
windowWidth: 0,
windowHeight: 0,
video: null,
canvas2d: null,
canvas2d2: null,
canvasWidth: 200,
canvasHeight: 200,
maskWidth: 0,
maskHeight: 0,
inter: 0,
track: null,
isUseTorch: false,
trackStatus: false,
isParse: false,
isUse: true
};
},
mounted() {
if (origin.indexOf("https") === -1)
throw "请在 https 环境中使用摄像头组件。";
this.windowWidth =
document.documentElement.clientWidth || document.body.clientWidth;
this.windowHeight =
document.documentElement.clientHeight || document.body.clientHeight;
this.windowHeight =
this.size === "whole" ? this.windowHeight : this.windowHeight / 2;
this.isParse = true;
this.$nextTick(() => {
this.createMsk();
this.openScan();
});
},
destroyed() {
this.closeCamera();
},
methods: {
openScan() {
const width = this.transtion(this.windowHeight);
const height = this.transtion(this.windowWidth);
const videoParam = {
audio: false,
video: {
facingMode: { exact: this.exact },
width,
height
}
};
navigator.mediaDevices
.getUserMedia(videoParam)
.then(stream => {
this.video = document.createElement("video");
this.video.width = this.windowWidth;
this.video.height = this.windowHeight;
const canvas = document.createElement("canvas");
canvas.id = "canvas";
canvas.width = this.transtion(this.canvasWidth);
canvas.height = this.transtion(this.canvasHeight);
canvas.style = "display:none;";
//canvas.style = 'position: fixed;top: 0;z-index: 999;left:0'
this.canvas2d = canvas.getContext("2d");
//
const canvasBox = document.querySelector(".canvasBox");
canvasBox.append(this.video);
canvasBox.append(canvas);
canvasBox.style = `width:${this.windowWidth}px;height:${this.windowHeight}px;`;
// canvas
const canvas2 = document.createElement("canvas");
canvas2.id = "canvas2";
canvas2.width = this.canvasWidth;
canvas2.height = this.canvasHeight;
canvas2.style =
"position: absolute;top: 50%;left: 50%;z-index: 20;transform: translate(-50%, -50%);";
this.canvas2d2 = canvas2.getContext("2d");
canvasBox.append(canvas2);
this.video.srcObject = stream;
this.video.setAttribute("playsinline", true);
this.video.play();
this.tick();
this.track = stream.getVideoTracks()[0];
setTimeout(() => {
this.isUseTorch = this.track.getCapabilities().torch || null;
}, 500);
})
.catch(err => {
this.isUse = false;
this.$emit("error", err);
});
},
closeCamera() {
this.isParse = false;
if (this.video && this.video.srcObject) {
this.video.srcObject.getTracks().forEach(track => {
track.stop();
});
}
},
tick() {
if (!this.isParse) return;
if (this.video.readyState === this.video.HAVE_ENOUGH_DATA) {
this.canvas2d.drawImage(
this.video,
this.transtion(this.maskWidth),
this.transtion(this.maskHeight),
this.transtion(200),
this.transtion(200),
0,
0,
this.transtion(this.canvasWidth),
this.transtion(this.canvasHeight)
);
const imageData = this.canvas2d.getImageData(
0,
0,
this.transtion(this.canvasWidth),
this.transtion(this.canvasHeight)
);
const code = jsQR(imageData.data, imageData.width, imageData.height, {
inversionAttempts: "dontInvert"
});
this.canvas2d2.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
if (code) {
this.drawLine(
code.location.topLeftCorner,
code.location.topRightCorner
);
this.drawLine(
code.location.topRightCorner,
code.location.bottomRightCorner
);
this.drawLine(
code.location.bottomRightCorner,
code.location.bottomLeftCorner
);
this.drawLine(
code.location.bottomLeftCorner,
code.location.topLeftCorner
);
if (code.data) {
this.getData(code.data);
}
}
}
requestAnimationFrame(this.tick);
},
drawLine(begin, end, color = "#FF3B58") {
this.canvas2d2.beginPath();
this.canvas2d2.moveTo(
this.nutranstion(begin.x),
this.nutranstion(begin.y)
);
this.canvas2d2.lineTo(this.nutranstion(end.x), this.nutranstion(end.y));
this.canvas2d2.lineWidth = 4;
this.canvas2d2.strokeStyle = color;
this.canvas2d2.stroke();
},
getData(data) {
this.$emit("success", data);
if (!this.continue) {
this.closeCamera();
}
},
openTrack() {
this.trackStatus = !this.trackStatus;
this.track.applyConstraints({
advanced: [{ torch: this.trackStatus }]
});
},
createMsk() {
this.maskWidth = this.windowWidth / 2 - this.canvasWidth / 2;
this.maskHeight = this.windowHeight / 2 - this.canvasHeight / 2;
},
transtion(number) {
return this.definition ? number * 2.8 : number * 1.8;
},
nutranstion(number) {
return this.definition ? number / 2.8 : number / 1.8;
}
}
};
</script>
<style scoped lang="scss">
page {
background-color: #333333;
}
// .container {
// background-color: #333333;
// opacity: 0.7;
// }
.canvasBox {
width: 100vw;
height: 100vh;
position: relative;
background-image: linear-gradient(0deg,
transparent 24%,
rgba(32, 255, 77, 0.1) 25%,
rgba(32, 255, 77, 0.1) 26%,
transparent 27%,
transparent 74%,
rgba(32, 255, 77, 0.1) 75%,
rgba(32, 255, 77, 0.1) 76%,
transparent 77%,
transparent),
linear-gradient(90deg,
transparent 24%,
rgba(32, 255, 77, 0.1) 25%,
rgba(32, 255, 77, 0.1) 26%,
transparent 27%,
transparent 74%,
rgba(32, 255, 77, 0.1) 75%,
rgba(32, 255, 77, 0.1) 76%,
transparent 77%,
transparent);
background-size: 3rem 3rem;
background-position: -1rem -1rem;
z-index: 10;
background-color: #1110;
}
.box {
width: 200px;
height: 200px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
overflow: hidden;
border: 0.1rem solid rgba(0, 255, 51, 0.2);
z-index: 11;
}
.line {
height: calc(100% - 2px);
width: 100%;
background: linear-gradient(180deg, rgba(0, 255, 51, 0) 43%, #00ff33 211%);
border-bottom: 3px solid #00ff33;
transform: translateY(-100%);
animation: radar-beam 2s infinite alternate;
animation-timing-function: cubic-bezier(0.53, 0, 0.43, 0.99);
animation-delay: 1.4s;
}
.box:after,
.box:before,
.angle:after,
.angle:before {
content: "";
display: block;
position: absolute;
width: 3vw;
height: 3vw;
z-index: 12;
border: 0.2rem solid transparent;
}
.box:after,
.box:before {
top: 0;
border-top-color: #00ff33;
}
.angle:after,
.angle:before {
bottom: 0;
border-bottom-color: #00ff33;
}
.box:before,
.angle:before {
left: 0;
border-left-color: #00ff33;
}
.box:after,
.angle:after {
right: 0;
border-right-color: #00ff33;
}
@keyframes radar-beam {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
.msg {
text-align: center;
padding: 20rpx 0;
}
.box2 {
width: 300px;
height: 200px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 20;
}
.track {
position: absolute;
bottom: -100px;
left: 50%;
transform: translateX(-50%);
z-index: 20;
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
}
.mask {
position: absolute;
z-index: 10;
background-color: rgba(0, 0, 0, 0.55);
}
.mask1 {
top: 0;
left: 0;
right: 0;
}
.mask2 {
right: 0;
}
.mask3 {
right: 0;
left: 0;
bottom: 0;
}
.mask4 {
left: 0;
}
.error {
color: #fff;
padding: 40rpx;
font-size: 24rpx;
background-color: #333333;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 550rpx;
border-radius: 20rpx;
}
.error .on1 {
font-size: 30rpx;
}
</style>

@ -0,0 +1,13 @@
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = http://192.168.12.3:3000/xuminyi/museum-H5.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main

@ -1,22 +1,27 @@
import App from './App'
import App from "./App";
import uviewPlus from "uview-plus";
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
import Vue from "vue";
import "./uni.promisify.adaptor";
Vue.config.productionTip = false;
App.mpType = "app";
const app = new Vue({
...App
})
app.$mount()
...App,
});
app.$mount();
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
import { createSSRApp } from "vue";
export function createApp() {
const app = createSSRApp(App)
const app = createSSRApp(App);
app.use(uviewPlus);
uni.$u.config.unit = "rpx";
return {
app
}
app,
};
}
// #endif

1898
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,7 @@
{
"dependencies": {
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"uview-plus": "^3.1.41"
}
}

@ -1,9 +1,51 @@
{
"easycom": {
"custom": {
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
}
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "藏品活动详情页",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
}
},
{
"path": "pages/check/index",
"style": {
"navigationBarTitleText": "藏品活动详情页",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
}
},
{
"path": "pages/scan/index",
"style": {
"navigationBarTitleText": "uni-app"
"navigationBarTitleText": "藏品活动详情页",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
}
},
{
"path": "pages/persomInfo/index",
"style": {
"navigationBarTitleText": "藏品活动详情页",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
}
}
],

@ -0,0 +1,32 @@
<template>
<div class="main">
<image src="@/static/bg2.png" mode="aspectFill" class="img" />
<up-button type="primary" :text="'审核员'" shape="circle" color="#AB2F23"
style="width:700rpx ;margin-top: 50rpx;"></up-button>
<up-button type="primary" text="扫一扫" shape="circle" color="#000" style="width:700rpx ;margin-top: 50rpx"
@click="goScan"></up-button>
</div>
</template>
<script setup>
const goScan = () => {
uni.navigateTo({
url: '/pages/scan/index'
})
}
</script>
<style lang="scss" scoped>
.main {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
background: url('@/static/bg.png');
background-size: cover;
.img {
width: 100%;
height: 1256rpx;
}
}
</style>

@ -1,52 +0,0 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>

@ -0,0 +1,98 @@
<template>
<div class="main">
<image src="@/static/33@2x.png" mode="aspectFill" class="img" />
<div class="loginInfo">
<card>
<template #l1>
<div class="box-left">
手机号(+86)
</div>
</template>
<template #r1>
<up-input placeholder="请输入手机号" clearable type="number" border="none"></up-input>
</template>
<template #l2>
<div class="box-left">
验证码
</div>
</template>
<template #r2>
<div class="box-right">
<up-input placeholder="请输入验证码" border="none">
<template #suffix>
<up-code ref="uCodeRef" @change="codeChange" :seconds="60" changeText="60秒重新获取"
endText="重新获取"></up-code>
<up-button @tap="getCode" :text="tips" type="success" size="mini"></up-button>
</template>
</up-input>
</div>
</template>
</card>
<up-button type="primary" text="登录" shape="circle" color="#000" style="width:436rpx ;"
@click="goCheck"></up-button>
</div>
</div>
</template>
<script setup>
import { ref, watch } from 'vue';
import card from '@/components/card/index.vue'
const tips = ref('');
const uCodeRef = ref(null);
const codeChange = (text) => {
tips.value = text;
};
const getCode = () => {
console.log(uCodeRef.canGetCode)
if (uCodeRef.canGetCode) {
//
uni.showLoading({
title: '正在获取验证码',
});
setTimeout(() => {
uni.hideLoading();
// start()
uni.$u.toast('验证码已发送');
//
uCodeRef.start();
}, 2000);
} else {
uni.$u.toast('倒计时结束后再发送');
}
};
const goCheck = () => {
uni.navigateTo({
url: '/pages/check/index'
})
}
</script>
<style lang="scss" scoped>
.main {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
background: url('@/static/bg.png');
background-size: cover;
.img {
width: 100%;
height: 1000rpx;
}
.loginInfo {
height: 100%;
padding: 42rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.box-left {
font-size: 28rpx;
}
}
}
</style>

@ -0,0 +1,80 @@
<template>
<div class="main">
<up-button type="primary" :text="'审核员'" shape="circle" color="#AB2F23" style="width:700rpx "></up-button>
<image src="" mode="scaleToFill" class="img" style="" />
<card>
<template #l1>
<div class="box-left">
姓名
</div>
</template>
<template #r1>
123123
</template>
<template #l2>
<div class="box-left">
身份证号
</div>
</template>
<template #r2>
<div class="box-right">
123123132
</div>
</template>
<template #l3>
<div class="box-left">
领票日期
</div>
</template>
<template #r3>
123123
</template>
<template #l4>
<div class="box-left">
核验项目
</div>
</template>
<template #r4>
123123
</template>
<template #l5>
<div class="box-left">
核验日期
</div>
</template>
<template #r5>
123123
</template>
</card>
<up-button type="primary" text="核验人像" shape="circle" color="#000" style="width:436rpx "></up-button>
</div>
</template>
<script setup>
import card from '@/components/card/index.vue'
</script>
<style lang="scss" scoped>
.main {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-around;
background: url('@/static/bg.png');
background-size: cover;
box-sizing: border-box;
padding: 42rpx 26rpx;
.img {
width: 100%;
height: 354rpx;
margin-top: 40rpx;
}
.box-left {
font-size: 28rpx;
}
}
</style>

@ -0,0 +1,24 @@
<template>
<div>
<mumuGetQrcode @success="qrcodeSucess" @error="qrcodeError"></mumuGetQrcode>
</div>
</template>
<script setup>
import mumuGetQrcode from "../../components/mumu-getQrcode/mumu-getQrcode.vue";
const qrcodeSucess = (id) => {
console.log(id)
}
const qrcodeError = (err) => {
console.log(err);
uni.showModal({
title: "摄像头授权失败",
content: "摄像头授权失败,请检测当前浏览器是否有摄像头权限。",
success: () => {
uni.navigateBack({});
},
});
}
</script>
<style lang="scss" scoped></style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

@ -13,7 +13,7 @@
*/
/* 颜色变量 */
@import 'uview-plus/theme.scss';
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;

Loading…
Cancel
Save