diff --git a/api/user.js b/api/user.js
index b0ea546..aad039c 100644
--- a/api/user.js
+++ b/api/user.js
@@ -28,6 +28,7 @@ export default {
PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"审核未通过"
}
},
+ setDelivering:(is_delivering)=>request.put('/api/user/deliveryman/set_delivering',{is_delivering}),
uploadImg(file,progress){
if(!app)app = getApp();
@@ -41,7 +42,11 @@ export default {
url: request.baseUrl+'/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/app.wxss b/app.wxss
index b83b1e1..d58503a 100644
--- a/app.wxss
+++ b/app.wxss
@@ -381,9 +381,12 @@ list-view{
}
switch{
+ width:84rpx;
}
switch .wx-switch-input{
background-color:#999999;
+ width:84rpx;
+ height: 48rpx;
}
switch .wx-switch-input.wx-switch-input-checked{
background-color:var(--main-color);
diff --git a/components/modalView/index.wxss b/components/modalView/index.wxss
index 173948e..df4db95 100644
--- a/components/modalView/index.wxss
+++ b/components/modalView/index.wxss
@@ -67,6 +67,13 @@
border-color:red;
}
+.custom-modal-view .content-text{
+ color: #666666;
+ font-size: 28rpx;
+ text-align: center;
+ margin:32rpx 0 40rpx 0;
+}
+
.modal-view-main .btns{
margin-top:32rpx;
display: flex;
diff --git a/pages/index/index.js b/pages/index/index.js
index a8565dc..afd6493 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -67,7 +67,9 @@ Page({
markupStatusKV:orderApi.markUp.statusKV,
- appConfig:{}
+ appConfig:{},
+
+ isShowConfirmDelivering:false
},
onLoad(){
this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice');
@@ -601,6 +603,20 @@ Page({
isStartLoopOrder:event.detail.value
})
},
+ switchOnTap(){
+ this.setData({
+ isShowConfirmDelivering:true
+ })
+ },
+ setDelivering(){
+ userApi.setDelivering(!this.data.userInfo.is_delivering).then(()=>{
+ return app.forceGetUserInfo();
+ }).then((data)=>{
+ this.setData({
+ userInfo:data
+ })
+ });
+ },
navToAgreement(){
wx.navigateTo({
url: `/pages/browser/index?url=${this.data.appConfig.url_user_agreement}`,
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 3267674..127b1f3 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -7,11 +7,11 @@
-->
-
-
-
- 重试
-
+
+
+
@@ -119,6 +119,11 @@
+
+ 开启服务,立享配送收益
+
+
+
@@ -160,6 +165,15 @@
{{userInfo.nickname}}
{{userInfo.phone}}
+
+
+ 语音播报
+
+
+ 重试
+
+
+
@@ -222,4 +236,8 @@
\ No newline at end of file
+ bind:initError="bgNoticeError" bind:stop="stopBGNotice"/>
+
+
\ No newline at end of file
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 97d1a34..ff42cea 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -8,11 +8,6 @@
display: flex;
align-items: center;
}
-.nav-bar .retry{
- text-decoration: underline;
- color: rgb(250, 67, 67);
- padding:14rpx;
-}
.nav-bar .left-btn{
width:56rpx;
height:56rpx;
@@ -31,7 +26,7 @@
width:20rpx;height:20rpx;
margin-right:8rpx;
}
-.nav-bar .loop-order-switch{
+.nav-bar .start-order-switch{
background: rgba(255, 255, 255, 0.08);
border-radius: 40rpx;
color: #fff;
@@ -42,13 +37,6 @@
gap: 14rpx;
font-size: 28rpx;
}
-.nav-bar .loop-order-switch .switch{
- width:84rpx;
-}
-.nav-bar .loop-order-switch .switch .wx-switch-input{
- width:84rpx;
- height: 48rpx;
-}
.head{
display: flex;
background-color: #111111;
@@ -460,8 +448,20 @@
margin-top:60rpx;
font-size: 34rpx;
}
-.left-panel .user-info .spliter{
- margin-top:82rpx;
+.left-panel .user-info .spliter.spliter1{
+ margin-top:50rpx;
+}
+.left-panel .user-info .loop-order-switch{
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 24rpx;
+ color: #222222;
+ padding:24rpx 0;
+}
+.loop-order-switch .retry{
+ text-decoration: underline;
+ color: rgb(250, 67, 67);
}
.left-panel .user-info .order-info{
display: flex;
@@ -540,4 +540,25 @@
.left-panel .logout-btn:hover{
background-color: #fff!important;
color:#222!important;
+}
+
+.start-delivering{
+ background-color: #222222;
+ font-weight: 500;
+ color:#ffffff;
+ position:fixed;
+ bottom:32rpx;
+ left:20rpx;
+ right:20rpx;
+ display: flex;
+ align-items: center;
+ border-radius: 18rpx;
+ justify-content: space-between;
+ padding:12rpx 12rpx 12rpx 34rpx;
+}
+.start-delivering .button{
+ margin:0;
+ font-size: 30rpx;
+ padding:22rpx;
+ line-height: 1;
}
\ No newline at end of file