diff --git a/app.json b/app.json index 890c67c..8886fec 100644 --- a/app.json +++ b/app.json @@ -29,7 +29,6 @@ "pages/viewComplaint/viewComplaint", "pages/payParkingFeeList/payParkingFeeList", "pages/payParkingFee/payParkingFee", - "pages/my/myHouseDetail" "pages/my/myHouseDetail", "pages/repair/repair2" ], diff --git a/images/login.png b/images/login.png index 111d637..607a52c 100644 Binary files a/images/login.png and b/images/login.png differ diff --git a/pages/activites/activites.js b/pages/activites/activites.js new file mode 100644 index 0000000..54d60ae --- /dev/null +++ b/pages/activites/activites.js @@ -0,0 +1,139 @@ +// pages/activites/activites.js +const context = require("../../context/Java110Context.js"); +const constant = context.constant; +const util = context.util; +Page({ + + /** + * 页面的初始数据 + */ + data: { + activities:[] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let _that = this; + context.getOwner(function (_owner) { + let _communityId = ''; + if (_owner == null) { + _communityId = '7020181217000001' + } else { + _communityId = _owner.communityId; + } + _that.setData({ + communityId: _communityId + }); + + //查询小区文化 + _that._loadActivites(); + + + }); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + /** + * 加载活动 + * 第一次加载是可能没有小区 则直接下载固定小区 + * + */ + _loadActivites: function () { + let _that = this; + let _objData = { + page: 1, + row: 15, + communityId: this.data.communityId + }; + context.request({ + url: constant.url.listActivitiess, + header: context.getHeaders(), + method: "GET", + data: _objData, //动态数据 + success: function (res) { + console.log("请求返回信息:", res); + if (res.statusCode == 200) { + + let _activites = res.data.activitiess; + let _acts = []; + _activites.forEach(function (_item) { + _item.src = constant.url.filePath + "?fileId=" + _item.headerImg + "&communityId=" + _that.data.communityId + "&time=" + new Date(); + let _startTime = _item.startTime.replace(/\-/g, "/") + let _tmpStartTime = new Date(_startTime); + + _item.startTime = util.date.formatDate(_tmpStartTime); + _acts.push(_item); + }); + + + _that.setData({ + activities: _acts + }); + + return; + } + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + }, + fail: function (e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }); + }, +}) \ No newline at end of file diff --git a/pages/activites/activites.wxml b/pages/activites/activites.wxml new file mode 100644 index 0000000..eed9371 --- /dev/null +++ b/pages/activites/activites.wxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + {{item.title}} + + + {{item.userName}} + + + + + + + + \ No newline at end of file diff --git a/pages/activites/activites.wxss b/pages/activites/activites.wxss new file mode 100644 index 0000000..ce2de14 --- /dev/null +++ b/pages/activites/activites.wxss @@ -0,0 +1,33 @@ +/* .act{ + background-color: #fff; +} */ + +.act .act_item{ + background-color: #fff; + margin: 30rpx 0rpx; + padding: 30rpx 20rpx 15rpx 20rpx; +} + +.act .act_item .headImg{ + border-top-left-radius: 20rpx; + border-top-right-radius: 20rpx; + width: 100%; + height: 400rpx; +} + +.act .act_title{ + margin-top: 10rpx; + width: 100%; + overflow: hidden; +} + +.act .act_title van-col view{ + overflow: hidden; +} + +.act .act_title text{ + overflow: hidden; + font-size: 28rpx; + white-space:nowrap; + text-overflow: ellipsis; +} diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 2aef59e..ca3791c 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -256,6 +256,7 @@ page { width: 200rpx; height: 150rpx; margin: 10rpx 20rpx 0rpx 20rpx; + border-radius: 10rpx; } .notices-info{ margin: 10rpx 0rpx 0rpx 20rpx; diff --git a/project.config.json b/project.config.json index 0c1e2a6..376bbf5 100644 --- a/project.config.json +++ b/project.config.json @@ -1,13 +1,13 @@ { "description": "项目配置文件。", - "packOptions": { - "ignore": [ - { - "type": "folder", - "value": "readme" - } - ] - }, + "packOptions": { + "ignore": [ + { + "type": "folder", + "value": "readme" + } + ] + }, "setting": { "urlCheck": false, "es6": true,