|
@@ -22,23 +22,39 @@ export default {
|
|
|
return {
|
|
|
title: null,
|
|
|
showList: [],
|
|
|
-
|
|
|
+ showList: [],
|
|
|
+ list: [
|
|
|
+ {
|
|
|
+ index: 1,
|
|
|
+ total: 16,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index: 2,
|
|
|
+ total: 23,
|
|
|
+ },
|
|
|
+ ],
|
|
|
loading: false,
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
this.showList = [];
|
|
|
- this.getImgList();
|
|
|
+ let index = this.$route.query.index;
|
|
|
+ this.getImgList(index ? index : 0);
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
onClickLeft() {
|
|
|
window.history.back(-1);
|
|
|
},
|
|
|
- getImgList() {
|
|
|
- for (let i = 0; i < 23; i++) {
|
|
|
+ getImgList(index) {
|
|
|
+ let total = 0;
|
|
|
+ let findi = this.list.findIndex((v) => v.index === (Number(index)+1) );
|
|
|
+ if (findi !== -1) {
|
|
|
+ total = this.list[findi].total;
|
|
|
+ }
|
|
|
+ for (let i = 0; i < total; i++) {
|
|
|
this.showList.push(
|
|
|
- require(`@/assets/images/goods/image${i + 1}@2x.png`)
|
|
|
+ require(`@/assets/images/goods/${(Number(index)+1)}/image${i + 1}@2x.png`)
|
|
|
);
|
|
|
}
|
|
|
},
|