From 5f3df387e77d4de891930a6e3464c790685a89f7 Mon Sep 17 00:00:00 2001 From: ihzero Date: Sat, 11 Nov 2023 18:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 8 +- src/manifest.json | 9 +- src/pages.json | 428 ++++++++++++++++++------------------ src/pages/index/index.vue | 8 +- src/pages/login/login.vue | 7 +- src/pages/webview/index.vue | 44 ++++ src/static/head.png | Bin 162055 -> 64729 bytes src/store/index.js | 6 + windi.config.js | 5 +- 9 files changed, 293 insertions(+), 222 deletions(-) create mode 100644 src/pages/webview/index.vue diff --git a/src/main.js b/src/main.js index 76647a0..0a767a8 100644 --- a/src/main.js +++ b/src/main.js @@ -1,10 +1,10 @@ import Vue from 'vue' import App from './App' -import PortalVue from 'portal-vue' +// import PortalVue from 'portal-vue' import './uni.promisify.adaptor' import uView from "uview-ui"; Vue.use(uView); -Vue.use(PortalVue) +// Vue.use(PortalVue) import {http,getFullUrl} from '@/api/index.js' import store from './store/index.js' Vue.config.productionTip = false @@ -13,9 +13,9 @@ Vue.component('ynSelectInputList', ynSelectInputList) Vue.prototype.$http = http Vue.prototype.$getFullUrl = getFullUrl App.mpType = 'app' -import permission from '@/directive/permission/index.js' +// import permission from '@/directive/permission/index.js' -Vue.directive('auth', permission) +// Vue.directive('auth', permission) diff --git a/src/manifest.json b/src/manifest.json index 2d1b7de..5b141e6 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -55,9 +55,11 @@ /* 快应用特有相关 */ "mp-weixin" : { /* 微信小程序特有相关 */ - "appid" : "", + "appid" : "wx401e351ad84bc92d", "setting" : { - "urlCheck" : false + "urlCheck" : false, + "es6" : false, + "minified" : false }, "usingComponents" : true }, @@ -75,6 +77,7 @@ }, "h5" : { "template" : "" - // "publicPath" : "http://lcny.sk797.cn/h5/" } } +// "publicPath" : "http://lcny.sk797.cn/h5/" + diff --git a/src/pages.json b/src/pages.json index b8f638c..057ed80 100644 --- a/src/pages.json +++ b/src/pages.json @@ -2,7 +2,7 @@ "easycom": { "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" }, - "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + "pages": [ { "path": "pages/index/index", "style": { @@ -46,222 +46,230 @@ "enablePullDownRefresh": false } - } - ,{ - "path" : "pages/index/meteorological", - "style" : - { - "navigationBarTitleText": "气象监测", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/index/monitor", - "style" : - { - "navigationBarTitleText": "智能监控", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/index/soil-monitoring", - "style" : - { - "navigationBarTitleText": "土壤监控", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/index/water-quality", - "style" : - { - "navigationBarTitleText": "水质监控", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/system/account", - "style" : - { - "navigationBarTitleText": "账号管理", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/system/log", - "style" : - { - "navigationBarTitleText": "系统日志", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/system/links", - "style" : - { - "navigationBarTitleText": "友情链接", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - } - ,{ - "path" : "pages/device/warning", - "style" : - { - "navigationBarTitleText": "警报明细", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/device/index", - "style" : - { - "navigationBarTitleText": "设备管理", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - } - ,{ - "path" : "pages/index/insect-monitors", - "style" : - { - "navigationBarTitleText": "昆虫性诱监测", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/estate/estate-price", - "style" : - { - "navigationBarTitleText": "稻虾价格", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - } - ,{ - "path" : "pages/estate/estate-week-price", - "style" : - { - "navigationBarTitleText": "稻虾每周价格", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - } - ,{ - "path" : "pages/estate/estate-industry", - "style" : - { - "navigationBarTitleText": "稻虾产业", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - } - ,{ - "path" : "pages/estate/estate-flows", - "style" : - { - "navigationBarTitleText": "稻虾流向", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - } - ,{ - "path" : "pages/estate/estate-materiels", - "style" : - { - "navigationBarTitleText": "大宗物资", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - } - ,{ - "path" : "pages/index/warning-list", - "style" : - { - "navigationBarTitleText": "预警列表", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - },{ - "path" : "pages/index/pests", + "path" : "pages/webview/index", "style" : { - "navigationBarTitleText": "虫情监测", + "navigationBarTitleText": "webview", "enablePullDownRefresh": false } - },{ - "path" : "pages/index/insecticidal-lamp", - "style" : - { - "navigationBarTitleText": "杀虫灯监测", - "enablePullDownRefresh": false - } - - },{ - "path" : "pages/basics/town-base", - "style" : - { - "navigationBarTitleText": "城镇数据", - "enablePullDownRefresh": false - } - },{ - "path" : "pages/basics/basics-base", - "style" : - { - "navigationBarTitleText": "基地数据", - "enablePullDownRefresh": false, - "navigationStyle":"custom" - } - },{ - "path" : "pages/crop/town-crop", - "style" : - { - "navigationBarTitleText": "城镇农作物", - "enablePullDownRefresh": false, - "navigationStyle":"custom" - } - },{ - "path" : "pages/crop/basics-crop", - "style" : - { - "navigationBarTitleText": "基地农作物", - "enablePullDownRefresh": false, - "navigationStyle":"custom" - } - },{ - "path" : "pages/yield/town-yield", - "style" : - { - "navigationBarTitleText": "城镇产量", - "enablePullDownRefresh": false, - "navigationStyle":"custom" - } - },{ - "path" : "pages/yield/basics-yield", - "style" : - { - "navigationBarTitleText": "基地产量", - "enablePullDownRefresh": false, - "navigationStyle":"custom" - } } + // ,{ + // "path" : "pages/index/meteorological", + // "style" : + // { + // "navigationBarTitleText": "气象监测", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/index/monitor", + // "style" : + // { + // "navigationBarTitleText": "智能监控", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/index/soil-monitoring", + // "style" : + // { + // "navigationBarTitleText": "土壤监控", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/index/water-quality", + // "style" : + // { + // "navigationBarTitleText": "水质监控", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/system/account", + // "style" : + // { + // "navigationBarTitleText": "账号管理", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/system/log", + // "style" : + // { + // "navigationBarTitleText": "系统日志", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/system/links", + // "style" : + // { + // "navigationBarTitleText": "友情链接", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/device/warning", + // "style" : + // { + // "navigationBarTitleText": "警报明细", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/device/index", + // "style" : + // { + // "navigationBarTitleText": "设备管理", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/index/insect-monitors", + // "style" : + // { + // "navigationBarTitleText": "昆虫性诱监测", + // "enablePullDownRefresh": false + // } + + // } + // ,{ + // "path" : "pages/estate/estate-price", + // "style" : + // { + // "navigationBarTitleText": "稻虾价格", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/estate/estate-week-price", + // "style" : + // { + // "navigationBarTitleText": "稻虾每周价格", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/estate/estate-industry", + // "style" : + // { + // "navigationBarTitleText": "稻虾产业", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/estate/estate-flows", + // "style" : + // { + // "navigationBarTitleText": "稻虾流向", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/estate/estate-materiels", + // "style" : + // { + // "navigationBarTitleText": "大宗物资", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // } + // ,{ + // "path" : "pages/index/warning-list", + // "style" : + // { + // "navigationBarTitleText": "预警列表", + // "enablePullDownRefresh": false, + // "navigationStyle": "custom" + // } + + // },{ + // "path" : "pages/index/pests", + // "style" : + // { + // "navigationBarTitleText": "虫情监测", + // "enablePullDownRefresh": false + // } + + // },{ + // "path" : "pages/index/insecticidal-lamp", + // "style" : + // { + // "navigationBarTitleText": "杀虫灯监测", + // "enablePullDownRefresh": false + // } + + // },{ + // "path" : "pages/basics/town-base", + // "style" : + // { + // "navigationBarTitleText": "城镇数据", + // "enablePullDownRefresh": false + // } + // },{ + // "path" : "pages/basics/basics-base", + // "style" : + // { + // "navigationBarTitleText": "基地数据", + // "enablePullDownRefresh": false, + // "navigationStyle":"custom" + // } + // },{ + // "path" : "pages/crop/town-crop", + // "style" : + // { + // "navigationBarTitleText": "城镇农作物", + // "enablePullDownRefresh": false, + // "navigationStyle":"custom" + // } + // },{ + // "path" : "pages/crop/basics-crop", + // "style" : + // { + // "navigationBarTitleText": "基地农作物", + // "enablePullDownRefresh": false, + // "navigationStyle":"custom" + // } + // },{ + // "path" : "pages/yield/town-yield", + // "style" : + // { + // "navigationBarTitleText": "城镇产量", + // "enablePullDownRefresh": false, + // "navigationStyle":"custom" + // } + // },{ + // "path" : "pages/yield/basics-yield", + // "style" : + // { + // "navigationBarTitleText": "基地产量", + // "enablePullDownRefresh": false, + // "navigationStyle":"custom" + // } + // } ], "globalStyle": { "navigationBarTextStyle": "white", diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 30bd9aa..1b7f055 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -205,9 +205,13 @@ export default { }, linknavFn(item) { - console.log(item) + if(!item.url) return + const host = 'http://36.133.205.221:91' + // uni.navigateTo({ + // url: `/pages/webview/index?url=${host}/#${item.url}`, + // }) uni.navigateTo({ - url: `${item.url}`, + url: `/pages/webview/index?url=${host}/#/pages/login/login`, }) }, }, diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index 94779c6..aa092d8 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -1,7 +1,10 @@