123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <template>
- <view class="page-bottom">
- <view class="btm-btn">
- <view class="add-btn" @click="buy(2)" v-if="showAdd">加入购物车</view>
- <view class="buy-btn" @click="buy(1)" :class="{'quck':!showAdd }">{{showAdd? '立即购买': '立即兑换'}}</view>
- </view>
- </view>
- </template>
- <script>
- import { collectAdd, collectDel } from '@/api/product.js';
- export default {
- props: {
- many: {
- default: 9
- },
- goodsObjact: {
- default: function() {
- return {};
- }
- },
- goodsid: {
- default: ''
- },
- showAdd: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {};
- },
- methods: {
- buy(type) {
- this.$emit('specOPne', type);
- }
- }
- };
- </script>
- <style lang="scss">
- /* 底部操作菜单 */
- .page-bottom {
- position: fixed;
- bottom: 0rpx;
- z-index: 95;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 750rpx;
- height: 97rpx;
- background-color: #ffffff;
- /* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
- border-radius: 16rpx; */
- .p-b-btn {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- font-size: $font-sm;
- color: $font-color-base;
- width: 96rpx;
- height: 80rpx;
- .iconfont {
- font-size: 40rpx;
- line-height: 48rpx;
- color: $font-color-light;
- }
- &.active,
- &.active .iconfont {
- color: $uni-color-primary;
- }
- .iconlikefill {
- font-size: 46rpx;
- }
- image {
- width: 56rpx;
- height: 58rpx;
- }
- }
- .action-btn-group {
- display: flex;
- height: 76rpx;
- border-radius: 100px;
- overflow: hidden;
- margin-left: 20rpx;
- position: relative;
- &:after {
- content: '';
- position: absolute;
- top: 50%;
- right: 50%;
- transform: translateY(-50%);
- height: 28rpx;
- width: 0;
- border-right: 1px solid rgba(255, 255, 255, 0.5);
- }
- .action-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- // width: 270rpx;
- // height: 100%;
- font-size: $font-base;
- padding: 0;
- border-radius: 0;
- background: transparent;
- width: 339rpx;
- height: 90rpx;
- &.buy-now-btn {
- background-color: #303e49;
- }
- &.add-cart-btn {
- background-color: #fff;
- color: #ff4c4c;
- border: #ff4c4c 1px solid;
- }
- }
- }
- }
- .p-b-btn {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- font-size: $font-sm;
- color: $font-color-base;
- width: 96rpx;
- height: 80rpx;
- .iconfont {
- font-size: 40rpx;
- line-height: 48rpx;
- color: $font-color-light;
- }
- &.active,
- &.active .iconfont {
- color: $uni-color-primary;
- }
- .icon-fenxiang2 {
- font-size: 42rpx;
- transform: translateY(-2rpx);
- }
- .iconlikefill {
- font-size: 46rpx;
- }
- }
- .btm-btn {
- z-index: 2;
- width: 750rpx;
- height: 97rpx;
- display: flex;
- // justify-content: space-between;
- position: fixed;
- bottom: 0;
- background-color: #fff;
- text-align: center;
- .add-btn {
- text-align: center;
- width: 375rpx;
- height: 97rpx;
- background: #FFB238;
- font-size: 36rpx;
- font-weight: 500;
- color: #fff;
- line-height: 97rpx;
- }
- .buy-btn {
- text-align: center;
- border: none;
- width: 375rpx;
- height: 97rpx;
- background: #6EAB4E;
- font-size: 36rpx;
- font-weight: 500;
- color: #fff;
- line-height: 97rpx;
- color: #fff;
- }
- .quck {
- width: 699rpx;
- height: 90rpx;
- background: #6EAB4E;
- border-radius: 45rpx;
- margin: auto;
- }
- }
- </style>
|