From f736afbc5026a449b8c6366b5e6c694acdbe5546 Mon Sep 17 00:00:00 2001 From: fanp Date: Wed, 23 Oct 2019 17:49:45 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9=20=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=E7=9B=B8=E5=85=B3=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/user.js | 5 +- pages/topics/goodIdea/cell/index.wxml | 3 -- pages/topics/goodIdea/cell/index.wxss | 6 +-- pages/topics/goodIdea/index.js | 2 - pages/topics/index.js | 6 +++ pages/topics/interactive/submitTopic/index.js | 23 ++++++--- .../topics/interactive/submitTopic/index.wxml | 12 ++++- .../topics/interactive/submitTopic/index.wxss | 11 ++++ .../topics/interactive/topicArticle/index.js | 13 ++--- .../interactive/topicArticle/index.wxml | 7 ++- .../interactive/topicArticle/index.wxss | 17 +++++-- pages/user/index.js | 41 +++++++-------- pages/user/index.wxml | 2 +- pages/user/myActivity/index.js | 10 ++-- pages/user/myActivity/index.json | 3 +- pages/user/myActivity/index.wxml | 1 + pages/user/myFavorite/index.js | 10 ++-- pages/user/myIdea/index.js | 51 +++++++------------ pages/user/myIdea/index.wxml | 2 +- pages/user/myInfo/index.json | 1 + pages/user/myMessage/index.js | 44 ++++------------ pages/user/myTopics/myRelease/index.json | 3 +- pages/user/myTopics/myRelease/index.wxml | 1 + 23 files changed, 136 insertions(+), 138 deletions(-) diff --git a/models/user.js b/models/user.js index 8ba4376..49b4680 100644 --- a/models/user.js +++ b/models/user.js @@ -26,7 +26,7 @@ class UserModel extends HTTP { } - updateUserInfo(avatarUrl, nickName, phone, company, position, success){ + updateUserInfo(avatarUrl, nickName, success){ let params = { url: UserConst.user_updateUserInfo_url, method: Method.POST, @@ -34,9 +34,6 @@ class UserModel extends HTTP { isRegister: 2, //1.注册 2.修改用户信息 avatar: avatarUrl, realName: nickName, - phone: phone, - company: company, - position, position }, success: success } diff --git a/pages/topics/goodIdea/cell/index.wxml b/pages/topics/goodIdea/cell/index.wxml index d935294..6b7177c 100644 --- a/pages/topics/goodIdea/cell/index.wxml +++ b/pages/topics/goodIdea/cell/index.wxml @@ -8,9 +8,6 @@ {{itemData.commentName}} {{itemData.commentTime}} - - - {{itemData.praiseNum}} diff --git a/pages/topics/goodIdea/cell/index.wxss b/pages/topics/goodIdea/cell/index.wxss index 5ad1789..2bba21e 100644 --- a/pages/topics/goodIdea/cell/index.wxss +++ b/pages/topics/goodIdea/cell/index.wxss @@ -49,11 +49,7 @@ image{ color: #66708B; font-size: 14px; } -.goodIdeaIcon{ - width: 30px; - height: 15px; - line-height: 10px; -} + .comment-time{ margin: 0 5px 0 5px; font-size: 12px; diff --git a/pages/topics/goodIdea/index.js b/pages/topics/goodIdea/index.js index 37b3221..788b31f 100644 --- a/pages/topics/goodIdea/index.js +++ b/pages/topics/goodIdea/index.js @@ -26,8 +26,6 @@ Component({ methods: { onClickPraise(e){ const itemData = e.detail.itemData; - // console.log(itemData); - // this.fetchGoodIdeaPraise(itemData.commentId) this.triggerEvent('tapGoodIdeaPraise', { commentId: itemData.commentId }) } } diff --git a/pages/topics/index.js b/pages/topics/index.js index 3a51990..df013a9 100644 --- a/pages/topics/index.js +++ b/pages/topics/index.js @@ -52,6 +52,12 @@ Page({ topicModel.getTopicList(page, res => { console.log('议题列表') console.log(res) + if (res.result.list.length == 0) { + wx.showToast({ + title: '暂无数据', + icon: 'none' + }) + } const datas = res.result.list let tempDatas = [] diff --git a/pages/topics/interactive/submitTopic/index.js b/pages/topics/interactive/submitTopic/index.js index 8877645..dd45137 100644 --- a/pages/topics/interactive/submitTopic/index.js +++ b/pages/topics/interactive/submitTopic/index.js @@ -64,7 +64,16 @@ Page({ }) }) }, + deleteFile(e){ + console.log(e) + let tempImages = this.data.files + const index = e.detail.index + tempImages.splice(index, 1); + this.setData({ + files:tempImages + }) + }, submit(){ if (this.data.topicTitle === ""){ wx.showToast({ @@ -73,13 +82,13 @@ Page({ }) return } - // if (this.data.topicDetail === "") { - // wx.showToast({ - // title: '请输入议题内容', - // icon: 'none' - // }) - // return - // } + if (this.data.topicDetail === "") { + wx.showToast({ + title: '请输入议题内容', + icon: 'none' + }) + return + } const tempImages = [] this.data.files.forEach(item=>{ tempImages.push(item.url) diff --git a/pages/topics/interactive/submitTopic/index.wxml b/pages/topics/interactive/submitTopic/index.wxml index 1e0897f..eddd7d6 100644 --- a/pages/topics/interactive/submitTopic/index.wxml +++ b/pages/topics/interactive/submitTopic/index.wxml @@ -1,8 +1,16 @@ - + + + + + -