| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | async clearCollect() { |
| | | await this.$message.confirm('是否清空已失效的商品') |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('post', '/api/collect/clear', { |
| | | data: { |
| | | |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.refreshList() |
| | | } |
| | | }, |
| | | async delCollect(item) { |
| | | await this.$message.confirm('是否取消收藏') |
| | | this.$message.showLoading() |
| | | const { |
| | | code |
| | | } = await this.$http.request('get', '/api/collect/delete', { |
| | | params: { |
| | | flowerId: item.id |
| | | } |
| | | }) |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | this.refreshList() |
| | | } |
| | | }, |
| | | toDetail(item) { |
| | | if (item.status == 'UP') { |
| | | |
| | |
| | | <view class="page-collect " style="background: #E1F0E7;"> |
| | | <view style="padding-bottom: 0rpx;" class="p20"> |
| | | <view class="search-container flex"> |
| | | <view class="flex1 input"> |
| | | <view class="flex1 input flex"> |
| | | <u-input placeholder="请输入花名" v-model="query.name"> |
| | | <template slot="suffix"> |
| | | <uni-icons color="#20613D" type="search" size="24" @click="refreshList"></uni-icons> |
| | | </template> |
| | | </u-input> |
| | | <!-- <view class="desc-gray text-center m-l-10"> |
| | | 一键清空失效商品 |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | <view class="component-filter-container p10"> |
| | |
| | | <view class="flex1" @click.stop="level_show=true"> |
| | | {{ this.query.levelStr || '级别' }} |
| | | <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> |
| | | </view> |
| | | <view class="flex1 desc-gray" @click.stop="clearCollect"> |
| | | 一键清空已失效 |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | @cancel="order_show=false"></u-picker> |
| | | |
| | | <view class="trade-list-container"> |
| | | <view class="trade-info-container flex" :class="[dto.status]" v-for="(dto,index) of list" :key="index"> |
| | | <image class="img img100 br-4 m-r-10" :src="dto.url||dto.cover" @click.stop="toDetail(dto)"></image> |
| | | <view class="trade-info-container flex" :class="[dto.status!=='UP'?'OFF':'']" v-for="(dto,index) of list" |
| | | :key="index"> |
| | | <image class="img img100 br-4 m-r-10" :class="[!dto.stock?'component-stock-zero':'']" :src="dto.url||dto.cover" @click.stop="toDetail(dto)"></image> |
| | | <view class="flex1"> |
| | | <view class="flex" @click.stop="toDetail(dto)"> |
| | | <view class="title"> |
| | |
| | | <uni-icons v-if="!dto.shopnum||dto.shopnum<=99" type="plus-filled" size="32" |
| | | @click.stop="addnum(dto,1)"></uni-icons> |
| | | </view> |
| | | <view class=" m-l-15 m-r-0 button" @click.stop="delCollect(dto)"> |
| | | 取消收藏 |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | } |
| | | |
| | | .trade-info-container.UP { |
| | | .trade-info-container.OFF { |
| | | .title { |
| | | color: #000000; |
| | | color: #666; |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | font-weight: 600; |
| | | font-size: 28rpx; |
| | | |
| | | color: #333; |
| | | color: #000; |
| | | line-height: 40rpx; |
| | | |
| | | .level { |
| | |
| | | text-align: center; |
| | | } |
| | | |
| | | .button { |
| | | width: 168rpx; |
| | | height: 48rpx; |
| | | border-radius: 30rpx; |
| | | border: 2rpx solid #333; |
| | | font-size: 24rpx; |
| | | color: #333; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | } |