From 36319f05f2a8294f2af207cb33848e8963034d1d Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Mon, 29 Jun 2020 17:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9C=8D=E5=8A=A1=E3=80=81?= =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E6=95=99=E8=82=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epdc-resident-mp-yushan/pages/index/index.js | 3 +- .../components/activity/activity.wxml | 10 ++-- .../components/activity/activity.wxss | 1 - .../subpages/education/images/signed.png | Bin 0 -> 1196 bytes .../pages/classDetail/classDetail.wxml | 15 +++++- .../pages/healthyLife/healthyLife.js | 10 +++- .../subpages/education/pages/hobby/hobby.js | 43 ++++-------------- .../subpages/education/pages/hobby/hobby.wxml | 8 ++-- .../subpages/education/pages/hobby/hobby.wxss | 6 +-- .../subpages/education/pages/index/index.wxml | 2 +- .../subpages/education/utils/api.js | 20 +++++--- .../associationDetail/associationDetail.js | 6 ++- .../associationDetail/associationDetail.wxml | 4 +- .../property/pages/topicList/topicList.js | 8 ++-- .../subpages/safety/utils/api.js | 5 +- epdc-resident-mp-yushan/utils/api.js | 2 +- 16 files changed, 75 insertions(+), 68 deletions(-) create mode 100644 epdc-resident-mp-yushan/subpages/education/images/signed.png diff --git a/epdc-resident-mp-yushan/pages/index/index.js b/epdc-resident-mp-yushan/pages/index/index.js index b2666ae..4330a7b 100644 --- a/epdc-resident-mp-yushan/pages/index/index.js +++ b/epdc-resident-mp-yushan/pages/index/index.js @@ -123,7 +123,8 @@ Page({ let para = { pageIndex: this.data.pageNo, pageSize: this.data.pageSize, - timestamp: this.data.timestamp + timestamp: this.data.timestamp, + categoryCode:"" } api.newsList(para).then((res) => { console.log('首页新闻列表', res) diff --git a/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxml b/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxml index 2cab1ca..2ad04b6 100644 --- a/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxml +++ b/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxml @@ -4,7 +4,11 @@ bindtap="toClassDetail"> - + + + + + {{item.title}} @@ -26,9 +30,9 @@ + bindtap="toClassDetail" wx:if="{{item.signUpFlag=='1' && showJoin}}" src="../../images/signed.png" /> + bindtap="toClassDetail" wx:if="{{item.signUpFlag=='0' && showJoin && !(item.actQuota === signUpNum && item.actQuotaFlag !=0)}}" src="../../images/bm.png" /> \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxss b/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxss index ae0a521..8617a6e 100644 --- a/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxss +++ b/epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxss @@ -102,7 +102,6 @@ } .infos .infos_times view { - height: 28rpx; padding-top: 4rpx; display: flex; align-items: center; diff --git a/epdc-resident-mp-yushan/subpages/education/images/signed.png b/epdc-resident-mp-yushan/subpages/education/images/signed.png new file mode 100644 index 0000000000000000000000000000000000000000..c19c0492acd6f1cfb6d1d637c972a96e49d53fe7 GIT binary patch literal 1196 zcmeAS@N?(olHy`uVBq!ia0vp^O+akG!3-o{-4EIbq&@`rgt!9f{rmTyIdkU9l`Ge; zU%z?t=AAotE?>TU?b@{)H*NsAw{PDDvVl^!ZruW^0SW>EPy`MjB0vRjaX1^o0Fr17 zpk9a|oCNBHvq@zD9d`Hb-TU|NKYH}&>C>k#Uc7kq>ebt~Z$Eta@afa1uV24@|Ni~g zuU~)u{Q3X?zxDOyy+A)Zlmz(&GqA9-35$q{OG-)0sH$md`S}L~hDSulq-7Qq7L}G& zRrmJwPo6S$+x8u&&zw7d;l|C|Z{EK9`04YPuit+B{PpLbXU5j`3=GWLo-U3d5r@yt z$d0~cAadMTRCado^OE41yVeE=&Y51Bc$iZ?*V$?IlbZkeo5h!Y@nW)x__JT7@`S$S zbvdU`QFjYxT`%`HD7U>EYd&{wXwpTm$BWqYSKV_>KFaXn+i&?54)yidjx+4B%yD+j zlGmFmxF+7I_1D%&l^;JCrmosMSN+Cor=zdlrE-2tWW41soKq^^c;T)WhuN(S0$a_K znwDxuOj!5mhD}TBOAVzJ=QG&m&z%0((?{^>$;p!W3KN+cP75s!m&~#{IDd|ilgHZR z9i2L-&MR^FOtHFr^~U@sa&x5=pB&iGm>8(jFVNwU$r7%lc15j?*~#Pdmd0nQ-5iJI zHPqY<=Pophe9|=G>b)s^2N)P;2skYiSj5xFb>tvNR6@cV`By2|i_~;oB`O(Y6@M5q zg|Dc5JNp_Q7#&kFI@Y%Sfa`(@%nV;dlOAk3(EF`g>g+~tzRYti6TY`H zDzTYZ8K*ED{GeFVd*{=c^e1I{91fX#&UecMC3!S1_ce0c{^a7TI?3Mtjy-HEoI~ba zJt*I4%H&ho$R!XlY3rgbZ5A_B9B&D__~mUfx!}R-)#>G>X}V0HqC;Yn=b=CI?+PUA zJt}I|u;fUQ<1>nmmCJCMqMWtZ{?EK?vX8w_-B4qa)L>=M^I}*~8@Oez$?oK0wH5(Y z|2u&S%nweqTY9r{RX#d+r>DRyH;buZANzyqmmMDrSOQ)!GO*k^-=fE0tZcE3CALZ6 z{}e8-#yQKq51MeqpNPum;|O{AP}!&V!s_U*QqDswl$Hfg?w?s@!RmDS(xxejKP0AI z<9K_%<-^rWI~YAgZq7T({piqSg$oR#$3q+^&B*)e!vTz)mN~NoTs9V8)?+X@R?>68 z)QfB1u?yP%uPs#LTWNM&89bl9Ec5=93lMeE;~&H;Uo#TP$|& zYtrHGlS9p?p5o>FrSWgU>XIE3uRYDUvFYCiiKgTH>t8 - + @@ -147,10 +147,21 @@ + + + + + + + 已报名 + + + + - + 已报满 diff --git a/epdc-resident-mp-yushan/subpages/education/pages/healthyLife/healthyLife.js b/epdc-resident-mp-yushan/subpages/education/pages/healthyLife/healthyLife.js index b982698..58e2880 100644 --- a/epdc-resident-mp-yushan/subpages/education/pages/healthyLife/healthyLife.js +++ b/epdc-resident-mp-yushan/subpages/education/pages/healthyLife/healthyLife.js @@ -72,7 +72,7 @@ Page({ let param = { pageIndex:this.data.pageNo, pageSize:this.data.pageSize, - timeStamp:this.data.timeStamp, + timestamp:this.data.timeStamp, categoryCode:this.data.tabList[0].categoryCode } this.initInfo(param); @@ -91,6 +91,9 @@ Page({ }); }, initInfo(param){ + this.setData({ + loadMoreType:'loading' + }) api.getNewsList(param).then(res=>{ this.setData({ loadMoreType: res.data.length === this.data.pageSize ? 'more': 'none', @@ -119,7 +122,7 @@ Page({ let param = { pageIndex:this.data.pageNo, pageSize:this.data.pageSize, - timeStamp:this.data.timeStamp, + timestamp:this.data.timeStamp, categoryCode:id } this.initInfo(param) @@ -146,4 +149,7 @@ Page({ } } }, + navigatetoNewsDetail (e) { + wx.navigateTo({ url: `/subpages/home/pages/newsDetail/newsDetail?id=${e.detail.newsId}` }) + }, }) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js b/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js index 13db34d..9b6e59b 100644 --- a/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js +++ b/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js @@ -94,43 +94,16 @@ Page({ const { joinstatus, groupid, groupname,state,index } = e.currentTarget.dataset console.log( e.currentTarget.dataset) if(joinstatus == '0'){ - wx.showModal({ - title:'提示', - content:'尚未加入群组,是否申请加入?', - confirmText:'申请', - cancelColor: 'cancelColor', - success:(res)=>{ - if(res.cancel){ - - }else{ - api.applyForGroup(groupid).then(res=>{ - if(res.code == '0'){ - wx.showToast({ - title: '申请成功' - }) - this.setData({ - ['groupList[' + index + '].groupMemberFlag']:"1" - }) - }else{ - wx.showToast({ - title: '申请失败', - icon:"none" - }) - } - }).catch(err=>{ - - }) - } - } + api.joinGroup({groupId:groupid}).then(res=>{ + wx.navigateTo({ + url: `/subpages/property/pages/topicList/topicList?groupId=${groupid}&groupName=${groupname}&state=${state}&from=hobby` + }) + }).catch(err=>{ + }) - }else if(joinstatus == '1'){ - wx.showToast({ - title: '您已申请过加入该社群,请等待群主审核', - icon:"none" - }) - }else if(joinstatus == '2'){ + }else{ wx.navigateTo({ - url: `/subpages/property/pages/topicList/topicList?groupId=${groupid}&groupName=${groupname}&state=${state}` + url: `/subpages/property/pages/topicList/topicList?groupId=${groupid}&groupName=${groupname}&state=${state}&from=hobby` }) } }, diff --git a/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxml b/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxml index 6b26afd..2910f0c 100644 --- a/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxml +++ b/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxml @@ -10,11 +10,13 @@ - + + + {{item.groupName}} - @@ -28,4 +30,4 @@ 暂无兴趣群 - \ No newline at end of file + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxss b/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxss index c03361f..ab2fa3d 100644 --- a/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxss +++ b/epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxss @@ -51,8 +51,8 @@ page { height: 350rpx; } .item-img{ - width: 100rpx; - height: 100rpx; + width: 110rpx; + height: 110rpx; margin:0 auto; display: block; padding: 30rpx 0; @@ -81,6 +81,6 @@ page { height: 100rpx; line-height: 100rpx; text-align: center; - margin-top: 500rpx; + margin-top: 40vh; color: #777; } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/education/pages/index/index.wxml b/epdc-resident-mp-yushan/subpages/education/pages/index/index.wxml index d0f9e76..f902086 100644 --- a/epdc-resident-mp-yushan/subpages/education/pages/index/index.wxml +++ b/epdc-resident-mp-yushan/subpages/education/pages/index/index.wxml @@ -1,6 +1,6 @@ - + diff --git a/epdc-resident-mp-yushan/subpages/education/utils/api.js b/epdc-resident-mp-yushan/subpages/education/utils/api.js index 22bb97a..91f7bbf 100644 --- a/epdc-resident-mp-yushan/subpages/education/utils/api.js +++ b/epdc-resident-mp-yushan/subpages/education/utils/api.js @@ -260,16 +260,16 @@ export function getClassList (param) { * 社区讲坛 - 居民端获取社区讲坛详情 */ export function getClassDetail (param) { - // return request.get('property/activity/detail/'+param) - return request.get('property/activity/detail/%7BactivityId%7D') + return request.get('property/activity/detail/'+param) + // return request.get('property/activity/detail/%7BactivityId%7D') } /** * 社区讲坛 - 居民端  - 活动报名 */ export function signUpClass (param) { - // return request.post('property/activity/singUp/'+param) - return request.post('property/activity/singUp/{activityId}') + return request.post('property/activity/singUp/'+param) + // return request.post('property/activity/singUp/{activityId}') } /** @@ -283,13 +283,19 @@ export function getInterestGroupList (param) { * 居民端 - 社区教育 - 健康生活 - 类别列表 */ export function getCategoryList (param) { - // return request.get('news/category/listBySection/'+param) - return request.get('news/category/listBySection/{sectionCode}') + return request.get('news/category/listBySection/'+param) + // return request.get('news/category/listBySection/{sectionCode}') } /** * 居民端 - 平安榆山/健康生活 - 新闻列表 */ export function getNewsList (param) { - return request.get('news/news/listByCategory',param) + return request.get('news/news/list',param) +} + /** + * 入群接口(跳过申请流程) + */ +export function joinGroup (param) { + return request.post('property/group/join',param) } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js index 8a3044e..f61105b 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js +++ b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js @@ -20,14 +20,16 @@ Page({ groupId: '', noticeVerifyVisible: false, dialogVisible: false, - checkPenddingNum: 0 + checkPenddingNum: 0, + from:'' }, onShow () { this.getCheckMemberNum() }, onLoad (options) { this.setData({ - groupId: options.groupId + groupId: options.groupId, + from:options.from }) this.getAssociationDetail() }, diff --git a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml index 68d0ac5..c2096d3 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml +++ b/epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml @@ -79,7 +79,7 @@ - + @@ -91,7 +91,7 @@ - + diff --git a/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js b/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js index 69cf9fd..0a2d9b8 100644 --- a/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js +++ b/epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js @@ -19,7 +19,8 @@ Page({ userInfo: { lordFlag: '0' }, - selectedTopicId: '' + selectedTopicId: '', + from:'' }, onLoad(options) { this.refreshScroll = this.selectComponent('#refreshScroll') @@ -27,7 +28,8 @@ Page({ groupId: options.groupId, groupName: options.groupName, groupState: options.state, - infoCompleted: app.globalData.infoCompleted + infoCompleted: app.globalData.infoCompleted, + from:options.from===undefined?"":options.from }) this.pullRefreshGetTopicList() this.getAssociationDetail() @@ -56,7 +58,7 @@ Page({ // 跳转 群详情 naavigateToSettings () { wx.navigateTo({ - url: `/subpages/property/pages/associationDetail/associationDetail?groupId=${this.data.groupId}` + url: `/subpages/property/pages/associationDetail/associationDetail?groupId=${this.data.groupId}&from=${this.data.from}` }) }, //跳转我的话题 diff --git a/epdc-resident-mp-yushan/subpages/safety/utils/api.js b/epdc-resident-mp-yushan/subpages/safety/utils/api.js index b0dd3cb..fec4490 100644 --- a/epdc-resident-mp-yushan/subpages/safety/utils/api.js +++ b/epdc-resident-mp-yushan/subpages/safety/utils/api.js @@ -3,8 +3,9 @@ const request = require('../../../utils/request') * banner */ export function getBannerList () { - return request.get('property/safety/bannerList',{ - "position":'2' + return request.get('news/banner/list',{ + "position":'0', + "sectionCode":"safety_living" }) } /** diff --git a/epdc-resident-mp-yushan/utils/api.js b/epdc-resident-mp-yushan/utils/api.js index 278acb5..3d84cbc 100644 --- a/epdc-resident-mp-yushan/utils/api.js +++ b/epdc-resident-mp-yushan/utils/api.js @@ -63,7 +63,7 @@ function getToken(wxCode) { } function bannerList(position) { - return fly.get('news/banner/listBySection', { + return fly.get('news/banner/list', { position, sectionCode:"home_page_news" })