| | |
| | | <view class="category-detail flex">
|
| | | <view class="flex1 info">
|
| | | <view class="title flex">
|
| | | <view>牛油果泡泡</view> |
| | | <view> |
| | | <image src="../../../static/common/icon-kf.png" class="icon-kf m-l-15 img100"></image> |
| | | |
| | | <view>牛油果泡泡</view>
|
| | | <view>
|
| | | <image src="../../../static/common/icon-kf.png" class="icon-kf m-l-15 img100"></image>
|
| | | |
| | | </view>
|
| | | </view>
|
| | | <view class="desc">
|
| | |
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="component-shop-item flex" v-for="(item,index) of list" :key="index" |
| | | <view class="component-shop-item flex" v-for="(item,index) of list" :key="index"
|
| | | @click="toDetail(item)">
|
| | | <view class="img">
|
| | | <image class="img img100"
|
| | |
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | |
| | | |
| | | <view class="icon-shop" v-if="list&&list.length>0"> |
| | | <!-- 购物图标 --> |
| | | <!-- 如果有购买的东西,就要附带数字了 --> |
| | | <view v-if="shoptotal>0" class="number"> |
| | | {{shoptotal}} |
| | | </view> |
| | |
|
| | |
|
| | | <view class="icon-shop" v-if="list&&list.length>0">
|
| | | <!-- 购物图标 -->
|
| | | <!-- 如果有购买的东西,就要附带数字了 -->
|
| | | <view v-if="shoptotal>0" class="number">
|
| | | {{shoptotal}}
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <!-- 判断是否到底了,自动吧 -->
|
| | | <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg> |
| | | |
| | | |
| | | <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
|
| | | |
| | | |
| | |
|
| | | </view>
|
| | | </template>
|
| | |
| | | return {
|
| | | query: {
|
| | | category: '',
|
| | | }, |
| | | shoptotal:0, |
| | | },
|
| | | shoptotal:0,
|
| | | list:[{},{},{}]
|
| | | }
|
| | | },
|
| | |
| | | console.log('options', options)
|
| | | this.query.category = options.categoryId || ''
|
| | | this.listApi = '/api/customer/flower/list'
|
| | | // await this.getList('post')
|
| | | this.getList()
|
| | |
|
| | | // await this.getList('post')
|
| | | // this.
|
| | | },
|
| | | onReachBottom() {
|
| | |
| | | uni.navigateTo({
|
| | | url: `/sub_pages/customer/trade/detail?id=${item.id}`
|
| | | })
|
| | | }, |
| | | mulnum(item) { |
| | | if (item.shopnum > 0) { |
| | | item.shopnum -= 1 |
| | | } |
| | | this.shoptotal -= 1 |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | | addnum(item) { |
| | | if (item.shopnum) { |
| | | item.shopnum += 1 |
| | | } else { |
| | | item.shopnum = 1 |
| | | } |
| | | this.shoptotal += 1 |
| | | this.$forceUpdate() |
| | | },
|
| | | mulnum(item) {
|
| | | if (item.shopnum > 0) {
|
| | | item.shopnum -= 1
|
| | | }
|
| | | this.shoptotal -= 1
|
| | | this.$forceUpdate()
|
| | | |
| | | },
|
| | | addnum(item) {
|
| | | if (item.shopnum) {
|
| | | item.shopnum += 1
|
| | | } else {
|
| | | item.shopnum = 1
|
| | | }
|
| | | this.shoptotal += 1
|
| | | this.$forceUpdate()
|
| | | },
|
| | | }
|
| | | }
|
| | |
| | | font-weight: 600;
|
| | | font-size: 32rpx;
|
| | | color: #BF0000;
|
| | | line-height: 44rpx; |
| | | line-height: 44rpx;
|
| | | margin-top: 12rpx;
|
| | | }
|
| | |
|
| | |
| | | font-weight: 400;
|
| | | font-size: 24rpx;
|
| | | color: #666666;
|
| | | line-height: 34rpx; |
| | | line-height: 34rpx;
|
| | | margin-top: 12rpx;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | .icon-shop { |
| | | position: absolute; |
| | | position: fixed; |
| | | |
| | | background-image: url('../../../static/images/customer/gwc.png'); |
| | | width: 140rpx; |
| | | height: 140rpx; |
| | | // box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.16); |
| | | border-radius: 50%; |
| | | right: 40rpx; |
| | | bottom: 300rpx; |
| | | background-size: 100% 100%; |
| | | |
| | | .number { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | background: #F20000; |
| | | line-height: 30rpx; |
| | | text-align: center; |
| | | position: absolute; |
| | | right: 14rpx; |
| | | top: 14rpx; |
| | | color: #FFFFFF; |
| | | border-radius: 50%; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | } |
| | | |
| | |
|
| | | .icon-shop {
|
| | | position: absolute;
|
| | | position: fixed;
|
| | | |
| | | background-image: url('../../../static/images/customer/gwc.png');
|
| | | width: 140rpx;
|
| | | height: 140rpx;
|
| | | // box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.16);
|
| | | border-radius: 50%;
|
| | | right: 40rpx;
|
| | | bottom: 300rpx;
|
| | | background-size: 100% 100%;
|
| | | |
| | | .number {
|
| | | width: 30rpx;
|
| | | height: 30rpx;
|
| | | background: #F20000;
|
| | | line-height: 30rpx;
|
| | | text-align: center;
|
| | | position: absolute;
|
| | | right: 14rpx;
|
| | | top: 14rpx;
|
| | | color: #FFFFFF;
|
| | | border-radius: 50%;
|
| | | font-size: 24rpx;
|
| | | }
|
| | | |
| | | }
|
| | | |
| | | }
|
| | | </style> |