update api
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
商品推荐
|
||||
</view>
|
||||
<view class="label">
|
||||
<text>分类名称</text>
|
||||
<text v-for="item in classifyList" :key="item.gc_id">{{ item.gc_name }}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="item">
|
||||
<image :src="$u.http.config.baseUrl + info.goods_image" class="img"></image>
|
||||
<view class="item" @click="addCart">
|
||||
<image :src="info.goods_image" class="img"></image>
|
||||
<view class="info">
|
||||
<text class="title u-line-1">{{ info.goods_name }}</text>
|
||||
<text class="jianjie u-line-2">{{ info.goods_advword }}</text>
|
||||
@@ -13,7 +13,20 @@ export default {
|
||||
name:"item",
|
||||
props: {
|
||||
info: Object
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addCart() {
|
||||
console.log(1);
|
||||
|
||||
this.$u.api.addCart({
|
||||
goods_id: this.info.goods_id,
|
||||
quantity: 1
|
||||
}).then((res)=>{
|
||||
if (res.errCode == 0) {
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user