Browse Source

老人录入

nanMing 1 year ago
parent
commit
21794fa927

+ 6 - 7
ruoyi-ui/src/api/lnst/baiduUtil.js

@@ -4,18 +4,17 @@ const config = {
   faceClientId: "GREODjNINnLrRbtrRxDwz1sW",
   faceClientSecret: "vkkQQCDvz2w1NKzyU5rb5AcYZs07hBqS",
 }
-const baseURL = 'https://aip.baidubce.com'
 
 // 获取AccessToken
 export function getAccessToken() {
   return request({
-    baseURL:"",
+    baseURL:'',
     url: '/baiduApi/oauth/2.0/token',
     method: 'post',
-    header: {
-      'Content-Type': 'application/x-www-form-urlencoded'
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded',
     },
-    data: {
+    params: {
       grant_type: 'client_credentials',
       client_id: config.faceClientId,
       client_secret: config.faceClientSecret
@@ -47,10 +46,10 @@ export function idcard(data) {
 export function matchFace(data) {
   const { token, face1, face2 } = data
   return request({
-    baseURL,
+    baseURL: '',
     url: '/baiduApi/rest/2.0/face/v3/match?access_token=' + token,
     method: 'post',
-    header: {
+    headers: {
       'Content-Type': 'application/json'
     },
     data: [

+ 4 - 4
ruoyi-ui/src/views/lnst/lrxx/index.vue

@@ -452,9 +452,9 @@ export default {
         sfzyxqxs: null,
         sfzyxqxz: null,
 
-        cardFrontBase64: null,
-        cardBackBase64: null,
-        txBase64: null,
+        cardFrontBase64: 'aaa',
+        cardBackBase64: 'aaa',
+        txBase64: 'aaa',
         tkzmBase64: null,
         dbzmBase64: null,
         zczmBase64: null,
@@ -509,7 +509,7 @@ export default {
     submitForm() {
       this.$refs['form'].validate((valid, object) => {
         if (valid) {
-          this.submitFormLoading = true;
+          // this.submitFormLoading = true;
           switch (this.openType) {
             case 'add':
               this.getPhotoBase64(addLrjbxx)

+ 14 - 2
ruoyi-ui/vue.config.js

@@ -45,6 +45,7 @@ module.exports = {
         // target: `http://10.16.4.2:8080`, //陈航
         // target: `http://10.16.4.5:8080`,//孙坤阳
         // target: `http://10.16.4.9:8080`,//初标
+        // target: `http://10.16.4.14:801/prod-api`,//本地服务器
         target: `http://localhost:8080`,
         // target: `https://www.jlyanglao.com/prod-api`,
         // target: `http://121.36.73.159:801/prod-api`,
@@ -55,13 +56,24 @@ module.exports = {
         }
       },
       '/uploadPath': {
-        // target: `http://localhost:8080/uploadPath`,
-        target: `http://121.36.73.159:801/uploadPath`,
+        target: `http://localhost:8080/uploadPath`,
+        // target: `http://10.16.4.5:8080/uploadPath`,//孙坤阳
+        // target: `https://www.jlyanglao.com/uploadPath`,
+        // target: `http://10.16.4.14:801/uploadPath`,//本地服务器
+        // target: `http://121.36.73.159:801/uploadPath`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + '/uploadPath']: ''
         }
       },
+      '/baiduApi': {
+        target: `https://aip.baidubce.com`,
+        changeOrigin: true,
+        secure: false,
+        pathRewrite: {
+          "^/baiduApi": ""
+        }
+      },
       '/getxflrinfo': {
         target: `http://121.36.73.159:8090/getxflrinfo`,
         changeOrigin: true,