From e74f316ea00d59a39e67132a53746bc0c1342e58 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Thu, 14 Jan 2021 16:36:47 +0800 Subject: [PATCH] no message --- pages/agent/factory/index.js | 5 ----- pages/article/detail/index.js | 7 ------- pages/article/factory/index.js | 1 - pages/article/hot-index/index.js | 5 ----- pages/article/list/index.js | 2 -- pages/article/point-index/index.js | 2 -- pages/article/price-detail/index.js | 2 -- pages/article/price-index/index.js | 2 -- pages/article/publish/index.js | 8 -------- pages/article/queue-detail/index.js | 13 ++----------- pages/article/queue-index/index.js | 8 +------- 11 files changed, 3 insertions(+), 52 deletions(-) diff --git a/pages/agent/factory/index.js b/pages/agent/factory/index.js index 481db22..0f7cb5e 100644 --- a/pages/agent/factory/index.js +++ b/pages/agent/factory/index.js @@ -50,14 +50,12 @@ Page({ this.data.form.millPaperId = options.id wx.showLoading({ title: '加载中', mask: true }) getFactoryPriceDetail(options.id).then(result => { - //成功回调 if(result.data.paperCategoryList && result.data.paperCategoryList.length){ this.data.cateId = result.data.paperCategoryList[this.data.cateIndex].categoryId } this.setData({ factoryDetail: result.data }) wx.hideLoading() }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) @@ -65,7 +63,6 @@ Page({ }, onEvent: function (message) { if (message.what == 570 || message.what == 571 || message.what == 572 || message.what == 573) { - // 帖子发布刷新 this.onRefreshList() } }, @@ -129,7 +126,6 @@ Page({ } this.setData({ requesting: true }) getPreferList(this.data.form).then(result => { - //成功回调 if (result.data.records.length) { var respList = result.data.records let nowList = `momentList[${this.data.momentList.length}]` @@ -145,7 +141,6 @@ Page({ this.setData({ finished: true, requesting: false }) } }).catch(err => { - //异常回调 this.setData({ requesting: false }) }) }, diff --git a/pages/article/detail/index.js b/pages/article/detail/index.js index 2257204..fb7a9e0 100644 --- a/pages/article/detail/index.js +++ b/pages/article/detail/index.js @@ -41,14 +41,11 @@ Page({ this.data.id = options.id this.data.form.articleId = options.id wx.showLoading({ title: '加载中', mask: true }) - // /article/get/Article-detail/{id}文章详情 getMomentDetail(options.id).then(result => { - //成功回调 this.setData({ momentDetail: result.data }) this.fetchCommentList() wx.hideLoading() }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) @@ -67,7 +64,6 @@ Page({ return } this.setData({ requesting: true }) - // /article-reply/get/reply-list/in/{articleId} 帖子评论列表 getCommentList(this.data.id, this.data.form).then(result => { if (result.data.records.length) { var respList = result.data.records @@ -96,7 +92,6 @@ Page({ this.setData({ requesting: false, finished: true }) } }).catch(err => { - //异常回调 this.setData({ requesting: false }) }) }, @@ -138,7 +133,6 @@ Page({ } wx.showLoading({ title: '处理中', mask: true }) var form = { content: this.data.comment, articleId: this.data.id} - // /article-reply/reply 评论 commentMoment(form).then(result => { this.setData({ inputBottom: 0, focus: false, comment: '' }) wx.hideLoading() @@ -159,7 +153,6 @@ Page({ util.showToast('请勿重复点赞') return } - // /article-reply/like-or-cancel/reply 点赞评论 likeComment({replyId: item.id}).then(result => { if(item.isLiked){ this.setData({ diff --git a/pages/article/factory/index.js b/pages/article/factory/index.js index 51d9d3d..23bfdff 100644 --- a/pages/article/factory/index.js +++ b/pages/article/factory/index.js @@ -34,7 +34,6 @@ Page({ this.data.idString = options.ids } getAllFactoryList().then(result => { - //成功回调 if(!util.isEmpty(this.data.recommendedString)){ var that = this result.data.forEach(element => { diff --git a/pages/article/hot-index/index.js b/pages/article/hot-index/index.js index 64f0e53..59910fc 100644 --- a/pages/article/hot-index/index.js +++ b/pages/article/hot-index/index.js @@ -97,9 +97,7 @@ Component({ return } this.data.requesting = true - // /article/get/article-list 查询文章列表 getPreferList(this.data.form).then(result => { - //成功回调 if (result.data.records.length) { var respList = result.data.records let nowList = `momentList[${this.data.momentList.length}]` @@ -115,7 +113,6 @@ Component({ this.setData({ finished: true, requesting: false }) } }).catch(err => { - //异常回调 this.setData({ requesting: false }) }) }, @@ -126,7 +123,6 @@ Component({ } this.data.loopRequesting = true getIndexInfoId().then(result => { - //成功回调 this.data.loopRequesting = false this.data.noticeList = result.data if(result.data && result.data.length){ @@ -135,7 +131,6 @@ Component({ this.setData({ content: result.data[0].title}) } }).catch(err => { - //异常回调 this.data.loopRequesting = false }) }, diff --git a/pages/article/list/index.js b/pages/article/list/index.js index 7ed068e..aeae4b2 100644 --- a/pages/article/list/index.js +++ b/pages/article/list/index.js @@ -160,12 +160,10 @@ Page({ onTap(e) { wx.showLoading({ title: '处理中', mask: true }) deleteMoment({id: item.id}).then(result => { - //成功回调 wx.hideLoading() util.showToast('删除成功') that.onRefreshList() }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) diff --git a/pages/article/point-index/index.js b/pages/article/point-index/index.js index eebf93f..d7d48b8 100644 --- a/pages/article/point-index/index.js +++ b/pages/article/point-index/index.js @@ -66,7 +66,6 @@ Component({ } this.data.requesting = true getPreferList(this.data.form).then(result => { - //成功回调 if (result.data.records.length) { var respList = result.data.records let nowList = `momentList[${this.data.momentList.length}]` @@ -82,7 +81,6 @@ Component({ this.setData({ requesting: false }) } }).catch(err => { - //异常回调 this.setData({ requesting: false }) }) }, diff --git a/pages/article/price-detail/index.js b/pages/article/price-detail/index.js index e06ab2f..f0d20cb 100644 --- a/pages/article/price-detail/index.js +++ b/pages/article/price-detail/index.js @@ -59,7 +59,6 @@ Page({ this.setData({ requesting: true }) } getFactoryPrice(this.data.form).then(result => { - //成功回调 if (result.data.records.length) { var respList = result.data.records let nowList = `orderList[${this.data.orderList.length}]` @@ -93,7 +92,6 @@ Page({ }) } }).catch(err => { - //异常回调 this.setData({ requesting: false, finished: true, diff --git a/pages/article/price-index/index.js b/pages/article/price-index/index.js index ab166b8..83453fa 100644 --- a/pages/article/price-index/index.js +++ b/pages/article/price-index/index.js @@ -60,7 +60,6 @@ Component({ } this.data.requesting = true getPreferList(this.data.form).then(result => { - //成功回调 if (result.data.records.length) { var respList = result.data.records let nowList = `momentList[${this.data.momentList.length}]` @@ -76,7 +75,6 @@ Component({ this.setData({ finished: true, requesting: false }) } }).catch(err => { - //异常回调 this.setData({ requesting: false }) }) } diff --git a/pages/article/publish/index.js b/pages/article/publish/index.js index 6198162..cbaf61e 100644 --- a/pages/article/publish/index.js +++ b/pages/article/publish/index.js @@ -37,7 +37,6 @@ Page({ if(options.id){ wx.showLoading({ title: '加载中', mask: true }) getMomentDetail(options.id).then(result => { - // imgUrlList var fileList = [] if (result.data.imgUrlList && result.data.imgUrlList.length) { result.data.imgUrlList.forEach(element => { @@ -47,7 +46,6 @@ Page({ this.setData({ form: result.data, fileList: fileList }) wx.hideLoading() }).catch(err => { - //异常回调 wx.hideLoading() }) } @@ -82,7 +80,6 @@ Page({ this.data.requesting = true if(util.isEmpty(this.data.form.id)){ updateMoment(this.data.form).then(result => { - //成功回调 wx.hideLoading() var what = 570 if(Number(this.data.form.categoryId) > 0){ @@ -91,20 +88,16 @@ Page({ event.emit('EventMessage', { what, desc: 'PostChange' }) util.showBackToast('发布成功') }).catch(err => { - //异常回调 wx.hideLoading() this.data.requesting = false util.showToast(err) }) } else { - // /article/update/Article/{id} 编辑文章 postMoment(this.data.form.id, this.data.form).then(result => { - //成功回调 wx.hideLoading() event.emit('EventMessage', { what: 501, desc: 'PostChange' }) util.showBackToast('编辑成功') }).catch(err => { - //异常回调 wx.hideLoading() this.data.requesting = false util.showToast(err) @@ -129,7 +122,6 @@ Page({ this.pickerView.showPicker(this.data.factoryList) wx.hideLoading() }).catch(err => { - //异常回调 wx.hideLoading() }) } diff --git a/pages/article/queue-detail/index.js b/pages/article/queue-detail/index.js index dcd273f..4d8e91c 100644 --- a/pages/article/queue-detail/index.js +++ b/pages/article/queue-detail/index.js @@ -68,19 +68,10 @@ Page({ }) } } else { - this.setData({ - finished: true, - requesting: false, - loading: false - }) + this.setData({ finished: true, requesting: false, loading: false }) } }).catch(err => { - //异常回调 - this.setData({ - requesting: false, - finished: true, - loading: false - }) + this.setData({ requesting: false, finished: true, loading: false }) }) } diff --git a/pages/article/queue-index/index.js b/pages/article/queue-index/index.js index 9ba0747..d4c7177 100644 --- a/pages/article/queue-index/index.js +++ b/pages/article/queue-index/index.js @@ -45,11 +45,7 @@ Component({ }, //*************************************************momentList************************************************// onRefreshList: function () { - this.setData({ - momentList: [], - ['form.pageNum']: 1, - finished: false - }) + this.setData({ momentList: [], ['form.pageNum']: 1, finished: false }) this.fetchMomentList() }, fetchMomentList: function(){ @@ -58,7 +54,6 @@ Component({ } this.data.requesting = true getPreferList(this.data.form).then(result => { - //成功回调 if (result.data.records.length) { var respList = result.data.records let nowList = `momentList[${this.data.momentList.length}]` @@ -74,7 +69,6 @@ Component({ this.setData({ finished: true, requesting: false }) } }).catch(err => { - //异常回调 this.setData({ requesting: false }) }) }