修改图片资源地址端口;

修改ucenter部分内容页面路径;
调整首页样式
This commit is contained in:
ldeyun 2024-10-03 23:43:31 +08:00
parent 9dbfdc6c71
commit 12e6f95164
30 changed files with 261 additions and 188 deletions

View File

@ -4,7 +4,7 @@
// #ifdef H5
openApp() //h5app
// #endif
import checkIsAgree from '@/pagesPackage/uni-agree/utils/uni-agree.js';
import checkIsAgree from '@/common/uni-agree.js';
import uniIdPageInit from '@/uni_modules/uni-id-pages/init.js';
export default {
globalData: {

11
common/uni-agree.js Normal file
View File

@ -0,0 +1,11 @@
export default function(){
console.log(uni.getSystemInfoSync().platform)
let userprotocol = uni.getStorageSync('userprotocol');
console.log('userprotocol',userprotocol);
if(!userprotocol){
uni.navigateTo({
url:'/pages/uni-agree/uni-agree',
animationType:"none"
})
}
}

View File

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

View File

@ -3,6 +3,7 @@
"displayName": "NGTools",
"version": "2.1.8",
"description": "天然气计算工具",
"private": true,
"keywords": [
"login",
"登录",
@ -11,7 +12,7 @@
"留言板"
],
"type": "module",
"repository": "https://gitcode.net/dcloud/uni-starter",
"repository": "http://ngtools.cn:53000/ldeyun/ngtools",
"engines": {
"HBuilderX": "^3.2.6"
},

View File

@ -1,6 +1,20 @@
{
"pages": [{
"pages": [
// {
// "path": "pages/grid/login",
// "style": {
// "navigationStyle": "custom"
// }
// }
// ,
{
"path": "pages/grid/grid",
"style": {
"navigationStyle": "custom"
}
},{
"path": "pages/ucenter",
"style": {
"navigationStyle": "custom"
}
@ -16,18 +30,13 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/ucenter",
"style": {
"navigationStyle": "custom"
}
}
// #ifdef APP-PLUS
, {
,{
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
"style": {
"disableScroll": true,
@ -619,16 +628,17 @@
// "rpxCalcIncludeWidth":0
},
"condition": {
"list": [{
"path": "pages/list/detail"
},
"list": [
// {
// "path": "pages/list/detail"
// },
// {
// "path": "pages/list/list"
// },
{
"path": "pages/ucenter/settings/settings"
}
// {
// "path": "pages/ucenter/settings/settings"
// }
],
"current": 1
},
@ -638,23 +648,24 @@
"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": "我的"
}]
"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": "我的"
}
]
},
"uniIdRouter": {
"loginPage": "uni_modules/uni-id-pages/pages/login/login-withoutpwd",

View File

@ -1,88 +1,83 @@
<template>
<view class="warp">
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar title="天然气计算工具集" />
<view class="content">
<ad-rewarded-video adpid="1507000689" :loadnext="true" v-slot:default="{loading, error}" @load="onadload"
@close="onadclose" @error="onaderror">
<button :disabled="loading" :loading="loading">显示广告</button>
<view v-if="error">{{error}}</view>
</ad-rewarded-video>
</view>
<!-- 流量计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('llJs.grid')}}</text>
</view>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in llJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFit"></image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
<view >
<!-- 流量计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('llJs.grid')}}</text>
</view>
</view>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in llJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFit">
</image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
<!-- 参数计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('wxcsJs.grid')}}</text>
</view>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in wxcsJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFit"></image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
</view>
</view>
</view>
<!-- CNG计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('CNGJs.grid')}}</text>
</view>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in CNGJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFill"></image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
<!-- 参数计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('wxcsJs.grid')}}</text>
</view>
</view>
<!-- <!-- CNG计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('QtJs.grid')}}</text>
</view>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in QtJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFill"></image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in wxcsJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFit"></image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
</view>
</view>
<!-- CNG计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('CNGJs.grid')}}</text>
</view>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in CNGJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFill"></image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
</view>
</view>
<!-- <!-- CNG计算 -->
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('QtJs.grid')}}</text>
</view>
<view class="Grid">
<view class="Grid-Item" v-for="(item,index) in QtJsgridList" :key="index">
<navigator :url="item.url">
<view class="GSimg">
<image class="Image" :src="getStaticFilePath('/logomain.png')" mode="aspectFill"></image>
</view>
<view class="GStitle">{{ item.type }}</view>
</navigator>
</view>
</view>
</view>
</view>
</template>
@ -267,16 +262,17 @@
line-height: inherit;
}
/* #endif */
.section-box {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx;
align-items: left;
padding-left : calc(10vw /2);
padding-top: 10px;
padding-bottom: 10px;
}
.decoration {
@ -284,7 +280,7 @@
height: 12px;
border-radius: 10px;
background-color: #2979ff;
margin-left: 30rpx;
// margin-left: 30rpx;
}
.section-text {
@ -300,19 +296,7 @@
/* #endif */
.big-number {
font-size: 50rpx;
font-weight: 700;
font-stretch: condensed;
font-style: oblique;
}
.text {
text-align: center;
font-size: 26rpx;
margin-top: 10rpx;
}
.Grid {
width: 90vw;
@ -321,9 +305,9 @@
flex-wrap: wrap;
justify-content: flex-start;
align-content: space-between;
padding: 20rpx 40rpx;
padding-left : calc(10vw /2);
column-gap: calc(25% / 3);
row-gap: 10rpx;
row-gap: 5rpx;
box-sizing: content-box;
.Grid-Item {
@ -338,21 +322,20 @@
.GSimg {
width: 100%;
height: 10rpx;
margin-top: 20rpx;
text-align: center;
.Image {
width: 80rpx;
height: 80rpx;
width: 100rpx;
height: 100rpx;
}
}
.GStitle {
width: 100%;
height: 34rpx;
line-height: 34rpx;
color: orangered;
font-size: 24rpx;
font-size: 26rpx;
padding-top: 15px;
margin-top: 80rpx;
}

21
pages/grid/login.vue Normal file
View File

@ -0,0 +1,21 @@
<template>
<view>
</view>
</template>
<script>
export default {
onLoad() {
uni.navigateTo({
url: '/uni_modules/uni-id-pages/pages/login/login-withpwd'
})
}
}
</script>
<style>
</style>

View File

@ -133,13 +133,13 @@
"icon": "help"
}, {
"title": this.$t('mine.settings'),
"to": '/pages/ucenter/settings/settings',
"to": '/pagesPackage/ucenter/settings/settings',
"icon": "gear"
}],
// #ifdef APP-PLUS
[{
"title": this.$t('mine.about'),
"to": '/pages/ucenter/about/about',
"to": '/pagesPackage/ucenter/about/about',
"icon": "info"
}]
// #endif
@ -167,7 +167,7 @@
})
//#endif
},
onShow() {},
onShow() {},
computed: {
userInfo() {
return store.userInfo
@ -432,7 +432,7 @@
height: 100rpx;
line-height: 100rpx;
font-size: 38rpx;
color: #FFFFFF;
color: blue;
}
.center-list {

View File

@ -267,6 +267,9 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url = "https://ngtools.cn:8443";
// #endif

View File

@ -266,6 +266,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url = "https://ngtools.cn:8443";
// #endif

View File

@ -254,6 +254,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url = "https://ngtools.cn:8443";
// #endif

View File

@ -278,6 +278,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url="https://ngtools.cn:8443";
// #endif

View File

@ -416,6 +416,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url="https://ngtools.cn:8443";
// #endif

View File

@ -3,12 +3,12 @@
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar left-icon="left" left-text="返回"
title="差压式流量计算" @clickLeft="back" />
<uni-card>
<!-- test -->
<!-- test -->
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
activeColor="#4cd964"></uni-segmented-control>
</uni-card>
<view class="content">
<view class="content">
<view v-show="current === 0">
<yjly-ngtools-meterPar :meter-type="0" v-model="meterPar"
@calEnable="meterEnable"></yjly-ngtools-meterPar>
@ -19,7 +19,7 @@
<view v-show="current === 2">
<yjly-ngtools-meterResult :formData="meterResult"></yjly-ngtools-meterResult>
</view>
</view>
</view>
</template>
@ -31,8 +31,8 @@
current: 0,
strNG: "",
meterPar: [],
</view>meterResult: {
meterResult: {
"dCd": "",
"dCdCalMethod": "",
"dMeterFactor": "",
@ -67,7 +67,7 @@
},
NGFlag: false,
meterFlag: false,
meterFlag: false,
};
},
watch: {
@ -135,14 +135,14 @@
onClickItem(e) {
this.ssss="";
this.ssss = "";
if (this.current != e.currentIndex) {
this.current = e.currentIndex;
this.$nextTick(()=>{
if (this.current==2) {
this.$nextTick(() => {
if (this.current == 2) {
this.cal();
}
},500)
}, 500)
}
},
back() {
@ -219,15 +219,20 @@
console.log(NG_par);
var that = this;
var url="";
// #ifdef MP-WEIXIN
url="https://ngtools.cn:8443";
// #endif
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url = "https://ngtools.cn:8443";
// #endif
// #ifdef H5
url = "/api"
// #endif
console.log(url)
uni.request({
url: url + "/KBFlowcal",
type: 'GET',
@ -240,9 +245,10 @@
'content-type': 'application/x-www-form-urlencoded',
},
timeout: 1000, //10
success: function(res) {
console.log(res)
var data = JSON.stringify(res.data.message).toString().replace('[', '').replace(']','').split(',');
success: function(res) {
console.log(res)
var data = JSON.stringify(res.data.message).toString().replace('[', '').replace(']',
'').split(',');
that.meterResult.dCd = data[45].substring(0, data[45].indexOf(".") + 6);
that.meterResult.dE = data[46].substring(0, data[46].indexOf(".") + 6);
that.meterResult.dFG = data[47].substring(0, data[47].indexOf(".") + 6);
@ -266,7 +272,7 @@
that.current = 2;
console.log(that.meterResult)
},
fail: function(res) {
fail: function(res) {
console.log(res)
}
})

View File

@ -225,6 +225,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url="https://ngtools.cn:8443";
// #endif

View File

@ -224,6 +224,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url="https://ngtools.cn:8443";
// #endif

View File

@ -278,6 +278,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url = "https://ngtools.cn:8443";
// #endif

View File

@ -265,6 +265,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url="https://ngtools.cn:8443";
// #endif

View File

@ -264,6 +264,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url = "https://ngtools.cn:8443";
// #endif

View File

@ -264,6 +264,10 @@
console.log(NG_par);
var that = this;
var url = "";
// #ifdef APP-PLUS
url = "https://ngtools.cn:8443";
// #endif
// #ifdef MP-WEIXIN
url = "https://ngtools.cn:8443";
// #endif

View File

@ -9,7 +9,7 @@ export default {
// //左侧显示的应用名称
"appname": '天然气计算',
// //应用的图标
"logo": "https://ngtools.cn/pic/static/logomain.png",
"logo": "https://ngtools.cnhttps://ngtools.cn/pic/static/logomain.png",
}
},
"mp": {
@ -23,7 +23,7 @@ export default {
//应用名称
"appName": "天然气计算",
//应用logo
"logo": "https://ngtools.cn/pic/static/logomain.png",
"logo": "https://ngtools.cnhttps://ngtools.cn/pic/static/logomain.png",
//公司名称
"company": "妍杰丽云工作室",
//口号

View File

@ -37,8 +37,8 @@
"mp-weixin": {
"oauth": {
"weixin": {
"appid": "微信小程序登录所用的appid、appsecret需要在对应的小程序管理控制台获取",
"appsecret": "微信小程序后台获取的appsecret"
"appid": "wx9f9b7d747d261686",
"appsecret": "86f3c4ca07a79a34ebb23e790151b999"
}
}
},

View File

@ -43,6 +43,7 @@ const mixin = {
}
if (e.uniIdRedirectUrl) {
console.log(e.uniIdRedirectUrl)
this.uniIdRedirectUrl = decodeURIComponent(e.uniIdRedirectUrl)
}
@ -85,6 +86,7 @@ const mixin = {
methods: {
loginSuccess(e) {
console.log("登录成功"+JSON.stringify(e))
console.log("============"+this.uniIdRedirectUrl)
mutations.loginSuccess({
...e,
uniIdRedirectUrl: this.uniIdRedirectUrl

View File

@ -90,7 +90,6 @@
// 解决小程序端开启虚拟节点virtualHost引起的 class = input-box丢失的问题 [详情参考](https://uniapp.dcloud.net.cn/matter.html#%E5%90%84%E5%AE%B6%E5%B0%8F%E7%A8%8B%E5%BA%8F%E5%AE%9E%E7%8E%B0%E6%9C%BA%E5%88%B6%E4%B8%8D%E5%90%8C-%E5%8F%AF%E8%83%BD%E5%AD%98%E5%9C%A8%E7%9A%84%E5%B9%B3%E5%8F%B0%E5%85%BC%E5%AE%B9%E9%97%AE%E9%A2%98)
.uni-content ::v-deep .uni-easyinput__content,
/* #endif */
.input-box {
height: 44px;
background-color: #F8F8F8 !important;
@ -101,16 +100,13 @@
/* #endif */
flex: 1;
}
.link {
color: #04498c;
cursor: pointer;
}
.uni-content ::v-deep .uni-forms-item__inner {
padding-bottom: 8px;
}
.uni-btn {
text-align: center;
height: 40px;
@ -120,7 +116,6 @@
border-radius: 5px;
font-size: 16px;
}
.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd{
height: auto !important;
}

View File

@ -15,13 +15,16 @@ export default {
// "google",
// "alipay",
// "douyin",
// #ifdef APP
'weixin',
'univerify',
// #endif
// #ifdef MP-WEIXIN
'weixin',
// #endif
'username',
// #ifdef APP
'weixin',
'apple',
// #endif
'smsCode'
@ -39,7 +42,7 @@ export default {
appid: {
weixin: {
// 微信公众号的appid来源:登录微信公众号https://mp.weixin.qq.com-> 设置与开发 -> 基本配置 -> 公众号开发信息 -> AppID
h5: 'xxxxxx',
h5: 'wx9f9b7d747d261686',
// 微信开放平台的appid来源:登录微信开放平台https://open.weixin.qq.com -> 管理中心 -> 网站应用 -> 选择对应的应用名称,点击查看 -> AppID
web: 'xxxxxx'
}

View File

@ -24,7 +24,7 @@
"code": "",
"phone": "",
"captcha": "",
"logo": "/static/logo.png"
"logo": "https://ngtools.cnhttps://ngtools.cn/pic/static/logomain.png"
}
},
computed: {

View File

@ -43,7 +43,7 @@
type: "", //
phone: "", //
focusPhone: false,
logo: "/static/logo.png"
logo: "https://ngtools.cnhttps://ngtools.cn/pic/static/logomain.png"
}
},
computed: {

View File

@ -51,7 +51,7 @@
"needCaptcha": false,
"focusUsername": false,
"focusPassword": false,
"logo": "/static/logo.png"
"logo": "https://ngtools.cnhttps://ngtools.cn/pic/static/logomain.png"
}
},
onShow() {
@ -123,7 +123,7 @@
}
uniIdCo.login(data).then(e => {
console.log(JSON.stringify(data))
console.log(JSON.stringify(e))
this.loginSuccess(e)
}).catch(e => {
if (e.errCode == 'uni-id-captcha-required') {

View File

@ -98,6 +98,7 @@ export default {
content: '密码设置成功',
showCancel: false,
success: () => {
console.log("rrrrrrrr" + this.uniIdRedirectUrl)
mutations.loginBack({
uniIdRedirectUrl: this.uniIdRedirectUrl,
loginType: this.loginType

View File

@ -123,20 +123,16 @@
:title="formData.dRnPipe"></uni-title>
</uni-forms-item>
</view>
<view class="formItem">
<uni-forms-item v-if="meterType==0" name="dVelocityFlow" label-width='150' label="天然气流速(m/s)">
<uni-forms-item v-if="meterType==0" name="dVelocityFlow" label-width='150'
label="天然气流速(m/s)">
<uni-title type="h3" color="blue" placeholder="管道内天然气流速"
:title="formData.dVelocityFlow"></uni-title>
</uni-forms-item>
</view>
<view class="formItem"> <uni-forms-item v-if="meterType==0" name="dPressLost" label-width='150'
label="压力损失">
<uni-title type="h3" color="blue" placeholder="压力损失"
<uni-title type="h3" color="blue" placeholder="压力损失(Pa)"
:title="formData.dPressLost"></uni-title>
</uni-forms-item>
</view>
@ -203,7 +199,7 @@
mounted() {
let that = this;
// #ifdef APP
uni.getSystemInfo({
success: function(res) {
that.scrollerHeight = (res.windowHeight - 200)
@ -211,7 +207,7 @@
});
// #endif
// #ifdef H5
uni.getSystemInfo({
success: function(res) {
that.scrollerHeight = (res.windowHeight - 200)
@ -219,11 +215,11 @@
});
// #endif
// #ifdef MP-WEIXIN
wx.getSystemInfo({
success: function(res) {
that.scrollerHeight = (res.windowHeight - 200)
}
})
wx.getSystemInfo({
success: function(res) {
that.scrollerHeight = (res.windowHeight - 200)
}
})
// #endif
// this.$refs.form.setRules(this.rules)