diff --git a/app.json b/app.json
index 55961f5..527d68e 100644
--- a/app.json
+++ b/app.json
@@ -60,7 +60,10 @@
"root": "subpages/associationNew",
"name": "associationNew",
"pages": [
- "pages/associationlist/associationlist"
+ "pages/associationlist/associationlist",
+ "pages/community/community",
+ "pages/gMembersList/gMembersList",
+ "pages/gOfficialsList/gOfficialsList"
]
},
{
diff --git a/pages/indexNew/indexNew.js b/pages/indexNew/indexNew.js
index 27165df..564cc5b 100644
--- a/pages/indexNew/indexNew.js
+++ b/pages/indexNew/indexNew.js
@@ -409,7 +409,7 @@ Page({
},
dqhd() {
wx.navigateTo({
- url: `../association/association`
+ url: `../../subpages/associationNew/pages/associationlist/associationlist`
})
},
// 积分排名
diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js
index 374e3b2..5e9f8a7 100644
--- a/pages/toRegister/toRegister.js
+++ b/pages/toRegister/toRegister.js
@@ -21,7 +21,7 @@ Page({
// }
// })
let that = this
- const versionNum = '1.2.0'
+ const versionNum = '0.9.7.23'
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data.scanFlag
diff --git a/project.config.json b/project.config.json
index 0215a71..8534479 100644
--- a/project.config.json
+++ b/project.config.json
@@ -7,9 +7,23 @@
"urlCheck": false,
"es6": true,
"postcss": true,
+ "preloadBackgroundData": false,
"minified": true,
"newFeature": true,
- "autoAudits": false
+ "coverView": true,
+ "autoAudits": false,
+ "showShadowRootInWxmlPanel": true,
+ "scopeDataCheck": false,
+ "checkInvalidKey": true,
+ "checkSiteMap": true,
+ "uploadWithSourceMap": true,
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ },
+ "useCompilerModule": true,
+ "userConfirmedUseCompilerModuleSwitch": false
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
diff --git a/subpages/associationNew/components/communityList/communityList.js b/subpages/associationNew/components/communityList/communityList.js
new file mode 100644
index 0000000..72daebb
--- /dev/null
+++ b/subpages/associationNew/components/communityList/communityList.js
@@ -0,0 +1,27 @@
+Component({
+ data: {
+
+ },
+ properties: {
+ associationList: {
+ type: Array,
+ value: [],
+ observer: function (value) {
+ if (value.length > 0) {
+ console.log(value)
+ }
+ }
+ }
+ },
+ methods: {
+ navigateToAss (e) {
+ console.log('navigateToAss')
+ if (e.currentTarget.dataset.join === '0'){
+ this.triggerEvent('joinGroupCallBack',{partyGroupId: e.currentTarget.dataset.code})
+ }
+ wx.navigateTo({
+ url: `/subpages/associationNew/pages/community/community?code=${e.currentTarget.dataset.code}`
+ })
+ }
+ }
+})
\ No newline at end of file
diff --git a/subpages/associationNew/components/communityList/communityList.json b/subpages/associationNew/components/communityList/communityList.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/subpages/associationNew/components/communityList/communityList.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/subpages/associationNew/components/communityList/communityList.wxml b/subpages/associationNew/components/communityList/communityList.wxml
new file mode 100644
index 0000000..993fc00
--- /dev/null
+++ b/subpages/associationNew/components/communityList/communityList.wxml
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/subpages/associationNew/components/communityList/communityList.wxss b/subpages/associationNew/components/communityList/communityList.wxss
new file mode 100644
index 0000000..9333ff2
--- /dev/null
+++ b/subpages/associationNew/components/communityList/communityList.wxss
@@ -0,0 +1,43 @@
+.hover-btn {
+ box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1);
+}
+.community-item{
+ width: 690rpx;
+ height: 300rpx;
+ border-radius: 10rpx;
+ position: relative;
+ margin: 0 auto;
+ margin-top: 28rpx;
+}
+.community-item image{
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ border-radius: 10rpx;
+}
+.community-item .cover-image{
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ background: rgba(0, 0, 0, 0.6);
+ border-radius: 10rpx;
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+.community-item .cover-image .community-name{
+ color: white;
+ font-size: 48rpx;
+}
+.community-item .cover-image .community-add{
+ width: 150rpx;
+ height: 46rpx;
+ text-align: left;
+ padding: 0;
+ margin-top: 32rpx;
+}
+.community-item .cover-image .community-add image{
+ width: 100%;
+ height: 100%;
+}
\ No newline at end of file
diff --git a/subpages/associationNew/components/membersList/membersList.js b/subpages/associationNew/components/membersList/membersList.js
new file mode 100644
index 0000000..9d19060
--- /dev/null
+++ b/subpages/associationNew/components/membersList/membersList.js
@@ -0,0 +1,100 @@
+Component({
+ data: {
+ },
+ properties: {
+ currentUser: {
+ type: Object,
+ value: {}
+ },
+ gMembersList: {
+ type: Array,
+ value: [],
+ observer: function (value) {
+ if (value.length > 0) {
+ console.log(value)
+ }
+ }
+ },
+ gOfficialsList: {
+ type: Array,
+ value: [],
+ observer: function (value) {
+ if (value.length > 0) {
+ console.log(value)
+ }
+ }
+ }
+ },
+ methods: {
+ onNoSpeak (e) {
+ var _this = this;
+ wx.showActionSheet({
+ itemList: ['取消禁言','禁言1天', '禁言1周', '禁言1月', '永久禁言'],
+ success (res) {
+ console.log(e.currentTarget.dataset.userId,res.tapIndex)
+ let data = {
+ userId: e.currentTarget.dataset.userId,
+ bannedFlag: res.tapIndex.toString()
+ }
+ _this.triggerEvent('bannedChange',data)
+ },
+ fail (res) {
+ console.log(e.currentTarget.dataset.userId,res.errMsg)
+ }
+ })
+ },
+ onPhone (e) {
+ if (this.getSysInfo()){
+ wx.showModal({
+ title: '拨打电话',
+ content: `您确定拨打${e.currentTarget.dataset.number}`,
+ cancelColor: '#29B9A5',
+ confirmColor: '#29B9A5',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('用户点击确定')
+ wx.makePhoneCall({
+ phoneNumber: e.currentTarget.dataset.number
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
+ }
+ })
+ } else {
+ wx.makePhoneCall({
+ phoneNumber: e.currentTarget.dataset.number
+ })
+ }
+ },
+ getSysInfo () {
+ wx.getSystemInfo({
+ success:function(res){
+ if(res.platform == "devtools"){
+ return false
+ }else if(res.platform == "ios"){
+ return false
+ }else if(res.platform == "android"){
+ return true
+ }
+ }
+ })
+ },
+ gLevelUp (e) {
+ console.log(e.currentTarget.dataset.userId)
+ let parm = {
+ groupUserId: e.currentTarget.dataset.userId,
+ identityFlag: '2'
+ }
+ this.triggerEvent('modifyIdentity',parm)
+ },
+ gLevelDown (e) {
+ console.log(e.currentTarget.dataset.userId)
+ let parm = {
+ groupUserId: e.currentTarget.dataset.userId,
+ identityFlag: '0'
+ }
+ this.triggerEvent('modifyIdentity',parm)
+ }
+ }
+})
\ No newline at end of file
diff --git a/subpages/associationNew/components/membersList/membersList.json b/subpages/associationNew/components/membersList/membersList.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/subpages/associationNew/components/membersList/membersList.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/subpages/associationNew/components/membersList/membersList.wxml b/subpages/associationNew/components/membersList/membersList.wxml
new file mode 100644
index 0000000..4b7222a
--- /dev/null
+++ b/subpages/associationNew/components/membersList/membersList.wxml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+ {{item.nickname}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+ {{item.mobile}}
+
+
+
+
+
+ {{item.motto}}
+
+
+
+
\ No newline at end of file
diff --git a/subpages/associationNew/components/membersList/membersList.wxss b/subpages/associationNew/components/membersList/membersList.wxss
new file mode 100644
index 0000000..13e200d
--- /dev/null
+++ b/subpages/associationNew/components/membersList/membersList.wxss
@@ -0,0 +1,164 @@
+.hover-btn {
+ box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1);
+}
+.line {
+ width: 690rpx;
+ height: 2rpx;
+ margin: 0 auto;
+ background: rgba(240, 240, 240, 1);
+}
+.members-item{
+ background: rgba(255, 255, 255, 1);
+ margin-top: 20rpx;
+ position: relative;
+}
+.members-item .item-top{
+ width: 750rpx;
+ height: 130rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: left;
+ align-items: center;
+}
+.members-item .item-top .head-icon{
+ width: 90rpx;
+ height: 90rpx;
+ border-radius: 50%;
+ margin-left: 29rpx;
+}
+.members-item .item-top .user-name{
+ font-size: 32rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: rgba(0, 0, 0, 1);
+ margin-left: 20rpx;
+}
+.members-item .item-top .leader-logo{
+ width: 59rpx;
+ height: 28rpx;
+ margin-left: 8rpx;
+}
+.members-item .item-bottom{
+ height: 100rpx;
+ width: 750rpx;
+ position: relative;
+}
+.members-item .item-bottom .levelup-btn{
+ display: inline-block;
+ width: 180rpx;
+ height: 48rpx;
+ padding: 0;
+ position: relative;
+ border: none;
+ margin-left: 29rpx;
+ margin-top: 26rpx;
+}
+.members-item .item-bottom .takeout-btn{
+ display: inline-block;
+ width: 140rpx;
+ height: 48rpx;
+ padding: 0;
+ position: relative;
+ border: none;
+ z-index: 0;
+ margin-left: 20rpx;
+}
+.members-item .item-bottom .forbidden-btn{
+ display: inline-block;
+ width: 170rpx;
+ height: 48rpx;
+ padding: 0;
+ position: absolute;
+ z-index: 0;
+ margin-left: 20rpx;
+ right: 32rpx;
+ top: 26rpx;
+ border: 1rpx solid rgba(241, 86, 28, 1);
+ border-radius: 23rpx;
+}
+.levelup-btn image, .takeout-btn image, .forbidden-btn image, .call-btn image{
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+.forbidden-btn image{
+ width: 24rpx;
+ height: 14rpx;
+ position: absolute;
+ left: 135rpx;
+ top: 18rpx;
+}
+.levelup-btn text, .takeout-btn text{
+ font-size: 26rpx;
+ font-family: PingFang SC;
+ font-weight: bold;
+ color: rgba(255, 255, 255, 1);
+ z-index: 1;
+ position: absolute;
+ left: 25rpx;
+ top: 0;
+ height: 48rpx;
+ line-height: 48rpx;
+}
+.forbidden-btn text{
+ font-size: 26rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: rgba(242, 80, 27, 1);
+ z-index: 1;
+ position: absolute;
+ left: 28rpx;
+ top: 0;
+ height: 48rpx;
+ line-height: 48rpx;
+}
+.disForbidden-btn {
+ border: 1rpx solid rgba(170, 170, 170, 1) !important;
+}
+.disForbidden-btn text{
+ color: rgba(170, 170, 170, 1) !important;
+}
+
+.members-item .item-top .call-btn{
+ width: 156rpx;
+ height: 56rpx;
+ padding: 0;
+ position: absolute;
+ border: none;
+ right: 31rpx;
+}
+.members-item .item-top .np-info{
+ display: flex;
+ flex-direction: column;
+}
+.members-item .item-top .user-phone{
+ font-size: 32rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: rgba(240, 133, 38, 1);
+ margin-left: 20rpx;
+}
+.members-item .item-bottom2{
+ height: 100rpx;
+ width: 750rpx;
+ position: relative;
+ display: flex;
+ align-items: center;
+}
+.member-label{
+ margin-left: 30rpx;
+ margin-right: 37rpx;
+ font-size: 28rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: rgba(153, 153, 153, 1);
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap: break-word;
+ white-space: normal !important;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
diff --git a/subpages/associationNew/images/add.png b/subpages/associationNew/images/add.png
new file mode 100644
index 0000000..e8a088e
Binary files /dev/null and b/subpages/associationNew/images/add.png differ
diff --git a/subpages/associationNew/images/arrowd.png b/subpages/associationNew/images/arrowd.png
new file mode 100644
index 0000000..814bd49
Binary files /dev/null and b/subpages/associationNew/images/arrowd.png differ
diff --git a/subpages/associationNew/images/arrowd2.png b/subpages/associationNew/images/arrowd2.png
new file mode 100644
index 0000000..57e427d
Binary files /dev/null and b/subpages/associationNew/images/arrowd2.png differ
diff --git a/subpages/associationNew/images/btn1.png b/subpages/associationNew/images/btn1.png
new file mode 100644
index 0000000..e303889
Binary files /dev/null and b/subpages/associationNew/images/btn1.png differ
diff --git a/subpages/associationNew/images/btn2.png b/subpages/associationNew/images/btn2.png
new file mode 100644
index 0000000..3769d78
Binary files /dev/null and b/subpages/associationNew/images/btn2.png differ
diff --git a/subpages/associationNew/images/call.png b/subpages/associationNew/images/call.png
new file mode 100644
index 0000000..85994e3
Binary files /dev/null and b/subpages/associationNew/images/call.png differ
diff --git a/subpages/associationNew/images/leader-logo.png b/subpages/associationNew/images/leader-logo.png
new file mode 100644
index 0000000..a27b847
Binary files /dev/null and b/subpages/associationNew/images/leader-logo.png differ
diff --git a/subpages/associationNew/images/next.png b/subpages/associationNew/images/next.png
new file mode 100644
index 0000000..470884b
Binary files /dev/null and b/subpages/associationNew/images/next.png differ
diff --git a/subpages/associationNew/pages/associationlist/associationlist.js b/subpages/associationNew/pages/associationlist/associationlist.js
index 1d44a20..42bc126 100644
--- a/subpages/associationNew/pages/associationlist/associationlist.js
+++ b/subpages/associationNew/pages/associationlist/associationlist.js
@@ -1,18 +1,26 @@
// subpages/associationNew/pages/associationlist/associationlist.js
+import {
+ getPartyGroupList,
+ getJoinGroup
+} from '../../utils/api'
Page({
/**
* 页面的初始数据
*/
data: {
-
+ associationList: [],
+ loadMoreVisible: false,
+ loadMoreType: 'none',
+ pageNo: 1,
+ pageSize: 10
},
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function (options) {
-
+ onLoad: function () {
+ // this.getPartyGroupList();
},
/**
@@ -26,7 +34,10 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
-
+ this.setData({
+ associationList: []
+ })
+ this.getPartyGroupList()
},
/**
@@ -54,13 +65,46 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === 'loading') {
+ this.setData({
+ pageNo: this.data.pageNo + 1
+ })
+ this.getPartyGroupList()
+ }
},
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
+ //获取党群列表
+ getPartyGroupList () {
+ getPartyGroupList().then(res => {
+ console.log('获取党群列表', res)
+ this.setData({
+ associationList: [...this.data.associationList, ...res.data],
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading': 'none'
+ })
+ }).catch(err => {
+ console.log(err)
+ this.setData({
+ associationList: [],
+ loadMoreType: 'none'
+ })
+ })
+ },
+ //加入党群
+ getJoinGroup (pid) {
+ let parm = {
+ partyGroupId: pid
+ }
+ getJoinGroup(parm).then(res => {
+ console.log(res)
+ }).catch(err => {
+ console.log(err)
+ })
+ },
+ joinGroupCallBack (e) {
+ this.getJoinGroup(e.detail.partyGroupId);
}
-})
\ No newline at end of file
+})
diff --git a/subpages/associationNew/pages/associationlist/associationlist.json b/subpages/associationNew/pages/associationlist/associationlist.json
index ddf575b..1e1da6b 100644
--- a/subpages/associationNew/pages/associationlist/associationlist.json
+++ b/subpages/associationNew/pages/associationlist/associationlist.json
@@ -1,4 +1,7 @@
{
- "usingComponents": {},
+ "usingComponents": {
+ "load-more": "../../../../components/loadMore/loadMore",
+ "community-list": "../../components/communityList/communityList"
+ },
"navigationBarTitleText": "党群列表"
}
\ No newline at end of file
diff --git a/subpages/associationNew/pages/associationlist/associationlist.wxml b/subpages/associationNew/pages/associationlist/associationlist.wxml
index 4ed0294..4401062 100644
--- a/subpages/associationNew/pages/associationlist/associationlist.wxml
+++ b/subpages/associationNew/pages/associationlist/associationlist.wxml
@@ -1,2 +1,11 @@
-subpages/associationNew/pages/associationlist/associationlist.wxml
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subpages/associationNew/pages/associationlist/associationlist.wxss b/subpages/associationNew/pages/associationlist/associationlist.wxss
index 65bba42..575bdf7 100644
--- a/subpages/associationNew/pages/associationlist/associationlist.wxss
+++ b/subpages/associationNew/pages/associationlist/associationlist.wxss
@@ -1 +1,7 @@
-/* subpages/associationNew/pages/associationlist/associationlist.wxss */
\ No newline at end of file
+/* subpages/associationNew/pages/associationlist/associationlist.wxss */
+page {
+ width:100%;
+ height: auto;
+ overflow-y: auto;
+ background: #f7f7f7;
+}
\ No newline at end of file
diff --git a/subpages/associationNew/pages/community/community.js b/subpages/associationNew/pages/community/community.js
new file mode 100644
index 0000000..f8ba6ff
--- /dev/null
+++ b/subpages/associationNew/pages/community/community.js
@@ -0,0 +1,66 @@
+import { getImageUrl} from '../../utils/api'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ partyGroupId: '',
+ imageUrlList: [],
+ pageNo: 1,
+ pageSize: 10
+ },
+ onLoad: function (options) {
+ this.data.partyGroupId = options.code
+ getImageUrl().then(res => {
+ this.setData({
+ imageUrlList: [...res.data]
+ })
+ })
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ //跳转页面
+ navToGroupMembers (e) {
+ console.log(this.data.partyGroupId)
+ wx.navigateTo({
+ url: `/subpages/associationNew/pages/gMembersList/gMembersList?partyGroupId=${this.data.partyGroupId}`
+ })
+ },
+ navToNewPage (e) {
+ // console.log(e.currentTarget.dataset.page);
+ if (e.currentTarget.dataset.page === 'help') {
+ wx.navigateTo({
+ url: `/subpages/associationNew/pages/gOfficialsList/gOfficialsList?partyGroupId=${this.data.partyGroupId}`
+ })
+ } else if (e.currentTarget.dataset.page === 'gather') {
+ console.log('/subpages/associationNew/pages/community/community.js')
+ wx.navigateTo({
+ url: `#/话对捧个场`
+ })
+ } else if (e.currentTarget.dataset.page === 'applause') {
+ wx.navigateTo({
+ url: `#/事好鼓个掌`
+ })
+ }
+ }
+})
diff --git a/subpages/associationNew/pages/community/community.json b/subpages/associationNew/pages/community/community.json
new file mode 100644
index 0000000..a189f5f
--- /dev/null
+++ b/subpages/associationNew/pages/community/community.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "load-more": "../../../../components/loadMore/loadMore"
+ },
+ "navigationBarTitleText": "党群 1+1"
+}
\ No newline at end of file
diff --git a/subpages/associationNew/pages/community/community.wxml b/subpages/associationNew/pages/community/community.wxml
new file mode 100644
index 0000000..6d856ed
--- /dev/null
+++ b/subpages/associationNew/pages/community/community.wxml
@@ -0,0 +1,13 @@
+
diff --git a/subpages/associationNew/pages/community/community.wxss b/subpages/associationNew/pages/community/community.wxss
new file mode 100644
index 0000000..1a59e2d
--- /dev/null
+++ b/subpages/associationNew/pages/community/community.wxss
@@ -0,0 +1,49 @@
+page {
+ width:100%;
+ height: auto;
+ overflow-y: auto;
+ background: #f7f7f7;
+}
+.hover-btn {
+ box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1);
+}
+.community .func-top{
+ height: 94rpx;
+ width: 750rpx;
+ position: relative;
+ background: rgba(255, 255, 255, 1);
+}
+.community .func-top text{
+ height: 94rpx;
+ font-size: 32rpx;
+ font-family: PingFang SC;
+ font-weight: bold;
+ color: rgba(51, 51, 51, 1);
+ line-height: 94rpx;
+ position: absolute;
+ left: 29rpx;
+}
+.community .func-top .top-right{
+ width: 40rpx;
+ height: 94rpx;
+ padding: 0;
+ border: none;
+ position: absolute;
+ right: 34rpx;
+}
+.community .func-top .top-right image{
+ width: 18rpx;
+ height: 24rpx;
+ margin: 0;
+ position: absolute;
+ top: 30rpx;
+}
+.community .func-item{
+ width: 720rpx;
+ height: 270rpx;
+ margin: 0 auto;
+}
+.community .func-item image{
+ width: 100%;
+ height: 100%;
+}
\ No newline at end of file
diff --git a/subpages/associationNew/pages/gMembersList/gMembersList.js b/subpages/associationNew/pages/gMembersList/gMembersList.js
new file mode 100644
index 0000000..7b39c7e
--- /dev/null
+++ b/subpages/associationNew/pages/gMembersList/gMembersList.js
@@ -0,0 +1,124 @@
+import {
+ getPartyUserList,
+ postUserBanned,
+ postModifyIdentity,
+ getCurrentUserInfo
+} from '../../utils/api'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ currentUser: {},
+ gMembersList: [],
+ loadMoreVisible: false,
+ loadMoreType: 'none',
+ preloadVisible: true,
+ pageNo: 1,
+ pageSize: 10,
+ partyGroupId: ''
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.data.partyGroupId = options.partyGroupId
+ this.getCurrentUserInfo().then(res => {
+ if (res) {
+ this.getPartyUserList();
+ }
+ })
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === 'loading') {
+ this.setData({
+ pageNo: this.data.pageNo + 1
+ })
+ this.getPartyUserList()
+ }
+ },
+ //获取当前用户信息
+ getCurrentUserInfo () {
+ return new Promise ((resolve,reject) => {
+ getCurrentUserInfo (this.data.partyGroupId).then(res => {
+ console.log('获取当前用户信息', res)
+ this.setData({
+ currentUser: {...res.data}
+ })
+ resolve(true)
+ }).catch(err =>{
+ console.log(err)
+ this.data.currentUser = {}
+ reject(false)
+ })
+ })
+ },
+ // 获取群成员列表
+ getPartyUserList () {
+ const para = {
+ pageIndex: this.data.pageNo,
+ pageSize: this.data.pageSize,
+ partyGroupId: this.data.partyGroupId
+ }
+ getPartyUserList(para).then(res => {
+ console.log('获取群成员列表', res)
+ this.setData({
+ // currentUser: {...res.data.currentUser},
+ gMembersList: [...this.data.gMembersList, ...res.data],
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading': 'none',
+ preloadVisible: false
+ })
+ }).catch(err => {
+ console.log(err)
+ this.setData({
+ gMembersList: [],
+ loadMoreType: 'none',
+ preloadVisible: false
+ })
+ })
+ },
+ bannedChangeCallBack (e) {
+ console.log(e.detail)
+ const para = {...e.detail}
+ postUserBanned(para).then(res => {
+ console.log('用户禁言', res)
+ this.data.gMembersList = this.data.gMembersList.map( item => {
+ if (item.userId === e.detail.userId) {
+ item.bannedFlag = e.detail.bannedFlag
+ }
+ return item
+ })
+ this.setData({
+ gMembersList: this.data.gMembersList
+ })
+ }).catch(err => {
+ console.log(err)
+ })
+ },
+ modifyIdentityCallBack (e) {
+ console.log(e.detail)
+ const para = {...e.detail}
+ postModifyIdentity(para).then(res => {
+ console.log('修改用户身份', res)
+ this.getPartyUserList();
+ }).catch(err => {
+ console.log(err)
+ })
+ }
+})
diff --git a/subpages/associationNew/pages/gMembersList/gMembersList.json b/subpages/associationNew/pages/gMembersList/gMembersList.json
new file mode 100644
index 0000000..8c338b2
--- /dev/null
+++ b/subpages/associationNew/pages/gMembersList/gMembersList.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "load-more": "../../../../components/loadMore/loadMore",
+ "members-list": "../../components/membersList/membersList"
+ },
+ "navigationBarTitleText": "群成员"
+}
\ No newline at end of file
diff --git a/subpages/associationNew/pages/gMembersList/gMembersList.wxml b/subpages/associationNew/pages/gMembersList/gMembersList.wxml
new file mode 100644
index 0000000..198fdc0
--- /dev/null
+++ b/subpages/associationNew/pages/gMembersList/gMembersList.wxml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subpages/associationNew/pages/gMembersList/gMembersList.wxss b/subpages/associationNew/pages/gMembersList/gMembersList.wxss
new file mode 100644
index 0000000..575bdf7
--- /dev/null
+++ b/subpages/associationNew/pages/gMembersList/gMembersList.wxss
@@ -0,0 +1,7 @@
+/* subpages/associationNew/pages/associationlist/associationlist.wxss */
+page {
+ width:100%;
+ height: auto;
+ overflow-y: auto;
+ background: #f7f7f7;
+}
\ No newline at end of file
diff --git a/subpages/associationNew/pages/gOfficialsList/gOfficialsList.js b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.js
new file mode 100644
index 0000000..745e9d8
--- /dev/null
+++ b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.js
@@ -0,0 +1,69 @@
+import { getOfficialsList } from '../../utils/api'
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ partyGroupId: '',
+ gOfficialsList: [],
+ loadMoreVisible: false,
+ loadMoreType: 'none',
+ preloadVisible: true,
+ pageNo: 1,
+ pageSize: 10
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.data.partyGroupId = options.partyGroupId
+ this.getOfficialsList();
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.setData({
+ loadMoreVisible: true
+ })
+ if (this.data.loadMoreType === 'loading') {
+ this.setData({
+ pageNo: this.data.pageNo + 1
+ })
+ this.getOfficialsList()
+ }
+ },
+
+ // 官小带个长 列表
+ getOfficialsList () {
+ const para = {
+ pageIndex: this.data.pageNo,
+ pageSize: this.data.pageSize,
+ partyGroupId: this.data.partyGroupId
+ }
+ getOfficialsList(para).then(res => {
+ console.log('获取官小带个长列表', res)
+ this.setData({
+ gOfficialsList: [...this.data.gOfficialsList, ...res.data],
+ loadMoreType: res.data.length === this.data.pageSize ? 'loading': 'none',
+ preloadVisible: false
+ })
+ }).catch(err => {
+ console.log(err)
+ this.setData({
+ gOfficialsList: [],
+ loadMoreType: 'none',
+ preloadVisible: false
+ })
+ })
+ }
+})
diff --git a/subpages/associationNew/pages/gOfficialsList/gOfficialsList.json b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.json
new file mode 100644
index 0000000..8c338b2
--- /dev/null
+++ b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "load-more": "../../../../components/loadMore/loadMore",
+ "members-list": "../../components/membersList/membersList"
+ },
+ "navigationBarTitleText": "群成员"
+}
\ No newline at end of file
diff --git a/subpages/associationNew/pages/gOfficialsList/gOfficialsList.wxml b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.wxml
new file mode 100644
index 0000000..ebbdb96
--- /dev/null
+++ b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.wxml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/subpages/associationNew/pages/gOfficialsList/gOfficialsList.wxss b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.wxss
new file mode 100644
index 0000000..70a5b21
--- /dev/null
+++ b/subpages/associationNew/pages/gOfficialsList/gOfficialsList.wxss
@@ -0,0 +1,6 @@
+page {
+ width:100%;
+ height: auto;
+ overflow-y: auto;
+ background: #f7f7f7;
+}
\ No newline at end of file
diff --git a/subpages/associationNew/utils/api.js b/subpages/associationNew/utils/api.js
new file mode 100644
index 0000000..b22e0cc
--- /dev/null
+++ b/subpages/associationNew/utils/api.js
@@ -0,0 +1,66 @@
+const request = require('../../../utils/request')
+/**
+ *获取图片
+ */
+export function getImageUrl() {
+ return request.get('imgConfig/getImgUrl/1')
+}
+/**
+ *进入党群
+ */
+export function getJoinGroup({partyGroupId}) {
+ return request.get('partyGroup/group/join',{
+ partyGroupId
+ })
+}
+/**
+ *党群名称列表
+ */
+export function getPartyGroupList() {
+ return request.get('partyGroup/group/list')
+}
+/**
+ * 群成员列表
+ */
+export function getPartyUserList({pageIndex, pageSize, partyGroupId}) {
+ return request.get('partyGroup/user/list',{
+ pageIndex,
+ pageSize,
+ partyGroupId
+ })
+}
+/**
+ * 官小带个长列表
+ */
+export function getOfficialsList({pageIndex, pageSize, partyGroupId}) {
+ return request.get('partyGroup/officials/list',{
+ pageIndex,
+ pageSize,
+ partyGroupId
+ })
+}
+/**
+ * 当前用户信息
+ */
+export function getCurrentUserInfo(partyGroupId) {
+ return request.get('partyGroup/user/currentUserInfo/'+partyGroupId)
+}
+/**
+ * 用户身份修改
+ */
+export function postModifyIdentity({groupUserId, identityFlag}) {
+ return request.post('partyGroup/user/modifyIdentity',{
+ groupUserId,
+ identityFlag
+ })
+}
+/**
+ * 用户禁言
+ */
+export function postUserBanned({groupUserId, bannedFlag}) {
+ return request.post('partyGroup/user/banned',{
+ groupUserId,
+ bannedFlag
+ })
+}
+
diff --git a/subpages/associationNew/utils/filters.wxs b/subpages/associationNew/utils/filters.wxs
new file mode 100644
index 0000000..88accf4
--- /dev/null
+++ b/subpages/associationNew/utils/filters.wxs
@@ -0,0 +1,41 @@
+var GROUP_LEADER='0';
+var GROUP_LEADER_2='1';
+var GROUP_MEMBER='2';
+
+var getIdentity = function (btnType,mypower,userpower) {
+ if (btnType === 0) {
+ if (mypower === GROUP_LEADER && userpower === GROUP_MEMBER) {
+ return true
+ } else {
+ return false
+ }
+ } else if (btnType === 1) {
+ if (mypower === GROUP_LEADER && userpower === GROUP_LEADER_2) {
+ return true
+ } else {
+ return false
+ }
+ } else {
+ if (mypower === GROUP_LEADER && userpower !== GROUP_LEADER) {
+ return true
+ } else if (mypower === GROUP_LEADER_2 && userpower === GROUP_MEMBER) {
+ return true
+ } else {
+ return false
+ }
+ }
+}
+var getBanned = function (code) {
+ var index = parseInt(code)
+ return [
+ ' 未禁言',
+ '禁言1天',
+ '禁言1周',
+ '禁言1月',
+ '永久禁言'
+ ][index]
+}
+module.exports = {
+ getIdentity: getIdentity,
+ getBanned: getBanned
+}
\ No newline at end of file
diff --git a/utils/config.js b/utils/config.js
index b705e92..66f23bc 100644
--- a/utils/config.js
+++ b/utils/config.js
@@ -6,13 +6,14 @@ module.exports = {
};
function BASEURL() {
+ return 'https://eug-test.elinkit.com.cn/kc/epdc-api/api/' //党群1+1
// return 'https://eug-test.elinkit.com.cn/js/epdc-api/api/' // 锦水测试环境
// return 'https://eug-test.elinkit.com.cn/epdc-api/api/' // 测试环境 接口地址
// return "http://219.146.91.110:9094/epdc-api/api/" // 测试环境 ip接口地址
// return "https://epdc.elinkservice.cn/epdc-api/api/" // 正式环境 接口地址
// return 'https://epdc-app.qingdaoshibei.cn/epdc-api/api/' // 电政办 正式环境 接口地址
// return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 电政办 正式环境 接口地址
- return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
+ // return 'https://epdc-jinshui.elinkservice.cn/epdc-api/api/' // 锦水正式环境接口地址
}
function WEBROOT() {