mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-26 08:16:47 +08:00
小程序首页 广告功能 小区文化功能开发测试完成
This commit is contained in:
parent
4ad292c0b4
commit
50709d8a4e
@ -9,6 +9,7 @@
|
||||
// 服务器域名
|
||||
const baseUrl = 'https://app.demo.winqi.cn/';
|
||||
//const baseUrl = 'http://hc.demo.winqi.cn:8012/';
|
||||
const hcBaseUrl = 'https://hc.demo.winqi.cn';
|
||||
|
||||
// 登录接口
|
||||
const loginUrl = baseUrl + 'app/loginWx';
|
||||
@ -56,9 +57,9 @@ const applyVisitorApplicationKey = baseUrl + "app/applicationKey.applyVisitorApp
|
||||
//上传业主照片
|
||||
const uploadOwnerPhoto = baseUrl +"app/owner.uploadOwnerPhoto";
|
||||
|
||||
const getOwnerPhotoPath = "https://hc.demo.winqi.cn/callComponent/download/getFile/fileByObjId";
|
||||
const getOwnerPhotoPath = hcBaseUrl +"/callComponent/download/getFile/fileByObjId";
|
||||
|
||||
const filePath = "https://hc.demo.winqi.cn/callComponent/download/getFile/file";
|
||||
const filePath = hcBaseUrl +"/callComponent/download/getFile/file";
|
||||
|
||||
//查询业主车位信息
|
||||
const queryParkingSpacesByOwner = baseUrl+"app/parkingSpace.queryParkingSpacesByOwner";
|
||||
@ -72,13 +73,17 @@ const preOrder = baseUrl +"/app/payment/toPay";
|
||||
//查询小区
|
||||
const listCommunitys = baseUrl + "/app/community.listCommunitys";
|
||||
//查询小区文化
|
||||
const listActivitiess = baseUrl + "/app/activities.listActivitiess"
|
||||
const listActivitiess = baseUrl + "/app/activities.listActivitiess";
|
||||
|
||||
//查询小区广告
|
||||
const listAdvertPhoto = baseUrl +"/app/advert.listAdvertPhoto";
|
||||
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
baseUrl: baseUrl,
|
||||
hcBaseUrl: hcBaseUrl,
|
||||
loginUrl: loginUrl,
|
||||
areaUrl: areaUrl,
|
||||
GetNoticeListUrl: GetNoticeListUrl,
|
||||
@ -103,5 +108,6 @@ module.exports = {
|
||||
preOrder: preOrder,
|
||||
listCommunitys: listCommunitys,
|
||||
listActivitiess: listActivitiess,
|
||||
filePath: filePath
|
||||
filePath: filePath,
|
||||
listAdvertPhoto: listAdvertPhoto
|
||||
};
|
||||
@ -9,15 +9,7 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
communityId:'',
|
||||
ad: [{
|
||||
imageUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1573966727205&di=66965e182c0d2efd0818a7d9b8c2629a&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2Fcf482ffb4f3fc6d941664e1cba8ca3ca6e9c0a9443f84-AsGU9b_fw658",
|
||||
url: "http://www.homecommunity.cn/"
|
||||
},
|
||||
{
|
||||
imageUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1573966727205&di=66965e182c0d2efd0818a7d9b8c2629a&imgtype=0&src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2Fcf482ffb4f3fc6d941664e1cba8ca3ca6e9c0a9443f84-AsGU9b_fw658",
|
||||
url: "http://www.homecommunity.cn/"
|
||||
}
|
||||
],
|
||||
ad: [],
|
||||
notices: [
|
||||
],
|
||||
categoryList: {
|
||||
@ -146,6 +138,9 @@ Page({
|
||||
//查询小区文化
|
||||
_that._loadActivites();
|
||||
|
||||
//查询小区广告
|
||||
_that._loadCommunityAdvertPhoto();
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
@ -280,6 +275,50 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
_loadCommunityAdvertPhoto:function(){
|
||||
let _that = this;
|
||||
let _objData = {
|
||||
page: 1,
|
||||
row: 5,
|
||||
communityId: this.data.communityId
|
||||
};
|
||||
context.request({
|
||||
url: constant.url.listAdvertPhoto,
|
||||
header: context.getHeaders(),
|
||||
method: "GET",
|
||||
data: _objData, //动态数据
|
||||
success: function (res) {
|
||||
console.log("请求返回信息:", res);
|
||||
if (res.statusCode == 200) {
|
||||
|
||||
let _advertPhotos = res.data;
|
||||
let _aPhotos = [];
|
||||
_advertPhotos.forEach(function (_item) {
|
||||
_item.url = constant.url.hcBaseUrl + _item.url + "&time=" + new Date();
|
||||
_aPhotos.push(_item);
|
||||
});
|
||||
|
||||
_that.setData({
|
||||
ad: _aPhotos
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
fail: function (e) {
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
_moreActivities:function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/activites/activites',
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
<swiper class="ad-swiper" indicator-dots="true" indicator-color="rgba(228,228,228,1)" indicator-active-color="#FECA49" autoplay='true' interval='5000' duration='1000' circular='true'>
|
||||
<block wx:for="{{ad}}" wx:key="index">
|
||||
<swiper-item>
|
||||
<image src="{{item.imageUrl}}"></image>
|
||||
<image src="{{item.url}}"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user