banner
This commit is contained in:
parent
060e3e660a
commit
732db99e9a
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
BIN
static/img/1.jpg
BIN
static/img/1.jpg
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 121 KiB |
BIN
static/img/2.jpg
BIN
static/img/2.jpg
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 123 KiB |
BIN
static/img/3.jpg
BIN
static/img/3.jpg
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
Loading…
Reference in New Issue