This commit is contained in:
shijing 2021-09-18 13:34:03 +08:00
parent 060e3e660a
commit 732db99e9a
7 changed files with 11 additions and 4 deletions

View File

@ -130,9 +130,9 @@ export default {
currentSwiper: 0,
//
swiperList: [
{ id: 1, src: 'url1', img: '/static/img/1.jpg' },
{ id: 2, src: 'url2', img: '/static/img/2.jpg' },
{ id: 3, src: 'url3', img: '/static/img/3.jpg' }
// { id: 0, src: 'url1', img: '/static/img/1.png' },
// { id: 1, src: 'url2', img: '/static/img/2.png' },
// { id: 2, src: 'url3', img: '/static/img/3.png' }
],
//
categoryList: [
@ -303,7 +303,11 @@ export default {
getbanners(){
this.$u.api.getBanners().then(res=>{
for(var i=0;i<res.data.length;i++){
res.data[i].img = this.vuex_host + '/' + res.data[i].img
let timestamp=new Date().getTime();
res.data[i].img = this.vuex_host + '/' + res.data[i].img+"?timer="+timestamp
console.log(i)
console.log(res.data[i].img)
debugger;
}
this.swiperList = res.data;
console.log(this.swiperList)
@ -448,6 +452,8 @@ export default {
},
//
toSwiper(e) {
debugger;
console.log(e)
// uni.showToast({ title: e.src, icon: 'none' });
},
//
@ -472,6 +478,7 @@ export default {
//
swiperChange(event) {
this.currentSwiper = event.detail.current;
}
}
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/img/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/img/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

BIN
static/img/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB