修改样式,适配手机

This commit is contained in:
xuli3099
2025-08-27 13:49:03 +08:00
parent 201b7058a5
commit c5fe81450e
11 changed files with 1019 additions and 3259 deletions

4011
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -56,7 +56,7 @@
"@dcloudio/uni-mp-weixin": "3.0.0-4070620250821001",
"@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4070620250821001",
"@dcloudio/uni-ui": "^1.5.7",
"@dcloudio/uni-ui": "^1.5.11",
"crypto-js": "^4.2.0",
"mescroll-uni": "^1.3.7",
"pinia": "2.0.20",
@@ -65,14 +65,15 @@
"vue-i18n": "9.14.5"
},
"devDependencies": {
"@dcloudio/types": "^3.4.8",
"@dcloudio/uni-automator": "3.0.0-4070520250711001",
"@dcloudio/uni-cli-shared": "3.0.0-4070520250711001",
"@dcloudio/uni-stacktracey": "3.0.0-4070520250711001",
"@dcloudio/vite-plugin-uni": "3.0.0-4070520250711001",
"@vue/runtime-core": "^3.4.21",
"@dcloudio/types": "3.4.19",
"@dcloudio/uni-automator": "3.0.0-4070620250821001",
"@dcloudio/uni-cli-shared": "3.0.0-4070620250821001",
"@dcloudio/uni-stacktracey": "3.0.0-4070620250821001",
"@dcloudio/vite-plugin-uni": "3.0.0-4070620250821001",
"@vue/runtime-core": "3.5.20",
"lodash-es": "^4.17.21",
"sass": "^1.79.3",
"sass": "^1.91.0",
"sass-loader": "^10.1.1",
"vite": "5.2.8"
}
}

View File

@@ -240,7 +240,7 @@ const handleResultClick = (item) => {
margin-bottom: 0;
border-radius: 8px 8px 0 0;
/* #ifdef APP-PLUS */
height: calc(100vh - 130px);
height: calc(100vh - 168px);
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 150px);
@@ -268,7 +268,6 @@ const handleResultClick = (item) => {
.tag-container {
display: flex;
flex-wrap: wrap;
gap:20rpx;
}
.search-tag {
@@ -276,8 +275,8 @@ const handleResultClick = (item) => {
border:1px solid #E8E8E8;
border-radius: 10rpx;
padding: 10rpx 15rpx;
/* margin-right: 20rpx;
margin-bottom: 20rpx; */
margin-right: 20rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
}

View File

@@ -3,15 +3,6 @@ import App from "./App.vue";
import { CLIENT_ID,NETWORK_ENV } from '@/enums/cacheEnums';
import '@/static/font/iconfont.css'
// 注册UNiCloud组件
// import uniForms from '@dcloudio/uni-ui/lib/uni-forms/uni-forms.vue'
// import uniFormsItem from '@dcloudio/uni-ui/lib/uni-forms-item/uni-forms-item.vue'
// import uniEasyinput from '@dcloudio/uni-ui/lib/uni-easyinput/uni-easyinput.vue'
// import uniIcons from '@dcloudio/uni-ui/lib/uni-icons/uni-icons.vue'
// import uniSearchBar from '@dcloudio/uni-ui/lib/uni-search-bar/uni-search-bar.vue'
// import uniDataPicker from '@dcloudio/uni-ui/lib/uni-data-picker/uni-data-picker.vue'
// import uniDatetimePicker from '@dcloudio/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue'
// 注册自定义组件
import customShowModal from '@/components/customShowModal.vue'
@@ -30,15 +21,7 @@ export function createApp() {
app.config.globalProperties.$NETWORK_ENV = NETWORK_ENV;
// 全局自定义组件
// app.component('customShowModal', customShowModal);
// app.component('uniForms', uniForms);
// app.component('uniFormsItem', uniFormsItem)
// app.component('uniEasyinput', uniEasyinput)
// app.component('uniIcons', uniIcons)
// app.component('uniSearchBar', uniSearchBar)
// app.component('uniDatetimePicker', uniDatetimePicker)
// app.component('uniDataPicker', uniDataPicker)
app.component('customShowModal', customShowModal);
app.use(pinia)

View File

@@ -28,24 +28,24 @@
"path": "pages/home/home",
"style": {
"navigationBarTitleText": "",
"renderer": "native", // 实验性选项,可能提升性能
"hardwareAccelerated": true // 启用 GPU 加速
"renderer": "native",
"hardwareAccelerated": true
}
},
{
"path": "pages/business/business",
"style": {
"navigationBarTitleText": "",
"renderer": "native", // 实验性选项,可能提升性能
"hardwareAccelerated": true // 启用 GPU 加速
"renderer": "native",
"hardwareAccelerated": true
}
},
{
"path": "pages/business/editDaily",
"style": {
"navigationBarTitleText": "",
"renderer": "native", // 实验性选项,可能提升性能
"hardwareAccelerated": true // 启用 GPU 加速
"renderer": "native",
"hardwareAccelerated": true
}
},
{
@@ -70,8 +70,8 @@
"path": "pages/userinfo/userinfo",
"style": {
"navigationBarTitleText": "",
"renderer": "native", // 实验性选项,可能提升性能
"hardwareAccelerated": true // 启用 GPU 加速
"renderer": "native",
"hardwareAccelerated": true
}
},
{

View File

@@ -187,8 +187,8 @@ const handleSubmit= async()=>{
.bus-list{
display: flex;
align-items: center;
gap:10px;
flex-flow:row wrap;
margin:-10rpx;
margin-bottom:40rpx;
}
.bus-list .bus-tips{
@@ -203,7 +203,11 @@ const handleSubmit= async()=>{
background-color: #fff;
color:#333333;
border:1px solid #E8E8E8;
margin-left:8rpx;
margin-right:8rpx;
margin-bottom:20rpx;
}
.bus-list .bus-blue{
border:1px solid #05A3F4;
background-color: #05A3F4;

View File

@@ -408,7 +408,7 @@ const handleSubmit=()=>{
background:url('@/static/images/PicLogoTxt2@2x.png') center bottom 10rpx no-repeat;
background-size:487rpx 214rpx;
width: 100vw;
height: 100vh;
height: calc(100vh - 110px) ;
margin:0 auto;
}

View File

@@ -518,16 +518,20 @@ const formatDateStr =(times)=>{
}
.white-bg .logo-list{
gap:50rpx;
margin-left:-25rpx;
margin-right:-25rpx;
padding:0 20rpx;
/* margin-bottom: -50rpx; */
}
.white-bg .logo-list .l-l-item{
width:160rpx;
margin-bottom:0rpx;
margin-left:25rpx;
margin-right:25rpx;
margin-bottom: 25rpx;
}
.white-bg .logo-list .l-l-item img{
width:110rpx;
height:110rpx;

View File

@@ -1,6 +1,7 @@
<template>
<view class="container">
<view class="login-con">
<view class="bg-h">
<view :style="{height: navBarPaddingTop + 'px'}"></view>
<image mode="aspectFit" src="../../static/images/pic-logo.png" class="login-logo"></image>
<view class="login-title" v-if="networkEnv==1"><text>718友晟</text><text>企业内网</text></view>
@@ -68,8 +69,11 @@
<button type="primary" class="btn-submit" @click="submitForm" :loading="btnLoading" :disabled="btnLoading"> </button>
</view>
</view>
<view class="login-bottom"></view>
</view>
<!-- <view class="login-bottom"></view> -->
</view>
</template>
@@ -86,6 +90,7 @@ import { useUserStore } from '@/stores/user';
import encryptObj from '@/utils/encrypt.js'
import {showAlert} from '@/utils/message.js'
// #ifdef APP-PLUS
// 获取 存储手机的module
const safeSave = uni.requireNativePlugin("Tm-TmSafeSaveFileModule");
@@ -271,11 +276,12 @@ const submitForm = () => {
// #ifdef APP-PLUS
try {
// 读取设备ID
safeSave.getSafeFile({ "key": "app_device_id" }, res3 => {
if (res3.code == 1) {
let deviceId = res3.data;
// safeSave.getSafeFile({ "key": "app_device_id" }, res3 => {
// if (res3.code == 1) {
let deviceId = 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2' // res3.data;
// showAlert("读取成功=>"+deviceId);
param.uniqCode = deviceId;
console.log("param=>",param)
login(param).then(res=>{
userStore.login(res);
uni.switchTab({ url: '/pages/home/home' })
@@ -284,12 +290,12 @@ const submitForm = () => {
btnLoading.value = false;
})
} else {
// showAlert('读取失败:'+res3.msg)
console.error('读取失败:', error);
btnLoading.value = false;
}
})
// } else {
// // showAlert('读取失败:'+res3.msg)
// console.error('读取失败:', error);
// btnLoading.value = false;
// }
// })
} catch (error) {
console.error('读取失败:', error);
// showAlert('出错:', error)
@@ -307,6 +313,9 @@ const submitForm = () => {
};
</script>
<style scoped>
page{
background-color: #F5F5F5;
}
.container {
height: 100vh;
}
@@ -339,6 +348,18 @@ const submitForm = () => {
color: #fff;
}
.login-con .bg-h{
background:url('@/static/images/login-txt.png') center bottom 10rpx no-repeat;
background-size:654rpx 121rpx;
width: 100vw;
height: calc(100vh - 10px) ;
margin:0 auto;
}
.login-tab{
padding-bottom:20rpx;
}
:deep(.login-tab .tabs-header) {
background: none !important;
border-bottom: none !important;

View File

@@ -170,7 +170,8 @@ page {
font-size: 40rpx !important;
}
.custom-search .uni-input-placeholder {
.custom-search .uni-input-placeholder,
.custom-search .uni-input-input {
color: #fff !important;
font-size: 27rpx !important;
}
@@ -200,17 +201,20 @@ page {
flex: auto;
}
.search-bg .search-left{
border-right:1px solid #4687F2;
margin-top:10rpx;
margin-bottom:10rpx;
padding-right:30rpx;
/* width:10%; */
}
.search-bg .search-right{
padding-left:25rpx;
/* width:60%; */
display: flex;
align-items: center;
min-width: 10%;
}
.search-bg .search-right{
border-left:1px solid #4687F2;
padding-left:25rpx;
margin-left:30rpx;
margin-top:10rpx;
margin-bottom:10rpx;
max-width:60%;
display: flex;
align-items: center;
}
.search-bg .search-right .uni-input{
color:#fff;
@@ -321,8 +325,9 @@ page {
display: flex;
flex-wrap: wrap;
/* 关键属性:允许换行 */
gap: 20rpx;
/* 项目间距 */
margin-left:-10rpx;
margin-right:-10rpx;
}
.white-bg .logo-list .l-l-item {
@@ -330,8 +335,11 @@ page {
text-align: center;
margin-bottom: 30rpx;
position: relative;
margin-left:10rpx;
margin-right:10rpx;
}
.white-bg .logo-list .l-l-item img {
width: 90rpx;
height: 90rpx;

View File

@@ -11,6 +11,7 @@ const message = useMessage();
const requestHooks = {
// 请求拦截器
requestInterceptorsHook(options, config) {
// console.log("request=>config=>",config)
const { urlPrefix, baseUrl, withToken, isAuth } = config;
options.header = options.header ?? {};
if (urlPrefix) {