Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
b4fb3328
Commit
b4fb3328
authored
May 17, 2021
by
Morson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
50d7fc1f
8356b206
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
217 additions
and
191 deletions
+217
-191
index.vue
src/components/order/index.vue
+24
-9
manifest.json
src/manifest.json
+6
-0
index.vue
src/pages/index/index.vue
+5
-2
learn.vue
src/pages/index/learn.vue
+29
-24
answer.vue
src/pages/learn/answer.vue
+29
-71
exam-pass.vue
src/pages/learn/exam-pass.vue
+30
-40
result.vue
src/pages/learn/result.vue
+31
-33
index.vue
src/pages/mine/contract/index.vue
+4
-3
detail.vue
src/pages/order/detail.vue
+59
-9
No files found.
src/components/order/index.vue
View file @
b4fb3328
...
...
@@ -10,9 +10,14 @@
<view
class=
"right-view"
>
{{
orderData
.
orderBusinessTypeText
}}
</view>
</view>
<view
class=
"content-view"
>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
<text>
{{
item
+
':'
}}
</text>
<text>
{{
orderData
[
key
]
}}
</text>
<view
class=
"info-view"
v-for=
"(item, key) in infoTexts"
:key=
"key"
>
<view
class=
"info-title"
>
<text>
{{
item
.
name
+
':'
}}
</text>
</view>
<view
class=
"info-content"
>
<text>
{{
orderData
[
key
]
}}
</text>
<text
v-if=
"item.content"
>
{{
' / '
+
orderData
[
item
.
content
]
}}
</text>
</view>
</view>
<view
class=
"address-view"
>
<view
class=
"address-left-view"
>
...
...
@@ -133,9 +138,10 @@
},
infoTexts
()
{
return
{
'orderNumber'
:
'工单编号'
,
'contactName'
:
'客户信息'
,
'contactPhone'
:
'联系方式'
'orderNumber'
:
{
name
:
'工单编号'
},
'partnerCompanyName'
:
{
name
:
'合作厂商'
},
'contactName'
:
{
name
:
'客户信息'
,
content
:
'contactPhone'
},
}
},
typeTexts
()
{
...
...
@@ -375,8 +381,17 @@
text-align
:
left
;
color
:
#333333
;
font-size
:
26rpx
;
margin-top
:
12rpx
;
margin-bottom
:
12rpx
;
margin-top
:
18rpx
;
margin-bottom
:
18rpx
;
display
:
flex
;
align-items
:
flex-start
;
.info-title
{
flex-shrink
:
0
;
}
.info-content
{
word-break
:
break-all
;
}
}
.address-view
{
...
...
@@ -385,7 +400,7 @@
justify-content
:
space-between
;
color
:
#333333
;
font-size
:
24rpx
;
margin-top
:
12
rpx
;
margin-top
:
20
rpx
;
.address-left-view
{
display
:
flex
;
...
...
src/manifest.json
View file @
b4fb3328
...
...
@@ -53,6 +53,9 @@
"ios"
:
{},
/*
ios打包配置
*/
"sdkConfigs"
:
{}
},
"uniStatistics"
:
{
"enable"
:
true
}
},
/*
SDK配置
*/
...
...
@@ -71,6 +74,9 @@
"scope.userLocation"
:
{
"desc"
:
"方便查看订单与你的距离"
}
},
"uniStatistics"
:
{
"enable"
:
true
}
},
"mp-alipay"
:
{
...
...
src/pages/index/index.vue
View file @
b4fb3328
...
...
@@ -158,6 +158,7 @@
}
else
{
this
.
waitInit
=
true
}
// 第一次入驻成功弹出客服弹窗
if
(
e
&&
e
.
visible
)
{
this
.
visible
=
e
.
visible
}
...
...
@@ -166,8 +167,10 @@
// 每次进入页面都刷新入驻状态
this
.
pageNumber
=
0
this
.
initSettleInfo
();
this
.
getLocation
()
this
.
initSettleInfo
();
if
(
this
.
status
==
7
)
{
this
.
getLocation
()
}
},
// onPullDownRefresh() {
// console.log('------下拉刷新------')
...
...
src/pages/index/learn.vue
View file @
b4fb3328
...
...
@@ -153,7 +153,7 @@ var json = {
{
title
:
"服务规范"
,
desc
:
"为用户提供更好服务,自己赚更多钱"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
id
:
173
,
...
...
@@ -162,7 +162,7 @@ var json = {
{
title
:
"接单规范"
,
desc
:
"快速学习,使用APP 接单、抢单"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"jdgf-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"jdgf-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
id
:
173
,
...
...
@@ -171,7 +171,7 @@ var json = {
{
title
:
"从0-1学习充电桩安装服务"
,
desc
:
"让你全面了解充电桩市场及服务规范"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
id
:
173
,
...
...
@@ -182,7 +182,7 @@ var json = {
{
title
:
"服务规范"
,
desc
:
"为用户提供更好服务,自己赚更多钱"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
id
:
150
,
...
...
@@ -191,7 +191,7 @@ var json = {
{
title
:
"接单规范"
,
desc
:
"快速学习,使用APP 接单、抢单"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"jdgf-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"jdgf-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
id
:
149
,
...
...
@@ -200,7 +200,7 @@ var json = {
{
title
:
"从0-1学习充电桩安装服务"
,
desc
:
"让你全面了解充电桩市场及服务规范"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
id
:
151
,
...
...
@@ -211,7 +211,7 @@ var json = {
{
title
:
"服务规范"
,
desc
:
"为用户提供更好服务,自己赚更多钱"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
sectionId
:
""
,
...
...
@@ -219,7 +219,7 @@ var json = {
{
title
:
"接单规范"
,
desc
:
"快速学习,使用APP 接单、抢单"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"jdgf-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"jdgf-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
sectionId
:
""
,
...
...
@@ -227,7 +227,7 @@ var json = {
{
title
:
"从0-1学习充电桩安装服务"
,
desc
:
"让你全面了解充电桩市场及服务规范"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"cdz-3x
-v2
.png"
,
percent
:
0
,
status
:
""
,
sectionId
:
""
,
...
...
@@ -242,7 +242,7 @@ var examJson = {
desc
:
"通过本认证,是接单的必要条件"
,
condition
:
"随机20题,及格20题"
,
status
:
""
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-3x.png"
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"fwgf-
e-
3x.png"
,
id
:
2
,
examId
:
""
,
examStatus
:
""
,
...
...
@@ -425,6 +425,12 @@ export default {
},
},
onShow
:
function
(
param
)
{
try
{
if
(
param
.
tabs
)
{
this
.
current
=
param
.
tabs
;
this
.
swiperCurrent
=
param
.
tabs
;
}
}
catch
(
e
)
{}
if
(
this
.
current
==
2
||
this
.
current
==
3
)
{
this
.
tabsChange
(
this
.
current
);
}
...
...
@@ -588,8 +594,8 @@ export default {
},
//tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
switch
(
index
)
{
this
.
swiperCurrent
=
Number
(
index
)
;
switch
(
this
.
swiperCurrent
)
{
case
1
:
this
.
loadNews
();
break
;
...
...
@@ -705,25 +711,24 @@ export default {
var
examInfo
=
this
.
examList
[
index
];
if
(
examInfo
.
examStatus
==
0
)
{
wx
.
navigateTo
({
// url: "/pages/learn/answer?examId=" + examInfo.id,
url
:
"/pages/learn/assessment?examId="
+
examInfo
.
id
,
});
}
else
if
(
examInfo
.
examStatus
==
1
)
{
let
url
=
''
;
if
(
examInfo
.
status
==
"已通过"
)
{
wx
.
navigateTo
({
url
:
"/pages/learn/exam-pass?userExamId="
+
examInfo
.
examId
,
});
url
=
"/pages/learn/exam-pass?userExamId="
+
examInfo
.
examId
+
"&examId="
+
examInfo
.
id
;
}
else
{
wx
.
navigateTo
({
url
:
"/pages/learn/result?userExamId="
+
url
=
"/pages/learn/result?userExamId="
+
examInfo
.
examId
+
"&examId="
+
examInfo
.
id
,
});
examInfo
.
id
}
wx
.
navigateTo
({
url
:
url
,
});
}
else
if
(
examInfo
.
examStatus
==
2
)
{
wx
.
navigateTo
({
url
:
"/pages/learn/assessment?examId="
+
examInfo
.
id
,
...
...
@@ -885,7 +890,7 @@ export default {
width
:
160
rpx
;
height
:
200
rpx
;
position
:
absolute
;
top
:
-4
5
rpx
;
bottom
:
5
rpx
;
left
:
30
rpx
;
}
...
...
src/pages/learn/answer.vue
View file @
b4fb3328
...
...
@@ -136,25 +136,22 @@ export default {
toSubmit
()
{
//判断是否通过,通过去成功页,失败去失败页
let
examInfo
=
this
.
examInfo
;
let
examId
=
this
.
examId
;
let
status
=
examInfo
.
examLevelResult
==
"已通过"
;
let
url
=
''
;
if
(
status
)
{
wx
.
navigateTo
({
url
:
"/pages/learn/exam-pass?userExamId="
+
url
=
"/pages/learn/exam-pass?userExamId="
+
this
.
userExamId
+
"&examId="
+
examId
,
});
this
.
examId
;
}
else
{
wx
.
navigateTo
({
url
:
"/pages/learn/result?userExamId="
+
url
=
"/pages/learn/result?userExamId="
+
this
.
userExamId
+
"&examId="
+
examId
,
});
this
.
examId
}
wx
.
redirectTo
({
url
:
url
,
});
},
contentFilter
(
txt
)
{
if
(
!
txt
)
{
...
...
@@ -172,7 +169,12 @@ export default {
this
.
getUserExamInfo
();
},
gotoLogin
()
{
uni
.
navigateTo
({
url
:
"/pages/login/wxlogin"
,
});
return
;
},
//获取考试信息
getUserExamInfo
:
function
()
{
uni
.
showLoading
({
...
...
@@ -201,10 +203,12 @@ export default {
return
;
}
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
uni
.
navigateTo
({
url
:
"/pages/login/wxlogin"
,
//提示 提交结果失败 请再次提交
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试结果失败,请再次尝试提交"
,
});
return
;
return
}
if
(
res
.
data
.
code
==
200
)
{
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
...
...
@@ -264,10 +268,8 @@ export default {
success
:
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
url
:
"/pages/login/wxlogin"
,
});
return
;
this
.
gotoLogin
();
return
}
if
(
res
.
data
.
code
==
200
)
{
...
...
@@ -347,11 +349,16 @@ export default {
success
:
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
url
:
"/pages/login/wxlogin"
,
});
this
.
gotoLogin
()
return
;
}
if
(
res
.
statusCode
==
403
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试结果失败,请再次尝试提交"
,
});
return
}
if
(
res
.
data
.
code
==
200
)
{
that
.
currentItem
=
res
.
data
.
data
;
console
.
log
(
that
.
currentItem
);
...
...
@@ -496,55 +503,6 @@ export default {
this
.
handleAnswer
();
//this.getNext()
},
//上传考试结果
postResult
:
function
()
{
uni
.
showLoading
({
title
:
"请稍候"
,
});
let
that
=
this
;
uni
.
request
({
url
:
ucenterApiUrl
+
"/v1/settled/update-settled-exam-score"
+
"?access-token="
+
that
.
vuex_token
,
method
:
"POST"
,
data
:
{
score
:
this
.
examScore
||
0
,
},
success
:
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
url
:
"/pages/login/wxlogin"
,
});
return
;
}
if
(
res
.
statusCode
==
200
)
{
// uni.navigateTo({
// url: '/pages/settle/prompt'
// })
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"上传考试结果失败"
,
});
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
();
uni
.
showToast
({
icon
:
"none"
,
title
:
"上传考试结果失败"
,
});
},
});
},
//所选答案
handleAnswer
:
function
()
{
/*
...
...
src/pages/learn/exam-pass.vue
View file @
b4fb3328
...
...
@@ -31,7 +31,7 @@ export default {
data
()
{
return
{
text
:
""
,
examId
:
2
,
examId
:
null
,
result
:
null
,
is_pass
:
false
,
score
:
0
,
...
...
@@ -39,54 +39,44 @@ export default {
};
},
onLoad
(
a
)
{
this
.
examId
=
a
.
examId
;
this
.
userExamId
=
a
.
userExamId
;
console
.
log
(
"userExamId是"
,
this
.
userExamId
);
this
.
nextClick
();
this
.
getCourseResult
();
},
onUnload
()
{
this
.
toIndex
()
},
// onUnload() {
// wx.reLaunch({
// url: "./index",
// });
// },
methods
:
{
//考试结果
nextClick
:
function
()
{
console
.
log
(
"wwwwwwwwww"
);
uni
.
request
({
url
:
process
.
uniEnv
.
systemUrl
.
apiUrl
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
this
.
result
=
res
.
data
.
data
;
this
.
text
=
res
.
data
.
data
.
examLevelResult
;
getCourseResult
:
function
()
{
this
.
$u
.
api
.
getExamResult
(
this
.
examId
)
.
then
((
res
)
=>
{
if
(
res
.
code
!=
200
)
{
console
.
log
(
"getUserExamInfo 200 err"
);
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试结果失败"
,
});
}
this
.
result
=
res
.
data
;
this
.
text
=
res
.
data
.
examLevelResult
;
this
.
score
=
this
.
result
.
examScore
;
this
.
is_pass
=
this
.
result
.
result
==
'通过'
;
console
.
log
(
"标识符55"
,
this
.
result
);
},
});
},
//再次考试
getAgain
:
function
()
{
wx
.
navigateTo
({
url
:
"/pages/learn/assessment"
,
});
})
.
catch
((
err
)
=>
{
console
.
log
(
"getUserExamInfo err"
+
err
);
uni
.
hideLoading
();
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试信息失败"
,
});
});
},
//下次再考跳转到学习主界面页面
toIndex
:
function
()
{
let
routes
=
getCurrentPages
();
// 获取当前打开过的页面路由数组
let
length
=
routes
.
length
uni
.
navigateBack
({
delta
:
length
-
1
uni
.
switchTab
({
url
:
'/pages/index/learn'
});
},
},
...
...
src/pages/learn/result.vue
View file @
b4fb3328
...
...
@@ -46,52 +46,50 @@ export default {
this
.
userExamId
=
a
.
userExamId
;
this
.
examId
=
a
.
examId
;
console
.
log
(
"userExamId是"
,
this
.
userExamId
);
this
.
nextClick
();
this
.
getCourseResult
();
},
onUnload
()
{
this
.
toIndex
()
},
// onUnload() {
// wx.reLaunch({
// url: "./index",
// });
// },
methods
:
{
//考试结果
nextClick
:
function
()
{
console
.
log
(
"wwwwwwwwww"
);
uni
.
request
({
url
:
process
.
uniEnv
.
systemUrl
.
apiUrl
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
this
.
result
=
res
.
data
.
data
;
this
.
text
=
res
.
data
.
data
.
examLevelResult
;
getCourseResult
:
function
()
{
this
.
$u
.
api
.
getExamResult
(
this
.
examId
)
.
then
((
res
)
=>
{
if
(
res
.
code
!=
200
)
{
console
.
log
(
"getUserExamInfo 200 err"
);
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试结果失败"
,
});
}
this
.
result
=
res
.
data
;
this
.
text
=
res
.
data
.
examLevelResult
;
this
.
score
=
this
.
result
.
examScore
;
console
.
log
(
"标识符55"
,
this
.
result
);
},
});
})
.
catch
((
err
)
=>
{
console
.
log
(
"getUserExamInfo err"
+
err
);
uni
.
hideLoading
();
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试信息失败"
,
});
});
},
//再次考试
getAgain
:
function
()
{
let
examId
=
this
.
examId
;
wx
.
navigateTo
({
let
routes
=
getCurrentPages
();
// 获取当前打开过的页面路由数组
console
.
log
(
routes
.
length
);
uni
.
navigateTo
({
url
:
"/pages/learn/assessment?examId="
+
examId
,
});
},
//下次再考跳转到学习主界面页面
toIndex
:
function
()
{
let
routes
=
getCurrentPages
();
// 获取当前打开过的页面路由数组
let
length
=
routes
.
length
uni
.
navigateBack
({
delta
:
length
-
1
uni
.
switchTab
({
url
:
'/pages/index/learn'
});
},
},
...
...
src/pages/mine/contract/index.vue
View file @
b4fb3328
...
...
@@ -101,9 +101,10 @@ export default {
}
.jf-currency-class
{
width
:
100%
;
min-height
:
180rpx
;
border-radius
:
12rpx
;
padding
-top
:
4
0rpx
;
margin-top
:
74
rpx
;
padding
:
2
0rpx
;
margin-top
:
80
rpx
;
background
:
#ffffff
;
position
:
relative
;
.left
{
...
...
@@ -111,7 +112,7 @@ export default {
height
:
200rpx
;
padding
:
30rpx
14rpx
0
14rpx
;
position
:
absolute
;
top
:
-4
0rpx
;
bottom
:
3
0rpx
;
left
:
30rpx
;
background
:
url(@/static/photo/hetong.png)
;
border-radius
:
6px
;
...
...
src/pages/order/detail.vue
View file @
b4fb3328
...
...
@@ -18,6 +18,10 @@
<text>
工单编号:
</text>
<text>
{{
order
.
orderNumber
}}
</text>
</view>
<view
class=
"order-cell"
>
<text>
合作厂商:
</text>
<text>
{{
order
.
partnerCompanyName
}}
</text>
</view>
<view
class=
"order-cell between-cell"
>
<view
class=
"left"
>
<text>
客户信息:
</text>
...
...
@@ -123,7 +127,7 @@
<view>
<u-toast
ref=
"uToast"
/>
</view>
<view
v-if=
"showCenterBtn"
@
click=
"$u.throttle(handleBtn, 500)"
class=
"button"
:class=
"['center-button-view', btnClass]"
>
<view
v-if=
"showCenterBtn"
@
click=
"$u.throttle(handleBtn, 500)"
class=
"button"
:class=
"['center-button-view', btnClass]"
>
<text>
{{
centerButtonText
}}
</text>
<view
v-if=
"order.currentOverTime && showTimeOut"
class=
"time-view"
>
<text
style=
"padding-right: 8rpx;"
>
{{
order
.
currentOverTime
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</text>
...
...
@@ -232,7 +236,8 @@
num
:
0
,
showTimeOut
:
true
,
clicking
:
false
,
dateItem
:
null
dateItem
:
null
,
centerBtnDisabled
:
false
}
},
onLoad
(
option
)
{
...
...
@@ -242,9 +247,14 @@
}
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
this
.
getLocation
()
//
this.getLocation()
this
.
getSignDistance
()
},
onHide
()
{
this
.
closeLocationChange
()
},
onUnload
()
{
this
.
closeLocationChange
()
},
computed
:
{
phoneIcon
()
{
...
...
@@ -301,6 +311,38 @@
});
}
},
updateLocation
(){
let
self
=
this
wx
.
startLocationUpdate
({
success
:
function
(){
self
.
openLocationChange
()
}
})
},
_locationChangeFn
(
res
)
{
let
self
=
this
console
.
log
(
'location change'
,
res
)
const
dataValue
=
this
.
dataValue
||
[]
dataValue
.
push
(
res
.
longitude
)
dataValue
.
push
(
res
.
latitude
)
self
.
dataValue
=
dataValue
if
(
this
.
getDistance
(
res
.
latitude
,
res
.
longitude
)
>
this
.
signDistance
){
// 计算签到距离
this
.
btnClass
=
"isGan-btn"
this
.
centerBtnDisabled
=
false
}
else
{
this
.
centerBtnDisabled
=
true
}
},
openLocationChange
(){
console
.
log
(
"openLocationChange"
)
wx
.
onLocationChange
(
this
.
_locationChangeFn
);
},
closeLocationChange
(){
console
.
log
(
"closeLocationChange"
)
wx
.
offLocationChange
(
this
.
_locationChangeFn
);
},
phoneToCustomer
(
phone
){
// 联系客户
if
(
this
.
isAllowDianhuaAndDaohang
){
uni
.
makePhoneCall
({
...
...
@@ -515,7 +557,8 @@
this
.
submitType
=
"maintainWorkerCheckin"
this
.
isAllowDianhuaAndDaohang
=
true
this
.
errorSignIn
=
true
this
.
addressToCoordinate
()
// this.addressToCoordinate()
this
.
updateLocation
()
}
else
if
(
orderStatus
>
31
&&
orderStatus
<
80
)
{
// 完工
this
.
centerButton
=
"filish"
...
...
@@ -554,9 +597,15 @@
}
data
.
appointmentDatetimeRange
=
this
.
appointmentDatetimeRange
.
pkey
}
else
if
(
this
.
submitType
===
'maintainWorkerCheckin'
)
{
// 签到
// 检查见到距离是否符合
if
(
!
this
.
isErrorSign
){
if
(
this
.
getDistance
(
this
.
contactAddressLatitud
,
this
.
contactAddressLongitud
)
>
this
.
signDistance
){
if
(
!
this
.
centerBtnDisabled
){
return
}
else
{
this
.
closeLocationChange
()
}
if
(
this
.
getDistance
()
>
this
.
signDistance
){
this
.
commonToast
(
'签到失败,请点击异常签到处理或联系客服'
,
'error'
)
return
}
...
...
@@ -603,13 +652,14 @@
}
})
}
else
{
let
self
=
this
this
.
$refs
.
uToast
.
show
({
title
:
res
.
data
.
message
!==
undefined
?
res
.
data
.
message
:
res
.
message
,
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type
:
'warning'
,
callback
:
function
()
{
this
.
clicking
=
false
res
.
data
.
message
===
'抱歉,手快的师傅已经抢到此单!'
?
this
.
isGan
():
''
res
.
data
.
message
===
'抱歉,手快的师傅已经抢到此单!'
?
self
.
isGan
():
''
}
})
}
...
...
@@ -683,7 +733,7 @@
});
},
getDistance
(
Latitud
,
Longitud
){
return
this
.
distance
(
Latitud
,
Longitud
,
this
.
dataValue
[
1
],
this
.
dataValue
[
0
])
return
this
.
distance
(
this
.
order
.
contactAddressLatitud
,
this
.
order
.
contactAddress
Longitud
,
this
.
dataValue
[
1
],
this
.
dataValue
[
0
])
},
/**
* echo distance(116.3896,39.91917,116.3940,39.91726);
...
...
@@ -720,7 +770,7 @@
var
nowTime
=
new
Date
();
// 当前时间
if
(
currentOverTime
&&
nowTime
.
getTime
()
>
currentOverTime
){
this
.
btnClass
=
'timeOut-btn'
self
.
$refs
[
'uCountDown'
].
seconds
+=
2
this
.
$refs
[
'uCountDown'
].
seconds
+=
2
}
},
handleClick
(){
...
...
@@ -1074,7 +1124,7 @@
.between-cell
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
flex-start
;
align-items
:
center
;
}
.display-cell
{
display
:
flex
;
...
...
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