Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
和慭琛
take_order
Commits
0046f88c
Commit
0046f88c
authored
Dec 10, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抢单验证弹窗
parent
b86e799e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
192 additions
and
30 deletions
+192
-30
App.vue
take-order/App.vue
+2
-0
detail.vue
take-order/pages/take/detail.vue
+22
-14
finish.vue
take-order/pages/take/finish.vue
+32
-9
rob.vue
take-order/pages/take/rob.vue
+109
-6
web.vue
take-order/pages/take/web.vue
+27
-1
No files found.
take-order/App.vue
View file @
0046f88c
...
@@ -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获取用户信息(登录)
...
...
take-order/pages/take/detail.vue
View file @
0046f88c
...
@@ -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
.
rob
Post
()
this
.
accept
Post
()
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
>
...
...
take-order/pages/take/finish.vue
View file @
0046f88c
...
@@ -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
({
...
@@ -800,17 +813,16 @@
...
@@ -800,17 +813,16 @@
}
}
},
},
//照片上传
//照片上传
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
<
t
his
.
photo_t
empFilePaths
.
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
:
t
his
.
photo_t
empFilePaths
[
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
{
...
...
take-order/pages/take/rob.vue
View file @
0046f88c
...
@@ -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,9 +201,26 @@
...
@@ -183,9 +201,26 @@
},
},
})
})
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
)
},
//确认按钮
//确认按钮
modalConfirm
:
function
(
data
)
{
modalConfirm
:
function
(
data
)
{
//1不是师傅
//1不是师傅
...
@@ -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
:
272
rpx
;
width
:
520
rpx
;
height
:
372
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.closeView
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
100
rpx
;
display
:
flex
;
flex-direction
:
row-reverse
;
align-items
:
center
;
}
.closeIcon
{
background-color
:
#FFFFFF
;
margin-right
:
40
rpx
;
width
:
24
rpx
;
height
:
28
rpx
;
}
.popTitle
{
font-size
:
32
rpx
;
font-weight
:
bold
;
}
.popBtn
{
background-color
:
#2272FF
;
margin-top
:
106
rpx
;
width
:
410
rpx
;
height
:
84
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.popBtnTitle
{
color
:
#FFFFFF
;
font-size
:
32
rpx
;
}
</
style
>
</
style
>
take-order/pages/take/web.vue
View file @
0046f88c
<
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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment