diff --git a/api/common.js b/api/common.js index c1ddd42..07b215c 100644 --- a/api/common.js +++ b/api/common.js @@ -52,7 +52,11 @@ const commonApi = { url: `${request.baseUrl}${options.requestUrl||'/api/upload/image'}`, success:(res)=>{ const response = JSON.parse(res.data); - rs(response.data); + if(response.code==200){ + rs(response.data); + }else{ + rj(response) + } }, fail:(res)=>{ rj(res); diff --git a/api/user.js b/api/user.js index 2ed5215..cffeb5d 100644 --- a/api/user.js +++ b/api/user.js @@ -39,7 +39,7 @@ export default { DELIVERY_TO_ROOM:"敲门递件" }, /** - * noTips:存在未支付的订单,不需要 toast,然后弹窗跳转订单详情 + * noTips:存在未支付的订单,不需要 toast,然后弹窗跳转订单详情,然后接口提示消息单独写 * */ pre:(data)=>request.post('/api/order/pre-order',data,{noTips:true}), real:(data)=>request.post('/api/order',data), diff --git a/components/modalView/index.js b/components/modalView/index.js index df4e7cc..9ec35c9 100644 --- a/components/modalView/index.js +++ b/components/modalView/index.js @@ -97,9 +97,6 @@ Component({ * 组件的方法列表 */ methods: { - abc(event){ - console.log(event); - }, cancelButtonTap(){ this.setData({ _show:false diff --git a/components/modalView/index.wxss b/components/modalView/index.wxss index 96cf288..4baf113 100644 --- a/components/modalView/index.wxss +++ b/components/modalView/index.wxss @@ -73,7 +73,7 @@ color: #666666; font-size: 28rpx; text-align: center; - margin:16rpx 0 40rpx 0; + margin:32rpx 0 40rpx 0; } .custom-modal-view .content-textarea.error{ border-color:red; diff --git a/pages/help/index/index.js b/pages/help/index/index.js index 70264cf..57f238c 100644 --- a/pages/help/index/index.js +++ b/pages/help/index/index.js @@ -172,7 +172,8 @@ Page({ success:(res)=>{ this.setData({preOrdering:true}); let params = { - community_id:this.data.currentCommunity.id + community_id:this.data.currentCommunity.id, + delivery_date:res.data.delivery_date }; if(res.data.price_request.packages&&res.data.price_request.packages.length>0){ let realItem = []; @@ -209,6 +210,11 @@ Page({ if(data.code==400&&data.data&&data.data.orderid){ _setData.isShowPayModal = true; _setData.preOrderUnPayId = data.data.orderid; + }else{ + wx.showToast({ + icon:'error', + title: data.message, + }); } this.setData(_setData); })