增加一个展示测试信息页

This commit is contained in:
田岩
2025-07-08 17:22:54 +08:00
parent 7c391c2145
commit a395edbb55
6 changed files with 137 additions and 46 deletions
+2 -2
View File
@@ -3,9 +3,9 @@
"version": "0.0.1",
"description": "",
"scripts": {
"dev:h5": "uni -p h5 --mode development",
"dev:h5": "uni",
"dev:h5:sit": "uni -p h5 --mode sit",
"dev:h5uat": "uni -p h5 --mode uat",
"dev:h5:uat": "uni -p h5 --mode uat",
"build:app-plus:sit": "uni build -p app-plus --mode sit",
"build:app-plus:uat": "uni build -p app-plus --mode uat",
"build:app-plus": "uni build -p app-plus",
+3 -4
View File
@@ -6,8 +6,7 @@ import common from '@/common/common.js'
const ENV = import.meta.env
export const get_base_url = url => {
console.log('process.env.NODE_ENV', process.env)
if (process.env.NODE_ENV === 'development') { // 开发环境
if (ENV.MODE === 'development') { // 开发环境
// H5必须用非https,手机端必须用https
// #ifdef H5
const baseUrl = ENV.VITE_APP_BASE_API_Url
@@ -17,9 +16,9 @@ export const get_base_url = url => {
return baseUrl
// #endif
// #ifdef APP-PLUS
return ENV.VITE_APP_BASE_API_Url
return ENV.VITE_APP_BASE_API_Url
// #endif
} else if (process.env.NODE_ENV === 'production') { // 生产环境
} else { // 其他环境,包括生产环境,sit环境,uat环境
return ENV.VITE_APP_BASE_API_Url
}
}
+2 -2
View File
@@ -2,8 +2,8 @@
"name" : "tra-app",
"appid" : "__UNI__EDE0E52",
"description" : "",
"versionName" : "0.0.3",
"versionCode" : 3,
"versionName" : "0.0.1",
"versionCode" : 1,
"transformPx" : false,
/* 5+App */
"app-plus" : {
-12
View File
@@ -169,18 +169,6 @@
background-color: #F6F8FF;
}
// .detail-body {
// box-sizing: border-box;
// min-height: calc(100vh - (var(--status-bar-height)+50rpx));
// // padding: 29rpx 37rpx;
// width: 100%;
// display: flex;
// flex-direction: column;
// padding-top: 0rpx;
// }
.title {
color: #000000;
font-size: 34rpx;
+46
View File
@@ -0,0 +1,46 @@
<template>
<view class="max_page detail-main" style="overflow: hidden">
<nav-bar :is_seat="false"></nav-bar>
<view class="cell_div">
<uv-cell-group>
<uv-cell title="根域名" :value="url" ></uv-cell>
<uv-cell title="版本号" ></uv-cell>
<uv-cell title="版本名称" ></uv-cell>
<uv-cell title="当前环境:" :value="ENV.MODE"></uv-cell>
<!-- <uv-cell title="竞赛记录" :clickable="false" :border="false"></uv-cell> -->
</uv-cell-group>
</view>
</view>
</template>
<script setup>
import { reactive, ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import common from '@/common/common';
import { get_base_url } from '../../api/request';
const url = get_base_url();
const ENV = import.meta.env
</script>
<style lang="scss" scoped>
$bg-margin-left: 50rpx;
// 下方单元格
.cell_div {
margin: 30rpx $bg-margin-left 0 $bg-margin-left;
background: #ffffff;
border-radius: 15rpx;
z-index: 101;
overflow: hidden;
// 为了让线缩进来24单位
:deep(.uv-line) {
width: calc(100% - 48rpx) !important;
margin: 0 24rpx !important;
}
:deep(.uv-cell__body) {
padding: 12px 15px;
}
}
</style>
+84 -26
View File
@@ -1,45 +1,103 @@
<template>
<view class="max_page detail-main" style="overflow: hidden">
<view class="max_page detail-main">
<nav-bar :is_seat="false"></nav-bar>
<view class="cell_div">
<uv-cell-group>
<view class="fixed_search_div">
<view class="back_div" @click="common.navigateBack()">
<view class="back-icon"></view>
</view>
<view class="title font_pf">系统参数</view>
</view>
<view class="detail-body">
<uv-cell-group :border="false">
<uv-cell title="根域名" :value="url" ></uv-cell>
<uv-cell title="版本" ></uv-cell>
<uv-cell title="版本名称" ></uv-cell>
<uv-cell title="当前环境NODE_ENV" :value="env"></uv-cell>
<!-- <uv-cell title="竞赛记录" :clickable="false" :border="false"></uv-cell> -->
<uv-cell title="版本名称" :value="appBaseInfo.appVersion"></uv-cell>
<uv-cell title="版本" :value="appBaseInfo.appVersionCode"></uv-cell>
<uv-cell title="当前环境:" :value="ENV.MODE" :border="false"></uv-cell>
</uv-cell-group>
</view>
</view>
</template>
<script setup>
import { reactive, ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import common from '@/common/common';
import { get_base_url } from '../../api/request';
const url = get_base_url();
const env = process.env.NODE_ENV;
const ENV = import.meta.env
const appBaseInfo = uni.getAppBaseInfo()
</script>
<style lang="scss" scoped>
$bg-margin-left: 50rpx;
// 下方单元格
.cell_div {
margin: 30rpx $bg-margin-left 0 $bg-margin-left;
background: #ffffff;
border-radius: 15rpx;
z-index: 101;
overflow: hidden;
$bg-margin-left: 50rpx;
// 为了让线缩进来24单位
:deep(.uv-line) {
width: calc(100% - 48rpx) !important;
margin: 0 24rpx !important;
.detail-body {
margin: 30rpx $bg-margin-left 0 $bg-margin-left;
background: #ffffff;
border-radius: 15rpx;
z-index: 101;
overflow: hidden;
// 为了让线缩进来24单位
:deep(.uv-line) {
width: calc(100% - 48rpx) !important;
margin: 0 24rpx !important;
}
:deep(.uv-cell__body) {
padding: 12px 15px;
}
:deep(.uv-cell__title) {
flex: none !important;
}
}
:deep(.uv-cell__body) {
padding: 12px 15px;
.detail-main {
background-color: #F6F8FF;
}
}
</style>
.title {
color: #000000;
font-size: 34rpx;
height: 34rpx;
font-weight: 600;
// margin-bottom: 30rpx;
line-height: 34rpx;
}
.fixed_search_div {
padding: calc(10rpx + var(--status-bar-height)) 15rpx 24rpx 30rpx;
display: flex;
align-items: center;
background-color: #f6f7f8;
.back_div {
margin-right: 10rpx;
.back-icon {
position: relative;
width: 40rpx;
height: 40rpx;
cursor: pointer;
display: flex;
align-items: center;
}
.back-icon::before,
.back-icon::after {
content: '';
position: absolute;
transition: all 0.3s ease;
}
.back-icon::after {
top: 25%;
left: 25%;
width: 40%;
height: 40%;
border-top: 4rpx solid #2b2c2e;
border-left: 4rpx solid #2b2c2e;
transform: rotate(-45deg);
}
}
}
</style>