Forráskód Böngészése

4.0.31 修复请求路径//的BUG。

YangZhiJie 2 éve
szülő
commit
e084787650

+ 9 - 9
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "client-base-v4",
-  "version": "4.0.27",
+  "version": "4.0.30",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "client-base-v4",
-      "version": "4.0.27",
+      "version": "4.0.30",
       "devDependencies": {
         "@babel/core": "^7.17.5",
         "@babel/eslint-parser": "^7.17.0",
@@ -46,7 +46,7 @@
         "dayjs": "^1.11.6",
         "dingtalk-jsapi": "^2.10.3",
         "moment": "^2.29.4",
-        "pc-component-v3": "1.0.75",
+        "pc-component-v3": "1.0.77",
         "qrcode": "^1.5.3",
         "uuid": "^8.3.2",
         "v-tooltip": "^4.0.0-beta.17",
@@ -7069,9 +7069,9 @@
       }
     },
     "node_modules/pc-component-v3": {
-      "version": "1.0.75",
-      "resolved": "http://wuzhixin.vip:4873/pc-component-v3/-/pc-component-v3-1.0.75.tgz",
-      "integrity": "sha512-sQww/cu9pr88TlfQ4zBR/bBhu1h06F1kpSWPV6rvlMf6XphFNXqKAwXHeAVdyAxHEhHmx53wAwBDlNbA5twD8g==",
+      "version": "1.0.77",
+      "resolved": "http://wuzhixin.vip:4873/pc-component-v3/-/pc-component-v3-1.0.77.tgz",
+      "integrity": "sha512-u0qUpCL/uoMKT32Hu/3LcSz9Zp90pz8kZsgR6mL8C1uaxYLWoWzjH9f2+iidq08R87ChOO1g9J5xJy/SuJ2n7Q==",
       "peer": true,
       "peerDependencies": {
         "ant-design-vue": "^3.2.15",
@@ -14964,9 +14964,9 @@
       "dev": true
     },
     "pc-component-v3": {
-      "version": "1.0.75",
-      "resolved": "http://wuzhixin.vip:4873/pc-component-v3/-/pc-component-v3-1.0.75.tgz",
-      "integrity": "sha512-sQww/cu9pr88TlfQ4zBR/bBhu1h06F1kpSWPV6rvlMf6XphFNXqKAwXHeAVdyAxHEhHmx53wAwBDlNbA5twD8g==",
+      "version": "1.0.77",
+      "resolved": "http://wuzhixin.vip:4873/pc-component-v3/-/pc-component-v3-1.0.77.tgz",
+      "integrity": "sha512-u0qUpCL/uoMKT32Hu/3LcSz9Zp90pz8kZsgR6mL8C1uaxYLWoWzjH9f2+iidq08R87ChOO1g9J5xJy/SuJ2n7Q==",
       "peer": true,
       "requires": {}
     },

+ 1 - 1
package.json

@@ -21,7 +21,7 @@
     "dayjs": "^1.11.6",
     "dingtalk-jsapi": "^2.10.3",
     "moment": "^2.29.4",
-    "pc-component-v3": "1.0.75",
+    "pc-component-v3": "1.0.77",
     "qrcode": "^1.5.3",
     "uuid": "^8.3.2",
     "v-tooltip": "^4.0.0-beta.17",

+ 1 - 1
src/client/top-nav-message.vue

@@ -208,7 +208,7 @@ export default {
       var url = 'WebSocket/MessageQueue/' + _self.loginInfo.userId;
       console.log('HostPageBaseURL:' + Common.getHostPageBaseURL());
       console.log('url:' + url);
-      var websocketUrl = Common.getHostPageBaseURL() + url;
+      var websocketUrl = Common.getHostPageBaseURL() + '/' + url;
       console.log('websocketUrl:' + websocketUrl);
       if (websocketUrl.indexOf('https') == 0) {
         websocketUrl = websocketUrl.replace('https', 'wss').replace('/api', '');

+ 11 - 7
src/common/Common.js

@@ -61,19 +61,19 @@ export default {
 
   getHostPageBaseURL: function () {
     if(typeof REMOTE_DEV_PORT !== 'undefined' && REMOTE_DEV_PORT != null){
-      return this.getRootPath() + '/proxy/' + REMOTE_DEV_PORT + '/';
+      return this.getRootPath() + '/proxy/' + REMOTE_DEV_PORT;
     }else{
-      return this.getRootPath() + '/';
+      return this.getRootPath();
     }
   },
 
 
   // 获取API的地址
   getApiURL: function (apiName) {
-    if(apiName.startsWith("/")){
-      return this.getHostPageBaseURL() + 'api' + apiName;
+    if(apiName.startsWith('/')){
+      return this.getHostPageBaseURL() + '/api' + apiName;
     }else{
-      return this.getHostPageBaseURL() + 'api/' + apiName;
+      return this.getHostPageBaseURL() + '/api/' + apiName;
     }
   },
 
@@ -83,7 +83,11 @@ export default {
    * @returns 
    */
   getApiUrl2: function (apiName) {
-    return this.getHostPageBaseURL() + apiName;
+    if(apiName.startsWith('/')){
+      return this.getHostPageBaseURL() + apiName;
+    }else{
+      return this.getHostPageBaseURL() + '/' + apiName;
+    }
   },
 
 
@@ -110,7 +114,7 @@ export default {
     if (imageName == null) {
       return null;
     }
-    return '/api/file/thumbnailImageDownload?className=' + className + '&fileName=' + imageName;
+    return this.getHostPageBaseURL() + '/api/file/thumbnailImageDownload?className=' + className + '&fileName=' + imageName;
   },
 
 

+ 2 - 2
src/common/image-src.js

@@ -6,7 +6,7 @@ export function getImageSrc(className, imageName) {
   // console.log('protocol:' + protocol);
   // var host = window.location.host;
   // console.log('host:' + host);
-  var localhostPath = Common.getHostPageBaseURL();
+  var localhostPath = Common.getHostPageBaseURL() + '/';
   var accountId = localStorage.getItem('#accountId') || 0;
   if (imageName == null) {
     return null;
@@ -26,7 +26,7 @@ export function getThumbnailImageSrc(className, imageName) {
   // var host = window.location.host;
   // console.log('host:' + host);
   // var localhostPath = protocol + '//' + host;
-  var localhostPath = Common.getHostPageBaseURL();
+  var localhostPath = Common.getHostPageBaseURL() + '/';
   //测试用
   //var localhostPath = 'http://127.0.0.1:83';
   console.log('localhostPath:' + localhostPath);

+ 1 - 1
src/common/pushMessage.js

@@ -283,7 +283,7 @@ export default {
       return;
     }
     let token = localStorage.getItem('#token');
-    let websocketUrl = Common.getHostPageBaseURL() + 'WebSocket/MessageQueue';
+    let websocketUrl = Common.getHostPageBaseURL() + '/WebSocket/MessageQueue';
     if (websocketUrl.indexOf('https') == 0) {
       websocketUrl = websocketUrl.replace('https', 'wss').replace('/api', '');
     } else if (websocketUrl.indexOf('http') == 0) {

+ 1 - 1
src/window/tabFormWidget/FileListWidget.vue

@@ -226,7 +226,7 @@ export default {
       var className = _self.className;
       var downloadUrl =
         Common.getHostPageBaseURL() +
-        'Files/0/Files/' +
+        '/Files/0/Files/' +
         className +
         '/' +
         fileName;