|
|
@@ -14,7 +14,7 @@ Page({
|
|
|
pageSize: 20,
|
|
|
pageTotal: 1,
|
|
|
type: "应用",
|
|
|
- where:{}
|
|
|
+ where: {}
|
|
|
},
|
|
|
total: 0,
|
|
|
},
|
|
|
@@ -32,37 +32,93 @@ Page({
|
|
|
})
|
|
|
this.getlist(true);
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面初次渲染完成
|
|
|
- */
|
|
|
onReady() {
|
|
|
- getHeight.getHeight("#tabs", this).then(res => {
|
|
|
+ getHeight.getHeight(".head", this).then(res => {
|
|
|
this.setData({
|
|
|
height: res
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- toDetails(e) {
|
|
|
+ async toDetails(e) {
|
|
|
const {
|
|
|
- item
|
|
|
- } = e.currentTarget.dataset;
|
|
|
- wx.navigateTo({
|
|
|
+ objectname,
|
|
|
+ objectid,
|
|
|
+ messageid
|
|
|
+ } = e.currentTarget.dataset.item;
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "system.message.Message",
|
|
|
+ "method": "readMessage",
|
|
|
+ "content": {
|
|
|
+ messageid
|
|
|
+ }
|
|
|
+ }, false)
|
|
|
+ const res = await _Http.basic({
|
|
|
+ "classname": "saletool.common.auth",
|
|
|
+ "method": "isAuth",
|
|
|
+ "content": {
|
|
|
+ objectid,
|
|
|
+ objectname
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (res.msg != '成功' || res.data[0].isAuth != 1) return wx.showToast({
|
|
|
+ title: '暂无权限进入应用',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ switch (objectname) {
|
|
|
+ case 'sat_courseware':
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/college/index`,
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case 'sat_sharematerial':
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/promotional/index`,
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case 'sat_notice':
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/annunciate/index`,
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case 'sat_submitedit':
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/submission/index`,
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case 'sat_orderclue':
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/pages/threadedTree/index`,
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case 'sys_attachment':
|
|
|
+ let item = {
|
|
|
+ attachmentid: objectid,
|
|
|
+ document: '营销物料'
|
|
|
+ }
|
|
|
+ wx.navigateTo({
|
|
|
+ url: 'pages/tabbar/smartStore/index',
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ wx.showToast({
|
|
|
+ title: '当前应用暂不支持跳转',
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ /* wx.navigateTo({
|
|
|
url: './details?id=' + item.messageid,
|
|
|
- })
|
|
|
+ }) */
|
|
|
},
|
|
|
-
|
|
|
getlist(init = false) {
|
|
|
if (init.detail != undefined) init = init.detail;
|
|
|
- if (init) this.setData({
|
|
|
- ['content.pageNumber']: 1
|
|
|
- })
|
|
|
- if (this.data.content.pageNumber > this.data.content.pageTotal) return;
|
|
|
+ let content = this.data.content
|
|
|
+ if (init) content.pageNumber = 1;
|
|
|
+ if (content.pageNumber > content.pageTotal) return;
|
|
|
_Http.basic({
|
|
|
"classname": "system.message.Message",
|
|
|
"method": "queryMessage",
|
|
|
- content: this.data.content
|
|
|
+ content
|
|
|
}).then(res => {
|
|
|
this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
if (res.msg != '成功') return wx.showToast({
|
|
|
@@ -77,49 +133,8 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面显示
|
|
|
- */
|
|
|
onShow() {
|
|
|
this.getlist(true);
|
|
|
this.getTabBar().init();
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面隐藏
|
|
|
- */
|
|
|
- onHide() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 生命周期函数--监听页面卸载
|
|
|
- */
|
|
|
- onUnload() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 页面相关事件处理函数--监听用户下拉动作
|
|
|
- */
|
|
|
- onPullDownRefresh() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 页面上拉触底事件的处理函数
|
|
|
- */
|
|
|
- onReachBottom() {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 用户点击右上角分享
|
|
|
- */
|
|
|
- onShareAppMessage() {
|
|
|
-
|
|
|
- }
|
|
|
})
|