加入小区文化

This commit is contained in:
wuxw 2020-02-23 19:43:36 +08:00
parent 4df3c49d63
commit 531024fcb1
2 changed files with 132 additions and 39 deletions

View File

@ -4,8 +4,8 @@
* add by wuxw 2019-12-28 * add by wuxw 2019-12-28
*/ */
// 服务器域名 // 服务器域名
const baseUrl = 'https://app.demo.winqi.cn/'; //const baseUrl = 'https://app.demo.winqi.cn/';
//const baseUrl = '/'; const baseUrl = '/';
const hcBaseUrl = 'https://hc.demo.winqi.cn'; // 登录接口 const hcBaseUrl = 'https://hc.demo.winqi.cn'; // 登录接口
const loginUrl = baseUrl + 'app/loginProperty'; const loginUrl = baseUrl + 'app/loginProperty';

View File

@ -30,22 +30,26 @@
<text class="lg text-gray cuIcon-more"></text> <text class="lg text-gray cuIcon-more"></text>
</view> </view>
</view> </view>
<view class="cu-list menu-avatar"> <view class="noticesList">
<view class="cu-item"> <block v-for="(item,index) in activitys" :key="index" wx:key="index">
<view class="cu-avatar radius lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg);"></view>
<view class="content"> <view class="noticesList-list" >
<view class="text-grey">凯尔</view> <view class="notices-info">
<view class="text-gray text-sm flex"> <view class="notices-info-name">{{item.title}}</view>
<view class="text-cut">
<text class="cuIcon-infofill text-red margin-right-xs"></text> <view class="notice-bottom">
我已天理为凭踏入这片荒芜不再受凡人的枷锁遏制我已天理为凭踏入这片荒芜不再受凡人的枷锁遏制 <view>
</view> </view> <text class="lg text-gray cuIcon-time"></text>
</view> <text class="notice-startTime">{{item.startTime}}</text>
<view class="action"> </view>
<view class="text-grey text-xs">22:20</view> </view>
</view> </view>
</view> <view class="notices-info-image">
</view> <image :src="item.src" />
</view>
</view>
</block>
</view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
@ -60,55 +64,46 @@
cuIconList: [{ cuIconList: [{
cuIcon: 'cardboardfill', cuIcon: 'cardboardfill',
color: 'red', color: 'red',
badge: 120, badge: 0,
name: 'VR' name: '维修单'
}, { }, {
cuIcon: 'recordfill', cuIcon: 'recordfill',
color: 'orange', color: 'orange',
badge: 1, badge: 1,
name: '录像' name: '审核维修'
}, { }, {
cuIcon: 'picfill', cuIcon: 'picfill',
color: 'yellow', color: 'yellow',
badge: 0, badge: 0,
name: '图像' name: '投诉单'
}, { }, {
cuIcon: 'noticefill', cuIcon: 'noticefill',
color: 'olive', color: 'olive',
badge: 22, badge: 22,
name: '通知' name: '审核投诉'
}, { }, {
cuIcon: 'upstagefill', cuIcon: 'upstagefill',
color: 'cyan', color: 'cyan',
badge: 0, badge: 0,
name: '排行榜' name: '巡检打卡'
}, { }, {
cuIcon: 'clothesfill', cuIcon: 'clothesfill',
color: 'blue', color: 'blue',
badge: 0, badge: 0,
name: '皮肤' name: '公告'
}, { }, {
cuIcon: 'discoverfill', cuIcon: 'discoverfill',
color: 'purple', color: 'purple',
badge: 0, badge: 0,
name: '发现' name: '停车收费'
}, { }, {
cuIcon: 'questionfill', cuIcon: 'questionfill',
color: 'mauve', color: 'mauve',
badge: 0, badge: 0,
name: '帮助' name: '采购管理'
}, {
cuIcon: 'commandfill',
color: 'purple',
badge: 0,
name: '问答'
}, {
cuIcon: 'brandfill',
color: 'mauve',
badge: 0,
name: '版权'
}], }],
swiperList: [] swiperList: [],
activitys:[]
} }
}, },
onLoad() { onLoad() {
@ -177,7 +172,7 @@
_that.swiperList = _aPhotos; _that.swiperList = _aPhotos;
console.log(_that.swiperList); console.log(_that.swiperList);
_that._loadActivitys();
return; return;
} }
wx.showToast({ wx.showToast({
@ -194,7 +189,48 @@
}) })
} }
}); });
},
_loadActivitys:function(){
let _that = this;
let _objData = {
page:1,
row:5,
communityId:this.currentCommunityId
};
_that.java110Context.request({
url: _that.java110Constant.url.listActivitiess,
header: _that.java110Context.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 = _that.java110Constant.url.filePath + "?fileId=" + _item.headerImg +"&communityId="+_that.currentCommunityId+"&time="+new Date();
_acts.push(_item);
});
_that.activitys = _acts;
console.log('小区文化',_that.activitys);
return;
}
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
})
},
fail: function (e) {
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
})
}
});
} }
} }
@ -206,6 +242,63 @@
height: 240upx; height: 240upx;
min-height: 240upx; min-height: 240upx;
} }
.noticesList{
background-color: #FFFFFF;
}
.noticesList-list{
font-size: 25rpx;
display: flex;
width: 100%;
padding: 10rpx 0;
border-bottom: 1rpx solid #ECECEC;
color: #6D6D6D;
justify-content: space-between;
}
.notices-info-name{
margin-top: 10rpx;
color: black;
font-size: 30rpx;
display: -webkit-box; /*设置为弹性盒子*/
-webkit-line-clamp: 2; /*最多显示5行*/
overflow: hidden; /*超出隐藏*/
text-overflow: ellipsis; /*超出显示为省略号*/
-webkit-box-orient: vertical;
word-break: break-all; /*强制英文单词自动换行*/
}
.notices-info-image image{
width: 200rpx;
height: 150rpx;
margin: 10rpx 20rpx 0rpx 20rpx;
border-radius: 10rpx;
}
.notices-info{
margin: 10rpx 0rpx 0rpx 20rpx;
height: 150rpx;
flex-direction: column;
display: flex;
justify-content: space-between;
}
.notice-bottom{
display: flex;
text-align: left;
}
.notice-bottom view{
margin-right: 20rpx;
}
.notice-bottom icon{
color: #8a8a8a;
display: inline-block;
width: 40rpx;
height: 40rpx;
}
.notice-bottom view text{
font-size: 25rpx;
line-height: 40rpx;
}
.notice-startTime{
margin-left: 16upx;
}