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
954c80f7
Commit
954c80f7
authored
May 15, 2021
by
zhengzy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
8b9e1208
5649153d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
121 additions
and
113 deletions
+121
-113
order.js
src/common/api/order.js
+1
-1
index.vue
src/components/order/index.vue
+54
-43
index.vue
src/pages/index/index.vue
+10
-3
learn.vue
src/pages/index/learn.vue
+11
-4
section.vue
src/pages/learn/section.vue
+3
-1
index.vue
src/pages/login/index.vue
+0
-1
withdraw.vue
src/pages/mine/wallet/withdraw.vue
+7
-7
detail.vue
src/pages/order/detail.vue
+14
-45
refuse.vue
src/pages/order/refuse.vue
+2
-3
search.vue
src/pages/order/search.vue
+19
-5
No files found.
src/common/api/order.js
View file @
954c80f7
...
@@ -162,7 +162,7 @@ let orderApiFun = function(vm){
...
@@ -162,7 +162,7 @@ let orderApiFun = function(vm){
// 获取我的钱包-支付单一览
// 获取我的钱包-支付单一览
let
payableRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
settle
+
vm
.
vuex_token
+
'/payable/v2/queryPayableRecord'
,
params
,
formType
);
let
payableRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
settle
+
vm
.
vuex_token
+
'/payable/v2/queryPayableRecord'
,
params
,
formType
);
// 获取我的钱包-师傅提现
// 获取我的钱包-师傅提现
let
workerApplyPay
=
async
(
payableId
)
=>
await
vm
.
$u
.
post
(
`/wxh-worker-rest/rest/
${
vm
.
vuex_token
}
/applypay/
${
payableId
}
/workerApplyPay`
,
{},
dataType
);
let
workerApplyPay
=
async
(
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/applypay/batch/workerApplyPay'
);
const
orderApi
=
{
const
orderApi
=
{
listByRecommendOrder
,
listByRecommendOrder
,
...
...
src/components/order/index.vue
View file @
954c80f7
...
@@ -100,16 +100,6 @@
...
@@ -100,16 +100,6 @@
return
{
return
{
timeout
:
false
,
timeout
:
false
,
timestamp
:
0
,
timestamp
:
0
,
/** orderType
0 待接单、
1 待预约、
2 待签到、
3 待完工、
4 审核中、
5 异常单、
6 已完工
*/
orderType
:
0
};
};
},
},
computed
:
{
computed
:
{
...
@@ -213,44 +203,60 @@
...
@@ -213,44 +203,60 @@
},
},
orderDistance
()
{
orderDistance
()
{
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
])
return
this
.
distance
(
this
.
orderData
.
contactAddressLatitud
,
this
.
orderData
.
contactAddressLongitud
,
this
.
location
[
0
],
this
.
location
[
1
])
}
},
},
/** orderType
created
()
{
0 待接单、
/*
1 待预约、
orderStatus:
2 待签到、
待接单 orderStatus<31 工单状态小于31
3 待完工、
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
4 审核中、
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
5 异常单、
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
6 已完工
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
*/
*/
if
(
!
this
.
type
)
{
orderType
()
{
if
(
this
.
orderData
.
orderStatus
<
31
)
{
/*
this
.
orderType
=
0
orderStatus:
}
else
if
(
this
.
orderData
.
orderStatus
==
31
)
{
待接单 orderStatus<31 工单状态小于31
if
(
this
.
orderData
.
appointmentDatetime
)
{
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
this
.
orderType
=
2
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
*/
if
(
!
this
.
type
)
{
if
(
this
.
orderData
.
orderStatus
<
31
)
{
return
0
}
else
if
(
this
.
orderData
.
orderStatus
==
31
)
{
if
(
this
.
orderData
.
appointmentDatetime
)
{
return
2
}
else
{
return
1
}
}
else
if
(
this
.
orderData
.
orderStatus
>
31
&&
this
.
orderData
.
orderStatus
<
80
)
{
return
3
}
else
if
(
this
.
orderData
.
orderStatus
==
85
||
this
.
orderData
.
orderStatus
==
87
)
{
return
4
}
else
if
(
this
.
orderData
.
orderStatus
==
86
||
this
.
orderData
.
orderStatus
==
88
)
{
return
5
}
else
if
([
80
,
81
,
89
,
110
].
indexOf
(
this
.
orderData
.
orderStatus
)
!=
-
1
)
{
return
6
}
else
{
}
else
{
this
.
orderType
=
1
return
0
}
}
}
else
if
(
this
.
orderData
.
orderStatus
>
31
&&
this
.
orderData
.
orderStatus
<
80
)
{
this
.
orderType
=
3
}
else
if
(
this
.
orderData
.
orderStatus
==
85
||
this
.
orderData
.
orderStatus
==
87
)
{
this
.
orderType
=
4
}
else
if
(
this
.
orderData
.
orderStatus
==
86
||
this
.
orderData
.
orderStatus
==
88
)
{
this
.
orderType
=
5
}
else
if
([
80
,
81
,
89
,
110
].
indexOf
(
this
.
orderData
.
orderStatus
)
!=
-
1
)
{
this
.
orderType
=
6
}
else
{
}
else
{
this
.
orderType
=
0
return
this
.
types
[
this
.
type
]
}
}
}
else
{
}
this
.
orderType
=
this
.
types
[
this
.
type
]
},
created
()
{
this
.
updateTime
()
},
watch
:{
'orderData.currentCellTime'
(
val
)
{
// 从后台重新获取数据之后,时间重新计算
this
.
updateTime
()
}
}
this
.
timeout
=
this
.
orderData
.
currentOverTime
<
new
Date
().
getTime
()
this
.
timestamp
=
Math
.
round
(
Math
.
abs
(
this
.
orderData
.
currentOverTime
-
new
Date
().
getTime
())
/
1000
)
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
...
@@ -302,7 +308,12 @@
...
@@ -302,7 +308,12 @@
},
},
Rad
(
d
){
Rad
(
d
){
return
d
*
Math
.
PI
/
180.0
;
//经纬度转换成三角函数中度分表形式。
return
d
*
Math
.
PI
/
180.0
;
//经纬度转换成三角函数中度分表形式。
},
},
updateTime
()
{
var
time
=
new
Date
().
getTime
()
this
.
timeout
=
this
.
orderData
.
currentOverTime
<
time
this
.
timestamp
=
Math
.
round
(
Math
.
abs
(
this
.
orderData
.
currentOverTime
-
time
)
/
1000
)
}
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/index/index.vue
View file @
954c80f7
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
Customer
Customer
},
},
data
()
{
data
()
{
return
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location
:
[],
// 经纬度
location
:
[],
// 经纬度
title
:
false
,
title
:
false
,
...
@@ -249,10 +249,17 @@
...
@@ -249,10 +249,17 @@
if
(
self
.
search
.
pageNumber
==
1
)
{
if
(
self
.
search
.
pageNumber
==
1
)
{
self
.
orderList
=
[]
self
.
orderList
=
[]
}
}
if
(
res
.
data
.
list
)
{
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
);
// self.orderList.push(...res.data.list)
// 更新每一条时间戳,防止后台返回的数据和原先一样,不触发ordercell的时间计算
var
time
=
new
Date
().
getTime
()
for
(
var
item
of
res
.
data
.
list
)
{
item
.
currentCellTime
=
time
self
.
orderList
.
push
(
item
);
}
}
}
self
.
currentLoadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
&&
(
res
.
data
.
list
||
[]).
length
==
self
.
search
.
pageSize
?
'loadmore'
:
'nomore'
self
.
currentLoadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
&&
(
res
.
data
.
list
||
[]).
length
==
self
.
search
.
pageSize
?
'loadmore'
:
'nomore'
}
else
{
}
else
{
...
...
src/pages/index/learn.vue
View file @
954c80f7
...
@@ -657,6 +657,15 @@ export default {
...
@@ -657,6 +657,15 @@ export default {
let
examResult
=
res
.
data
.
examLevelResult
;
let
examResult
=
res
.
data
.
examLevelResult
;
this
.
examList
[
i
].
status
=
this
.
examList
[
i
].
status
=
examResult
!=
""
?
examResult
:
"未通过"
;
examResult
!=
""
?
examResult
:
"未通过"
;
//动态获取条件
let
ruleDisc
=
res
.
data
.
ruleDisc
;
let
targetIndex
=
ruleDisc
.
indexOf
(
'('
);
if
(
targetIndex
){
this
.
examList
[
i
].
condition
=
ruleDisc
.
substr
(
targetIndex
+
1
).
replace
(
')'
,
''
);
}
// examStatus 用户考试状态 0考试中 1考试完成 2未参与
// examStatus 用户考试状态 0考试中 1考试完成 2未参与
that
.
exam
=
res
.
data
;
that
.
exam
=
res
.
data
;
console
.
log
(
that
.
exam
);
console
.
log
(
that
.
exam
);
...
@@ -695,13 +704,11 @@ export default {
...
@@ -695,13 +704,11 @@ export default {
].
questionTime
;
].
questionTime
;
var
examInfo
=
this
.
examList
[
index
];
var
examInfo
=
this
.
examList
[
index
];
if
(
examInfo
.
examStatus
==
0
)
{
if
(
examInfo
.
examStatus
==
0
)
{
console
.
log
(
"这是试卷id"
,
examInfo
.
id
);
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"/pages/learn/answer?examId="
+
examInfo
.
id
,
// url: "/pages/learn/answer?examId=" + examInfo.id,
url
:
"/pages/learn/assessment?examId="
+
examInfo
.
id
,
});
});
}
else
if
(
examInfo
.
examStatus
==
1
)
{
}
else
if
(
examInfo
.
examStatus
==
1
)
{
// examInfo.status = '通过';
if
(
examInfo
.
status
==
"已通过"
)
{
if
(
examInfo
.
status
==
"已通过"
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
url
:
...
...
src/pages/learn/section.vue
View file @
954c80f7
...
@@ -266,6 +266,8 @@
...
@@ -266,6 +266,8 @@
param
.
status
=
this
.
status
=
1
param
.
status
=
this
.
status
=
1
}
else
if
(
nowTime
%
this
.
howTimeToUpdateLearnedStatus
!=
0
){
}
else
if
(
nowTime
%
this
.
howTimeToUpdateLearnedStatus
!=
0
){
return
return
}
else
{
param
.
status
=
0
;
}
}
this
.
$u
.
api
.
updateLearnCourses
(
param
).
then
((
res
)
=>
{}).
catch
((
err
)
=>
{
this
.
$u
.
api
.
updateLearnCourses
(
param
).
then
((
res
)
=>
{}).
catch
((
err
)
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
...
@@ -470,7 +472,7 @@
...
@@ -470,7 +472,7 @@
width
:
280rpx
;
width
:
280rpx
;
height
:
150rpx
;
height
:
150rpx
;
margin-right
:
23rpx
;
margin-right
:
23rpx
;
display
:
inline-
block
;
display
:
inline-
grid
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
20rpx
;
padding
:
20rpx
;
...
...
src/pages/login/index.vue
View file @
954c80f7
...
@@ -67,7 +67,6 @@ export default {
...
@@ -67,7 +67,6 @@ export default {
methods
:
{
methods
:
{
// 微信授权用户信息
// 微信授权用户信息
getUserProfile
()
{
getUserProfile
()
{
debugger
var
that
=
this
var
that
=
this
if
(
uni
.
getUserProfile
)
{
if
(
uni
.
getUserProfile
)
{
// 每次触发 uni.getUserProfile 均会弹出授权窗口,用户授权后可成功获取用户信息
// 每次触发 uni.getUserProfile 均会弹出授权窗口,用户授权后可成功获取用户信息
...
...
src/pages/mine/wallet/withdraw.vue
View file @
954c80f7
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
data
()
{
data
()
{
return
{
return
{
amount
:
0
,
amount
:
0
,
payableId
:
0
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -40,12 +39,13 @@
...
@@ -40,12 +39,13 @@
methods
:
{
methods
:
{
async
handleClick
()
{
async
handleClick
()
{
let
self
=
this
let
self
=
this
self
.
payableId
=
666
if
(
self
.
amount
)
{
let
res
=
await
self
.
$u
.
api
.
workerApplyPay
(
self
.
payableId
)
let
res
=
await
self
.
$u
.
api
.
workerApplyPay
()
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
)
{
self
.
$u
.
ruote
({
type
:
'redirect'
,
url
:
'pages/wallet/index'
})
self
.
$u
.
route
({
type
:
'redirect'
,
url
:
'pages/mine/wallet/index'
})
}
else
{
}
else
{
self
.
$u
.
toast
(
res
.
message
||
'系统异常,提现失败!'
);
self
.
$u
.
toast
(
res
.
message
||
'系统异常,提现失败!'
);
}
}
}
},
},
async
loadAssets
()
{
async
loadAssets
()
{
...
...
src/pages/order/detail.vue
View file @
954c80f7
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
</view>
</view>
<view
v-show=
"record.operationType==='报备' || record.operationType==='预约'|| record.operationType==='改约'"
>
<view
v-show=
"record.operationType==='报备' || record.operationType==='预约'|| record.operationType==='改约'"
>
<text>
{{
record
.
operationType
===
'报备'
?
'下次联系时间:'
:
record
.
operationType
===
'改约'
?
'改约时间:'
:
''
}}
</text>
<text>
{{
record
.
operationType
===
'报备'
?
'下次联系时间:'
:
record
.
operationType
===
'改约'
?
'改约时间:'
:
''
}}
</text>
<text
style=
"color: #2272FF;"
>
{{
record
.
orderRecordRemark
}}
</text>
<text
style=
"color: #2272FF;
word-break: break-all;
"
>
{{
record
.
orderRecordRemark
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"toolbar"
>
<view
v-if=
"showCenterBtn"
class=
"toolbar"
>
<!-- 背景,内容,请求接口 根据状态不同改变
{{
operationDoing
[
order
.
orderStatus
].
background
}}
-->
<!-- 背景,内容,请求接口 根据状态不同改变
{{
operationDoing
[
order
.
orderStatus
].
background
}}
-->
<!-- 过程反馈 -->
<!-- 过程反馈 -->
<view
class=
"left"
>
<view
class=
"left"
>
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view
class=
"right"
>
<view
class=
"right"
>
<view
v-if=
"errorSignIn || scenePhoto"
@
click=
"$u.throttle(handleClickRight, 500)"
:class=
"['button',
{'active': scenePhoto}]">
<view
v-if=
"errorSignIn || scenePhoto"
@
click=
"$u.throttle(handleClickRight, 500)"
:class=
"['button',
{'active': scenePhoto}]">
<text
>
{{
errorSignIn
?
'异常
签到'
:
'拍照'
}}
</text>
<text
:style=
"errorSignIn ? 'font-size:24rpx' : ''"
>
{{
errorSignIn
?
'异常
\
n
签到'
:
'拍照'
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -290,46 +290,15 @@
...
@@ -290,46 +290,15 @@
methods
:
{
methods
:
{
openLocation
(
address
){
openLocation
(
address
){
if
(
this
.
isAllowDianhuaAndDaohang
){
if
(
this
.
isAllowDianhuaAndDaohang
){
// uni.getLocation({
const
latitude
=
this
.
order
.
contactAddressLatitud
//res.latitude;
// type: 'gcj02', //返回可以用于uni.openLocation的经纬度
const
longitude
=
this
.
order
.
contactAddressLongitud
//res.longitude;
// success: function (res) {
uni
.
openLocation
({
const
latitude
=
this
.
order
.
contactAddressLatitud
//res.latitude;
latitude
:
Number
(
latitude
),
const
longitude
=
this
.
order
.
contactAddressLongitud
//res.longitude;
longitude
:
Number
(
longitude
),
uni
.
openLocation
({
success
:
function
()
{
latitude
:
Number
(
latitude
),
console
.
log
(
'success'
);
longitude
:
Number
(
longitude
),
}
success
:
function
()
{
});
console
.
log
(
'success'
);
}
});
// }
// ,
// complete: function(res) {
// if (res.errMsg.indexOf('auth') != -1) {
// uni.showModal({
// title: '提示',
// content: '获取权限失败,请到设置页面开启权限',
// confirmText: '好的',
// success(res) {
// if (res.confirm) {
// uni.openSetting({
// success(res) {
// console.log(res.authSetting)
// }
// });
// }
// }
// })
// } else if (res.errMsg) {
// // uni.setClipboardData({
// // data: address,
// // success: function () {
// // console.log('success');
// // }
// // });
// }
// }
}
}
},
},
phoneToCustomer
(
phone
){
// 联系客户
phoneToCustomer
(
phone
){
// 联系客户
...
@@ -682,6 +651,7 @@
...
@@ -682,6 +651,7 @@
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
&&
res
.
data
.
rejectable
){
if
(
res
.
data
&&
res
.
data
.
rejectable
){
this
.
$u
.
route
({
this
.
$u
.
route
({
type
:
'redirect'
,
url
:
'pages/order/refuse'
,
url
:
'pages/order/refuse'
,
params
:
{
params
:
{
orderId
:
this
.
order
.
orderId
,
orderId
:
this
.
order
.
orderId
,
...
@@ -725,7 +695,6 @@
...
@@ -725,7 +695,6 @@
* @return float 浮点数
* @return float 浮点数
*/
*/
distance
(
lat1
,
lng1
,
lat2
,
lng2
)
{
distance
(
lat1
,
lng1
,
lat2
,
lng2
)
{
console
.
log
(
lat1
,
lng1
,
lat2
,
lng2
)
var
radLat1
=
this
.
Rad
(
lat1
);
var
radLat1
=
this
.
Rad
(
lat1
);
var
radLat2
=
this
.
Rad
(
lat2
);
var
radLat2
=
this
.
Rad
(
lat2
);
var
a
=
radLat1
-
radLat2
;
var
a
=
radLat1
-
radLat2
;
...
@@ -810,6 +779,7 @@
...
@@ -810,6 +779,7 @@
overflow
:
auto
;
overflow
:
auto
;
margin-right
:
30rpx
;
margin-right
:
30rpx
;
margin-left
:
30rpx
;
margin-left
:
30rpx
;
margin-bottom
:
30rpx
;
.card
{
.card
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
...
@@ -1001,7 +971,6 @@
...
@@ -1001,7 +971,6 @@
}
}
.toolbar
{
.toolbar
{
margin-top
:
30rpx
;
margin-bottom
:
44rpx
;
margin-bottom
:
44rpx
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
...
...
src/pages/order/refuse.vue
View file @
954c80f7
...
@@ -116,9 +116,8 @@
...
@@ -116,9 +116,8 @@
let
res
=
await
self
.
$u
.
api
.
rejectOrder
(
self
.
formData
,
self
.
orderId
)
let
res
=
await
self
.
$u
.
api
.
rejectOrder
(
self
.
formData
,
self
.
orderId
)
self
.
submiting
=
false
self
.
submiting
=
false
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
)
{
uni
.
showToast
({
self
.
$u
.
toast
({
title
:
res
.
message
||
res
.
data
||
'拒单成功'
})
title
:
res
.
message
||
res
.
data
||
'拒单成功'
,
self
.
$u
.
route
({
type
:
'reLaunch'
,
url
:
'pages/index/index'
})
})
}
}
},
},
}
}
...
...
src/pages/order/search.vue
View file @
954c80f7
...
@@ -61,11 +61,20 @@
...
@@ -61,11 +61,20 @@
},
},
orderList
:
[],
orderList
:
[],
loaded
:
false
,
loaded
:
false
,
total
:
10
,
loadStaus
:
'loadmore'
,
};
};
},
},
onLoad
()
{
onLoad
()
{
// this.searchOrder()
// this.searchOrder()
},
},
onReachBottom
()
{
let
len
=
this
.
orderList
&&
this
.
orderList
.
length
||
0
if
(
!
this
.
loaded
||
len
>=
this
.
total
)
return
;
this
.
loadStaus
=
'loading'
;
this
.
search
.
pageNumber
=
++
this
.
search
.
pageNumber
;
this
.
getOrderList
(
'onReachBottom'
)
},
computed
:
{
computed
:
{
searchEmpty
()
{
searchEmpty
()
{
return
process
.
uniEnv
.
qn_base_url
+
'SearchEmpty.png'
return
process
.
uniEnv
.
qn_base_url
+
'SearchEmpty.png'
...
@@ -73,23 +82,29 @@
...
@@ -73,23 +82,29 @@
},
},
methods
:
{
methods
:
{
searchOrder
(
index
)
{
searchOrder
(
index
)
{
this
.
search
.
pageNumber
=
0
this
.
search
.
pageNumber
=
1
this
.
loadStaus
=
'loading'
;
this
.
getOrderList
()
this
.
getOrderList
()
},
},
// 页面数据
// 页面数据
getOrderList
()
{
getOrderList
(
event
)
{
let
self
=
this
;
let
self
=
this
;
if
(
!
self
.
search
.
keyword
)
{
if
(
!
self
.
search
.
keyword
)
{
return
false
return
false
}
}
// 状态处理
// 状态处理
self
.
search
.
pageNumber
+=
1
self
.
loaded
=
false
self
.
loaded
=
false
self
.
$u
.
api
.
listOrder
(
self
.
search
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listOrder
(
self
.
search
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
self
.
orderList
=
res
.
data
.
list
||
[]
let
list
=
res
.
data
.
list
||
[]
self
.
total
=
res
.
data
.
total
||
0
if
(
event
==
'onReachBottom'
)
{
self
.
orderList
.
push
(...
list
)
}
else
{
self
.
orderList
=
list
}
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
}
}
}
else
{
}
else
{
...
@@ -97,7 +112,6 @@
...
@@ -97,7 +112,6 @@
}
}
self
.
loaded
=
true
self
.
loaded
=
true
});
});
},
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
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