Преглед на файлове

老人审核列表(待测试)

chubiao преди 11 месеца
родител
ревизия
b8518bc441
променени са 13 файла, в които са добавени 1258 реда и са изтрити 194 реда
  1. 11 0
      api/kh.js
  2. 53 7
      api/upload.js
  3. 1 1
      common/baiduUtil.js
  4. 39 0
      common/image.js
  5. 4 4
      manifest.json
  6. 32 14
      pages.json
  7. 2 2
      pages/index/index.vue
  8. 884 0
      pages/info/add-files.vue
  9. 11 3
      pages/info/add.vue
  10. 12 8
      pages/login/index.vue
  11. 1 1
      pages/lr/list.vue
  12. 128 0
      pages/lr/shxxList.vue
  13. 80 154
      pages/test/index.vue

+ 11 - 0
api/kh.js

@@ -40,6 +40,17 @@ export function ListKhjbxx(data) {
 }
 
 
+
+// 老人审核信息列表
+export function ListKhShxx(data) {
+	return request({
+		url: '/api/lnst/shxx/list',
+		method: 'get',
+		data: data
+	})
+}
+
+
 // 老人信息详情
 export function GetLrByZjhm(data) {
 	return request({

+ 53 - 7
api/upload.js

@@ -6,7 +6,7 @@ import {
 
 /**
  * 单一文件上传接口
- * @file 文件地址
+ * @file 文件地址 
  * @url 上传路径
  * @formData 上传数据
  */
@@ -56,12 +56,58 @@ export function UploadOne(file, formData = {}) {
 
 
 
+export function UploadSomeFile(file, formData = {}) {
+	let header = {}
+	if (getToken()) {
+		header['Authorization'] = 'Bearer ' + getToken()
+	}
+	return new Promise((resolve, reject) => {
+		try {
+			uni.uploadFile({
+				url: '/api/file/uploadForm',
+				// filePath: file,
+				// name: 'file',
+				files:file,
+				formData: formData,
+				header: header,
+				success: (res) => {
+					console.log(res)
+					let r = JSON.parse(res.data)
+					resolve(r)
+				},
+				fail: (err) => {
+					console.log(err)
+					uni.showToast({
+						title: '服务器休息中,请稍后再试',
+						icon: "none",
+						position: "center",
+						duration: 3000
+					});
+				},
+				complete: (e) => {
 
+				}
+			})
+		} catch {
+			uni.showToast({
+				title: '网速不好哦!在试试',
+				icon: "none",
+				position: "center",
+				duration: 3000
+			})
+			uni.hideLoading()
+		}
 
-export function UploadSome(data) {
-	return request({
-		url: '/api/file/uploadMul',
-		method: 'post',
-		data: data
 	})
-}
+}
+
+
+
+export function UploadSome(data) {
+    return request({
+        url: '/api/file/uploadMul',
+        method: 'post',
+        data: data
+    })
+}
+

+ 1 - 1
common/baiduUtil.js

@@ -38,7 +38,7 @@ export function idcard(path, token, type, callback) {
 			'Content-Type': 'application/x-www-form-urlencoded'
 		},
 		success: (res) => {
-			console.log("wwwwwww",res);
+			// console.log("wwwwwww",res);
 			callback(res.data)
 		}
 	})

+ 39 - 0
common/image.js

@@ -203,4 +203,43 @@ export function blobToDataURI(blob, callback) {
 	reader.onload = function(e) {
 		callback(e.target.result);
 	};
+}
+
+
+// base64转File
+export function base64toFilen(dataurl, filename = 'file') {
+	let arr = dataurl.split(',')
+	let mime = arr[0].match(/:(.*?);/)[1]
+	let suffix = mime.split('/')[1]
+	let bstr = atob(arr[1])
+	let n = bstr.length
+	let u8arr = new Uint8Array(n)
+	while (n--) {
+		u8arr[n] = bstr.charCodeAt(n)
+	}
+	return new File([u8arr], `${filename}.${suffix}`, {
+		type: mime
+	})
+}
+
+
+// File转blob
+export function fileToBlob(file, callback) {
+	var reader = new FileReader();
+
+	// 当文件读取完毕后,reader.result就会包含文件的内容
+	reader.onload = function(event) {
+		// 在这里,event.target.result就是文件的blob形式
+		var blob = new Blob([event.target.result], {
+			type: file.type
+		});
+
+		// 接下来,你可以使用这个blob对象了,例如用它来创建一个URL
+		var blobURL = URL.createObjectURL(blob);
+		callback(blobURL)
+
+	};
+
+	// 以数据URL的形式读取文件
+	reader.readAsArrayBuffer(file);
 }

+ 4 - 4
manifest.json

@@ -85,9 +85,9 @@
                 },
                 "/api" : {
                     // "target" : "http://10.16.4.9:8080", // 需要跨域的域名
-                    // "target" : "http://10.16.4.5:8080", // 需要跨域的域名
-                    "target" : "https://www.jlyanglao.com/prod-api", // 需要跨域的域名
+                    "target" : "http://10.16.4.5:8080", // 需要跨域的域名
 
+                    // "target" : "https://www.jlyanglao.com/prod-api", // 需要跨域的域名
                     // "target" : "http://121.36.73.159:805", // 需要跨域的域名
                     "changeOrigin" : true,
                     "secure" : false,
@@ -97,9 +97,9 @@
                 },
                 "/uploadPath" : {
                     // "target" : "http://10.16.4.9:8080/file/uploadPath/", // 需要跨域的域名
-                    // "target" : "http://10.16.4.5:8080/file/uploadPath/", // 需要跨域的域名
-                    "target" : "https://www.jlyanglao.com/prod-api/file/uploadPath/", // 需要跨域的域名
+                    "target" : "http://10.16.4.5:8080/file/uploadPath/", // 需要跨域的域名
 
+                    // "target" : "https://www.jlyanglao.com/prod-api/file/uploadPath/", // 需要跨域的域名
                     // "target" : "http://121.36.73.159:805/file/uploadPath/", // 需要跨域的域名
                     "changeOrigin" : true,
                     "secure" : false,

+ 32 - 14
pages.json

@@ -19,51 +19,61 @@
 		]
 	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+
 		{
-			"path": "pages/login/index",
+			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "登录"
+				"navigationBarTitleText": "首页"
 			}
 		},
+
 		{
-			"path": "pages/info/add",
+			"path": "pages/test/index",
 			"style": {
-				"navigationBarTitleText": "注册"
+				"navigationBarTitleText": "测试"
 				// "enablePullDownRefresh": true,
 				// "onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
 			}
 		},
+
 		{
-			"path": "pages/info/card",
+			"path": "pages/login/index",
 			"style": {
-				"navigationBarTitleText": "身份证识别"
+				"navigationBarTitleText": "登录"
+			}
+		},
+		{
+			"path": "pages/info/add",
+			"style": {
+				"navigationBarTitleText": "信息维护"
 				// "enablePullDownRefresh": true,
 				// "onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
 			}
 		},
 		{
-			"path": "pages/info/face",
+			"path": "pages/info/add-files",
 			"style": {
-				"navigationBarTitleText": "人脸识别"
+				"navigationBarTitleText": "老人信息维护"
 				// "enablePullDownRefresh": true,
 				// "onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
 			}
 		},
 		{
-			"path": "pages/test/index",
+			"path": "pages/info/card",
 			"style": {
-				"navigationBarTitleText": "测试"
+				"navigationBarTitleText": "身份证识别"
 				// "enablePullDownRefresh": true,
 				// "onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
 			}
 		},
 		{
-			"path": "pages/index/index",
+			"path": "pages/info/face",
 			"style": {
-				"navigationBarTitleText": "首页"
+				"navigationBarTitleText": "人脸识别"
+				// "enablePullDownRefresh": true,
+				// "onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
 			}
 		},
-
 		{
 			"path": "pages/lr/base",
 			"style": {
@@ -78,7 +88,15 @@
 		{
 			"path": "pages/lr/list",
 			"style": {
-				"navigationBarTitleText": "客户列表",
+				"navigationBarTitleText": "老人列表",
+				"enablePullDownRefresh": true,
+				"onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
+			}
+		},
+		{
+			"path": "pages/lr/shxxList",
+			"style": {
+				"navigationBarTitleText": "老人信息审核列表",
 				"enablePullDownRefresh": true,
 				"onReachBottomDistance": 100 //距离底部100像素时,触发加载更多功能
 			}

+ 2 - 2
pages/index/index.vue

@@ -28,7 +28,7 @@
 					<uni-list>
 						<uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
 							 :note="item.lrCydh"
-							thumbSize="lg" :showArrow="false">
+							thumbSize="lg" :showArrow="false" :to="'/pages/lr/shxxList?lrId='+item.id">
 							<template v-slot:header>
 								<image :src="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" style="width: 10vw;height: 5vh;margin-right: 2vw;border-radius: 50%;"></image>
 							</template>
@@ -161,7 +161,7 @@
 					// })
 					
 					
-					let baseUrl = '/pages/info/add'
+					let baseUrl = '/pages/info/add-files'
 					uni.navigateTo({
 						url: baseUrl
 					})

+ 884 - 0
pages/info/add-files.vue

@@ -0,0 +1,884 @@
+<template>
+	<view class="content">
+		<uni-card class="card">
+			<uni-section title="基本信息" type="line">
+
+				<view>
+					<view class="lzcOCR">
+						<view class="imgBox">
+							<image :src="zjcaijianSrc" style="width: 40vw;" mode="widthFix" @click="paizhao('front')">
+							</image>
+							<view class="text">拍摄人像面</view>
+						</view>
+						<view class="imgBox">
+							<image :src="zjcaijianSrcFan" style="width: 40vw;" mode="widthFix" @click="paizhao('back')">
+							</image>
+							<view class="text">拍摄国徽面</view>
+						</view>
+					</view>
+
+					<view class="miaoshu">
+						身份信息会跟进拍照的证件照片白动识别,不支持手动输入。如果识别错误,可尝试再次拍照.
+					</view>
+				</view>
+
+
+				<uni-forms ref="baseForm" :modelValue="baseFormData" :rules="rules" style="margin-top: 5vh;">
+
+
+					<uni-forms-item label="姓名" required name="lrXm">
+						<uni-easyinput ref="xm" type="text" :disabled="disabled" v-model="baseFormData.lrXm"
+							placeholder="请输入姓名" :inputBorder="true"></uni-easyinput>
+					</uni-forms-item>
+					<uni-forms-item label="手机号" required name="lrCydh">
+						<uni-easyinput type="text" v-model="baseFormData.lrCydh" :disabled="disabled"
+							placeholder="请输入手机号" :inputBorder="true"></uni-easyinput>
+					</uni-forms-item>
+					<uni-forms-item label="监护人姓名">
+						<uni-easyinput ref="xm" type="text" :disabled="disabled" v-model="baseFormData.jhrxm"
+							placeholder="请输入监护人姓名" :inputBorder="true"></uni-easyinput>
+					</uni-forms-item>
+					<uni-forms-item label="监护人联系电话">
+						<uni-easyinput type="text" v-model="baseFormData.jhrlxdh" :disabled="disabled"
+							placeholder="请输入监护人联系电话" :inputBorder="true"></uni-easyinput>
+					</uni-forms-item>
+					<uni-forms-item label="街道社区">
+						<uni-easyinput type="text" v-model="baseFormData.diqu" @focus="toggle('bottom')"
+							placeholder="请选择街道社区" :clearable="false"></uni-easyinput>
+
+
+					</uni-forms-item>
+					<uni-forms-item label="住址" required name="jzdz">
+						<uni-easyinput type="text" v-model="baseFormData.jzdz" :disabled="disabled" placeholder="请输入住址"
+							:inputBorder="true"></uni-easyinput>
+					</uni-forms-item>
+
+					<uni-forms-item label="是否特困">
+						<uni-data-checkbox v-model="baseFormData.istk" :localdata="radioData"></uni-data-checkbox>
+					</uni-forms-item>
+
+					<uni-forms-item label="特困证明" v-if="baseFormData.istk == 1">
+						<myfile :zczmList="tkzmList" @recordsChange="tkChange"></myfile>
+					</uni-forms-item>
+
+					<uni-forms-item label="是否低保">
+						<uni-data-checkbox v-model="baseFormData.isdb" :localdata="radioData"></uni-data-checkbox>
+					</uni-forms-item>
+
+					<uni-forms-item label="低保证明" v-if="baseFormData.isdb == 1">
+						<myfile :zczmList="dbzmList" @recordsChange="dbChange"></myfile>
+					</uni-forms-item>
+
+					<uni-forms-item label="是否重残">
+						<uni-data-checkbox v-model="baseFormData.iszc" :localdata="radioData"></uni-data-checkbox>
+					</uni-forms-item>
+
+					<uni-forms-item label="重残证明" v-if="baseFormData.iszc == 1">
+						<!-- <uni-file-picker v-model="zczm" @select="imgSelect3" @delete="imgDelete3"></uni-file-picker> -->
+						<myfile :zczmList="zczmList" @recordsChange="zcChange"></myfile>
+					</uni-forms-item>
+
+					<view v-if="show">
+						<uni-forms-item label="直接上传">
+							<uni-data-checkbox v-model="radio" :localdata="radioData"></uni-data-checkbox>
+						</uni-forms-item>
+						<text>注意:人证比对不成功可以直接注册人工审核!</text>
+					</view>
+
+
+					<view class="miaoshu" v-if="isCheck">
+						该人员存在未审核信息,请先审核!
+					</view>
+
+					<view>
+
+						<view v-if="isCheck">
+							<button cursor-spacing="22px" :disabled="isCheck" class="buttonClass"
+								@click="preSave()">认证</button>
+						</view>
+						<view v-else>
+							<button v-if="faceBase64 && ((show && radio == '1') || (!show && radio == '0'))"
+								cursor-spacing="22px" class="buttonClass" @click="save()">保存</button>
+							<button v-else cursor-spacing="22px" class="buttonClass" @click="preSave()">认证</button>
+						</view>
+
+					</view>
+				</uni-forms>
+			</uni-section>
+
+
+
+
+		</uni-card>
+
+
+		<view>
+			<!-- 普通弹窗 -->
+			<uni-popup ref="popup" background-color="#fff">
+				<picker-view :indicator-style="indicatorStyle" @change="bindChange" class="picker-view">
+					<picker-view-column>
+						<view class="item" v-for="(item,index) in jiedaoData" :key="index">{{item.label}}</view>
+					</picker-view-column>
+					<picker-view-column>
+						<view class="item" v-for="(item,index) in shequData" :key="index">{{item.label}}</view>
+					</picker-view-column>
+				</picker-view>
+			</uni-popup>
+		</view>
+	</view>
+</template>
+
+<script>
+	import myfile from '@/components/my-file/my-file.vue';
+	let jl = require('../../static/json/bufen.json')
+	import {
+		decryptRowData_ECB,
+		decryptData_ECB
+	} from '@/common/sm4.js'
+	import {
+		GetChildListByCode
+	} from '@/api/dict.js'
+	import {
+		showConfirm,
+		getDictInfo,
+		toast,
+		toBase64
+	} from '@/common/common.js'
+	import {
+		UploadOne,
+		UploadSome,
+		UploadSomeFile
+	} from '@/api/upload.js'
+	import {
+		Register
+	} from '@/api/login.js'
+	import {
+		getUser
+	} from '@/common/auth.js'
+	import CryptoJS from 'crypto-js';
+	import config from '@/config.js';
+	import idCardNoUtil from '@/common/idcard.js'
+	import {
+		translate,
+		base64ToUrl,
+		blobToDataURI,
+		translateAll,
+		base64toFilen,
+		fileToBlob
+	} from '@/common/image.js'
+	import {
+		setToken,
+		setOpenid,
+		getOpenid,
+		setUser
+	} from '@/common/auth.js'
+	import {
+		getAccessToken,
+		idcard,
+		match
+	} from '@/common/baiduUtil.js'
+	import {
+		updateKhjbxx,
+		infoKhjbxx,
+		GetLrByZjhm,
+		SaveKhjbxx
+	} from '@/api/kh.js'
+	export default {
+		components: {
+			myfile
+		},
+		data() {
+			return {
+				tkzmList: [],
+				dbzmList: [],
+				zczmList: [],
+				isCheck: false,
+				indicatorStyle: `height: 50px;`,
+				jiedaoData: [],
+				shequData: [],
+				jiedaoValue: {},
+				shequValue: {},
+				disabled: true,
+				show: false,
+				radio: "0",
+				radioData: [{
+					text: '否',
+					value: "0"
+				}, {
+					text: '是',
+					value: "1"
+				}],
+				// 字典
+				dicts: {
+					// 民族
+					C0009: [],
+					// 性别
+					C0007: [],
+				},
+				// 百度云access_token
+				token: '',
+				// 人像地址
+				src: "/static/images/head.png",
+				// 身份拍摄地址
+				zjSrc: "",
+				// 身份证裁剪地址
+				zjcaijianSrc: '/static/images/zhengmian.png',
+				zjcaijianSrcFan: '/static/images/fanmian.png',
+				cardType: 'front',
+				frontBase64: '',
+				backBase64: '',
+				file1: "",
+				file2: "",
+				file3: "",
+				file4: "",
+				file5: "",
+				file6: "",
+				showSrc: "",
+				// 人员信息
+				userInfo: {},
+				// 组
+				groupId: '',
+				// 身份证号加密
+				idcardMD5: '',
+				// 人像base64
+				faceBase64: '',
+				// 身份证base64
+				idcardFace: '',
+				idcardFaceUrl: '',
+				// 对比份数
+				score: 0,
+				// ocrXm
+				ocrXm: '',
+				isSearch: false,
+				baseFormData: {
+					lrXm: '',
+					lrZjhm: '',
+					lrHjbcxx: '',
+					lrCydh: '',
+					code: '',
+					diqu: '',
+					lrHjdz: '',
+					istk: "0",
+					isdb: "0",
+					iszc: "0",
+					lzzt: 0,
+					lrZjz: ""
+				},
+				rules: {
+					jzdz: {
+						rules: [{
+							required: true,
+							errorMessage: '住址不能为空'
+						}]
+					},
+					lrXm: {
+						rules: [{
+							required: true,
+							errorMessage: '姓名不能为空'
+						}]
+					},
+					diqu: {
+						rules: [{
+							required: true,
+							errorMessage: '请选择地区'
+						}]
+					},
+					photo: {
+						rules: [{
+							required: true,
+							errorMessage: '请上传人像'
+						}]
+					},
+					lrCydh: {
+						rules: [{
+								required: true,
+								errorMessage: '手机号不能为空'
+							},
+							{
+								format: 'number',
+								errorMessage: '请输入正确的手机号',
+							},
+							{
+								pattern: '^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\\d{8})$',
+								errorMessage: '请输入正确的手机号',
+							}
+						]
+					}
+				},
+			}
+		},
+		onLoad(o) {
+			getAccessToken(this.callbackToken)
+			window.addEventListener("message", e => {
+				if (e.data.data && e.data.data.arg.base64) {
+					setTimeout(() => {
+						uni.showLoading({
+							title: '正在识别中...'
+						})
+					}, 100);
+					this.faceBase64 = ''
+					this.cardType = uni.getStorageSync("cardType")
+					console.log("正反面", this.cardType);
+					if (this.cardType == 'front') e.data.data.arg.base64 = jl.front
+					if (this.cardType == 'back') e.data.data.arg.base64 = jl.back
+
+
+					// 压缩	
+					translateAll(base64ToUrl(e.data.data.arg.base64), (base64, blobUrl) => {
+						idcard(base64, this.token, this.cardType, this.callbackIdcard)
+					})
+
+					uni.removeStorageSync('cardType')
+				}
+
+				if (e.data.data && e.data.data.arg.faceBase64) {
+					setTimeout(() => {
+						uni.showLoading({
+							title: '正在识别中...'
+						})
+					}, 100);
+					this.faceBase64 = e.data.data.arg.faceBase64
+					// 压缩
+					translateAll(base64ToUrl(this.faceBase64), (base64, blobUrl) => {
+						this.src = this.faceBase64
+						match(this.token, base64.split(",")[1], this.idcardFace, this.callbackFace)
+					})
+				}
+			}, false)
+
+
+			this.getDictList(Object.keys(this.dicts), this.dicts)
+			this.baseFormData.code = getOpenid()
+
+			this.userInfo = getUser()
+			this.baseFormData.lrHjdz = this.userInfo.dept.locationCode
+			this.groupId = this.userInfo.dept.locationCode.substring(0, 6)
+			if (this.userInfo.userType == '07') {
+				this.updateFlag = true
+				let info = JSON.parse(o.info)
+				this.baseFormData.lrHjdz = info.lrHjdz
+				this.groupId = info.lrHjdz.substring(0, 6)
+				this.baseFormData = info
+				this.src = config.baseUrl + info.lrTx
+			}
+			//  查询街道和社区
+			this.getAddressList(this.baseFormData.lrHjdz)
+
+
+		},
+		methods: {
+			tkChange(e) {
+				this.tkzmList = e
+			},
+			dbChange(e) {
+				this.dbzmList = e
+			},
+			zcChange(e) {
+				this.zczmList = e
+			},
+			getAddressList(code) {
+				GetChildListByCode({
+					code: code
+				}).then(res => {
+					if (res.data) {
+						this.jiedaoData = res.data
+						this.shequData = res.data[0].children
+
+
+						this.jiedaoValue = this.jiedaoData[0]
+						this.shequValue = this.shequData[0]
+						this.baseFormData.diqu = this.jiedaoValue.label + '/' + this.shequValue.label
+						this.baseFormData.lrHjdz = this.shequValue.code
+					}
+				})
+			},
+			callbackFace(res) {
+				uni.hideLoading()
+				if (res.data.error_msg == 'SUCCESS') {
+					this.score = res.data.result.score;
+
+					this.baseFormData.lrTxdb = JSON.stringify({
+						"lrJmzjhm": this.idcardMD5,
+						"xsfs": this.score
+					})
+					if (this.score >= config.score) {
+						this.show = false
+						this.baseFormData.lzzt = 3
+						this.baseFormData.lrSpyj = '同意'
+					} else {
+						// 低于80选项是否人工审核,是的话进记录表
+						// 身份证头像保存后端
+						// 人脸库注册人脸、身份证md5
+						// 修改的时候去人脸库搜索,搜索不到不允许修改
+						// 修改成功替换原始人脸库照片
+						// 首次修改搜索身份证
+						// 后端没入库,人脸库相应删除
+						// ocr失败身份证原版入库,ocr成功人脸入库
+						// showConfirm('人像与身份证不符,请重新上传')
+						this.baseFormData.lzzt = 1
+						this.baseFormData.lrSpyj = ''
+						this.show = true
+					}
+					this.baseFormData.prelrZjz = this.zjcaijianSrc
+
+				} else {
+					showConfirm(res.data.error_msg)
+					this.faceBase64 = ''
+				}
+			},
+			callbackToken(e) {
+				this.token = e
+			},
+			callbackIdcard(words) {
+				uni.hideLoading()
+				if (!this.cardType) {
+					this.cardType = uni.getStorageSync("cardType")
+				}
+				console.log(words, this.cardType);
+				if (this.cardType == 'front') {
+					if (!words) {
+						showConfirm('请上传正确的身份证人像面')
+						return
+					}
+					if (words.image_status == "other_type_card") {
+						showConfirm('请上传正确的身份证人像面')
+						return
+					}
+
+					let id = words.words_result['公民身份号码'].words
+					let csrq = words.words_result['出生'].words
+					let sex = words.words_result['性别'].words
+					let zz = words.words_result['住址'].words
+					let info = idCardNoUtil.getIdCardInfo(id)
+					if (!idCardNoUtil.checkIdCardNo(id)) {
+						showConfirm('身份证号识别有误,请重新上传')
+						return
+					}
+					if (info.birthday != csrq) {
+						showConfirm('身份证出生日期识别有误,请重新上传')
+						return
+					}
+					if (info.gender != sex) {
+						showConfirm('身份证性别识别有误,请重新上传')
+						return
+					}
+					if (words.image_status == "reversed_side") {
+						showConfirm('请上传身份证人像面')
+						return
+					}
+					if (words.risk_type != "normal") {
+						// normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknown-其他未知情况
+						showConfirm('请上传正确的身份证人像面')
+						return
+					}
+					// todo 根据身份证号查询此人信息是否可修改。this.isCheck = true
+
+
+
+					this.frontBase64 = words.card_image
+					this.zjcaijianSrc = 'data:image/jpeg;base64,' + words.card_image
+					this.disabled = false
+
+					// this.baseFormData.lrXb = getDictInfo(this.dicts.C0007, words.words_result['性别'].words)[0].value
+					// this.baseFormData.lrMz = getDictInfo(this.dicts.C0009, words.words_result['民族'].words)[0].value
+
+					this.baseFormData.lrXb = words.words_result['性别'].words
+					this.baseFormData.lrMz = words.words_result['民族'].words
+
+
+					this.idcardFace = words.photo
+					this.idcardFaceUrl = base64ToUrl(words.photo);
+					this.baseFormData.lrZjhm = id
+					this.baseFormData.lrCsrq = csrq
+					this.idcardMD5 = CryptoJS.MD5(this.baseFormData.lrZjhm).toString()
+					this.baseFormData.lrXm = words.words_result['姓名'].words
+					this.baseFormData.lrHjbcxx = words.words_result['姓名'].words
+					this.ocrXm = words.words_result['姓名'].words
+
+
+
+					if (this.userInfo.userType != '07') {
+						GetLrByZjhm({
+							lrJmzjhm: this.idcardMD5
+						}).then(res => {
+							if (res.data) this.baseFormData = decryptData_ECB(res.data, ["lrZjhm", "lrXm",
+								"lrHjbcxx",
+								"lrXjdzBcxx",
+								"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh",
+								"cjzh",
+								"yhzh", "khmc", "jhrxm", "jhrlxdh"
+							], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5]);
+
+
+							if (this.baseFormData.lrTx) this.src = config.baseUrl + this.baseFormData.lrTx
+							if (this.baseFormData.lrHjdz) {
+								this.jiedaoData.forEach(e => {
+									if (e.children.length > 0) {
+										e.children.forEach(ee => {
+											if (ee) {
+												if (ee.code == this.baseFormData.lrHjdz) {
+													this.shequValue = ee
+													this.jiedaoValue = e
+													this.baseFormData.diqu = this.jiedaoValue
+														.label +
+														'/' + this.shequValue.label
+												}
+											} else {
+												if (e.code == this.baseFormData.lrHjdz) {
+													this.jiedaoValue = e
+													this.baseFormData.diqu = this.jiedaoValue.label
+												}
+											}
+
+										})
+									}
+								})
+							} else {
+								// 地区回显
+								this.getAddressList()
+							}
+							if (res.data && res.data.sfzzpb) this.zjcaijianSrcFan = res.data.sfzzpb
+							if (res.data && res.data.tkzm) this.tkzmList = [res.data.tkzm]
+							if (res.data && res.data.dbzm) this.dbzmList = [res.data.dbzm]
+							if (res.data && res.data.zczm) this.zczmList = [res.data.zczm]
+							if (res.data) this.updateFlag = true
+
+						})
+					}
+
+					// if (id) {
+					// 	GetLrByZjhm({
+					// 		lrJmzjhm: this.idcardMD5
+					// 	}).then(res => {
+					// 		console.log(res);
+					// 		if (res.data) {
+					// 			showConfirm('该信息已存在,请登录').then(res => {
+					// 				if (res.confirm == true) {
+					// 					uni.reLaunch({
+					// 						url: '/pages/login/index'
+					// 					})
+					// 				}
+					// 			})
+					// 		} else {
+					// 			this.disabled = false
+					// 		}
+					// 	})
+					// }
+				} else if (this.cardType == 'back') {
+					if (!words) {
+						showConfirm('请上传正确的身份证国徽面')
+						return
+					}
+					if (words.image_status == "other_type_card") {
+						showConfirm('请上传正确的身份证国徽面')
+						return
+					}
+					if (words.risk_type != "normal") {
+						// normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknown-其他未知情况
+						showConfirm('请上传正确的身份证国徽面')
+						return
+					}
+					// words.words_result['失效日期'].words
+					// words.words_result['签发日期'].words
+					// words.words_result['签发机关'].words
+					if (words && words.words_result) {
+						this.baseFormData.sfzqfjg = words.words_result['签发机关'].words
+						this.baseFormData.sfzyxqxs = words.words_result['签发日期'].words
+						this.baseFormData.sfzyxqxz = words.words_result['失效日期'].words
+						this.backBase64 = words.card_image
+						this.zjcaijianSrcFan = 'data:image/jpeg;base64,' + words.card_image
+					}
+
+				}
+			},
+			toggle(type) {
+				uni.hideKeyboard()
+				// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
+				this.$refs.popup.open(type)
+			},
+			bindChange(e) {
+				if (e.detail.value.length == 1) {
+					this.jiedaoValue = this.jiedaoData[e.detail.value[0]]
+					this.shequData = this.jiedaoData[e.detail.value[0]].children
+					if (this.shequData.length > 0 && this.shequData[0] != null) {
+						this.shequValue = this.shequData[0]
+						this.baseFormData.diqu = this.jiedaoValue.label + '/' + this.shequValue.label
+						this.baseFormData.lrHjdz = this.shequValue.code
+					} else {
+						this.shequData = []
+						this.shequValue = ''
+						this.baseFormData.diqu = this.jiedaoValue.label
+						this.baseFormData.lrHjdz = this.jiedaoValue.code
+					}
+
+				} else {
+					this.jiedaoValue = this.jiedaoData[e.detail.value[0] ?? 0]
+					this.shequValue = this.shequData[e.detail.value[1]]
+					this.baseFormData.diqu = this.jiedaoValue.label + '/' + this.shequValue.label
+					this.baseFormData.lrHjdz = this.shequValue.code
+				}
+
+			},
+			buildDataByLevel(data, pid) {
+				let result = [];
+				data.filter(e => {
+					return e.parent_id === pid
+				}).forEach(e => {
+					result.push({
+						value: e.code,
+						text: e.name,
+						id: e.id,
+						children: this.buildDataByLevel(data, e.id)
+					})
+				})
+				return result.length > 0 ? result : []
+			},
+			paizhao(type) {
+				this.type = type
+				if (this.type == 'back' && !this.ocrXm) {
+					showConfirm('请先拍摄身份证人像面')
+					return
+				}
+				uni.setStorageSync("cardType", type)
+				uni.navigateTo({
+					url: '/pages/info/card'
+				})
+			},
+			onchange(e) {
+				console.log("onchange", e);
+			},
+			onnodeclick(node) {
+				this.groupId = node.code.substring(0, 6)
+				this.baseFormData.lrHjdz = this.groupId + '000000'
+			},
+
+			preSave() {
+				if (this.baseFormData.lzzt != 0 && this.baseFormData.lzzt != 3 && this.baseFormData.lzzt != 6) {
+					showConfirm('信息正在审核,请审核后重试')
+					return
+				}
+				if (!this.ocrXm) {
+					showConfirm('请先拍摄身份证人像面')
+					return
+				}
+				if (this.zjcaijianSrcFan == '/static/images/fanmian.png') {
+					showConfirm('请先拍摄身份证国徽面')
+					return
+				}
+				if (this.baseFormData.istk == 1 && this.tkzmList.length == 0) {
+					showConfirm('请先上传特困证明')
+					return
+				}
+				if (this.baseFormData.isdb == 1 && this.dbzmList.length == 0) {
+					showConfirm('请先上传低保证明')
+					return
+				}
+				if (this.baseFormData.iszc == 1 && this.zczmList.length == 0) {
+					showConfirm('请先上传重残证明')
+					return
+				}
+
+
+				this.$refs['baseForm'].validate().then(res => {
+					if (this.ocrXm != this.baseFormData.lrXm) {
+						showConfirm('姓名与真实姓名不符,请重新上传身份证')
+						return
+					}
+					uni.navigateTo({
+						url: '/pages/info/face'
+					})
+				})
+			},
+			save() {
+
+				if ((this.score >= config.score) || (this.score < config.score && this.radio == '1')) {
+					uni.showLoading({
+						title: '正在保存中...'
+					})
+					let paramFiles = []
+
+
+					fileToBlob(base64toFilen('data:image/jpeg;base64,' + this.frontBase64), (e) => {
+						this.file1 = e
+						paramFiles.push({
+							name: "file1",
+							uri: this.file1
+						})
+					})
+					if (this.backBase64) {
+						fileToBlob(base64toFilen('data:image/jpeg;base64,' + this.backBase64), (e) => {
+							this.file2 = e
+							paramFiles.push({
+								name: "file2",
+								uri: this.file2
+							})
+						})
+					}
+
+					fileToBlob(base64toFilen(this.src), (e) => {
+						this.file3 = e
+						paramFiles.push({
+							name: "file3",
+							uri: this.file3
+						})
+					})
+
+
+					if (this.baseFormData.istk == 1 && this.tkzmList.length == 1 && this.tkzmList[0].indexOf(
+							'data:image') > -1) {
+						fileToBlob(base64toFilen(this.tkzmList[0]), (e) => {
+							this.file4 = e
+							paramFiles.push({
+								name: "file4",
+								uri: this.file4
+							})
+						})
+						// 特殊材料待审核
+						this.baseFormData.lzzt = 5
+						this.baseFormData.lrSpyj = '无'
+					}
+					if (this.baseFormData.isdb == 1 && this.dbzmList.length == 1 && this.dbzmList[0].indexOf(
+							'data:image') > -1) {
+						fileToBlob(base64toFilen(this.dbzmList[0]), (e) => {
+							this.file5 = e
+							paramFiles.push({
+								name: "file5",
+								uri: this.file5
+							})
+						})
+						// 特殊材料待审核
+						this.baseFormData.lzzt = 5
+						this.baseFormData.lrSpyj = '无'
+					}
+					if (this.baseFormData.iszc == 1 && this.zczmList.length == 1 && this.zczmList[0].indexOf(
+							'data:image') > -1) {
+						fileToBlob(base64toFilen(this.zczmList[0]), (e) => {
+							this.file6 = e
+							paramFiles.push({
+								name: "file6",
+								uri: this.file6
+							})
+						})
+						// 特殊材料待审核
+						this.baseFormData.lzzt = 5
+						this.baseFormData.lrSpyj = '无'
+					}
+					console.log("this1", this)
+					let that = this
+					setTimeout(function() {
+						UploadSomeFile(paramFiles).then(res => {
+							that.baseFormData.lrZjz = res.data.url1
+							if (that.backBase64) {
+								that.baseFormData.sfzzpb = res.data.url2
+							}
+							that.baseFormData.lrTx = res.data.url3
+							if (that.baseFormData.istk == 1 && that.tkzmList.length == 1) {
+								that.baseFormData.tkzm = res.data.url4
+							}
+							if (that.baseFormData.isdb == 1 && that.dbzmList.length == 1) {
+								that.baseFormData.dbzm = res.data.url5
+							}
+							if (that.baseFormData.iszc == 1 && that.zczmList.length == 1) {
+								that.baseFormData.zczm = res.data.url6
+							}
+
+							that.$refs['baseForm'].validate().then(res => {
+								if (that.updateFlag) {
+									updateKhjbxx(that.baseFormData).then(r => {
+										uni.hideLoading()
+										if (r.code == 200) {
+											toast('保存成功')
+											setTimeout(function() {
+												uni.switchTab({
+													url: '/pages/index/index'
+												})
+											}, 1000)
+										}
+									})
+								} else {
+									SaveKhjbxx(that.baseFormData).then(r => {
+										uni.hideLoading()
+										if (r.code == 200) {
+											toast('保存成功')
+											// setOpenid(r.data.openId)
+											// setUser(r.data.sysUser)
+											// setToken(r.data.token.access_token)
+											setTimeout(function() {
+												uni.switchTab({
+													url: '/pages/index/index'
+												})
+											}, 1000)
+										}
+									})
+								}
+
+							}).catch(err => {
+								uni.hideLoading()
+							})
+
+						})
+					}, 500)
+				} else {
+					showConfirm('请重新上传人像')
+					return
+				}
+
+
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.content {
+		padding: 1vh;
+	}
+
+
+	.lzcOCR {
+		display: flex;
+		justify-content: space-between;
+		margin-top: 5vh;
+
+	}
+
+	.imgBox {
+		width: 47%;
+		text-align: center;
+
+		image {
+			width: 100%;
+		}
+
+		.text {
+			width: 100%;
+			/* background-color: red; */
+		}
+	}
+
+	.miaoshu {
+		margin-top: 5vh;
+		font-size: 14px;
+	}
+
+	.buttonClass {
+		margin-top: 4vh;
+		margin-left: 4vw;
+		width: 68vw;
+		/* height: 5vh; */
+		border-radius: 16px;
+		border: 1px solid rgba(176, 179, 199, 1);
+		background: #28d87d;
+	}
+
+	.picker-view {
+		width: 750rpx;
+		height: 600rpx;
+		margin-top: 20rpx;
+	}
+
+	.item {
+		line-height: 100rpx;
+		text-align: center;
+	}
+</style>

+ 11 - 3
pages/info/add.vue

@@ -34,6 +34,14 @@
 						<uni-easyinput type="text" v-model="baseFormData.lrCydh" :disabled="disabled"
 							placeholder="请输入手机号" :inputBorder="true"></uni-easyinput>
 					</uni-forms-item>
+					<uni-forms-item label="监护人姓名">
+						<uni-easyinput ref="xm" type="text" :disabled="disabled" v-model="baseFormData.jhrxm"
+							placeholder="请输入监护人姓名" :inputBorder="true"></uni-easyinput>
+					</uni-forms-item>
+					<uni-forms-item label="监护人联系电话">
+						<uni-easyinput type="text" v-model="baseFormData.jhrlxdh" :disabled="disabled"
+							placeholder="请输入监护人联系电话" :inputBorder="true"></uni-easyinput>
+					</uni-forms-item>
 					<uni-forms-item label="街道社区">
 						<uni-easyinput type="text" v-model="baseFormData.diqu" @focus="toggle('bottom')"
 							placeholder="请选择街道社区" :clearable="false"></uni-easyinput>
@@ -301,8 +309,8 @@
 					this.faceBase64 = ''
 					this.cardType = uni.getStorageSync("cardType")
 					console.log("正反面",this.cardType);
-					// if (this.cardType == 'front') e.data.data.arg.base64 = jl.front
-					// if (this.cardType == 'back') e.data.data.arg.base64 = jl.back
+					if (this.cardType == 'front') e.data.data.arg.base64 = jl.front
+					if (this.cardType == 'back') e.data.data.arg.base64 = jl.back
 
 					
 					// 压缩	
@@ -488,7 +496,7 @@
 								"lrXjdzBcxx",
 								"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh",
 								"cjzh",
-								"yhzh", "khmc"
+								"yhzh", "khmc", "jhrxm", "jhrlxdh"
 							], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5]);
 
 

+ 12 - 8
pages/login/index.vue

@@ -36,14 +36,14 @@
 						</view> -->
 						<view class="mzText" id="protocol">
 							<radio :checked="protocol" @click="radioChange"></radio>
-							<text class="global-font">已阅读并同意</text>
-							<text class="global-font">
+							<view class="global-font">已阅读并同意</view>
+							<view class="global-font">
 								<navigator url="/pages/protocol/yonghuxieyi" hover-class="none">《用户协议》</navigator>
-							</text>
-							<text class="global-font">和</text>
-							<text class="global-font">
+							</view>
+							<view class="global-font">和</view>
+							<view class="global-font">
 								<navigator url="/pages/protocol/yinsizhengce" hover-class="none">《隐私政策》</navigator>
-							</text>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -96,8 +96,8 @@
 					username: '',
 					password: '',
 					// code: "081X2kll21UGPc4HRlml27WxeO3X2kl6",
-					// username: '15143018065',
-					// password: 'sckj12356',
+					username: '15143018065',
+					password: 'sckj12356',
 					openid: "",
 				},
 				rules: {
@@ -279,6 +279,10 @@
 							uni.switchTab({
 								url: '/pages/index/index'
 							})
+							
+							// uni.navigateTo({
+							// 	url:'/pages/test/index'
+							// })
 						}
 					})
 

+ 1 - 1
pages/lr/list.vue

@@ -4,7 +4,7 @@
 			<uni-search-bar :radius="100" @confirm="search" placeholder="请输入姓名搜索" v-model="form.lrXm"></uni-search-bar>
 			<uni-list>
 				<uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
-					:thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.lrCydh"
+					:thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.lrCydh" :to="'/pages/lr/shxxList?lrId='+item.id"
 					thumbSize="lg" :showArrow="false">
 					<template v-slot:footer>
 						<view v-if="item.lzzt == '0'"

+ 128 - 0
pages/lr/shxxList.vue

@@ -0,0 +1,128 @@
+<template>
+	<view>
+		<uni-card>
+			<!-- <uni-search-bar :radius="100" @confirm="search" placeholder="请输入姓名搜索" v-model="form.lrXm"></uni-search-bar> -->
+			<uni-list>
+				<uni-list-item v-for="(item,index) in dataList" :key="index" :title="item.lrXm"
+					:thumb="item.lrTx?config.baseUrl+item.lrTx:config.baseUrl + config.head" :note="item.lrCydh"
+					thumbSize="lg" :showArrow="false">
+					<template v-slot:footer>
+						<view v-if="item.lzzt == '0'"
+							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/caogao.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
+							<text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
+							<text v-else>{{item.createTime.substring(0,8) }}</text>
+							<text>{{item.lrSpyj || '无'}}</text>
+						</view>
+						<view v-else-if="item.lzzt == '1' || item.lzzt == '2'"
+							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/daishenhe.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
+							<text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
+							<text v-else>{{item.createTime.substring(0,8) }}</text>
+							<text>{{item.lrSpyj || '无'}}</text>
+						</view>
+						<view v-else-if="item.lzzt == '3'"
+							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/tongguo.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
+							<text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
+							<text v-else>{{item.createTime.substring(0,8) }}</text>
+							<text>{{item.lrSpyj || '无'}}</text>
+						</view>
+						<view v-else-if="item.lzzt == '4'"
+							style="width: 60px;display: flex;flex-direction: column;background-image: url('../../static/images/jujue.png');background-position: left;background-size:58px 58px;background-repeat: no-repeat;">
+							<text v-if="item.updateTime">{{item.updateTime.substring(0,8) }}</text>
+							<text v-else>{{item.createTime.substring(0,8) }}</text>
+							<text>{{item.lrSpyj || '无'}}</text>
+						</view>
+					</template>
+				</uni-list-item>
+			</uni-list>
+			<uni-load-more status="status" @clickLoadMore="clickLoadMore"></uni-load-more>
+		</uni-card>
+	</view>
+</template>
+
+<script>
+	import {
+		getToken,
+		getUser
+	} from '@/common/auth.js'
+	import {
+		ListKhjbxx,
+		ListKhShxx
+	} from '@/api/kh.js'
+	import {
+		decryptRowData_ECB
+	} from '@/common/sm4.js'
+	export default {
+		components: {},
+		data() {
+			return {
+				status: 'more',
+				form: {
+					pageNum: 1,
+					pageSize: 10,
+					lrId: ''
+				},
+				dataList: [],
+				total: 0,
+			}
+		},
+		mounted() {
+			this.userInfo = getUser()
+			this.getList()
+		},
+		created() {},
+		onLoad: function(options) {
+			this.form.lrId = options.lrId
+		},
+		onPullDownRefresh() {
+			this.dataList = []
+			this.form.pageNum = 1
+			this.form.pageSize = 10
+			this.getList()
+		},
+		onReachBottom() {
+			if (this.dataList.length < this.total) {
+				this.form.pageNum += 1
+				this.getList()
+			}
+		},
+		methods: {
+			search() {
+				this.dataList = []
+				this.form.pageNum = 1
+				this.form.pageSize = 10
+				this.getList()
+			},
+			clickLoadMore(e) {
+				this.status = 'loading'
+				if (this.dataList.length < this.total) {
+					this.form.pageNum += 1
+					this.getList()
+				} else {
+					this.status = 'no-more'
+				}
+			},
+			getList() {
+				ListKhShxx(this.form).then(res => {
+					if (res.code == 200) {
+						this.total = res.total
+						let list = decryptRowData_ECB(res.rows, ["lrZjhm", "lrXm", "lrHjbcxx", "lrXjdzBcxx",
+							"lrCydh", "lrPoxm", "lrPoZjmh", "jhrXm", "jhrSjhm", "zlrXm", "zlrDh", "cjzh",
+							"yhzh", "khmc"
+						], [2, 1, 4, 4, 3, 1, 2, 1, 2, 1, 3, 5, 5, 5])
+						this.dataList.push(...list)
+						uni.stopPullDownRefresh();
+						if (this.dataList.length < this.total) {
+							this.status = 'more'
+						} else if (this.dataList.length == this.total) {
+							this.status = 'no-more'
+						}
+					}
+				})
+			}
+		},
+		watch: {},
+	}
+</script>
+
+<style>
+</style>

+ 80 - 154
pages/test/index.vue

@@ -1,177 +1,103 @@
 <template>
 	<view>
-		<web-view src="../../static/card.html"></web-view>
-	</view>
-</template>
-<script>
-	export default {
-		onLoad() {
-
-
-		},
-		methods: {
-			callouttap() {
-				console.log("ccc");
-			},
-			close() {
-				console.log("ddd");
-			}
-		}
-	}
-</script>
-
-
-<!-- <template>
-	<view class="wrap">
-		<view class="video-wrap">
-			<video id="video" :controls="false"></video>
-		</view>
-		<canvas id="canvas"></canvas>
-
-		<view class="tip" @click="screenshot">{{tip}}</view>
-
-		<view>
-			<image :src="src"></image>
-		</view>
+		<uni-file-picker :value="zczm" @select="imgSelect" @delete="imgDelete" :limit="limit"></uni-file-picker>
+		<button @click="upload">上传</button>
 	</view>
 </template>
 
 <script>
-	// JavaScript访问设备前后摄像头
-	const constraints = {
-		// 初始值
-		video: {
-			width: {
-				min: 300,
-				ideal: 1920,
-				max: 500,
-			},
-			height: {
-				min: 250,
-				ideal: 1080,
-				max: 400,
-			},
-			facingMode: 'user',
-			// user -- 前置 、environment -- 后置
-		},
-		// 流以正确的宽度和高度比例进入,如果它是处于纵向模式的手机,则需要进行尺寸反转
-	}
-
+	import {
+		UploadSomeFile,
+		UploadForm,
+		UploadFiles
+	} from '@/api/upload.js'
+	let jl = require('../../static/json/bufen.json')
+	import {
+		base64toFilen,
+		fileToBlob
+	} from '@/common/image.js'
 	export default {
+		name: "my-file",
 		data() {
 			return {
-				tip: '拍摄人脸,请确保正对手机且光线充足',
-				timer: null,
-				idcard: '',
-				name: '',
-				myVideo: null,
-				canvas: null,
-				videoStream: null,
-				error: '',
-				src: '',
-				info: '',
-				tempFilePaths: '',
-				canvasW: 0,
-				canvasH: 0,
-				params: {},
-			}
-		},
-		onLoad(options) {
-			// https://h5.51cheyaoshi.com/h5/#/pages/guarantor/face-identity?idcard=xxx&name=xxx
-			this.idcard = options.idcard
-			this.name = options.name
+				zczm: [],
+				zczmList: [],
+				limit: 5,
+			};
 		},
+		watch: {
 
-		onReady() {
-			this.init()
 		},
+		mounted() {
+			let data = []
+			let a;
+
+			// console.log("wwwww", fileToBlob(this.base64toFilen(jl.front)))
+			fileToBlob(this.base64toFilen(jl.front), (e) => {
+				console.log("wwwww", e);
+				a = e
+
+				// setTimeout(function() {
+				// 	data = [{
+				// 			name: "file1",
+				// 			uri: a
+				// 		},
+				// 		{
+				// 			name: "file2",
+				// 			uri: a
+				// 		}
+				// 	]
+				// 	UploadSomeFile(data).then(res => {
+				// 		console.log(res);
+				// 	})
+
+
+
+
+				// }, 500)
+			})
+			setTimeout(function(){
+				console.log("aaaaaaaaaaaaa", a);
+			},100)
 
-		onUnload() {
-			this.clearTimer()
 		},
-
 		methods: {
-			async init() {
-				try {
-					this.myVideo = document.querySelector('.uni-video-video')
-					// 前置摄像头
-					if ('mediaDevices' in window.navigator && 'getUserMedia' in window.navigator.mediaDevices) {
-						// 浏览器支持
-						this.videoStream = await window.navigator.mediaDevices.getUserMedia(constraints)
-						// 调用将询问用户是否允许访问摄像机。如果用户拒绝,它将引发异常并且不返回流。因此,必须在 try/catch 块内处理这种情况,它返回一个Promise,必须使用 async/await 或 then 块
-						this.myVideo.srcObject = this.videoStream
-						this.myVideo.play()
-						this.screenshot()
-					} else {
-						this.error = '手机不支持'
-					}
-				} catch (err) {
-					this.error = `init: ${err}`
-					console.log(err)
+			base64toFilen(dataurl, filename = 'file') {
+				let arr = dataurl.split(',')
+				console.log("文件类型", arr[0]);
+				let mime = arr[0].match(/:(.*?);/)[1]
+				let suffix = mime.split('/')[1]
+				let bstr = atob(arr[1])
+				let n = bstr.length
+				let u8arr = new Uint8Array(n)
+				while (n--) {
+					u8arr[n] = bstr.charCodeAt(n)
 				}
+				return new File([u8arr], `${filename}.${suffix}`, {
+					type: mime
+				})
 			},
-
-			// 绘制canvas画布、获取data
-			screenshot() {
-				try {
-					let canvas = document.querySelector('#canvas canvas')
-					this.timer = setTimeout(() => {
-						canvas.width = this.myVideo.videoWidth * 3
-						canvas.height = this.myVideo.videoHeight * 3
-						canvas.getContext('2d').drawImage(this.myVideo, 0, 0)
-						this.tempFilePaths = canvas.toDataURL('image/jpeg')
-						this.src = this.tempFilePaths
-						console.log(this.tempFilePaths);
-					}, 1000)
-				} catch (err) {
-					this.error = `screenshot: ${err}`
-					console.log(err)
-				}
+			imgSelect(e) {
+				console.log(e);
+				e.tempFilePaths.forEach(ee => {
+					this.zczmList.push({
+						uri: ee
+					})
+				})
+				console.log(this.zczmList);
 			},
-
-			clearTimer() {
-				clearTimeout(this.timer)
-				this.timer = null
+			imgDelete(e) {
+				this.zczmList.splice(this.zczmList.indexOf(e.tempFile.path), 1)
 			},
-		},
+			upload() {
+				UploadSomeFile(this.zczmList, {}).then(res => {
+					console.log(res);
+				})
+			}
+		}
 	}
 </script>
 
-<style scoped>
-	.wrap {
-		padding: 40px 20rpx;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-	}
+<style>
 
-	.tip {
-		margin-top: 16px;
-		font-size: 16px;
-		line-height: 44rpx;
-		color: rgba(10, 15, 45, 0.5);
-	}
-
-	.video-wrap {
-		width: 200px;
-		height: 200px;
-		border-radius: 50%;
-		overflow: hidden;
-		-webkit-backface-visibility: hidden;
-		-webkit-transform: translate3d(0, 0, 0);
-		background: #000000;
-	}
-
-	#video {
-		width: 100%;
-		height: 100%;
-		border-radius: 50%;
-		-webkit-backface-visibility: hidden;
-		-webkit-transform: translate3d(0, 0, 0);
-	}
-
-	#canvas {
-		position: absolute;
-		left: -10000px;
-	}
-</style> -->
+</style>