diff --git a/bin/serve.js b/bin/serve.js
index fbfa7d52..687b9f02 100644
--- a/bin/serve.js
+++ b/bin/serve.js
@@ -58,15 +58,22 @@ const start = () => {
easycom: {
"^u-(.*)": "@/uview/components/u-$1/u-$1.vue"
},
- pages: [],
+ pages: [
+ {path: 'pages/loading'},
+ {path: 'pages/login'}
+ ],
globalStyle: {
pageOrientation: "auto",
navigationStyle: "custom"
}
}
- findApp('src/pages', file => {
- if (/.*\\(.+)\.vue/g.test(file)) {
- json.pages.push({path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g,'/')})
+ findApp('src/apps', file => {
+ if (/.*\\.+\\App[^\\]+\.vue/g.test(file)) {
+ let app = {
+ name: file.replace(/.*\\([^\\]+).vue/g, '$1'),
+ path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/')
+ }
+ json.pages.push(app)
}
}).then(() => {
fsExtra.outputJson('src/pages.json', json, () => {
diff --git a/package.json b/package.json
index 0d34bd50..0c4646af 100644
--- a/package.json
+++ b/package.json
@@ -5,12 +5,12 @@
"author": "Kubbo",
"scripts": {
"dev": "node bin/serve.js&&cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --minimize",
- "lib": "npm unpublish --force&&npm publish"
+ "lib": "npm unpublish --force&&npm publish",
+ "pages": "node bin/serve.js"
},
"files": [
"src/components",
- "src/pages",
- "src/pages.json"
+ "src/apps"
],
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
@@ -64,6 +64,7 @@
"node-sass": "npm:dart-sass@^1.25.0",
"postcss-comment": "^2.0.0",
"sass-loader": "^7.1.0",
+ "uview-ui": "^2.0.3",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
diff --git a/src/pages/AppInterview/AppInterview.vue b/src/apps/AppInterview/AppInterview.vue
similarity index 99%
rename from src/pages/AppInterview/AppInterview.vue
rename to src/apps/AppInterview/AppInterview.vue
index d549c725..8f38285d 100644
--- a/src/pages/AppInterview/AppInterview.vue
+++ b/src/apps/AppInterview/AppInterview.vue
@@ -45,14 +45,14 @@ import AiFixedBtn from "../../components/AiFixedBtn";
export default {
name: "AppInterview",
- label: "调查走访",
+ appName: "调查走访",
components: {AiFixedBtn, AiDate, AiImage, AiCard, AiTopFixed, AiSelect},
data() {
return {
search: {title: ""},
list: [],
current: 1,
- pages: 0
+ pages: 0,
}
},
computed: {
diff --git a/src/pages/AppInterview/detail.vue b/src/apps/AppInterview/detail.vue
similarity index 100%
rename from src/pages/AppInterview/detail.vue
rename to src/apps/AppInterview/detail.vue
diff --git a/src/pages/loading.vue b/src/pages/loading.vue
index 7e9ad3fc..4a5f2eab 100644
--- a/src/pages/loading.vue
+++ b/src/pages/loading.vue
@@ -10,7 +10,7 @@
{{ app.name }}
-
+0