فهرست منبع

1.0.76 修复 api //的bug。

YangZhiJie 2 سال پیش
والد
کامیت
599d84c814
3فایلهای تغییر یافته به همراه11 افزوده شده و 2 حذف شده
  1. 5 0
      bat/publish.sh
  2. 1 1
      package.json
  3. 5 1
      packages/common/Common.js

+ 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",
-  "version": "1.0.75",
+  "version": "1.0.76",
   "description": "",
   "main": "dist/pc-component-v3.js",
   "scripts": {

+ 5 - 1
packages/common/Common.js

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