优化信息大类问题

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() { export function getActivitiTitle(dataObj) {
return [{
typeCd: '10003', return new Promise(
name: '公共安全及消防' (resolve, reject) => {
}, requestNoAuth({
{ url: url.queryActivitiesType,
typeCd: '10004', method: "GET",
name: '政务及党政' data: dataObj,
}, //动态数据
{ success: function(res) {
typeCd: '10005', if (res.statusCode == 200) {
name: '费用公开' let _activites = res.data.data;
}, resolve(_activites);
{ return;
typeCd: '10001',
name: '小区文化'
},
{
typeCd: '10002',
name: '其他'
} }
]; reject();
},
fail: function(e) {
reject();
}
});
})
} }
/** /**

View File

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

View File

@ -40,7 +40,7 @@
<scroll-view scroll-x class="bg-white nav" scroll-with-animation :scroll-left="scrollLeft"> <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" <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"> :key="index" @tap="selectActiviti(item)" :data-id="index">
{{item.name}} {{item.typeName}}
</view> </view>
</scroll-view> </scroll-view>
<view class="noticesList bg-white margin-top-1"> <view class="noticesList bg-white margin-top-1">
@ -103,7 +103,7 @@
page: 1, page: 1,
row: 7, row: 7,
activitiTitle: [], activitiTitle: [],
curTypeCd: '10003', curTypeCd: '',
categoryList: {}, categoryList: {},
selected: 0, selected: 0,
mask1Hidden: true, mask1Hidden: true,
@ -125,9 +125,6 @@
onLoad: function(options) { onLoad: function(options) {
let _that = this; let _that = this;
this.vc.onLoad(options); this.vc.onLoad(options);
//
this.activitiTitle = getActivitiTitle();
// //
this.categoryList = getCategoryList(); this.categoryList = getCategoryList();
}, },
@ -170,9 +167,32 @@
.then(function(_communityInfo){ .then(function(_communityInfo){
_that.communityId = _communityInfo.communityId; _that.communityId = _communityInfo.communityId;
// //
_that._loadActivites();
_that._loadAdvertPhoto(); _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() { judgeBindOwnerFun: function() {
// //
@ -185,6 +205,9 @@
*/ */
_loadActivites: function() { _loadActivites: function() {
let _that = this; let _that = this;
if(this.curTypeCd == ''){
return ;
}
let _objData = { let _objData = {
page: this.page, page: this.page,
row: this.row, row: this.row,