update api
This commit is contained in:
@@ -2,24 +2,40 @@
|
||||
<view class="tloos">
|
||||
<view class="navs">
|
||||
<image></image>
|
||||
123
|
||||
店铺
|
||||
</view>
|
||||
<view class="navs" style="margin-right:30rpx">
|
||||
<image></image>
|
||||
123
|
||||
客服
|
||||
</view>
|
||||
<view class="button" style="background:rgba(253,211,96,0.6);">试穿试送</view>
|
||||
<view class="button" style="background:rgba(253,211,96,1);">加入购物车</view>
|
||||
<view class="button" style="background:rgba(253,211,96,1);" @click="addCart">加入购物车</view>
|
||||
<view class="button" style="background:rgba(255,120,15,1);">立即购买</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name:"tloos"
|
||||
name:"tloos",
|
||||
props: ['id'],
|
||||
methods: {
|
||||
addCart() {
|
||||
this.$u.api.addCart({
|
||||
goods_id: this.id,
|
||||
quantity: 1,
|
||||
}).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: res.errCode == 0 ? 'success' : 'warning',
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tloos{
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
position: fixed;
|
||||
height: 98rpx;
|
||||
|
||||
Reference in New Issue
Block a user