|
|
@ -82,49 +82,62 @@ |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.getBannerList(); |
|
|
this.getBannerList(); |
|
|
|
|
|
// |
|
|
this.getHomeList(); |
|
|
// this.getHomeList(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
// 轮播图片 |
|
|
// 轮播图片 |
|
|
getBannerList(){ |
|
|
getBannerList(){ |
|
|
// for demo |
|
|
Api.pageinfo().then((res)=>{ |
|
|
for(let i=0;i<3;i++){ |
|
|
// console.log("fda",eval(res)) |
|
|
const obj = { |
|
|
let ldata = res.data |
|
|
"imgUrl": "http://192.168.66.16:8089/assets/store/img/diy/banner/01.png", |
|
|
// 轮播图 |
|
|
"link": null |
|
|
this.imglist = ldata.rotations |
|
|
} |
|
|
}).catch(err=>{ |
|
|
this.imglist.push(obj) |
|
|
console.log(err) |
|
|
} |
|
|
}); |
|
|
// this.imglist.push(simg) |
|
|
|
|
|
|
|
|
// Api.pageinfo().then(res=>{ |
|
|
|
|
|
//let aa = eval('(' + res + ')'); |
|
|
|
|
|
// let aa = JSON.stringify(res) |
|
|
|
|
|
// console.log(aa.length) |
|
|
|
|
|
// console.log(aa) |
|
|
|
|
|
// if(res.resultCode =="00000000"){ |
|
|
|
|
|
// let ldata = res.data |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
// console.log(res) |
|
|
|
|
|
// }); |
|
|
}, |
|
|
}, |
|
|
//商品列表 |
|
|
//商品列表 |
|
|
getHomeList(){ |
|
|
getHomeList(){ |
|
|
let rqdata={pay_type: 1,record_type: 2,goods_status: 1,page: 1,limit: 6} |
|
|
// 搜索的内容 |
|
|
|
|
|
let rqdata = {"pay_type":2,"goods_status":1,"page":1,"limit":6} |
|
|
|
|
|
//let rqdata={pay_type: 1,record_type: 2,goods_status: 1,page: 1,limit: 6} |
|
|
Gapi.soglist(rqdata).then(res=>{ |
|
|
Gapi.soglist(rqdata).then(res=>{ |
|
|
if(res.resulteCode=='000000'){ |
|
|
if(res.resulteCode=='00000000'){ |
|
|
this.gdlist = res.data |
|
|
this.gdlist = res.data.data |
|
|
} |
|
|
} |
|
|
console.log("sgres:",res) |
|
|
console.log("sgres:",res) |
|
|
}).catch(err=>{ |
|
|
}).catch(err=>{ |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}); |
|
|
}); |
|
|
// |
|
|
// |
|
|
for(let i=0;i<5;i++){ |
|
|
// for(let i=0;i<5;i++){ |
|
|
const obj = { |
|
|
// const obj = { |
|
|
"goods_id": 10002, |
|
|
// "goods_id": 10002, |
|
|
"goods_name": "00A02", |
|
|
// "goods_name": "00A02", |
|
|
"selling_point": "", |
|
|
// "selling_point": "", |
|
|
"goods_image": "http://192.168.66.16:8089/uploads/10001/20231021/be65b065b633bf469cb7bcfc15385936.jpg", |
|
|
// "goods_image": "http://192.168.66.16:8089/uploads/10001/20231021/be65b065b633bf469cb7bcfc15385936.jpg", |
|
|
"goods_price_min": "100.00", |
|
|
// "goods_price_min": "100.00", |
|
|
"goods_price_max": "100.00", |
|
|
// "goods_price_max": "100.00", |
|
|
"line_price_min": "120.00", |
|
|
// "line_price_min": "120.00", |
|
|
"line_price_max": "120.00", |
|
|
// "line_price_max": "120.00", |
|
|
"goods_sales": 0 |
|
|
// "goods_sales": 0 |
|
|
} |
|
|
// } |
|
|
this.gdlist.push(obj) |
|
|
// this.gdlist.push(obj) |
|
|
} |
|
|
// } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|