|
|
@@ -204,7 +204,7 @@ export default {
|
|
|
filePath: url,
|
|
|
name: 'file',
|
|
|
formData: {
|
|
|
- mIdCard: this.cardNumber
|
|
|
+ mCardNumber: this.cardNumber
|
|
|
},
|
|
|
header: {
|
|
|
platform: 2,
|
|
|
@@ -244,52 +244,52 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 对比人脸请求
|
|
|
- handleEncrypt(imgUrl) {
|
|
|
- uni.showLoading({
|
|
|
- title: '认证中,请稍后...'
|
|
|
- })
|
|
|
- uni.request({
|
|
|
- url: 'https://chtech.ncjti.edu.cn/testingServer/faceVerification/api/identity-comparison-record/comparison',
|
|
|
- method: 'post',
|
|
|
- data: {
|
|
|
- data: RSAencrypt(
|
|
|
- encrypt(
|
|
|
- JSON.stringify({
|
|
|
- url: imgUrl,
|
|
|
- name: this.name,
|
|
|
- // name: '周祥',
|
|
|
- idCard: this.cardNumber,
|
|
|
- category: '校园打卡',
|
|
|
- studentNumber: this.cardNumber
|
|
|
- })
|
|
|
- )
|
|
|
- )
|
|
|
- },
|
|
|
- success: (res) => {
|
|
|
- if (res.data.status == 200) {
|
|
|
- let result = JSON.parse(decrypt(res.data.authorization))
|
|
|
- // console.log(result)
|
|
|
- if (result.status == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: result.desc
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- this.handleUploading(imgUrl)
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: `${result.desc},请重新认证`,
|
|
|
- icon: 'error',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- this.tempImg = ''
|
|
|
- this.isAuthCamera = true
|
|
|
- // this.initData()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ // handleEncrypt(imgUrl) {
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: '认证中,请稍后...'
|
|
|
+ // })
|
|
|
+ // uni.request({
|
|
|
+ // url: 'https://chtech.ncjti.edu.cn/testingServer/faceVerification/api/identity-comparison-record/comparison',
|
|
|
+ // method: 'post',
|
|
|
+ // data: {
|
|
|
+ // data: RSAencrypt(
|
|
|
+ // encrypt(
|
|
|
+ // JSON.stringify({
|
|
|
+ // url: imgUrl,
|
|
|
+ // name: this.name,
|
|
|
+ // // name: '周祥',
|
|
|
+ // idCard: this.cardNumber,
|
|
|
+ // category: '校园打卡',
|
|
|
+ // studentNumber: this.cardNumber
|
|
|
+ // })
|
|
|
+ // )
|
|
|
+ // )
|
|
|
+ // },
|
|
|
+ // success: (res) => {
|
|
|
+ // if (res.data.status == 200) {
|
|
|
+ // let result = JSON.parse(decrypt(res.data.authorization))
|
|
|
+ // // console.log(result)
|
|
|
+ // if (result.status == 200) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: result.desc
|
|
|
+ // })
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.handleUploading(imgUrl)
|
|
|
+ // }, 1500)
|
|
|
+ // } else {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: `${result.desc},请重新认证`,
|
|
|
+ // icon: 'error',
|
|
|
+ // duration: 2000
|
|
|
+ // })
|
|
|
+ // this.tempImg = ''
|
|
|
+ // this.isAuthCamera = true
|
|
|
+ // // this.initData()
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
async handleUploading(imgUrl) {
|
|
|
let res = await this.$myRequest_clockIn({
|
|
|
url: '/attendance/api/sign/check/in/update',
|