diff --git a/api/user.js b/api/user.js
index 859d176..4bc3aeb 100644
--- a/api/user.js
+++ b/api/user.js
@@ -56,7 +56,15 @@ export default {
},
orderQRCode:(order_id)=>request.get(`/api/merchant/order/${order_id}/verify-qrcode`),
detail:(orderid)=>request.get(`/api/order/${orderid}`),
- merchantRefund:(order_id)=>request.post(`/api/merchant/order/${order_id}/refund/apply`)
+ merchantRefund:(order_id)=>request.post(`/api/merchant/order/${order_id}/refund/apply`),
+ markup:{
+ status:{
+ pending:"PENDING",
+ accepted:"ACCEPTED"
+ },
+ get:(orderid)=>request.get(`/api/order-additional-fee/order/${orderid}`,{},{noTips:true}),
+ accept:(request_id)=>request.put(`/api/order-additional-fee/${request_id}/accept`)
+ }
},
coupon:{
status:{
diff --git a/app.json b/app.json
index bcc9b21..c85952c 100644
--- a/app.json
+++ b/app.json
@@ -24,7 +24,8 @@
"pages/shop/bill_success/index",
"pages/my/setting/name/index",
"pages/browser/index",
- "pages/my/promation/wx-group/index"
+ "pages/my/promation/wx-group/index",
+ "pages/order/markup/index"
],
"window": {
"navigationBarTextStyle": "black",
diff --git a/pages/help/package/index.js b/pages/help/package/index.js
index 55250b0..07fc67c 100644
--- a/pages/help/package/index.js
+++ b/pages/help/package/index.js
@@ -259,8 +259,8 @@ Page({
try{
uploadResult = await commonApi.uploadImg(file,onProgress);
}catch(e){
- await this.uploadImages();
- return;
+ // await this.uploadImages();
+ // return;
}
if(uploadResult.url){
this.setData({
@@ -270,6 +270,10 @@ Page({
await this.uploadImages();
}else{
//上传失败
+ wx.showToast({
+ icon:'error',
+ title: '图片上传失败',
+ })
return new Error('失败')
}
},
diff --git a/pages/my/promation/activities/index.js b/pages/my/promation/activities/index.js
index 89be779..3708509 100644
--- a/pages/my/promation/activities/index.js
+++ b/pages/my/promation/activities/index.js
@@ -21,10 +21,10 @@ Page({
*/
onLoad(options) {
this.setData({
- activityId:options.id
+ activityId:options.id||2
});
this.getActivityDetail();
- userApi.coupon.check(options.id).then((data)=>{
+ userApi.coupon.check(options.id||2).then((data)=>{
if(!data.can_receive){
this.setData({
isShowModal:true,
diff --git a/pages/my/promation/activities/index.wxss b/pages/my/promation/activities/index.wxss
index 3babba5..031ce05 100644
--- a/pages/my/promation/activities/index.wxss
+++ b/pages/my/promation/activities/index.wxss
@@ -13,7 +13,7 @@ page{
background-color: #fff;
border-radius: 24rpx;
padding:32rpx 40rpx 40rpx;
- margin-bottom:50rpx;
+ margin-bottom:24rpx;
box-shadow: 0px 4px 10px 2px rgba(222, 169, 0, 0.5);
position: relative;
z-index: 1;
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index 4dbf2a2..1879998 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -17,7 +17,7 @@ Page({
refresherTriggered:true,
genderKV:userApi.genderKV,
cancelling:false,
- isShowCancelView:false
+ isShowCancelView:false,
},
/**
@@ -41,7 +41,15 @@ Page({
orderDetail:data,
refresherTriggered:false
})
+ // return userApi.order.markup.get(this.data.orderId);
})
+ // .then((data)=>{
+ // const show = data.result==userApi.order.markup.status.pending&&
+ // this.data.orderDetail.status==this.data.orderStatus.received
+ // this.setData({
+ // isShowMarkupView:show
+ // })
+ // })
},
showCancelModal(){
this.setData({
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 37bcf0f..52b58b9 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -5,6 +5,10 @@
原因:
+
+ 配送员发起了加价申请,请点击查看
+
配送员
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
index 5d143c1..35930ee 100644
--- a/pages/order/detail/index.wxss
+++ b/pages/order/detail/index.wxss
@@ -39,11 +39,15 @@
.order-status.COMPLETED::before,.order-status.CANCELLED::before{
background-color:var(--main-font-color);
}
-.cancel-reason{
+.cancel-reason,.markup-tips{
background: rgba(255, 195, 0, 0.15);
border-radius: 18rpx;
padding:36rpx;
margin:20rpx;
+ color: var(--main-font-color);
+}
+.markup-tips.right-arrow::after{
+ right:20rpx;
}
.cancel-reason .reason{
font-weight: 500;
diff --git a/pages/order/markup/index.js b/pages/order/markup/index.js
new file mode 100644
index 0000000..45303a3
--- /dev/null
+++ b/pages/order/markup/index.js
@@ -0,0 +1,136 @@
+import userApi from '../../../api/user';
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ orderId:'',
+ applyDetail:{},
+ cancelling:false,
+ isShowCancelView:false,
+ isShowAcceptView:false,
+ refresherTriggered:false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ this.data.orderId = options.orderid;
+ this.getDetail();
+ },
+ getDetail(){
+ this.setData({
+ refresherTriggered:true
+ })
+ userApi.order.markup.get(this.data.orderId).then((data)=>{
+ this.setData({
+ applyDetail:data,
+ refresherTriggered:false
+ })
+ })
+ },
+ accept(){
+ this.setData({
+ isShowAcceptView:true
+ })
+ },
+ acceptRequest(){
+ userApi.order.markup.accept(this.data.applyDetail.id).then((data)=>{
+ wx.navigateBack({
+ success(){
+ wx.showToast({
+ title: '加价成功',
+ })
+ }
+ });
+ this.updatePrePage();
+ })
+ },
+
+ cancel(){
+ this.setData({
+ isShowCancelView:true
+ })
+ },
+ cancelOrder(){
+ this.setData({
+ cancelling:true
+ })
+ userApi.order.cancel(this.data.orderId).then(()=>{
+ wx.navigateBack({
+ success(){
+ wx.showToast({
+ title: '取消成功',
+ })
+ }
+ });
+ this.updatePrePage();
+ });
+ },
+ updatePrePage(){
+ const pages = getCurrentPages();
+ const prePage = pages[pages.length-2];
+ prePage.getOrderDetail();
+ },
+ makePhoneCall(){
+ wx.makePhoneCall({
+ phoneNumber: this.data.applyDetail.deliveryman_phone,
+ })
+ },
+ viewImage(event){
+ wx.previewImage({
+ urls: this.data.applyDetail.photo_urls,
+ current:event.currentTarget.dataset.item
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/order/markup/index.json b/pages/order/markup/index.json
new file mode 100644
index 0000000..a7a20e6
--- /dev/null
+++ b/pages/order/markup/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "modal-view":"/components/modalView"
+ }
+}
\ No newline at end of file
diff --git a/pages/order/markup/index.wxml b/pages/order/markup/index.wxml
new file mode 100644
index 0000000..06a7ac2
--- /dev/null
+++ b/pages/order/markup/index.wxml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 跑腿员
+
+
+
+ {{applyDetail.deliveryman_name}}
+
+
+
+
+ 加价原因
+
+ {{applyDetail.reason}}
+
+
+
+
+
+ 加价金额
+ {{applyDetail.additional_fee_amount}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/markup/index.wxss b/pages/order/markup/index.wxss
new file mode 100644
index 0000000..da54d3d
--- /dev/null
+++ b/pages/order/markup/index.wxss
@@ -0,0 +1,80 @@
+
+.page-container .head{
+ font-size: 34rpx;
+ font-weight: 500;
+}
+.page-container .spliter{
+ margin:30rpx 0;
+}
+.order-info{
+ color:#666666;
+ display: flex;
+ flex-direction: column;
+ gap: 36rpx;
+}
+.order-info::after{
+ right:20rpx;
+}
+.order-info .value{
+ font-size: 32rpx;
+ color:#222222;
+ margin-left:30rpx;
+}
+.delivery-man .info{
+ display:flex;
+ align-items: center;
+}
+.delivery-man .info .avatar{
+ width:100rpx;height:100rpx;
+ border-radius: 50%;
+}
+.delivery-man .info .name{
+ font-size: 32rpx;
+ font-weight: 600;
+ margin-left: 30rpx;
+ flex:1;
+}
+.delivery-man .info .button{
+ border-radius: 10rpx;
+ font-size: 24rpx;
+ font-weight: normal;
+}
+.delivery-man .info .button .icon{
+ width:24rpx;height:24rpx;
+}
+
+.reason-area .imgs{
+ display: flex;
+ margin-top:30rpx;
+ gap: 20rpx;
+}
+.reason-area .reason{
+ color:#555555;
+}
+.reason-area .imgs .item{
+ width:144rpx;height:144rpx;
+ border-radius: 12rpx;
+}
+.markup-money{
+ display: flex;
+ padding:40rpx 30rpx;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 32rpx;
+ font-weight: 500;
+}
+.markup-money .money{
+ font-size: 40rpx;
+}
+.bottom-bar-v2 .btns{
+ display: flex;
+ gap: 24rpx;
+}
+.bottom-bar-v2 .btns .cancel{
+ width:240rpx;
+ font-weight: normal;
+}
+.bottom-bar-v2 .btns .accept{
+ flex:1;
+ font-weight: 500;
+}
\ No newline at end of file