Commit 0046f88c authored by 和慭琛's avatar 和慭琛

抢单验证弹窗

parent b86e799e
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
icon_arrow_right:'https://qn-static.banshouhui.com/arrow_right.png', icon_arrow_right:'https://qn-static.banshouhui.com/arrow_right.png',
//照片添加 图标 //照片添加 图标
icon_photo_add:'https://qn-static.banshouhui.com/take_order/icon/photo_add.png', icon_photo_add:'https://qn-static.banshouhui.com/take_order/icon/photo_add.png',
//关闭 图标
icon_close:'https://qn-static.banshouhui.com/close.png',
//登录注册页-- //登录注册页--
//通过code获取用户信息(登录) //通过code获取用户信息(登录)
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
this.orderId = e.orderId this.orderId = e.orderId
} }
this.domain_name = getApp().globalData.domain_Name //this.domain_name = getApp().globalData.domain_Name
//this.orderId = '10704466' //this.orderId = '10704466'
//getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0' //getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0'
}, },
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
finishClick: function () { finishClick: function () {
if(this.bottomTitle=='接单'){ if(this.bottomTitle=='接单'){
this.robPost() this.acceptPost()
return return
} }
uni.navigateTo({ uni.navigateTo({
...@@ -276,29 +276,31 @@ ...@@ -276,29 +276,31 @@
}) })
}, },
//抢单请求 //接单请求
////%@/worker/%@/order/%@/accept acceptPost: function() {
robPost: function () {
console.log('抢单请求')
// /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/revision/applets/'+ +'/wxh-sts-rest/rest/worker/'+
getApp().globalData.token getApp().globalData.token
+'/order/acceptAppletsOrder',//%@/worker/%@/order/%@/receive +'/order/'+this.orderId
+'/accept',
method: 'POST', method: 'POST',
data: { data: {
orderId:this.orderId //orderId:this.orderId
}, },
header:{ header:{
'Content-Type': 'application/x-www-form-urlencoded' //'Content-Type': 'application/x-www-form-urlencoded'
}, },
success: (res) => { success: (res) => {
console.log('抢单请求 成功') console.log('接单请求 成功')
console.log(res) console.log(res)
if(res.data.code==200){ if(res.data.code==200){
uni.showToast({
icon:'none',
title:'接单成功'
})
this.getOrderDetail()
}else{ }else{
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
...@@ -311,12 +313,18 @@ ...@@ -311,12 +313,18 @@
}, },
fail: (e) => { fail: (e) => {
console.log('抢单请求 失败') console.log('接单请求 失败')
console.log(e) console.log(e)
uni.showToast({
icon:'none',
title:'接单请求 失败'
})
} }
}) })
}, },
} }
} }
</script> </script>
......
...@@ -744,13 +744,25 @@ ...@@ -744,13 +744,25 @@
//照片 点击 //照片 点击
photoClick: function (item,ikey) { photoClick: function (item,ikey) {
console.log('照片点击') console.log('照片点击')
console.log(item)
console.log(ikey) console.log(ikey)
if(ikey == 0){ if(ikey == 0){
this.addPhoto() this.addPhoto()
}else{
this.previewImage(ikey)
} }
}, },
//照片预览
previewImage: function(ikey){
console.log('照片预览')
uni.previewImage({
urls: this.photo_tempFilePaths,
current:ikey-1
});
},
//照片 添加 //照片 添加
addPhoto: function (){ addPhoto: function (){
let that = this let that = this
...@@ -761,6 +773,7 @@ ...@@ -761,6 +773,7 @@
success: function (res) { success: function (res) {
console.log('照片添加成功') console.log('照片添加成功')
that.getImageInfo(res) that.getImageInfo(res)
//that.photoUpload(res)
}, },
error : function(e){ error : function(e){
uni.showToast({ uni.showToast({
...@@ -801,16 +814,15 @@ ...@@ -801,16 +814,15 @@
} }
}, },
//照片上传 //照片上传
photoUpload: function(res){ photoUpload: function(){
let that = this let that = this
const tempFilePaths = res.tempFilePaths;
//官方仅支持单张上传 循环多张上传 //官方仅支持单张上传 循环多张上传
for(let i = 0;i < tempFilePaths.length; i++) { for(let i = 0;i < this.photo_tempFilePaths.length; i++) {
uni.showLoading({ uni.showLoading({
mask: true, mask: true,
title: '上传中' title: '上传中'
...@@ -822,16 +834,18 @@ ...@@ -822,16 +834,18 @@
+'/wxh-worker-rest/rest/'+getApp().globalData.token +'/wxh-worker-rest/rest/'+getApp().globalData.token
+/order/+this.orderId +/order/+this.orderId
+'/guarantee/image', +'/guarantee/image',
filePath: tempFilePaths[i], filePath: this.photo_tempFilePaths[i],
name: 'yore'+i, name: 'yore'+i,
formData: { formData: {
//'qiniutoken': resToken.data.token //'qiniutoken': resToken.data.token
}, },
success: function (uploadFileRes) { success: function (uploadFileRes) {
uni.hideLoading();
console.log('照片上传成功') console.log('照片上传成功')
console.log(uploadFileRes) console.log(uploadFileRes)
uni.hideLoading(); that.finishConfirm()
// let upRes = JSON.parse(uploadFileRes.data); // let upRes = JSON.parse(uploadFileRes.data);
// var photo = { // var photo = {
...@@ -840,7 +854,12 @@ ...@@ -840,7 +854,12 @@
// that.photoList.push(photo) // that.photoList.push(photo)
}, },
fail() { fail() {
uni.hideLoading();
console.log('照片上传失败') console.log('照片上传失败')
uni.showToast({
icon:'none',
title:'照片上传失败'
})
} }
}); });
...@@ -1113,6 +1132,10 @@ ...@@ -1113,6 +1132,10 @@
if(res.statusCode==200){ if(res.statusCode==200){
if(ths.photoList.length>0){
this.photoUpload()
return
}
this.finishConfirm() this.finishConfirm()
}else{ }else{
......
...@@ -34,6 +34,17 @@ ...@@ -34,6 +34,17 @@
<view class="bottomView"> <view class="bottomView">
<image class="robImage" @click="robClick()" :src="icon_rob" mode=""></image> <image class="robImage" @click="robClick()" :src="icon_rob" mode=""></image>
</view> </view>
<view class="shadowBackView" v-if="isPopShow">
<view class="centerView">
<view class="closeView">
<image class="closeIcon" @click="popCloseClick()" :src="icon_close" mode=""></image>
</view>
<text class="popTitle">{{popTitle}}</text>
<view class="popBtn" @click="popBtnClick()">
<text class="popBtnTitle">{{popBtnTitle}}</text>
</view>
</view>
</view>
</view> </view>
</template> </template>
...@@ -43,7 +54,12 @@ ...@@ -43,7 +54,12 @@
return { return {
orderId:'', orderId:'',
orderInfo:{}, orderInfo:{},
icon_rob:'' icon_rob:'',
isPopShow:false,
popTitle:'',
popBtnTitle:'',
userType:0,
icon_close:''
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -53,7 +69,7 @@ ...@@ -53,7 +69,7 @@
} }
//this.orderId ='10704469' //this.orderId ='10704469'
this.icon_rob = getApp().globalData.icon_rob this.icon_rob = getApp().globalData.icon_rob
this.icon_close = getApp().globalData.icon_close
}, },
onShow() { onShow() {
...@@ -145,6 +161,7 @@ ...@@ -145,6 +161,7 @@
var content = '' var content = ''
var confirmText = '' var confirmText = ''
this.userType = data
//0 通过 //0 通过
if(data==0){ if(data==0){
...@@ -160,18 +177,19 @@ ...@@ -160,18 +177,19 @@
//2没有认证通过 //2没有认证通过
if(data==2){ if(data==2){
content = '你的技能和区域信息等认证信息未完善' content = '无法抢单!你的认证没有通过'
confirmText = '立即完善' confirmText = '立即完善'
} }
//3技能不匹配 //3技能不匹配
if(data==3){ if(data==3){
content = '无法抢单!您的区域或技能不符合工单要求' content = '无法抢单!您的技能不匹配'
confirmText = '联系客服400-8834-123' confirmText = '联系客服400-8834-123'
} }
this.showPopView(content,confirmText)
/*
let that = this let that = this
console.log('11111') console.log('11111')
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
...@@ -183,7 +201,24 @@ ...@@ -183,7 +201,24 @@
}, },
}) })
console.log('22222') console.log('22222')
*/
},
//显示弹窗
showPopView: function(title,btnTitle){
this.isPopShow = true
this.popTitle = title
this.popBtnTitle = btnTitle
},
popCloseClick: function(){
this.isPopShow = false
},
//弹窗确认
popBtnClick: function(){
this.modalConfirm(this.userType)
}, },
//确认按钮 //确认按钮
...@@ -207,6 +242,9 @@ ...@@ -207,6 +242,9 @@
//立即入驻 //立即入驻
enterNow: function () { enterNow: function () {
console.log('立即入驻') console.log('立即入驻')
uni.navigateTo({
url:'/pages/take/web'
})
//https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40 //https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40
}, },
...@@ -214,6 +252,9 @@ ...@@ -214,6 +252,9 @@
//立即完善 //立即完善
completeNow: function () { completeNow: function () {
console.log('立即完善') console.log('立即完善')
uni.navigateTo({
url:'/pages/take/web'
})
//https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40 //https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40
}, },
...@@ -247,7 +288,10 @@ ...@@ -247,7 +288,10 @@
console.log(res) console.log(res)
if(res.data.code==200){ if(res.data.code==200){
uni.showToast({
icon:'none',
title:'抢单成功'
})
}else{ }else{
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
...@@ -338,4 +382,63 @@ ...@@ -338,4 +382,63 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.shadowBackView{
background-color: rgba(0,0,0,0.5);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.centerView{
background-color: #FFFFFF;
margin-top: 272rpx;
width: 520rpx;
height: 372rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.closeView{
background-color: #FFFFFF;
width: 100%;
height: 100rpx;
display: flex;
flex-direction: row-reverse;
align-items: center;
}
.closeIcon{
background-color: #FFFFFF;
margin-right: 40rpx;
width: 24rpx;
height: 28rpx;
}
.popTitle{
font-size: 32rpx;
font-weight: bold;
}
.popBtn{
background-color: #2272FF;
margin-top: 106rpx;
width: 410rpx;
height: 84rpx;
display: flex;
align-items: center;
justify-content: center;
}
.popBtnTitle{
color: #FFFFFF;
font-size: 32rpx;
}
</style> </style>
<template> <template>
<view class=""> <view class="">
网页 <web-view src="https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40"></web-view>
</view> </view>
</template> </template>
<script> <script>
export default {
data() {
return {
activeService:'家电服务',
count:'3',
phone:'400-8834-123'
}
},
onLoad(e) {
},
methods: {
//下单记录 点击
recordClick: function () {
uni.navigateTo({
url: '/pages/index/record'
})
},
}
}
</script> </script>
<style> <style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment