首页任务通知
This commit is contained in:
parent
c992731a78
commit
8df64e5616
@ -4,4 +4,7 @@ import oahttp from "@/utils/oahttp.js";
|
||||
* 公告列表
|
||||
*/
|
||||
export const noticeList = (data) => oahttp.get('/article/lists', data)
|
||||
export const noticeDetail = (data) => oahttp.get('/article/detail', data)
|
||||
export const noticeDetail = (data) => oahttp.get('/article/detail', data)
|
||||
|
||||
// 任务通知
|
||||
export const taskStartNoticeApi = (data) => oahttp.get('/task/taskStartNotice', data)
|
@ -100,6 +100,11 @@
|
||||
<text v-if="datas.director_uid != 0"> {{ datas.directorInfo.nickname}} </text>
|
||||
<text v-if="datas.director_uid == 0"> 指定人员 </text>
|
||||
</view>
|
||||
<!-- <view class="">
|
||||
<text>任务进度 :</text>
|
||||
<u-line-progress :percentage="30" :activeColor="taskProgressColor(30)"></u-line-progress>
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -173,6 +178,14 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
taskProgressColor(value) {
|
||||
if (value < 100) return "#FF7C32"
|
||||
else {
|
||||
return '#1BA035'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
navTo(url) {
|
||||
if (url) {
|
||||
uni.showLoading({
|
||||
|
@ -2,7 +2,7 @@ let httpApiThree;
|
||||
let httpApi; // 总域名
|
||||
let httpApiTwo; // 物流系统域名
|
||||
|
||||
const env = 'local'; // 开发
|
||||
const env = 'dev'; // 开发
|
||||
// const env = 'prod'; // 生产
|
||||
// const env = 'prew'; // 预上线
|
||||
// const env = 'local'; // 本地
|
||||
|
@ -76,8 +76,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 任务通知 -->
|
||||
<view class="" style="width: 694.74rpx;margin: 0 auto;" v-if="taskNotice">
|
||||
<u-notice-bar :text="taskNotice" mode="closable" scrollable url="/pages/bar/bar"></u-notice-bar>
|
||||
</view>
|
||||
|
||||
<!-- 片区经理聊天 -->
|
||||
<view class="chat" @click="navTo('/subpkg/chatMang/index')" style="margin-top: 130rpx;">
|
||||
<view class="chat" @click="navTo('/subpkg/chatMang/index')" style="margin-top: 10rpx;">
|
||||
<view class="chat-l">
|
||||
<u--image shape="circle" :showLoading="true" :src="managerInfo.manager_avatar" width="91rpx"
|
||||
height="91rpx"></u--image>
|
||||
@ -188,7 +194,8 @@
|
||||
oaHomeData
|
||||
} from "@/static/server/server.js";
|
||||
import {
|
||||
noticeList
|
||||
noticeList,
|
||||
taskStartNoticeApi
|
||||
} from "@/api/notice.js";
|
||||
import {
|
||||
getAreaManagerApi
|
||||
@ -219,7 +226,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
taskNotice: '',
|
||||
brange: 0,
|
||||
options: {
|
||||
data: '',
|
||||
@ -270,6 +277,7 @@
|
||||
};
|
||||
},
|
||||
async onLoad() {
|
||||
this.getTaskNotice()
|
||||
// console.log('asdashg')
|
||||
if (uni.getStorageSync('USER_INFO')) {
|
||||
let userData = JSON.parse(uni.getStorageSync('USER_INFO'))
|
||||
@ -277,11 +285,12 @@
|
||||
this.initUserInfo(userData);
|
||||
// console.log(545)
|
||||
}
|
||||
console.log(7787878)
|
||||
await this.$onLaunched;
|
||||
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO") || '{}')?.is_captain
|
||||
this.options.data = bj;
|
||||
|
||||
|
||||
|
||||
//#ifdef APP-PLUS
|
||||
let that = this;
|
||||
jpushModule.addNotificationListener(function(result) {
|
||||
@ -330,7 +339,6 @@
|
||||
|
||||
let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id
|
||||
this.getOrderList();
|
||||
console.log("show")
|
||||
getAreaManagerApi({
|
||||
user_id
|
||||
}).then(res => {
|
||||
@ -414,6 +422,14 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 任务通知
|
||||
async getTaskNotice() {
|
||||
let res = await taskStartNoticeApi()
|
||||
this.taskNotice = res.data?.template?.title ?
|
||||
`您的${res.data.template.title}任务即将于${res.data.template.cron_time}日开始` : ""
|
||||
},
|
||||
|
||||
// 通知
|
||||
noticeFn() {
|
||||
jpushModule.addNotificationListener(res => {
|
||||
@ -600,6 +616,9 @@
|
||||
await this.getOrderList();
|
||||
await this.$store.dispatch('initConfig');
|
||||
await this.getApproveList();
|
||||
await this.getTaskNotice();
|
||||
|
||||
|
||||
// this.getIndexList()
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user