diff --git a/pages.json b/pages.json index e901b8a..bea55c6 100644 --- a/pages.json +++ b/pages.json @@ -316,6 +316,10 @@ "path": "pages/news/news-list-detail", "style": {} }, + { + "path": "pages/news/notice-list-detail", + "style": {} + }, { "path": "pages/application/other-apps/videos/videos", "style": {} diff --git a/pages/my/news/home.vue b/pages/my/news/home.vue index e176ad2..a56e82a 100644 --- a/pages/my/news/home.vue +++ b/pages/my/news/home.vue @@ -73,6 +73,35 @@ + + + + + + + + + {{item.SYNOPSIS}} + + + {{item.CREATTIME}} + + + + + + + + + + + + 暂无数据 + + + + + @@ -89,10 +118,11 @@ totalHeight:0, TabCur: 0, scrollLeft: 0, - tabNav: ['平台公告', '企业公告'], + tabNav: ['平台公告', '企业公告', '业务提醒'], noClick:true, list: [], pclist: [], + txlist: [], page:1,//分页参数--页数 rows:10,//分页参数--每页数据条数 totalCount:0,//分页参数--初始化页数 @@ -134,6 +164,11 @@ _this.getPcData();//开始分页查询 } } + if ("2"==_this.TabCur){ + if(_this.totalPage >= _this.currentPage){ + _this.getTxData();//开始分页查询 + } + } }, onReady() { @@ -143,6 +178,9 @@ tabSelect(e) { this.TabCur = e.currentTarget.dataset.id; this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60; + if("2" ==this.TabCur){ + this.getTxData(); + } if("1" ==this.TabCur){ this.getPcData(); } @@ -215,6 +253,39 @@ } }); }, + + getTxData() { + var _this = this; + uni.showLoading({ + title: '请稍候' + }) + uni.request({ + url: basePath + '/app/notice/listForCp', + method: 'POST', + dataType: 'json', + header: { + 'Content-type':'application/x-www-form-urlencoded' + }, + data: { + showCount : _this.showCount, + currentPage : _this.currentPage, + loginUserId :loginUserId, + CORPINFO_ID:loginUser.CORPINFO_ID, + USER_ID:loginUser.USER_ID, + }, + success: (res) => { + if("success" == res.data.result){ + uni.hideLoading(); + _this.pclist = res.data.varList; + } else { + uni.showToast({ + title: res.data.message, + duration: 2000 + }); + } + } + }); + }, //跳转事件 goToDetail(e) { uni.navigateTo({ diff --git a/pages/news/home.vue b/pages/news/home.vue index 1d0e526..287afb5 100644 --- a/pages/news/home.vue +++ b/pages/news/home.vue @@ -41,7 +41,7 @@ - + @@ -109,6 +109,42 @@ + + + + + + + + + {{item.SYNOPSIS}} + + + + + + + {{item.CREATTIME}} + + + + + + + + + + + + + + + 暂无数据 + + + + + @@ -125,11 +161,12 @@ totalHeight:0, TabCur: 0, scrollLeft: 0, - tabNav: ['平台公告', '企业公告'], + tabNav: ['平台公告', '企业公告', '业务提醒'], noClick:true, KEYWORDS:'', list: [], pclist: [], + txlist: [], page:1,//分页参数--页数 rows:10,//分页参数--每页数据条数 totalCount:0,//分页参数--初始化页数 @@ -171,6 +208,11 @@ _this.getPcData();//开始分页查询 } } + if ("2"==_this.TabCur){ + if(_this.totalPage >= _this.currentPage){ + _this.getTxData();//开始分页查询 + } + } }, onReady() { }, @@ -178,6 +220,9 @@ tabSelect(e) { this.TabCur = e.currentTarget.dataset.id; this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60; + if("2" ==this.TabCur){ + this.getTxData(); + } if("1" ==this.TabCur){ this.getPcData(); } @@ -262,17 +307,99 @@ } }); }, + + getTxData() { + var _this = this; + uni.showLoading({ + title: '请稍候' + }) + uni.request({ + url: basePath + '/app/notice/listForCp', + method: 'POST', + dataType: 'json', + header: { + 'Content-type':'application/x-www-form-urlencoded' + }, + data: { + showCount : _this.showCount, + currentPage : _this.currentPage, + loginUserId :loginUserId, + CORPINFO_ID:loginUser.CORPINFO_ID, + USER_ID:loginUser.USER_ID, + }, + success: (res) => { + if("success" == res.data.result){ + uni.hideLoading(); + _this.txlist = res.data.varList; + } else { + uni.showToast({ + title: res.data.message, + duration: 2000 + }); + } + } + }); + }, //跳转事件 goToDetail(e) { uni.navigateTo({ - url: '/pages/news/news-list-detail?id='+e+'&type=0', + url: '/pages/news/notice-list-detail?id='+e+'&type=0', }); }, + goToTxDetail(e){ + uni.navigateTo({ + url: '/pages/news/notice-list-detail?id='+e+'&type=1', + }); + }, goToPcDetail(e){ uni.navigateTo({ url: '/pages/news/news-list-detail?id='+e+'&type=1', }); }, + deleteNoticeTx(ID){ + var _this = this; + uni.showModal({ + title: '', + content: '确定要删除这条记录?', + cancelColor:"#000000", + cancelText: '取消', + confirmText: '确定', + success: res => { + if (res.confirm) { + uni.showLoading({ + title: '处理中' + }) + uni.request({ + url: basePath+'/app/notice/delete', + method: 'POST', + dataType: 'json', + header: { + 'Content-type':'application/x-www-form-urlencoded' + }, + data: { + NOTICECORPUSERID_ID: ID + }, + success: (res) => { + uni.hideLoading(); + uni.showToast({ + icon: 'none', + title: '删除成功', + duration: 1500 + }); + _this.getQuery() + }, + fail: (err) => { + uni.hideLoading(); + uni.showModal({ + content: err.errMsg, + showCancel: false + }); + } + }) + } + } + }) + }, deleteNotice(ID){ var _this = this; uni.showModal({ diff --git a/pages/news/notice-list-detail.vue b/pages/news/notice-list-detail.vue new file mode 100644 index 0000000..1e8246f --- /dev/null +++ b/pages/news/notice-list-detail.vue @@ -0,0 +1,133 @@ + + + + +