添加购物车

This commit is contained in:
asd
2019-12-19 14:29:24 +08:00
parent a42c9a1ba3
commit b545679dad
5 changed files with 50 additions and 21 deletions

View File

@@ -3,13 +3,15 @@ Component({
img:String,
title:String,
id:String,
price:String
price:String,
shopid:String
},
data: {},
methods: {
gotodetail() {
gotodetail(e) {
console.log(e.currentTarget.dataset.id)
wx.navigateTo({
url: "/pages/product/product"
url: "/pages/product/product?shopid="+e.currentTarget.dataset.id
})
}
}

View File

@@ -1,8 +1,9 @@
<view class="commodity" bindtap="gotodetail">
<view class="commodity" bindtap="gotodetail" data-id="{{shopid}}">
<view class="content">
<image class="imgthumb " src="{{img}}"></image>
<view class="introduce">
<text class="towline">{{title}}</text>
<view>
<text>¥{{price}}</text>
<text>加入购物车</text>