diff --git a/pages/index/index.vue b/pages/index/index.vue index 3a1dd7f..6a5c933 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -5,16 +5,6 @@ - @@ -974,6 +964,7 @@ isSwipeOrderActive(item, index) { return this.swipeOrder.id === item.id && this.swipeOrder.index === index && this.swipeOrder.progress > 0 }, + //滑动开始 startSwipeOrder(event, item, index) { const touch = event.touches && event.touches[0] if (!touch) return @@ -1004,6 +995,7 @@ const progress = Math.min(100, Math.round(deltaX / (trackWidth * 0.72) * 100)) this.setSwipeOrderProgress(progress) }, + //滑动结束 endSwipeOrder(item, index) { if (this.swipeOrder.id !== item.id || this.swipeOrder.index !== index) return if (this.swipeOrder.progress >= 92 && !this.swipeOrder.confirmed) { @@ -1174,6 +1166,7 @@ uni.hideLoading(); }).catch((res) => {}); }, + //广告跳转 goAdPage(item) { uni.navigateTo({ url: item.linkUrl + item.linkParams @@ -1208,6 +1201,7 @@ url: '/package2/seckill/seckillGroup' }) }, + //跳转到子页面 goDetail(type) { let url = '' switch (type) { @@ -1231,11 +1225,13 @@ url: url }) }, + //跳转到订单详情 goOrderDetail(item) { uni.navigateTo({ url: '/package1/order/orderDetail?id=' + item.id }); }, + //选择区域 onClickArea(item) { uni.setStorageSync('area', JSON.stringify(item)) this.areaName = item.title @@ -1272,6 +1268,7 @@ } }) }, + //获取筛选条件列表 getShopArea() { let that = this that.tui.request("/app/shopArea/getByParentId/" + that.searchForm.regionId, "GET", {}, false, true).then(( @@ -1287,6 +1284,7 @@ } }).catch((res) => {}) }, + //获取用户当前未完成订单 getUserOrders() { let that = this that.tui.request("/mall/order/getOrdersByUserId/" + uni.getStorageSync('id'), "GET", {}, false, true).then( @@ -1302,6 +1300,7 @@ } }).catch((res) => {}) }, + //点击下拉框中某一条筛选条件 searchOrder(type, value) { if (type == 'getarea') { if (this.searchForm.getAreaId == value.id) { @@ -1358,6 +1357,7 @@ fail: (err) => {} }); }, + //配送单列表切换 checkTab1(type) { this.checked = type if (type == 'waimai') { @@ -1395,6 +1395,7 @@ }); }).exec(); }, + //拨打电话 makeCall(phone) { uni.makePhoneCall({ phoneNumber: phone @@ -1406,9 +1407,11 @@ clearInterval(this.deliveryTimer); } }, + //筛选条件 checkAdd() { this.isgetArea = !this.isgetArea }, + //筛选条件 checkAdd1() { this.isputArea = !this.isputArea },