优化信息大类问题

This commit is contained in:
wuxw 2020-10-04 22:02:53 +08:00
parent 4a0f5cb1ea
commit aad94f758a
3 changed files with 53 additions and 29 deletions

View File

@ -16,28 +16,28 @@ import {dateTimeStringToDateString} from '../../utils/DateUtil.js'
/**
* 查询活动列表
*/
export function getActivitiTitle() {
return [{
typeCd: '10003',
name: '公共安全及消防'
},
{
typeCd: '10004',
name: '政务及党政'
},
{
typeCd: '10005',
name: '费用公开'
},
{
typeCd: '10001',
name: '小区文化'
},
{
typeCd: '10002',
name: '其他'
}
];
export function getActivitiTitle(dataObj) {
return new Promise(
(resolve, reject) => {
requestNoAuth({
url: url.queryActivitiesType,
method: "GET",
data: dataObj,
//动态数据
success: function(res) {
if (res.statusCode == 200) {
let _activites = res.data.data;
resolve(_activites);
return;
}
reject();
},
fail: function(e) {
reject();
}
});
})
}
/**

View File

@ -90,6 +90,7 @@ export default {
toOweFeePay: baseUrl + "app/payment/toOweFeePay", //欠费缴费
queryRentingPool: baseUrl + 'app/renting/queryRentingPool',
saveRentingAppointment: baseUrl + 'app/rentingAppointment/saveRentingAppointment', //房屋预约
queryActivitiesType: baseUrl +'app/activitiesType/queryActivitiesType',
NEED_NOT_LOGIN_PAGE: [
'/pages/login/login',
'/pages/register/register',

View File

@ -40,7 +40,7 @@
<scroll-view scroll-x class="bg-white nav" scroll-with-animation :scroll-left="scrollLeft">
<view class="cu-item" :class="item.typeCd==curTypeCd?'text-green cur':''" v-for="(item,index) in activitiTitle"
:key="index" @tap="selectActiviti(item)" :data-id="index">
{{item.name}}
{{item.typeName}}
</view>
</scroll-view>
<view class="noticesList bg-white margin-top-1">
@ -103,7 +103,7 @@
page: 1,
row: 7,
activitiTitle: [],
curTypeCd: '10003',
curTypeCd: '',
categoryList: {},
selected: 0,
mask1Hidden: true,
@ -124,10 +124,7 @@
*/
onLoad: function(options) {
let _that = this;
this.vc.onLoad(options);
//
this.activitiTitle = getActivitiTitle();
this.vc.onLoad(options);
//
this.categoryList = getCategoryList();
},
@ -170,9 +167,32 @@
.then(function(_communityInfo){
_that.communityId = _communityInfo.communityId;
//
_that._loadActivites();
_that._loadAdvertPhoto();
})
.then(function(){
_that._loadActivitiesType();
})
},
_loadActivitiesType:function(){
let _that = this;
let _objData = {
page: 1,
row: 10,
communityId: _that.communityId,
defaultShow:'Y'
};
//
getActivitiTitle(_objData)
.then((actType)=>{
_that.activitiTitle = actType;
})
.then((acts)=>{
if(_that.activitiTitle.length > 0){
_that.curTypeCd = _that.activitiTitle[0].typeCd;
}
_that._loadActivites();
})
},
judgeBindOwnerFun: function() {
//
@ -185,6 +205,9 @@
*/
_loadActivites: function() {
let _that = this;
if(this.curTypeCd == ''){
return ;
}
let _objData = {
page: this.page,
row: this.row,