71 lines
1.5 KiB
Vue
71 lines
1.5 KiB
Vue
<template>
|
|
<view class="tloos">
|
|
<view class="navs">
|
|
<image></image>
|
|
店铺
|
|
</view>
|
|
<view class="navs" style="margin-right:30rpx">
|
|
<image></image>
|
|
客服
|
|
</view>
|
|
<view class="button" style="background:rgba(253,211,96,0.6);">试穿试送</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",
|
|
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;
|
|
width: 100%;
|
|
bottom:0;
|
|
border-top: 1rpx solid #ececec;
|
|
.navs{
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 24rpx;
|
|
color: #666;
|
|
flex-shrink: 0;
|
|
margin-left: 30rpx;
|
|
>image{
|
|
width: 35rpx;
|
|
height: 35rpx;
|
|
margin-bottom: 15rpx;
|
|
}
|
|
|
|
|
|
}
|
|
.button{
|
|
width: 100%;
|
|
height: 100%;
|
|
line-height: 98rpx;
|
|
text-align: center;
|
|
color: #fff;
|
|
|
|
}
|
|
}
|
|
</style> |