From d9c1ff9eb13b5b1146f0cb5e6d82235d41ebe1dd Mon Sep 17 00:00:00 2001 From: lihenian <2629534615@qq.com> Date: Thu, 9 Jul 2020 15:11:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC1.4.13=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E7=A4=BE=E7=BE=A4=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/toRegister/toRegister.js | 2 +- project.config.json | 6 +++ .../communityList/communityList.wxml | 6 ++- .../communityList/communityList.wxss | 28 +++++++--- .../pages/associationlist/associationlist.js | 52 +++---------------- 5 files changed, 42 insertions(+), 52 deletions(-) diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js index ad1e25c..373e158 100644 --- a/pages/toRegister/toRegister.js +++ b/pages/toRegister/toRegister.js @@ -21,7 +21,7 @@ Page({ // } // }) let that = this - const versionNum = "1.4.12" + const versionNum = "1.4.13" 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 b41f7fd..7ffa9ec 100644 --- a/project.config.json +++ b/project.config.json @@ -88,6 +88,12 @@ "pathName": "subpages/home/pages/newsDetail/newsDetail", "query": "id=7c8bc749ff4b6380bf1d902c0bde0ba1", "scene": null + }, + { + "id": -1, + "name": "社群列表", + "pathName": "subpages/associationNew/pages/associationlist/associationlist", + "scene": null } ] } diff --git a/subpages/associationNew/components/communityList/communityList.wxml b/subpages/associationNew/components/communityList/communityList.wxml index 94859af..2b3e27a 100644 --- a/subpages/associationNew/components/communityList/communityList.wxml +++ b/subpages/associationNew/components/communityList/communityList.wxml @@ -9,7 +9,11 @@ {{item.partyGroupName}} - + + + \ No newline at end of file diff --git a/subpages/associationNew/components/communityList/communityList.wxss b/subpages/associationNew/components/communityList/communityList.wxss index 96c22f8..8de40e5 100644 --- a/subpages/associationNew/components/communityList/communityList.wxss +++ b/subpages/associationNew/components/communityList/communityList.wxss @@ -38,13 +38,29 @@ color: white; text-shadow: 2rpx 2rpx 0rpx #999; } +.btn-container { + width: 100%; + display: flex; + align-items: center; + justify-content: center; +} .community-item .cover-image .community-add{ - width: 150rpx; - height: 46rpx; - text-align: left; - padding: 0; - margin-top: 32rpx; - border: 0px; + height: 54rpx; + line-height: 54rpx; + color:#fff; + font-size: 28rpx; + text-align: center; + background: linear-gradient(to right, #fd3539, #fa695c); + border-radius: 27rpx; + box-sizing: content-box; + padding: 0; + margin: 0; + margin-top: 32rpx; + border: 0; + width: 240rpx; +} +.community-item .cover-image .hover-btn { + background: #cb0000; } .community-item .cover-image .community-add image{ width: 100%; diff --git a/subpages/associationNew/pages/associationlist/associationlist.js b/subpages/associationNew/pages/associationlist/associationlist.js index 08e1f9e..825a8c3 100644 --- a/subpages/associationNew/pages/associationlist/associationlist.js +++ b/subpages/associationNew/pages/associationlist/associationlist.js @@ -5,10 +5,6 @@ import { getImageUrl2 } from "../../utils/api" Page({ - - /** - * 页面的初始数据 - */ data: { associationList: [], loadMoreVisible: false, @@ -17,10 +13,6 @@ Page({ pageSize: 10, imageUrlList: [], }, - - /** - * 生命周期函数--监听页面加载 - */ onLoad: function () { // this.getPartyGroupList(); getImageUrl2().then(res => { @@ -29,48 +21,12 @@ Page({ }) }) }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ onShow: function () { this.setData({ associationList: [] }) this.getPartyGroupList() }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ onReachBottom: function () { this.setData({ loadMoreVisible: true @@ -87,6 +43,14 @@ Page({ getPartyGroupList () { getPartyGroupList().then(res => { console.log("获取党群列表", res) + const groupNameList = ["进入玫瑰苑社群", "进入玫瑰湖社群", "进入锦水园社群", "进入锦祥园社群"] + res.data.forEach((item, index) => { + if (index <= 3) { + item.groupName = groupNameList[index] + } else { + item.groupName = "进入社群" + } + }) this.setData({ associationList: [...this.data.associationList, ...res.data], loadMoreType: res.data.length === this.data.pageSize ? "loading": "none"