| | |
| | | methods: { |
| | | isIngood(item) { |
| | | for (var tmp of this.cache_goods) { |
| | | if (tmp.id == item.id) { |
| | | if (tmp.goodsId == item.goodsId) { |
| | | return true |
| | | } |
| | | } |
| | |
| | | async updateSelectGood(item) { |
| | | var has = false |
| | | for (var tmp of this.cache_goods) { |
| | | if (tmp.id == item.id) { |
| | | if (tmp.goodsId == item.goodsId) { |
| | | has = true |
| | | break |
| | | } |
| | |
| | | //移除 |
| | | var arr = [] |
| | | for (var tmp of this.cache_goods) { |
| | | if (tmp.id == item.id) {} else { |
| | | if (tmp.goodsId == item.goodsId) {} else { |
| | | arr.push(tmp) |
| | | } |
| | | } |
| | |
| | | } |
| | | arr.push(item) |
| | | } |
| | | await this.$store.dispatch('cache_coupon_select', arr) |
| | | await this.$store.dispatch('cache_goods_select', arr) |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | |
| | | }, |
| | | getPointGood(item) { |
| | | uni.navigateTo({ |
| | | url: `/sub_pages/customer/coupon/good-detail?id=${item.id}` |
| | | url: `/sub_pages/customer/coupon/good-detail?id=${item.goodsId}` |
| | | }) |
| | | }, |
| | | toGoodAll() { |