| | |
| | | <view class="footer"> |
| | | <view class="edit"> |
| | | <view class="edit-left"> |
| | | <view class="edit-left-row" @click="toIndex"> |
| | | <image src="/static/icon/detail_ic_home@2x.png" mode="widthFix"></image> |
| | | <text>首页</text> |
| | | <view class="edit-left-row" @click="shoucang"> |
| | | <image src="/static/icon/ic_collect_sel@2x.png" mode="widthFix" v-if="info.collectStatus === 1"></image> |
| | | <image src="/static/icon/ic_collect@2x.png" mode="widthFix" v-else></image> |
| | | <text>{{info.collectStatus === 1 ? '已收藏' : '收藏'}}</text> |
| | | </view> |
| | | <view class="edit-left-row"> |
| | | <button open-type="contact">客服</button> |
| | |
| | | this.cardNum() |
| | | }, |
| | | methods: { |
| | | shoucang() { |
| | | if (this.info.collectStatus === 1) { |
| | | this.$u.api.cancelbatch({ ids: this.info.id }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.info.collectStatus = 0 |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.saveCollect({ objId: this.info.id, type: 1 }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.info.collectStatus = 1 |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | submit() { |
| | | let shop = [ |
| | | { |
| | | goodsNum: 1, |
| | | goodsSkuId: this.info.goodsSkuResponseList[0].id |
| | | } |
| | | ] |
| | | uni.setStorageSync('shop', shop) |
| | | uni.navigateTo({ |
| | | url: '/pages/confirm-order/confirm-order?id=' + this.id |
| | | url: '/pages/confirm-order/confirm-order' |
| | | }) |
| | | }, |
| | | addCard(e) { |
| | |
| | | toCard() { |
| | | uni.navigateTo({ |
| | | url: '/pages/shopping-cart/shopping-cart' |
| | | }) |
| | | }, |
| | | toIndex() { |
| | | uni.switchTab({ |
| | | url: '/pages/index/index' |
| | | }) |
| | | }, |
| | | cardNum() { |