| | |
| | | this.page.current = 1
|
| | | await this.getList('post')
|
| | | uni.stopPullDownRefresh()
|
| | | }, |
| | | onShow(){ |
| | | this.refreshShopNum() |
| | | },
|
| | | methods: { |
| | | async refreshShopNum() { |
| | |
| | | item.shopnum = 0 |
| | | }
|
| | | if (item.shopnum + addnum > item.stock) {
|
| | | this.$message.showToast('库存不足,无法添加')
|
| | | this.$message.showToast('库存不足,无法修改')
|
| | | return
|
| | | }
|
| | |
|
| | |
| | | this.$message.showLoading()
|
| | | const {
|
| | | code
|
| | | } = await http.request('post', '/api/customer/flower/cart/change-num', {
|
| | | } = await this.$http.request('post', '/api/customer/flower/cart/change-num', {
|
| | | data: {
|
| | | id: item.id,
|
| | | num: addnum
|