zyw 9 months ago
parent
commit
df41e879f2
5 changed files with 52 additions and 14 deletions
  1. 9 1
      App.vue
  2. 2 2
      main.js
  3. 23 3
      manifest.json
  4. 17 7
      pages.json
  5. 1 1
      uni.scss

+ 9 - 1
App.vue

@@ -2,6 +2,12 @@
 	export default {
 		onLaunch: function() {
 			console.log('App Launch')
+			uni.getSystemInfo({
+				success: function (res) {
+					console.log("设备宽度:"+res.windowWidth);
+					console.log("设备高度:"+res.windowHeight);
+				}
+			});
 		},
 		onShow: function() {
 			console.log('App Show')
@@ -12,6 +18,8 @@
 	}
 </script>
 
-<style>
+<style lang="scss">
 	/*每个页面公共css */
+	@import "@/components/uview-ui/index.scss";
+
 </style>

+ 2 - 2
main.js

@@ -2,11 +2,11 @@ import App from './App'
 
 // #ifndef VUE3
 import Vue from 'vue'
-import './uni.promisify.adaptor'
+import uView from '@/components/uview-ui';
 Vue.config.productionTip = false
 App.mpType = 'app'
 const app = new Vue({
-  ...App
+    ...App
 })
 app.$mount()
 // #endif

+ 23 - 3
manifest.json

@@ -1,7 +1,7 @@
 {
-    "name" : "zlty",
+    "name" : "中粮辽宁糖业",
     "appid" : "__UNI__FAC93E0",
-    "description" : "",
+    "description" : "中粮辽宁糖业",
     "versionName" : "1.0.0",
     "versionCode" : "100",
     "transformPx" : false,
@@ -68,5 +68,25 @@
     "uniStatistics" : {
         "enable" : false
     },
-    "vueVersion" : "2"
+    "vueVersion" : "2",
+    "h5" : {
+        "router" : {
+            "base" : "h5"
+        },
+        /**"target" : "http://127.0.0.1:18081",http://10.23.250.220:18081 http://127.0.0.1:18082**/
+        "devServer" : {
+            "https" : false,
+            "proxy" : {
+                "/api" : {
+                    "target" : "http://127.0.0.1:18087/",
+                    "changeOrigin" : true,
+                    "secure" : false,
+                    "pathRewrite" : {
+                        "^/api" : "/"
+                    }
+                }
+            }
+        },
+        "title" : "中粮辽宁糖业"
+    }
 }

+ 17 - 7
pages.json

@@ -1,17 +1,27 @@
 {
+	"easycom": {
+		"autoscan": true,
+		"custom": {
+			"^u-(.*)": "@/components/uview-ui/components/u-$1/u-$1.vue"
+		}
+	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/index/index",
-			"style": {
-				"navigationBarTitleText": "中粮糖业"
-			}
+		    "path" : "pages/index/indexForm",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "首页",
+		        "enablePullDownRefresh": false
+		    }
 		}
-	],
+		
+    ],
+	
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
-	},
-	"uniIdRouter": {}
+		
+	}
 }

+ 1 - 1
uni.scss

@@ -11,7 +11,7 @@
  *
  * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  */
-
+@import '@/components/uview-ui/theme.scss';
 /* 颜色变量 */
 
 /* 行为相关颜色 */