|
@@ -13,10 +13,10 @@
|
|
</view>
|
|
</view>
|
|
<view class="mt-2 flex-between flex-center">
|
|
<view class="mt-2 flex-between flex-center">
|
|
<view class="touxiang mt-30">
|
|
<view class="touxiang mt-30">
|
|
- <text class="text-white text-size-m text-weight-b">{{item.sale_price}}</text>
|
|
|
|
|
|
+ <text class="text-white text-size-m text-weight-b">¥ {{item.sale_price}}</text>
|
|
</view>
|
|
</view>
|
|
<view >
|
|
<view >
|
|
- <image @click="jiarufuFun(item)" class="remenzan" src="/static/img/86.png" mode="widthFix"></image>
|
|
|
|
|
|
+ <image @click.stop="jiarufuFun(item)" class="remenzan" src="/static/img/86.png" mode="widthFix"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -87,8 +87,23 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
jiarufuFun(data){
|
|
jiarufuFun(data){
|
|
- uni.navigateTo({
|
|
|
|
- url: "/pages/gouwuche/index",
|
|
|
|
|
|
+ let that=this;
|
|
|
|
+ myRequest({
|
|
|
|
+ url: "/api/ShopCart/addShopCart",
|
|
|
|
+ method:'post',
|
|
|
|
+ data:{
|
|
|
|
+ goods_id:data.id,
|
|
|
|
+ goods_name:data.goods_name,
|
|
|
|
+ goods_image:data.image,
|
|
|
|
+ goods_price:data.sale_price,
|
|
|
|
+ goods_num:1
|
|
|
|
+ }
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ that.$refs.toast.show({model:'success',label:res.data.msg})
|
|
|
|
+ }else{
|
|
|
|
+ that.$refs.toast.show({model:'error',label:res.data.msg})
|
|
|
|
+ }
|
|
})
|
|
})
|
|
// console.log(data)
|
|
// console.log(data)
|
|
// this.gouwuche.push(data)
|
|
// this.gouwuche.push(data)
|