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

抢单验证弹窗

parent b86e799e
......@@ -33,6 +33,8 @@
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_close:'https://qn-static.banshouhui.com/close.png',
//登录注册页--
//通过code获取用户信息(登录)
......
......@@ -113,7 +113,7 @@
this.orderId = e.orderId
}
this.domain_name = getApp().globalData.domain_Name
//this.domain_name = getApp().globalData.domain_Name
//this.orderId = '10704466'
//getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0'
},
......@@ -258,7 +258,7 @@
finishClick: function () {
if(this.bottomTitle=='接单'){
this.robPost()
this.acceptPost()
return
}
uni.navigateTo({
......@@ -276,29 +276,31 @@
})
},
//抢单请求
////%@/worker/%@/order/%@/accept
robPost: function () {
console.log('抢单请求')
// /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder
//接单请求
acceptPost: function() {
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/revision/applets/'+
+'/wxh-sts-rest/rest/worker/'+
getApp().globalData.token
+'/order/acceptAppletsOrder',//%@/worker/%@/order/%@/receive
+'/order/'+this.orderId
+'/accept',
method: 'POST',
data: {
orderId:this.orderId
//orderId:this.orderId
},
header:{
'Content-Type': 'application/x-www-form-urlencoded'
//'Content-Type': 'application/x-www-form-urlencoded'
},
success: (res) => {
console.log('抢单请求 成功')
console.log('接单请求 成功')
console.log(res)
if(res.data.code==200){
uni.showToast({
icon:'none',
title:'接单成功'
})
this.getOrderDetail()
}else{
uni.showToast({
icon:'none',
......@@ -311,12 +313,18 @@
},
fail: (e) => {
console.log('抢单请求 失败')
console.log('接单请求 失败')
console.log(e)
uni.showToast({
icon:'none',
title:'接单请求 失败'
})
}
})
},
}
}
</script>
......
......@@ -744,13 +744,25 @@
//照片 点击
photoClick: function (item,ikey) {
console.log('照片点击')
console.log(item)
console.log(ikey)
if(ikey == 0){
this.addPhoto()
}else{
this.previewImage(ikey)
}
},
//照片预览
previewImage: function(ikey){
console.log('照片预览')
uni.previewImage({
urls: this.photo_tempFilePaths,
current:ikey-1
});
},
//照片 添加
addPhoto: function (){
let that = this
......@@ -761,6 +773,7 @@
success: function (res) {
console.log('照片添加成功')
that.getImageInfo(res)
//that.photoUpload(res)
},
error : function(e){
uni.showToast({
......@@ -800,17 +813,16 @@
}
},
//照片上传
photoUpload: function(res){
photoUpload: function(){
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({
mask: true,
title: '上传中'
......@@ -822,16 +834,18 @@
+'/wxh-worker-rest/rest/'+getApp().globalData.token
+/order/+this.orderId
+'/guarantee/image',
filePath: tempFilePaths[i],
filePath: this.photo_tempFilePaths[i],
name: 'yore'+i,
formData: {
//'qiniutoken': resToken.data.token
},
success: function (uploadFileRes) {
uni.hideLoading();
console.log('照片上传成功')
console.log(uploadFileRes)
uni.hideLoading();
that.finishConfirm()
// let upRes = JSON.parse(uploadFileRes.data);
// var photo = {
......@@ -840,7 +854,12 @@
// that.photoList.push(photo)
},
fail() {
uni.hideLoading();
console.log('照片上传失败')
uni.showToast({
icon:'none',
title:'照片上传失败'
})
}
});
......@@ -1113,6 +1132,10 @@
if(res.statusCode==200){
if(ths.photoList.length>0){
this.photoUpload()
return
}
this.finishConfirm()
}else{
......
......@@ -34,6 +34,17 @@
<view class="bottomView">
<image class="robImage" @click="robClick()" :src="icon_rob" mode=""></image>
</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>
</template>
......@@ -43,7 +54,12 @@
return {
orderId:'',
orderInfo:{},
icon_rob:''
icon_rob:'',
isPopShow:false,
popTitle:'',
popBtnTitle:'',
userType:0,
icon_close:''
}
},
onLoad(e) {
......@@ -53,7 +69,7 @@
}
//this.orderId ='10704469'
this.icon_rob = getApp().globalData.icon_rob
this.icon_close = getApp().globalData.icon_close
},
onShow() {
......@@ -145,6 +161,7 @@
var content = ''
var confirmText = ''
this.userType = data
//0 通过
if(data==0){
......@@ -160,18 +177,19 @@
//2没有认证通过
if(data==2){
content = '你的技能和区域信息等认证信息未完善'
content = '无法抢单!你的认证没有通过'
confirmText = '立即完善'
}
//3技能不匹配
if(data==3){
content = '无法抢单!您的区域或技能不符合工单要求'
content = '无法抢单!您的技能不匹配'
confirmText = '联系客服400-8834-123'
}
this.showPopView(content,confirmText)
/*
let that = this
console.log('11111')
uni.showModal({
title: '提示',
......@@ -183,9 +201,26 @@
},
})
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)
},
//确认按钮
modalConfirm: function (data) {
//1不是师傅
......@@ -207,6 +242,9 @@
//立即入驻
enterNow: function () {
console.log('立即入驻')
uni.navigateTo({
url:'/pages/take/web'
})
//https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40
},
......@@ -214,6 +252,9 @@
//立即完善
completeNow: function () {
console.log('立即完善')
uni.navigateTo({
url:'/pages/take/web'
})
//https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40
},
......@@ -247,7 +288,10 @@
console.log(res)
if(res.data.code==200){
uni.showToast({
icon:'none',
title:'抢单成功'
})
}else{
uni.showToast({
icon:'none',
......@@ -338,4 +382,63 @@
align-items: 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>
<template>
<view class="">
网页
<web-view src="https://system.banshouhui.com/weixiuapp/site/index.html#/?pioneerId=40"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
activeService:'家电服务',
count:'3',
phone:'400-8834-123'
}
},
onLoad(e) {
},
methods: {
//下单记录 点击
recordClick: function () {
uni.navigateTo({
url: '/pages/index/record'
})
},
}
}
</script>
<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