|
|
@ -8,9 +8,13 @@ |
|
|
:extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" |
|
|
:extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" |
|
|
:extra-active-icon="{name:'arrow-up-fill',color:'#fff',size:'26rpx'}" :defaultValue="defaultValue" |
|
|
:extra-active-icon="{name:'arrow-up-fill',color:'#fff',size:'26rpx'}" :defaultValue="defaultValue" |
|
|
:custom-style="{padding: '0 30rpx'}" @click="selectMenu"> |
|
|
:custom-style="{padding: '0 30rpx'}" @click="selectMenu"> |
|
|
<uv-drop-down-item name="order" type="2" :label="dropItem('order').label" :value="dropItem('order').value"> |
|
|
|
|
|
|
|
|
<uv-drop-down-item name="state" type="2" :label="dropItem('state').label" :value="dropItem('state').value"> |
|
|
</uv-drop-down-item> |
|
|
</uv-drop-down-item> |
|
|
<uv-drop-down-item name="type" type="2" :label="dropItem('type').label" :value="dropItem('type').value"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<uv-drop-down-item name="address" type="2" :label="dropItem('address').label" :value="dropItem('address').value"> |
|
|
|
|
|
</uv-drop-down-item> |
|
|
|
|
|
|
|
|
|
|
|
<uv-drop-down-item name="date" type="1" :label="dropItem('date').label" :value="dropItem('date').value"> |
|
|
</uv-drop-down-item> |
|
|
</uv-drop-down-item> |
|
|
<!-- <uv-drop-down-item name="type" type="2" :label="dropItem('type').label" :value="dropItem('type').value"> |
|
|
<!-- <uv-drop-down-item name="type" type="2" :label="dropItem('type').label" :value="dropItem('type').value"> |
|
|
</uv-drop-down-item> --> |
|
|
</uv-drop-down-item> --> |
|
|
@ -39,6 +43,10 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> --> |
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
|
|
<uv-calendars ref="calendars" |
|
|
|
|
|
@close="closeCalendars" |
|
|
|
|
|
@confirm="confirmCalendars" /> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
@ -93,24 +101,20 @@ |
|
|
status:"loading", |
|
|
status:"loading", |
|
|
bgColor:'transparent', |
|
|
bgColor:'transparent', |
|
|
// 表示value等于这些值,就属于默认值 |
|
|
// 表示value等于这些值,就属于默认值 |
|
|
defaultValue: ['', 'all', '0'], |
|
|
|
|
|
|
|
|
defaultValue: ['-1', 'all', 'allAddress'], |
|
|
// 筛选结果 |
|
|
// 筛选结果 |
|
|
result: [{ |
|
|
|
|
|
name: 'order', |
|
|
|
|
|
label: '全部', |
|
|
|
|
|
value: '' |
|
|
|
|
|
}], |
|
|
|
|
|
|
|
|
result: [], |
|
|
// { name: 'order', label: '最新发布', value: 'new' } |
|
|
// { name: 'order', label: '最新发布', value: 'new' } |
|
|
activeName: 'order', |
|
|
|
|
|
order: { |
|
|
|
|
|
|
|
|
activeName: 'state', |
|
|
|
|
|
state: { |
|
|
label: '全部', |
|
|
label: '全部', |
|
|
value: '', |
|
|
|
|
|
|
|
|
value: '-1', |
|
|
activeIndex: 0, |
|
|
activeIndex: 0, |
|
|
color: '#333', |
|
|
|
|
|
|
|
|
color: '#999', |
|
|
activeColor: '#FF4546', |
|
|
activeColor: '#FF4546', |
|
|
child: [{ |
|
|
child: [{ |
|
|
label: '全部', |
|
|
label: '全部', |
|
|
value: '' |
|
|
|
|
|
|
|
|
value: '-1' |
|
|
},{ |
|
|
},{ |
|
|
label: '报名中', |
|
|
label: '报名中', |
|
|
value: '0' |
|
|
value: '0' |
|
|
@ -119,41 +123,64 @@ |
|
|
value: '1' |
|
|
value: '1' |
|
|
}] |
|
|
}] |
|
|
}, |
|
|
}, |
|
|
type: { |
|
|
|
|
|
|
|
|
date: { |
|
|
label: '时间', |
|
|
label: '时间', |
|
|
value: 'all', |
|
|
value: 'all', |
|
|
activeIndex: 0, |
|
|
activeIndex: 0, |
|
|
color: '#333', |
|
|
|
|
|
|
|
|
color: '#999', |
|
|
activeColor: '#FF4546', |
|
|
activeColor: '#FF4546', |
|
|
child: [{ |
|
|
|
|
|
label: '全部', |
|
|
|
|
|
value: 'all' |
|
|
|
|
|
}, { |
|
|
|
|
|
label: 'PDF', |
|
|
|
|
|
value: 'pdf' |
|
|
|
|
|
}, { |
|
|
|
|
|
label: 'WROD', |
|
|
|
|
|
value: 'word' |
|
|
|
|
|
}, { |
|
|
|
|
|
label: 'PPT', |
|
|
|
|
|
value: 'ppt' |
|
|
|
|
|
}] |
|
|
|
|
|
|
|
|
child: [ |
|
|
|
|
|
{ |
|
|
|
|
|
label: '时间', |
|
|
|
|
|
value: 'all' |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
|
|
|
address: { |
|
|
|
|
|
label: '全部地区', |
|
|
|
|
|
value: 'allAddress', |
|
|
|
|
|
activeIndex: 0, |
|
|
|
|
|
color: '#999', |
|
|
|
|
|
activeColor: '#FF4546', |
|
|
|
|
|
child: [ |
|
|
|
|
|
{ |
|
|
|
|
|
label: '全部地区', |
|
|
|
|
|
value: 'allAddress' |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
}, |
|
|
}, |
|
|
totalPage:0, |
|
|
totalPage:0, |
|
|
cardListData:[], |
|
|
cardListData:[], |
|
|
params:{ |
|
|
params:{ |
|
|
state:'', |
|
|
|
|
|
|
|
|
state : '', |
|
|
pageNo:1, |
|
|
pageNo:1, |
|
|
pageSize:10 |
|
|
pageSize:10 |
|
|
}, |
|
|
}, |
|
|
|
|
|
isC : false, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad() { |
|
|
onLoad() { |
|
|
this.getActivityPageList() |
|
|
this.getActivityPageList() |
|
|
|
|
|
this.getArea() |
|
|
|
|
|
}, |
|
|
|
|
|
onPullDownRefresh() { |
|
|
|
|
|
this.params.pageNo = 1 |
|
|
|
|
|
this.cardListData = [] |
|
|
|
|
|
this.getActivityPageList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getActivityPageList() { |
|
|
getActivityPageList() { |
|
|
this.$api('activityPageList',this.params,res=>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
...this.params |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.result.forEach(n => { |
|
|
|
|
|
params[n.name] = n.value |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.$api('activityPageList', params, res=>{ |
|
|
|
|
|
uni.stopPullDownRefresh() |
|
|
if(res.code == 200) { |
|
|
if(res.code == 200) { |
|
|
this.totalPage = res.result.pages |
|
|
this.totalPage = res.result.pages |
|
|
this.cardListData = [...this.cardListData,...res.result.records] |
|
|
this.cardListData = [...this.cardListData,...res.result.records] |
|
|
@ -165,6 +192,18 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
getArea(){ |
|
|
|
|
|
this.$api('getArea', res => { |
|
|
|
|
|
if(res.code == 200){ |
|
|
|
|
|
res.result.forEach(n => { |
|
|
|
|
|
this.address.child.push({ |
|
|
|
|
|
label: n.city, |
|
|
|
|
|
value: n.id |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
change(e) { |
|
|
change(e) { |
|
|
console.log('弹窗打开状态:', e); |
|
|
console.log('弹窗打开状态:', e); |
|
|
}, |
|
|
}, |
|
|
@ -177,11 +216,7 @@ |
|
|
this.activeName = name; |
|
|
this.activeName = name; |
|
|
// type 等于1 的需要特殊处理:type不等于1可以忽略 |
|
|
// type 等于1 的需要特殊处理:type不等于1可以忽略 |
|
|
if (type == 1) { |
|
|
if (type == 1) { |
|
|
this.clickItem({ |
|
|
|
|
|
name: 'vip_type', |
|
|
|
|
|
label: 'VIP文档', |
|
|
|
|
|
value: e.active ? 1 : 0 |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
this.$refs.calendars.open() |
|
|
} else { |
|
|
} else { |
|
|
const find = this.result.find(item => item.name == this.activeName); |
|
|
const find = this.result.find(item => item.name == this.activeName); |
|
|
if (find) { |
|
|
if (find) { |
|
|
@ -200,9 +235,9 @@ |
|
|
value |
|
|
value |
|
|
} = e; |
|
|
} = e; |
|
|
const findIndex = this.result.findIndex(item => item.name == this.activeName); |
|
|
const findIndex = this.result.findIndex(item => item.name == this.activeName); |
|
|
// if (this.defaultValue.indexOf(value) > -1 && this[this.activeName].label) { |
|
|
|
|
|
// label = this[this.activeName].label; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
if (this.defaultValue.indexOf(value) > -1 && this[this.activeName].label) { |
|
|
|
|
|
label = this[this.activeName].label; |
|
|
|
|
|
} |
|
|
// // 已经存在筛选项 |
|
|
// // 已经存在筛选项 |
|
|
if (findIndex > -1) { |
|
|
if (findIndex > -1) { |
|
|
this.$set(this.result, findIndex, { |
|
|
this.$set(this.result, findIndex, { |
|
|
@ -217,12 +252,29 @@ |
|
|
value |
|
|
value |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
let stateInfo = this.result.find(item=>item.name == 'order') |
|
|
|
|
|
this.params.state = stateInfo.value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.result = this.result.filter(item => this.defaultValue.indexOf(item.value) == -1); |
|
|
|
|
|
|
|
|
this.params.pageNo = 1 |
|
|
this.params.pageNo = 1 |
|
|
this.cardListData = [] |
|
|
this.cardListData = [] |
|
|
this.getActivityPageList() |
|
|
this.getActivityPageList() |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
confirmCalendars(e){ |
|
|
|
|
|
this.isC = true |
|
|
|
|
|
this.clickItem({ |
|
|
|
|
|
name: 'date', |
|
|
|
|
|
label: e.fulldate, |
|
|
|
|
|
value: e.fulldate |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
closeCalendars(){ |
|
|
|
|
|
if(this.isC) return this.isC = false |
|
|
|
|
|
this.clickItem({ |
|
|
|
|
|
name: 'date', |
|
|
|
|
|
label: 'all', |
|
|
|
|
|
value: 'all' |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
@ -235,6 +287,7 @@ |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
} |
|
|
} |
|
|
.content { |
|
|
.content { |
|
|
|
|
|
margin-top: 40rpx; |
|
|
padding-top: calc(var(--status-bar-height) + 110rpx); |
|
|
padding-top: calc(var(--status-bar-height) + 110rpx); |
|
|
} |
|
|
} |
|
|
/deep/.uv-sticky__content { |
|
|
/deep/.uv-sticky__content { |
|
|
|