mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-12 10:00:57 +08:00
5555
本地暂存
This commit is contained in:
commit
88a77b4bf3
1
app.json
1
app.json
@ -29,7 +29,6 @@
|
|||||||
"pages/viewComplaint/viewComplaint",
|
"pages/viewComplaint/viewComplaint",
|
||||||
"pages/payParkingFeeList/payParkingFeeList",
|
"pages/payParkingFeeList/payParkingFeeList",
|
||||||
"pages/payParkingFee/payParkingFee",
|
"pages/payParkingFee/payParkingFee",
|
||||||
"pages/my/myHouseDetail"
|
|
||||||
"pages/my/myHouseDetail",
|
"pages/my/myHouseDetail",
|
||||||
"pages/repair/repair2"
|
"pages/repair/repair2"
|
||||||
],
|
],
|
||||||
|
|||||||
BIN
images/login.png
BIN
images/login.png
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 4.4 KiB |
139
pages/activites/activites.js
Normal file
139
pages/activites/activites.js
Normal file
@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
})
|
||||||
24
pages/activites/activites.wxml
Normal file
24
pages/activites/activites.wxml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!--pages/activites/activites.wxml-->
|
||||||
|
<view class="act">
|
||||||
|
<block wx:for="{{activities}}" wx:key="index">
|
||||||
|
<navigator url="/pages/activitesDetail/activitesDetail?activitiesId={{item.activitiesId}}&title={{item.title}}&communityId={{item.communityId}}">
|
||||||
|
<view class="act_item">
|
||||||
|
<view class="act_img">
|
||||||
|
<image class="headImg" src="{{item.src}}"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="act_title">
|
||||||
|
<van-row>
|
||||||
|
<van-col span="18">
|
||||||
|
<text>{{item.title}}</text>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="4" offset="2">
|
||||||
|
<text>{{item.userName}}</text>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</navigator>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
</view>
|
||||||
33
pages/activites/activites.wxss
Normal file
33
pages/activites/activites.wxss
Normal file
@ -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;
|
||||||
|
}
|
||||||
@ -256,6 +256,7 @@ page {
|
|||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 150rpx;
|
height: 150rpx;
|
||||||
margin: 10rpx 20rpx 0rpx 20rpx;
|
margin: 10rpx 20rpx 0rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
.notices-info{
|
.notices-info{
|
||||||
margin: 10rpx 0rpx 0rpx 20rpx;
|
margin: 10rpx 0rpx 0rpx 20rpx;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user