Browse Source

Merge branch 'devlop' of http://git.qniao.cn/qniao/paper-shopkeeper-H5 into devlop

devlop
邓雄飞 4 years ago
parent
commit
a195151795
2 changed files with 15 additions and 5 deletions
  1. 15
      pages/cart/index.vue
  2. 5
      pages/for-comparison/index.vue

15
pages/cart/index.vue

@ -82,9 +82,9 @@
</view> </view>
<uni-popup ref="popup" type="center" :mask-click="false"> <uni-popup ref="popup" type="center" :mask-click="false">
<view class="popup-box"> <view class="popup-box">
<view class="tip-title">{{ allSelected ? '确定将购物车纸品删除吗?' : '确定将当前纸品删除吗?' }}</view>
<view class="tip-title">{{ onlyQuantity ? '确定将当前纸品删除吗?' : (allSelected ? '确定将购物车纸品删除吗?' : '确定将当前纸品删除吗?') }}</view>
<view class="operation-row"> <view class="operation-row">
<view class="cancel-text" @tap="cancelTap">取消</view>
<view class="cancel-text" @tap="cancelTap">{{onlyQuantity ? '我在想想' : '取消'}}</view>
<view class="line"></view> <view class="line"></view>
<view class="confirm-text" @tap="confirmTap">确定</view> <view class="confirm-text" @tap="confirmTap">确定</view>
</view> </view>
@ -123,7 +123,8 @@ export default {
}, },
checked: false, checked: false,
list: [], list: [],
idList: []
idList: [],
onlyQuantity: false,
} }
}, },
created() { created() {
@ -305,9 +306,11 @@ export default {
delTap() { delTap() {
// idList // idList
this.idList = [] this.idList = []
let quantity = 0
this.list.forEach((el) => { this.list.forEach((el) => {
el.carItemList.forEach((good) => { el.carItemList.forEach((good) => {
if (good.checked) { if (good.checked) {
quantity = good.quantity
this.idList.push(good.id) this.idList.push(good.id)
} }
}) })
@ -319,6 +322,12 @@ export default {
}) })
return return
} }
// 0
if(this.idList.length == 1 && quantity == 0) {
this.onlyQuantity = true
}else {
this.onlyQuantity = false
}
this.$refs.popup.open('center') this.$refs.popup.open('center')
}, },
confirmTap() { confirmTap() {

5
pages/for-comparison/index.vue

@ -92,12 +92,13 @@
<view class="qn-form-item qn-form-item"> <view class="qn-form-item qn-form-item">
<view class="label"><text class="label__text">交货时间</text></view> <view class="label"><text class="label__text">交货时间</text></view>
<view class="value"> <view class="value">
<picker :value="paperIndex" :range="deliveryTimeList" @change="deliveryTimeChange">
<qn-datetime-picker v-model="form.deliveryDay" type="datetime" :border="false" placeholder="交货时间"></qn-datetime-picker>
<!-- <picker :value="paperIndex" :range="deliveryTimeList" @change="deliveryTimeChange">
<view> <view>
<text class="uni-input">{{ form.deliveryDay }}</text> <text class="uni-input">{{ form.deliveryDay }}</text>
<uni-icons type="right" color="#000000" size="16"></uni-icons> <uni-icons type="right" color="#000000" size="16"></uni-icons>
</view> </view>
</picker>
</picker> -->
</view> </view>
</view> </view>
<view class="qn-form-item qn-form-item" style="border: none"> <view class="qn-form-item qn-form-item" style="border: none">

Loading…
Cancel
Save