Explorar el Código

feat: 初始化跑起来的项目

Damon hace 1 año
padre
commit
ef0c81e1f3
Se han modificado 8 ficheros con 10429 adiciones y 5303 borrados
  1. 4 0
      README.md
  2. 10353 5244
      package-lock.json
  3. 4 3
      package.json
  4. 2 2
      postcss.config.js
  5. 26 23
      public/index.html
  6. 4 2
      src/main.js
  7. 33 25
      src/manifest.json
  8. 3 4
      src/pages.json

+ 4 - 0
README.md

@@ -17,3 +17,7 @@ npm run build
 
 ### Customize configuration
 See [Configuration Reference](https://cli.vuejs.org/config/).
+
+### @dcloudio/uni-cli-shared/lib/util 找不到
+npm install @dcloudio/uni-app --save  
+npm install @dcloudio/uni-cli-shared --save

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 10353 - 5244
package-lock.json


+ 4 - 3
package.json

@@ -46,6 +46,7 @@
     "test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
   },
   "dependencies": {
+    "@dcloudio/uni-app": "^2.0.2-4020420240722002",
     "@dcloudio/uni-app-plus": "^2.0.1-33920220314002",
     "@dcloudio/uni-h5": "^2.0.1-33920220314002",
     "@dcloudio/uni-helper-json": "*",
@@ -66,7 +67,7 @@
     "@dcloudio/uni-ui": "^1.4.12",
     "@vue/shared": "^3.0.0",
     "core-js": "^3.6.5",
-    "flyio": "^0.6.2",
+    "flyio": "^0.0.4",
     "regenerator-runtime": "^0.12.1",
     "vue": "^2.6.11",
     "vuex": "^3.2.0"
@@ -84,11 +85,11 @@
     "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-33920220314002",
     "@dcloudio/webpack-uni-mp-loader": "^2.0.1-33920220314002",
     "@dcloudio/webpack-uni-pages-loader": "^2.0.1-33920220314002",
-    "@vue/cli-plugin-babel": "~4.5.15",
+    "@vue/cli-plugin-babel": "^5.0.8",
     "@vue/cli-service": "~4.5.15",
     "babel-plugin-import": "^1.11.0",
     "cross-env": "^7.0.2",
-    "jest": "^25.4.0",
+    "jest": "^29.7.0",
     "mini-types": "*",
     "miniprogram-api-typings": "*",
     "postcss-comment": "^2.0.0",

+ 2 - 2
postcss.config.js

@@ -3,7 +3,7 @@ module.exports = {
   parser: require('postcss-comment'),
   plugins: [
     require('postcss-import')({
-      resolve (id, basedir, importOptions) {
+      resolve(id, basedir, importOptions) {
         if (id.startsWith('~@/')) {
           return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
         } else if (id.startsWith('@/')) {
@@ -19,4 +19,4 @@ module.exports = {
     }),
     require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
   ]
-}
+}

+ 26 - 23
public/index.html

@@ -1,29 +1,32 @@
 <!DOCTYPE html>
 <html lang="zh-CN">
 
-    <head>
-        <meta charset="utf-8">
-        <meta http-equiv="X-UA-Compatible" content="IE=edge">
-        <link rel="icon" href="../src/static/favicon.ico">
-        <title>
-            <%= htmlWebpackPlugin.options.title %>
-        </title>
-        <script>
-            document.addEventListener('DOMContentLoaded', function() {
-                document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
-            })
-            var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
-        </script>
-        <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
-    </head>
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <link rel="icon" href="../src/static/favicon.ico">
+    <title>
+        <%= htmlWebpackPlugin.options.title %>
+    </title>
+    <script>
+        document.addEventListener('DOMContentLoaded', function () {
+            document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
+        })
+        var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
+            .supports('top: constant(a)'))
+        document.write(
+            '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+            (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
+</head>
 
-    <body>
-        <noscript>
-            <strong>Please enable JavaScript to continue.</strong>
-        </noscript>
-        <div id="app"></div>
-        <!-- built files will be auto injected -->
-    </body>
+<body>
+    <noscript>
+        <strong>Please enable JavaScript to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+</body>
 
 </html>

+ 4 - 2
src/main.js

@@ -1,6 +1,8 @@
 import Vue from 'vue'
 import App from './App'
-import { request } from './utils/request'
+import {
+  request
+} from './utils/request'
 
 Vue.config.productionTip = false
 
@@ -11,4 +13,4 @@ App.mpType = 'app'
 const app = new Vue({
   ...App
 })
-app.$mount()
+app.$mount()

+ 33 - 25
src/manifest.json

@@ -5,7 +5,8 @@
 	"versionName": "1.0.0",
 	"versionCode": "100",
 	"transformPx": false,
-	"app-plus": { /* 5+App特有相关 */
+	"app-plus": {
+		/* 5+App特有相关 */
 		"usingComponents": true,
 		"splashscreen": {
 			"alwaysShowBeforeRender": true,
@@ -13,11 +14,14 @@
 			"autoclose": true,
 			"delay": 0
 		},
-		"modules": { /* 模块配置 */
+		"modules": {
+			/* 模块配置 */
 
 		},
-		"distribute": { /* 应用发布信息 */
-			"android": { /* android打包配置 */
+		"distribute": {
+			/* 应用发布信息 */
+			"android": {
+				/* android打包配置 */
 				"permissions": ["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
 					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
 					"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
@@ -42,24 +46,26 @@
 					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
 				]
 			},
-			"ios": { /* ios打包配置 */
+			"ios": {
+				/* ios打包配置 */
 
 			},
-			"sdkConfigs": { /* SDK配置 */
+			"sdkConfigs": {
+				/* SDK配置 */
 
 			}
 		}
 	},
-	"h5":{
+	"h5": {
 		"template": "../public/index.html",
-		"router":{
+		"router": {
 			"mode": "hash",
 			"base": "./"
 		},
-		"devServer":{
+		"devServer": {
 			"port": 8080,
 			"disableHostCheck": true,
-			"proxy":{
+			"proxy": {
 				"/device": {
 					"target": "https://o3tapi.radio1964.com",
 					"changeOrigin": true,
@@ -71,26 +77,28 @@
 			}
 		}
 	},
-	"quickapp": { /* 快应用特有相关 */
+	"quickapp": {
+		/* 快应用特有相关 */
 
 	},
-	"mp-weixin": { /* 微信小程序特有相关 */
+	"mp-weixin": {
+		/* 微信小程序特有相关 */
 		"appid": "",
 		"setting": {
 			"urlCheck": false
 		},
 		"usingComponents": true
 	},
-	"mp-alipay" : {
-	  "usingComponents" : true
-  },
-  "mp-baidu" : {
-    "usingComponents" : true
-  },
-  "mp-toutiao" : {
-    "usingComponents" : true
-  },
-  "mp-qq" : {
-    "usingComponents" : true
-  }
-}
+	"mp-alipay": {
+		"usingComponents": true
+	},
+	"mp-baidu": {
+		"usingComponents": true
+	},
+	"mp-toutiao": {
+		"usingComponents": true
+	},
+	"mp-qq": {
+		"usingComponents": true
+	}
+}

+ 3 - 4
src/pages.json

@@ -1,6 +1,5 @@
 {
-	"pages": [
-		{
+	"pages": [{
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "云动创想"
@@ -25,10 +24,10 @@
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
 	},
-	"easycom":{
+	"easycom": {
 		"autoscan": true,
 		"custom": {
 			"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
 		}
 	}
-}
+}