修改消息提示

This commit is contained in:
2025-03-16 20:10:33 +08:00
parent b9036b650e
commit 06b3596533
5 changed files with 14 additions and 7 deletions

View File

@ -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);

View File

@ -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),

View File

@ -97,9 +97,6 @@ Component({
* 组件的方法列表
*/
methods: {
abc(event){
console.log(event);
},
cancelButtonTap(){
this.setData({
_show:false

View File

@ -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;

View File

@ -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);
})