修改样式
This commit is contained in:
@@ -296,6 +296,7 @@ const inputRefs = ref([]);
|
||||
const activeIndex = ref(0);//初始化焦点
|
||||
let authCode = ref('')
|
||||
const handleInput = (index, event) => {
|
||||
activeIndex.value = index;
|
||||
// 只允许数字输入
|
||||
const value = event.detail.value.replace(/\D/g, '')
|
||||
codes.value[index] = value
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<!-- 待办内容 -->
|
||||
<view class="backlog-bg">
|
||||
<view class="backlog-b-item">
|
||||
<view class="backlog-b-item" @click="handleJump('/pages/notice/notice',1)">
|
||||
<view class="font-number">{{ backBlogObj.count1 }}</view>
|
||||
<view class="font-title">待办</view>
|
||||
</view>
|
||||
@@ -136,7 +136,7 @@
|
||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||
<view class="bottom-height"></view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -326,10 +326,14 @@ const getCommonServices = async ()=>{
|
||||
let data = await getUserFavorite({});
|
||||
commonServiceList.value = data || []
|
||||
}
|
||||
// 跳转
|
||||
let handleJump=(url)=>{
|
||||
// 跳转 type:1-tabbar
|
||||
let handleJump=(url,type)=>{
|
||||
if(url){
|
||||
if(type==1){
|
||||
uni.switchTab({url});
|
||||
}else{
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<view class="container" :style="{ height: `100vh` }">
|
||||
<view class="bg"></view>
|
||||
<view class="bg">
|
||||
<view class="env-txt" v-if="networkEnv==1">企业内网</view>
|
||||
</view>
|
||||
<view class="version">Version {{ appVersion }}</view>
|
||||
<!-- <view class="bottom-bg"></view> -->
|
||||
|
||||
@@ -29,6 +31,7 @@ import {showAlert} from '@/utils/message.js'
|
||||
import { useUserStore } from '@/stores/user';
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 获取 存储手机的module
|
||||
@@ -58,13 +61,13 @@ onLoad(async(opt) => {
|
||||
if(!versionVisible.value){
|
||||
try {
|
||||
// 授权设备存储
|
||||
let granted = requestAndroidPermission(systemInfo);
|
||||
if(granted){
|
||||
// let granted = requestAndroidPermission(systemInfo);
|
||||
// if(granted){
|
||||
// showAlert("22授权成功!")
|
||||
setTimeout(()=>{
|
||||
// setTimeout(()=>{
|
||||
selectDeviceId();
|
||||
},500)
|
||||
}
|
||||
// },500)
|
||||
// }
|
||||
} catch (error) {
|
||||
console.error('权限请求出错:', error);
|
||||
// showAlert(JSON.stringify(error))
|
||||
@@ -100,12 +103,7 @@ const getOSVesion = async()=>{
|
||||
// #ifdef H5
|
||||
verNumber : systemInfo.appVersion,
|
||||
// #endif
|
||||
// deviceType:systemInfo.model,//型号
|
||||
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
|
||||
// osVersion:systemInfo.osVersion,//操作系统版本
|
||||
// resolution:systemInfo.windowWidth+"*"+systemInfo.windowHeight,//分辨率
|
||||
// trademark:systemInfo.deviceBrand,//设备品牌
|
||||
// uniqueCode:systemInfo.deviceId//设备ID
|
||||
}
|
||||
// 当前手机版本
|
||||
appVersion.value = param.verNumber;
|
||||
@@ -137,40 +135,44 @@ const selectDeviceId = async()=>{
|
||||
// let deviceId = uni.getStorageSync('app_device_id');// 本地设备ID
|
||||
try {
|
||||
safeSave.getSafeFile({ "key": "app_device_id" }, res2 => {
|
||||
// showAlert(JSON.stringify(res2));
|
||||
if (res2.code == 1) {
|
||||
let deviceId = res2.data;
|
||||
console.log("读取成功=>",deviceId)
|
||||
// showAlert("读取成功=>"+deviceId);
|
||||
getBindStatus({uniqCode:deviceId}).then(res=>{
|
||||
let bindStatus = res.bindStatus
|
||||
// setTimeout(()=>{
|
||||
// 绑定状态(1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
|
||||
if(bindStatus == 4){
|
||||
// 检查是否已登录 并 获取用户信息
|
||||
if (userStore.isLogin) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home',
|
||||
});
|
||||
|
||||
if(deviceId!=""){
|
||||
getBindStatus({uniqCode:deviceId}).then(res=>{
|
||||
let bindStatus = res.bindStatus
|
||||
// setTimeout(()=>{
|
||||
// 绑定状态(1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
|
||||
if(bindStatus == 4){
|
||||
// 检查是否已登录 并 获取用户信息
|
||||
if (userStore.isLogin) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home',
|
||||
});
|
||||
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
}
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
url: '/pages/deviceAuth/deviceAuth',
|
||||
});
|
||||
}
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/deviceAuth/deviceAuth',
|
||||
});
|
||||
}
|
||||
// },1000)
|
||||
});
|
||||
} else {
|
||||
// showAlert('读取失败:'+res2.msg)
|
||||
// setTimeout(()=>{
|
||||
// },1000)
|
||||
});
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url: '/pages/deviceAuth/deviceAuth',
|
||||
});
|
||||
// },1000)
|
||||
}
|
||||
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/deviceAuth/deviceAuth',
|
||||
});
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
@@ -206,12 +208,22 @@ const handleClose=()=>{
|
||||
position: relative;
|
||||
padding-top:100px;
|
||||
}
|
||||
|
||||
.container .bg{
|
||||
background:url('@/static/images/loading-logo.png') no-repeat;
|
||||
background-size:700rpx 800rpx;
|
||||
width: 700rpx;
|
||||
height: 800rpx;
|
||||
margin:0 auto;
|
||||
position: relative;
|
||||
}
|
||||
.container .bg .env-txt{
|
||||
position: absolute;
|
||||
right: 35rpx;
|
||||
top:10rpx;
|
||||
color:#fff;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.container .version{
|
||||
color:#A8D4FF;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<view class="login-con">
|
||||
<view :style="{height: navBarPaddingTop + 'px'}"></view>
|
||||
<image mode="aspectFit" src="../../static/images/pic-logo.png" class="login-logo"></image>
|
||||
<view class="login-title">欢迎来到718友晟</view>
|
||||
<view class="login-title" v-if="networkEnv==1"><text>718友晟</text><text>企业内网</text></view>
|
||||
<view class="login-title" v-else>欢迎来到718友晟</view>
|
||||
<view class="login-tab">
|
||||
<customTabs v-model="activeTab" :tabs="tabList" :modelValue="activeTab">
|
||||
<!-- 验证码登录 -->
|
||||
@@ -257,7 +258,7 @@ const submitForm = () => {
|
||||
param.runEnv = networkEnv.value;
|
||||
|
||||
// #ifdef H5
|
||||
param.uniqCode = '7666ac20-827a-4c23-8e2e-fbbf24564fc0';//h5测试用 内网-sn123456 外网-7666ac20-827a-4c23-8e2e-fbbf24564fc0
|
||||
param.uniqCode = 'b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9';//h5测试用 内网-sn123456 外网-b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9
|
||||
let res = await login(param);
|
||||
userStore.login(res);
|
||||
uni.switchTab({ url: '/pages/home/home' })
|
||||
@@ -329,6 +330,12 @@ const submitForm = () => {
|
||||
margin: 0 0 35rpx 70rpx;
|
||||
}
|
||||
|
||||
.login-con .login-title text:not(:last-child)::after {
|
||||
content: "·";
|
||||
margin: 0 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
:deep(.login-tab .tabs-header) {
|
||||
background: none !important;
|
||||
border-bottom: none !important;
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" :title="myTitle"
|
||||
:leftFlag="false" :rightFlag="false"
|
||||
></customHeader>
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 下拉刷新 -->
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
|
||||
:down="downOption" @down="downCallback"
|
||||
:fixed="false" class="scroll-h" :style="{ paddingTop: navBarPaddingTop + 'px' }"
|
||||
:fixed="false" class="scroll-h"
|
||||
>
|
||||
<!-- #ifdef H5 -->
|
||||
<view style="height:50rpx"></view>
|
||||
<!-- #endif -->
|
||||
<!-- 头像 -->
|
||||
<view class="head-pic">
|
||||
<img class="pic-img" :src="'static/images/userinfo/icon-userinfo.png'" />
|
||||
@@ -91,9 +95,8 @@
|
||||
|
||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||
<!-- <view class="bottom-height"></view> -->
|
||||
</mescroll-uni>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗模板 -->
|
||||
<!-- <customShowModal
|
||||
:title="title"
|
||||
@@ -109,6 +112,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted,getCurrentInstance } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import customHeader from '@/components/customHeader.vue'
|
||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||
import { getNavBarPaddingTop } from '@/utils/system.js'
|
||||
import { getUserInfo,versionCheck } from '@/api/auth.js'
|
||||
@@ -117,6 +121,11 @@ import { showAlert } from '@/utils/message.js'
|
||||
import { useUserStore } from '@/stores/user';
|
||||
const userStore = useUserStore()
|
||||
const { proxy } = getCurrentInstance();
|
||||
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
|
||||
|
||||
let myTitle = '我的';
|
||||
myTitle = networkEnv.value==1?'我的 · 企业内网':'我的'
|
||||
|
||||
|
||||
// 1.头部导航栏
|
||||
const navBarPaddingTop = ref(0);
|
||||
@@ -244,19 +253,19 @@ onMounted(() => {
|
||||
|
||||
<style scoped>
|
||||
.scroll-h{
|
||||
/* #ifdef APP-PLUS */
|
||||
height:calc(100vh - 50px) !important;
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 30px) !important;
|
||||
/* #endif */
|
||||
/* #ifdef APP-PLUS */
|
||||
height:calc(100vh - 78px) !important;
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 80px) !important;
|
||||
/* #endif */
|
||||
}
|
||||
:deep(.mescroll-upwarp){
|
||||
display:none
|
||||
}
|
||||
.head-pic {
|
||||
display: flex;
|
||||
padding: 40rpx 0rpx 10rpx 30rpx;
|
||||
padding: 10rpx 0rpx 10rpx 30rpx;
|
||||
}
|
||||
|
||||
.head-pic .pic-img {
|
||||
|
||||
Reference in New Issue
Block a user