|
@@ -474,16 +474,31 @@ export default {
|
|
|
},
|
|
|
// 获取年份列表
|
|
|
getYearList(){
|
|
|
- let nowYear = new Date().getFullYear()
|
|
|
+ this.yearList = [
|
|
|
+ {
|
|
|
+ value: -1,
|
|
|
+ label: '全部'
|
|
|
+ }
|
|
|
+ ]
|
|
|
let yearList = []
|
|
|
- for(let i = 0; i < 20; i++){
|
|
|
- let obj = {
|
|
|
- value: nowYear - i,
|
|
|
- label: nowYear - i
|
|
|
+ let MethodName = "/ShopServer/Client/ShopHomeQuery/GetIssueYearLabelList"
|
|
|
+ getLogin(MethodName, {})
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ res.year_label_list.forEach(nowYear => {
|
|
|
+ let obj = {
|
|
|
+ value: nowYear,
|
|
|
+ label: nowYear
|
|
|
+ }
|
|
|
+ yearList.push(obj)
|
|
|
+ })
|
|
|
+ this.yearList = this.yearList.concat(yearList)
|
|
|
}
|
|
|
- yearList.push(obj)
|
|
|
- }
|
|
|
- this.yearList = this.yearList.concat(yearList)
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|