loadmore 7.23

This commit is contained in:
2020-07-23 20:58:56 +08:00
parent be9f2ec1c7
commit 59362ebc7c
12 changed files with 227 additions and 83 deletions

View File

@@ -125,6 +125,9 @@
</view>
</template>
<script>
/*
* 详情是请求完存在store的在这里从store取值
**/
import navs from "../components/sdetails/navs"
import tloos from "../components/sdetails/tloos"
export default {
@@ -152,7 +155,23 @@ export default {
components:{
navs,
tloos
},
},
onShow() {
// if(this.pintuan_id) {
// this.$u.api.getPinTuanDetails({
// pintuan_id: this.pintuan_id
// }).then(res => {
// if(res.errCode == 0) {
// const goods = {
// goods: res.data.data,
// type: 2,
// }
// this.$store.commit('setGoodsDetails', goods);
// this.$store.commit('setGoodsId', this.pintuan_id);
// }
// })
// }
},
onLoad() {
this.init();
},
@@ -225,25 +244,25 @@ export default {
this.settlementOrder({num: info.value});
}
},
// getGoodsDetails(id) {
// this.id = id;
// this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
// if (res.errCode == 0) {
// this.goodsInfo = res.data.goods;
// let list = [];
// res.data.goods_image[0].forEach(item => {
// let temp = {
// image: item
// }
// list.push(temp);
// })
// this.list = list;
// this.info = res.data.goods;
// this.glist = res.data.spec_list;
// // console.log(this.goodsInfo.mobile_body);
// }
// })
// },
getGoodsDetails(id) {
this.id = id;
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
if (res.errCode == 0) {
this.goodsInfo = res.data.goods;
let list = [];
res.data.goods_image[0].forEach(item => {
let temp = {
image: item
}
list.push(temp);
})
this.list = list;
this.info = res.data.goods;
this.glist = res.data.spec_list;
// console.log(this.goodsInfo.mobile_body);
}
})
},
// 下单
/*
* @params {Number} type 拼团或者开团
@@ -285,8 +304,8 @@ export default {
// console.log(this.involvemenGroupInfo);
},
xuanze(id){
// console.log(id)
this.getGoodsDetails(this.glist[id])
console.log(id)
// this.getGoodsDetails(this.glist[id])
},
setTitle() {
let title = '';