Browse Source

版本3.8.0 2023-12-11 ljd

1、修改人脸传入的是base64,现在传过去的数据是特征值
master
xiaohei 1 year ago
parent
commit
e5de5e13e9
5 changed files with 60 additions and 3 deletions
  1. +10
    -1
      config/index.js
  2. +15
    -1
      src/api/index.js
  3. +1
    -0
      src/store/index.js
  4. +33
    -0
      src/utils/util.js
  5. +1
    -1
      src/views/userManagement.vue

+ 10
- 1
config/index.js View File

@ -19,6 +19,15 @@ module.exports = {
//重写路径
'^/api': '' //代理路径
}
},
'/face-api1':{
target: 'https://139.196.122.181:443/',
changeOrigin: true, //是否跨域
secure: false,
pathRewrite: {
//重写路径
'^/face-api1': '' //代理路径
}
}
},
configureWebpack: {
@ -30,7 +39,7 @@ module.exports = {
}
}
},
host: '192.168.1.2',
host: '192.168.1.11',
port: 8082,
autoOpenBrowser: false,
errorOverlay: true,


+ 15
- 1
src/api/index.js View File

@ -2,6 +2,7 @@ import request from '../utils/request';
import request1 from '../utils/request1';
import request2 from '../utils/request2';
import request3 from '../utils/requsetThree.js';
import request4 from "../utils/request4";
import JSEncrypt from 'jsencrypt'
import url1 from '../utils/url'
const httpGet = (query,url) => {
@ -11,6 +12,19 @@ const httpGet = (query,url) => {
params: query
});
};
const httpPostE = (query,url) => {
let url1=''
// if (process.env.NODE_ENV === "development") {
// url1='/face-api1'
// }else {
// url1=''
// }
return request4({
url: url1+url,
method: "POST",
data: query
});
};
// const httpGet2 = (query,url) => {
// return request4({
// url:url1 +url,
@ -98,4 +112,4 @@ const silentRequest = (query,url) => {
params: query
});
};
export {httpGet,RefreshToken,httpPost,setCode,httpGet1,httpPost1,download,httgetaxio,httgetaxio1,downloadPost,httpPostno,httpGetno,silentRequest}
export {httpGet,RefreshToken,httpPost,setCode,httpGet1,httpPost1,download,httgetaxio,httgetaxio1,downloadPost,httpPostno,httpGetno,silentRequest, httpPostE}

+ 1
- 0
src/store/index.js View File

@ -18,6 +18,7 @@ import moment from "moment"
} from "../utils/index";
const store = new Vuex.Store({
state: {
facemessage: {},
treeList:[],
tenantId: '1200',
// tenantId: '100',


+ 33
- 0
src/utils/util.js View File

@ -62,6 +62,39 @@ FromBase64(base64)
{
return new Buffer.from(base64, "base64").toString();
}
static facetransform(imagebase64){
console.log(imagebase64)
var realSecret = "MIID6zCCAtOgAwIBAgIUdA7us4MQkpVkpNFKDsYOCjyTYSAwDQYJKoZIhvcNAQELBQAwgYQxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhzaGFuZ2hhaTEPMA0GA1UEBwwGcHVkb25nMREwDwYDVQQKDAhhaXZhdGVjaDENMAsGA1UECwwEYWl2YTENMAsGA1UEAwwEYWl2YTEgMB4GCSqGSIb3DQEJARYRMTk4MzY0NTAxMkBxcS5jb20wHhcNMjMwNDIwMDQzNTI3WhcNMzMwNDE3MDQzNTI3WjCBhDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCHNoYW5naGFpMQ8wDQYDVQQHDAZwdWRvbmcxETAPBgNVBAoMCGFpdmF0ZWNoMQ0wCwYDVQQLDARhaXZhMQ0wCwYDVQQDDARhaXZhMSAwHgYJKoZIhvcNAQkBFhExOTgzNjQ1MDEyQHFxLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ+WYvWBTBsvc16hUz41NEiaDAgondSvx3kFVhZ87jWMNFRflrPwzNgju5F2ta9GDcjyvDvswIGtTNR5n6DnYkeCBD9eW8bt/xbfvAS7Bq6JB/73/+DvI51Zh+gtvUDq4wULyVY5CM0pfFp6YzIZbp0V3vKBOrNBEXMbLXfQXkM7yo0TNOtpHqtgDz4/JB7/EQO7vv+lEMEdceqzqNE8Wqzvdvu5nwNdcckE7M3EoZNHNUjT6B9dEnVzgc9Nn25qyM/2iQoNayw04w+sTG22UZ+0CZ4X1W4oBa57oOno0QyGjSj6aUsPl+zC/ApqatRguUbimRyEWdIIrR88eEPTw5UCAwEAAaNTMFEwHQYDVR0OBBYEFFqKMU62KCTAYFE1AS4pFYmpX5enMB8GA1UdIwQYMBaAFFqKMU62KCTAYFE1AS4pFYmpX5enMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAE9xWE2n68DkdCX+IeDb00ynTEm49Ms/pmoXWMqsEM15L3jLk93pXW+UOJinO8avyyWlOG97TTGSG52gq7TEPTBrP8vO7vd9pCtZ1zyKOcUhc8s3CAinffvGu9EltoNkcyKJkGq6ZO4vZA6a8d7PohrA671KwXn7JQ05qzYuZsHoCWul88pJyS5kEynjgBRe8lu4VD2qN1bzF6nhvCuy751itTRZVvfqez9iMBwqN76hq533AuZZCcLqhuW6o6BOk3JYJMPQk/FfDKYBoq//D2hJfFYdM7MEGE4oFEqVxKcNX3kjR9tJvnx1X10zzXDtvnOMzhOTH6nkZkCbGy/Xno4="
var ctimestamp = (moment().valueOf()).toString()
// var ctimestamp = "1599648837833"
var cnonce = '123456'
var requestParam = ""
var uri = "/v1/api/feature/extract"
var method = "POST"
var firmwareVersion = "SU18L_FT-V0.12.4.2"
var requestBodyMd5 = ""
var requestBodyJson = ""
var signStr = ""
var map = {
"featureVersion": "V0.3.5",
"imageBase64": imagebase64,
"imageType": "jpg",
"firmwareVersion": "SU18L_FT-V0.12.4.2"
}
console.log(map)
requestBodyMd5 = md5(JSON.stringify(map))
signStr = uri+'-'+method+'-'+requestParam+'-'+requestBodyMd5+'-'+realSecret+'-'+
ctimestamp+'-'+cnonce+'-'+'appkey1'
console.log(signStr)
var csign = md5(signStr)
return {
"firmwareVersion": firmwareVersion,
"ctimestamp": ctimestamp,
"featureVersion": "V0.3.5",
// "csign": "8c265dee9d01c65eef98c4962c9ce037"
"csign": csign
}
}
static
decrypt(word, keyStr)
{


+ 1
- 1
src/views/userManagement.vue View File

@ -1178,7 +1178,7 @@ export default {
},
methods: {
getFaceData(val) {
this.faceData = val.split(',')[1]
this.faceData = val
},
//
getLeasesList() {


Loading…
Cancel
Save