mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2025-05-19 18:10:15 +09:00
fix: 修复恋爱相册无封面取值问题
This commit is contained in:
parent
daf1318a90
commit
0e342d5fa3
@ -123,14 +123,13 @@ export default {
|
|||||||
fnGetData() {
|
fnGetData() {
|
||||||
this.loading = 'loading';
|
this.loading = 'loading';
|
||||||
this.queryParams.group = this.loveConfig.lovePhoto.groupName
|
this.queryParams.group = this.loveConfig.lovePhoto.groupName
|
||||||
console.log('this.loveConfig------------',this.loveConfig)
|
|
||||||
this.$httpApi.v2
|
this.$httpApi.v2
|
||||||
.getPhotoListByGroupName(this.queryParams)
|
.getPhotoListByGroupName(this.queryParams)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log("相册 res", res)
|
console.log("相册 res", res)
|
||||||
this.loading = 'success';
|
this.loading = 'success';
|
||||||
this.dataList = res.items.map((item, index) => {
|
this.dataList = res.items.map((item, index) => {
|
||||||
item['image'] = this.$utils.checkImageUrl(item.spec.cover);
|
item['image'] = this.$utils.checkImageUrl(item.spec.cover || item.spec.url);
|
||||||
item['takeTime'] = this.$tm.dayjs(item.metadata.creationTimestamp).format(
|
item['takeTime'] = this.$tm.dayjs(item.metadata.creationTimestamp).format(
|
||||||
'DD/MM/YYYY');
|
'DD/MM/YYYY');
|
||||||
return item;
|
return item;
|
||||||
@ -161,13 +160,13 @@ export default {
|
|||||||
fnChange(isNext) {
|
fnChange(isNext) {
|
||||||
throttle(() => {
|
throttle(() => {
|
||||||
if (isNext) {
|
if (isNext) {
|
||||||
if (this.swiperIndex == this.dataList.length - 1) {
|
if (this.swiperIndex === this.dataList.length - 1) {
|
||||||
this.swiperIndex = 0;
|
this.swiperIndex = 0;
|
||||||
} else {
|
} else {
|
||||||
this.swiperIndex += 1;
|
this.swiperIndex += 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.swiperIndex == 0) {
|
if (this.swiperIndex === 0) {
|
||||||
this.swiperIndex = this.dataList.length - 1;
|
this.swiperIndex = this.dataList.length - 1;
|
||||||
} else {
|
} else {
|
||||||
this.swiperIndex -= 1;
|
this.swiperIndex -= 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user