| | |
| | | <image class="img img100 m-r-6 br-4" :src="dto.url||dto.cover"></image> |
| | | <view class="flex1"> |
| | | <view class="title"><span class="m-r-5" |
| | | style="display: inline-block;">{{item.categoryStr||''}}</span><span |
| | | v-if="item.levelStr" class="m-r-5" |
| | | style="display: inline-block;">{{ item.levelStr || '' }}</span>{{ dto.name || '-' }} |
| | | style="display: inline-block;">{{dto.categoryStr||''}}</span><span |
| | | v-if="dto.levelStr" class="m-r-5" |
| | | style="display: inline-block;">{{ dto.levelStr || '' }}</span>{{ dto.name || '-' }} |
| | | </view> |
| | | <view class="price"> |
| | | {{ dto.price || '-' }}元/扎 |
| | |
| | | this.ids.splice(this.ids.indexOf(item.id), 1) |
| | | } |
| | | for (var i = 0; i < this.list.length; i++) { |
| | | if (this.list[i].id === item.supplierId) { |
| | | this.list[i].splice(i, 1) |
| | | if (this.list[i].supplierId === item.supplierId) { |
| | | // this.list[i].flowerList.splice(i, 1) |
| | | if (this.list[i].flowerList.length === 1) { |
| | | if (this.ids.indexOf('supplier@' + this.list[i].supplierId) >= 0) { |
| | | this.ids.splice(this.ids.indexOf('supplier@' + this.list[i].supplierId), 1) |
| | |
| | | //只需要清楚这个元素 |
| | | var k = -1 |
| | | for (var j = 0; j < this.list[i].flowerList.length; j++) { |
| | | if (this.list[i][j].id === item.id) { |
| | | if (this.list[i].flowerList[j].id === item.id) { |
| | | k = j; |
| | | break |
| | | } |
| | | } |
| | | this.list[i].flowerList.splice(k, 1) |
| | | } |
| | | this.$forceUpdate() |
| | | break |
| | | } |
| | | } |
| | | console.log('this.list',this.list) |
| | | } |
| | | }, |
| | | |
| | |
| | | this.$message.hideLoading() |
| | | if (code === 0) { |
| | | dto.num += addnum |
| | | if (dto.num < 1) { |
| | | //id删除清空,并且 |
| | | await this.clickSwipeButton(dto) |
| | | // await this.init() |
| | | } |
| | | } |
| | | }, |
| | | async init() { |