产品库工程目录调整
This commit is contained in:
		
							
								
								
									
										15
									
								
								bin/serve.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								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, () => { | ||||
|   | ||||
| @@ -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": [ | ||||
|   | ||||
| @@ -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: { | ||||
| @@ -10,7 +10,7 @@ | ||||
|       <b v-for="app in apps" :key="app.key" @tap="redirectTo(app.path)">{{ app.name }}</b> | ||||
|     </div> | ||||
|   </section> | ||||
| </template> | ||||
| </template>0 | ||||
|  | ||||
| <script> | ||||
| import {mapActions, mapState} from 'vuex' | ||||
| @@ -22,14 +22,15 @@ export default { | ||||
|   components: {UTag, AiResult}, | ||||
|   inject: ['root'], | ||||
|   computed: { | ||||
|     ...mapState(['token', 'apps', 'openUser', 'user']), | ||||
|     ...mapState(['token', 'openUser', 'user']), | ||||
|     currentApp() { | ||||
|       return this.apps.find(e => e.key == this.$route.query.app) || {} | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       result: {} | ||||
|       result: {}, | ||||
|       apps: [] | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
| @@ -38,16 +39,30 @@ export default { | ||||
|       let {query, hash} = this.$route | ||||
|       delete query.app | ||||
|       uni.navigateTo({ | ||||
|         url: `/pages${path}`, success: () => { | ||||
|         url: `/apps${path}`, success: () => { | ||||
|           this.$router.push({query, hash}) | ||||
|         }, | ||||
|         fail: err => { | ||||
|           console.error(err) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleLogin() { | ||||
|       uni.navigateTo({url: "./login"}) | ||||
|     }, | ||||
|     getApps() { | ||||
|       this.apps = [] | ||||
|       let applications = require.context('../apps', true, /\.(\/.+)\/App[^\/]+\.vue$/) | ||||
|       applications.keys().map(path => { | ||||
|         if (applications(path).default) { | ||||
|           let {name: key, appName: name} = applications(path).default | ||||
|           this.apps.push({key, name, path: path.replace(/^\.(.+).vue$/g, '$1')}) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getApps() | ||||
|     this.result = { | ||||
|       tips: "欢迎进入开发应用", | ||||
|     } | ||||
|   | ||||
| @@ -5,26 +5,7 @@ import http from '../common/axios' | ||||
| import CryptoJS from '../utils/crypto-js' | ||||
|  | ||||
| Vue.use(Vuex) | ||||
| let agentSignURL = "", apiList = [], agentConfig = {}, | ||||
|     apps = [ | ||||
|       {name: '调查走访', key: "interview", path: '/interview/AppInterview'}, | ||||
|       {name: '工作去向', key: "whereabouts", path: '/whereabouts/whereabouts'}, | ||||
|       {name: '随手拍', key: "snapshot", path: '/snapshot/snapshot'}, | ||||
|       {name: '随心问', key: "casuallyask", path: '/casuallyask/casuallyask'}, | ||||
|       {name: '网上办事', key: "workonline", path: '/workonline/workonline'}, | ||||
|       {name: '居民画像', key: "resident", path: '/resident/comp'}, | ||||
|       {name: '话术库', key: "quickReply", path: '/quickReply/quickReply'}, | ||||
|       {name: '积分超市', key: "supermarket", path: '/supermarket/supermarket'}, | ||||
|       {name: '调查问卷', key: "askForm", path: '/askForm/askForm'}, | ||||
|       {name: '问卷表单', key: "askFormIndex", path: '/askForm/index'}, | ||||
|       {name: '会议通知', key: "meetingNotice", path: '/meetingNotice/meetingNotice'}, | ||||
|       {name: '公文流转', key: "documentFlow", path: '/documentFlow/documentFlow'}, | ||||
|       {name: '工作任务', key: "workTask", path: '/workTask/workTask'}, | ||||
|       {name: '通知公告', key: "notification", path: '/notification/notification'}, | ||||
|       {name: '智慧监测', key: "guardianship", path: '/guardianship/guardianship'}, | ||||
|       {name: '广播通知', key: "broadcast", path: '/bigHorn/bigHorn'}, | ||||
|       {name: '视频监控', key: "videoMonitor", path: '/videoSurveillance/videoSurveillance'}, | ||||
|     ] | ||||
| let agentSignURL = "", apiList = [], agentConfig = {} | ||||
| const store = new Vuex.Store({ | ||||
|   state: { | ||||
|     token: "", | ||||
| @@ -33,11 +14,9 @@ const store = new Vuex.Store({ | ||||
|     openUser: {}, | ||||
|     dicts: [], | ||||
|     user: {}, | ||||
|     apps, | ||||
|   }, | ||||
|   mutations: { | ||||
|     login(state, token) { | ||||
|       state.apps = apps | ||||
|       state.token = token | ||||
|     }, | ||||
|     logout(state) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user