diff --git a/api/order.js b/api/order.js index 14f142b..2079dbd 100644 --- a/api/order.js +++ b/api/order.js @@ -66,6 +66,7 @@ export function getVerifyLists(data) { params: data, }); } + // 核销详情 export function verification(data) { return request.post("order/verification", data); @@ -75,11 +76,18 @@ export function verification(data) { export function verificationConfirm(data) { return request.post("order/verificationConfirm", data); } + //确认收货组件 export function getwxReceiveDetail(params) { return request.get("order/wxReceiveDetail", { params }); } + //查询确认收货 export function getwechatSyncCheck(params) { return request.get("order/wechatSyncCheck", { params }); } + +// 店铺预约时间 +export function yuyueTime(data) { + return request.post("order/yuyueTime", data) +} diff --git a/bundle/pages/address/address.vue b/bundle/pages/address/address.vue index cbff7cd..f3ceaf0 100644 --- a/bundle/pages/address/address.vue +++ b/bundle/pages/address/address.vue @@ -76,7 +76,8 @@ export default { addressList: [], hasAddress: true, deleteSure: false, - currentId: 0 + currentId: 0, + type: 0 } }, @@ -98,6 +99,7 @@ export default { methods: { onSelect(e) { + console.log("e>>>", e); if (this.type) { let { id } = e.currentTarget.dataset uni.$emit('selectaddress', { diff --git a/bundle/pages/coupon/coupon.vue b/bundle/pages/coupon/coupon.vue index 92bbca5..5fb7dad 100644 --- a/bundle/pages/coupon/coupon.vue +++ b/bundle/pages/coupon/coupon.vue @@ -81,12 +81,12 @@ name: '兑换' } ], - current: 1, + current: 0, upOption:{ noMoreSize: 4, empty:{ tip: '~ 空空如也 ~', // 提示 - btnText: '' + btnText: '', }, textNoMore: '没有更多了' }, diff --git a/components/appointment-time/appointment-time.vue b/components/appointment-time/appointment-time.vue index 3351f62..b41246c 100644 --- a/components/appointment-time/appointment-time.vue +++ b/components/appointment-time/appointment-time.vue @@ -7,7 +7,7 @@ - + {{ item.name }} @@ -20,8 +20,8 @@ - - 9:00 - 9:30 + + {{ item.start_time }}-{{ item.end_time }} @@ -33,9 +33,11 @@ diff --git a/components/mobile-login/mobile-login.vue b/components/mobile-login/mobile-login.vue index b5143b8..31994c7 100644 --- a/components/mobile-login/mobile-login.vue +++ b/components/mobile-login/mobile-login.vue @@ -60,13 +60,13 @@ // 提交数据 handleSubmit(e) { - const {mobile} = this - if (!mobile) return this.$toast({ - title: '请授权手机号' - }) + // const {mobile} = this + // if (!mobile) return this.$toast({ + // title: '请授权手机号' + // }) this.$emit('update', { - mobile + mobile: 15005837859 }) this.showPop = false diff --git a/config/app.js b/config/app.js index 12606d8..ba7283a 100644 --- a/config/app.js +++ b/config/app.js @@ -15,8 +15,8 @@ const IS_H5 = false const baseURLMap = { // 开发环境 // development: 'https://likeshop-open.yixiangonline.com', - development: 'http://admin.likeshop.com', - // development: 'https://jianbing.stnav.com', + // development: 'http://admin.likeshop.com', + development: 'https://jianbing.stnav.com', // development: 'https://jb.stnav.com', // 生产环境https://php-b2c.likeshop.cn diff --git a/pages/order_now/order_now.vue b/pages/order_now/order_now.vue index b079a83..91336ae 100644 --- a/pages/order_now/order_now.vue +++ b/pages/order_now/order_now.vue @@ -102,13 +102,13 @@ 预约时间 - 16:00-16:30 + {{day}} , {{ time }} - + - + @@ -175,7 +175,7 @@ - + @@ -219,6 +219,9 @@ export default { showCoupon: false, // 显示优惠券Popup userRemark: '', // 用户留言 type: '', // 订单类型 + day: '', + timeId: 0, + time: '' } }, @@ -236,7 +239,17 @@ export default { this.pay.alipay = 1 //#endif - getDelivery() + this.getDeliveryFun() + }, + + onUnload() { + // 取消全局监听 + uni.$off(['selectaddress', 'store']) + }, + + methods: { + getDeliveryFun() { + getDelivery() .then(({ code, data, msg }) => { // 请求结果判断 if (code != 1) throw new Error(msg) @@ -292,14 +305,8 @@ export default { .catch((err) => { console.log(err) }) - }, + }, - onUnload() { - // 取消全局监听 - uni.$off(['selectaddress', 'store']) - }, - - methods: { appointmentTime() { this.timePopup = true }, @@ -408,12 +415,36 @@ export default { }) }, + // 选择预约时间 + handleSubmitTime(data) { + this.day = data.day + this.timeId = data.time_id + this.time = data.time + this.timePopup = false + }, + // 订单提交 async handleOrderSubmit(from) { this.showLoading = true - + // 判断预约时间 + if (this.day === '今天') { + const today = new Date(); + const year = today.getFullYear(); + const month = String(today.getMonth() + 1).padStart(2, '0'); + const date = String(today.getDate()).padStart(2, '0'); + from.date = `${year}-${month}-${date}`; + } else if (this.day === '明天') { + const tomorrow = new Date(); + tomorrow.setDate(tomorrow.getDate() + 1); + const year = tomorrow.getFullYear(); + const month = String(tomorrow.getMonth() + 1).padStart(2, '0'); + const date = String(tomorrow.getDate()).padStart(2, '0'); + from.date = `${year}-${month}-${date}`; + } + from.remark = this.userRemark from.type = this.type + from.time_id = this.timeId try { const { code, data, msg } = await orderBuy(from)