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. 20
      epdc-resident-mp-yushan/subpages/education/utils/api.js
  11. 6
      epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.js
  12. 4
      epdc-resident-mp-yushan/subpages/property/pages/associationDetail/associationDetail.wxml
  13. 8
      epdc-resident-mp-yushan/subpages/property/pages/topicList/topicList.js
  14. 5
      epdc-resident-mp-yushan/subpages/safety/utils/api.js
  15. 2
      epdc-resident-mp-yushan/utils/api.js

3
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)

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

@ -4,7 +4,11 @@
bindtap="toClassDetail">
<view class="img">
<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 class="infos">
<view class="infos_title">{{item.title}}</view>
@ -26,9 +30,9 @@
</view>
</view>
<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}}"
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 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 {
height: 28rpx;
padding-top: 4rpx;
display: flex;
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>
</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-我要报名 -->
<view class="button-right" bindtap="signUp">
<view class="button-right3">
@ -147,10 +147,21 @@
</view>
</view>
</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'}}">
<!-- 2-已报满 -->
<view class="button-right">
<view class="button-right3" bindtap="signUpFull">
<view class="button-right3">
<view class="button1">
<image class='header-bg' src="../../images/yuanjiao-gray.png"></image>
<view class="font"> 已报满 </view>

10
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}` })
},
})

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
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"
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`
})
}
},

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="item" wx:for="{{groupList}}" wx:key="index" wx:for-item="item">
<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 class="item-name">{{item.groupName}}</view>
<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>
</view>
</view>
@ -28,4 +30,4 @@
<view class="no-data">暂无兴趣群</view>
</view>
<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;
}
.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;
}

20
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)
}

6
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()
},

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

@ -79,7 +79,7 @@
</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">
<image src="../../images/ruqunshenhe.png" />
</view>
@ -91,7 +91,7 @@
</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">
<image src="../../images/tuiqun.png" />
</view>

8
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}`
})
},
//跳转我的话题

5
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"
})
}
/**

2
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"
})

Loading…
Cancel
Save