pages.json 分文件配置

This commit is contained in:
liaody 2024-10-08 08:23:15 +08:00 committed by ldeyun
commit 37d78ba56b
12 changed files with 850 additions and 27 deletions

View File

@ -110,12 +110,12 @@ export default {
ZBGJs: { ZBGJs: {
title: "压缩因子表格", title: "压缩因子表格",
url: "/pagesPackage/ngtools_Par/ZBgJs", url: "/pagesPackage/ngtools_Par/ZBgJs",
icon:'zt' icon:'zt.png'
}, },
srjBGJs: { srjBGJs: {
title: "水容积表格", title: "水容积表格",
url: "/pagesPackage/ngtools_CNG/srjBgJs", url: "/pagesPackage/ngtools_CNG/srjBgJs",
icon:'vt' icon:'vt.png'
} }
// , // ,
// SqgyJs: { // SqgyJs: {

View File

@ -1,6 +1,6 @@
import App from './App' import App from './App'
import i18n from './lang/i18n' import i18n from './lang/i18n'
Vue.prototype.staticDir = 'https://ngtools.cn/pic/static/'; Vue.prototype.staticDir = 'https://ngtools.cn:3000/pic/static/';
Vue.prototype.getStaticFilePath = function(url) { Vue.prototype.getStaticFilePath = function(url) {
return Vue.prototype.staticDir + url; return Vue.prototype.staticDir + url;
} }

View File

@ -0,0 +1,76 @@
/* ===pages-tool===
pages-tool使
pages-toolpages.josn便
使
,pages.json
pages.jsonpaes-config.jsonpages.josn,
pages.json
*/
{
//,globalStyle使pages.json
//"globalStyle" : "pages-config/globalStyle.json"
//pages.jsonglobalStyle
"globalStyle" : "",
//,easycom使pages.json
//"easycom" : "pages-config/easycom.json"
//pages.jsoneasycom
"easycom" : "",
//,tabBar使pages.json
//"tabBar" : "pages-config/tabBar.json"
//pages.jsontabBar
"tabBar" : "",
//,pages使pages.json
//"pages" : ["pages-config/pages-moduleA.json", "pages-config/pages-moduleB.json", "pages-config/pages-moduleC.json", ...]
//pages.jsonpages
"pages" : [],
//,condition使pages.json
//"condition" : "pages-config/condition.json"
//pages.jsoncondition
"condition" : "",
//,pages使pages.json
//"subPackages" : [pages-config/subPackages-moduleNameA.json, pages-config/subPackages-moduleNameB.json, ...],
//pages.jsonsubPackages
//pages
"subPackages" : [],
//,preloadRule使pages.json
//"preloadRule" : "pages-config/preloadRule.json"
//pages.jsonpreloadRule
"preloadRule" : "",
//"workers" : "pages-config/workers.json"
//pages.json
"workers" : "",
//,leftWindow使pages.json
//"leftWindow" : "pages-config/leftWindow.json"
//pages.jsonleftWindow
"leftWindow" : "",
//,topWindow使pages.json
//"topWindow" : "pages-config/topWindow.json"
//pages.jsontopWindow
"topWindow" : "",
//,rightWindow使pages.json
//"rightWindow" : "pages-config/rightWindow.json"
//pages.jsonrightWindow
"rightWindow" : "",
//,uniIdRouter使pages.json
//"uniIdRouter" : "pages-config/uniIdRouter.json"
//pages.jsonuniIdRouter
"uniIdRouter" : "",
//page.json
//"entryPagePath" : "/...." "entryPagePath" : "pages-config/entryPagePath.json"
"entryPagePath": ""
}

40
pages-config.json Normal file
View File

@ -0,0 +1,40 @@
/* ===pages-tool===
pages-tool
pages-toolpages.josn便
使
,pages.json
pages.jsonpaes-config.jsonpages.josn,
pages.json
*/
{
"globalStyle" : "pages-config/globalStyle.json",
"easycom" : "",
"tabBar" : "pages-config/tabBar.json",
"pages" : ["pages-config/pages-all.json"],
"condition" : "pages-config/condition.json",
"leftWindow" : "",
"topWindow" : "",
"rightWindow" : "",
"uniIdRouter" : "pages-config/uniIdRouter.json",
///
"subPackages" : ["pages-config/subPackages-all.json"],
"preloadRule" : "",
"workers" : "",
"entryPagePath": ""
}

View File

@ -0,0 +1,18 @@
/* /// Pages-Tool: pages-toolpages-config.json,pages.json*/
{
"condition": {
"list": [
// {
// "path": "pages/list/detail"
// },
// {
// "path": "pages/list/list"
// },
// {
// "path": "pages/ucenter/settings/settings"
// }
],
"current": 1
}
}

View File

@ -0,0 +1,19 @@
/* /// Pages-Tool: pages-toolpages-config.json,pages.json*/
{
"globalStyle": {
// #ifdef H5
"h5": {
"titleNView": false
},
// #endif
"navigationBarTextStyle": "black",
// "navigationBarTitleText": "uni-starter",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8",
"enablePullDownRefresh": false,
// "maxWidth":375,
"rpxCalcMaxDeviceWidth": 375,
"rpxCalcBaseDeviceWidth": 375
// "rpxCalcIncludeWidth":0
}
}

View File

@ -0,0 +1,57 @@
/* /// Pages-Tool: pages-toolpages-config.json,pages.json*/
{
"pages": [
// {
// "path": "pages/grid/login",
// "style": {
// "navigationStyle": "custom"
// }
// }
// ,
{
"path": "pages/grid/grid",
"style": {
"navigationStyle": "custom"
}
},{
"path": "pages/ucenter",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/list/list",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/list/detail",
"style": {
"navigationStyle": "custom"
}
}
// #ifdef APP-PLUS
,{
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
"style": {
"disableScroll": true,
"app-plus": {
"backgroundColorTop": "transparent",
"background": "transparent",
"titleNView": false,
"scrollIndicator": false,
"popGesture": "none",
"animationType": "fade-in",
"animationDuration": 200
}
}
}
// #endif
]
}

View File

@ -0,0 +1,561 @@
/* /// Pages-Tool: pages-toolpages-config.json,pages.json*/
{
"subPackages": [{
"root": "pagesPackage/components",
"pages": [{
"path": "popup",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"app-plus": {
"animationType": "fade-in", // fade-in
"background": "transparent", //
"backgroundColor": "transparent", //
"webviewBGTransparent": true,
"mask": "none",
"popGesture": "none", // IOS
"bounce": "none" //
}
}
}]
},
{
"root": "pagesPackage/opendb-banner",
"pages": [{
"path": "add",
"style": {
"navigationBarTitleText": "新增"
}
},
{
"path": "edit",
"style": {
"navigationBarTitleText": "编辑"
}
},
{
"path": "list",
"style": {
"navigationBarTitleText": "列表"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "详情"
}
}
]
},
{
"root": "pagesPackage/uni-agree",
"pages": [{
"path": "uni-agree",
"style": {
"navigationStyle": "custom",
"app-plus": {
"popGesture": "none"
}
}
}]
},
{
"root": "pagesPackage/ucenter",
"pages": [{
"path": "invite/invite",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "settings/settings",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "read-news-log/read-news-log",
"style": {
"navigationBarTitleText": "阅读记录",
"enablePullDownRefresh": true
}
},
{
"path": "pay/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "about/about",
"style": {
"navigationBarTitleText": "关于",
"app-plus": {
"titleNView": {
"buttons": [{
"type": "share"
}]
}
}
}
}
]
},
{
"root": "uni_modules/uni-feedback",
"pages": [{
"path": "pages/opendb-feedback/opendb-feedback",
"style": {
"navigationBarTitleText": "意见反馈",
"enablePullDownRefresh": false
}
}]
}, {
"root": "uni_modules/uni-id-pages/pages",
"pages": [{
"path": "userinfo/userinfo",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "userinfo/realname-verify/realname-verify",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "实名认证"
}
},
{
"path": "login/login-withoutpwd"
},
{
"path": "login/login-withpwd"
},
{
"path": "userinfo/deactivate/deactivate",
"style": {
"navigationBarTitleText": "注销账号"
}
},
{
"path": "userinfo/bind-mobile/bind-mobile",
"style": {
"navigationBarTitleText": "绑定手机号码"
}
},
{
"path": "login/login-smscode",
"style": {
"navigationBarTitleText": "手机验证码登录"
}
},
{
"path": "register/register",
"style": {
"navigationBarTitleText": "注册"
}
},
{
"path": "retrieve/retrieve",
"style": {
"navigationBarTitleText": "重置密码"
}
}, {
"path": "common/webview/webview",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": ""
}
}, {
"path": "userinfo/change_pwd/change_pwd",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "修改密码"
}
}, {
"path": "register/register-by-email",
"style": {
"navigationBarTitleText": "邮箱验证码注册"
}
}, {
"path": "retrieve/retrieve-by-email",
"style": {
"navigationBarTitleText": "通过邮箱重置密码"
}
},
{
"path": "userinfo/set-pwd/set-pwd",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "设置密码"
}
}
// #ifdef H5
,
{
"path": "userinfo/cropImage/cropImage"
},
{
"path": "register/register-admin",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "注册管理员账号"
}
}
// #endif
]
}, {
"root": "pagesPackage/ngtools_Flow",
"pages": [{
"path": "cysllJs",
"style": {
"navigationBarTitleText": "差压式流量计算",
"navigationStyle": "custom"
}
}, {
"path": "sdsllJs",
"style": {
"navigationBarTitleText": "速度式流量计算",
"navigationStyle": "custom"
}
},
{
"path": "ljlllJs",
"style": {
"navigationBarTitleText": "临界流流量计算",
"navigationStyle": "custom"
}
},
{
"path": "SqgyJs",
"style": {
"navigationBarTitleText": "输气工艺",
"navigationStyle": "custom"
}
}
]
}, {
"root": "pagesPackage/ngtools_Par",
"pages": [{
"path": "zJs",
"style": {
"navigationBarTitleText": "压缩因子计算GB/T 17747",
"navigationStyle": "custom"
}
},
{
"path": "mdRzJs",
"style": {
"navigationBarTitleText": "密度热值计算GB/T 11062",
"navigationStyle": "custom"
}
},
{
"path": "qtJs",
"style": {
"navigationBarTitleText": "其他物性参数计算",
"navigationStyle": "custom"
}
},
{
"path": "ZBgJs",
"style": {
"navigationBarTitleText": "压缩因子表格",
"navigationStyle": "custom"
}
}
]
}, {
"root": "pagesPackage/ngtools_CNG",
"pages": [{
"path": "LNGQhJs",
"style": {
"navigationBarTitleText": "LNG气化计算",
"navigationStyle": "custom"
}
},
{
"path": "srjJs",
"style": {
"navigationBarTitleText": "罐车水容积计算",
"navigationStyle": "custom"
}
},
{
"path": "zxcJs",
"style": {
"navigationBarTitleText": "装卸量计算",
"navigationStyle": "custom"
}
},
{
"path": "srjBgJs",
"style": {
"navigationBarTitleText": "水容积表格",
"navigationStyle": "custom"
}
}
]
}, {
"root": "pagesPackage/ngTools_depart",
"pages": [{
"path": "add",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "edit",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "list",
"style": {
"navigationStyle": "custom"
}
}, {
"path": "detail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "departList/departList",
"style": {
"navigationBarTitleText": ""
}
}
]
},
{
"root": "pagesPackage/ngTools_Dict",
"pages": [{
"path": "add",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "edit",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "list",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "detail",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "pagesPackage/ngTools_DictItem",
"pages": [{
"path": "add",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "edit",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "list",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "detail",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "pagesPackage/ngtools_information",
"pages": [{
"path": "add",
"style": {
"navigationBarTitleText": "新增"
}
},
{
"path": "edit",
"style": {
"navigationBarTitleText": "编辑"
}
},
{
"path": "list",
"style": {
"navigationBarTitleText": "列表"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "详情"
}
}
]
},
{
"root": "pagesPackage/ngtools_categories",
"pages": [{
"path": "add",
"style": {
"navigationBarTitleText": "新增"
}
},
{
"path": "edit",
"style": {
"navigationBarTitleText": "编辑"
}
},
{
"path": "list",
"style": {
"navigationBarTitleText": "列表"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "详情"
}
}
]
},
{
"root": "pagesPackage/ngTools_SamplingLocation",
"pages": [{
"path": "add",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "edit",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "list",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "detail",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "pagesPackage/ngTools_MeterList",
"pages": [{
"path": "add",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "edit",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "list",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "detail",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "pagesPackage/ngtools-goods",
"pages": [{
"path": "add",
"style": {
"navigationBarTitleText": "新增"
}
},
{
"path": "edit",
"style": {
"navigationBarTitleText": "编辑"
}
},
{
"path": "list",
"style": {
"navigationBarTitleText": "列表"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "详情"
}
}
]
},
{
"root": "uni_modules/uni-pay",
"pages": [{
"path": "pages/success/success",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/ad-interactive-webview/ad-interactive-webview",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/pay-desk/pay-desk",
"style": {
"navigationStyle": "custom"
}
}
]
}
]
}

28
pages-config/tabBar.json Normal file
View File

@ -0,0 +1,28 @@
/* /// Pages-Tool: pages-toolpages-config.json,pages.json*/
{
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"list": [{
"pagePath": "pages/grid/grid",
"iconPath": "static/tabbar/list.png",
"selectedIconPath": "static/tabbar/list_active.png",
"text": "首页"
}
// , {
// "pagePath": "pages/list/list",
// "iconPath": "static/tabbar/grid.png",
// "selectedIconPath": "static/tabbar/grid_active.png",
// "text": "常用资料"
// }
, {
"pagePath": "pages/ucenter",
"iconPath": "static/tabbar/me.png",
"selectedIconPath": "static/tabbar/me_active.png",
"text": "我的"
}
]
}
}

View File

@ -0,0 +1,10 @@
/* /// Pages-Tool: pages-toolpages-config.json,pages.json*/
{
"uniIdRouter": {
"loginPage": "uni_modules/uni-id-pages/pages/login/login-withoutpwd",
"needLogin": [
"/uni_modules/uni-id-pages/pages/userinfo/userinfo"
],
"resToLogin": true
}
}

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="warp"> <view class="warp">
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar title="天然气计算工具集" /> <uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar title="天然气计算工具集" />
<view > <view>
<!-- 流量计算 --> <!-- 流量计算 -->
<view class="section-box"> <view class="section-box">
<text class="decoration"></text> <text class="decoration"></text>
@ -36,7 +36,8 @@
<view class="Grid-Item" v-for="(item,index) in wxcsJsgridList" :key="index"> <view class="Grid-Item" v-for="(item,index) in wxcsJsgridList" :key="index">
<navigator :url="item.url"> <navigator :url="item.url">
<view class="GSimg"> <view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFit"></image> <image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFit">
</image>
</view> </view>
<view class="GStitle">{{ item.type }}</view> <view class="GStitle">{{ item.type }}</view>
</navigator> </navigator>
@ -52,7 +53,8 @@
<view class="Grid-Item" v-for="(item,index) in CNGJsgridList" :key="index"> <view class="Grid-Item" v-for="(item,index) in CNGJsgridList" :key="index">
<navigator :url="item.url"> <navigator :url="item.url">
<view class="GSimg"> <view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFill"></image> <image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFill">
</image>
</view> </view>
<view class="GStitle">{{ item.type }}</view> <view class="GStitle">{{ item.type }}</view>
</navigator> </navigator>
@ -68,7 +70,8 @@
<view class="Grid-Item" v-for="(item,index) in QtJsgridList" :key="index"> <view class="Grid-Item" v-for="(item,index) in QtJsgridList" :key="index">
<navigator :url="item.url"> <navigator :url="item.url">
<view class="GSimg"> <view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFill"></image> <image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFill">
</image>
</view> </view>
<view class="GStitle">{{ item.type }}</view> <view class="GStitle">{{ item.type }}</view>
</navigator> </navigator>
@ -173,15 +176,18 @@
gridList = [] gridList = []
gridList.push({ gridList.push({
"type": this.$t('wxcsJs.ysyzJs.title'), "type": this.$t('wxcsJs.ysyzJs.title'),
"url": this.$t('wxcsJs.ysyzJs.url') "url": this.$t('wxcsJs.ysyzJs.url'),
"icon": this.$t('wxcsJs.ysyzJs.icon')
}) })
gridList.push({ gridList.push({
"type": this.$t('wxcsJs.rzJs.title'), "type": this.$t('wxcsJs.rzJs.title'),
"url": this.$t('wxcsJs.rzJs.url') "url": this.$t('wxcsJs.rzJs.url'),
"icon": this.$t('wxcsJs.rzJs.icon')
}) })
gridList.push({ gridList.push({
"type": this.$t('wxcsJs.qtJs.title'), "type": this.$t('wxcsJs.qtJs.title'),
"url": this.$t('wxcsJs.qtJs.url') "url": this.$t('wxcsJs.qtJs.url'),
"icon": this.$t('wxcsJs.qtJs.icon')
}) })
this.wxcsJsgridList = gridList this.wxcsJsgridList = gridList
@ -189,26 +195,31 @@
gridList.push({ gridList.push({
"type": this.$t('CNGJs.srjJs.title'), "type": this.$t('CNGJs.srjJs.title'),
"url": this.$t('CNGJs.srjJs.url') "url": this.$t('CNGJs.srjJs.url'),
"icon": this.$t('CNGJs.srjJs.icon')
}) })
gridList.push({ gridList.push({
"type": this.$t('CNGJs.zxcJs.title'), "type": this.$t('CNGJs.zxcJs.title'),
"url": this.$t('CNGJs.zxcJs.url') "url": this.$t('CNGJs.zxcJs.url'),
"icon": this.$t('CNGJs.zxcJs.icon')
}) })
gridList.push({ gridList.push({
"type": this.$t('CNGJs.LNGQhJs.title'), "type": this.$t('CNGJs.LNGQhJs.title'),
"url": this.$t('CNGJs.LNGQhJs.url') "url": this.$t('CNGJs.LNGQhJs.url'),
"icon": this.$t('CNGJs.LNGQhJs.icon')
}) })
this.CNGJsgridList = gridList this.CNGJsgridList = gridList
gridList = [] gridList = []
gridList.push({ gridList.push({
"type": this.$t('QtJs.ZBGJs.title'), "type": this.$t('QtJs.ZBGJs.title'),
"url": this.$t('QtJs.ZBGJs.url') "url": this.$t('QtJs.ZBGJs.url'),
"icon": this.$t('QtJs.ZBGJs.icon')
}) })
gridList.push({ gridList.push({
"type": this.$t('QtJs.srjBGJs.title'), "type": this.$t('QtJs.srjBGJs.title'),
"url": this.$t('QtJs.srjBGJs.url') "url": this.$t('QtJs.srjBGJs.url'),
"icon": this.$t('QtJs.srjBGJs.icon')
}) })
// gridList.push({ // gridList.push({
// "type": this.$t('QtJs.SqgyJs.title'), // "type": this.$t('QtJs.SqgyJs.title'),
@ -262,7 +273,7 @@
line-height: inherit; line-height: inherit;
} }
/* #endif */ /* #endif */
@ -270,7 +281,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: left; align-items: left;
padding-left : calc(10vw /2); padding-left: calc(10vw /2);
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
} }
@ -296,7 +307,7 @@
/* #endif */ /* #endif */
.Grid { .Grid {
width: 90vw; width: 90vw;
@ -305,7 +316,7 @@
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
align-content: space-between; align-content: space-between;
padding-left : calc(10vw /2); padding-left: calc(10vw /2);
column-gap: calc(25% / 3); column-gap: calc(25% / 3);
row-gap: 5rpx; row-gap: 5rpx;
box-sizing: content-box; box-sizing: content-box;
@ -329,6 +340,7 @@
height: 100rpx; height: 100rpx;
} }
} }
.GStitle { .GStitle {
width: 100%; width: 100%;
height: 34rpx; height: 34rpx;

View File

@ -127,11 +127,13 @@
// } // }
// // #endif // // #endif
], ],
[{ [
"title": this.$t('mine.feedback'), // {
"to": '/uni_modules/uni-feedback/pages/opendb-feedback/opendb-feedback', // "title": this.$t('mine.feedback'),
"icon": "help" // "to": '/uni_modules/uni-feedback/pages/opendb-feedback/opendb-feedback',
}, { // "icon": "help"
// },
{
"title": this.$t('mine.settings'), "title": this.$t('mine.settings'),
"to": '/pagesPackage/ucenter/settings/settings', "to": '/pagesPackage/ucenter/settings/settings',
"icon": "gear" "icon": "gear"