| | |
| | | <u-swipe-action-item :options="options1" @click="(e)=>{clickSwipeButton(dto,true)}"> |
| | | <view class="item-each flex"> |
| | | <radio :checked="ids.indexOf(dto.id)>=0" @click="changeItem(dto,'flower')"></radio> |
| | | <image class="img img100 m-r-6 br-4" :src="dto.url||dto.cover"></image> |
| | | <image class="img img100 m-r-6 br-4" :class="[!dto.stock?'component-stock-zero':'']" :src="dto.url||dto.cover"></image> |
| | | <view class="flex1"> |
| | | <view class="title" @click.stop="toDetail(dto)"><span class="m-r-5" |
| | | style="display: inline-block;">{{dto.categoryStr||''}}</span><span |
| | |
| | | <view class="button-icons flex m-l-a m-r-0"> |
| | | <uni-icons v-if="dto.num&&dto.num>=1" type="minus" size="32" |
| | | @click.stop="addnum(dto,-1)"></uni-icons> |
| | | <view class="curnums" @click.stop="updateItemNum(dto)" v-if="dto.num&&dto.num>=1">{{ dto.num }}</view> |
| | | <view class="curnums" @click.stop="updateItemNum(dto)" |
| | | v-if="dto.num&&dto.num>=1">{{ dto.num }}</view> |
| | | <uni-icons type="plus-filled" size="32" |
| | | @click.stop="addnum(dto,1)"></uni-icons> |
| | | </view> |
| | |
| | | } |
| | | }, |
| | | onShow() { |
| | | if (this.sign['shopping']) { |
| | | // if (this.sign['shopping']) { |
| | | |
| | | // } |
| | | this.init() |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | // this.init() |
| | | }, |
| | | async onPullDownRefresh(){ |
| | | await this.init() |
| | |
| | | if (!dto.stock) { |
| | | dto.stock = 0 |
| | | } |
| | | if (dto.num + addnum > dto.stock) { |
| | | if (addnum > 0 && dto.num + addnum > dto.stock) { |
| | | this.$message.showToast('库存不足,无法修改') |
| | | return |
| | | } |