Эх сурвалжийг харах

1.0.76 修复 api //的bug。

YangZhiJie 2 жил өмнө
parent
commit
599d84c814

+ 5 - 0
bat/publish.sh

@@ -0,0 +1,5 @@
+set current_path="%~dp0"
+cd %current_path%
+cd ..
+npm publish --registry http://wuzhixin.vip:4873/
+pause

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "pc-component-v3",
   "name": "pc-component-v3",
-  "version": "1.0.75",
+  "version": "1.0.76",
   "description": "",
   "description": "",
   "main": "dist/pc-component-v3.js",
   "main": "dist/pc-component-v3.js",
   "scripts": {
   "scripts": {

+ 5 - 1
packages/common/Common.js

@@ -76,7 +76,11 @@ export default {
 
 
   // 获取API的地址
   // 获取API的地址
   getApiURL: function (apiName) {
   getApiURL: function (apiName) {
-    return this.getHostPageBaseURL() + 'api/' + apiName;
+    if(apiName.startsWith('/')){
+      return this.getHostPageBaseURL() + 'api' + apiName;
+    }else{
+      return this.getHostPageBaseURL() + 'api/' + apiName;
+    }
   },
   },
 
 
   /**
   /**