Commit 4eb9b87c authored by 李晓兵's avatar 李晓兵

''

parent aed29c50
......@@ -10,5 +10,5 @@ module.exports = {
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_DEV&apiName=file_view&"',
ocrPath:'"http://180.104.121.66:8088/r/api"',
appId: '"com.xcmg.app"',
currentVersion: '"1.1.1"'
currentVersion: '"1.1.3"'
}
......@@ -59,8 +59,8 @@ import Jpush from './scripts/jpushService'
import Jmessage from './scripts/jmessageService'
// if (process.env.CONFIG_ENV === 'uat') {
//const VConsole = require('vconsole')
// new VConsole() // eslint-disable-line
const VConsole = require('vconsole')
new VConsole() // eslint-disable-line
// }
Vue.use(componentInstall)
......
......@@ -79,9 +79,11 @@ export default {
let vm = this
let onSuccess = function (mediaFiles) {
// 遍历获取录制的文件(iOS 只支持一次录制一个视频)
for (let i = 0; i < mediaFiles.length; i++) {
/* for (let i = 0; i < mediaFiles.length; i++) {
alert('录制成功!\n\n' + '文件名:' + mediaFiles[i].name + '\n' + '大小:' + mediaFiles[i].size + '\n\n' + 'localURL地址:' + mediaFiles[i].localURL + '\n\n' + 'fullPath地址:' + mediaFiles[i].fullPath)
}
}*/
console.log('录制成功!\n\n' + '文件名:' + mediaFiles[0].name + '\n' + '大小:' + mediaFiles[0].size + '\n\n' + 'localURL地址:' + mediaFiles[0].localURL + '\n\n' + 'fullPath地址:' + mediaFiles[0].fullPath)
vm.succesCall(mediaFiles[0].fullPath)
}
let onError = function (error) {
hlsPopup.showLongcenter('录制失败,请重新录制')
......@@ -89,7 +91,7 @@ export default {
hlsUtil.captureVideo(onSuccess, onError)
},
/* vm.videoCapture = function () {
/* vm.videoCapture = function () {
document.addEventListener("deviceready", function () {
var options = {};
//平台判断
......@@ -130,44 +132,56 @@ export default {
}
}, false);
};*/
}; */
succesCall () { // 录制成功后进行检测
succesCall (fileUrl) { // 录制成功后进行检测
let vm = this
console.log('fileUrl '+ fileUrl)
console.log('sessionId '+ vm.sessionId)
let url = process.env.ocrPath + '/baidu/ocr/videoFaceliveness'
let param = {
file: vm.file,
fileUrl: fileUrl,
sessionId: vm.sessionId,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.showLoading('正在检测')
hlsUtil.baiduOcrVideo(param, url, function (res) {
hlsPopup.hideLoading()
console.log('##########res ' + JSON.stringify(res))
if (res.result.result.thresholds.frr_1e-2 < 0.9) {
vm.hlsPopup.showLongcenter('检测失败,请重新尝试')
} else {
vm.hlsPopup.showLongcenter('检测成功')
}
})
/* vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
// eslint-disable-next-line space-infix-ops
if (res.result.thresholds.frr_1e-2 < 0.9) {
vm.hlsPopup.showLongcenter('检测失败,请重新尝试')
} else {
vm.hlsPopup.showLongcenter('检测成功')
}
})
})*/
},
getCode () { // 获取验证码
this.downNum = true
//this.downNum = true
this.computeTime()
this.time = 60
this.lastTime = 3
let vm = this
// let url = process.env.ocrPath + '/baidu/ocr/videoSessioncode'
// let param = {}
// // vm.hlsPopup.showLoading('数据加载中')
// vm.hlsHttp.post(url, param).then(function (res) {
// // vm.hlsPopup.hideLoading()
// if (res.result === 'S') {
// vm.codeList = [...res.result.code]
// vm.sessionId = res.result.sessionId
// }
// })
vm.codeList = [1, 4, 3, 5]
let url = process.env.ocrPath + '/baidu/ocr/videoSessioncode'
let param = {}
vm.hlsPopup.showLoading('请稍后')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.success) {
vm.codeList = [...res.result.result.code]
vm.sessionId = res.result.result.session_id
vm.downNum = true
}
})
/*let str = '098672'
vm.codeList = [...str]*/
},
computeTime () { // 倒计时
let vm = this
......@@ -280,8 +294,12 @@ export default {
line-height: 40px;
}
}
.content{
display: flex;
flex-direction: column;
}
.top {
height: 60%;
height: 340px;
background-color: #f4f4f4;
display: flex;
justify-content: center;
......@@ -293,6 +311,7 @@ export default {
flex-wrap: wrap;
img {
width: 80%;
height: 100%;
margin-top: 10px;
}
span {
......@@ -304,7 +323,7 @@ export default {
}
}
.bottom {
height: 40%;
flex: 1;
background-color: #fff;
box-shadow: 0 -4px 10px 0 #e8e8e8;
display: flex;
......
......@@ -418,12 +418,12 @@ export default {
if (vum.Platform.isAndroid()) {
this.hote_update_version(
'发现新版本是否更新',
'http://hlsapp.hand-china.com/file/XCMG/www/android/www.zip'
'http://hlsapp.hand-china.com/file/XCMG/www_myself/android/www.zip'
)
} else {
this.hote_update_version(
'发现新版本是否更新',
'http://hlsapp.hand-china.com/file/XCMG/www/android/www.zip'
'http://hlsapp.hand-china.com/file/XCMG/www_myself/android/www.zip'
)
}
},
......
......@@ -186,14 +186,13 @@ export default {
},
getVerifiedCode () {
let vm = this
let url = process.env.basePath + 'sms_verify_post'
hlsPopup.showLongCenter('测试验证码为123456')
/*let url = process.env.basePath + 'sms_verify_post'
let signcode = ('000000' + Math.floor(Math.random() * 999999)).slice(-6)
vm.captchaKey = signcode
let param = {
'info': {
'phone': vm.phone_number,
'signcode': signcode,
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -203,27 +202,7 @@ export default {
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
/* let url = process.env.rootPath + '/aliyun/sms'
let params = {
phoneNumber: vm.phone_number,
signName: '车租易',
templateCode: 'SMS_154585462',
}
hlsHttp.post(url, params).then(function (res) {
if (res.code == 'OK') {
vm.captchaKey = res.captchaKey
vm.phoneCodeTimeOut = false
setTimeout(function () {
vm.captchaKey = ''
vm.phoneCodeTimeOut = true
}, 300000)
hlsPopup.showLongBottom('验证码发送成功!')
} else {
hlsPopup.showLongBottom(res.message)
}
}
) */
})*/
},
},
}
......
......@@ -218,15 +218,13 @@ export default {
},
getVerifiedCode () {
let vm = this
// hlsPopup.showLongCenter('测试验证码为123456')
let url = process.env.basePath + 'sms_verify_post'
hlsPopup.showLongCenter('测试验证码为123456')
/*let url = process.env.basePath + 'sms_verify_post'
let signcode = ('000000' + Math.floor(Math.random() * 999999)).slice(-6)
vm.captchaKey = signcode
let param = {
'info': {
'phone': vm.phone_number,
'signcode': signcode,
},
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -236,27 +234,7 @@ export default {
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
/* let url = process.env.rootPath + '/aliyun/sms'
let params = {
phoneNumber: vm.phone_number,
signName: '车租易',
templateCode: 'SMS_154585462',
}
hlsHttp.post(url, params).then(function (res) {
if (res.code == 'OK') {
vm.captchaKey = res.captchaKey
vm.phoneCodeTimeOut = false
setTimeout(function () {
vm.captchaKey = ''
vm.phoneCodeTimeOut = true
}, 300000)
hlsPopup.showLongBottom('验证码发送成功!')
} else {
hlsPopup.showLongBottom(res.message)
}
}
) */
})*/
},
},
}
......
......@@ -9,7 +9,7 @@
<h-content>
<div class="userInfo">附件信息</div>
<div v-for="(list, index) in cddItemList" :key="index" class="card">
<span style="color:#1D3FFF">{{ list.description }}</span>
<span class="card-desc" style="color:#1D3FFF">{{ list.description }}</span>
<div class="img-content">
<!--待上传图片列表-->
<div
......@@ -825,7 +825,7 @@ export default {
display: flex;
flex-direction: column;
span {
.card-desc {
color: #656464;
font-size: 13px;
line-height: 18px;
......
......@@ -524,6 +524,39 @@ export default {
ft.upload(path, url, uploadSuccess, error, options)
},
/**
* 百度OCR活体检测
* @param file
* @param url
* @param success
*/
baiduOcrVideo: function (file, postUrl, success) {
let path = file.fileUrl
let name = path.substr(path.lastIndexOf('/') + 1)
let url = encodeURI(postUrl)
let options = new FileUploadOptions() // eslint-disable-line
options.headers = {
'Authorization': 'Bearer ' + window.localStorage.access_token,
}
options.fileKey = 'file'
options.fileName = name
options.mimeType = 'multipart/form-date'
options.params = {
'sessionId': file.sessionId,
}
let ft = new FileTransfer() // eslint-disable-line
function uploadSuccess (message) {
let res = JSON.parse(message.response)
success(res)
}
function error (e) {
this.hlsPopup.showLongCenter('识别失败')
}
ft.upload(path, url, uploadSuccess, error, options)
},
/**
*
* @param x 输入的数字
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment