Преглед изворни кода

修复农业云H5项目打包上线BUG问题

张启 пре 4 година
родитељ
комит
e2085d9700
3 измењених фајлова са 33 додато и 3 уклоњено
  1. 1 1
      main.js
  2. 3 2
      manifest.json
  3. 29 0
      package.json

+ 1 - 1
main.js

@@ -32,7 +32,7 @@ const msgbox = (title, icon = 'none', duration = 1500, mask = false) => {
 
 // 挂载全局vue属性
 Vue.prototype.$msgbox = msgbox;
-Vue.prototype.baseApiUrl = indexConfig.baseUrl;
+Vue.prototype.baseApiUrl = window.location.origin + indexConfig.baseUrl;
 
 const app = new Vue({
   ...App,

+ 3 - 2
manifest.json

@@ -1,6 +1,6 @@
 {
   "name": "AgriculturalCloud-h5-UI",
-  "appid": "__UNI__DE5C136",
+  "appid": "",
   "description": "修文农业云公共服务系统",
   "versionName": "1.0.0",
   "versionCode": "100",
@@ -60,7 +60,7 @@
   "quickapp": {},
   /* 小程序特有相关 */
   "mp-weixin": {
-    "appid": "wxc256e348c4032ebd",
+    "appid": "",
     "setting": {
       "urlCheck": false
     },
@@ -84,6 +84,7 @@
     "template": "agrcloud.template.h5.html",
     "router": {
       "mode": "history"
+      /** "base": "/agrclodh5/" */
     },
     "sdkConfigs": {
       "maps": {

+ 29 - 0
package.json

@@ -0,0 +1,29 @@
+{
+  "name": "agriculturalcloud-h5-ui",
+  "version": "1.0.0",
+  "description": "修文农业云公共服务系统",
+  "main": "main.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "http://172.16.90.250:3000/AgriculturalCloud/AgriculturalCloud-h5-UI.git"
+  },
+  "author": "Rockery(1113269755@qq.com)",
+  "license": "MIT",
+  "uni-app": {
+    "scripts": {
+      "h5-weixin": {
+        "title": "农业云H5微信服务号",
+        "BROWSER": "Chrome",
+        "env": {
+          "UNI_PLATFORM": "h5"
+        },
+        "define": {
+          "H5-WEIXIN": true
+        }
+      }
+    }
+  }
+}