新增开启接单
This commit is contained in:
parent
d75f6dbfc7
commit
53defb65fe
@ -28,6 +28,7 @@ export default {
|
|||||||
PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"审核未通过"
|
PENDING:"提现审核中",APPROVED:"平台受理成功",REJECTED:"审核未通过"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setDelivering:(is_delivering)=>request.put('/api/user/deliveryman/set_delivering',{is_delivering}),
|
||||||
|
|
||||||
uploadImg(file,progress){
|
uploadImg(file,progress){
|
||||||
if(!app)app = getApp();
|
if(!app)app = getApp();
|
||||||
@ -41,7 +42,11 @@ export default {
|
|||||||
url: request.baseUrl+'/api/upload/image',
|
url: request.baseUrl+'/api/upload/image',
|
||||||
success:(res)=>{
|
success:(res)=>{
|
||||||
const response = JSON.parse(res.data);
|
const response = JSON.parse(res.data);
|
||||||
rs(response.data);
|
if(response.code==200){
|
||||||
|
rs(response.data);
|
||||||
|
}else{
|
||||||
|
rj(response)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fail:(res)=>{
|
fail:(res)=>{
|
||||||
rj(res);
|
rj(res);
|
||||||
|
|||||||
3
app.wxss
3
app.wxss
@ -381,9 +381,12 @@ list-view{
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch{
|
switch{
|
||||||
|
width:84rpx;
|
||||||
}
|
}
|
||||||
switch .wx-switch-input{
|
switch .wx-switch-input{
|
||||||
background-color:#999999;
|
background-color:#999999;
|
||||||
|
width:84rpx;
|
||||||
|
height: 48rpx;
|
||||||
}
|
}
|
||||||
switch .wx-switch-input.wx-switch-input-checked{
|
switch .wx-switch-input.wx-switch-input-checked{
|
||||||
background-color:var(--main-color);
|
background-color:var(--main-color);
|
||||||
|
|||||||
@ -67,6 +67,13 @@
|
|||||||
border-color:red;
|
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{
|
.modal-view-main .btns{
|
||||||
margin-top:32rpx;
|
margin-top:32rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -67,7 +67,9 @@ Page({
|
|||||||
|
|
||||||
markupStatusKV:orderApi.markUp.statusKV,
|
markupStatusKV:orderApi.markUp.statusKV,
|
||||||
|
|
||||||
appConfig:{}
|
appConfig:{},
|
||||||
|
|
||||||
|
isShowConfirmDelivering:false
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice');
|
this.orderBackgroundNotice = this.selectComponent('#orderBackgroundNotice');
|
||||||
@ -601,6 +603,20 @@ Page({
|
|||||||
isStartLoopOrder:event.detail.value
|
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(){
|
navToAgreement(){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/browser/index?url=${this.data.appConfig.url_user_agreement}`,
|
url: `/pages/browser/index?url=${this.data.appConfig.url_user_agreement}`,
|
||||||
|
|||||||
@ -7,11 +7,11 @@
|
|||||||
<image class="icon" src="/assets/icon/community.png"/>
|
<image class="icon" src="/assets/icon/community.png"/>
|
||||||
<label>{{userInfo.community_name}}</label>
|
<label>{{userInfo.community_name}}</label>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="loop-order-switch">
|
<view class="start-order-switch">
|
||||||
<label>语音播报</label>
|
<label>
|
||||||
<view class="weui-loading" wx:if="{{bgNoticeLoadResult.loading}}"></view>
|
{{userInfo.is_delivering?'接单中':'暂停接单'}}
|
||||||
<view class="retry" wx:elif="{{bgNoticeLoadResult.error}}" bind:tap="bgNoticeRetry">重试</view>
|
</label>
|
||||||
<switch wx:else class="switch" checked="{{isStartLoopOrder}}" bindchange="loopOrderChange"/>
|
<switch class="switch" checked="{{userInfo.is_delivering}}" capture-catch:tap="switchOnTap"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -119,6 +119,11 @@
|
|||||||
</list-view>
|
</list-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="start-delivering" wx:if="{{userInfo&&userInfo.is_delivering==false}}">
|
||||||
|
<view>开启服务,立享配送收益</view>
|
||||||
|
<button class="button" type="primary" size="mini" bind:tap="switchOnTap">开启接单</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<page-container wx:if="{{isShowConfirm}}" model:show="{{isShowConfirm}}" position="bottom"
|
<page-container wx:if="{{isShowConfirm}}" model:show="{{isShowConfirm}}" position="bottom"
|
||||||
round class="confirm-sending" close-on-slide-down>
|
round class="confirm-sending" close-on-slide-down>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@ -160,6 +165,15 @@
|
|||||||
<view class="name">{{userInfo.nickname}}</view>
|
<view class="name">{{userInfo.nickname}}</view>
|
||||||
<view class="phone">{{userInfo.phone}}</view>
|
<view class="phone">{{userInfo.phone}}</view>
|
||||||
<view class="community-name">{{userInfo.community_name}}</view>
|
<view class="community-name">{{userInfo.community_name}}</view>
|
||||||
|
<view class="spliter spliter1"></view>
|
||||||
|
<view class="loop-order-switch">
|
||||||
|
<view>语音播报</view>
|
||||||
|
<view>
|
||||||
|
<view class="weui-loading" wx:if="{{bgNoticeLoadResult.loading}}"></view>
|
||||||
|
<view class="retry" wx:elif="{{bgNoticeLoadResult.error}}" bind:tap="bgNoticeRetry">重试</view>
|
||||||
|
<switch wx:else class="switch" checked="{{isStartLoopOrder}}" bindchange="loopOrderChange"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="spliter"></view>
|
<view class="spliter"></view>
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
@ -222,4 +236,8 @@
|
|||||||
|
|
||||||
<background-notice bind:onTrigger="findNewOrder" id="orderBackgroundNotice"
|
<background-notice bind:onTrigger="findNewOrder" id="orderBackgroundNotice"
|
||||||
start="{{isStartLoopOrder}}" bind:initSuccess="bgNoticeSuccess"
|
start="{{isStartLoopOrder}}" bind:initSuccess="bgNoticeSuccess"
|
||||||
bind:initError="bgNoticeError" bind:stop="stopBGNotice"/>
|
bind:initError="bgNoticeError" bind:stop="stopBGNotice"/>
|
||||||
|
|
||||||
|
<modal-view titleText="{{userInfo.is_delivering?'确定关闭接单吗?':'确定开启接单吗?'}}"
|
||||||
|
bind:ok="setDelivering" model:show="{{isShowConfirmDelivering}}"
|
||||||
|
content="{{userInfo.is_delivering?'关闭后用户无法下单,请慎重关闭~':''}}"/>
|
||||||
@ -8,11 +8,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.nav-bar .retry{
|
|
||||||
text-decoration: underline;
|
|
||||||
color: rgb(250, 67, 67);
|
|
||||||
padding:14rpx;
|
|
||||||
}
|
|
||||||
.nav-bar .left-btn{
|
.nav-bar .left-btn{
|
||||||
width:56rpx;
|
width:56rpx;
|
||||||
height:56rpx;
|
height:56rpx;
|
||||||
@ -31,7 +26,7 @@
|
|||||||
width:20rpx;height:20rpx;
|
width:20rpx;height:20rpx;
|
||||||
margin-right:8rpx;
|
margin-right:8rpx;
|
||||||
}
|
}
|
||||||
.nav-bar .loop-order-switch{
|
.nav-bar .start-order-switch{
|
||||||
background: rgba(255, 255, 255, 0.08);
|
background: rgba(255, 255, 255, 0.08);
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@ -42,13 +37,6 @@
|
|||||||
gap: 14rpx;
|
gap: 14rpx;
|
||||||
font-size: 28rpx;
|
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{
|
.head{
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: #111111;
|
background-color: #111111;
|
||||||
@ -460,8 +448,20 @@
|
|||||||
margin-top:60rpx;
|
margin-top:60rpx;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
.left-panel .user-info .spliter{
|
.left-panel .user-info .spliter.spliter1{
|
||||||
margin-top:82rpx;
|
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{
|
.left-panel .user-info .order-info{
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -540,4 +540,25 @@
|
|||||||
.left-panel .logout-btn:hover{
|
.left-panel .logout-btn:hover{
|
||||||
background-color: #fff!important;
|
background-color: #fff!important;
|
||||||
color:#222!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;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user