Compare commits
26 Commits
da98464e1a
...
develop-in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56f050e285 | ||
|
|
d49dd05baf | ||
|
|
06b537c6da | ||
|
|
e34fa23547 | ||
|
|
48912d6319 | ||
|
|
d77edd97e0 | ||
|
|
ad49a47367 | ||
|
|
8e8fdc02c6 | ||
|
|
711785fe8e | ||
|
|
c856fe3da6 | ||
|
|
d6053ec1aa | ||
|
|
b276c74be1 | ||
|
|
7868a0447d | ||
|
|
d0f29a4b71 | ||
|
|
558b56420b | ||
|
|
9262eeea35 | ||
|
|
876b9b1c06 | ||
|
|
27d64dbd72 | ||
|
|
b1064f9118 | ||
|
|
08ca660b87 | ||
|
|
6635ceb0d8 | ||
|
|
9d5432058a | ||
|
|
b2b0c11966 | ||
|
|
8f849cda40 | ||
|
|
7fa1e5b2f9 | ||
|
|
93e1557cb2 |
@@ -6,4 +6,12 @@ export function noticeList(data) {
|
|||||||
url: '/acc/message/notify/detail',
|
url: '/acc/message/notify/detail',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取用户审批的待办和已办详情
|
||||||
|
export function flowList(data) {
|
||||||
|
return request.post({
|
||||||
|
url: '/acc/message/flow/detail',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
163
src/components/customShowModal.vue
Normal file
163
src/components/customShowModal.vue
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
<template>
|
||||||
|
<view class="model" v-if="visibleF">
|
||||||
|
<view class="model-con">
|
||||||
|
<view class="model-top" v-if="title">{{title}}</view>
|
||||||
|
<view :class="{'model-middle':true,'m-height':!title}">{{contents}}</view>
|
||||||
|
<view class="model-bottom">
|
||||||
|
<button type="primary" class="btn-cancel" @click="handleCancel" v-if="btnFlag2">Cancel</button>
|
||||||
|
<button type="default" class="btn-green" @click="handleConfirm" v-if="btnFlag" :loading="loading" :disabled="loading">{{btnTxt}}</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref,watch } from 'vue'
|
||||||
|
const props = defineProps({
|
||||||
|
visible:{
|
||||||
|
type:Boolean
|
||||||
|
},
|
||||||
|
title:{
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
btnFlag:{
|
||||||
|
type:Boolean,
|
||||||
|
default:true
|
||||||
|
},
|
||||||
|
btnFlag2:{
|
||||||
|
type:Boolean,
|
||||||
|
default:true
|
||||||
|
},
|
||||||
|
btnTxt:{
|
||||||
|
type:String,
|
||||||
|
default:'确定'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
let visibleF = ref(props.visible)
|
||||||
|
let titles = ref(props.title)
|
||||||
|
let contents = ref(props.content)
|
||||||
|
let btnFlags = ref(props.btnFlag)
|
||||||
|
let loading = ref(false);
|
||||||
|
|
||||||
|
// 显示隐藏
|
||||||
|
watch(() => props.visible, (newVal, oldVal) => {
|
||||||
|
loading.value = false;
|
||||||
|
visibleF = newVal
|
||||||
|
},{
|
||||||
|
deep:true, // 深度监听
|
||||||
|
immediate:true // 立即执行
|
||||||
|
});
|
||||||
|
|
||||||
|
// 标题
|
||||||
|
watch(() => props.title, (newVal, oldVal) => {
|
||||||
|
titles.value = newVal
|
||||||
|
},{
|
||||||
|
deep:true,
|
||||||
|
immediate:true
|
||||||
|
});
|
||||||
|
// 内容
|
||||||
|
watch(() => props.content, (newVal, oldVal) => {
|
||||||
|
contents = newVal
|
||||||
|
},{
|
||||||
|
deep:true,
|
||||||
|
immediate:true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 按钮
|
||||||
|
watch(() => props.btnFlag, (newVal, oldVal) => {
|
||||||
|
btnFlags.value = newVal
|
||||||
|
},{
|
||||||
|
deep:true,
|
||||||
|
immediate:true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 调用父组件的方法
|
||||||
|
const emit = defineEmits(['close','confirm'])
|
||||||
|
const handleCancel = ()=>{
|
||||||
|
emit('close');
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleConfirm = ()=>{
|
||||||
|
loading.value=true;
|
||||||
|
emit('confirm')
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.model {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.4);
|
||||||
|
z-index: 9999;
|
||||||
|
.model-con{
|
||||||
|
background: #fff;
|
||||||
|
position: fixed;
|
||||||
|
top:50%;
|
||||||
|
left:50%;
|
||||||
|
width:500rpx;
|
||||||
|
min-height: 278rpx;
|
||||||
|
margin-left: -270rpx;
|
||||||
|
margin-top:-139rpx;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding:20rpx 20rpx 30rpx;
|
||||||
|
}
|
||||||
|
.model-top{
|
||||||
|
text-align: center;
|
||||||
|
padding:20rpx 0;
|
||||||
|
font-size:36rpx;
|
||||||
|
}
|
||||||
|
.model-middle{
|
||||||
|
// margin-top:290rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size:36rpx;
|
||||||
|
color:#333333;
|
||||||
|
.font-green{
|
||||||
|
color:#05A3F4;
|
||||||
|
font-size: 42rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
padding:20rpx 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.model-middle.m-height{
|
||||||
|
padding:60rpx 0 20rpx;
|
||||||
|
}
|
||||||
|
.model-bottom{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top:40rpx;
|
||||||
|
// align-items: center;
|
||||||
|
.btn-green,.btn-cancel{
|
||||||
|
background-color: #fff;
|
||||||
|
color:#05A3F4;
|
||||||
|
border-radius: 48rpx;
|
||||||
|
font-size:30rpx;
|
||||||
|
width:200rpx;
|
||||||
|
height:65rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size:30rpx;
|
||||||
|
border: 1px solid #05A3F4;
|
||||||
|
margin-left:0rpx !important;
|
||||||
|
margin-right:0 !important;
|
||||||
|
&::after{
|
||||||
|
border:none;
|
||||||
|
border-radius: 37rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn-green{
|
||||||
|
border: 1px solid #05A3F4;
|
||||||
|
background-color:#05A3F4;
|
||||||
|
color:#fff;
|
||||||
|
margin-left:20rpx !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,5 +4,5 @@ export const AGREEWELCOME_KEY="agreewelcome";
|
|||||||
// clientId 默认写2
|
// clientId 默认写2
|
||||||
export const CLIENT_ID="2";
|
export const CLIENT_ID="2";
|
||||||
// #区分内外网 //1-内网,2-外网
|
// #区分内外网 //1-内网,2-外网
|
||||||
export const NETWORK_ENV=1;
|
export const NETWORK_ENV=2;
|
||||||
|
|
||||||
|
|||||||
10
src/main.js
10
src/main.js
@@ -1,20 +1,30 @@
|
|||||||
import { createSSRApp } from "vue";
|
import { createSSRApp } from "vue";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
|
|
||||||
import { CLIENT_ID,NETWORK_ENV } from '@/enums/cacheEnums';
|
import { CLIENT_ID,NETWORK_ENV } from '@/enums/cacheEnums';
|
||||||
import '@/static/font/iconfont.css'
|
import '@/static/font/iconfont.css'
|
||||||
|
|
||||||
|
// 注册自定义组件
|
||||||
|
import customShowModal from '@/components/customShowModal.vue'
|
||||||
|
|
||||||
// pinia
|
// pinia
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
const pinia = createPinia()
|
const pinia = createPinia()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
|
|
||||||
const app = createSSRApp(App);
|
const app = createSSRApp(App);
|
||||||
|
|
||||||
|
|
||||||
|
// 全局变量
|
||||||
app.config.globalProperties.$CLIENT_ID = CLIENT_ID;
|
app.config.globalProperties.$CLIENT_ID = CLIENT_ID;
|
||||||
app.config.globalProperties.$NETWORK_ENV = NETWORK_ENV;
|
app.config.globalProperties.$NETWORK_ENV = NETWORK_ENV;
|
||||||
|
|
||||||
|
// 全局自定义组件
|
||||||
|
app.component('customShowModal', customShowModal)
|
||||||
|
|
||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
|
|
||||||
|
|||||||
@@ -106,11 +106,19 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/notice/notice",
|
"path": "pages/notice/notice",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": ""
|
||||||
"app-plus" : {
|
}
|
||||||
"bounce" : "none" // 取消APP端iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
|
},
|
||||||
},
|
{
|
||||||
"mp-alipay":{"allowsBounceVertical":"NO"} // 取消支付宝和钉钉小程序的iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
|
"path": "pages/notice/waitApprove",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/notice/waitApproveDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -82,7 +82,10 @@ const mescrollRef = ref(null);
|
|||||||
const upOption = ref({
|
const upOption = ref({
|
||||||
page: { num: 0, size: 10 },
|
page: { num: 0, size: 10 },
|
||||||
noMoreSize: 5,
|
noMoreSize: 5,
|
||||||
empty: { tip: '~ 空空如也 ~' },
|
empty: {
|
||||||
|
tip: '~ 空空如也 ~',
|
||||||
|
icon: "../../static/images/mescroll-empty.png"
|
||||||
|
},
|
||||||
textLoading: '加载中...',
|
textLoading: '加载中...',
|
||||||
textNoMore: '已经到底了'
|
textNoMore: '已经到底了'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -89,7 +89,10 @@ const mescrollRef = ref(null);
|
|||||||
const upOption = ref({
|
const upOption = ref({
|
||||||
page: { num: 0, size: 10 },
|
page: { num: 0, size: 10 },
|
||||||
noMoreSize: 5,
|
noMoreSize: 5,
|
||||||
empty: { tip: '~ 空空如也 ~' },
|
empty: {
|
||||||
|
tip: '~ 空空如也 ~',
|
||||||
|
icon: "../../static/images/mescroll-empty.png"
|
||||||
|
},
|
||||||
textLoading: '加载中...',
|
textLoading: '加载中...',
|
||||||
textNoMore: '已经到底了'
|
textNoMore: '已经到底了'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -296,6 +296,7 @@ const inputRefs = ref([]);
|
|||||||
const activeIndex = ref(0);//初始化焦点
|
const activeIndex = ref(0);//初始化焦点
|
||||||
let authCode = ref('')
|
let authCode = ref('')
|
||||||
const handleInput = (index, event) => {
|
const handleInput = (index, event) => {
|
||||||
|
activeIndex.value = index;
|
||||||
// 只允许数字输入
|
// 只允许数字输入
|
||||||
const value = event.detail.value.replace(/\D/g, '')
|
const value = event.detail.value.replace(/\D/g, '')
|
||||||
codes.value[index] = value
|
codes.value[index] = value
|
||||||
|
|||||||
@@ -1,39 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<view id="test">
|
<view id="test">
|
||||||
<!-- #ifdef h5 -->
|
<!-- #ifdef H5 -->
|
||||||
<web-view :src="url"></web-view>
|
<web-view :src="url"></web-view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref,onMounted,getCurrentInstance } from 'vue';
|
import { ref,getCurrentInstance } from 'vue';
|
||||||
import { onLoad,onReady,onBackPress } from '@dcloudio/uni-app';
|
import { onLoad,onBackPress } from '@dcloudio/uni-app';
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
|
|
||||||
let windowInfo = ref(null);
|
|
||||||
let url = ref('');
|
let url = ref('');
|
||||||
let title = ref('');
|
let title = ref('');
|
||||||
onLoad(async(opt) => {
|
onLoad(async(opt) => {
|
||||||
console.log(opt)
|
// console.log(opt)
|
||||||
url.value = opt.url;
|
url.value = opt.url ;
|
||||||
title.value = opt.title;
|
title.value = opt.title;
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
titleNViewWebview(url.value,title.value);
|
titleNViewWebview(url.value,title.value);
|
||||||
// #endif
|
// #endif
|
||||||
// uni.getSystemInfo({
|
|
||||||
// success: (res)=> {
|
|
||||||
// windowInfo.value = res;
|
|
||||||
// createWvAndLoadUrl(url.value,title.value);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onBackPress((e)=> {//响应返回事件
|
||||||
|
console.log("onBackPress=>",e)
|
||||||
|
if (e.from === 'navigateBack') { //这个地方必须要有的,否则会死循环
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
console.log('点击返回....');
|
||||||
|
let pages = getCurrentPages()
|
||||||
|
let page = pages[pages.length - 1];
|
||||||
|
let currentPages = page.$getAppWebview()
|
||||||
|
currentPages.close()
|
||||||
|
uni.navigateBack({delta:2})
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
|
||||||
// 带标题栏控件的Webview窗口
|
// 带标题栏控件的Webview窗口
|
||||||
let webview = null;
|
let webview = null;
|
||||||
function titleNViewWebview(url,title) {
|
function titleNViewWebview(url,title) {
|
||||||
|
console.log("titleNViewWebview=>",url,title)
|
||||||
|
|
||||||
|
let nwating = plus.nativeUI.showWaiting("loading...",{
|
||||||
|
width:'110px',
|
||||||
|
padding:'10px'
|
||||||
|
})
|
||||||
|
|
||||||
webview = plus.webview.create(url, 'test', {
|
webview = plus.webview.create(url, 'test', {
|
||||||
titleNView: {
|
titleNView: {
|
||||||
backgroundColor: '#307AF5',
|
backgroundColor: '#307AF5',
|
||||||
@@ -41,32 +52,21 @@ function titleNViewWebview(url,title) {
|
|||||||
titleColor: '#ffffff',
|
titleColor: '#ffffff',
|
||||||
autoBackButton: true,
|
autoBackButton: true,
|
||||||
backgroundImage:'./../../static/images/bg-Blue-header.png',
|
backgroundImage:'./../../static/images/bg-Blue-header.png',
|
||||||
buttons:[{onclick:clickButton}]
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
webview.addEventListener('close', function(){
|
|
||||||
webview=null;
|
webview.addEventListener('loaded', function() {
|
||||||
});
|
nwating.close();
|
||||||
webview.addEventListener('titleUpdate', function(){
|
|
||||||
webview.show();
|
webview.show();
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
webview.addEventListener('close', function(){
|
||||||
|
console.log("close=>")
|
||||||
|
webview=null;
|
||||||
|
uni.navigateBack();
|
||||||
});
|
});
|
||||||
webview.addEventListener('loading', () => {
|
|
||||||
plus.nativeUI.showWaiting("loading...",{
|
|
||||||
width:'110px',
|
|
||||||
padding:'10px'
|
|
||||||
})
|
|
||||||
}, false);
|
|
||||||
//plus.nativeUI.showWaiting()
|
|
||||||
webview.addEventListener('loaded', () => {
|
|
||||||
plus.nativeUI.closeWaiting();
|
|
||||||
}, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 左侧按钮返回
|
|
||||||
function clickButton(){
|
|
||||||
// plus.nativeUI.alert('clicked!');
|
|
||||||
webview=null;
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
<!-- 待办内容 -->
|
<!-- 待办内容 -->
|
||||||
<view class="backlog-bg">
|
<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-number">{{ backBlogObj.count1 }}</view>
|
||||||
<view class="font-title">待办</view>
|
<view class="font-title">待办</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="backlog-b-item">
|
<view class="backlog-b-item" @click="handleJump('/pages/notice/waitApprove')">
|
||||||
<view class="font-number">{{ backBlogObj.count2 }}</view>
|
<view class="font-number">{{ backBlogObj.count2 }}</view>
|
||||||
<view class="font-title">待审查</view>
|
<view class="font-title">待审查</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -136,17 +136,17 @@
|
|||||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||||
<view class="bottom-height"></view>
|
<view class="bottom-height"></view>
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref,onMounted,computed } from 'vue';
|
import { ref,onMounted } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import customHeader from '@/components/customHeader.vue'
|
import customHeader from '@/components/customHeader.vue'
|
||||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||||
import customSteps from '@/components/customSteps.vue'
|
import customSteps from '@/components/customSteps.vue'
|
||||||
import customSearch from '@/components/customSearch.vue'
|
// import customSearch from '@/components/customSearch.vue'
|
||||||
import { getNavBarPaddingTop} from '@/utils/system.js'
|
import { getNavBarPaddingTop} from '@/utils/system.js'
|
||||||
// ,swiperList,stepData,salesTask,commonServices,newsQueryList
|
// ,swiperList,stepData,salesTask,commonServices,newsQueryList
|
||||||
import { messageNotifyCount,messageFlowCount,getUserFavorite} from '@/api/home.js';
|
import { messageNotifyCount,messageFlowCount,getUserFavorite} from '@/api/home.js';
|
||||||
@@ -326,10 +326,14 @@ const getCommonServices = async ()=>{
|
|||||||
let data = await getUserFavorite({});
|
let data = await getUserFavorite({});
|
||||||
commonServiceList.value = data || []
|
commonServiceList.value = data || []
|
||||||
}
|
}
|
||||||
// 跳转
|
// 跳转 type:1-tabbar
|
||||||
let handleJump=(url)=>{
|
let handleJump=(url,type)=>{
|
||||||
if(url){
|
if(url){
|
||||||
|
if(type==1){
|
||||||
|
uni.switchTab({url});
|
||||||
|
}else{
|
||||||
uni.navigateTo({ url })
|
uni.navigateTo({ url })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container" :style="{ height: `100vh` }">
|
<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="version">Version {{ appVersion }}</view>
|
||||||
<!-- <view class="bottom-bg"></view> -->
|
<!-- <view class="bottom-bg"></view> -->
|
||||||
|
|
||||||
@@ -29,6 +31,7 @@ import {showAlert} from '@/utils/message.js'
|
|||||||
import { useUserStore } from '@/stores/user';
|
import { useUserStore } from '@/stores/user';
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 获取 存储手机的module
|
// 获取 存储手机的module
|
||||||
@@ -58,13 +61,13 @@ onLoad(async(opt) => {
|
|||||||
if(!versionVisible.value){
|
if(!versionVisible.value){
|
||||||
try {
|
try {
|
||||||
// 授权设备存储
|
// 授权设备存储
|
||||||
let granted = requestAndroidPermission(systemInfo);
|
// let granted = requestAndroidPermission(systemInfo);
|
||||||
if(granted){
|
// if(granted){
|
||||||
// showAlert("22授权成功!")
|
// showAlert("22授权成功!")
|
||||||
setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
selectDeviceId();
|
selectDeviceId();
|
||||||
},500)
|
// },500)
|
||||||
}
|
// }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('权限请求出错:', error);
|
console.error('权限请求出错:', error);
|
||||||
// showAlert(JSON.stringify(error))
|
// showAlert(JSON.stringify(error))
|
||||||
@@ -100,12 +103,7 @@ const getOSVesion = async()=>{
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
verNumber : systemInfo.appVersion,
|
verNumber : systemInfo.appVersion,
|
||||||
// #endif
|
// #endif
|
||||||
// deviceType:systemInfo.model,//型号
|
|
||||||
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
|
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;
|
appVersion.value = param.verNumber;
|
||||||
@@ -137,40 +135,44 @@ const selectDeviceId = async()=>{
|
|||||||
// let deviceId = uni.getStorageSync('app_device_id');// 本地设备ID
|
// let deviceId = uni.getStorageSync('app_device_id');// 本地设备ID
|
||||||
try {
|
try {
|
||||||
safeSave.getSafeFile({ "key": "app_device_id" }, res2 => {
|
safeSave.getSafeFile({ "key": "app_device_id" }, res2 => {
|
||||||
|
// showAlert(JSON.stringify(res2));
|
||||||
if (res2.code == 1) {
|
if (res2.code == 1) {
|
||||||
let deviceId = res2.data;
|
let deviceId = res2.data;
|
||||||
console.log("读取成功=>",deviceId)
|
|
||||||
// showAlert("读取成功=>"+deviceId);
|
// showAlert("读取成功=>"+deviceId);
|
||||||
getBindStatus({uniqCode:deviceId}).then(res=>{
|
if(deviceId!=""){
|
||||||
let bindStatus = res.bindStatus
|
getBindStatus({uniqCode:deviceId}).then(res=>{
|
||||||
// setTimeout(()=>{
|
let bindStatus = res.bindStatus
|
||||||
// 绑定状态(1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
|
// setTimeout(()=>{
|
||||||
if(bindStatus == 4){
|
// 绑定状态(1=已提交、2=等待审核、3=审核通过、4=绑定成功、5=审核拒绝)
|
||||||
// 检查是否已登录 并 获取用户信息
|
if(bindStatus == 4){
|
||||||
if (userStore.isLogin) {
|
// 检查是否已登录 并 获取用户信息
|
||||||
uni.reLaunch({
|
if (userStore.isLogin) {
|
||||||
url: '/pages/home/home',
|
uni.reLaunch({
|
||||||
});
|
url: '/pages/home/home',
|
||||||
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login',
|
||||||
|
});
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login',
|
url: '/pages/deviceAuth/deviceAuth',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else{
|
// },1000)
|
||||||
uni.reLaunch({
|
});
|
||||||
url: '/pages/deviceAuth/deviceAuth',
|
}else{
|
||||||
});
|
|
||||||
}
|
|
||||||
// },1000)
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// showAlert('读取失败:'+res2.msg)
|
|
||||||
// setTimeout(()=>{
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/deviceAuth/deviceAuth',
|
url: '/pages/deviceAuth/deviceAuth',
|
||||||
});
|
});
|
||||||
// },1000)
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/deviceAuth/deviceAuth',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -206,12 +208,22 @@ const handleClose=()=>{
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding-top:100px;
|
padding-top:100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container .bg{
|
.container .bg{
|
||||||
background:url('@/static/images/loading-logo.png') no-repeat;
|
background:url('@/static/images/loading-logo.png') no-repeat;
|
||||||
background-size:700rpx 800rpx;
|
background-size:700rpx 800rpx;
|
||||||
width: 700rpx;
|
width: 700rpx;
|
||||||
height: 800rpx;
|
height: 800rpx;
|
||||||
margin:0 auto;
|
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{
|
.container .version{
|
||||||
color:#A8D4FF;
|
color:#A8D4FF;
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<view class="login-con">
|
<view class="login-con">
|
||||||
<view :style="{height: navBarPaddingTop + 'px'}"></view>
|
<view :style="{height: navBarPaddingTop + 'px'}"></view>
|
||||||
<image mode="aspectFit" src="../../static/images/pic-logo.png" class="login-logo"></image>
|
<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">
|
<view class="login-tab">
|
||||||
<customTabs v-model="activeTab" :tabs="tabList" :modelValue="activeTab">
|
<customTabs v-model="activeTab" :tabs="tabList" :modelValue="activeTab">
|
||||||
<!-- 验证码登录 -->
|
<!-- 验证码登录 -->
|
||||||
@@ -257,7 +258,9 @@ const submitForm = () => {
|
|||||||
param.runEnv = networkEnv.value;
|
param.runEnv = networkEnv.value;
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
param.uniqCode = 'sn123456';//h5测试用 内网-sn123456 外网-e5687e80-526f-4522-ba7d-41d5db197a15
|
|
||||||
|
// b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9
|
||||||
|
param.uniqCode = '679d5560-534f-4df8-815a-49227ba6ffd2';//h5测试用 内网-sn123456 外网-b6ffbbfb-5b2d-4640-af3a-e43d0158eaf9
|
||||||
let res = await login(param);
|
let res = await login(param);
|
||||||
userStore.login(res);
|
userStore.login(res);
|
||||||
uni.switchTab({ url: '/pages/home/home' })
|
uni.switchTab({ url: '/pages/home/home' })
|
||||||
@@ -329,6 +332,12 @@ const submitForm = () => {
|
|||||||
margin: 0 0 35rpx 70rpx;
|
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) {
|
:deep(.login-tab .tabs-header) {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
border-bottom: none !important;
|
border-bottom: none !important;
|
||||||
|
|||||||
@@ -133,7 +133,10 @@ const mescrollRef = ref(null);
|
|||||||
const upOption = ref({
|
const upOption = ref({
|
||||||
page: { num: 0, size: 10 },
|
page: { num: 0, size: 10 },
|
||||||
noMoreSize: 5,
|
noMoreSize: 5,
|
||||||
empty: { tip: '~ 空空如也 ~' },
|
empty: {
|
||||||
|
tip: '~ 空空如也 ~',
|
||||||
|
icon: "../../static/images/mescroll-empty.png"
|
||||||
|
},
|
||||||
textLoading: '加载中...',
|
textLoading: '加载中...',
|
||||||
textNoMore: '已经到底了'
|
textNoMore: '已经到底了'
|
||||||
});
|
});
|
||||||
|
|||||||
221
src/pages/notice/waitApprove.vue
Normal file
221
src/pages/notice/waitApprove.vue
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
<template>
|
||||||
|
<view class="con-body">
|
||||||
|
<view class="con-bg">
|
||||||
|
<!-- 头部 -->
|
||||||
|
<customHeader ref="customHeaderRef" :title="'待审批'" :leftFlag="true" :rightFlag="true"></customHeader>
|
||||||
|
|
||||||
|
<!-- 高度来避免头部遮挡 -->
|
||||||
|
<view class="top-height"></view>
|
||||||
|
|
||||||
|
<!-- 正文内容 -->
|
||||||
|
<view class="all-body">
|
||||||
|
|
||||||
|
<!-- 分页部分 -->
|
||||||
|
<mescroll-uni ref="mescrollRef"
|
||||||
|
@init="mescrollInit"
|
||||||
|
@down="downCallback"
|
||||||
|
@up="upCallback"
|
||||||
|
:up="upOption"
|
||||||
|
:down="downOption"
|
||||||
|
:fixed="false"
|
||||||
|
textColor="#ffffff"
|
||||||
|
bgColor="#ffffff"
|
||||||
|
class="scroll-h"
|
||||||
|
:class="{'loading-scroll':cssFlag}"
|
||||||
|
>
|
||||||
|
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index" @click="handleJump(item)">
|
||||||
|
<view class="report-list">
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-name">{{ item.subject }}</view>
|
||||||
|
<view class="r-right btn-orange" size="mini" v-if="item.status==1">待处理</view>
|
||||||
|
<view v-else-if="item.status==2">已处理</view>
|
||||||
|
</view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">来自 <text>{{ item.appName }}</text></view>
|
||||||
|
<view class="r-right">
|
||||||
|
<text style="color:#FF2B44" v-if="item.status==1 && (item.level==1 || item.level==2)">
|
||||||
|
{{ formatLevel(item.level) }}
|
||||||
|
</text>
|
||||||
|
<text v-else>{{ formatLevel(item.level) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="border-bottom"></view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">创建人 <text>{{ item.createUser?item.createUser.userId:'' }}</text></view>
|
||||||
|
<view class="r-right">{{ parseTime(item.createTime,'{y}-{m}-{d} {h}:{i}') }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</mescroll-uni>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import customHeader from '@/components/customHeader.vue'
|
||||||
|
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||||
|
import { getNavBarPaddingTop } from '@/utils/system.js'
|
||||||
|
import { flowList } from '@/api/notice.js'
|
||||||
|
import {formatLevel} from '@/utils/status.js'
|
||||||
|
import { parseTime } from '@/utils/datetime.js'
|
||||||
|
|
||||||
|
// 获取导航栏高度用于内容区域padding
|
||||||
|
const navBarPaddingTop = ref(0);
|
||||||
|
onMounted(() => {
|
||||||
|
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
||||||
|
})
|
||||||
|
|
||||||
|
// 查询列表
|
||||||
|
let list = ref([]);
|
||||||
|
const mescrollRef = ref(null);
|
||||||
|
const upOption = ref({
|
||||||
|
page: { num: 0, size: 10 },
|
||||||
|
noMoreSize: 5,
|
||||||
|
empty: {
|
||||||
|
tip: '~ 空空如也 ~',
|
||||||
|
icon: "../../static/images/mescroll-empty.png"
|
||||||
|
},
|
||||||
|
textLoading: '加载中...',
|
||||||
|
textNoMore: '已经到底了'
|
||||||
|
});
|
||||||
|
|
||||||
|
const downOption = ref({
|
||||||
|
auto: false,
|
||||||
|
textInOffset: '下拉刷新',
|
||||||
|
textOutOffset: '释放更新',
|
||||||
|
textLoading: '刷新中...'
|
||||||
|
});
|
||||||
|
|
||||||
|
let cssFlag=ref(false);//控制样式
|
||||||
|
const mescrollInit = (mescroll) => {
|
||||||
|
console.log("mescrollInit=>")
|
||||||
|
cssFlag.value = true;
|
||||||
|
mescrollRef.value = mescroll;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// 下拉刷新
|
||||||
|
const downCallback = async (mescroll) => {
|
||||||
|
try {
|
||||||
|
console.log("downCallback=>下拉刷新")
|
||||||
|
const res = await getFlowList(1, upOption.value.page.size);
|
||||||
|
cssFlag.value = false;
|
||||||
|
list.value = res.list;
|
||||||
|
mescroll.resetUpScroll();
|
||||||
|
} catch (error) {
|
||||||
|
mescroll.endErr();
|
||||||
|
} finally {
|
||||||
|
mescroll.endSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 上拉加载更多
|
||||||
|
const upCallback = async (mescroll) => {
|
||||||
|
try {
|
||||||
|
console.log("upCallback=>上拉加载更多")
|
||||||
|
const res = await getFlowList(mescroll.num, mescroll.size);
|
||||||
|
if (mescroll.num === 1) {
|
||||||
|
list.value = res.list;
|
||||||
|
} else {
|
||||||
|
list.value.push(...res.list);
|
||||||
|
}
|
||||||
|
mescroll.endBySize(res.list.length, res.total);
|
||||||
|
} catch (error) {
|
||||||
|
mescroll.endErr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取数据列表
|
||||||
|
const getFlowList = (pageIndex, pageSize) => {
|
||||||
|
return new Promise(async (resolve) => {
|
||||||
|
let param = {
|
||||||
|
pageIndex,
|
||||||
|
pageSize
|
||||||
|
}
|
||||||
|
let res = await flowList(param);
|
||||||
|
let list = res.list || [];
|
||||||
|
resolve({
|
||||||
|
list,
|
||||||
|
total: res.recordCount
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转webview
|
||||||
|
const handleJump = (item)=>{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/notice/waitApproveDetail?detail=${encodeURIComponent(JSON.stringify(item))}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.all-body {
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
top: 150rpx;
|
||||||
|
height: calc(100vh - 75px);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
top:120rpx;
|
||||||
|
height: calc(100vh);
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
.search{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.search .btn-search{
|
||||||
|
border:none;
|
||||||
|
background: none;
|
||||||
|
line-height: normal;
|
||||||
|
color:#fff;
|
||||||
|
line-height: 56rpx !important;
|
||||||
|
padding:10rpx 0 0;
|
||||||
|
text-align: left;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.search .btn-search::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.search .custom-search{
|
||||||
|
width:80%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.search .custom-search.uni-searchbar{
|
||||||
|
padding-right:0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-h{
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
height:calc(100vh - 78px) !important;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
height: calc(100vh - 65px) !important;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
.white-bg{
|
||||||
|
padding-top:0rpx;
|
||||||
|
padding-bottom:10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-list .r-list{
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
.report-list .r-list:first-child{
|
||||||
|
padding-bottom:10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-list .r-list .r-name {
|
||||||
|
color: #3384DF;
|
||||||
|
font-size: 35rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
width:500rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-list .r-list .r-left text{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color:#919191;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
149
src/pages/notice/waitApproveDetail.vue
Normal file
149
src/pages/notice/waitApproveDetail.vue
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
<template>
|
||||||
|
<view class="con-body">
|
||||||
|
<view class="con-bg">
|
||||||
|
<!-- 头部 -->
|
||||||
|
<customHeader ref="customHeaderRef" :title="'待审批'" :leftFlag="true" :rightFlag="true"></customHeader>
|
||||||
|
|
||||||
|
<!-- 高度来避免头部遮挡 -->
|
||||||
|
<view class="top-height"></view>
|
||||||
|
|
||||||
|
<!-- 正文内容 -->
|
||||||
|
<view class="all-body">
|
||||||
|
<view class="white-bg bg-height">
|
||||||
|
<view class="report-list">
|
||||||
|
<view class="title">{{ detail.subject }}</view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-name">进度</view>
|
||||||
|
<view class="r-right btn-orange" size="mini" v-if="detail.status==1">待处理</view>
|
||||||
|
<view v-else-if="detail.status==2">已处理</view>
|
||||||
|
</view>
|
||||||
|
<view class="border-bottom"></view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">来自</view>
|
||||||
|
<view class="r-right">{{ detail.appName }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="border-bottom"></view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">状态</view>
|
||||||
|
<view class="r-right">
|
||||||
|
<text style="color:#FF2B44" v-if="detail.status==1 && (detail.level==1 || detail.level==2)">
|
||||||
|
{{ formatLevel(detail.level) }}
|
||||||
|
</text>
|
||||||
|
<text v-else>{{ formatLevel(detail.level) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="border-bottom"></view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">创建人</view>
|
||||||
|
<view class="r-right">{{ detail.createUser?detail.createUser.userId:'' }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="border-bottom"></view>
|
||||||
|
<view class="r-list">
|
||||||
|
<view class="r-left">创建时间</view>
|
||||||
|
<view class="r-right">{{ parseTime(detail.createTime,'{y}-{m}-{d} {h}:{i}') }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-blue" @click="handleJump">跳转详情页</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } 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 {formatLevel} from '@/utils/status.js'
|
||||||
|
import { parseTime } from '@/utils/datetime.js'
|
||||||
|
|
||||||
|
|
||||||
|
let detail = ref({})
|
||||||
|
onLoad(async(opt) => {
|
||||||
|
try {
|
||||||
|
detail.value = JSON.parse(decodeURIComponent(opt.detail));
|
||||||
|
// console.log(detail.value);
|
||||||
|
} catch (e) {
|
||||||
|
console.error('参数解析失败', e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取导航栏高度用于内容区域padding
|
||||||
|
const navBarPaddingTop = ref(0);
|
||||||
|
onMounted(() => {
|
||||||
|
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 跳转webview
|
||||||
|
const handleJump = ()=>{
|
||||||
|
let item = detail.value;
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/h5-webview/h5-webview?url=${item.mobileLink}&title=${item.subject}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.all-body {
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
top: 150rpx;
|
||||||
|
height: calc(100vh - 75px);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
top:120rpx;
|
||||||
|
height: calc(100vh - 60px);
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-h{
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
height:calc(100vh - 78px) !important;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
height: calc(100vh - 10px) !important;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
.white-bg{
|
||||||
|
width: 750rpx;
|
||||||
|
padding: 25rpx 0 20rpx;
|
||||||
|
margin-bottom:0;
|
||||||
|
border-radius: 8px 8px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white-bg.bg-height{
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
height:calc(100vh - 78px) !important;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef APP-PLUS */
|
||||||
|
height: calc(100vh - 80px) !important;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
|
||||||
|
.report-list{
|
||||||
|
padding: 0 0 0 30rpx;
|
||||||
|
}
|
||||||
|
.report-list .r-list{
|
||||||
|
padding-right: 30rpx;
|
||||||
|
}
|
||||||
|
.report-list .r-list:first-child{
|
||||||
|
padding-bottom:10rpx;
|
||||||
|
}
|
||||||
|
.report-list .border-bottom{
|
||||||
|
width:720rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-blue {
|
||||||
|
background-color: #05A3F4;
|
||||||
|
color: #fff;
|
||||||
|
width:380rpx;
|
||||||
|
height:80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
margin:120rpx auto 0;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,14 +2,18 @@
|
|||||||
<view class="con-body">
|
<view class="con-body">
|
||||||
<view class="con-bg">
|
<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"
|
<mescroll-uni ref="mescrollRef" @init="mescrollInit"
|
||||||
:down="downOption" @down="downCallback"
|
: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">
|
<view class="head-pic">
|
||||||
<img class="pic-img" :src="'static/images/userinfo/icon-userinfo.png'" />
|
<img class="pic-img" :src="'static/images/userinfo/icon-userinfo.png'" />
|
||||||
@@ -91,14 +95,24 @@
|
|||||||
|
|
||||||
<!-- 底部加高度来避免tabbar遮挡 -->
|
<!-- 底部加高度来避免tabbar遮挡 -->
|
||||||
<!-- <view class="bottom-height"></view> -->
|
<!-- <view class="bottom-height"></view> -->
|
||||||
</mescroll-uni>
|
</mescroll-uni>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 弹窗模板 -->
|
||||||
|
<!-- <customShowModal
|
||||||
|
:title="title"
|
||||||
|
:content="content"
|
||||||
|
:visible="visible"
|
||||||
|
@close="handleClose"
|
||||||
|
@confirm="handleLoginOut"
|
||||||
|
ref="showModel"
|
||||||
|
></customShowModal> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted,getCurrentInstance } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
import customHeader from '@/components/customHeader.vue'
|
||||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||||
import { getNavBarPaddingTop } from '@/utils/system.js'
|
import { getNavBarPaddingTop } from '@/utils/system.js'
|
||||||
import { getUserInfo,versionCheck } from '@/api/auth.js'
|
import { getUserInfo,versionCheck } from '@/api/auth.js'
|
||||||
@@ -106,6 +120,12 @@ import { formatIOS } from '@/utils/status.js'
|
|||||||
import { showAlert } from '@/utils/message.js'
|
import { showAlert } from '@/utils/message.js'
|
||||||
import { useUserStore } from '@/stores/user';
|
import { useUserStore } from '@/stores/user';
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
|
||||||
|
|
||||||
|
let myTitle = '我的';
|
||||||
|
myTitle = networkEnv.value==1?'我的 · 企业内网':'我的'
|
||||||
|
|
||||||
|
|
||||||
// 1.头部导航栏
|
// 1.头部导航栏
|
||||||
const navBarPaddingTop = ref(0);
|
const navBarPaddingTop = ref(0);
|
||||||
@@ -179,6 +199,7 @@ const downCallback = async (mescroll) => {
|
|||||||
|
|
||||||
// 3.查询是否有更新的版本显示点
|
// 3.查询是否有更新的版本显示点
|
||||||
const getVersion = async ()=>{
|
const getVersion = async ()=>{
|
||||||
|
let networkEnv = proxy.$NETWORK_ENV;//1-内网 2-外网
|
||||||
let param = {
|
let param = {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
verNumber:systemInfo.appWgtVersion,//当前版本号
|
verNumber:systemInfo.appWgtVersion,//当前版本号
|
||||||
@@ -187,11 +208,26 @@ const getVersion = async ()=>{
|
|||||||
verNumber : systemInfo.appVersion,
|
verNumber : systemInfo.appVersion,
|
||||||
// #endif
|
// #endif
|
||||||
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
|
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
|
||||||
|
runEnv:networkEnv
|
||||||
}
|
}
|
||||||
let data = await versionCheck(param);
|
let data = await versionCheck(param);
|
||||||
isCurrent.value = data.isCurrent;
|
isCurrent.value = data.isCurrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 自定义弹窗
|
||||||
|
let title = ref('');
|
||||||
|
let content = ref('');
|
||||||
|
let visible = ref(false);
|
||||||
|
const showModel=()=>{
|
||||||
|
title.value = '提示'
|
||||||
|
content.value = '是否确认退出?';
|
||||||
|
visible.value = true;
|
||||||
|
}
|
||||||
|
//关闭
|
||||||
|
const handleClose=()=>{
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
// 3.退出登录
|
// 3.退出登录
|
||||||
const handleLoginOut = async ()=>{
|
const handleLoginOut = async ()=>{
|
||||||
|
|
||||||
@@ -217,19 +253,19 @@ onMounted(() => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.scroll-h{
|
.scroll-h{
|
||||||
/* #ifdef APP-PLUS */
|
/* #ifdef APP-PLUS */
|
||||||
height:calc(100vh - 50px) !important;
|
height:calc(100vh - 78px) !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifndef APP-PLUS */
|
/* #ifndef APP-PLUS */
|
||||||
height: calc(100vh - 30px) !important;
|
height: calc(100vh - 80px) !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
:deep(.mescroll-upwarp){
|
:deep(.mescroll-upwarp){
|
||||||
display:none
|
display:none
|
||||||
}
|
}
|
||||||
.head-pic {
|
.head-pic {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 40rpx 0rpx 10rpx 30rpx;
|
padding: 0rpx 0rpx 10rpx 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head-pic .pic-img {
|
.head-pic .pic-img {
|
||||||
|
|||||||
@@ -26,12 +26,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref, onMounted,getCurrentInstance } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { ref, onMounted } from 'vue'
|
|
||||||
import customHeader from '@/components/customHeader.vue'
|
import customHeader from '@/components/customHeader.vue'
|
||||||
import { versionCheck } from '@/api/auth.js';
|
import { versionCheck } from '@/api/auth.js';
|
||||||
import { getNavBarPaddingTop } from '@/utils/system.js'
|
import { getNavBarPaddingTop } from '@/utils/system.js'
|
||||||
import { formatIOS } from '@/utils/status.js'
|
import { formatIOS } from '@/utils/status.js'
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
// 初始load页面
|
// 初始load页面
|
||||||
onLoad(async(opt) => {
|
onLoad(async(opt) => {
|
||||||
@@ -49,6 +50,7 @@ onMounted(() => {
|
|||||||
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
navBarPaddingTop.value = getNavBarPaddingTop() * 2;
|
||||||
})
|
})
|
||||||
let getOSVesion = async()=>{
|
let getOSVesion = async()=>{
|
||||||
|
let networkEnv = proxy.$NETWORK_ENV;//1-内网 2-外网
|
||||||
let systemInfo = uni.getSystemInfoSync();
|
let systemInfo = uni.getSystemInfoSync();
|
||||||
let param = {
|
let param = {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
@@ -58,15 +60,16 @@ let getOSVesion = async()=>{
|
|||||||
verNumber : systemInfo.appVersion,
|
verNumber : systemInfo.appVersion,
|
||||||
// #endif
|
// #endif
|
||||||
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
|
os: formatIOS(systemInfo.osName),//操作系统 Android IOS
|
||||||
|
runEnv:networkEnv
|
||||||
}
|
}
|
||||||
// 当前手机版本
|
// 当前手机版本
|
||||||
appVersion.value = param.appVersion;
|
appVersion.value = param.appVersion;
|
||||||
console.log("appVersion=>",appVersion)
|
console.log("appVersion=>",appVersion.value)
|
||||||
let data = await versionCheck(param);
|
let data = await versionCheck(param);
|
||||||
newVersion.value = data.verNumber;
|
newVersion.value = data.verNumber;
|
||||||
downloadURL.value = data.downloadUrl || '';
|
downloadURL.value = data.downloadUrl || '';
|
||||||
isCurrent.value = data.isCurrent;
|
isCurrent.value = data.isCurrent;
|
||||||
remark.value = data.remark //|| '全新的UI界面 优化了签到/打卡功能,整体流程更加简洁清晰 搜索功能全面升级 修复了已知BUG'
|
remark.value = data.remark; //|| '全新的UI界面 优化了签到/打卡功能,整体流程更加简洁清晰 搜索功能全面升级 修复了已知BUG'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载最新版本
|
// 下载最新版本
|
||||||
|
|||||||
@@ -628,4 +628,8 @@ uni-button[type='primary'][plain] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* CRM 样式 end */
|
/* CRM 样式 end */
|
||||||
|
|
||||||
|
.mescroll-empty .empty-tip{
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
BIN
src/static/images/mescroll-empty.png
Normal file
BIN
src/static/images/mescroll-empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -86,4 +86,45 @@ export function getDate(type) {
|
|||||||
day = day > 9 ? day : '0' + day;
|
day = day > 9 ? day : '0' + day;
|
||||||
|
|
||||||
return `${year}-${month}-${day}`;
|
return `${year}-${month}-${day}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日期格式化
|
||||||
|
export function parseTime(time, pattern) {
|
||||||
|
if (arguments.length === 0 || !time) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||||
|
let date
|
||||||
|
if (typeof time === 'object') {
|
||||||
|
date = time
|
||||||
|
} else {
|
||||||
|
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||||
|
time = parseInt(time)
|
||||||
|
} else if (typeof time === 'string') {
|
||||||
|
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
|
||||||
|
}
|
||||||
|
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||||
|
time = time * 1000
|
||||||
|
}
|
||||||
|
date = new Date(time)
|
||||||
|
}
|
||||||
|
const formatObj = {
|
||||||
|
y: date.getFullYear(),
|
||||||
|
m: date.getMonth() + 1,
|
||||||
|
d: date.getDate(),
|
||||||
|
h: date.getHours(),
|
||||||
|
i: date.getMinutes(),
|
||||||
|
s: date.getSeconds(),
|
||||||
|
a: date.getDay()
|
||||||
|
}
|
||||||
|
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
||||||
|
let value = formatObj[key]
|
||||||
|
// Note: getDay() returns 0 on Sunday
|
||||||
|
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
||||||
|
if (result.length > 0 && value < 10) {
|
||||||
|
value = '0' + value
|
||||||
|
}
|
||||||
|
return value || 0
|
||||||
|
})
|
||||||
|
return time_str
|
||||||
}
|
}
|
||||||
@@ -8,4 +8,13 @@ export function formatIOS(type){
|
|||||||
return result[type];
|
return result[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 紧急程度 1-紧急 2-急 3-一般
|
||||||
|
export function formatLevel(type){
|
||||||
|
const result = {
|
||||||
|
1:'紧急',
|
||||||
|
2:'急',
|
||||||
|
3:'一般',
|
||||||
|
}
|
||||||
|
return result[type];
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user