Files
tra-app/src/pages/test/index.vue
T
2025-07-16 17:59:06 +08:00

145 lines
3.1 KiB
Vue

<template>
<view class="max_page detail-main">
<nav-bar :is_seat="false"></nav-bar>
<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="当前环境:" :value="ENV.MODE"></uv-cell>
<uv-cell title="版本名称" :value="appBaseInfo.appVersion"></uv-cell>
<uv-cell title="版本号" :value="appBaseInfo.appVersionCode"></uv-cell>
<uv-cell title="点击1:" @click="aaaa"></uv-cell>
<uv-cell title="点击2:" :border="false" @click="bbbb"></uv-cell>
</uv-cell-group>
</view>
</view>
</template>
<script setup>
import common from '@/common/common';
import {
get_base_url
} from '../../api/request';
const url = get_base_url();
const ENV = import.meta.env
const appBaseInfo = uni.getAppBaseInfo()
console.log('appBaseInfo', appBaseInfo);
import showDialog from '@/common/dialogMessage'
const bbbb = () => {
showDialog({
title: '提示信息',
content: '检测到您已离开,即将退出学习页面。',
confirmText: '确认',
showCancel: false,
cancelText: '再想想',
success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
}
},
cancel: () => {
console.log('用户点击取消');
}
});
}
const aaaa = () => {
showDialog({
title: '提示',
content: '检测到您已存在学习记录,要继续学习吗?',
confirmText: '重新学习',
showCancel: true,
cancelText: '继续学习',
success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
}
},
cancel: () => {
console.log('用户点击取消');
}
});
}
</script>
<style lang="scss" scoped>
$bg-margin-left: 50rpx;
.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;
}
}
.detail-main {
background-color: #F6F8FF;
}
.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>