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
8b91f718
Commit
8b91f718
authored
Apr 28, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/common/api/order.js
parents
37caa8cc
4eee97a2
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
2345 additions
and
1522 deletions
+2345
-1522
.env.dev.js
.env.dev.js
+4
-4
learn.js
src/common/api/learn.js
+1
-1
order.js
src/common/api/order.js
+60
-39
settled.js
src/common/api/settled.js
+1
-1
http.interceptor.js
src/common/http.interceptor.js
+2
-1
appoint-time.vue
src/components/appoint/appoint-time.vue
+160
-73
index.vue
src/components/order/index.vue
+18
-14
index.vue
src/components/popView/index.vue
+29
-8
index.vue
src/components/settle/index.vue
+10
-2
main.js
src/main.js
+14
-2
pages.json
src/pages.json
+9
-3
index.vue
src/pages/index/index.vue
+13
-10
answer.vue
src/pages/learn/answer.vue
+247
-156
assessment.vue
src/pages/learn/assessment.vue
+101
-143
curriculum.vue
src/pages/learn/curriculum.vue
+55
-14
index.vue
src/pages/learn/index.vue
+639
-468
result.vue
src/pages/learn/result.vue
+128
-81
section.vue
src/pages/learn/section.vue
+330
-334
detail.vue
src/pages/order/detail.vue
+288
-123
feedback.vue
src/pages/order/feedback.vue
+162
-17
index.vue
src/pages/order/index.vue
+19
-14
refuse.vue
src/pages/order/refuse.vue
+53
-12
prompt.vue
src/pages/settle/prompt.vue
+1
-1
sign-contract.vue
src/pages/settle/sign-contract.vue
+1
-1
No files found.
.env.dev.js
View file @
8b91f718
const
UNI_APP
=
{
const
UNI_APP
=
{
ucenterUrl
:
{
ucenterUrl
:
{
apiUrl
:
'http://
192.168.1.46
'
,
//php端域名请求头
apiUrl
:
'http://
rest-u.yunya.com
'
,
//php端域名请求头
xueUrl
:
'http://
192.168.1.46:8088'
,
//学院
xueUrl
:
'http://
xue.yunya.com'
,
//学院
// banshou: 'https://m.banshou.com', //扳手app
// banshou: 'https://m.banshou.com', //扳手app
},
},
systemUrl
:
{
systemUrl
:
{
apiUrl
:
'http://192.168.1.22'
,
//java端域名请求头
//
apiUrl: 'http://192.168.1.22', //java端域名请求头
//
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
apiUrl
:
'http://apidoc.banshouhui.com:3000/mock/31'
,
// mock端域名请求头
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
}
}
...
...
src/common/api/learn.js
View file @
8b91f718
...
@@ -7,7 +7,7 @@ let learnApiFun = function(vm){
...
@@ -7,7 +7,7 @@ let learnApiFun = function(vm){
let
getTrainingNoticeList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/notice/list'
,
params
);
let
getTrainingNoticeList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/notice/list'
,
params
);
/* 获取学习视频基本信息 */
/* 获取学习视频基本信息 */
let
CourseList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
collegeApiUrl
+
'/v1/course-details
?course_id=173
'
,
params
);
let
CourseList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
collegeApiUrl
+
'/v1/course-details'
,
params
);
/* 获取章节详情 */
/* 获取章节详情 */
let
ChapterDetails
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
collegeApiUrl
+
'/v1/chapter-sections'
,
params
);
let
ChapterDetails
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
collegeApiUrl
+
'/v1/chapter-sections'
,
params
);
/* 获取课程节信息*/
/* 获取课程节信息*/
...
...
src/common/api/order.js
View file @
8b91f718
import
util
from
'@/utils/util.js'
import
util
from
'@/utils/util.js'
// 接口公共前缀
const
prefix
=
'/wxh-worker-rest/rest/'
let
orderApiFun
=
function
(
vm
){
let
orderApiFun
=
function
(
vm
){
let
listByRecommendOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/recommend/order'
,
params
);
let
listByRecommendOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/recommend/order'
,
params
);
/**
/**
* 工单数量查询接口
* 工单数量查询接口
*/
*/
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/wokerOrder/queryOrdersCount/V2'
,
params
);
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/queryOrdersCount/V2'
,
params
);
/**
/**
* 工单列表接口
wxh-worker-rest/rest/order/revision/{token}/list
* 工单列表接口
*/
*/
let
listOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/list'
,
params
);
let
listOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/list'
,
params
);
/**
/**
* 获取师傅的预约日历
* 获取师傅的预约日历
*/
*/
let
workerCalendar
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/wokerOrder/appointment/calendar'
,
params
);
let
workerCalendar
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/calendar'
,
params
);
/**
/**
* 师傅预约
* 师傅预约
...
@@ -27,20 +29,20 @@ let orderApiFun = function(vm){
...
@@ -27,20 +29,20 @@ let orderApiFun = function(vm){
/**
/**
* 师傅签到接口
* 师傅签到接口
*/
*/
let
maintainWorkerCheckin
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintainWorkerCheckin'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
let
maintainWorkerCheckin
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintainWorkerCheckin'
,
params
,{
'content-type'
:
'application/x-www-form-urlencoded'
});
/**
/**
* 订单详情查询
* 订单详情查询
*/
*/
let
orderDetail
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
);
let
orderDetail
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
);
/* 过程反馈查询接口 */
/* 过程反馈查询接口 */
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rst/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/r
e
st/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
/* 预约+过程反馈 接口 */
/* 预约+过程反馈 接口 */
let
traceAndAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
)
let
traceAndAppointment
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/'
+
vm
.
vuex_token
+
`/
${
orderId
}
`
,
params
)
/* 师傅拒单 */
/* 师傅拒单 */
let
rejectOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/workerReject/V2'
,
params
)
let
rejectOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
`/order/
${
orderId
}
/workerReject/V2`
,
params
)
/**
/**
...
@@ -51,7 +53,7 @@ let orderApiFun = function(vm){
...
@@ -51,7 +53,7 @@ let orderApiFun = function(vm){
/**
/**
* 接单
* 接单
*/
*/
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
let
orderAccept
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/accept'
,
params
);
/**
/**
* 抢单
* 抢单
...
@@ -61,17 +63,33 @@ let orderApiFun = function(vm){
...
@@ -61,17 +63,33 @@ let orderApiFun = function(vm){
/**
/**
* 获取拍照标准
* 获取拍照标准
*/
*/
let
orderStandard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/photo/standard'
,
params
);
let
orderStandard
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/standard'
,
params
);
/**
/**
* 保存图片信息
* 保存图片信息
*/
*/
let
saveImage
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
'/wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveImage'
,
params
);
let
saveImage
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveImage'
,
params
);
/**
/**
* 获取师傅水印 or 默认水印
* 获取师傅水印 or 默认水印
*/
*/
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'wxh-worker-rest/rest/'
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
/**
* 获取师傅开放可选时间段
*/
let
openTimerange
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/appointment/timerange'
,
params
);
/**
* 联系时间接口
*/
let
contactTime
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/record/'
+
vm
.
vuex_token
+
'/contact/'
+
orderId
,
params
);
/**
* 检查是否可以拒单
*/
let
checkRejectable
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/'
+
vm
.
vuex_token
+
'/wokerOrder/checkRejectable'
,
params
);
/**
/**
* 获取订单的完工项目(配置+数据)
* 获取订单的完工项目(配置+数据)
...
@@ -105,6 +123,9 @@ let orderApiFun = function(vm){
...
@@ -105,6 +123,9 @@ let orderApiFun = function(vm){
orderStandard
,
orderStandard
,
saveImage
,
saveImage
,
getWatermark
,
getWatermark
,
openTimerange
,
contactTime
,
checkRejectable
,
getCompleteConfigAndData
,
getCompleteConfigAndData
,
getMeasure
,
getMeasure
,
saveCompleteData
saveCompleteData
...
...
src/common/api/settled.js
View file @
8b91f718
...
@@ -39,7 +39,7 @@ let settledApiFun = function(vm){
...
@@ -39,7 +39,7 @@ let settledApiFun = function(vm){
let
saveCourseRate
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/save-course-rate'
,
params
);
let
saveCourseRate
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
ucenterApiUrl
+
'/v1/settled/save-course-rate'
,
params
);
/* 获取消息内容列表 */
/* 获取消息内容列表 */
let
listByNotice
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/notice/list'
,
params
);
let
listByNotice
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
ucenterApiUrl
+
'/v1/notice/
home-
list'
,
params
);
const
settledApi
=
{
const
settledApi
=
{
getSettleBaseInfo
,
getSettleBaseInfo
,
...
...
src/common/http.interceptor.js
View file @
8b91f718
...
@@ -12,6 +12,7 @@ const globalUrl = process.uniEnv || {}
...
@@ -12,6 +12,7 @@ const globalUrl = process.uniEnv || {}
const
install
=
(
Vue
,
vm
)
=>
{
const
install
=
(
Vue
,
vm
)
=>
{
let
systemApiUrl
=
globalUrl
.
systemUrl
.
apiUrl
let
systemApiUrl
=
globalUrl
.
systemUrl
.
apiUrl
let
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
let
ucenterApiUrl
=
globalUrl
.
ucenterUrl
.
apiUrl
let
xueApiUrl
=
globalUrl
.
ucenterUrl
.
xueUrl
function
toLoginPage
(){
function
toLoginPage
(){
const
app
=
getApp
()
const
app
=
getApp
()
...
@@ -48,7 +49,7 @@ const install = (Vue, vm) => {
...
@@ -48,7 +49,7 @@ const install = (Vue, vm) => {
config
.
url
+=
'?access-token='
+
token
config
.
url
+=
'?access-token='
+
token
}
}
}
}
if
(
config
.
url
.
indexOf
(
ucenterApiUrl
)
>-
1
){
if
(
config
.
url
.
indexOf
(
ucenterApiUrl
)
>-
1
||
config
.
url
.
indexOf
(
xueApiUrl
)
>-
1
){
// php端增加header Authorization
// php端增加header Authorization
config
.
header
[
'Authorization'
]
=
token
config
.
header
[
'Authorization'
]
=
token
}
}
...
...
src/components/appoint/appoint-time.vue
View file @
8b91f718
<!-- 预约时间 -->
<!-- 预约时间 -->
<
template
>
<
template
>
<view
:class=
"
{'con-box':titleShow}">
<view
:class=
"
{'con-box':titleShow}">
<view
class=
"title"
v-if=
"titleShow"
>
{{
'预约时间'
}}
</view>
<view
class=
"title"
v-if=
"titleShow"
>
{{
title
}}
</view>
<view
class=
"u-m-t-40"
>
<view
class=
"u-m-t-40"
>
<view
class=
"appoint-box"
>
<view
class=
"appoint-box"
>
<view
class=
"select-date"
>
<view
class=
"select-date"
>
<view
class=
"u-flex u-row-between "
>
<view
class=
"u-flex u-row-between "
>
<view
class=
"txt"
>
选择日期
</view>
<view
class=
"txt"
>
选择日期
:
</view>
<view
class=
"txt active"
>
{{
dateList
[
currentDay
].
day
}}
</view>
<view
class=
"txt active"
>
{{
appointTime
|
datefmt
(
'YYYY.MM.DD'
)
}}
</view>
</view>
</view>
<view
class=
"u-m-t-30 u-flex u-row-between date-list"
>
<view
class=
"u-m-t-30 u-flex u-row-between date-list"
>
<view
:class=
"
{'date-item':true,'active':index===currentDay}"
<view
v-show=
"hasLast"
class=
"last"
@
click=
"lastWeek(dateList[0],dateList)"
>
<u-icon
name=
"arrow-left"
color=
"#2979ff"
size=
"28"
></u-icon>
</view>
<view
class=
"u-flex u-row-between date-box"
>
<view
:class=
"
{'date-item':true,'active':item.day===appointTime}"
@click="dateChange(item,index,dateList)" v-for="(item,index) in dateList" :key="index">
@click="dateChange(item,index,dateList)" v-for="(item,index) in dateList" :key="index">
<text
class=
"day"
>
{{
item
.
weekDay
}}
</text>
<text
class=
"day"
>
{{
item
.
day
|
datefmt
(
'周dd'
)
}}
</text>
<text
class=
"day day1"
>
{{
item
.
day
}}
</text>
<text
class=
"day day1"
>
{{
item
.
day
|
datefmt
(
'DD'
)
}}
</text>
</view>
</view>
</view>
<view
class=
"next"
@
click=
"
weekChange
"
>
<view
class=
"next"
@
click=
"
nextWeek(dateList[0],dateList)
"
>
<u-icon
name=
"arrow-right"
color=
"#2979ff"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#2979ff"
size=
"28"
></u-icon>
</view>
</view>
</view>
</view>
...
@@ -23,14 +28,18 @@
...
@@ -23,14 +28,18 @@
<!-- weekChange -->
<!-- weekChange -->
<view
class=
"select-time u-p-t-50"
>
<view
class=
"select-time u-p-t-50"
>
<view
class=
"u-flex u-row-between"
>
<view
class=
"u-flex u-row-between"
>
<view
class=
"txt"
>
选择时间
</view>
<view
class=
"txt"
>
选择时间
:
</view>
<view
class=
"txt active"
>
{{
currentTimeTxt
}}
</view>
<view
class=
"txt active"
>
{{
currentTimeTxt
}}
</view>
</view>
</view>
<view
class=
"u-p-t-30 u-flex u-flex-wrap time-list"
>
<view
class=
"u-p-t-30 u-flex u-flex-wrap time-list"
>
<view
@
click=
"timeChange(item,index,timeList)"
<view
:class=
"
{'time-item':true,'active': (currentTime
&&
index===currentTime)}" v-for="(item,index) in timeList"
:class=
"
{'time-item':true,'active': index===currentTime}" v-for="(item,index) in timeList"
:key="index">
:key="item.pkey">
<text
class=
"time"
>
{{
item
}}
</text>
<button
class=
"time"
:plain=
"true"
:disabled=
"item.disabled"
:hair-line=
"false"
@
click=
"timeChange(item,index,timeList)"
>
{{
item
.
name
}}
</button>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -41,45 +50,72 @@
...
@@ -41,45 +50,72 @@
</
template
>
</
template
>
<
script
>
<
script
>
let
now
=
Date
.
now
()
export
default
{
export
default
{
props
:
{
props
:
{
titleShow
:
{
titleShow
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
},
},
title
:
{
type
:
String
,
default
(){
return
"预约时间"
}
},
dateList
:
{
type
:
Array
,
default
(){
return
[
{
day
:
now
,
timeRange
:
[]},
{
day
:
now
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
5
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
6
*
86400000
),
timeRange
:
[]},
]
}
},
timeList
:
{
type
:
Array
,
default
(){
return
[
{
"name"
:
"06:00-08:00"
,
"pkey"
:
"appointment_range_8"
,
"disabled"
:
false
},
{
"name"
:
"08:00-10:00"
,
"pkey"
:
"appointment_range_10"
,
"disabled"
:
false
},
{
"name"
:
"10:00-12:00"
,
"pkey"
:
"appointment_range_12"
,
"disabled"
:
false
},
{
"name"
:
"12:00-14:00"
,
"pkey"
:
"appointment_range_14"
,
"disabled"
:
false
},
{
"name"
:
"14:00-16:00"
,
"pkey"
:
"appointment_range_16"
,
"disabled"
:
false
},
{
"name"
:
"16:00-18:00"
,
"pkey"
:
"appointment_range_18"
,
"disabled"
:
false
},
{
"name"
:
"18:00-20:00"
,
"pkey"
:
"appointment_range_20"
,
"disabled"
:
false
},
{
"name"
:
"20:00-22:00"
,
"pkey"
:
"appointment_range_22"
,
"disabled"
:
false
},
{
"name"
:
"22:00-24:00"
,
"pkey"
:
"appointment_range_24"
,
"disabled"
:
false
}
]
}
},
},
},
data
()
{
data
()
{
return
{
return
{
currentDay
:
0
,
currentDay
:
0
,
currentTime
:
null
,
currentTime
:
null
,
dateList
:
[{
appointTime
:
Date
.
now
(),
weekDay
:
'周三'
,
appointRange
:
""
,
day
:
'21'
,
num
:
0
,
},
{
hasLast
:
false
weekDay
:
'周四'
,
}
day
:
'22'
,
},
},
{
watch
:
{
weekDay
:
'周五'
,
title
()
{
day
:
'23'
,
this
.
currentDay
=
0
},
{
this
.
appointTime
=
Date
.
now
()
weekDay
:
'周六'
,
this
.
currentTime
=
null
day
:
'24'
,
this
.
appointRange
=
""
},
{
weekDay
:
'周日'
,
day
:
'25'
,
},
{
weekDay
:
'周一'
,
day
:
'26'
,
},
],
timeList
:
[
'06:00-08:00'
,
'08:00-10:00'
,
'10:00-12:00'
,
'12:00-14:00'
,
'14:00-16:00'
,
'16:00-18:00'
,
'18:00-20:00'
,
'20:00-22:00'
,
'22:00-24:00'
],
}
}
},
},
computed
:
{
computed
:
{
currentTimeTxt
()
{
currentTimeTxt
()
{
if
(
this
.
currentTime
!=
null
)
{
if
(
this
.
currentTime
!=
null
)
{
return
this
.
timeList
[
this
.
currentTime
]
return
this
.
timeList
[
this
.
currentTime
]
.
name
}
}
return
''
return
''
},
},
...
@@ -88,13 +124,16 @@
...
@@ -88,13 +124,16 @@
getDateList
()
{
getDateList
()
{
// 获取日期
// 获取日期
},
},
dateChange
(
item
,
index
,
list
)
{
async
dateChange
(
item
,
index
,
list
)
{
let
data
=
{
let
data
=
{
item
,
item
,
index
,
index
,
list
,
list
,
}
}
this
.
currentDay
=
index
this
.
currentDay
=
index
this
.
appointTime
=
item
.
day
this
.
currentTime
=
null
this
.
appointRange
=
""
this
.
$emit
(
'date-change'
,
data
)
this
.
$emit
(
'date-change'
,
data
)
},
},
timeChange
(
item
,
index
,
list
)
{
timeChange
(
item
,
index
,
list
)
{
...
@@ -104,6 +143,7 @@
...
@@ -104,6 +143,7 @@
list
,
list
,
}
}
this
.
currentTime
=
index
this
.
currentTime
=
index
this
.
appointRange
=
item
.
pkey
this
.
$emit
(
'time-change'
,
data
)
this
.
$emit
(
'time-change'
,
data
)
},
},
weekChange
(
item
,
index
,
list
)
{
weekChange
(
item
,
index
,
list
)
{
...
@@ -114,7 +154,34 @@
...
@@ -114,7 +154,34 @@
}
}
this
.
$emit
(
'week-change'
,
data
)
this
.
$emit
(
'week-change'
,
data
)
},
},
lastWeek
(
item
,
list
)
{
if
(
this
.
num
>
0
)
{
this
.
num
--
let
len
=
list
.
length
if
(
this
.
num
==
0
)
{
this
.
hasLast
=
false
len
++
}
let
time
=
item
.
day
-
len
*
86400000
let
data
=
{
time
:
time
,
num
:
this
.
num
}
this
.
$emit
(
'week-change'
,
data
)
}
},
nextWeek
(
item
,
list
)
{
this
.
hasLast
=
true
this
.
num
++
let
len
=
list
.
length
let
time
=
item
.
day
+
len
*
86400000
let
data
=
{
time
:
time
,
num
:
this
.
num
}
this
.
$emit
(
'week-change'
,
data
)
},
}
}
}
}
</
script
>
</
script
>
...
@@ -146,15 +213,18 @@
...
@@ -146,15 +213,18 @@
.date-list
{
.date-list
{
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
.
nex
t
{
.
las
t
{
width
:
60rpx
;
width
:
60rpx
;
height
:
120rpx
;
height
:
120rpx
;
line-height
:
120rpx
;
line-height
:
120rpx
;
text-align
:
center
;
text-align
:
center
;
border-
lef
t
:
2rpx
solid
#fff
;
border-
righ
t
:
2rpx
solid
#fff
;
}
}
.date-box
{
padding
:
20rpx
18rpx
16rpx
20rpx
;
width
:
568rpx
;
.date-item
{
.date-item
{
padding
:
20rpx
20rpx
16rpx
;
//
padding: 20rpx 20rpx 16rpx;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
.day
{
.day
{
...
@@ -189,16 +259,25 @@
...
@@ -189,16 +259,25 @@
}
}
}
}
}
}
.next
{
width
:
60rpx
;
height
:
120rpx
;
line-height
:
120rpx
;
text-align
:
center
;
border-left
:
2rpx
solid
#fff
;
}
}
.time-list
{
.time-list
{
justify-content
:
space-between
;
margin-bottom
:
-30rpx
;
margin-bottom
:
-30rpx
;
.time-item
{
.time-item
{
min-width
:
196rpx
;
min-width
:
196rpx
;
margin-right
:
21
rpx
;
// margin-right: 24
rpx;
margin-bottom
:
2
4
rpx
;
margin-bottom
:
2
0
rpx
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
26rpx
20rpx
24rpx
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
&
:nth-child
(
3n
)
{
&
:nth-child
(
3n
)
{
...
@@ -212,9 +291,17 @@
...
@@ -212,9 +291,17 @@
}
}
.time
{
.time
{
font-size
:
26rpx
;
font-size
:
26rpx
;
line-height
:
2
6rpx
;
line-height
:
7
6rpx
;
color
:
#999
;
color
:
#999
;
}
}
/
deep
/
button
{
padding
:
0
;
height
:
76rpx
;
}
/
deep
/
button
[
plain
]
{
border
:
none
;
}
}
}
}
}
</
style
>
</
style
>
src/components/order/index.vue
View file @
8b91f718
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<view
class=
"reason-view"
v-if=
"showReason"
><text>
未通过原因:
</text>
<view
class=
"reason-view"
v-if=
"showReason"
><text
class=
"reason-text"
>
未通过原因:
</text>
<text
class=
"reason-text"
>
{{
orderData
.
auditResults
.
remark
}}
</text>
<text>
{{
orderData
.
auditResults
.
remark
}}
</text>
</view>
</view>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<view>
<view>
...
@@ -78,13 +78,15 @@
...
@@ -78,13 +78,15 @@
}
}
}
}
},
},
// waitAccept:待接单、
/* 订单类型
// waitAppointment:待预约、
waitAccept:待接单、
// waitCheckIn:待签到、
waitAppointment:待预约、
// waitFinish:待完工、
waitCheckIn:待签到、
// review: 审核中、
waitFinish:待完工、
// exception:异常单、
audit: 审核中、
// finish:已完工
exception:异常单、
finish:已完工
*/
type
:
String
,
type
:
String
,
location
:
{
// 当前坐标
location
:
{
// 当前坐标
type
:
Array
,
type
:
Array
,
...
@@ -156,7 +158,7 @@
...
@@ -156,7 +158,7 @@
.
orderBusinessType
!=
'R'
)
.
orderBusinessType
!=
'R'
)
},
},
showTime
()
{
showTime
()
{
return
[
4
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
return
[
4
,
5
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
},
},
infoTexts
()
{
infoTexts
()
{
return
{
return
{
...
@@ -222,7 +224,7 @@
...
@@ -222,7 +224,7 @@
'waitAppointment'
:
1
,
// 待预约、
'waitAppointment'
:
1
,
// 待预约、
'waitCheckIn'
:
2
,
// 待签到、
'waitCheckIn'
:
2
,
// 待签到、
'waitFinish'
:
3
,
// 待完工、
'waitFinish'
:
3
,
// 待完工、
'
review
'
:
4
,
// 审核中、
'
audit
'
:
4
,
// 审核中、
'exception'
:
5
,
// 异常单、
'exception'
:
5
,
// 异常单、
'finish'
:
6
,
//已完工
'finish'
:
6
,
//已完工
}
}
...
@@ -367,10 +369,12 @@
...
@@ -367,10 +369,12 @@
text-align
:
left
;
text-align
:
left
;
margin-top
:
30rpx
;
margin-top
:
30rpx
;
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#666666
;
.reason-text
{
color
:
#FA5A49
;
color
:
#FA5A49
;
display
:
flex
;
align-items
:
flex-start
;
.reason-text
{
flex-shrink
:
0
;
color
:
#666666
;
}
}
}
}
...
...
src/components/popView/index.vue
View file @
8b91f718
...
@@ -7,6 +7,11 @@
...
@@ -7,6 +7,11 @@
<text>
{{
title
}}
</text>
<text>
{{
title
}}
</text>
</view>
</view>
<view
class=
"line-view"
/>
<view
class=
"line-view"
/>
<view
class=
"order-content"
>
<view
v-if=
"count"
>
你本月还有
<text
class=
"order-content-count"
>
{{
count
}}
</text>
次拒单机会
</view>
</view>
<view
class=
"order-pop-text"
>
<view
class=
"order-pop-text"
>
<text>
{{
message
}}
</text>
<text>
{{
message
}}
</text>
</view>
</view>
...
@@ -16,7 +21,7 @@
...
@@ -16,7 +21,7 @@
取消
取消
</u-button>
</u-button>
<u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary"
@
click=
"handleClickSure"
>
<u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary"
@
click=
"handleClickSure"
>
查看
{{
buttonText
}}
</u-button>
</u-button>
</view>
</view>
</view>
</view>
...
@@ -30,6 +35,11 @@
...
@@ -30,6 +35,11 @@
visible
:
Boolean
,
visible
:
Boolean
,
title
:
String
,
title
:
String
,
message
:
String
,
message
:
String
,
count
:
Number
,
// 剩余次数
buttonText
:
{
// 确定按钮
type
:
String
,
default
:
'查看'
},
},
},
data
()
{
data
()
{
return
{}
return
{}
...
@@ -76,21 +86,32 @@
...
@@ -76,21 +86,32 @@
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.order-pop-view
{
.order-pop-view
{
padding
:
30rpx
;
padding
:
30rpx
;
min-height
:
520rpx
;
.order-pop-title
{
.order-pop-title
{
font-size
:
40rpx
;
font-size
:
40rpx
;
margin-top
:
4
0rpx
;
margin-top
:
3
0rpx
;
margin-bottom
:
40
rpx
;
margin-bottom
:
34
rpx
;
text-align
:
center
;
text-align
:
center
;
color
:
#333333
;
color
:
#333333
;
}
}
.order-content
{
min-height
:
14rpx
;
text-align
:
center
;
color
:
#333333
;
font-size
:
32rpx
;
margin-top
:
26rpx
;
.order-content-count
{
color
:
#FA5A49
;
}
}
.order-pop-text
{
.order-pop-text
{
color
:
#999999
;
color
:
#999999
;
text-align
:
center
;
text-align
:
center
;
margin-top
:
4
0rpx
;
margin-top
:
3
0rpx
;
font-size
:
28rpx
;
font-size
:
28rpx
;
margin-bottom
:
26
0rpx
;
// margin-bottom: 18
0rpx;
}
}
.line-view
{
.line-view
{
...
...
src/components/settle/index.vue
View file @
8b91f718
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<u-navbar
style=
"position: absolute;"
title=
"入驻"
background=
"
{background: transparent}" :border-bottom="false"
<u-navbar
style=
"position: absolute;"
title=
"入驻"
background=
"
{background: transparent}" :border-bottom="false"
back-icon-color="#ffffff" title-color="#ffffff">
</u-navbar>
back-icon-color="#ffffff" title-color="#ffffff">
</u-navbar>
<image
:src=
"url"
style=
"width: 100%;"
mode=
"widthFix"
></image>
<image
:src=
"url"
style=
"width: 100%;"
mode=
"widthFix"
></image>
<view
class=
"introduction
"
>
<view
:class=
"['introduction',
{'active': type}]
">
<slot></slot>
<slot></slot>
</view>
</view>
<view
class=
"settle-bottom"
>
<view
class=
"settle-bottom"
>
...
@@ -18,6 +18,11 @@
...
@@ -18,6 +18,11 @@
index
:
{
index
:
{
type
:
Number
,
type
:
Number
,
default
:
1
default
:
1
},
// 0: introduction距离底部168rpx 1: introduction距离底部0rpx
type
:
{
type
:
Number
,
default
:
0
}
}
},
},
data
()
{
data
()
{
...
@@ -46,6 +51,9 @@
...
@@ -46,6 +51,9 @@
bottom
:
168rpx
;
bottom
:
168rpx
;
left
:
30rpx
;
left
:
30rpx
;
right
:
30rpx
;
right
:
30rpx
;
&
.active
{
bottom
:
0rpx
;
}
}
}
.settle-bottom
{
.settle-bottom
{
...
...
src/main.js
View file @
8b91f718
import
Vue
from
'vue'
import
Vue
from
'vue'
import
moment
from
'moment'
import
App
from
'./App'
import
App
from
'./App'
import
uView
from
"uview-ui"
;
import
uView
from
"uview-ui"
;
import
vuexStore
from
"@/store/$u.mixin.js"
;
import
vuexStore
from
"@/store/$u.mixin.js"
;
...
@@ -15,6 +16,17 @@ const app = new Vue({
...
@@ -15,6 +16,17 @@ const app = new Vue({
...
App
...
App
})
})
// 引入时间组件 moment
moment
.
locale
(
'zh-cn'
);
Vue
.
prototype
.
moment
=
moment
Vue
.
filter
(
'datefmt'
,
function
(
input
,
fmtstring
)
{
//当input为时间戳,需转为Number类型
if
(
input
){
return
moment
(
input
).
format
(
fmtstring
);
}
else
{
return
""
;
}
});
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
import
httpInterceptor
from
'@/common/http.interceptor.js'
import
httpInterceptor
from
'@/common/http.interceptor.js'
Vue
.
use
(
httpInterceptor
,
app
)
Vue
.
use
(
httpInterceptor
,
app
)
...
...
src/pages.json
View file @
8b91f718
...
@@ -325,8 +325,9 @@
...
@@ -325,8 +325,9 @@
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
},
{
{
"name"
:
"工单搜索"
,
//
gaomingbo
"path"
:
"pages/order/search"
,
"name"
:
"工单-过程反馈"
,
"path"
:
"pages/order/feedback"
,
"query"
:
""
"query"
:
""
},
},
{
{
...
@@ -368,6 +369,11 @@
...
@@ -368,6 +369,11 @@
"name"
:
"订单 - 拒单"
,
//模式名称
"name"
:
"订单 - 拒单"
,
//模式名称
"path"
:
"pages/order/refuse"
,
//启动页面,必选
"path"
:
"pages/order/refuse"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"订单 - 过程反馈"
,
//模式名称
"path"
:
"pages/order/feedback"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
}
]
]
}
}
...
...
src/pages/index/index.vue
View file @
8b91f718
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
</view>
</view>
<image
class=
"right-icon"
:src=
"shouyeyouImage"
></image>
<image
class=
"right-icon"
:src=
"shouyeyouImage"
></image>
</view>
</view>
<view
class=
"line-view"
v-if=
"index !=
2
"
></view>
<view
class=
"line-view"
v-if=
"index !=
1
"
></view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 订单推荐吸顶 -->
<!-- 订单推荐吸顶 -->
<u-sticky>
<u-sticky
offset-top=
"60"
>
<view
class=
"sticky"
>
<view
class=
"sticky"
>
<text>
订单推荐
</text>
<text>
订单推荐
</text>
</view>
</view>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',
5=>'已签约',6=>'未支付保证金
',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',
6=>'已签约
',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location
:
[
116.3896
,
39.91917
],
// 经纬度
location
:
[
116.3896
,
39.91917
],
// 经纬度
title
:
false
,
title
:
false
,
title
:
"Hello"
,
title
:
"Hello"
,
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
search
:
{
search
:
{
token
:
""
,
token
:
""
,
pageNumber
:
0
,
pageNumber
:
0
,
pageSize
:
10
0
,
pageSize
:
10
,
},
},
bottomLoading
:
false
bottomLoading
:
false
};
};
...
@@ -179,8 +179,8 @@
...
@@ -179,8 +179,8 @@
self
.
$u
.
api
.
listByNotice
().
then
((
res
)
=>
{
self
.
$u
.
api
.
listByNotice
().
then
((
res
)
=>
{
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
3
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
2
)
{
self
.
messageList
=
res
.
data
.
slice
(
0
,
3
);
self
.
messageList
=
res
.
data
.
slice
(
0
,
2
);
}
else
{
}
else
{
self
.
messageList
=
res
.
data
||
[];
self
.
messageList
=
res
.
data
||
[];
}
}
...
@@ -197,8 +197,8 @@
...
@@ -197,8 +197,8 @@
self
.
$u
.
api
.
listByRecommendOrder
(
self
.
search
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listByRecommendOrder
(
self
.
search
).
then
((
res
)
=>
{
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
uni
.
stopPullDownRefresh
()
// 结束下拉刷新
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
if
(
res
.
data
&&
res
.
data
.
l
ist
&&
res
.
data
.
list
.
l
ength
>
0
)
{
self
.
orderList
.
push
(...
res
.
data
);
self
.
orderList
.
push
(...
res
.
data
.
list
);
}
}
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"初始化订单列表异常"
);
console
.
log
(
res
.
message
,
"初始化订单列表异常"
);
...
@@ -235,10 +235,12 @@
...
@@ -235,10 +235,12 @@
handleScroll
()
{
handleScroll
()
{
console
.
log
(
"-----scroll-------"
);
console
.
log
(
"-----scroll-------"
);
},
},
/* 立即入驻 */
immediatelyIn
()
{
immediatelyIn
()
{
if
(
this
.
vuex_token
)
{
if
(
this
.
vuex_token
)
{
//
0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
//
用户已登录
var
pageIndex
=
1
;
var
pageIndex
=
1
;
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
switch
(
this
.
status
)
{
switch
(
this
.
status
)
{
case
1
:
case
1
:
case
2
:
case
2
:
...
@@ -266,6 +268,7 @@
...
@@ -266,6 +268,7 @@
"/pages/settle/prompt?pageIndex="
+
pageIndex
:
"/pages/settle/index"
,
"/pages/settle/prompt?pageIndex="
+
pageIndex
:
"/pages/settle/index"
,
});
});
}
else
{
}
else
{
// 用户未登录
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"pages/login/index"
,
url
:
"pages/login/index"
,
});
});
...
@@ -294,7 +297,7 @@
...
@@ -294,7 +297,7 @@
border-radius
:
12rpx
;
border-radius
:
12rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
padding
:
12rpx
30rpx
;
padding
:
12rpx
30rpx
;
height
:
252
rpx
;
height
:
174
rpx
;
}
}
.msg-content
{
.msg-content
{
...
...
src/pages/learn/answer.vue
View file @
8b91f718
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
""
>
<view
class=
""
>
<view
class=
""
style=
"padding-left: 94rpx;margin:36rpx 0"
>
<view
class=
""
style=
"padding-left: 94rpx; margin: 36rpx 0"
>
<text
class=
"dx"
>
多选
</text><text
class=
"num"
>
第1题
</text><text
class=
"all"
>
/共30题
</text>
<text
class=
"dx"
>
多选
</text
><text
class=
"all"
>
{{
ExaminationQuestions
.
progress
}}
</text>
</view>
</view>
<view
class=
""
style=
"text-align: center;
"
>
<view
class=
""
style=
"text-align: center
"
>
一下对压缩机故障描述有误的是?
{{
ExaminationQuestions
.
question
.
content
}}
</view>
</view>
<view
class=
""
style=
"margin-top: 130rpx;
"
>
<view
class=
""
style=
"margin-top: 130rpx
"
>
<view
class=
"list-box"
>
<view
class=
"list-box"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"choice(index)"
:class=
"[item.selected?'selde':'noselde']"
>
<view
{{
item
.
selected
?
item
.
title
:
item
.
title
}}
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"choice(index)"
:class=
"[item.isRight ? 'selde' : 'noselde']"
>
{{
item
.
content
}}
</view>
</view>
</view>
</view>
</view>
</view>
<button
class=
"btn
"
>
下一题
</button>
<button
class=
"btn"
@
click=
"nextClick()
"
>
下一题
</button>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[{
list
:
[
selected
:
false
,
{
title
:
'A'
isRight
:
false
,
title
:
"A"
,
},
},
{
{
selected
:
false
,
isRight
:
false
,
title
:
'B'
title
:
"B"
,
},
},
{
{
selected
:
false
,
isRight
:
false
,
title
:
'C'
title
:
"C"
,
},
},
{
{
selected
:
false
,
isRight
:
false
,
title
:
'D'
title
:
"D"
,
},
},
{
{
selected
:
false
,
isRight
:
false
,
title
:
'E'
title
:
"E"
,
}
},
],
],
selectId
:[],
isSelect
:
false
,
selectId
:
[],
userExamId
:
null
,
ExaminationQuestions
:
null
,
isQuestion
:
true
,
};
};
},
},
onLoad
()
{
onLoad
(
num
)
{
this
.
getUserExamInfo
()
console
.
log
(
"标识符4"
,
this
.
userExamId
);
console
.
log
(
"标识符3"
+
num
);
this
.
userExamId
=
num
;
this
.
getExaminationQuestions
();
},
},
onUnload
()
{
wx
.
reLaunch
({
url
:
"./index"
,
});
},
methods
:
{
methods
:
{
abc
()
{
abc
()
{
console
.
log
(
"11111"
)
console
.
log
(
"11111"
);
var
arr
=
document
.
querySelector
(
".btm"
);
var
arr
=
document
.
querySelector
(
".btm"
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
arr
[
i
].
onclick
=
function
()
{
arr
[
i
].
onclick
=
function
()
{
console
.
log
(
this
.
value
)
console
.
log
(
this
.
value
);
}
};
}
}
},
},
//选择按钮
//选择按钮
choice
(
index
)
{
choice
(
index
)
{
if
(
this
.
list
[
index
].
selected
==
true
)
{
if
(
this
.
list
[
index
].
isRight
==
true
)
{
this
.
list
[
index
].
selected
=
false
;
this
.
list
[
index
].
isRight
=
false
;
this
.
isSelect
=
false
;
console
.
log
(
this
.
isSelect
);
//取消选中时删除数组中的值
//取消选中时删除数组中的值
for
(
var
i
=
0
;
i
<
this
.
selectId
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
selectId
.
length
;
i
++
)
{
if
(
this
.
selectId
[
i
]
===
this
.
list
[
index
].
title
)
{
if
(
this
.
selectId
[
i
]
===
this
.
list
[
index
].
id
)
{
this
.
selectId
.
splice
(
i
,
1
);
this
.
selectId
.
splice
(
i
,
1
);
}
}
}
}
console
.
log
(
"选中的值"
,
this
.
selectId
)
console
.
log
(
"选中的值"
,
this
.
selectId
);
}
else
{
}
else
{
this
.
list
[
index
].
selected
=
true
;
this
.
list
[
index
].
isRight
=
true
;
this
.
selectId
.
push
(
this
.
list
[
index
].
title
)
this
.
isSelect
=
true
;
console
.
log
(
"选中的值"
,
this
.
selectId
)
console
.
log
(
this
.
isSelect
);
this
.
selectId
.
push
(
this
.
list
[
index
].
id
);
console
.
log
(
"选中的值"
,
this
.
selectId
);
}
}
},
},
//申请考试题目
getExaminationQuestions
:
function
()
{
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
.
userExamId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
},
mounted
()
{
success
:
(
res
)
=>
{
console
.
log
(
"111111"
)
if
(
res
.
data
.
code
==
200
)
{
this
.
ExaminationQuestions
=
res
.
data
.
data
;
this
.
list
=
res
.
data
.
data
.
answerList
;
console
.
log
(
this
.
ExaminationQuestions
);
}
}
},
});
console
.
log
(
"answer的userExamId是"
,
this
.
userExamId
);
},
//下一题
nextClick
:
function
()
{
//判断
if
(
this
.
isQuestion
==
"第20题/共20题"
)
{
this
.
isQuestion
=
""
;
console
.
log
(
"标识符6666"
,
this
.
userExamId
.
userExamId
);
wx
.
navigateTo
({
url
:
"./result?userExamId="
+
this
.
userExamId
.
userExamId
,
});
}
//判断有没有选
if
(
this
.
selectId
.
length
==
0
)
{
wx
.
showToast
({
title
:
"请选择"
,
icon
:
"none"
,
//当icon:'none'时,没有图标 只有文字
duration
:
2000
,
});
return
;
}
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/next/"
+
this
.
vuex_token
+
"?userExamId="
+
this
.
userExamId
.
userExamId
+
"&questionId="
+
this
.
ExaminationQuestions
.
question
.
id
+
"&userAnswerIds="
+
this
.
selectId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
console
.
log
(
"sssss"
,
res
);
if
(
res
.
data
.
code
==
200
)
{
this
.
ExaminationQuestions
=
res
.
data
.
data
;
this
.
list
=
res
.
data
.
data
.
answerList
;
this
.
isQuestion
=
res
.
data
.
data
.
progress
;
console
.
log
(
"uuuuuuuu"
,
this
.
ExaminationQuestions
);
}
}
this
.
selectId
=
[];
console
.
log
(
"zzy"
,
this
.
selectId
);
},
});
},
},
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.content
{
.content
{
width
:
600rpx
;
width
:
600rpx
;
height
:
800rpx
;
height
:
800rpx
;
/* background: #8F8F94; */
/* background: #8F8F94; */
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.dx
{
.dx
{
padding
:
0rpx
;
padding
:
0rpx
;
background
:
#2979FF
;
background
:
#2979ff
;
color
:
#FFFFFF
;
color
:
#ffffff
;
border-radius
:
0px
;
border-radius
:
0px
;
}
}
.num
{
.num
{
color
:
#2B85E
4
;
color
:
#2b85e
4
;
}
}
.all
{
.all
{
color
:
#8F8F
94
;
color
:
#8f8f
94
;
}
}
.btn
{
.btn
{
margin-top
:
98rpx
;
margin-top
:
98rpx
;
width
:
476rpx
;
width
:
476rpx
;
height
:
60rpx
;
height
:
60rpx
;
line-height
:
30px
;
line-height
:
30px
;
background
:
#007AFF
;
background
:
#007aff
;
color
:
#FFFFFF
;
color
:
#ffffff
;
}
}
.btm
{
.btm
{
width
:
476rpx
;
width
:
476rpx
;
height
:
60rpx
;
height
:
60rpx
;
line-height
:
30px
;
line-height
:
30px
;
margin
:
34rpx
auto
;
margin
:
34rpx
auto
;
}
}
.list-box
{
.list-box
{
// display: flex;
// display: flex;
// flex-wrap: wrap;
// flex-wrap: wrap;
padding
:
16upx
;
padding
:
16upx
;
...
@@ -139,26 +232,24 @@
...
@@ -139,26 +232,24 @@
line-height
:
60upx
;
line-height
:
60upx
;
text-align
:
center
;
text-align
:
center
;
margin
:
26rpx
auto
0
;
margin
:
26rpx
auto
0
;
}
}
}
}
/*已选择*/
.selde
{
/*已选择*/
background
:
#007aff
;
.selde
{
color
:
#ffffff
;
background
:
#007AFF
;
color
:
#FFFFFF
;
border-radius
:
20upx
;
border-radius
:
20upx
;
font-size
:
26rpx
;
font-size
:
26rpx
;
padding
:
0
10upx
;
padding
:
0
10upx
;
}
}
/*未选择*/
/*未选择*/
.noselde
{
.noselde
{
background
:
#E4E7ED
;
background
:
#e4e7ed
;
color
:
#959595
;
color
:
#959595
;
border-radius
:
20upx
;
border-radius
:
20upx
;
font-size
:
20upx
;
font-size
:
20upx
;
padding
:
0
10upx
;
padding
:
0
10upx
;
}
}
</
style
>
</
style
>
src/pages/learn/assessment.vue
View file @
8b91f718
...
@@ -3,148 +3,106 @@
...
@@ -3,148 +3,106 @@
<view
class=
"title"
>
考试规则说明
</view>
<view
class=
"title"
>
考试规则说明
</view>
<view
class=
"test"
>
<view
class=
"test"
>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
考试科目:
</text><text
style=
"color: #007AFF;"
>
{{
exam
.
examName
}}
</text>
<text
class=
"left"
>
考试科目:
</text
><text
style=
"color: #007aff"
>
{{
exam
.
examName
}}
</text>
</view>
</view>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
合格条件:
</text><text>
{{
exam
.
ruleDisc
}}
</text>
<text
class=
"left"
>
合格条件:
</text
><text>
{{
exam
.
ruleDisc
}}
</text>
</view>
</view>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
考试时间:
</text><text>
30分钟
</text>
<text
class=
"left"
>
考试时间:
</text><text>
30分钟
</text>
</view>
</view>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
题目规则:
</text><text>
题库100题,随机抽20题
</text>
<text
class=
"left"
>
题目规则:
</text
><text>
题库100题,随机抽20题
</text>
</view>
</view>
<view
class=
"text"
>
<view
class=
"text"
>
<text
class=
"left"
>
备注说明:
</text><text>
无
</text>
<text
class=
"left"
>
备注说明:
</text><text>
无
</text>
</view>
</view>
</view>
</view>
<button
@
click=
"aaa
"
>
开始考试
</button>
<button
@
click=
"getUserExamId()
"
>
开始考试
</button>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
examId
:
1
,
examId
:
2
,
exam
:
null
exam
:
null
,
}
userExamId
:
null
,
};
},
},
onLoad
()
{
onLoad
()
{
this
.
getUserExamInfo
()
// this.getUserExamInfo();
},
},
methods
:
{
methods
:
{
aaa
(){
//申请考试获取userExamId
getUserExamId
:
function
()
{
wx
.
navigateTo
({
var
that
=
this
;
console
.
log
(
"这是一条消息"
);
url
:
'./answer'
})
},
//获取考试信息
getUserExamInfo
:
function
()
{
uni
.
showLoading
({
title
:
'请稍候'
})
let
that
=
this
uni
.
request
({
uni
.
request
({
url
:
'https://system.banshouhui.com'
+
url
:
'/wxh-worker-rest/rest/exam'
+
"http://192.168.1.22"
+
'/serviceRule/userExamInfo/'
+
"/wxh-worker-rest/rest/exam/serviceRule/"
+
'RTOKENf86a7c0606ef5ebf36f211ace3466b7f9de56e37'
+
that
.
vuex_token
+
'?examId='
+
this
.
examId
,
"?examId="
+
method
:
'POST'
,
this
.
examId
,
data
:
{
method
:
"POST"
,
//examId:this.examId,
},
header
:
{
header
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
"Content-Type"
:
"application/x-www-from-urlencoded"
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
)
console
.
log
(
"标识符1"
,
res
.
data
);
uni
.
hideLoading
()
uni
.
hideLoading
();
if
(
!
res
.
data
)
{
return
}
if
(
res
.
data
.
code
==
401
||
res
.
data
.
code
==
403
)
{
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console
.
log
(
'洪塘张学友'
)
}
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
if
(
res
.
data
.
data
.
userExamId
)
{
that
.
exam
=
res
.
data
.
data
that
.
userExamId
=
res
.
data
.
data
.
userExamId
;
console
.
log
(
that
.
exam
)
console
.
log
(
"这个是个标识符"
,
that
.
userExamId
);
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
that
.
applyExam
()
return
}
if
(
res
.
data
.
data
.
examStatus
==
1
){
console
.
log
(
'111111111111111111111111111'
)
that
.
isComplete
=
true
that
.
examScore
=
res
.
data
.
data
.
examScore
that
.
postResult
()
return
}
}
if
(
res
.
data
.
data
.
examStatus
==
0
)
{
that
.
userExamId
=
res
.
data
.
data
.
id
that
.
getNext
()
}
}
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
data
.
message
})
}
},
},
fail
:
(
e
)
=>
{
});
uni
.
hideLoading
()
setTimeout
(()
=>
{
uni
.
showToast
({
wx
.
navigateTo
({
icon
:
'none'
,
url
:
"./answer?userExamId="
+
that
.
userExamId
,
title
:
'获取考试信息失败'
});
})
},
1000
);
}
})
},
},
},
}
};
}
</
script
>
</
script
>
<
style
>
<
style
>
.content
{
.content
{
margin
:
187
rpx
80
rpx
;
margin
:
187
rpx
80
rpx
;
}
}
.title
{
.title
{
font-size
:
17px
;
font-size
:
17px
;
text-align
:
center
;
text-align
:
center
;
}
}
.test
{
margin
:
0
0
;
.test
{
}
margin
:
0
0
;
.left
{
}
.left
{
margin-right
:
8
rpx
;
margin-right
:
8
rpx
;
margin-left
:
68
rpx
;
margin-left
:
68
rpx
;
}
}
.text
{
.text
{
margin
:
50
rpx
0
;
margin
:
50
rpx
0
;
}
}
button
{
width
:
364
rpx
;
button
{
width
:
364
rpx
;
height
:
56
rpx
;
height
:
56
rpx
;
background
:
#007AFF
;
background
:
#007aff
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
color
:
#FFFFFF
;
color
:
#ffffff
;
}
}
</
style
>
</
style
>
src/pages/learn/curriculum.vue
View file @
8b91f718
...
@@ -3,30 +3,34 @@
...
@@ -3,30 +3,34 @@
<view
class=
"title"
>
<view
class=
"title"
>
课程简介
课程简介
</view>
</view>
<view
class=
"u-content"
>
<u-parse
:html=
"courseInfo.intro"
></u-parse>
</view>
<view
class=
"lecturer"
>
<view
class=
"lecturer"
>
<view
class=
""
v-if=
"courseInfo.isTeachers"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight: bold;margin: 30rpx 0;"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight: bold;margin: 30rpx 0;"
>
讲师
讲师
</view>
</view>
<view
class=
""
style=
"display: flex;"
>
<view
class=
""
style=
"display: flex;"
>
<image
src=
"../../static/logo.png"
mode=
""
></image>
<image
src=
"../../static/logo.png"
mode=
""
></image>
<view
style=
"font-size: 30rpx;font-weight:1000;margin: 19px 24px;"
>
扳手卢老师
</view>
<view
style=
"font-size: 30rpx;font-weight:1000;margin: 19px 24px;"
>
{{
courseInfo
.
teacher
.
name
}}
</view>
</view>
</view>
</view>
<view
class=
""
style=
"margin: 36rpx 0;"
>
<view
class=
""
style=
"margin: 36rpx 0;"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight:1000"
>
<view
class=
""
style=
"font-size: 40rpx;font-weight:1000"
>
目录
目录
</view>
</view>
<view
v-for=
"
item
in list"
>
<view
v-for=
"
(item,index)
in list"
>
<view
class=
"chapter"
>
<view
class=
"chapter"
>
{{
item
.
name
}}
{{
item
.
name
}}
</view>
</view>
<view
class=
"video"
v-for=
"
key in item.section"
@
click=
details(key
.id)
>
<view
class=
"video"
v-for=
"
(section,key) in item.section"
@
click=
details(section
.id)
>
<view
class=
"video_1"
>
<view
class=
"video_1"
>
<view
class=
"text"
v-text=
"wareType(key.ware)"
>
<view
class=
"text"
v-text=
"wareType(section.ware)"
>
</view>
</view>
<text
>
1-
{{
key
.
order
}}
</text>
<text
class=
"texts"
>
{{
index
+
1
}}
-
{{
key
+
1
}}
</text>
<text
class=
"text2"
>
{{
key
.
name
}}
</text>
<text
class=
"text2"
>
{{
section
.
name
}}
</text>
<text
class=
"text3"
v-text=
"
key
.isLearned==false?'未开始':'完成'"
></text>
<text
class=
"text3"
v-text=
"
section
.isLearned==false?'未开始':'完成'"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -45,6 +49,11 @@
...
@@ -45,6 +49,11 @@
},
},
list
:[],
list
:[],
examId
:
1
,
examId
:
1
,
courseInfo
:
{
intro
:
''
,
isTeachers
:
false
,
teacher
:
{}
}
}
}
},
},
onLoad
(
a
){
onLoad
(
a
){
...
@@ -52,8 +61,31 @@
...
@@ -52,8 +61,31 @@
this
.
params
.
course_id
=
a
.
course_id
this
.
params
.
course_id
=
a
.
course_id
console
.
log
(
this
.
params
.
course_id
)
console
.
log
(
this
.
params
.
course_id
)
this
.
getCapterDetails
()
this
.
getCapterDetails
()
this
.
getCourseInfo
()
},
},
methods
:
{
methods
:
{
getCourseInfo
()
{
let
param
=
{
course_id
:
this
.
params
.
course_id
};
this
.
$u
.
api
.
CourseList
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
courseInfo
.
intro
=
res
.
data
.
course
.
intro
;
this
.
courseInfo
.
isTeachers
=
res
.
data
.
course
.
teachers
.
length
>
0
;
this
.
courseInfo
.
teacher
=
this
.
courseInfo
.
isTeachers
?
res
.
data
.
course
.
teachers
[
0
]
:
{};
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
});
},
//获取章节详情
//获取章节详情
getCapterDetails
()
{
getCapterDetails
()
{
console
.
log
(
'获取章节详情'
)
console
.
log
(
'获取章节详情'
)
...
@@ -133,7 +165,7 @@
...
@@ -133,7 +165,7 @@
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.title
{
.title
{
height
:
1
64rpx
;
height
:
64rpx
;
font-size
:
40rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
margin
:
24rpx
34rpx
;
margin
:
24rpx
34rpx
;
...
@@ -158,6 +190,12 @@
...
@@ -158,6 +190,12 @@
margin
:
20rpx
0
;
margin
:
20rpx
0
;
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
.texts
{
border
:
1px
solid
#8F8F94
;
text-align
:
center
;
line-height
:
38rpx
;
margin-right
:
5rpx
;
}
.text
{
.text
{
width
:
100rpx
;
width
:
100rpx
;
height
:
38rpx
;
height
:
38rpx
;
...
@@ -179,4 +217,7 @@
...
@@ -179,4 +217,7 @@
right
:
0
;
right
:
0
;
}
}
}
}
.u-content
{
padding
:
0rpx
34rpx
;
}
</
style
>
</
style
>
src/pages/learn/index.vue
View file @
8b91f718
...
@@ -9,13 +9,31 @@
...
@@ -9,13 +9,31 @@
<text
class=
"title-view"
>
学习
</text>
<text
class=
"title-view"
>
学习
</text>
</u-navbar>
</u-navbar>
<image
:src=
"bannerImage"
mode=
""
class=
"banner"
></image>
<image
:src=
"bannerImage"
mode=
""
class=
"banner"
></image>
<!--
<u-tabs
:list=
"tabs"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
></u-tabs>
-->
<view>
<view>
<u-tabs-swiper
bg-color=
"#F4F5F7"
inactive-color=
"#999999"
font-size=
"28"
ref=
"uTabs"
:list=
"tabs"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
<u-tabs-swiper
</view>
bg-color=
"#F4F5F7"
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
style=
"height: 755rpx;"
>
inactive-color=
"#999999"
font-size=
"28"
ref=
"uTabs"
:list=
"tabs"
:current=
"current"
@
change=
"tabsChange"
:is-scroll=
"false"
swiperWidth=
"750"
></u-tabs-swiper>
</view>
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
style=
"height: 755rpx"
>
<swiper-item
class=
"swiper-item"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height:796rpx;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<scroll-view
scroll-y
style=
"height: 796rpx; width: 100%"
@
scrolltolower=
"onreachBottom"
>
<view
class=
"standard"
@
click=
"goToPrint"
>
<view
class=
"standard"
@
click=
"goToPrint"
>
<text>
充电桩交付规范
</text>
<text>
充电桩交付规范
</text>
<text>
>
</text>
<text>
>
</text>
...
@@ -23,13 +41,20 @@
...
@@ -23,13 +41,20 @@
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<scroll-view
<view
v-for=
"item in list"
:key=
"item.id"
class=
"notice"
@
click=
"bbb(item)"
>
scroll-y
<view
class=
"n-head"
>
style=
"height: 100%; width: 100%"
《
{{
item
.
title
}}
》
@
scrolltolower=
"onreachBottom"
</view>
>
<view
v-for=
"item in list"
:key=
"item.id"
class=
"notice"
@
click=
"bbb(item)"
>
<view
class=
"n-head"
>
《
{{
item
.
title
}}
》
</view>
<view
class=
"news"
v-html=
"item.body"
>
<view
class=
"news"
v-html=
"item.body"
>
{{
item
.
body
}}
{{
item
.
body
}}
</view>
</view>
</view>
</view>
<view
v-shou=
"isLoadMore"
>
<view
v-shou=
"isLoadMore"
>
...
@@ -38,57 +63,116 @@
...
@@ -38,57 +63,116 @@
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height:100%;width:100%;
"
>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%
"
>
<view
class=
"lean"
>
<view
class=
"lean"
>
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"currency-class"
>
<view
class=
"currency-class"
>
<view
class=
"title"
>
通用课程
</view>
<view
class=
"title"
>
通用课程
</view>
<view
class=
"class1"
@
click=
ccc(173)
>
<view
<image
class=
"img"
:src=
courselist.course.preview_pic
mode=
""
></image>
class=
"class1"
@
click=
"ccc(courselist[0].id)"
>
<image
class=
"img"
:src=
"courselist[0].pic"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
""
>
<view
class=
""
>
{{
courselist
[
0
].
title
}}
{{
courselist
.
course
.
name
}}
</view>
</view>
<view
class=
"intro"
v-html=
"courselist.course.
intro"
>
<view
class=
"
intro"
>
{{
courselist
.
course
.
intro
}}
{{
courselist
[
0
].
desc
}}
</view>
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<view
<u-line-progress
active-color=
"#2979ff"
:percent=
courselist.learnedInfo.learnPercent
style=
"width:54%;"
></u-line-progress>
class=
""
<text
v-text=
"(courselist.learnedInfo.isLearned) ?(courselist.learnedInfo.learnPercent==1)?'已完成':'继续':'未观看' "
></text>
style=
"
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[0].percent"
style=
"width: 54%"
>
</u-line-progress>
<text
v-text=
"courselist[0].status"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"class1"
>
<view
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
class=
"class1"
@
click=
"ccc(courselist[1].id)"
>
<image
class=
"img"
:src=
"courselist[1].pic"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
""
>
<view
class=
""
>
接单操作
{{
courselist
[
1
].
title
}}
</view>
</view>
<view
class=
""
>
<view
class=
""
>
快速学习,使用APP接单、抢单
{{
courselist
[
1
].
desc
}}
</view>
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<view
<u-line-progress
active-color=
"#2979ff"
:percent=
"30"
style=
"width:54%;"
></u-line-progress>
class=
""
<text>
继续
</text>
style=
"
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[1].percent"
style=
"width: 54%"
>
</u-line-progress>
<text
v-text=
"courselist[1].status"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"currency-class"
>
<view
class=
"currency-class"
>
<view
class=
"title"
>
技能课程
</view>
<view
class=
"title"
>
技能课程
</view>
<view
class=
"class1"
>
<view
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
class=
"class1"
@
click=
"ccc(courselist[2].id)"
>
<image
class=
"img"
:src=
"courselist[2].pic"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
""
>
<view
class=
""
>
从0-1学习充电桩安装服务
{{
courselist
[
2
].
title
}}
</view>
</view>
<view
class=
""
>
<view
class=
""
>
让你全面了解充电桩市场及服务规范
{{
courselist
[
2
].
desc
}}
</view>
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<view
<u-line-progress
active-color=
"#2979ff"
:percent=
"100"
style=
"width:54%;"
></u-line-progress>
class=
""
<text>
完成
</text>
style=
"
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"courselist[2].percent"
style=
"width: 54%"
>
</u-line-progress>
<text
v-text=
"courselist[2].status"
></text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -98,37 +182,61 @@
...
@@ -98,37 +182,61 @@
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
<swiper-item>
<swiper-item>
<scroll-view
scroll-y
style=
"height:100%;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%"
@
scrolltolower=
"onreachBottom"
>
<view
class=
"lean"
>
<view
class=
"lean"
>
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"currency-class"
>
<view
class=
"currency-class"
>
<text
class=
"title"
>
通用认证
</text>
<text
class=
"title"
>
通用认证
</text>
<view
class=
"class1"
@
click=
"aaa"
>
<view
class=
"class1"
@
click=
"aaa"
>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
""
>
<view
class=
""
>
服务规范
</view>
服务规范
</view>
<view
class=
""
>
<view
class=
""
>
通过本认证,是接单的前提条件
通过本认证,是接单的前提条件
</view>
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<view
<text
style=
"color: #a69999;"
>
随机20题,及格20题
</text>
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机20题,及格20题
</text
>
<text>
通过
</text>
<text>
通过
</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"class1"
@
click=
"aaa"
>
<view
class=
"class1"
@
click=
"aaa"
>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
""
>
<view
class=
""
>
接单操作
</view>
接单操作
</view>
<view
class=
""
>
<view
class=
""
>
快速认证,是否具备接单操作能力
快速认证,是否具备接单操作能力
</view>
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<view
<text
style=
"color: #a69999"
>
随机20题,及格16题
</text>
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机20题,及格16题
</text
>
<text>
未通过
</text>
<text>
未通过
</text>
</view>
</view>
</view>
</view>
...
@@ -137,7 +245,11 @@
...
@@ -137,7 +245,11 @@
<view
class=
"currency-class"
>
<view
class=
"currency-class"
>
<text
class=
"title"
>
技能认证
</text>
<text
class=
"title"
>
技能认证
</text>
<view
class=
"class1"
@
click=
"aaa"
>
<view
class=
"class1"
@
click=
"aaa"
>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<image
class=
"img"
src=
"../../static/logo.png"
mode=
""
></image>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
""
>
<view
class=
""
>
从0-1学习充电桩安装服务
从0-1学习充电桩安装服务
...
@@ -145,8 +257,16 @@
...
@@ -145,8 +257,16 @@
<view
class=
""
>
<view
class=
""
>
通过本认证后,可接充电桩业务单
通过本认证后,可接充电桩业务单
</view>
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<view
<text
style=
"color: #a69999;"
>
随机30题,及格25题
</text>
class=
""
style=
"
display: flex;
justify-content: space-between;
"
>
<text
style=
"color: #a69999"
>
随机30题,及格25题
</text
>
<text>
未通过
</text>
<text>
未通过
</text>
</view>
</view>
</view>
</view>
...
@@ -158,7 +278,6 @@
...
@@ -158,7 +278,6 @@
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -186,7 +305,32 @@ export default {
...
@@ -186,7 +305,32 @@ export default {
start
:
0
,
start
:
0
,
},
},
list
:
[],
list
:
[],
courselist
:
null
,
courselist
:
[
{
title
:
"服务规范"
,
desc
:
"为用户提供更好服务,自己赚更多钱"
,
percent
:
0
,
status
:
""
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan1@3x.png"
,
id
:
173
,
},
{
title
:
"接单操作"
,
desc
:
"快速学习,使用APP 接单、抢单"
,
percent
:
0
,
status
:
""
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"guifan2@3x.png"
,
id
:
173
,
},
{
title
:
"从0-1学习充电桩安装服务"
,
desc
:
"让你全面了解充电桩市场及服务规范"
,
percent
:
0
,
status
:
""
,
pic
:
process
.
uniEnv
.
qn_base_url
+
"kecehng1@3x.png"
,
id
:
173
,
},
],
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore
:
false
,
//是否加载中
isLoadMore
:
false
,
//是否加载中
course_id
:
"course_id_=173"
,
course_id
:
"course_id_=173"
,
...
@@ -194,13 +338,13 @@ export default {
...
@@ -194,13 +338,13 @@ export default {
};
};
},
},
onLoad
()
{
onLoad
()
{
this
.
getList
();
//
this.getList();
this
.
getCourseList
();
//
this.getCourseList();
this
.
getUserExamInfo
();
//
this.getUserExamInfo();
},
},
computed
:
{
computed
:
{
bannerImage
()
{
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"banner-x
x.png"
;
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx@3
x.png"
;
},
},
},
},
methods
:
{
methods
:
{
...
@@ -245,36 +389,32 @@ export default {
...
@@ -245,36 +389,32 @@ export default {
}
}
});
});
},
},
getTypeName
(
percent
)
{
if
(
percent
==
0
)
{
return
"未开始"
;
}
else
if
(
percent
==
"100"
)
{
return
"已完成"
;
}
else
{
return
"继续"
;
}
},
//在线学习通用课程信息
//在线学习通用课程信息
getCourseList
()
{
getCourseList
()
{
let
courseLength
=
this
.
courselist
.
length
;
for
(
let
i
=
0
;
i
<
courseLength
;
i
++
)
{
let
param
=
{
course_id
:
this
.
courselist
[
i
].
id
,
};
this
.
$u
.
api
this
.
$u
.
api
.
CourseList
(
)
.
CourseList
(
param
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
courselist
=
res
.
data
;
this
.
courselist
[
i
].
status
=
this
.
getTypeName
(
console
.
log
(
"--------"
);
res
.
data
.
learnedInfo
.
learnPercent
console
.
log
(
this
.
courselist
);
);
if
(
res
.
data
.
length
<
5
)
{
this
.
courselist
[
i
].
percent
=
//判断接口返回数据量小于请求数据量,则表示此为最后一页
res
.
data
.
learnedInfo
.
learnPercent
;
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
}
else
{
this
.
isLoadMore
=
false
;
}
}
else
{
this
.
isLoadMore
=
true
;
this
.
loadStatus
=
"nomore"
;
}
}
else
{
//接口请求失败的处理
uni
.
showToast
({
title
:
res
.
message
,
icon
:
"none"
,
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
}
}
}
})
})
...
@@ -283,15 +423,26 @@ export default {
...
@@ -283,15 +423,26 @@ export default {
title
:
err
,
title
:
err
,
icon
:
"none"
,
icon
:
"none"
,
});
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
});
});
}
},
},
//tabs通知swiper切换
//tabs通知swiper切换
tabsChange
(
index
)
{
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
swiperCurrent
=
index
;
switch
(
index
)
{
case
1
:
this
.
params
.
start
=
0
;
this
.
list
=
[];
this
.
getList
();
break
;
case
2
:
this
.
getCourseList
();
console
.
log
(
"重新加载学习进度"
);
break
;
case
3
:
this
.
getUserExamInfo
();
break
;
}
},
},
//swiper-item左右移动,通知tabs的滑块跟随移动
//swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
transition
(
e
)
{
...
@@ -306,9 +457,22 @@ export default {
...
@@ -306,9 +457,22 @@ export default {
},
},
//跳转到assessment页面
//跳转到assessment页面
aaa
()
{
aaa
()
{
var
id
=
this
.
exam
.
id
;
if
(
this
.
exam
.
examStatus
==
0
)
{
console
.
log
(
"这是个标识符"
,
this
.
exam
.
id
);
wx
.
navigateTo
({
url
:
"./answer?userExamId="
+
id
,
});
}
else
if
(
this
.
exam
.
examStatus
==
1
)
{
wx
.
navigateTo
({
url
:
"./result?userExamId="
+
id
,
});
}
else
if
(
this
.
exam
.
examStatus
==
2
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
"./assessment"
,
url
:
"./assessment"
,
});
});
}
},
},
//跳转到课程介绍
//跳转到课程介绍
ccc
(
id
)
{
ccc
(
id
)
{
...
@@ -373,7 +537,7 @@ export default {
...
@@ -373,7 +537,7 @@ export default {
"http://192.168.1.22"
+
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/userExamInfo/"
+
"/serviceRule/userExamInfo/"
+
getApp
().
globalData
.
token
+
that
.
vuex_
token
+
"?examId="
+
"?examId="
+
2
,
2
,
method
:
"POST"
,
method
:
"POST"
,
...
@@ -441,6 +605,7 @@ export default {
...
@@ -441,6 +605,7 @@ export default {
background-color
:
#f4f5f7
;
background-color
:
#f4f5f7
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
}
}
.title-view
{
.title-view
{
color
:
#333333
;
color
:
#333333
;
font-weight
:
bold
;
font-weight
:
bold
;
...
@@ -450,7 +615,7 @@ export default {
...
@@ -450,7 +615,7 @@ export default {
.banner
{
.banner
{
width
:
690
rpx
;
width
:
690
rpx
;
height
:
240
rpx
;
height
:
240
rpx
;
/* margin-left: -15rpx; */
margin-top
:
10
rpx
;
}
}
/* //交付规范 */
/* //交付规范 */
...
@@ -476,8 +641,10 @@ export default {
...
@@ -476,8 +641,10 @@ export default {
text-align
:
center
;
text-align
:
center
;
margin
:
32
rpx
0
;
margin
:
32
rpx
0
;
}
}
.news
{
.news
{
}
}
/* //在线学习 */
/* //在线学习 */
.currency-class
{
.currency-class
{
width
:
100%
;
width
:
100%
;
...
@@ -486,11 +653,13 @@ export default {
...
@@ -486,11 +653,13 @@ export default {
margin-bottom
:
11px
;
margin-bottom
:
11px
;
border-radius
:
12
rpx
;
border-radius
:
12
rpx
;
}
}
.title
{
.title
{
font-size
:
32
rpx
;
font-size
:
32
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
}
}
.class1
{
.class1
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
@@ -512,9 +681,11 @@ export default {
...
@@ -512,9 +681,11 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.intro
{
.intro
{
color
:
#9999a6
;
color
:
#9999a6
;
}
}
.tab
{
.tab
{
background
:
#fff
;
background
:
#fff
;
height
:
82
rpx
;
height
:
82
rpx
;
...
...
src/pages/learn/result.vue
View file @
8b91f718
<
template
>
<
template
>
<view
class=
"test-result"
>
<view
class=
"test-result"
>
<text
class=
"title"
>
考试结果
</text>
<text
class=
"title"
>
考试结果
</text>
<view
class=
"result"
>
<view
class=
"result"
>
{{
text
}}
</view>
未通过
</view>
<view
class=
"test-explain"
>
<view
class=
"test-explain"
>
<view
class=
"hang"
>
<view
class=
"hang"
>
<text
class=
"text1"
>
合格条件:
</text><text
class=
"text2"
>
答对20题
</text>
<text
class=
"text1"
>
合格条件:
</text
><text
class=
"text2"
>
答对20题
</text>
</view>
</view>
<view
class=
"hang"
>
<view
class=
"hang"
>
<text
class=
"text1"
>
考试结果:
</text><text
class=
"text2"
>
答对10题
</text>
<text
class=
"text1"
>
考试结果:
</text
><text
class=
"text2"
>
答对10题
</text>
</view>
</view>
<view
class=
"hang"
>
<view
class=
"hang"
>
<text
class=
"text1"
>
考试用时:
</text><text
class=
"text2"
>
16分29秒
</text>
<text
class=
"text1"
>
考试用时:
</text
><text
class=
"text2"
>
16分29秒
</text>
</view>
</view>
</view>
</view>
<view
class=
"btn"
>
<view
class=
"btn"
>
<button
class=
"btn1
"
>
再答一次
</button>
<button
class=
"btn1"
@
click=
"getAgain()
"
>
再答一次
</button>
<button
class=
"btn2"
>
退出重
考
</button>
<button
class=
"btn2"
@
click=
"toIndex"
>
下次再
考
</button>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
text
:
""
,
}
examId
:
2
,
result
:
null
,
userExamId
:
null
,
};
},
onLoad
(
a
)
{
this
.
userExamId
=
a
.
userExamId
;
console
.
log
(
"userExamId是"
,
this
.
userExamId
);
this
.
nextClick
();
},
onUnload
()
{
wx
.
reLaunch
({
url
:
"./index"
,
});
},
},
methods
:
{
methods
:
{
//考试结果
nextClick
:
function
()
{
console
.
log
(
"wwwwwwwwww"
);
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/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
;
console
.
log
(
"标识符55"
,
this
.
result
);
},
});
},
//再次考试
getAgain
:
function
()
{
wx
.
navigateTo
({
url
:
"./assessment"
,
});
},
//下次再考跳转到学习主界面页面
toIndex
:
function
()
{
wx
.
reLaunch
({
url
:
"./index"
,
});
},
},
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.test-result
{
.test-result
{
width
:
610rpx
;
width
:
610rpx
;
height
:
965rpx
;
height
:
965rpx
;
margin
:
70rpx
auto
0
;
margin
:
70rpx
auto
0
;
.title
{
.title
{
margin
:
0
44rpx
0
;
margin
:
0
44rpx
0
;
}
}
.result
{
.result
{
color
:
red
;
color
:
red
;
font-size
:
66rpx
;
font-size
:
66rpx
;
text-align
:
center
;
text-align
:
center
;
...
@@ -51,21 +99,21 @@
...
@@ -51,21 +99,21 @@
margin
:
74rpx
0
;
margin
:
74rpx
0
;
padding
:
66rpx
;
padding
:
66rpx
;
}
}
.test-explain
{
.test-explain
{
.hang
{
.hang
{
margin
:
26rpx
26rpx
;
margin
:
26rpx
26rpx
;
.text1
{
.text1
{
color
:
#a69999
;
color
:
#a69999
;
margin-right
:
22rpx
;
margin-right
:
22rpx
;
}
}
.text2
{
.text2
{
color
:
#333333
;
color
:
#333333
;
}
}
}
}
}
}
.btn
{
.btn
{
margin-top
:
236rpx
;
margin-top
:
236rpx
;
.btn1
{
.btn1
{
width
:
478rpx
;
width
:
478rpx
;
height
:
60rpx
;
height
:
60rpx
;
background
:
#0079fe
;
background
:
#0079fe
;
...
@@ -74,16 +122,15 @@
...
@@ -74,16 +122,15 @@
line-height
:
60rpx
;
line-height
:
60rpx
;
margin
:
20rpx
auto
;
margin
:
20rpx
auto
;
}
}
.btn2
{
.btn2
{
width
:
478rpx
;
width
:
478rpx
;
height
:
60rpx
;
height
:
60rpx
;
background
:
#f2f2f2
;
background
:
#f2f2f2
;
color
:
#333333
;
color
:
#333333
;
font-size
:
26rpx
;
font-size
:
26rpx
;
line-height
:
60rpx
;
line-height
:
60rpx
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
}
}
}
}
</
style
>
</
style
>
src/pages/learn/section.vue
View file @
8b91f718
<
template
>
<
template
>
<view
class=
"learn-vedio"
v-if=
"isShowVideo"
>
<view
class=
"learn-vedio"
v-if=
"isShowVideo"
>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view><video
<view><video
object-fit=
"cover"
class=
"course-video"
id=
"courseVideo"
:src=
"courseSrc"
object-fit=
"cover"
:options=
"playerOptions"
:playsinline=
"true"
@
play=
"playCourse"
@
error=
"videoErrorCallback"
class=
"course-video"
@
ready=
"playerReadied"
@
timeupdate=
"onPlayerTimeupdate($event)"
controls
></video></view>
id=
"courseVideo"
:src=
"courseSrc"
:options=
"playerOptions"
:playsinline=
"true"
@
play=
"playCourse"
@
error=
"videoErrorCallback"
@
ready=
"playerReadied"
@
timeupdate =
"onPlayerTimeupdate($event)"
controls
></video
></view>
<view
class=
"title-content"
>
<view
class=
"title-content"
>
<view
class=
"item-content"
>
<view
class=
"item-content"
>
<view
class=
"item-st"
>
<view
class=
"item-st"
>
<image
style=
"width: 80rpx; height: 36rpx"
:src=
"kcImage"
></image>
<image
style=
"width: 80rpx; height: 36rpx"
:src=
"kcImage"
></image>
<text
class=
"item-st-text"
>
{{
<text
class=
"item-st-text"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
0
]
:
""
}}
</text>
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
0
]
:
""
}}
</text>
</view>
</view>
<view
class=
"item-title"
>
{{
<view
class=
"item-title"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
1
]
:
""
}}
</view>
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
1
]
:
""
}}
</view>
</view>
</view>
<view
<view>
接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。
</view>
>
接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。
</view
>
</view>
</view>
<view
class=
"learn-view"
v-if=
"courseId >= 0"
>
<view
class=
"learn-view"
v-if=
"courseId >= 0"
>
<view
class=
"learn-view-title"
>
视频内容介绍
</view>
<view
class=
"learn-view-title"
>
视频内容介绍
</view>
...
@@ -38,7 +21,10 @@
...
@@ -38,7 +21,10 @@
v-for=
"(item, key) in courseOutlines[courseId]"
v-for=
"(item, key) in courseOutlines[courseId]"
:key=
"key"
:key=
"key"
>
-->
>
-->
<view
class=
"learn-list-item"
>
{{
item
}}
</view>
<!--
<view
class=
"learn-list-item"
>
{{
item
}}
</view>
-->
<view
class=
"u-content"
>
<u-parse
:html=
"CourseSectionlist.content"
></u-parse>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -47,16 +33,15 @@
...
@@ -47,16 +33,15 @@
<view
class=
"title"
>
<view
class=
"title"
>
{{
CourseSectionlist
.
name
}}
{{
CourseSectionlist
.
name
}}
</view>
</view>
<view
class=
"content"
v-html=
"CourseSectionlist.content"
>
<view
class=
"u-content"
>
{{
CourseSectionlist
.
content
}}
<u-parse
:html=
"CourseSectionlist.content"
></u-parse>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
let
app
=
getApp
();
let
app
=
getApp
();
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
courseId
:
""
,
courseId
:
""
,
...
@@ -65,24 +50,18 @@ export default {
...
@@ -65,24 +50,18 @@ export default {
courseTitle
:
""
,
courseTitle
:
""
,
courseDesc
:
""
,
courseDesc
:
""
,
currentIndex
:
-
1
,
// 第几个视频
currentIndex
:
-
1
,
// 第几个视频
section_id
:
0
,
section_id
:
0
,
isShowVideo
:
false
,
isShowVideo
:
false
,
CourseSectionlist
:
{},
//节信息
CourseSectionlist
:
{
name
:
''
,
content
:
''
},
//节信息
playerOptions
:
{
playerOptions
:
{
playbackRates
:
[
0.7
,
1.0
,
1.5
,
2.0
],
//播放速度
playbackRates
:
[
0.7
,
1.0
,
1.5
,
2.0
],
//播放速度
autoplay
:
fals
e
,
//如果true,浏览器准备好时开始回放。
autoplay
:
tru
e
,
//如果true,浏览器准备好时开始回放。
muted
:
false
,
// 默认情况下将会消除任何音频。
muted
:
false
,
// 默认情况下将会消除任何音频。
loop
:
false
,
// 导致视频一结束就重新开始。
loop
:
false
,
// 导致视频一结束就重新开始。
preload
:
'auto'
,
preload
:
'auto'
,
language
:
'zh-CN'
,
language
:
'zh-CN'
,
aspectRatio
:
'16:9'
,
aspectRatio
:
'16:9'
,
fluid
:
true
,
fluid
:
true
,
// sources: [{
// type: "",
// src: "" //url地址
// }],
// poster: "../../static/images/test.jpg", //你的封面地址
// width: document.documentElement.clientWidth,
notSupportedMessage
:
'此视频暂无法播放,请稍后再试'
,
notSupportedMessage
:
'此视频暂无法播放,请稍后再试'
,
controlBar
:
{
controlBar
:
{
timeDivider
:
true
,
timeDivider
:
true
,
...
@@ -93,9 +72,9 @@ export default {
...
@@ -93,9 +72,9 @@ export default {
},
},
gklog
:
''
,
gklog
:
''
,
videoTotalTime
:
0
,
videoTotalTime
:
0
,
howTimeToUpdateLearnedStatus
:
5
,
//设置几秒提交一次状态
howTimeToUpdateLearnedStatus
:
5
,
//设置几秒提交一次状态
status
:
1
,
//是否已学习默认1已学习
status
:
1
,
//是否已学习默认1已学习
howLongIsLearned
:
this
.
videoTotalTime
/
2
,
//默认设置观看1/2就是已学
howLongIsLearned
:
this
.
videoTotalTime
/
2
,
//默认设置观看1/2就是已学
};
};
},
},
computed
:
{
computed
:
{
...
@@ -129,15 +108,17 @@ export default {
...
@@ -129,15 +108,17 @@ export default {
},
},
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
getCourseSection
({
section_id
:
e
.
section_id
})
this
.
getCourseSection
({
section_id
:
e
.
section_id
})
},
},
onReady
:
function
(
res
)
{
onReady
:
function
(
res
)
{
// #ifndef MP-ALIPAY
// #ifndef MP-ALIPAY
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
// #endif
// #endif
},
},
methods
:
{
methods
:
{
onPlayerTimeupdate
(
player
)
{
onPlayerTimeupdate
(
player
)
{
console
.
log
(
'-----onplay----'
);
console
.
log
(
'-----onplay----'
);
console
.
log
(
player
);
console
.
log
(
player
);
let
intCurrentTime
=
parseInt
(
player
.
detail
.
currentTime
);
let
intCurrentTime
=
parseInt
(
player
.
detail
.
currentTime
);
...
@@ -145,13 +126,13 @@ export default {
...
@@ -145,13 +126,13 @@ export default {
this
.
gklog
=
intCurrentTime
;
this
.
gklog
=
intCurrentTime
;
console
.
log
(
' onPlayerTimeupdate!'
,
this
.
gklog
)
console
.
log
(
' onPlayerTimeupdate!'
,
this
.
gklog
)
},
},
videoErrorCallback
:
function
(
e
)
{
videoErrorCallback
:
function
(
e
)
{
uni
.
showModal
({
uni
.
showModal
({
content
:
e
.
target
.
errMsg
,
content
:
e
.
target
.
errMsg
,
showCancel
:
false
,
showCancel
:
false
,
});
});
},
},
getRandomColor
:
function
()
{
getRandomColor
:
function
()
{
const
rgb
=
[];
const
rgb
=
[];
for
(
let
i
=
0
;
i
<
3
;
++
i
)
{
for
(
let
i
=
0
;
i
<
3
;
++
i
)
{
let
color
=
Math
.
floor
(
Math
.
random
()
*
256
).
toString
(
16
);
let
color
=
Math
.
floor
(
Math
.
random
()
*
256
).
toString
(
16
);
...
@@ -160,37 +141,15 @@ export default {
...
@@ -160,37 +141,15 @@ export default {
}
}
return
"#"
+
rgb
.
join
(
""
);
return
"#"
+
rgb
.
join
(
""
);
},
},
playCourse
:
function
(
e
)
{
playCourse
:
function
(
e
)
{
if
(
this
.
courseStatus
&&
(
this
.
courseStatus
==
"1"
||
this
.
courseStatus
==
1
))
{
if
(
this
.
courseStatus
&&
(
this
.
courseStatus
==
"1"
||
this
.
courseStatus
==
1
))
{
return
return
}
}
this
.
changeCourseStatus
();
},
},
playerReadied
(
player
)
{
playerReadied
(
player
)
{
console
.
log
(
'i go to playerReadied gklog:'
+
this
.
gklog
)
console
.
log
(
'i go to playerReadied gklog:'
+
this
.
gklog
)
player
.
currentTime
(
this
.
gklog
)
player
.
currentTime
(
this
.
gklog
)
},
},
changeCourseStatus
()
{
let
that
=
this
;
if
(
that
.
courseId
)
{
that
.
$u
.
api
.
saveCourseRate
({
courseId
:
that
.
courseId
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
!==
200
)
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"更新课程状态失败"
,
});
}
});
}
else
{
uni
.
showToast
({
title
:
"课程ID为空,请重新选择课程"
,
});
}
},
getCourseSection
(
param
)
{
getCourseSection
(
param
)
{
this
.
$u
.
api
this
.
$u
.
api
.
CourseSection
(
param
)
.
CourseSection
(
param
)
...
@@ -202,14 +161,17 @@ export default {
...
@@ -202,14 +161,17 @@ export default {
console
.
log
(
this
.
CourseSectionlist
)
console
.
log
(
this
.
CourseSectionlist
)
let
wareVal
=
this
.
CourseSectionlist
.
ware
;
let
wareVal
=
this
.
CourseSectionlist
.
ware
;
this
.
isShowVideo
=
wareVal
==
"0"
;
this
.
isShowVideo
=
wareVal
==
"0"
;
if
(
this
.
isShowVideo
){
this
.
courseTitle
=
res
.
data
.
name
;
this
.
courseDesc
=
res
.
data
.
content
;
this
.
section_id
=
res
.
data
.
id
;
this
.
section_content
=
res
.
data
.
content
;
if
(
this
.
isShowVideo
)
{
let
coureWareList
=
res
.
data
.
courseware
;
let
coureWareList
=
res
.
data
.
courseware
;
this
.
courseSrc
=
coureWareList
[
0
].
src
;
this
.
courseSrc
=
coureWareList
[
0
].
src
;
this
.
videoTotalTime
=
parseInt
(
JSON
.
parse
(
coureWareList
[
0
].
info
).
time
);
this
.
videoTotalTime
=
parseInt
(
JSON
.
parse
(
coureWareList
[
0
].
info
).
time
);
console
.
log
(
'视频时长信息:'
+
this
.
videoTotalTime
);
console
.
log
(
'视频时长信息:'
+
this
.
videoTotalTime
);
this
.
courseTitle
=
res
.
data
.
name
;
}
else
{
this
.
courseDesc
=
res
.
data
.
content
;
this
.
updateLearnedStatusForText
();
this
.
section_id
=
res
.
data
.
id
;
}
}
}
}
}
}
...
@@ -223,32 +185,58 @@ export default {
...
@@ -223,32 +185,58 @@ export default {
});
});
});
});
},
},
updateLearnedStatus
(
nowLength
)
{
updateLearnedStatusForText
()
{
if
(
this
.
gklog
!=
nowLength
&&
nowLength
%
this
.
howTimeToUpdateLearnedStatus
==
0
){
if
(
this
.
isShowVideo
)
{
if
(
nowLength
<
this
.
howLongIsLearned
){
return
false
;
}
let
param
=
{
section_id
:
this
.
section_id
,
video_time
:
0
,
status
:
1
,
};
this
.
$u
.
api
.
updateLearnCourses
(
param
).
then
((
res
)
=>
{
console
.
log
(
'--'
+
this
.
howTimeToUpdateLearnedStatus
+
'更新一次观看状态--time:'
+
nowTime
);
}).
catch
((
err
)
=>
{
console
.
log
(
'--------updateLearnedStatusForText---------'
);
console
.
log
(
err
);
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
});
},
updateLearnedStatus
(
nowTime
)
{
if
(
this
.
gklog
!=
nowTime
&&
nowTime
%
this
.
howTimeToUpdateLearnedStatus
==
0
)
{
if
(
nowTime
<
this
.
howLongIsLearned
)
{
this
.
status
=
0
;
this
.
status
=
0
;
}
else
{
}
else
{
this
.
status
=
1
;
this
.
status
=
1
;
console
.
log
(
'--
已学习--'
);
console
.
log
(
'--大于规定时间标记为
已学习--'
);
}
}
//大于
let
param
=
{
let
param
=
{
section_id
:
this
.
section_id
,
section_id
:
this
.
section_id
,
video_time
:
nowLength
,
video_time
:
nowTime
,
status
:
this
.
status
,
status
:
this
.
status
,
};
};
this
.
$u
.
api
.
updateLearnCourses
(
param
).
then
((
res
)
=>
{
this
.
$u
.
api
.
updateLearnCourses
(
param
).
then
((
res
)
=>
{
console
.
log
(
'--'
+
this
.
howTimeToUpdateLearnedStatus
+
'更新一次观看状态--time:'
+
nowLength
);
console
.
log
(
'--'
+
this
.
howTimeToUpdateLearnedStatus
+
'更新一次观看状态--time:'
+
nowTime
);
}).
catch
((
err
)
=>
{
console
.
log
(
'--------updateLearnedStatus---------'
);
console
.
log
(
err
);
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
});
});
}
}
}
}
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.learn-vedio
{
.learn-vedio
{
background-color
:
#f4f5f7
;
background-color
:
#f4f5f7
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
@@ -257,37 +245,37 @@ export default {
...
@@ -257,37 +245,37 @@ export default {
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.course-video
{
.course-video
{
width
:
100%
;
width
:
100%
;
}
}
.course-title
{
.course-title
{
font-size
:
36rpx
;
font-size
:
36rpx
;
font-weight
:
700
;
font-weight
:
700
;
padding
:
80rpx
60rpx
40rpx
6
0rpx
;
padding
:
40rpx
40rpx
10rpx
4
0rpx
;
}
}
.title
{
.title
{
font-weight
:
700
;
font-weight
:
700
;
font-family
:
Medium
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
font-family
:
Medium
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
77rpx
;
font-size
:
77rpx
;
color
:
#333
;
color
:
#333
;
padding
:
80rpx
60rpx
40rpx
60rpx
;
padding
:
80rpx
60rpx
40rpx
60rpx
;
}
}
.content
{
.content
{
padding
:
40rpx
30rpx
;
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
}
}
.course-desc
{
.course-desc
{
margin-left
:
60rpx
;
margin-left
:
60rpx
;
}
}
.title-content
{
.title-content
{
padding
:
40rpx
30rpx
;
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
...
@@ -307,6 +295,7 @@ export default {
...
@@ -307,6 +295,7 @@ export default {
margin-right
:
20rpx
;
margin-right
:
20rpx
;
line-height
:
24rpx
;
line-height
:
24rpx
;
position
:
relative
;
position
:
relative
;
.item-st-text
{
.item-st-text
{
color
:
#ffffff
;
color
:
#ffffff
;
position
:
absolute
;
position
:
absolute
;
...
@@ -322,19 +311,19 @@ export default {
...
@@ -322,19 +311,19 @@ export default {
font-size
:
44rpx
;
font-size
:
44rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
}
}
.item-content
{
.item-content
{
display
:
flex
;
display
:
flex
;
padding-bottom
:
30rpx
;
padding-bottom
:
30rpx
;
}
}
.item-title
{
.item-title
{
color
:
#333333
;
color
:
#333333
;
font-size
:
28rpx
;
font-size
:
28rpx
;
}
}
.learn-view
{
.learn-view
{
background-color
:
#ffffff
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
38rpx
30rpx
30rpx
30rpx
;
padding
:
38rpx
30rpx
30rpx
30rpx
;
...
@@ -347,6 +336,7 @@ export default {
...
@@ -347,6 +336,7 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
10rpx
;
margin-bottom
:
10rpx
;
}
}
.learn-list
{
.learn-list
{
.learn-list-item
{
.learn-list-item
{
font-size
:
28rpx
;
font-size
:
28rpx
;
...
@@ -361,5 +351,11 @@ export default {
...
@@ -361,5 +351,11 @@ export default {
width
:
100%
;
width
:
100%
;
}
}
}
}
}
}
.u-content
{
// margin-top: 10rpx;
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
}
</
style
>
</
style
>
src/pages/order/detail.vue
View file @
8b91f718
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<view
class=
"card base-item"
>
<view
class=
"card base-item"
>
<view
class=
"top-item"
>
<view
class=
"top-item"
>
<view
class=
"left"
>
<view
class=
"left"
>
<view
class=
"tag
"
>
{{
order
.
orderServiceType
}}
</view>
<view
:class=
"['tag',
{'active': order.orderServiceType == '安装'}]
">
{{
order
.
orderServiceType
}}
</view>
<text
class=
"title"
>
{{
order
.
categoryName
}}
</text>
<text
class=
"title"
>
{{
order
.
categoryName
}}
</text>
</view>
</view>
<view
class=
"right"
>
{{
order
.
orderBusinessTypeText
}}
</view>
<view
class=
"right"
>
{{
order
.
orderBusinessTypeText
}}
</view>
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<text>
客户信息:
</text>
<text>
客户信息:
</text>
<text>
{{
order
.
contactName
}}
</text>
<text>
{{
order
.
contactName
}}
</text>
</view>
</view>
<u-image
width=
"
60rpx"
height=
"60rpx"
:src=
"phoneIcon"
></u-image>
<u-image
width=
"
48rpx"
height=
"48rpx"
:src=
"phoneIcon"
@
click=
"phoneToCustomer(order.contactPhone)"
></u-image>
</view>
</view>
<view
class=
"order-cell"
>
<view
class=
"order-cell"
>
<text>
联系方式:
</text>
<text>
联系方式:
</text>
...
@@ -34,13 +34,15 @@
...
@@ -34,13 +34,15 @@
<u-icon
name=
"map"
size=
"28"
></u-icon>
<u-icon
name=
"map"
size=
"28"
></u-icon>
<text
class=
"address-txt"
>
{{
order
.
contactAddress
}}
</text>
<text
class=
"address-txt"
>
{{
order
.
contactAddress
}}
</text>
</view>
</view>
<u-image
width=
"
60rpx"
height=
"60rpx"
:src=
"navigationIc
on"
></u-image>
<u-image
width=
"
48rpx"
height=
"48rpx"
:src=
"navigationIcon"
@
click=
"openLocati
on"
></u-image>
</view>
</view>
<!--
<u-read-more
ref=
"uReadMore"
:show-height=
"40"
:shadowStyle=
"
{paddingTop: '0rpx',marginTop: '0rpx'}" close-text="查看更多" open-text="点击收起" toggle color="#2272FF" font-size="26"> -->
<view
v-if=
"readMore"
@
click=
"readMore = false"
class=
"read-more-toggle"
>
<u-icon
name=
"arrow-down"
></u-icon>
<text
class=
"read-more-text"
>
查看更多
</text>
</view>
</view>
<view
class=
"card order-item"
>
<view
v-else
class=
"order-item-more"
>
<view
class=
"top-item"
>
<view
class=
"line-view"
></view>
<text
class=
"title"
>
订单内容
</text>
</view>
<view
class=
"order-cell between-cell"
>
<view
class=
"order-cell between-cell"
>
<text>
品牌:
</text>
<text>
品牌:
</text>
<text>
{{
order
.
brandName
}}
</text>
<text>
{{
order
.
brandName
}}
</text>
...
@@ -57,21 +59,41 @@
...
@@ -57,21 +59,41 @@
<text>
备注:
</text>
<text>
备注:
</text>
<text>
{{
order
.
serviceContent
}}
</text>
<text>
{{
order
.
serviceContent
}}
</text>
</view>
</view>
<view
class=
"read-more-toggle"
>
<u-icon
name=
"arrow-up"
></u-icon>
<text
class=
"read-more-text"
@
click=
"readMore = true"
>
点击收起
</text>
</view>
</view>
<!--
</u-read-more>
-->
</view>
<view
class=
"card appoint-item"
v-show=
"showTimeSelect"
>
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
<view
class=
"card order-item record-item"
>
<view
class=
"card order-item record-item"
>
<view
class=
"top-item"
>
<view
class=
"top-item"
>
<text
class=
"title"
>
履约记录
</text>
<text
class=
"title"
>
履约记录
</text>
</view>
</view>
<view
class=
"order"
v-for=
"(record,index) in orderRecords"
:key=
"record.operationContent"
>
<view
v-if=
"orderRecords.length == 0"
class=
"no-record-view"
>
当前暂无履约记录
</view>
<view
v-else
>
<view
class=
"order"
v-for=
"(record,index) in shwoOrderRecords"
:key=
"record.operationContent"
>
<view
class=
"order-cell between-cell"
>
<view
class=
"order-cell between-cell"
>
<text>
{{
record
.
operationType
}}
</text>
<text>
{{
record
.
operationType
}}
</text>
<text>
{{
$u
.
timeFormat
(
record
.
operationDatetime
,
'yyyy-mm-dd hh:MM:ss'
)
}}
</text>
<text>
{{
$u
.
timeFormat
(
record
.
operationDatetime
,
'yyyy-mm-dd hh:MM:ss'
)
}}
</text>
<text
style=
"color: red;"
>
{{
record
.
overTime
?
''
:
'超时 '
}}{{
record
.
exception
?
''
:
' 异常'
}}
</text>
<text
style=
"color: red;"
>
{{
record
.
overTime
?
''
:
'超时 '
}}{{
record
.
exception
?
''
:
' 异常'
}}
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"orderRecords.length > showLenght"
>
<view
v-if=
"readMoreRecord"
@
click=
"readMoreRecord = false"
class=
"read-more-toggle"
>
<u-icon
name=
"arrow-down"
></u-icon>
<text
class=
"read-more-text"
>
查看更多
</text>
</view>
<view
v-else
class=
"read-more-toggle"
>
<u-icon
name=
"arrow-up"
></u-icon>
<text
class=
"read-more-text"
@
click=
"readMoreRecord = true"
>
点击收起
</text>
</view>
</view>
<view
v-else
style=
"height: 10rpx;"
></view>
</view>
</view>
<view
class=
"card appoint-item"
v-show=
"showTimeSelect"
>
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
</view>
</view>
<view
class=
"toolbar"
>
<view
class=
"toolbar"
>
...
@@ -79,7 +101,7 @@
...
@@ -79,7 +101,7 @@
<!-- 过程反馈 -->
<!-- 过程反馈 -->
<view
class=
"left"
>
<view
class=
"left"
>
<view
v-show=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
>
<view
v-show=
"allowFeedback"
@
click=
"clickFeedback"
class=
"button"
>
过程反馈
<text>
过程反馈
</text>
</view>
</view>
</view>
</view>
<!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 -->
<!--接单,抢单,已被抢, 预约 ,签到 ,去完工 timestampDiff(order.currentOverTime)>0 -->
...
@@ -87,27 +109,29 @@
...
@@ -87,27 +109,29 @@
<view>
<view>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
<view
v-if=
"showCenterBtn"
@
click=
"handleBtn"
class=
"button"
:class=
"btnClass"
>
<view
v-if=
"showCenterBtn"
@
click=
"handleBtn"
class=
"button"
:class=
"['center-button-view', btnClass]"
>
{{
centerButtonText
}}
<text>
{{
centerButtonText
}}
抢单
</text>
</view>
<view
v-if=
"order.currentOverTime > 0"
class=
"time-view"
>
<text>
{{
order
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</text>
<view
v-show=
"order.currentOverTime > 0"
>
<view
class=
"tag"
>
{{
order
.
currentOverTime
*
1000
>
new
Date
().
getTime
()?
'剩'
:
'超'
}}
</view>
<u-count-down
<u-count-down
:timestamp=
"timestampDiff(order.currentOverTime)"
:timestamp=
"timestampDiff(order.currentOverTime)"
font-size=
"30"
font-size=
"20"
color=
"#FFFFFF"
bg-color=
"transparent"
separator-color=
"#FFFFFF"
separator-size=
"20"
:ref=
"'uCountDown'"
:ref=
"'uCountDown'"
@
change=
"timeOutChange(order.currentOverTime)"
>
@
change=
"timeOutChange(order.currentOverTime)"
>
</u-count-down>
</u-count-down>
</view>
</view>
</view>
</view>
</view>
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view
class=
"right"
>
<view
class=
"right"
>
<view
v-if=
"errorSignIn"
@
click=
"take"
class=
"button"
>
<view
v-if=
"errorSignIn || scenePhoto"
@
click=
"$u.debounce(handleClickRight, 500)"
:class=
"['button',
{'active': scenePhoto}]">
<text>
异常签到
</text>
<text>
{{
errorSignIn
?
'异常签到'
:
'现场拍照'
}}
</text>
</view>
<view
v-if=
"scenePhoto"
@
click=
"scenePhotoClick"
class=
"button"
>
<text>
现场拍照
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -128,6 +152,9 @@
...
@@ -128,6 +152,9 @@
},
},
data
()
{
data
()
{
return
{
return
{
readMore
:
true
,
readMoreRecord
:
true
,
showLenght
:
5
,
background
:
{
background
:
{
backgroundColor
:
'none'
,
backgroundColor
:
'none'
,
// 导航栏背景图
// 导航栏背景图
...
@@ -146,14 +173,17 @@
...
@@ -146,14 +173,17 @@
centerButtonText
:
''
,
centerButtonText
:
''
,
orderRecords
:
[],
orderRecords
:
[],
method
:
null
,
method
:
null
,
showCenterBtn
:
fals
e
,
showCenterBtn
:
tru
e
,
showTimeSelect
:
false
,
showTimeSelect
:
false
,
submitType
:
''
,
submitType
:
''
,
nextUrl
:
''
,
nextUrl
:
''
,
btnClass
:
'appoint-btn'
,
btnClass
:
'appoint-btn'
,
takeStatus
:
false
,
takeStatus
:
false
,
errorSignIn
:
false
,
errorSignIn
:
false
,
scenePhoto
:
true
scenePhoto
:
true
,
isErrorSign
:
false
,
errorSignUrl
:
''
,
isAllowDianhuaAndDaohang
:
false
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -164,23 +194,85 @@
...
@@ -164,23 +194,85 @@
}
else
{
}
else
{
// 异常处理
// 异常处理
}
}
this
.
orderId
=
'8371315'
this
.
loadOrderDetail
()
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
this
.
loadOrderRecord
()
this
.
getLocation
()
this
.
getLocation
()
},
},
computed
:
{
computed
:
{
phoneIcon
()
{
phoneIcon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/dianhua-1@2x.png'
//self-support/icon/dianhua-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
){
return
process
.
uniEnv
.
qn_base_url
+
'dianhua-1.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'dianhua-0.png'
}
},
},
navigationIcon
()
{
navigationIcon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'icon/daohang-1@2x.png'
//self-support/icon/daohang-0@2x.png
if
(
this
.
isAllowDianhuaAndDaohang
){
return
process
.
uniEnv
.
qn_base_url
+
'daohang-1.png'
}
else
{
return
process
.
uniEnv
.
qn_base_url
+
'daohang-0.png'
}
},
},
centerButtonClass
()
{
centerButtonClass
()
{
let
btnClass
=
"appoint-btn"
let
btnClass
=
"appoint-btn"
return
btnClass
return
btnClass
},
shwoOrderRecords
()
{
if
(
this
.
readMoreRecord
)
{
return
this
.
orderRecords
.
slice
(
0
,
5
)
}
else
{
return
this
.
orderRecords
}
}
}
},
},
methods
:
{
methods
:
{
openLocation
(){
if
(
this
.
isAllowDianhuaAndDaohang
){
uni
.
getLocation
({
type
:
'gcj02'
,
//返回可以用于uni.openLocation的经纬度
success
:
function
(
res
)
{
const
latitude
=
res
.
latitude
;
const
longitude
=
res
.
longitude
;
uni
.
openLocation
({
latitude
:
latitude
,
longitude
:
longitude
,
success
:
function
()
{
console
.
log
(
'success'
);
}
});
}
});
}
},
phoneToCustomer
(
phone
){
// 联系客户
if
(
this
.
isAllowDianhuaAndDaohang
){
uni
.
makePhoneCall
({
phoneNumber
:
phone
,
//仅为示例
complete
()
{
}
});
this
.
contactTime
()
}
},
contactTime
()
{
let
self
=
this
var
data
=
{}
self
.
$u
.
api
.
contactTime
(
data
,
this
.
order
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
}
else
{
console
.
log
(
res
.
message
);
}
})
},
handleClickRight
(
active
)
{
this
.
scenePhoto
?
this
.
scenePhotoClick
()
:
this
.
take
()
},
scenePhotoClick
()
{
// 跳转拍照小程序
scenePhotoClick
()
{
// 跳转拍照小程序
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/photo/list?orderId='
+
this
.
order
.
orderId
+
'&brandId='
+
this
.
order
.
lianbaoBrandId
+
'&brand='
+
this
.
order
.
brandName
url
:
'pages/photo/list?orderId='
+
this
.
order
.
orderId
+
'&brandId='
+
this
.
order
.
lianbaoBrandId
+
'&brand='
+
this
.
order
.
brandName
...
@@ -192,22 +284,16 @@
...
@@ -192,22 +284,16 @@
this
.
takeStatus
=
true
this
.
takeStatus
=
true
},
},
closeTake
(
img
)
{
closeTake
(
img
)
{
console
.
log
(
img
)
this
.
takeStatus
=
false
this
.
takeStatus
=
false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if
(
img
){
// 拍照完成
if
(
img
){
// 拍照完成
this
.
$refs
.
uToast
.
show
({
this
.
isErrorSign
=
true
title
:
'签到成功'
,
this
.
errorSignUrl
=
img
type
:
'success'
,
this
.
handleBtn
()
url
:
'pages/order/detail'
,
params
:
{
id
:
1
}
})
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
title
:
'异常签到失败,请先按要求拍照'
,
title
:
'异常签到失败,请先按要求拍照'
,
type
:
'waning'
type
:
'wa
r
ning'
})
})
}
}
},
},
...
@@ -222,14 +308,8 @@
...
@@ -222,14 +308,8 @@
console
.
log
(
"==="
,
res
.
data
)
console
.
log
(
"==="
,
res
.
data
)
self
.
order
=
res
.
data
self
.
order
=
res
.
data
this
.
getCurrentBtn
()
this
.
getCurrentBtn
()
this
.
visibale
=
true
if
(
self
.
order
.
isFirstOrder
){
// self.order.operationType = "accept"
}
// }else{
// self.order.operationType = "appointment"
// }
// self.method =self.operationDoing[self.order.operationType].action;
// // 根据工单的状态确定是否需要过程反馈
// self.allowFeedback = self.allowFeedbackStatus.indexOf(self.order.orderStatus)>0
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
}
}
...
@@ -238,7 +318,7 @@
...
@@ -238,7 +318,7 @@
loadOrderRecord
()
{
loadOrderRecord
()
{
let
self
=
this
let
self
=
this
var
param
=
{
var
param
=
{
'orderId'
:
self
.
orderId
orderId
:
self
.
orderId
};
};
self
.
$u
.
api
.
listOrderRecord
(
param
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listOrderRecord
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
...
@@ -248,9 +328,6 @@
...
@@ -248,9 +328,6 @@
}
}
})
})
},
},
rejectOrder
()
{
// 拒单
console
.
log
(
"点击拒单"
)
},
/**
/**
* 点击下一周
* 点击下一周
* @param {Object} data
* @param {Object} data
...
@@ -297,6 +374,7 @@
...
@@ -297,6 +374,7 @@
this
.
allowFeedback
=
true
this
.
allowFeedback
=
true
this
.
showCenterBtn
=
true
this
.
showCenterBtn
=
true
this
.
showTimeSelect
=
true
this
.
showTimeSelect
=
true
this
.
isAllowDianhuaAndDaohang
=
true
this
.
submitType
=
"workerAppointment"
this
.
submitType
=
"workerAppointment"
}
else
if
(
orderStatus
===
31
&&
this
.
order
.
appointmentDatetime
)
{
}
else
if
(
orderStatus
===
31
&&
this
.
order
.
appointmentDatetime
)
{
// 签到
// 签到
...
@@ -310,36 +388,44 @@
...
@@ -310,36 +388,44 @@
// 完工
// 完工
this
.
centerButton
=
"filish"
this
.
centerButton
=
"filish"
this
.
centerButtonText
=
"去完工"
this
.
centerButtonText
=
"去完工"
this
.
submitType
=
"toFilish"
this
.
allowFeedback
=
true
this
.
allowFeedback
=
true
this
.
showCenterBtn
=
true
this
.
showCenterBtn
=
true
this
.
scenePhoto
=
true
this
.
scenePhoto
=
true
}
else
{}
}
else
{}
},
},
handleBtn
()
{
handleBtn
()
{
if
(
this
.
centerButton
===
"filish"
){
this
.
filish
()
return
}
if
(
!
this
.
submitType
){
if
(
!
this
.
submitType
){
return
;
return
;
}
}
const
data
=
{}
const
data
=
{}
// 不同请求类型传递不同数据
// 不同请求类型传递不同数据
if
(
this
.
submitType
===
'maintainWorkerCheckin'
)
{
// 签到
if
(
this
.
submitType
===
'orderAccept'
){
// 接单
data
.
orderId
=
this
.
order
.
orderId
}
else
if
(
this
.
submitType
===
'orderGan'
){
// 抢单
data
.
orderId
=
this
.
order
.
orderId
}
else
if
(
this
.
submitType
===
'workerAppointment'
){
// 预约
data
.
appointmentDatetime
=
''
data
.
appointmentDatetimeRange
=
''
if
(
!
data
.
appointmentDatetime
||
!
data
.
appointmentDatetimeRange
){
this
.
commonToast
(
'请选择预约时间和时间段'
,
'waring'
)
return
}
}
else
if
(
this
.
submitType
===
'maintainWorkerCheckin'
)
{
// 签到
// 检查见到距离是否符合
// 检查见到距离是否符合
if
(
!
this
.
isErrorSign
){
if
(
this
.
getDistance
(
this
.
order
.
contactAddressLatitud
,
this
.
order
.
contactAddressLongitud
)
>
3
){
if
(
this
.
getDistance
(
this
.
order
.
contactAddressLatitud
,
this
.
order
.
contactAddressLongitud
)
>
3
){
this
.
$refs
.
uToast
.
show
({
this
.
commonToast
(
'签到失败,请点击异常签到处理或联系客服'
,
'error'
)
title
:
'签到失败,请点击异常签到处理或联系客服'
,
type
:
'error'
})
return
return
}
}
data
.
remark
=
"123"
}
data
.
revert
=
true
data
.
exception
=
this
.
isErrorSign
}
else
if
(
this
.
submitType
===
'orderAccept'
){
// 接单
data
.
coordinate
=
this
.
dataValue
?
this
.
dataValue
[
0
]
+
','
+
this
.
dataValue
[
1
]:
''
data
.
orderId
=
this
.
order
.
orderId
data
.
url
=
this
.
errorSignUrl
?
this
.
errorSignUrl
:
''
}
else
if
(
this
.
submitType
===
'orderGan'
){
// 抢单
}
else
if
(
this
.
submitType
===
'toFilish'
){
// 去完工
data
.
orderId
=
this
.
order
.
orderId
this
.
filish
()
return
}
}
this
.
$u
.
api
[
this
.
submitType
](
data
,
this
.
order
.
orderId
).
then
(
res
=>
{
this
.
$u
.
api
[
this
.
submitType
](
data
,
this
.
order
.
orderId
).
then
(
res
=>
{
if
((
res
.
data
.
code
!==
undefined
&&
res
.
data
.
code
===
200
)
if
((
res
.
data
.
code
!==
undefined
&&
res
.
data
.
code
===
200
)
...
@@ -349,8 +435,7 @@
...
@@ -349,8 +435,7 @@
type
:
'success'
,
type
:
'success'
,
url
:
'pages/order/detail'
,
url
:
'pages/order/detail'
,
params
:
{
params
:
{
id
:
1
,
id
:
this
.
order
.
orderId
menu
:
2
}
}
})
})
}
else
{
}
else
{
...
@@ -363,6 +448,14 @@
...
@@ -363,6 +448,14 @@
}
}
})
})
},
},
commonToast
(
message
,
type
,
url
,
params
){
// 统一得toast
this
.
$refs
.
uToast
.
show
({
title
:
message
,
type
:
type
,
url
:
url
,
params
:
params
})
},
isGan
(){
isGan
(){
this
.
centerButtonText
=
"已被抢"
this
.
centerButtonText
=
"已被抢"
this
.
submitType
=
""
this
.
submitType
=
""
...
@@ -382,6 +475,17 @@
...
@@ -382,6 +475,17 @@
+
"&orderServiceType="
+
this
.
order
.
orderServiceType
+
"&orderServiceType="
+
this
.
order
.
orderServiceType
})
})
},
},
rejectOrder
()
{
// 拒单
// 检查是否可以拒单
var
data
=
{}
this
.
$u
.
api
.
checkRejectable
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
200
&&
res
.
data
.
data
===
true
)
{
uni
.
navigateTo
({
url
:
'pages/order/refuse?orderId='
+
this
.
order
.
orderId
})
}
})
},
/**
/**
* 获取当前位置的经纬度
* 获取当前位置的经纬度
*/
*/
...
@@ -443,7 +547,8 @@
...
@@ -443,7 +547,8 @@
this
.
btnClass
=
'timeOut-btn'
this
.
btnClass
=
'timeOut-btn'
self
.
$refs
[
'uCountDown'
].
seconds
+=
2
self
.
$refs
[
'uCountDown'
].
seconds
+=
2
}
}
},
handleClick
(){
},
handleClick
(){
this
.
visibale
=
false
this
.
visibale
=
false
// 去完工
// 去完工
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -460,52 +565,57 @@
...
@@ -460,52 +565,57 @@
height
:
100vh
;
height
:
100vh
;
overflow
:
auto
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
,
#2272FF
);
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
50%
);
background-size
:
750rpx
600rpx
;
background-size
:
750rpx
600rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
display
:
flex
;
flex-direction
:
column
;
.header
{
.header
{
padding
:
12rpx
30rpx
40
rpx
30rpx
;
padding
:
30rpx
30rpx
46
rpx
30rpx
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
.title
{
.title
{
font-size
:
40rpx
;
line-height
:
40rpx
;
font-
weight
:
bold
;
font-
size
:
40rpx
;
color
:
#FFFFFF
;
color
:
#fff
;
}
}
.button
{
.button
{
text-align
:
center
;
text-align
:
center
;
width
:
106rpx
;
width
:
106rpx
;
height
:
52rpx
;
height
:
52rpx
;
background
:
#FFFFFF
;
border-radius
:
40rpx
;
border-radius
:
40rpx
;
font-size
:
24rpx
;
font-size
:
24rpx
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#2272FF
;
line-height
:
52rpx
;
line-height
:
52rpx
;
color
:
#DEDEDE
;
}
}
}
}
.content
{
.content
{
height
:
2000rpx
;
height
:
100%
;
border-radius
:
12rpx
;
overflow
:
auto
;
margin-right
:
30rpx
;
margin-left
:
30rpx
;
.card
{
.card
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
margin
:
0
30rpx
20rpx
3
0rpx
;
margin
-bottom
:
2
0rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
padding
:
30rpx
30rpx
0
30rpx
;
border-radius
:
6px
;
border-radius
:
6px
;
}
}
.base-item
{
.base-item
{
padding-bottom
:
3
6rpx
;
padding-bottom
:
6rpx
;
.top-item
{
.top-item
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-bottom
:
2
0rpx
;
margin-bottom
:
3
0rpx
;
.left
{
.left
{
display
:
flex
;
display
:
flex
;
...
@@ -515,16 +625,20 @@
...
@@ -515,16 +625,20 @@
text-align
:
center
;
text-align
:
center
;
width
:
84rpx
;
width
:
84rpx
;
height
:
40rpx
;
height
:
40rpx
;
background-image
:
linear-gradient
(
270deg
,
#47ABFF
0%
,
#2272FF
100%
);
border-radius
:
8rpx
;
border-radius
:
8rpx
;
font-size
:
22rpx
;
font-size
:
22rpx
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
line-height
:
40rpx
;
line-height
:
40rpx
;
background-image
:
linear-gradient
(
to
right
,
#FF930D
,
#FFC174
);
&
.active
{
background-image
:
linear-gradient
(
to
right
,
#2272FF
,
#47ABFF
);
}
}
}
.title
{
.title
{
margin-left
:
3
0rpx
;
margin-left
:
2
0rpx
;
height
:
36rpx
;
height
:
36rpx
;
font-size
:
36rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
...
@@ -552,7 +666,8 @@
...
@@ -552,7 +666,8 @@
font-weight
:
400
;
font-weight
:
400
;
color
:
#333333
;
color
:
#333333
;
line-height
:
24rpx
;
line-height
:
24rpx
;
margin-top
:
20rpx
;
margin-bottom
:
40rpx
;
.left
{
.left
{
.address-txt
{
.address-txt
{
margin-left
:
8rpx
;
margin-left
:
8rpx
;
...
@@ -561,8 +676,32 @@
...
@@ -561,8 +676,32 @@
}
}
}
}
.read-more-toggle
{
text-align
:
center
;
color
:
#2272FF
;
font-size
:
26rpx
;
margin-top
:
30rpx
;
padding-bottom
:
30rpx
;
}
.read-more-text
{
padding-left
:
8rpx
;
}
.order-item-more
{
font-size
:
26rpx
;
color
:
#333333
;
.line-view
{
background-color
:
#F4F5F7
;
height
:
2rpx
;
margin-bottom
:
20rpx
;
}
}
.order-item
{
.order-item
{
padding-bottom
:
34
rpx
;
padding-bottom
:
6
rpx
;
.top-item
{
.top-item
{
display
:
flex
;
display
:
flex
;
...
@@ -570,12 +709,19 @@
...
@@ -570,12 +709,19 @@
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
.title
{
.title
{
height
:
3
6
rpx
;
height
:
3
2
rpx
;
font-size
:
3
6
rpx
;
font-size
:
3
2
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#333333
;
color
:
#333333
;
line-height
:
36rpx
;
line-height
:
36rpx
;
}
}
}
.no-record-view
{
font-size
:
26rpx
;
color
:
#333333
;
margin-top
:
30rpx
;
}
}
.address-cell
{
.address-cell
{
...
@@ -593,7 +739,9 @@
...
@@ -593,7 +739,9 @@
}
}
}
}
.record-item
{}
.record-item
{
margin-bottom
:
0rpx
;
}
.appoint-item
{
.appoint-item
{
padding
:
0
;
padding
:
0
;
...
@@ -601,7 +749,8 @@
...
@@ -601,7 +749,8 @@
}
}
.toolbar
{
.toolbar
{
margin-bottom
:
104rpx
;
margin-top
:
30rpx
;
margin-bottom
:
44rpx
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
...
@@ -615,10 +764,13 @@
...
@@ -615,10 +764,13 @@
height
:
100rpx
;
height
:
100rpx
;
background
:
#929CB8
;
background
:
#929CB8
;
border-radius
:
100rpx
;
border-radius
:
100rpx
;
font-size
:
25rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
align-items
:
center
;
display
:
flex
;
display
:
flex
;
text-align
:
center
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
20rpx
;
color
:
#FFFFFF
;
}
}
}
}
...
@@ -628,16 +780,23 @@
...
@@ -628,16 +780,23 @@
margin-left
:
74rpx
;
margin-left
:
74rpx
;
margin-right
:
74rpx
;
margin-right
:
74rpx
;
.
button
{
.
center-button-view
{
width
:
140rpx
;
width
:
140rpx
;
height
:
140rpx
;
height
:
140rpx
;
border-radius
:
100rpx
;
border-radius
:
100rpx
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
flex-direction
:
column
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
font-size
:
32rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
.time-view
{
display
:
flex
;
font-size
:
20rpx
;
color
:
#FFFFFF
;
}
}
}
.appoint-btn
{
.appoint-btn
{
...
@@ -646,13 +805,13 @@
...
@@ -646,13 +805,13 @@
}
}
.isGan-btn
{
.isGan-btn
{
background
:
#
93a7a6
;
background
:
#
D1D4D4
;
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
box-shadow
:
2px
2px
20px
0px
rgba
(
181
,
181
,
181
,
0
.3
);
}
}
.timeOut-btn
{
.timeOut-btn
{
background
:
#
ff0000
;
background
:
#
e86552
;
box-shadow
:
2px
2px
20px
0px
rgba
(
34
,
114
,
255
,
0
.3
);
box-shadow
:
2px
2px
20px
0px
rgba
(
232
,
101
,
82
,
0
.3
);
}
}
}
}
...
@@ -663,12 +822,17 @@
...
@@ -663,12 +822,17 @@
.button
{
.button
{
width
:
100rpx
;
width
:
100rpx
;
height
:
100rpx
;
height
:
100rpx
;
background
:
#
d99100
;
background
:
#
FF930D
;
border-radius
:
100rpx
;
border-radius
:
100rpx
;
font-size
:
2
5
rpx
;
font-size
:
2
0
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
align-items
:
center
;
align-items
:
center
;
display
:
flex
;
display
:
flex
;
color
:
#FFFFFF
;
justify-content
:
center
;
&
.active
{
background-color
:
#D1D4D4
;
}
}
}
}
}
}
}
...
@@ -681,7 +845,8 @@
...
@@ -681,7 +845,8 @@
font-weight
:
400
;
font-weight
:
400
;
color
:
#333333
;
color
:
#333333
;
line-height
:
48rpx
;
line-height
:
48rpx
;
margin-bottom
:
30rpx
;
margin-bottom
:
10rpx
;
text-align
:
left
;
}
}
.between-cell
{
.between-cell
{
...
...
src/pages/order/feedback.vue
View file @
8b91f718
...
@@ -20,14 +20,15 @@
...
@@ -20,14 +20,15 @@
<u-tabs
<u-tabs
:list=
"tabList"
:list=
"tabList"
:current=
"curTab"
:current=
"curTab"
height=
"
8
0"
height=
"
6
0"
gutter=
"89"
gutter=
"89"
bar-height=
"4"
bar-height=
"4"
bar-width=
"44"
bar-width=
"44"
bg-color=
"none"
bg-color=
"none"
active-color=
"#FFFFFF"
active-color=
"#FFFFFF"
inactive-color=
"#
FFFFFF
"
inactive-color=
"#
DEDEDE
"
font-size=
"32"
font-size=
"32"
bold
@
change=
"changeTab"
@
change=
"changeTab"
></u-tabs>
></u-tabs>
</view>
</view>
...
@@ -35,6 +36,7 @@
...
@@ -35,6 +36,7 @@
<!--
<view
class=
"con-box"
>
<!--
<view
class=
"con-box"
>
</view>
-->
</view>
-->
<view
class=
"content-view"
>
<view
class=
"con-box"
>
<view
class=
"con-box"
>
<view
class=
"title"
>
{{
feedback
.
own
.
title
}}
</view>
<view
class=
"title"
>
{{
feedback
.
own
.
title
}}
</view>
<view
class=
"u-flex u-flex-wrap"
>
<view
class=
"u-flex u-flex-wrap"
>
...
@@ -43,7 +45,7 @@
...
@@ -43,7 +45,7 @@
:key=
"index"
:key=
"index"
@
click=
"changeOwn(index)"
@
click=
"changeOwn(index)"
:class=
"
{'txt-item':true,'active': (trace.reasonRelegation == index)}">
:class=
"
{'txt-item':true,'active': (trace.reasonRelegation == index)}">
<text
class=
"txt"
>
{{
i
ndex
}}
</text>
<text
class=
"txt"
>
{{
i
tem
}}
</text>
</view>
</view>
</view>
</view>
<u-gap
height=
"30"
></u-gap>
<u-gap
height=
"30"
></u-gap>
...
@@ -53,21 +55,27 @@
...
@@ -53,21 +55,27 @@
v-for=
"(txt, index) in options[curTab][trace.reasonRelegation]"
v-for=
"(txt, index) in options[curTab][trace.reasonRelegation]"
:key=
"index"
:key=
"index"
@
click=
"changeType(txt)"
@
click=
"changeType(txt)"
:class=
"
{'txt-item':true,'active': (trace.reason == txt)}">
:class=
"
{'txt-item':true,'active': (trace.reason == txt)}"
style="width: 306rpx;margin-right: 18rpx"
>
<text
class=
"txt"
>
{{
txt
}}
</text>
<text
class=
"txt"
>
{{
txt
}}
</text>
</view>
</view>
</view>
</view>
<u-input
v-show=
"showRemark"
v-model=
"trace.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
<view
class=
"input-view"
v-show=
"showRemark"
>
<u-input
v-model=
"trace.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
</view>
</view>
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
<view
class=
"u-m-60"
>
<view
class=
"time-view"
>
<button
class=
"btn"
@
click=
"submitForm"
:loading=
"submiting"
:disabled=
"disabledSubmit"
>
确定
</button>
<appoint-time
:dateList=
"dateList"
:title=
"appointTitle"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
</view>
<view
class=
"bottom-view"
>
<button
class=
"btn, bottom-btn"
@
click=
"submitForm"
:loading=
"submiting"
:disabled=
"disabledSubmit"
><text
class=
"button-text"
>
确定
</text></button>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
let
now
=
Date
.
now
()
import
appointTime
from
'@/components/appoint/appoint-time.vue'
import
appointTime
from
'@/components/appoint/appoint-time.vue'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -76,6 +84,26 @@
...
@@ -76,6 +84,26 @@
categoryId
:
null
,
categoryId
:
null
,
showRemark
:
false
,
showRemark
:
false
,
submiting
:
false
,
submiting
:
false
,
dateList
:
[
{
day
:
now
,
timeRange
:
[]},
{
day
:
now
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
5
*
86400000
),
timeRange
:
[]},
{
day
:
now
+
(
6
*
86400000
),
timeRange
:
[]},
],
timeList
:
[
{
"name"
:
"06:00-08:00"
,
"pkey"
:
"appointment_range_8"
,
"disabled"
:
false
},
{
"name"
:
"08:00-10:00"
,
"pkey"
:
"appointment_range_10"
,
"disabled"
:
false
},
{
"name"
:
"10:00-12:00"
,
"pkey"
:
"appointment_range_12"
,
"disabled"
:
false
},
{
"name"
:
"12:00-14:00"
,
"pkey"
:
"appointment_range_14"
,
"disabled"
:
false
},
{
"name"
:
"14:00-16:00"
,
"pkey"
:
"appointment_range_16"
,
"disabled"
:
false
},
{
"name"
:
"16:00-18:00"
,
"pkey"
:
"appointment_range_18"
,
"disabled"
:
false
},
{
"name"
:
"18:00-20:00"
,
"pkey"
:
"appointment_range_20"
,
"disabled"
:
false
},
{
"name"
:
"20:00-22:00"
,
"pkey"
:
"appointment_range_22"
,
"disabled"
:
false
},
{
"name"
:
"22:00-24:00"
,
"pkey"
:
"appointment_range_24"
,
"disabled"
:
false
}
],
background
:
{
background
:
{
backgroundColor
:
'none'
,
backgroundColor
:
'none'
,
},
},
...
@@ -96,7 +124,7 @@
...
@@ -96,7 +124,7 @@
config
:
null
,
config
:
null
,
options
:
[],
options
:
[],
trace
:
{
trace
:
{
reasonType
:
''
,
// 反馈类型
reasonType
:
'
报单
'
,
// 反馈类型
reasonRelegation
:
''
,
// 反馈归属
reasonRelegation
:
''
,
// 反馈归属
reason
:
''
,
// 反馈原因
reason
:
''
,
// 反馈原因
appointmentDatetime
:
null
,
// 预约时间
appointmentDatetime
:
null
,
// 预约时间
...
@@ -115,7 +143,6 @@
...
@@ -115,7 +143,6 @@
}
}
},
},
computed
:
{
computed
:
{
disabledSubmit
()
{
disabledSubmit
()
{
let
self
=
this
let
self
=
this
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'报备'
){
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'报备'
){
...
@@ -132,8 +159,12 @@
...
@@ -132,8 +159,12 @@
return
true
return
true
},
},
appointTitle
()
{
return
this
.
feedback
.
appoint
[
this
.
trace
.
reasonType
]
},
},
},
async
onLoad
(
e
)
{
async
onLoad
(
e
)
{
this
.
$u
.
vuex
(
'vuex_token'
,
'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5'
);
this
.
orderId
=
1
this
.
orderId
=
1
this
.
categoryId
=
88
this
.
categoryId
=
88
if
(
e
)
{
if
(
e
)
{
...
@@ -144,9 +175,12 @@
...
@@ -144,9 +175,12 @@
title
:
"数据加载中"
,
title
:
"数据加载中"
,
mask
:
true
mask
:
true
})
})
this
.
loadCalendar
()
this
.
loadTimerange
()
await
this
.
initPageData
()
await
this
.
initPageData
()
},
},
methods
:
{
methods
:
{
/* 初始化页面数据 */
async
initPageData
()
{
async
initPageData
()
{
let
self
=
this
let
self
=
this
let
params
=
{
categoryId
:
self
.
categoryId
}
let
params
=
{
categoryId
:
self
.
categoryId
}
...
@@ -158,6 +192,7 @@
...
@@ -158,6 +192,7 @@
}
}
uni
.
hideLoading
()
uni
.
hideLoading
()
},
},
/* 组装参数 */
buildConfig
()
{
buildConfig
()
{
let
self
=
this
let
self
=
this
if
(
self
.
config
)
{
if
(
self
.
config
)
{
...
@@ -169,6 +204,7 @@
...
@@ -169,6 +204,7 @@
})
})
}
}
},
},
/* 初始化参数 */
initParams
()
{
initParams
()
{
let
self
=
this
let
self
=
this
if
(
self
.
config
)
{
if
(
self
.
config
)
{
...
@@ -188,6 +224,32 @@
...
@@ -188,6 +224,32 @@
}
}
}
}
},
},
/* 加载日历数据 */
async
loadCalendar
()
{
let
self
=
this
let
params
=
{
num
:
1
}
let
res
=
await
this
.
$u
.
api
.
workerCalendar
(
params
)
if
(
res
&&
res
.
code
==
200
)
{
self
.
dateList
=
res
.
data
}
},
/* 加载预约时间段 */
async
loadTimerange
()
{
let
self
=
this
let
res
=
await
this
.
$u
.
api
.
openTimerange
()
if
(
res
&&
res
.
code
==
200
)
{
let
list
=
res
.
data
list
.
map
((
item
,
index
)
=>
{
item
.
disabled
=
false
})
self
.
timeList
=
list
}
},
/**
/**
* 切换tab项
* 切换tab项
*/
*/
...
@@ -212,18 +274,54 @@
...
@@ -212,18 +274,54 @@
weekChange
(
data
){
weekChange
(
data
){
// 点击下一周
// 点击下一周
console
.
log
(
data
,
'week-data'
)
console
.
log
(
data
,
'week-data'
)
if
(
data
&&
data
.
time
)
{
let
num
=
data
.
num
let
time
=
data
.
time
if
(
num
==
0
)
{
this
.
dateList
=
[
{
day
:
time
,
timeRange
:
[]},
{
day
:
time
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
5
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
6
*
86400000
),
timeRange
:
[]},
]
}
else
{
this
.
dateList
=
[
{
day
:
time
,
timeRange
:
[]},
{
day
:
time
+
(
1
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
2
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
3
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
4
*
86400000
),
timeRange
:
[]},
{
day
:
time
+
(
5
*
86400000
),
timeRange
:
[]},
]
}
}
},
},
dateChange
(
data
){
dateChange
(
data
){
debugger
// 点击日期选择
// 点击日期选择
console
.
log
(
data
,
'week-data'
)
console
.
log
(
data
,
'week-data'
)
let
self
=
this
let
self
=
this
if
(
self
.
trace
.
reasonType
==
'报备'
)
{
if
(
self
.
trace
.
reasonType
==
'报备'
)
{
self
.
trace
.
appointmentDatetime
=
null
self
.
trace
.
appointmentDatetime
=
null
self
.
trace
.
nextTraceDatetime
=
data
.
item
.
day
self
.
trace
.
nextTraceDatetime
=
data
.
item
.
day
self
.
timeList
.
map
((
item
,
index
)
=>
{
item
.
disabled
=
false
})
}
else
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
}
else
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
self
.
trace
.
appointmentDatetime
=
data
.
item
.
day
self
.
trace
.
appointmentDatetime
=
data
.
item
.
day
self
.
trace
.
nextTraceDatetime
=
null
self
.
trace
.
nextTraceDatetime
=
null
self
.
timeList
.
map
((
item
,
index
)
=>
{
if
(
data
.
item
.
timeRange
.
indexOf
(
item
.
pkey
)
>
-
1
)
{
item
.
disabled
=
true
}
else
{
item
.
disabled
=
false
}
})
}
}
},
},
...
@@ -257,11 +355,13 @@
...
@@ -257,11 +355,13 @@
height
:
100vh
;
height
:
100vh
;
overflow
:
auto
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
10
0%
);
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
5
0%
);
background-size
:
750rpx
600rpx
;
background-size
:
750rpx
600rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
}
}
.feedback-box
{
.feedback-box
{
display
:
flex
;
flex-direction
:
column
;
.header
{
.header
{
padding
:
12rpx
30rpx
40rpx
30rpx
;
padding
:
12rpx
30rpx
40rpx
30rpx
;
display
:
flex
;
display
:
flex
;
...
@@ -280,9 +380,43 @@
...
@@ -280,9 +380,43 @@
.top-tab
{
.top-tab
{
text-align
:
center
;
text-align
:
center
;
}
}
.con-box
{
.content
{
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
margin-bottom
:
188rpx
;
.content-view
{
height
:
100%
;
border-radius
:
12rpx
;
overflow
:
auto
;
margin-top
:
30rpx
;
margin-top
:
30rpx
;
padding
:
30rpx
30rpx
28rpx
30rpx
;
.time-view
{
border-radius
:
12rpx
;
background-color
:
#FFFFFF
;
padding-bottom
:
20rpx
;
}
}
}
.bottom-view
{
position
:
fixed
;
bottom
:
44rpx
;
width
:
100%
;
}
.bottom-btn
{
height
:
104rpx
;
width
:
600rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.button-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
}
}
.con-box
{
padding
:
30rpx
30rpx
8rpx
30rpx
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
.title
{
.title
{
...
@@ -293,28 +427,39 @@
...
@@ -293,28 +427,39 @@
}
}
&
>
.u-flex
{
&
>
.u-flex
{
margin-top
:
40rpx
;
margin-top
:
40rpx
;
margin-right
:
-2
0
rpx
;
margin-right
:
-2
4
rpx
;
.txt-item
{
.txt-item
{
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
24rpx
38rpx
;
padding
:
24rpx
38rpx
;
min-width
:
196rpx
;
width
:
196rpx
;
height
:
72rpx
;
text-align
:
center
;
text-align
:
center
;
margin-right
:
2
0
rpx
;
margin-right
:
2
2
rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
&
.active
{
&
.active
{
background-color
:
#2272FF
;
background-color
:
#2272FF
;
.txt
{
.txt
{
color
:
#fff
;
color
:
#fff
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
}
}
}
}
}
}
}
.txt
{
.txt
{
display
:block
;
display
:block
;
font-size
:
26rpx
;
font-size
:
26rpx
;
line-height
:
26rpx
;
line-height
:
26rpx
;
color
:
#333
;
color
:
#333
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
.input-view
{
margin-bottom
:
24rpx
;
}
}
.textarea
{
.textarea
{
...
...
src/pages/order/index.vue
View file @
8b91f718
...
@@ -85,9 +85,12 @@
...
@@ -85,9 +85,12 @@
},
},
onLoad
()
{
onLoad
()
{
this
.
getLocation
();
this
.
getLocation
();
this
.
getOrderCount
();
//
this.getOrderCount();
this
.
getOrderList
(
0
);
this
.
getOrderList
(
0
);
},
},
onShow
()
{
this
.
getOrderCount
()
},
computed
:
{
computed
:
{
subList
()
{
subList
()
{
return
[
'待受理'
,
'已完工'
]
return
[
'待受理'
,
'已完工'
]
...
@@ -107,7 +110,7 @@
...
@@ -107,7 +110,7 @@
'waitAppointment'
:
0
,
// 待预约、
'waitAppointment'
:
0
,
// 待预约、
'waitCheckIn'
:
1
,
// 待签到、
'waitCheckIn'
:
1
,
// 待签到、
'waitFinish'
:
2
,
// 待完工、
'waitFinish'
:
2
,
// 待完工、
'
review
'
:
3
,
// 审核中、
'
audit
'
:
3
,
// 审核中、
'exception'
:
4
,
// 异常单、
'exception'
:
4
,
// 异常单、
'finish'
:
5
,
//已完工
'finish'
:
5
,
//已完工
}
}
...
@@ -118,7 +121,7 @@
...
@@ -118,7 +121,7 @@
0
:
'waitAppointment'
,
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
2
:
'waitFinish'
,
3
:
'
review
'
,
3
:
'
audit
'
,
4
:
'exception'
,
4
:
'exception'
,
5
:
'finish'
5
:
'finish'
}
}
...
@@ -134,7 +137,7 @@
...
@@ -134,7 +137,7 @@
this
.
pageNumber
=
0
this
.
pageNumber
=
0
this
.
orderList
=
[]
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
===
0
?
0
:
5
)
this
.
getOrderList
(
index
===
0
?
this
.
currentIndex
:
5
)
},
},
// tab栏切换
// tab栏切换
change
(
index
)
{
change
(
index
)
{
...
@@ -187,8 +190,8 @@
...
@@ -187,8 +190,8 @@
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
res
.
data
.
type
=
self
.
orderType
res
.
data
.
type
=
self
.
orderType
if
(
res
.
data
.
list
)
{
if
(
res
.
data
.
list
)
{
res
.
data
.
total
=
15
if
(
res
.
data
.
list
.
length
==
0
&&
res
.
data
.
total
>
0
)
{
if
(
res
.
data
.
list
.
length
==
0
&&
res
.
data
.
total
>
0
)
{
res
.
data
.
total
=
15
res
.
data
.
list
=
[{
res
.
data
.
list
=
[{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
categoryName
:
'充电桩'
,
// 品类:充电桩
...
@@ -209,13 +212,13 @@
...
@@ -209,13 +212,13 @@
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderId
:
'1100000216'
orderId
:
'1100000216'
}]
}]
}
res
.
data
.
list
=
[...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
res
.
data
.
list
=
[...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
.
data
.
list
,
...
res
.
data
.
list
]
]
}
}
}
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
// 后台需要返回type,防止数据返回延迟期间点击了其他的tab
// 后台需要返回type,防止数据返回延迟期间点击了其他的tab
...
@@ -256,6 +259,8 @@
...
@@ -256,6 +259,8 @@
}
}
})
})
}
}
// 修改tab总数
// ...
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
}
...
...
src/pages/order/refuse.vue
View file @
8b91f718
<!-- 过程反馈 -->
<!-- 过程反馈 -->
<
template
>
<
template
>
<view
class=
"refuse-box bg"
>
<view
class=
"refuse-box bg"
>
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
title
=
"拒单"
title
-color=
"#fff"
:border-bottom=
"false"
></u-navbar>
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
title-color=
"#fff"
:border-bottom=
"false"
></u-navbar>
<view
class=
"title"
>
拒单说明
</view>
<view
class=
"title"
>
拒单说明
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"con-box"
>
<view
class=
"con-box"
>
...
@@ -17,22 +17,26 @@
...
@@ -17,22 +17,26 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"con-box"
>
<view
class=
"con-box"
style=
"padding-top: 10rpx;"
>
<view
class=
"tit u-m-b-
4
0"
>
补充说明
</view>
<view
class=
"tit u-m-b-
2
0"
>
补充说明
</view>
<u-input
v-model=
"formData.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
<u-input
v-model=
"formData.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
:clearable=
"false"
></u-input>
</view>
</view>
</view>
</view>
<view
class=
"
u-m-60
"
>
<view
class=
"
bottom-btn-view
"
>
<button
:loading=
"submiting"
:disabled=
"disabledSubmit"
class=
"btn
"
@
click=
"submitForm"
>
确定
</button>
<button
:loading=
"submiting"
:disabled=
"disabledSubmit"
class=
"btn
bottom-btn"
@
click=
"handleClickSubmit"
><text
class=
"button-text"
>
提交
</text>
</button>
</view>
</view>
<PopView
title=
"拒单提示"
message=
"确定“拒单”操作,将影响对您的派单频率,\n甚至进入黑名单,请谨慎操作"
:visible
.
sync=
"visibale"
:count=
"count"
@
click=
"handleClick"
buttonText=
"确定"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
PopView
from
"@/components/popView/index.vue"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
visibale
:
false
,
orderId
:
''
,
orderId
:
''
,
submiting
:
false
,
submiting
:
false
,
background
:
{
background
:
{
...
@@ -46,6 +50,7 @@
...
@@ -46,6 +50,7 @@
rejectReason
:
''
,
rejectReason
:
''
,
remark
:
''
remark
:
''
},
},
count
:
0
,
// 剩余次数
};
};
},
},
computed
:
{
computed
:
{
...
@@ -53,7 +58,9 @@
...
@@ -53,7 +58,9 @@
return
!
this
.
formData
.
rejectReason
return
!
this
.
formData
.
rejectReason
}
}
},
},
components
:{},
components
:{
PopView
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
orderId
=
111
this
.
orderId
=
111
if
(
e
&&
e
.
orderId
)
{
if
(
e
&&
e
.
orderId
)
{
...
@@ -64,6 +71,21 @@
...
@@ -64,6 +71,21 @@
changeReason
(
reason
)
{
changeReason
(
reason
)
{
this
.
formData
.
rejectReason
=
reason
this
.
formData
.
rejectReason
=
reason
},
},
handleClickSubmit
()
{
if
(
this
.
count
>
0
)
{
this
.
visibale
=
true
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'本月无拒单机会,请联系客服'
,
})
}
},
handleClick
()
{
this
.
visibale
=
false
this
.
submitForm
()
},
async
submitForm
()
{
async
submitForm
()
{
let
self
=
this
let
self
=
this
self
.
submiting
=
true
self
.
submiting
=
true
...
@@ -88,13 +110,13 @@
...
@@ -88,13 +110,13 @@
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.bg
{
.bg
{
width
:
750rpx
;
width
:
750rpx
;
height
:
100vh
;
height
:
100vh
;
overflow
:
auto
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
10
0%
);
background-image
:
linear-gradient
(
to
top
,
#F4F5F7
0%
,
#2272FF
5
0%
);
background-size
:
750rpx
600rpx
;
background-size
:
750rpx
600rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
}
}
...
@@ -107,6 +129,7 @@
...
@@ -107,6 +129,7 @@
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding-bottom
:
60rpx
;
padding-bottom
:
60rpx
;
background-color
:
#fff
;
background-color
:
#fff
;
min-height
:
800rpx
;
}
}
.con-box
{
.con-box
{
padding
:
30rpx
;
padding
:
30rpx
;
...
@@ -123,10 +146,11 @@
...
@@ -123,10 +146,11 @@
margin-right
:
-20rpx
;
margin-right
:
-20rpx
;
.txt-item
{
.txt-item
{
border-radius
:
12rpx
;
border-radius
:
12rpx
;
padding
:
24rpx
38rpx
;
padding-top
:
24rpx
;
min-width
:
196rpx
;
padding-bottom
:
24rpx
;
width
:
196rpx
;
text-align
:
center
;
text-align
:
center
;
margin-right
:
2
0
rpx
;
margin-right
:
2
2
rpx
;
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
&
.active
{
&
.active
{
...
@@ -193,4 +217,21 @@
...
@@ -193,4 +217,21 @@
margin-right
:
10rpx
;
margin-right
:
10rpx
;
color
:
#FA5A49
color
:
#FA5A49
}
}
.bottom-btn-view
{
width
:
100%
;
padding
:
0
80rpx
;
position
:
absolute
;
bottom
:
44rpx
;
.bottom-btn
{
height
:
104rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.button-text
{
font-size
:
32rpx
;
font-weight
:
bold
;
}
}
}
</
style
>
</
style
>
src/pages/settle/prompt.vue
View file @
8b91f718
<
template
>
<
template
>
<view
class=
"container u-row-between"
v-if=
"info"
>
<view
class=
"container u-row-between"
v-if=
"info"
>
<Settle
:index=
"pageIndex"
>
<Settle
:index=
"pageIndex"
:type=
"1"
>
<view
class=
"content-view"
>
<view
class=
"content-view"
>
<!--
<view
style=
"min-height: 120rpx;"
v-if=
"status == 8"
></view>
-->
<!--
<view
style=
"min-height: 120rpx;"
v-if=
"status == 8"
></view>
-->
<view
class=
"u-flex u-row-center"
>
<view
class=
"u-flex u-row-center"
>
...
...
src/pages/settle/sign-contract.vue
View file @
8b91f718
...
@@ -470,7 +470,7 @@
...
@@ -470,7 +470,7 @@
}
}
.item
{
.item
{
display
:
flex
;
display
:
flex
;
padding
:
28rpx
3
0rpx
;
padding
:
28rpx
0rpx
;
width
:
100%
;
width
:
100%
;
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#333
;
color
:
#333
;
...
...
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