|
@@ -11,10 +11,10 @@
|
11
|
11
|
</view>
|
12
|
12
|
<view class="ListContainer">
|
13
|
13
|
<view v-for="(item, index) in PageList" :key="index">
|
14
|
|
- <view class="Title flex-h">
|
|
14
|
+ <view class="Title flex-h" @tap="ShowItemList(item, index)">
|
15
|
15
|
<text class="flex-item">{{item.name}}</text>
|
16
|
|
- <text class="iconfont iconxiala" v-if="!item.Show" @tap="ShowItemList(item, index)"></text>
|
17
|
|
- <text class="iconfont iconshangla" v-else @tap="item.Show = false"></text>
|
|
16
|
+ <text class="iconfont iconxiala" v-if="!item.Show"></text>
|
|
17
|
+ <text class="iconfont iconshangla" v-else></text>
|
18
|
18
|
</view>
|
19
|
19
|
<view class="List" v-show="item.Show">
|
20
|
20
|
<view v-for="(subItem, subIndex) in item.List" :key="subIndex">
|
|
@@ -96,7 +96,7 @@ export default {
|
96
|
96
|
this.PhotoUrlArr = []
|
97
|
97
|
this.EmptyPhotoList() // 清空照片墙列表
|
98
|
98
|
this.EmptyGalleryTypeList() // 清空照片墙类型列表
|
99
|
|
- this.GetGalleryType({ queryData: { pageNum: 1, pageSize: 10000 } }).then(() => {
|
|
99
|
+ this.GetGalleryType({ queryData: { pageNum: 1, pageSize: 10000, hasImages: false } }).then(() => {
|
100
|
100
|
this.GalleryTypeList.map((item) => {
|
101
|
101
|
this.PageList.push({ ...item, List: [], Show: false, pageNum: 1, pageSize: 10, pages: 2, Loading: false })
|
102
|
102
|
})
|
|
@@ -121,26 +121,30 @@ export default {
|
121
|
121
|
})
|
122
|
122
|
},
|
123
|
123
|
ShowItemList (item, index) { // 显示图片列表
|
124
|
|
- if (item.List.length) {
|
125
|
|
- item.Show = true
|
|
124
|
+ if (item.Show) {
|
|
125
|
+ item.Show = false
|
126
|
126
|
} else {
|
127
|
|
- if (this.DataLock) return
|
128
|
|
- this.DataLock = true
|
129
|
|
- item.Loading = true
|
130
|
|
- item.List = []
|
131
|
|
- this.GetPhotoList({ queryData: { pageNum: item.pageNum, pageSize: item.pageSize, typeId: item.typeId } }).then((res) => {
|
132
|
|
- item.pageNum = res.data.data.current - 0
|
133
|
|
- item.pages = res.data.data.pages - 0
|
134
|
|
- this.PhotoList.map((subItem) => {
|
135
|
|
- item.List.push({ ...subItem })
|
136
|
|
- })
|
|
127
|
+ if (item.List.length) {
|
137
|
128
|
item.Show = true
|
138
|
|
- this.DataLock = false
|
139
|
|
- item.Loading = false
|
140
|
|
- }).catch((res) => {
|
141
|
|
- this.DataLock = false
|
142
|
|
- item.Loading = false
|
143
|
|
- })
|
|
129
|
+ } else {
|
|
130
|
+ if (this.DataLock) return
|
|
131
|
+ this.DataLock = true
|
|
132
|
+ item.Loading = true
|
|
133
|
+ item.List = []
|
|
134
|
+ this.GetPhotoList({ queryData: { pageNum: item.pageNum, pageSize: item.pageSize, typeId: item.typeId } }).then((res) => {
|
|
135
|
+ item.pageNum = res.data.data.current - 0
|
|
136
|
+ item.pages = res.data.data.pages - 0
|
|
137
|
+ this.PhotoList.map((subItem) => {
|
|
138
|
+ item.List.push({ ...subItem })
|
|
139
|
+ })
|
|
140
|
+ item.Show = true
|
|
141
|
+ this.DataLock = false
|
|
142
|
+ item.Loading = false
|
|
143
|
+ }).catch((res) => {
|
|
144
|
+ this.DataLock = false
|
|
145
|
+ item.Loading = false
|
|
146
|
+ })
|
|
147
|
+ }
|
144
|
148
|
}
|
145
|
149
|
},
|
146
|
150
|
CheckBigImg (item, url) { // 查看大图
|