Browse Source

综合服务、社区教育

feature/yujt_v2.1
liushaowen 5 years ago
parent
commit
36319f05f2
  1. 3
      epdc-resident-mp-yushan/pages/index/index.js
  2. 10
      epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxml
  3. 1
      epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxss
  4. BIN
      epdc-resident-mp-yushan/subpages/education/images/signed.png
  5. 15
      epdc-resident-mp-yushan/subpages/education/pages/classDetail/classDetail.wxml
  6. 10
      epdc-resident-mp-yushan/subpages/education/pages/healthyLife/healthyLife.js
  7. 37
      epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js
  8. 8
      epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxml
  9. 6
      epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxss
  10. 2
      epdc-resident-mp-yushan/subpages/education/pages/index/index.wxml
  11. 20
      epdc-resident-mp-yushan/subpages/education/utils/api.js
  12. 6
      epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js
  13. 4
      epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml
  14. 8
      epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js
  15. 5
      epdc-resident-mp-yushan/subpages/safety/utils/api.js
  16. 2
      epdc-resident-mp-yushan/utils/api.js

3
epdc-resident-mp-yushan/pages/index/index.js

@ -123,7 +123,8 @@ Page({
let para = { let para = {
pageIndex: this.data.pageNo, pageIndex: this.data.pageNo,
pageSize: this.data.pageSize, pageSize: this.data.pageSize,
timestamp: this.data.timestamp timestamp: this.data.timestamp,
categoryCode:""
} }
api.newsList(para).then((res) => { api.newsList(para).then((res) => {
console.log('首页新闻列表', res) console.log('首页新闻列表', res)

10
epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxml

@ -4,7 +4,11 @@
bindtap="toClassDetail"> bindtap="toClassDetail">
<view class="img"> <view class="img">
<image class="imgsrc" src="{{item.headPic}}" mode="aspectFill"/> <image class="imgsrc" src="{{item.headPic}}" mode="aspectFill"/>
<image wx:if="{{item.frontStyle}}" class="label" src="../../images/msfx.png"></image> <image wx:if="{{item.frontStyle==='msfx'}}" class="label" src="../../images/msfx.png"></image>
<image wx:if="{{item.frontStyle==='sjjz'}}" class="label" src="../../images/sjjz.png"></image>
<image wx:if="{{item.frontStyle==='jypx'}}" class="label" src="../../images/jypx.png"></image>
<image wx:if="{{item.frontStyle==='xljz'}}" class="label" src="../../images/xljz.png"></image>
<image wx:if="{{item.frontStyle==='jmfx'}}" class="label" src="../../images/jmfx.png"></image>
</view> </view>
<view class="infos"> <view class="infos">
<view class="infos_title">{{item.title}}</view> <view class="infos_title">{{item.title}}</view>
@ -26,9 +30,9 @@
</view> </view>
</view> </view>
<image class="signed-logo" data-id="{{item.id}}" <image class="signed-logo" data-id="{{item.id}}"
bindtap="toClassDetail" wx:if="{{item.signUpFlag=='1'}}" src="/images/signed.png" /> bindtap="toClassDetail" wx:if="{{item.signUpFlag=='1' && showJoin}}" src="../../images/signed.png" />
<image class="signed-logo" data-id="{{item.id}}" <image class="signed-logo" data-id="{{item.id}}"
bindtap="toClassDetail" wx:if="{{item.signUpFlag=='0' && showJoin}}" src="../../images/bm.png" /> bindtap="toClassDetail" wx:if="{{item.signUpFlag=='0' && showJoin && !(item.actQuota === signUpNum && item.actQuotaFlag !=0)}}" src="../../images/bm.png" />
</view> </view>
<!-- <view hidden="{{nomore}}" class="loadmore">上滑加载更多</view> <!-- <view hidden="{{nomore}}" class="loadmore">上滑加载更多</view>
<view hidden="{{!nomore}}" class="loadmore">没有更多了~</view> --> <view hidden="{{!nomore}}" class="loadmore">没有更多了~</view> -->

1
epdc-resident-mp-yushan/subpages/education/components/activity/activity.wxss

@ -102,7 +102,6 @@
} }
.infos .infos_times view { .infos .infos_times view {
height: 28rpx;
padding-top: 4rpx; padding-top: 4rpx;
display: flex; display: flex;
align-items: center; align-items: center;

BIN
epdc-resident-mp-yushan/subpages/education/images/signed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

15
epdc-resident-mp-yushan/subpages/education/pages/classDetail/classDetail.wxml

@ -136,7 +136,7 @@
</view> </view>
</block> </block>
<block wx:if="{{(detail.signUpNum!==detail.actQuota && detail.actQuotaFlag ==='1') || detail.actQuotaFlag === '0'}}"> <block wx:if="{{((detail.signUpNum!==detail.actQuota && detail.actQuotaFlag ==='1') || detail.actQuotaFlag === '0')&&detail.signUpFlag=='0'}}">
<!-- 0-我要报名 --> <!-- 0-我要报名 -->
<view class="button-right" bindtap="signUp"> <view class="button-right" bindtap="signUp">
<view class="button-right3"> <view class="button-right3">
@ -147,10 +147,21 @@
</view> </view>
</view> </view>
</block> </block>
<block wx:elif="{{detail.signUpFlag == '1'}}">
<!-- 2-已报名 -->
<view class="button-right">
<view class="button-right3">
<view class="button1">
<image class='header-bg' src="../../images/yuanjiao-gray.png"></image>
<view class="font"> 已报名 </view>
</view>
</view>
</view>
</block>
<block wx:elif="{{detail.signUpNum===detail.actQuota && detail.actQuotaFlag === '1'}}"> <block wx:elif="{{detail.signUpNum===detail.actQuota && detail.actQuotaFlag === '1'}}">
<!-- 2-已报满 --> <!-- 2-已报满 -->
<view class="button-right"> <view class="button-right">
<view class="button-right3" bindtap="signUpFull"> <view class="button-right3">
<view class="button1"> <view class="button1">
<image class='header-bg' src="../../images/yuanjiao-gray.png"></image> <image class='header-bg' src="../../images/yuanjiao-gray.png"></image>
<view class="font"> 已报满 </view> <view class="font"> 已报满 </view>

10
epdc-resident-mp-yushan/subpages/education/pages/healthyLife/healthyLife.js

@ -72,7 +72,7 @@ Page({
let param = { let param = {
pageIndex:this.data.pageNo, pageIndex:this.data.pageNo,
pageSize:this.data.pageSize, pageSize:this.data.pageSize,
timeStamp:this.data.timeStamp, timestamp:this.data.timeStamp,
categoryCode:this.data.tabList[0].categoryCode categoryCode:this.data.tabList[0].categoryCode
} }
this.initInfo(param); this.initInfo(param);
@ -91,6 +91,9 @@ Page({
}); });
}, },
initInfo(param){ initInfo(param){
this.setData({
loadMoreType:'loading'
})
api.getNewsList(param).then(res=>{ api.getNewsList(param).then(res=>{
this.setData({ this.setData({
loadMoreType: res.data.length === this.data.pageSize ? 'more': 'none', loadMoreType: res.data.length === this.data.pageSize ? 'more': 'none',
@ -119,7 +122,7 @@ Page({
let param = { let param = {
pageIndex:this.data.pageNo, pageIndex:this.data.pageNo,
pageSize:this.data.pageSize, pageSize:this.data.pageSize,
timeStamp:this.data.timeStamp, timestamp:this.data.timeStamp,
categoryCode:id categoryCode:id
} }
this.initInfo(param) this.initInfo(param)
@ -146,4 +149,7 @@ Page({
} }
} }
}, },
navigatetoNewsDetail (e) {
wx.navigateTo({ url: `/subpages/home/pages/newsDetail/newsDetail?id=${e.detail.newsId}` })
},
}) })

37
epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.js

@ -94,43 +94,16 @@ Page({
const { joinstatus, groupid, groupname,state,index } = e.currentTarget.dataset const { joinstatus, groupid, groupname,state,index } = e.currentTarget.dataset
console.log( e.currentTarget.dataset) console.log( e.currentTarget.dataset)
if(joinstatus == '0'){ if(joinstatus == '0'){
wx.showModal({ api.joinGroup({groupId:groupid}).then(res=>{
title:'提示', wx.navigateTo({
content:'尚未加入群组,是否申请加入?', url: `/subpages/property/pages/topicList/topicList?groupId=${groupid}&groupName=${groupname}&state=${state}&from=hobby`
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=>{ }).catch(err=>{
}) })
} }else{
}
})
}else if(joinstatus == '1'){
wx.showToast({
title: '您已申请过加入该社群,请等待群主审核',
icon:"none"
})
}else if(joinstatus == '2'){
wx.navigateTo({ 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`
}) })
} }
}, },

8
epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxml

@ -10,11 +10,13 @@
<view class="home" style="margin-top: {{statusHeight + navigationHeight}}px" wx:if="{{groupList.length !== 0}}"> <view class="home" style="margin-top: {{statusHeight + navigationHeight}}px" wx:if="{{groupList.length !== 0}}">
<view class="item" wx:for="{{groupList}}" wx:key="index" wx:for-item="item"> <view class="item" wx:for="{{groupList}}" wx:key="index" wx:for-item="item">
<view style="width:100%"> <view style="width:100%">
<image src="{{item.groupAvatar}}" class="item-img"></image> <view class="item-img">
<image src="{{item.groupAvatar}}" style="width:100%;height:100%;border-radius:50px"></image>
</view>
</view> </view>
<view class="item-name">{{item.groupName}}</view> <view class="item-name">{{item.groupName}}</view>
<view style="width:100%"> <view style="width:100%">
<image src="{{item.groupMemberFlag==='0'?'../../images/enter.png':item.groupMemberFlag==='1'?'../../images/enter.png':item.groupMemberFlag==='2'?'../../images/enter.png':''}}" data-joinStatus="{{item.groupMemberFlag}}" <image src="../../images/enter.png" data-joinStatus="{{item.groupMemberFlag}}"
data-groupName="{{item.groupName}}" data-state="{{item.groupState}}" data-groupId="{{item.id}}" data-index="{{index}}" bindtap="joinGroup" class="item-join"></image> data-groupName="{{item.groupName}}" data-state="{{item.groupState}}" data-groupId="{{item.id}}" data-index="{{index}}" bindtap="joinGroup" class="item-join"></image>
</view> </view>
</view> </view>
@ -28,4 +30,4 @@
<view class="no-data">暂无兴趣群</view> <view class="no-data">暂无兴趣群</view>
</view> </view>
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog> <complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more> <load-more wx:if="{{!noDataFlag}}" loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>

6
epdc-resident-mp-yushan/subpages/education/pages/hobby/hobby.wxss

@ -51,8 +51,8 @@ page {
height: 350rpx; height: 350rpx;
} }
.item-img{ .item-img{
width: 100rpx; width: 110rpx;
height: 100rpx; height: 110rpx;
margin:0 auto; margin:0 auto;
display: block; display: block;
padding: 30rpx 0; padding: 30rpx 0;
@ -81,6 +81,6 @@ page {
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
text-align: center; text-align: center;
margin-top: 500rpx; margin-top: 40vh;
color: #777; color: #777;
} }

2
epdc-resident-mp-yushan/subpages/education/pages/index/index.wxml

@ -1,6 +1,6 @@
<view class="header" style="height: {{statusHeight + navigationHeight}}px;"> <view class="header" style="height: {{statusHeight + navigationHeight}}px;">
<image class="header-bg" src="../../../../images/home/home-status.png" /> <image class="header-bg" src="../../../../images/home/home-status.png" />
<view style="height: 80rpx;position: fixed;margin-top: 60rpx;width: 70rpx;z-index: 101;" bindtap="naviBack"> <view style="height: 80rpx;position: fixed;margin-top: 60rpx;width: 70rpx;z-index: 101;" bindtap="naviBack">
<image class="header-back" style="margin-top:{{statusHeight/2}}px" src="../../images/back.png"></image> <image class="header-back" style="margin-top:{{statusHeight/2}}px" src="../../images/back.png"></image>
</view> </view>
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;"> <view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">

20
epdc-resident-mp-yushan/subpages/education/utils/api.js

@ -260,16 +260,16 @@ export function getClassList (param) {
* 社区讲坛 - 居民端获取社区讲坛详情 * 社区讲坛 - 居民端获取社区讲坛详情
*/ */
export function getClassDetail (param) { export function getClassDetail (param) {
// return request.get('property/activity/detail/'+param) return request.get('property/activity/detail/'+param)
return request.get('property/activity/detail/%7BactivityId%7D') // return request.get('property/activity/detail/%7BactivityId%7D')
} }
/** /**
* 社区讲坛 - 居民端  - 活动报名 * 社区讲坛 - 居民端  - 活动报名
*/ */
export function signUpClass (param) { export function signUpClass (param) {
// return request.post('property/activity/singUp/'+param) return request.post('property/activity/singUp/'+param)
return request.post('property/activity/singUp/{activityId}') // return request.post('property/activity/singUp/{activityId}')
} }
/** /**
@ -283,13 +283,19 @@ export function getInterestGroupList (param) {
* 居民端 - 社区教育 - 健康生活 - 类别列表 * 居民端 - 社区教育 - 健康生活 - 类别列表
*/ */
export function getCategoryList (param) { export function getCategoryList (param) {
// return request.get('news/category/listBySection/'+param) return request.get('news/category/listBySection/'+param)
return request.get('news/category/listBySection/{sectionCode}') // return request.get('news/category/listBySection/{sectionCode}')
} }
/** /**
* 居民端 - 平安榆山/健康生活 - 新闻列表 * 居民端 - 平安榆山/健康生活 - 新闻列表
*/ */
export function getNewsList (param) { 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)
} }

6
epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js

@ -20,14 +20,16 @@ Page({
groupId: '', groupId: '',
noticeVerifyVisible: false, noticeVerifyVisible: false,
dialogVisible: false, dialogVisible: false,
checkPenddingNum: 0 checkPenddingNum: 0,
from:''
}, },
onShow () { onShow () {
this.getCheckMemberNum() this.getCheckMemberNum()
}, },
onLoad (options) { onLoad (options) {
this.setData({ this.setData({
groupId: options.groupId groupId: options.groupId,
from:options.from
}) })
this.getAssociationDetail() this.getAssociationDetail()
}, },

4
epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml

@ -79,7 +79,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="list-item" bindtap="navigateToVerify" wx:if="{{userInfo.lordFlag == 1 && userInfo.groupCategory != '0'}}"> <view class="list-item" bindtap="navigateToVerify" wx:if="{{userInfo.lordFlag == 1 && userInfo.groupCategory != '0' && from !=='hobby'}}">
<view class="left"> <view class="left">
<image src="../../images/ruqunshenhe.png" /> <image src="../../images/ruqunshenhe.png" />
</view> </view>
@ -91,7 +91,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="list-item" bindtap="withdrawGroup" wx:if="{{userInfo.lordFlag == 0 && userInfo.groupCategory != '0'}}"> <view class="list-item" bindtap="withdrawGroup" wx:if="{{userInfo.lordFlag == 0 && userInfo.groupCategory != '0' && from !=='hobby'}}">
<view class="left"> <view class="left">
<image src="../../images/tuiqun.png" /> <image src="../../images/tuiqun.png" />
</view> </view>

8
epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js

@ -19,7 +19,8 @@ Page({
userInfo: { userInfo: {
lordFlag: '0' lordFlag: '0'
}, },
selectedTopicId: '' selectedTopicId: '',
from:''
}, },
onLoad(options) { onLoad(options) {
this.refreshScroll = this.selectComponent('#refreshScroll') this.refreshScroll = this.selectComponent('#refreshScroll')
@ -27,7 +28,8 @@ Page({
groupId: options.groupId, groupId: options.groupId,
groupName: options.groupName, groupName: options.groupName,
groupState: options.state, groupState: options.state,
infoCompleted: app.globalData.infoCompleted infoCompleted: app.globalData.infoCompleted,
from:options.from===undefined?"":options.from
}) })
this.pullRefreshGetTopicList() this.pullRefreshGetTopicList()
this.getAssociationDetail() this.getAssociationDetail()
@ -56,7 +58,7 @@ Page({
// 跳转 群详情 // 跳转 群详情
naavigateToSettings () { naavigateToSettings () {
wx.navigateTo({ 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}`
}) })
}, },
//跳转我的话题 //跳转我的话题

5
epdc-resident-mp-yushan/subpages/safety/utils/api.js

@ -3,8 +3,9 @@ const request = require('../../../utils/request')
* banner * banner
*/ */
export function getBannerList () { export function getBannerList () {
return request.get('property/safety/bannerList',{ return request.get('news/banner/list',{
"position":'2' "position":'0',
"sectionCode":"safety_living"
}) })
} }
/** /**

2
epdc-resident-mp-yushan/utils/api.js

@ -63,7 +63,7 @@ function getToken(wxCode) {
} }
function bannerList(position) { function bannerList(position) {
return fly.get('news/banner/listBySection', { return fly.get('news/banner/list', {
position, position,
sectionCode:"home_page_news" sectionCode:"home_page_news"
}) })

Loading…
Cancel
Save