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
8f578a52
Commit
8f578a52
authored
Apr 27, 2021
by
郭晓清
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
parents
0185e547
407616aa
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1270 additions
and
1041 deletions
+1270
-1041
.env.dev.js
.env.dev.js
+2
-2
.env.test.js
.env.test.js
+1
-2
order.js
src/common/api/order.js
+6
-1
classify.data.js
src/common/classify.data.js
+20
-44
appoint-time.vue
src/components/appoint/appoint-time.vue
+24
-16
XhFiles.vue
src/components/createCom/XhFiles.vue
+24
-4
XhLocation.vue
src/components/createCom/XhLocation.vue
+1
-1
index.vue
src/components/order/index.vue
+25
-3
noOrder.vue
src/components/order/noOrder.vue
+8
-3
preview.vue
src/components/photo/preview.vue
+11
-30
index.vue
src/components/popView/index.vue
+26
-8
index.vue
src/components/settle/index.vue
+10
-2
index.vue
src/components/take/index.vue
+2
-1
pages.json
src/pages.json
+4
-4
index.vue
src/pages/index/index.vue
+13
-8
index.vue
src/pages/learn/index.vue
+391
-373
section.vue
src/pages/learn/section.vue
+323
-334
complete.vue
src/pages/order/complete.vue
+127
-84
feedback.vue
src/pages/order/feedback.vue
+22
-7
index.vue
src/pages/order/index.vue
+128
-97
refuse.vue
src/pages/order/refuse.vue
+101
-16
prompt.vue
src/pages/settle/prompt.vue
+1
-1
No files found.
.env.dev.js
View file @
8f578a52
const
UNI_APP
=
{
ucenterUrl
:
{
apiUrl
:
'http://
192.168.1.46
'
,
//php端域名请求头
xueUrl
:
'http://
192.168.1.46:8088'
,
//学院
apiUrl
:
'http://
rest-u.yunya.com
'
,
//php端域名请求头
xueUrl
:
'http://
xue.yunya.com'
,
//学院
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl
:
{
...
...
.env.test.js
View file @
8f578a52
...
...
@@ -5,8 +5,7 @@ const UNI_APP = {
banshou
:
'https://m.test.ibanshou.cn'
,
//扳手app
},
systemUrl
:
{
// apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头
apiUrl
:
'http://apidoc.banshouhui.com:3000/mock/31'
,
// mock端域名请求头
apiUrl
:
'https://system.dev.banshouhui.com'
,
//java端域名请求头
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
}
...
...
src/common/api/order.js
View file @
8f578a52
...
...
@@ -37,7 +37,11 @@ let orderApiFun = function(vm){
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rst/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
)
/**
* 查询工单操作记录列表接口
...
...
@@ -88,6 +92,7 @@ let orderApiFun = function(vm){
maintainWorkerCheckin
,
feedbackConfig
,
traceAndAppointment
,
rejectOrder
,
orderStandard
,
saveImage
,
getWatermark
,
...
...
src/common/classify.data.js
View file @
8f578a52
...
...
@@ -68,7 +68,7 @@ export default [{
"fieldsTitle"
:
"电缆"
,
"fieldsName"
:
"file"
,
"fieldsType"
:
"file"
,
"key"
:
"
短裙
"
,
"key"
:
"
电缆
"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/5.jpg"
,
"cat"
:
10
},
...
...
@@ -76,7 +76,7 @@ export default [{
"fieldsTitle"
:
"管材"
,
"fieldsName"
:
"file"
,
"fieldsType"
:
"file"
,
"key"
:
"
短裙
"
,
"key"
:
"
管材
"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/5.jpg"
,
"cat"
:
10
},
...
...
@@ -98,54 +98,30 @@ export default [{
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/7.jpg"
,
"cat"
:
10
},
{
"fieldsTitle"
:
"多级选择"
,
"fieldsName"
:
"mutiPicker"
,
"fieldsType"
:
"mutipicker"
,
"required"
:
true
,
"key"
:
"妈妈装"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/8.jpg"
,
"cat"
:
10
},
{
"fieldsTitle"
:
"时间选择"
,
"fieldsName"
:
"time"
,
"fieldsType"
:
"time"
,
"required"
:
true
,
"key"
:
"牛仔裤"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/9.jpg"
,
"cat"
:
10
},
//
{
//
"fieldsTitle": "多级选择",
//
"fieldsName": "mutiPicker",
//
"fieldsType": "mutipicker",
//
"required": true,
//
"key": "妈妈装",
//
"icon": "https://cdn.uviewui.com/uview/common/classify/1/8.jpg",
//
"cat": 10
//
},
//
{
//
"fieldsTitle": "时间选择",
//
"fieldsName": "time",
//
"fieldsType": "time",
//
"required": true,
//
"key": "牛仔裤",
//
"icon": "https://cdn.uviewui.com/uview/common/classify/1/9.jpg",
//
"cat": 10
//
},
{
"fieldsTitle"
:
"备注"
,
"key"
:
"备注"
,
"fieldsType"
:
"textarea"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/10.jpg"
,
"cat"
:
10
},
{
"fieldsTitle"
:
"休闲裤"
,
"key"
:
"休闲裤"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/11.jpg"
,
"cat"
:
10
},
{
"fieldsTitle"
:
"雪纺衫"
,
"key"
:
"雪纺衫"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/12.jpg"
,
"cat"
:
10
},
{
"fieldsTitle"
:
"防晒衣"
,
"key"
:
"防晒衣"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/13.jpg"
,
"cat"
:
10
},
{
"fieldsTitle"
:
"礼服/婚纱"
,
"key"
:
"礼服婚纱"
,
"icon"
:
"https://cdn.uviewui.com/uview/common/classify/1/14.jpg"
,
"cat"
:
10
}
]
},
...
...
src/components/appoint/appoint-time.vue
View file @
8f578a52
<!-- 预约时间 -->
<
template
>
<view
:class=
"
{'con-box':titleShow}">
<view
class=
"title"
v-if=
"titleShow"
>
{{
'预约时间'
}}
</view>
<view
class=
"title"
v-if=
"titleShow"
>
{{
'预约时间'
}}
</view>
<view
class=
"u-m-t-40"
>
<view
class=
"appoint-box"
>
<view
class=
"select-date"
>
...
...
@@ -24,11 +24,11 @@
<view
class=
"select-time u-p-t-50"
>
<view
class=
"u-flex u-row-between"
>
<view
class=
"txt"
>
选择时间
</view>
<view
class=
"txt active"
>
{{
timeList
[
currentTime
]
}}
</view>
<view
class=
"txt active"
>
{{
currentTimeTxt
}}
</view>
</view>
<view
class=
"u-p-t-30 u-flex u-flex-wrap time-list"
>
<view
@
click=
"timeChange(item,index,timeList)"
:class=
"
{'time-item':true,'active':
index===currentTime
}" v-for="(item,index) in timeList"
:class=
"
{'time-item':true,'active':
(currentTime
&&
index===currentTime)
}" v-for="(item,index) in timeList"
:key="index">
<text
class=
"time"
>
{{
item
}}
</text>
</view>
...
...
@@ -51,31 +51,39 @@
data
()
{
return
{
currentDay
:
0
,
currentTime
:
0
,
currentTime
:
null
,
dateList
:
[{
weekDay
:
'周三'
,
day
:
'21'
day
:
'21'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
四
'
,
day
:
'2
2'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
五
'
,
day
:
'2
3'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
六
'
,
day
:
'2
4'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
日
'
,
day
:
'2
5'
,
},
{
weekDay
:
'周
三
'
,
day
:
'2
1'
weekDay
:
'周
一
'
,
day
:
'2
6'
,
},
],
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
:
{
currentTimeTxt
()
{
if
(
this
.
currentTime
!=
null
)
{
return
this
.
timeList
[
this
.
currentTime
]
}
return
''
},
},
methods
:
{
getDateList
()
{
// 获取日期
...
...
src/components/createCom/XhFiles.vue
View file @
8f578a52
...
...
@@ -29,7 +29,11 @@
name
:
'XhFiles'
,
components
:
{},
mixins
:
[
objMixin
,
baseFile
],
props
:
{},
props
:
{
files
:
{
type
:
Array
,
}
},
filters
:{},
data
()
{
return
{
...
...
@@ -41,7 +45,8 @@
{
text
:
'拍照'
}
]
],
takeStatus
:
false
,
}
},
computed
:
{
...
...
@@ -49,7 +54,22 @@
return
this
.
item
.
settings
||
[]
}
},
watch
:
{},
watch
:
{
'takeStatus'
:
function
(
val
,
oldVal
){
this
.
$emit
(
'getTakeStatus'
,
{
status
:
val
,
index
:
this
.
itemIndex
})
},
'files'
:
{
// 处理相机拍照返回的图片
handler
(
val
)
{
this
.
imgList
=
val
.
map
(
v
=>
{
v
.
path
=
v
.
src
return
v
})
this
.
setValue
()
},
deep
:
true
,
immediate
:
true
,
}
},
mounted
()
{},
methods
:
{
selectUpload
(){
...
...
@@ -79,7 +99,7 @@
return
}
// 使用拍照工具拍摄
this
.
takeStatus
=
true
},
setValue
()
{
const
dataValue
=
[]
...
...
src/components/createCom/XhLocation.vue
View file @
8f578a52
...
...
@@ -29,7 +29,7 @@
let
str
=
''
const
dataValue
=
this
.
dataValue
if
(
dataValue
&&
dataValue
.
length
>
1
){
str
=
'经度:'
+
dataValue
[
0
]
+
','
+
'维度:'
+
dataValue
[
1
]
str
=
'经度:'
+
dataValue
[
0
]
.
toFixed
(
4
)
+
','
+
'纬度:'
+
dataValue
[
1
].
toFixed
(
4
)
}
return
str
},
...
...
src/components/order/index.vue
View file @
8f578a52
...
...
@@ -73,11 +73,19 @@
auditDatetime
:
'2021.04.19 12:45:09'
,
// 审核时间
submissionTime
:
'2021.04.19 16:24:48'
,
// 提交时间
auditResults
:
{},
// 审核结果
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderId
:
'0'
,
// 订单id
}
}
},
orderType
:
Number
,
// 0:待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6'已完工'
},
// waitAccept:待接单、
// waitAppointment:待预约、
// waitCheckIn:待签到、
// waitFinish:待完工、
// review: 审核中、
// exception:异常单、
// finish:已完工
type
:
String
,
location
:
{
// 当前坐标
type
:
Array
,
default
()
{
...
...
@@ -207,6 +215,20 @@
},
showDistance
()
{
return
this
.
orderType
==
0
},
types
()
{
return
{
'waitAccept'
:
0
,
// 待接单、
'waitAppointment'
:
1
,
// 待预约、
'waitCheckIn'
:
2
,
// 待签到、
'waitFinish'
:
3
,
// 待完工、
'review'
:
4
,
// 审核中、
'exception'
:
5
,
// 异常单、
'finish'
:
6
,
//已完工
}
},
orderType
()
{
return
this
.
types
[
this
.
type
]
}
},
methods
:
{
...
...
src/components/order/noOrder.vue
View file @
8f578a52
<
template
>
<view
class=
"no-order-view"
>
<view
class=
"no-order-view"
:style=
"customStyle"
>
<image
class=
"no-order-image"
:src=
"wudingdanImage"
></image>
<text>
当前暂无订单
</text>
</view>
</
template
>
<
script
>
export
default
{
export
default
{
props
:
{
customStyle
:
{
type
:
String
,
default
:
'background-color: #FFFFFF'
}
},
computed
:
{
wudingdanImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'wudingdan.png'
...
...
@@ -24,7 +30,6 @@
color
:
#666666
;
font-size
:
28rpx
;
padding
:
30rpx
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
min-height
:
460rpx
;
...
...
src/components/photo/preview.vue
View file @
8f578a52
...
...
@@ -26,7 +26,6 @@
standardId
:
''
,
images
:
[],
files
:
[],
fileMaps
:
[],
keys
:
[],
token
:
''
,
product
:
''
,
...
...
@@ -74,7 +73,7 @@
})
}
}
photo
.
allImages
.
unshift
(
photo
.
tempPath
.
mixWater
)
if
(
photo
.
currentItem
){
photo
.
currentItem
.
imageList
.
unshift
(
photo
.
tempPath
.
mixWater
)
}
...
...
@@ -139,34 +138,16 @@
self
.
confirmUpload
(
true
)
},
submitFile
()
{
let
self
=
this
if
(
self
.
keys
.
length
)
{
for
(
let
s
of
self
.
keys
)
{
self
.
$u
.
api
.
saveImage
({
"token"
:
self
.
token
,
"standardId"
:
self
.
standardId
,
"url"
:
s
,
}).
then
(
async
res
=>
{
console
.
log
(
res
,
"云服务保存图片"
);
if
(
res
.
result
.
code
)
{
// TODO 参数是否要来回传递
const
photo
=
getApp
().
globalData
.
photo
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
uni
.
hideLoading
()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
if
(
photo
.
currentItemLength
<
10
){
this
.
$emit
(
'changeType'
,
1
)
}
else
{
this
.
$emit
(
'finish'
)
}
}
else
{
uni
.
showToast
({
title
:
'图片上传失败 '
+
res
.
result
.
msg
})
}
})
}
const
photo
=
getApp
().
globalData
.
photo
photo
.
currentItemLength
=
photo
.
currentItemLength
+
1
uni
.
hideLoading
()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
photo
.
allImages
.
unshift
(
this
.
fileMaps
[
0
])
if
(
photo
.
currentItemLength
<
10
){
this
.
$emit
(
'changeType'
,
1
)
}
else
{
this
.
$emit
(
'finish'
)
}
},
downloadImages
()
{
...
...
src/components/popView/index.vue
View file @
8f578a52
...
...
@@ -6,7 +6,10 @@
<view
class=
"order-pop-title"
>
<text>
{{
title
}}
</text>
</view>
<view
class=
"line-view"
/>
<view
class=
"line-view"
/>
<view
v-if=
"count"
class=
"order-content"
>
你本月还有
<text
class=
"order-content-count"
>
{{
count
}}
</text>
次拒单机会
</view>
<view
class=
"order-pop-text"
>
<text>
{{
message
}}
</text>
</view>
...
...
@@ -16,7 +19,7 @@
取消
</u-button>
<u-button
:custom-style=
"customStyleSave"
shape=
"circle"
type=
"primary"
@
click=
"handleClickSure"
>
确定
{{
buttonText
}}
</u-button>
</view>
</view>
...
...
@@ -29,7 +32,12 @@
props
:
{
visible
:
Boolean
,
title
:
String
,
message
:
String
,
message
:
String
,
count
:
Number
,
// 剩余次数
buttonText
:
{
// 确定按钮
type
:
String
,
default
:
'查看'
},
},
data
()
{
return
{}
...
...
@@ -76,21 +84,31 @@
<
style
lang=
"scss"
scoped
>
.order-pop-view
{
padding
:
30rpx
;
min-height
:
520rpx
;
.order-pop-title
{
font-size
:
40rpx
;
margin-top
:
4
0rpx
;
margin-bottom
:
40
rpx
;
margin-top
:
3
0rpx
;
margin-bottom
:
34
rpx
;
text-align
:
center
;
color
:
#333333
;
}
.order-content
{
text-align
:
center
;
color
:
#333333
;
font-size
:
32rpx
;
margin-top
:
26rpx
;
.order-content-count
{
color
:
#FA5A49
;
}
}
.order-pop-text
{
color
:
#999999
;
text-align
:
center
;
margin-top
:
4
0rpx
;
margin-top
:
3
0rpx
;
font-size
:
28rpx
;
margin-bottom
:
26
0rpx
;
// margin-bottom: 18
0rpx;
}
.line-view
{
...
...
src/components/settle/index.vue
View file @
8f578a52
...
...
@@ -3,7 +3,7 @@
<u-navbar
style=
"position: absolute;"
title=
"入驻"
background=
"
{background: transparent}" :border-bottom="false"
back-icon-color="#ffffff" title-color="#ffffff">
</u-navbar>
<image
:src=
"url"
style=
"width: 100%;"
mode=
"widthFix"
></image>
<view
class=
"introduction
"
>
<view
:class=
"['introduction',
{'active': type}]
">
<slot></slot>
</view>
<view
class=
"settle-bottom"
>
...
...
@@ -18,6 +18,11 @@
index
:
{
type
:
Number
,
default
:
1
},
// 0: introduction距离底部168rpx 1: introduction距离底部0rpx
type
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
...
...
@@ -45,7 +50,10 @@
top
:
370rpx
;
bottom
:
168rpx
;
left
:
30rpx
;
right
:
30rpx
;
right
:
30rpx
;
&
.active
{
bottom
:
0rpx
;
}
}
.settle-bottom
{
...
...
src/components/take/index.vue
View file @
8f578a52
...
...
@@ -111,7 +111,8 @@
created
(
e
)
{
const
photo
=
getApp
().
globalData
.
photo
getApp
().
trackPage
(
'拍照页'
)
photo
.
allImages
=
[]
photo
.
allImages
=
[]
photo
.
currentItemLength
=
0
// this.ctx = uni.createCameraContext();
this
.
updateTime
()
this
.
getLocation
()
...
...
src/pages.json
View file @
8f578a52
...
...
@@ -26,8 +26,8 @@
"path"
:
"pages/order/complete"
,
"style"
:
{
"navigationBarTitleText"
:
"订单-完工配置"
,
"navigation
BarBackgroundColor"
:
"#2272FF
"
,
"
navigationBarTextStyle"
:
"white"
"navigation
Style"
:
"custom
"
,
"
disableScroll"
:
true
}
},{
"path"
:
"pages/order/feedback"
,
...
...
@@ -365,8 +365,8 @@
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
},
{
"name"
:
"订单 -
过程反馈
"
,
//模式名称
"path"
:
"pages/order/
feedback
"
,
//启动页面,必选
"name"
:
"订单 -
拒单
"
,
//模式名称
"path"
:
"pages/order/
refuse
"
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
]
...
...
src/pages/index/index.vue
View file @
8f578a52
...
...
@@ -37,8 +37,8 @@
</view>
<view
v-else-if=
"!needSettled && orderList.length > 0"
class=
"order-item-view"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<OrderCell
:orderData=
"item"
:orderType=
"0"
:location=
"location"
@
click=
"handleClick
"
@
action=
"handleAction"
>
</OrderCell>
<OrderCell
:orderData=
"item"
type=
"waitAccept"
:location=
"location"
@
click=
"handleClick(item.orderId)
"
@
action=
"handleAction
(item.orderId)
"
>
</OrderCell>
</view>
<u-loadmore
:status=
"currentLoadStatus"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
...
...
@@ -87,7 +87,7 @@
search
:
{
token
:
""
,
pageNumber
:
0
,
pageSize
:
10
,
pageSize
:
10
0
,
},
bottomLoading
:
false
};
...
...
@@ -143,12 +143,18 @@
},
methods
:
{
handleClick
()
{
// 点击了cell
console
.
log
(
'点击了cell'
)
handleClick
(
orderId
)
{
// 点击了cell
console
.
log
(
'点击了cell'
)
this
.
viewOderItem
(
orderId
)
},
handleAction
()
{
// 点击了按钮
handleAction
(
orderId
)
{
// 点击了按钮
console
.
log
(
'点击了按钮'
)
this
.
viewOderItem
(
orderId
)
},
viewOderItem
(
orderId
)
{
// 跳转工单详情页面
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
})
},
async
initSettleInfo
()
{
let
self
=
this
;
...
...
@@ -164,7 +170,6 @@
await
app
.
getBaseInfo
(
self
,
callBack
);
this
.
orderList
=
[]
this
.
messageList
=
[]
// 加载消息列表
self
.
loadMessageList
();
self
.
loadOrderList
();
...
...
src/pages/learn/index.vue
View file @
8f578a52
<
template
>
<view
class=
"study"
>
<u-navbar
:is-back=
"false"
background=
"
{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text
class=
"title-view"
>
学习
</text>
<u-navbar
:is-back=
"false"
background=
"
{background: transparent}" :border-bottom="false" :is-fixed="false">
<text
class=
"title-view"
>
学习
</text>
</u-navbar>
<image
:src=
"bannerImage"
mode=
""
class=
"banner"
></image>
<!--
<u-tabs
:list=
"tabs"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
></u-tabs>
-->
<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
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>
</view>
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
style=
"height: 755rpx;"
>
<swiper
:current=
"swiperCurrent"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
style=
"height: 755rpx;"
>
<swiper-item
class=
"swiper-item"
>
<scroll-view
scroll-y
style=
"height:796rpx;width:100%;"
@
scrolltolower=
"onreachBottom"
>
<view
class=
"standard"
@
click=
"goToPrint"
>
...
...
@@ -47,15 +44,18 @@
<image
class=
"img"
:src=
courselist.course.preview_pic
mode=
""
></image>
<view
class=
"right"
>
<view
class=
""
>
{{
courselist
.
course
.
name
}}
</view>
<view
class=
"intro"
v-html=
"courselist.course.intro"
>
{{
courselist
.
course
.
intro
}}
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
courselist.learnedInfo.learnPercent
style=
"width:54%;"
></u-line-progress>
<text
v-text=
"(courselist.learnedInfo.isLearned) ?(courselist.learnedInfo.learnPercent==1)?'已完成':'继续':'未观看' "
></text>
<u-line-progress
active-color=
"#2979ff"
:percent=
courselist.learnedInfo.learnPercent
style=
"width:54%;"
>
</u-line-progress>
<text
v-text=
"(courselist.learnedInfo.isLearned) ?(courselist.learnedInfo.learnPercent==1)?'已完成':'继续':'未观看' "
></text>
</view>
</view>
</view>
...
...
@@ -69,7 +69,8 @@
快速学习,使用APP接单、抢单
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"30"
style=
"width:54%;"
></u-line-progress>
<u-line-progress
active-color=
"#2979ff"
:percent=
"30"
style=
"width:54%;"
>
</u-line-progress>
<text>
继续
</text>
</view>
</view>
...
...
@@ -87,7 +88,8 @@
让你全面了解充电桩市场及服务规范
</view>
<view
class=
""
style=
"display:flex;justify-content: space-between;"
>
<u-line-progress
active-color=
"#2979ff"
:percent=
"100"
style=
"width:54%;"
></u-line-progress>
<u-line-progress
active-color=
"#2979ff"
:percent=
"100"
style=
"width:54%;"
>
</u-line-progress>
<text>
完成
</text>
</view>
</view>
...
...
@@ -162,378 +164,394 @@
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msg
:
"赣南吴彦祖"
,
tabs
:
[
{
name
:
"交付规范"
,
},
{
name
:
"培训通知"
,
},
{
name
:
"在线学习"
,
},
{
name
:
"考核认证"
,
},
],
current
:
0
,
swiperCurrent
:
0
,
params
:
{
start
:
0
,
},
list
:
[],
courselist
:
null
,
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore
:
false
,
//是否加载中
course_id
:
"course_id_=173"
,
exam
:
null
,
};
},
onLoad
()
{
this
.
getList
();
this
.
getCourseList
();
this
.
getUserExamInfo
();
},
computed
:
{
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx.png"
;
},
},
methods
:
{
getList
()
{
this
.
$u
.
api
.
getTrainingNoticeList
(
this
.
params
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
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
;
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
});
},
//在线学习通用课程信息
getCourseList
()
{
this
.
$u
.
api
.
CourseList
()
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
courselist
=
res
.
data
;
console
.
log
(
"--------"
);
console
.
log
(
this
.
courselist
);
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
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
;
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
});
},
//tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
animationfinish
(
e
)
{
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
//跳转到assessment页面
aaa
()
{
wx
.
navigateTo
({
url
:
"./assessment"
,
});
},
//跳转到课程介绍
ccc
(
id
)
{
uni
.
navigateTo
({
url
:
"./curriculum?course_id="
+
id
,
});
},
//跳转到
bbb
(
e
)
{
var
news
=
{
body
:
e
.
body
,
id
:
e
.
id
,
level
:
e
.
level
,
title
:
e
.
title
,
};
// console.log(news)
export
default
{
data
()
{
return
{
msg
:
"赣南吴彦祖"
,
tabs
:
[{
name
:
"交付规范"
,
},
{
name
:
"培训通知"
,
},
{
name
:
"在线学习"
,
},
{
name
:
"考核认证"
,
},
],
current
:
0
,
swiperCurrent
:
0
,
params
:
{
start
:
0
,
},
list
:
[],
courselist
:
null
,
loadStatus
:
"loading"
,
//加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore
:
false
,
//是否加载中
course_id
:
"course_id_=173"
,
exam
:
null
,
};
},
onLoad
()
{
// this.getList();
// this.getCourseList();
// this.getUserExamInfo();
},
computed
:
{
bannerImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"banner-xx.png"
;
},
},
methods
:
{
getList
()
{
this
.
$u
.
api
.
getTrainingNoticeList
(
this
.
params
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
);
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
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
;
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
});
},
//在线学习通用课程信息
getCourseList
()
{
this
.
$u
.
api
.
CourseList
()
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
courselist
=
res
.
data
;
console
.
log
(
"--------"
);
console
.
log
(
this
.
courselist
);
if
(
res
.
data
.
length
<
5
)
{
//判断接口返回数据量小于请求数据量,则表示此为最后一页
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
;
}
}
})
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
});
this
.
isLoadMore
=
false
;
if
(
this
.
params
.
start
>
0
)
{
this
.
page
-=
5
;
}
});
},
//tabs通知swiper切换
tabsChange
(
index
)
{
this
.
swiperCurrent
=
index
;
switch
(
index
)
{
case
1
:
this
.
getList
();
break
;
case
2
:
this
.
getCourseList
();
console
.
log
(
'重新加载学习进度'
);
break
;
case
3
:
this
.
getUserExamInfo
();
break
;
}
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition
(
e
)
{
let
dx
=
e
.
detail
.
dx
;
this
.
$refs
.
uTabs
.
setDx
(
dx
);
},
animationfinish
(
e
)
{
let
current
=
e
.
detail
.
current
;
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
);
this
.
swiperCurrent
=
current
;
this
.
current
=
current
;
},
//跳转到assessment页面
aaa
()
{
wx
.
navigateTo
({
url
:
"./assessment"
,
});
},
//跳转到课程介绍
ccc
(
id
)
{
uni
.
navigateTo
({
url
:
"./curriculum?course_id="
+
id
,
});
},
//跳转到
bbb
(
e
)
{
var
news
=
{
body
:
e
.
body
,
id
:
e
.
id
,
level
:
e
.
level
,
title
:
e
.
title
,
};
// console.log(news)
uni
.
navigateTo
({
url
:
"./news-details"
,
});
setTimeout
(()
=>
{
uni
.
$emit
(
"news"
,
news
),
console
.
log
(
"发送数据"
);
},
500
);
uni
.
navigateTo
({
url
:
"./news-details"
,
});
setTimeout
(()
=>
{
uni
.
$emit
(
"news"
,
news
),
console
.
log
(
"发送数据"
);
},
500
);
console
.
log
(
"跳转结束11111111"
);
},
//scroll-view到底部加载更多
onreachBottom
()
{
console
.
log
(
"上拉触底函数"
);
//上拉触底函数
if
(
!
this
.
isLoadMore
)
{
this
.
isLoadMore
=
true
;
this
.
params
.
start
+=
5
;
if
(
this
.
loadStatus
!==
"nomore"
)
{
this
.
getList
();
}
}
},
//跳转到拍照小程序首页
goToPrint
()
{
console
.
log
(
"111111"
);
uni
.
navigateToMiniProgram
({
appId
:
"wxd1d6eede324b0465"
,
success
(
res
)
{
//打开成功
console
.
log
(
"success"
,
res
);
},
fail
(
err
)
{
console
.
log
(
"err"
,
err
);
},
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo
()
{
uni
.
showLoading
({
title
:
"请稍候"
,
});
console
.
log
(
"跳转结束11111111"
);
},
//scroll-view到底部加载更多
onreachBottom
()
{
console
.
log
(
"上拉触底函数"
);
//上拉触底函数
if
(
!
this
.
isLoadMore
)
{
this
.
isLoadMore
=
true
;
this
.
params
.
start
+=
5
;
if
(
this
.
loadStatus
!==
"nomore"
)
{
this
.
getList
();
}
}
},
//跳转到拍照小程序首页
goToPrint
()
{
console
.
log
(
"111111"
);
uni
.
navigateToMiniProgram
({
appId
:
"wxd1d6eede324b0465"
,
success
(
res
)
{
//打开成功
console
.
log
(
"success"
,
res
);
},
fail
(
err
)
{
console
.
log
(
"err"
,
err
);
},
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo
()
{
uni
.
showLoading
({
title
:
"请稍候"
,
});
let
that
=
this
;
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/userExamInfo/"
+
getApp
().
globalData
.
token
+
"?examId="
+
2
,
method
:
"POST"
,
data
:
{
//examId:this.examId,
},
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
);
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
)
{
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that
.
exam
=
res
.
data
.
data
;
console
.
log
(
that
.
exam
);
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
();
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试信息失败"
,
});
},
});
},
},
};
let
that
=
this
;
uni
.
request
({
url
:
"http://192.168.1.22"
+
"/wxh-worker-rest/rest/exam"
+
"/serviceRule/userExamInfo/"
+
getApp
().
globalData
.
token
+
"?examId="
+
2
,
method
:
"POST"
,
data
:
{
//examId:this.examId,
},
header
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
);
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
)
{
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that
.
exam
=
res
.
data
.
data
;
console
.
log
(
that
.
exam
);
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
();
uni
.
showToast
({
icon
:
"none"
,
title
:
"获取考试信息失败"
,
});
},
});
},
},
};
</
script
>
<
style
>
.study
{
height
:
100vh
;
background-color
:
#f4f5f7
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
}
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40
rpx
;
}
.study
{
height
:
100vh
;
background-color
:
#f4f5f7
;
padding
:
0
rpx
30
rpx
0
30
rpx
;
}
.title-view
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
40
rpx
;
}
.banner
{
width
:
690
rpx
;
height
:
240
rpx
;
/* margin-left: -15rpx; */
}
/* //交付规范 */
.standard
{
width
:
656
rpx
;
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
1
rpx
solid
#82848a
;
padding
:
0
34
rpx
;
margin
:
72
rpx
auto
;
}
/* //培训通知 */
.notice
{
border
:
#808080
solid
2
rpx
;
width
:
100%
;
height
:
400
rpx
;
margin-top
:
36
rpx
;
overflow
:
hidden
;
}
.n-head
{
text-align
:
center
;
margin
:
32
rpx
0
;
}
.news
{}
/* //在线学习 */
.currency-class
{
width
:
100%
;
background
:
#ffffff
;
padding
:
18
rpx
;
margin-bottom
:
11px
;
border-radius
:
12
rpx
;
}
.banner
{
width
:
690
rpx
;
height
:
240
rpx
;
/* margin-left: -15rpx; */
}
.title
{
font-size
:
32
rpx
;
font-weight
:
bold
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
}
/* //交付规范 */
.standard
{
width
:
656
rpx
;
display
:
flex
;
justify-content
:
space-between
;
border-bottom
:
1
rpx
solid
#82848a
;
padding
:
0
34
rpx
;
margin
:
72
rpx
auto
;
}
.class1
{
display
:
flex
;
justify-content
:
space-between
;
padding-top
:
22
rpx
;
margin-top
:
28
rpx
;
border-top
:
1
rpx
solid
#808080
;
}
/* //培训通知 */
.notice
{
border
:
#808080
solid
2
rpx
;
width
:
100%
;
height
:
400
rpx
;
margin-top
:
36
rpx
;
overflow
:
hidden
;
}
.img
{
width
:
201
rpx
;
height
:
201
rpx
;
display
:
block
;
margin-right
:
0
rpx
;
}
.n-head
{
text-align
:
center
;
margin
:
32
rpx
0
;
}
.news
{
}
/* //在线学习 */
.currency-class
{
width
:
100%
;
background
:
#ffffff
;
padding
:
18
rpx
;
margin-bottom
:
11px
;
border-radius
:
12
rpx
;
}
.title
{
font-size
:
32
rpx
;
font-weight
:
bold
;
font-family
:
PingFang-SC-Bold
,
PingFang-SC
;
}
.class1
{
display
:
flex
;
justify-content
:
space-between
;
padding-top
:
22
rpx
;
margin-top
:
28
rpx
;
border-top
:
1
rpx
solid
#808080
;
}
.right
{
width
:
428
rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.img
{
width
:
201
rpx
;
height
:
201
rpx
;
display
:
block
;
margin-right
:
0
rpx
;
}
.intro
{
color
:
#9999a6
;
}
.right
{
width
:
428
rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.intro
{
color
:
#9999a6
;
}
.tab
{
background
:
#fff
;
height
:
82
rpx
;
margin
:
0
0
;
}
.tab
{
background
:
#fff
;
height
:
82
rpx
;
margin
:
0
0
;
}
.text
{
margin
:
0
40
rpx
;
line-height
:
82
rpx
;
color
:
#667eb5
;
}
.text
{
margin
:
0
40
rpx
;
line-height
:
82
rpx
;
color
:
#667eb5
;
}
.content
{
margin
:
5px
0
;
height
:
485
rpx
;
background
:
#fff
;
}
.content
{
margin
:
5px
0
;
height
:
485
rpx
;
background
:
#fff
;
}
swiper
{
height
:
691
rpx
;
}
swiper
{
height
:
691
rpx
;
}
</
style
>
src/pages/learn/section.vue
View file @
8f578a52
<
template
>
<view
class=
"learn-vedio"
v-if=
"isShowVideo"
>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view><video
object-fit=
"cover"
class=
"course-video"
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=
"item-content"
>
<view
class=
"item-st"
>
<image
style=
"width: 80rpx; height: 36rpx"
:src=
"kcImage"
></image>
<text
class=
"item-st-text"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
0
]
:
""
}}
</text>
</view>
<view
class=
"item-title"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
1
]
:
""
}}
</view>
</view>
<view
>
接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。
</view
>
</view>
<view
class=
"learn-view"
v-if=
"courseId >= 0"
>
<view
class=
"learn-view-title"
>
视频内容介绍
</view>
<!--
<view
<view
class=
"learn-vedio"
v-if=
"isShowVideo"
>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view><video
object-fit=
"cover"
class=
"course-video"
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=
"item-content"
>
<view
class=
"item-st"
>
<image
style=
"width: 80rpx; height: 36rpx"
:src=
"kcImage"
></image>
<text
class=
"item-st-text"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
0
]
:
""
}}
</text>
</view>
<view
class=
"item-title"
>
{{
courseTitle
.
split
(
" "
)
?
courseTitle
.
split
(
" "
)[
1
]
:
""
}}
</view>
</view>
<view>
接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。
</view>
</view>
<view
class=
"learn-view"
v-if=
"courseId >= 0"
>
<view
class=
"learn-view-title"
>
视频内容介绍
</view>
<!--
<view
class=
"learn-list"
v-for=
"(item, key) in courseOutlines[courseId]"
:key=
"key"
>
-->
<view
class=
"learn-list-item"
>
{{
item
}}
</view>
</view>
</view>
</view>
<!--
<view
class=
"learn-list-item"
>
{{
item
}}
</view>
-->
<view
class=
"u-content"
>
<u-parse
:html=
"CourseSectionlist.content"
></u-parse>
</view>
</view>
</view>
</view>
<view
v-else
>
<view
class=
"title"
>
{{
CourseSectionlist
.
name
}}
</view>
<view
class=
"content"
v-html=
"CourseSectionlist.content"
>
{{
CourseSectionlist
.
content
}}
</view>
</view>
</view>
<view
class=
"title"
>
{{
CourseSectionlist
.
name
}}
</view>
<view
class=
"u-content"
>
<u-parse
:html=
"CourseSectionlist.content"
></u-parse>
</view>
</view>
</
template
>
<
script
>
let
app
=
getApp
();
export
default
{
data
()
{
return
{
courseId
:
""
,
courseStatus
:
0
,
courseSrc
:
""
,
courseTitle
:
""
,
courseDesc
:
""
,
currentIndex
:
-
1
,
// 第几个视频
section_id
:
0
,
isShowVideo
:
false
,
CourseSectionlist
:
{},
//节信息
playerOptions
:
{
playbackRates
:
[
0.7
,
1.0
,
1.5
,
2.0
],
//播放速度
autoplay
:
false
,
//如果true,浏览器准备好时开始回放。
muted
:
false
,
// 默认情况下将会消除任何音频。
loop
:
false
,
// 导致视频一结束就重新开始。
preload
:
'auto'
,
language
:
'zh-CN'
,
aspectRatio
:
'16:9'
,
fluid
:
true
,
// sources: [{
// type: "",
// src: "" //url地址
// }],
// poster: "../../static/images/test.jpg", //你的封面地址
// width: document.documentElement.clientWidth,
notSupportedMessage
:
'此视频暂无法播放,请稍后再试'
,
controlBar
:
{
timeDivider
:
true
,
durationDisplay
:
true
,
remainingTimeDisplay
:
false
,
fullscreenToggle
:
true
//全屏按钮
}
},
gklog
:
''
,
videoTotalTime
:
0
,
howTimeToUpdateLearnedStatus
:
5
,
//设置几秒提交一次状态
status
:
1
,
//是否已学习默认1已学习
howLongIsLearned
:
this
.
videoTotalTime
/
2
,
//默认设置观看1/2就是已学
};
},
computed
:
{
courseOutlines
()
{
// 视频内容介绍
return
{
1
:
[
"1、考核规则:接单及时率"
,
"2、考核规则:上门及时率"
,
"3、考核规则:安装完工率"
,
"4、考核规则:资料提交及时率"
,
"5、考核规则:安装完工率"
,
"6、考核规则:客户满意度"
,
],
2
:
[
"1、必备材料4大类"
,
"2、施工工具准备"
],
3
:
[
"1、接线安装工艺标准"
,
"2、PVC、镀锌管电缆管明敷"
,
"3、电缆敷设的防火要求"
,
"4、电源点标识"
,
"5、配电箱接线及安装"
,
"6、管线敷设接头处理"
,
"7、充电桩内部接线"
,
"8、配电箱安装"
,
],
4
:
[
"1、勘测环节录单要求"
,
"2、安装环节录单要求"
],
};
},
kcImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"kc.png"
;
},
},
onLoad
(
e
)
{
this
.
getCourseSection
({
section_id
:
e
.
section_id
})
},
onReady
:
function
(
res
)
{
// #ifndef MP-ALIPAY
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
// #endif
},
methods
:
{
onPlayerTimeupdate
(
player
)
{
console
.
log
(
'-----onplay----'
);
console
.
log
(
player
);
let
intCurrentTime
=
parseInt
(
player
.
detail
.
currentTime
);
this
.
updateLearnedStatus
(
intCurrentTime
);
this
.
gklog
=
intCurrentTime
;
console
.
log
(
' onPlayerTimeupdate!'
,
this
.
gklog
)
},
videoErrorCallback
:
function
(
e
)
{
uni
.
showModal
({
content
:
e
.
target
.
errMsg
,
showCancel
:
false
,
});
},
getRandomColor
:
function
()
{
const
rgb
=
[];
for
(
let
i
=
0
;
i
<
3
;
++
i
)
{
let
color
=
Math
.
floor
(
Math
.
random
()
*
256
).
toString
(
16
);
color
=
color
.
length
==
1
?
"0"
+
color
:
color
;
rgb
.
push
(
color
);
}
return
"#"
+
rgb
.
join
(
""
);
},
playCourse
:
function
(
e
)
{
if
(
this
.
courseStatus
&&
(
this
.
courseStatus
==
"1"
||
this
.
courseStatus
==
1
))
{
return
}
this
.
changeCourseStatus
();
},
playerReadied
(
player
)
{
console
.
log
(
'i go to playerReadied gklog:'
+
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
)
{
this
.
$u
.
api
.
CourseSection
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
CourseSectionlist
=
res
.
data
;
console
.
log
(
"--------"
)
console
.
log
(
this
.
CourseSectionlist
)
let
wareVal
=
this
.
CourseSectionlist
.
ware
;
this
.
isShowVideo
=
wareVal
==
"0"
;
if
(
this
.
isShowVideo
){
let
coureWareList
=
res
.
data
.
courseware
;
this
.
courseSrc
=
coureWareList
[
0
].
src
;
this
.
videoTotalTime
=
parseInt
(
JSON
.
parse
(
coureWareList
[
0
].
info
).
time
);
console
.
log
(
'视频时长信息:'
+
this
.
videoTotalTime
);
this
.
courseTitle
=
res
.
data
.
name
;
this
.
courseDesc
=
res
.
data
.
content
;
this
.
section_id
=
res
.
data
.
id
;
}
let
app
=
getApp
();
export
default
{
data
()
{
return
{
courseId
:
""
,
courseStatus
:
0
,
courseSrc
:
""
,
courseTitle
:
""
,
courseDesc
:
""
,
currentIndex
:
-
1
,
// 第几个视频
section_id
:
0
,
isShowVideo
:
false
,
CourseSectionlist
:
{},
//节信息
playerOptions
:
{
playbackRates
:
[
0.7
,
1.0
,
1.5
,
2.0
],
//播放速度
autoplay
:
true
,
//如果true,浏览器准备好时开始回放。
muted
:
false
,
// 默认情况下将会消除任何音频。
loop
:
false
,
// 导致视频一结束就重新开始。
preload
:
'auto'
,
language
:
'zh-CN'
,
aspectRatio
:
'16:9'
,
fluid
:
true
,
notSupportedMessage
:
'此视频暂无法播放,请稍后再试'
,
controlBar
:
{
timeDivider
:
true
,
durationDisplay
:
true
,
remainingTimeDisplay
:
false
,
fullscreenToggle
:
true
//全屏按钮
}
}
},
gklog
:
''
,
videoTotalTime
:
0
,
howTimeToUpdateLearnedStatus
:
5
,
//设置几秒提交一次状态
status
:
1
,
//是否已学习默认1已学习
howLongIsLearned
:
this
.
videoTotalTime
/
2
,
//默认设置观看1/2就是已学
};
},
computed
:
{
courseOutlines
()
{
// 视频内容介绍
return
{
1
:
[
"1、考核规则:接单及时率"
,
"2、考核规则:上门及时率"
,
"3、考核规则:安装完工率"
,
"4、考核规则:资料提交及时率"
,
"5、考核规则:安装完工率"
,
"6、考核规则:客户满意度"
,
],
2
:
[
"1、必备材料4大类"
,
"2、施工工具准备"
],
3
:
[
"1、接线安装工艺标准"
,
"2、PVC、镀锌管电缆管明敷"
,
"3、电缆敷设的防火要求"
,
"4、电源点标识"
,
"5、配电箱接线及安装"
,
"6、管线敷设接头处理"
,
"7、充电桩内部接线"
,
"8、配电箱安装"
,
],
4
:
[
"1、勘测环节录单要求"
,
"2、安装环节录单要求"
],
};
},
kcImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
"kc.png"
;
},
},
onLoad
(
e
)
{
this
.
getCourseSection
({
section_id
:
e
.
section_id
})
.
catch
((
err
)
=>
{
console
.
log
(
'--------settttt---------'
);
console
.
log
(
err
);
uni
.
showToast
({
title
:
err
,
icon
:
"none"
,
},
onReady
:
function
(
res
)
{
// #ifndef MP-ALIPAY
this
.
videoContext
=
uni
.
createVideoContext
(
"courseVideo"
);
// #endif
},
methods
:
{
onPlayerTimeupdate
(
player
)
{
console
.
log
(
'-----onplay----'
);
console
.
log
(
player
);
let
intCurrentTime
=
parseInt
(
player
.
detail
.
currentTime
);
this
.
updateLearnedStatus
(
intCurrentTime
);
this
.
gklog
=
intCurrentTime
;
console
.
log
(
' onPlayerTimeupdate!'
,
this
.
gklog
)
},
videoErrorCallback
:
function
(
e
)
{
uni
.
showModal
({
content
:
e
.
target
.
errMsg
,
showCancel
:
false
,
});
});
},
updateLearnedStatus
(
nowLength
)
{
if
(
this
.
gklog
!=
nowLength
&&
nowLength
%
this
.
howTimeToUpdateLearnedStatus
==
0
){
if
(
nowLength
<
this
.
howLongIsLearned
){
this
.
status
=
0
;
}
else
{
this
.
status
=
1
;
console
.
log
(
'--已学习--'
);
}
//大于
let
param
=
{
section_id
:
this
.
section_id
,
video_time
:
nowLength
,
status
:
this
.
status
,
};
this
.
$u
.
api
.
updateLearnCourses
(
param
).
then
((
res
)
=>
{
console
.
log
(
'--'
+
this
.
howTimeToUpdateLearnedStatus
+
'更新一次观看状态--time:'
+
nowLength
);
});
}
}
},
};
},
getRandomColor
:
function
()
{
const
rgb
=
[];
for
(
let
i
=
0
;
i
<
3
;
++
i
)
{
let
color
=
Math
.
floor
(
Math
.
random
()
*
256
).
toString
(
16
);
color
=
color
.
length
==
1
?
"0"
+
color
:
color
;
rgb
.
push
(
color
);
}
return
"#"
+
rgb
.
join
(
""
);
},
playCourse
:
function
(
e
)
{
if
(
this
.
courseStatus
&&
(
this
.
courseStatus
==
"1"
||
this
.
courseStatus
==
1
))
{
return
}
this
.
changeCourseStatus
();
},
playerReadied
(
player
)
{
console
.
log
(
'i go to playerReadied gklog:'
+
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
)
{
this
.
$u
.
api
.
CourseSection
(
param
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
CourseSectionlist
=
res
.
data
;
console
.
log
(
"--------"
)
console
.
log
(
this
.
CourseSectionlist
)
let
wareVal
=
this
.
CourseSectionlist
.
ware
;
this
.
isShowVideo
=
wareVal
==
"0"
;
if
(
this
.
isShowVideo
)
{
let
coureWareList
=
res
.
data
.
courseware
;
this
.
courseSrc
=
coureWareList
[
0
].
src
;
this
.
videoTotalTime
=
parseInt
(
JSON
.
parse
(
coureWareList
[
0
].
info
).
time
);
console
.
log
(
'视频时长信息:'
+
this
.
videoTotalTime
);
this
.
courseTitle
=
res
.
data
.
name
;
this
.
courseDesc
=
res
.
data
.
content
;
this
.
section_id
=
res
.
data
.
id
;
this
.
section_content
=
res
.
data
.
content
;
}
}
}
})
.
catch
((
err
)
=>
{
console
.
log
(
'--------settttt---------'
);
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
;
}
else
{
this
.
status
=
1
;
console
.
log
(
'--大于规定时间标记为已学习--'
);
}
let
param
=
{
section_id
:
this
.
section_id
,
video_time
:
nowTime
,
status
:
this
.
status
,
};
this
.
$u
.
api
.
updateLearnCourses
(
param
).
then
((
res
)
=>
{
console
.
log
(
'--'
+
this
.
howTimeToUpdateLearnedStatus
+
'更新一次观看状态--time:'
+
nowTime
);
});
}
}
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.learn-vedio
{
background-color
:
#f4f5f7
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
overflow-y
:auto
;
}
.learn-vedio
{
background-color
:
#f4f5f7
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
overflow-y
:
auto
;
}
.course-video
{
width
:
100%
;
}
.course-video
{
width
:
100%
;
}
.course-title
{
font-size
:
36rpx
;
font-weight
:
700
;
padding
:
40rpx
40rpx
10rpx
40rpx
;
}
.course-title
{
font-size
:
36rpx
;
font-weight
:
700
;
padding
:
80rpx
60rpx
40rpx
60rpx
;
}
.title
{
font-weight
:
700
;
font-family
:
Medium
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
77rpx
;
color
:
#333
;
padding
:
80rpx
60rpx
40rpx
60rpx
;
}
.content
{
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
}
.title
{
font-weight
:
700
;
font-family
:
Medium
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
font-size
:
77rpx
;
color
:
#333
;
padding
:
80rpx
60rpx
40rpx
60rpx
;
}
.course-desc
{
margin-left
:
60rpx
;
}
.content
{
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
}
.title-content
{
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
background-color
:
#ffffff
;
color
:
#999999
;
font-size
:
24rpx
;
.course-desc
{
margin-left
:
60rpx
;
}
.item-content
{
display
:
flex
;
align-items
:
center
;
}
.title-content
{
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
background-color
:
#ffffff
;
color
:
#999999
;
font-size
:
24rpx
;
.item-st
{
width
:
80rpx
;
height
:
36rpx
;
padding-right
:
2rpx
;
text-align
:
center
;
margin-right
:
20rpx
;
line-height
:
24rpx
;
position
:
relative
;
.item-content
{
display
:
flex
;
align-items
:
center
;
}
.item-st-text
{
color
:
#ffffff
;
position
:
absolute
;
font-size
:
16rpx
;
left
:
20rpx
;
top
:
8rpx
;
line-height
:
28rpx
;
}
}
.item-st
{
width
:
80rpx
;
height
:
36rpx
;
padding-right
:
2rpx
;
text-align
:
center
;
margin-right
:
20rpx
;
line-height
:
24rpx
;
position
:
relative
;
.item-st-text
{
color
:
#ffffff
;
position
:
absolute
;
font-size
:
16rpx
;
left
:
20rpx
;
top
:
8rpx
;
line-height
:
28rpx
;
}
}
.item-title
{
color
:
#333333
;
font-size
:
44rpx
;
font-weight
:
bold
;
}
}
.item-title
{
color
:
#333333
;
font-size
:
44rpx
;
font-weight
:
bold
;
}
}
.item-content
{
display
:
flex
;
padding-bottom
:
30rpx
;
}
.item-content
{
display
:
flex
;
padding-bottom
:
30
rpx
;
}
.item-title
{
color
:
#333333
;
font-size
:
28
rpx
;
}
.item-title
{
color
:
#333333
;
font-size
:
28rpx
;
}
.learn-view
{
background-color
:
#ffffff
;
border-radius
:
12rpx
;
padding
:
38rpx
30rpx
30rpx
30rpx
;
margin-bottom
:
20rpx
;
font-size
:
32rpx
;
color
:
#333333
;
.learn-view
{
background-color
:
#ffffff
;
border-radius
:
12rpx
;
padding
:
38rpx
30rpx
30rpx
30rpx
;
margin-bottom
:
20rpx
;
font-size
:
32rpx
;
color
:
#333333
;
.learn-view-title
{
font-size
:
32rpx
;
font-weight
:
bold
;
margin-bottom
:
10rpx
;
}
.learn-view-title
{
font-size
:
32rpx
;
font-weight
:
bold
;
margin-bottom
:
10rpx
;
}
.learn-list
{
.learn-list-item
{
font-size
:
28rpx
;
margin-top
:
30rpx
;
margin-bottom
:
30rpx
;
color
:
#333333
;
}
.learn-list
{
.learn-list-item
{
font-size
:
28rpx
;
margin-top
:
30rpx
;
margin-bottom
:
30rpx
;
color
:
#333333
;
}
.line-view
{
background-color
:
#f4f5f7
;
height
:
2rpx
;
width
:
100%
;
}
}
}
.line-view
{
background-color
:
#f4f5f7
;
height
:
2rpx
;
width
:
100%
;
}
}
}
.u-content
{
// margin-top: 10rpx;
padding
:
40rpx
30rpx
;
margin-bottom
:
20rpx
;
}
</
style
>
src/pages/order/complete.vue
View file @
8f578a52
<
template
>
<view
class=
"u-wrap"
>
<u-tabs-swiper
ref=
"tabs"
:current=
"tabIndex"
:list=
"list"
:is-scroll=
"false"
bg-color=
"#2272FF"
inactive-color=
"#a6c6ff"
active-color=
"#fff"
height=
"120"
></u-tabs-swiper>
<view
class=
"u-menu-wrap"
>
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
:scroll-into-view=
"itemId"
>
<view
v-for=
"(item,index) in groupList"
:key=
"index"
class=
"u-tab-item"
:class=
"[current == index ? 'u-tab-item-active' : '']"
@
tap
.
stop=
"swichMenu(index)"
>
<text
class=
"u-line-1"
>
{{
item
.
groupName
}}
</text>
</view>
</scroll-view>
<scroll-view
:scroll-top=
"scrollRightTop"
scroll-y
scroll-with-animation
class=
"right-box"
@
scroll=
"rightScroll"
>
<
template
>
<view>
<view
class=
"u-wrap"
v-if=
"!takeStatus"
>
<u-navbar
:background=
"
{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息">
</u-navbar>
<u-tabs-swiper
ref=
"tabs"
:current=
"tabIndex"
:list=
"list"
:is-scroll=
"false"
bg-color=
"#2272FF"
inactive-color=
"#a6c6ff"
active-color=
"#fff"
height=
"120"
></u-tabs-swiper>
<view
class=
"u-menu-wrap"
>
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
:scroll-into-view=
"itemId"
>
<view
v-for=
"(item,index) in groupList"
:key=
"index"
class=
"u-tab-item"
:class=
"[current == index ? 'u-tab-item-active' : '']"
@
tap
.
stop=
"swichMenu(index)"
>
<text
class=
"u-line-1"
>
{{
item
.
groupName
}}
</text>
</view>
</scroll-view>
<scroll-view
:scroll-top=
"scrollRightTop"
scroll-y
scroll-with-animation
class=
"right-box"
@
scroll=
"rightScroll"
>
<u-form
:model=
"form"
ref=
"uForm"
>
<template
v-for=
"(groupItem,groupIndex) in groupList"
>
<view
class=
"class-item"
:key=
"groupIndex"
>
<view
class=
"title"
>
{{
groupItem
.
groupName
}}
</view>
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.item"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
>
<view
class=
"label"
v-if=
"item.fieldsType!=='location'"
>
<!--
<text
class=
"required"
v-if=
"item.required"
>
*
</text>
-->
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
</view>
<template
v-if=
"item.fieldsType"
>
<xh-input
v-if=
"typeToComponentType(item.fieldsType)==='input'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-input>
<xh-multi-input
v-else-if=
"typeToComponentType(item.fieldsType)==='multiinput'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-multi-input>
<xh-radio
v-else-if=
"typeToComponentType(item.fieldsType)==='radio'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-radio>
<xh-checkbox
v-else-if=
"typeToComponentType(item.fieldsType)==='checkbox'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-checkbox>
<xh-select
v-else-if=
"typeToComponentType(item.fieldsType)==='select'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-select>
<xh-files
v-else-if=
"typeToComponentType(item.fieldsType)==='file'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-files>
<xh-location
v-else-if=
"typeToComponentType(item.fieldsType)==='location'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-location>
<xh-scan
v-else-if=
"typeToComponentType(item.fieldsType)==='scan'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-scan>
<xh-picker
v-else-if=
"typeToComponentType(item.fieldsType)==='picker'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-picker>
<xh-time
v-else-if=
"typeToComponentType(item.fieldsType)==='time'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-time>
</
template
>
</u-form-item>
<u-form
:model=
"form"
ref=
"uForm"
>
<template
v-for=
"(groupItem,groupIndex) in groupList"
>
<view
class=
"class-item"
:key=
"groupIndex"
>
<view
class=
"title"
>
{{
groupItem
.
groupName
}}
</view>
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.item"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
>
<view
class=
"label"
v-if=
"item.fieldsType!=='location'"
>
<!--
<text
class=
"required"
v-if=
"item.required"
>
*
</text>
-->
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
</view>
<template
v-if=
"item.fieldsType"
>
<xh-input
v-if=
"typeToComponentType(item.fieldsType)==='input'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-input>
<xh-multi-input
v-else-if=
"typeToComponentType(item.fieldsType)==='multiinput'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-multi-input>
<xh-radio
v-else-if=
"typeToComponentType(item.fieldsType)==='radio'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-radio>
<xh-checkbox
v-else-if=
"typeToComponentType(item.fieldsType)==='checkbox'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-checkbox>
<xh-select
v-else-if=
"typeToComponentType(item.fieldsType)==='select'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-select>
<xh-files
v-else-if=
"typeToComponentType(item.fieldsType)==='file'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:files=
"files[itemIndex.toString()]"
@
value-change=
"fieldValueChange"
@
getTakeStatus=
"getTakeStatus"
>
</xh-files>
<xh-location
v-else-if=
"typeToComponentType(item.fieldsType)==='location'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-location>
<xh-scan
v-else-if=
"typeToComponentType(item.fieldsType)==='scan'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-scan>
<xh-picker
v-else-if=
"typeToComponentType(item.fieldsType)==='picker'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-picker>
<xh-time
v-else-if=
"typeToComponentType(item.fieldsType)==='time'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
@
value-change=
"fieldValueChange"
>
</xh-time>
</
template
>
</u-form-item>
</view>
</view>
</view>
</template>
</u-form>
</scroll-view>
</view>
<view
@
click=
"nextStep"
>
下一步
</view>
</template>
</u-form>
</scroll-view>
</view>
<view
class=
"btn-wrap flex-xc"
>
<u-button
class=
"btn-submit"
@
click=
"$u.debounce(nextStep, 500)"
:custom-style=
"buttonStyle"
type=
"primary"
shape=
"circle"
:hover-class=
"submitStatus ? '' : 'none'"
>
下一步
</u-button>
</view>
</view>
<take-photo
v-else
@
close=
"closeTake"
></take-photo>
</view>
</template>
<
script
>
...
...
@@ -87,7 +97,7 @@
import
XhScan
from
'@/components/createCom/XhScan.vue'
import
XhPicker
from
'@/components/createCom/XhPicker.vue'
import
XhTime
from
'@/components/createCom/XhTime.vue'
import
takePhoto
from
'@/components/take/index.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue'
export
default
{
data
()
{
...
...
@@ -103,7 +113,7 @@
name
:
'安装信息'
}
],
tabIndex
:
0
,
tabIndex
:
1
,
scrollTop
:
0
,
//tab标题的滚动条位置
oldScrollTop
:
0
,
current
:
0
,
// 预设当前项的值
...
...
@@ -144,7 +154,11 @@
// 触发器可以同时用blur和change
trigger
:
[
'change'
,
'blur'
],
}]
}
},
submitBtnStatus
:
false
,
takeStatus
:
false
,
fileIndex
:
null
,
files
:
[]
}
},
components
:
{
...
...
@@ -157,7 +171,8 @@
XhLocation
,
XhScan
,
XhPicker
,
XhTime
,
XhTime
,
'take-photo'
:
takePhoto
},
created
()
{
// console.log(allComponents,'allComponents')
...
...
@@ -176,9 +191,36 @@
computed
:
{
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
},
buttonStyle
()
{
return
this
.
submitBtnStatus
?
{
'color'
:
'#FFFFFF'
,
'background-color'
:
'#2272FF;'
,
'width'
:
'600rpx'
,
'height'
:
'104rpx'
,
'font-size'
:
'32rpx'
,
'font-weight'
:
'bold'
}
:
{
'color'
:
'#FFFFFF'
,
'background-color'
:
'#D1D4D4;'
,
'width'
:
'600rpx'
,
'height'
:
'104rpx'
,
'font-size'
:
'32rpx'
,
'font-weight'
:
'bold'
}
}
},
methods
:
{
methods
:
{
getTakeStatus
(
event
)
{
this
.
takeStatus
=
event
.
status
this
.
fileIndex
=
event
.
index
.
toString
()
if
(
!
this
.
files
[
event
.
index
]
||
this
.
files
[
event
.
index
].
length
<
1
)
this
.
files
[
event
.
index
]
=
[]
},
closeTake
(
images
)
{
this
.
takeStatus
=
false
//const newFile = this.files[this.fileIndex].concat(images)
this
.
$set
(
this
.
files
,
this
.
fileIndex
,
images
)
},
// 字段的值更新
fieldValueChange
(
data
)
{
// data.groupIndex data.itemIndex值下标 data.value //值
...
...
@@ -199,14 +241,12 @@
console
.
log
(
this
.
form
,
'this.form'
)
},
nextStep
(
item
)
{
// 下一步
console
.
log
(
item
,
'item'
)
if
(
this
.
tabIndex
<
3
)
this
.
tabIndex
++
},
typeToComponentType
(
type
)
{
// 将fieldType类型统一转换为公共组件判定类型
let
formType
=
''
type
=
type
.
toLocaleLowerCase
()
//console.log(type,'type')
switch
(
type
)
{
case
'text'
:
case
'password'
:
...
...
@@ -242,9 +282,6 @@
case
'time'
:
formType
=
'time'
break
case
'file'
:
formType
=
'XhFiles'
break
}
//console.log(formType,'formType')
return
formType
...
...
@@ -522,5 +559,11 @@
.item-menu-image
{
width
:
120rpx
;
height
:
120rpx
;
}
/*提交按钮*/
.btn-wrap
{
width
:
100%
;
padding
:
20rpx
0
40rpx
0
;
}
</
style
>
src/pages/order/feedback.vue
View file @
8f578a52
...
...
@@ -62,7 +62,7 @@
<appoint-time
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
<view
class=
"u-m-60"
>
<button
class=
"btn"
@
click=
"submitF
ro
m"
:loading=
"submiting"
:disabled=
"disabledSubmit"
>
确定
</button>
<button
class=
"btn"
@
click=
"submitF
or
m"
:loading=
"submiting"
:disabled=
"disabledSubmit"
>
确定
</button>
</view>
</view>
</
template
>
...
...
@@ -89,7 +89,8 @@
title
:
'问题类型'
,
},
appoint
:{
title
:
'预约时间'
,
'报单'
:
'下次联系时间'
,
'改约'
:
'预约时间'
,
}
},
config
:
null
,
...
...
@@ -117,11 +118,14 @@
disabledSubmit
()
{
let
self
=
this
debugger
if
(
self
.
trace
.
reasonType
&&
(
self
.
trace
.
reasonType
==
'报备'
||
self
.
trace
.
reasonType
==
'改约'
)){
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'报备'
){
if
(
self
.
trace
.
reasonRelegation
&&
self
.
trace
.
reason
&&
self
.
trace
.
nextTraceDatetime
&&
self
.
trace
.
appointmentDatetimeRange
)
{
return
false
}
}
else
if
(
self
.
trace
.
reasonType
&&
self
.
trace
.
reasonType
==
'改约'
)
{
if
(
self
.
trace
.
reasonRelegation
&&
self
.
trace
.
reason
&&
self
.
trace
.
appointmentDatetimeRange
)
{
&&
self
.
trace
.
appointmentDatetime
&&
self
.
trace
.
appointmentDatetime
Range
)
{
return
false
}
}
...
...
@@ -212,12 +216,23 @@
dateChange
(
data
){
// 点击日期选择
console
.
log
(
data
,
'week-data'
)
let
self
=
this
if
(
self
.
trace
.
reasonType
==
'报备'
)
{
self
.
trace
.
appointmentDatetime
=
null
self
.
trace
.
nextTraceDatetime
=
data
.
item
.
day
}
else
if
(
self
.
trace
.
reasonType
==
'改约'
)
{
self
.
trace
.
appointmentDatetime
=
data
.
item
.
day
self
.
trace
.
nextTraceDatetime
=
null
}
},
timeChange
(
data
){
// 时间段选择变化
console
.
log
(
data
,
'week-data'
)
this
.
trace
.
appointmentDatetimeRange
=
data
.
item
},
async
submitF
ro
m
()
{
async
submitF
or
m
()
{
let
self
=
this
self
.
orderId
=
666
if
(
!
self
.
orderId
)
{
...
...
src/pages/order/index.vue
View file @
8f578a52
<
template
>
<TabBarPage
title=
"订单"
:fixed=
"true"
>
<!--
<view
class=
"wrap"
>
-->
<view
class=
"tools-box"
>
<view
class=
"search-sub"
>
<u-subsection
:current=
"curNow"
:list=
"subList"
active-color=
"white"
bg-color=
"white"
inactive-color=
"#666"
button-color=
"#2272FF"
border-radius=
"36"
@
change=
"sectionChange"
height=
"72"
bold
>
</u-subsection>
</view>
<view
class=
"search-btn"
@
click=
"handleClickSearch"
>
<image
class=
"search-image"
mode=
"widthFix"
:src=
"sousuoImage"
></image>
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
<view
class=
"tools-box"
>
<view
class=
"search-sub"
>
<u-subsection
:current=
"curNow"
:list=
"subList"
active-color=
"white"
bg-color=
"white"
inactive-color=
"#666"
button-color=
"#2272FF"
border-radius=
"36"
@
change=
"sectionChange"
height=
"72"
bold
>
</u-subsection>
</view>
<view
class=
"tab-view"
>
<!--
<swiper-item
class=
"swiper-item"
v-for=
"(res, ind) in orderList"
:key=
"ind"
>
-->
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</scroll-view>
<!--
</swiper-item>
-->
<view
class=
"search-btn"
@
click=
"handleClickSearch"
>
<image
class=
"search-image"
mode=
"widthFix"
:src=
"sousuoImage"
></image>
<text
class=
"search-btn-text"
>
搜订单
</text>
</view>
</view>
<view
class=
"u-tabs-box"
v-show=
"curNow == 0"
>
<u-tabs
height=
"66"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"[0,0]"
:list=
"list"
count=
"total"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"28"
bold
></u-tabs>
</view>
<NoOrder
v-if=
"noMore"
customStyle=
"margin-top: 100rpx;background-color: #F4F5F7"
/>
<view
v-else
class=
"tab-view"
>
<!--
<swiper-item
class=
"swiper-item"
v-for=
"(res, ind) in orderList"
:key=
"ind"
>
-->
<scroll-view
scroll-y
style=
"height: 100%;width: 100%;"
@
scrolltolower=
"reachBottom"
scroll-anchoring
>
<view
v-for=
"(item, index) in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:type=
"orderType"
:location=
"dataValue"
@
click=
"handleClick(item)"
@
action=
"handleAction(item)"
>
</OrderCell>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</scroll-view>
<!--
</swiper-item>
-->
</view>
<!--
</view>
-->
<PopView
title=
"aaaa"
message=
"bbbb"
:visible=
"visibale"
/>
<!--
</view>
-->
<PopView
title=
"aaaa"
message=
"bbbb"
:visible=
"visibale"
/>
</TabBarPage>
</
template
>
<
script
>
import
TabBarPage
from
"@/components/tabBarList/index.vue"
import
OrderCell
from
"@/components/order/index.vue"
import
OrderCell
from
"@/components/order/index.vue"
import
NoOrder
from
"@/components/order/noOrder.vue"
export
default
{
components
:
{
TabBarPage
,
OrderCell
OrderCell
,
NoOrder
},
data
()
{
return
{
return
{
visibale
:
false
,
showSview
:
true
,
curNow
:
0
,
pageNumber
:
0
,
pageSize
:
10
,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
:
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'exception'
,
5
:
'finish'
},
pageNumber
:
0
,
pageSize
:
100
,
orderList
:
[],
list
:
[{
name
:
'待预约'
,
...
...
@@ -72,7 +69,7 @@
total
:
0
,
},
{
name
:
'
待审核
'
,
name
:
'
审核中
'
,
total
:
0
,
},
{
...
...
@@ -83,6 +80,7 @@
current
:
0
,
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
};
},
onLoad
()
{
...
...
@@ -94,31 +92,57 @@
subList
()
{
return
[
'待受理'
,
'已完工'
]
},
// 0:
待接单 1:'去预约', 2:'去签到', 3:'去完工', 4:'审核中', 5:'去处理', 6
'已完工'
// 0:
'去预约', 1:'去签到', 2:'去完工', 3:'审核中', 4:'去处理', 5
'已完工'
orderType
()
{
return
this
.
currentIndex
+
1
return
this
.
indexStatus
[
this
.
currentIndex
]
},
currentIndex
()
{
return
this
.
curNow
==
0
?
this
.
current
:
5
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
sousuoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'sousuo.png'
},
types
()
{
return
{
'waitAppointment'
:
0
,
// 待预约、
'waitCheckIn'
:
1
,
// 待签到、
'waitFinish'
:
2
,
// 待完工、
'review'
:
3
,
// 审核中、
'exception'
:
4
,
// 异常单、
'finish'
:
5
,
//已完工
}
},
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus
()
{
return
{
0
:
'waitAppointment'
,
1
:
'waitCheckIn'
,
2
:
'waitFinish'
,
3
:
'review'
,
4
:
'exception'
,
5
:
'finish'
}
},
noMore
()
{
console
.
log
(
'nomore:'
,
this
.
orderList
.
length
==
0
&&
this
.
pageNumber
!=
0
)
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
}
},
methods
:
{
sectionChange
(
index
)
{
this
.
curNow
=
index
;
this
.
pageNumber
=
0
this
.
orderList
=
[]
sectionChange
(
index
)
{
this
.
curNow
=
index
;
this
.
pageNumber
=
0
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
===
0
?
0
:
5
)
},
// tab栏切换
change
(
index
)
{
this
.
current
=
index
;
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
);
},
// tab栏切换
change
(
index
)
{
this
.
current
=
index
;
this
.
pageNumber
=
0
this
.
orderList
=
[]
this
.
loadStatus
=
'loading'
this
.
getOrderList
(
index
);
},
/**
* 获取当前位置的经纬度
...
...
@@ -140,15 +164,16 @@
});
},
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getOrderList
(
this
.
currentIndex
)
},
// 页面数据
getOrderList
(
index
)
{
// 状态处理
// this.pageNumber += 1
this
.
pageNumber
+=
1
this
.
loaded
=
false
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
...
...
@@ -156,15 +181,15 @@
type
:
this
.
indexStatus
[
index
]
}
var
self
=
this
;
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
self
.
$u
.
api
.
listOrder
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"getOrderList"
,
res
.
data
)
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
var
res
=
{
data
:
{
total
:
15
,
orderType
:
this
.
currentIndex
,
list
:
[{
res
.
data
.
type
=
self
.
orderType
if
(
res
.
data
.
list
)
{
if
(
res
.
data
.
list
.
length
==
0
&&
res
.
data
.
total
>
0
)
{
res
.
data
.
total
=
15
res
.
data
.
list
=
[{
orderServiceType
:
'安装'
,
// 服务类型:安装、维修
categoryName
:
'充电桩'
,
// 品类:充电桩
orderBusinessTypeText
:
'分配单'
,
// 业务类型:分配单、订单池
...
...
@@ -183,25 +208,29 @@
auditResults
:
{},
// 审核结果
orderBusinessType
:
'R'
,
// 业务类型 R 为抢单
orderId
:
'1100000216'
}]
}]
res
.
data
.
list
=
[...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
]
}
}
res
.
data
.
list
=
[...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,
...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
,...
res
.
data
.
list
]
}
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
// 后台需要返回orderType,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
)
{
// 后台需要返回type,防止数据返回延迟期间点击了其他的tab
if
(
res
.
data
.
type
!=
self
.
orderType
)
return
if
(
res
.
data
.
list
)
{
self
.
orderList
.
push
(...
res
.
data
.
list
)
if
(
self
.
list
[
res
.
data
.
orderType
])
{
self
.
list
[
res
.
data
.
orderType
].
total
=
res
.
data
.
total
}
if
(
self
.
list
[
self
.
types
[
res
.
data
.
type
]])
{
self
.
list
[
self
.
types
[
res
.
data
.
type
]].
total
=
res
.
data
.
total
}
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
"获取订单数量失败!"
);
}
this
.
loaded
=
true
});
},
...
...
@@ -244,11 +273,11 @@
handleAction
(
item
)
{
console
.
log
(
'click button'
)
this
.
viewOderItem
(
item
.
orderId
)
},
handleClickSearch
()
{
uni
.
navigateTo
({
url
:
'pages/order/search'
})
},
handleClickSearch
()
{
uni
.
navigateTo
({
url
:
'pages/order/search'
})
}
}
};
...
...
@@ -434,12 +463,12 @@
flex-direction
:
column
;
height
:
calc
(
100vh
-
var
(
--
window-top
));
width
:
100%
;
}
.tab-view
{
height
:
100%
;
overflow
:
auto
;
padding-bottom
:
20rpx
;
}
.tab-view
{
height
:
100%
;
overflow
:
auto
;
padding-bottom
:
20rpx
;
}
// .swiper-box {
...
...
@@ -447,9 +476,9 @@
// }
// .swiper-item {
// height: 100%;
// .page-box {
// padding-bottom: 20rpx;
// height: 100%;
// .page-box {
// padding-bottom: 20rpx;
// }
// }
...
...
@@ -473,12 +502,14 @@
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.search-image
{
width
:
36rpx
;
height
:
32rpx
;
flex-shrink
:
0
;
margin-right
:
24rpx
;
.search-image
{
width
:
36rpx
;
height
:
32rpx
;
flex-shrink
:
0
;
margin-right
:
24rpx
;
}
.search-btn-text
{
line-height
:
36rpx
;
font-weight
:
400
;
...
...
src/pages/order/refuse.vue
View file @
8f578a52
<!-- 过程反馈 -->
<
template
>
<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=
"content"
>
<view
class=
"con-box"
>
<view
class=
"tit u-m-b-40 u-flex"
><text
class=
"txt label"
>
※
</text>
{{
refuse
.
title
}}
</view>
<view
class=
"u-flex u-flex-wrap"
>
<view
:class=
"
{'txt-item':true,'active':true}" v-for="(txt,index) in refuse.list" :key="index">
<view
:class=
"
{
'txt-item':true,
'active': (formData.rejectReason == txt)}"
v-for="(txt,index) in refuse.list"
:key="index" @click="changeReason(txt)">
<text
class=
"txt"
>
{{
txt
}}
</text>
</view>
</view>
</view>
<view
class=
"con-box"
>
<view
class=
"tit u-m-b-
4
0"
>
补充说明
</view>
<u-input
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
<view
class=
"con-box"
style=
"padding-top: 10rpx;"
>
<view
class=
"tit u-m-b-
2
0"
>
补充说明
</view>
<u-input
v-model=
"formData.remark"
class=
"textarea"
height=
"156"
type=
"textarea"
placeholder=
"请补充详细说明,以便于记录您的接单信用分"
></u-input>
</view>
</view>
<view
class=
"
u-m-60
"
>
<button
class=
"btn
"
>
确定
</button>
<view
class=
"
bottm-btn-view
"
>
<button
:loading=
"submiting"
:disabled=
"disabledSubmit"
class=
"btn"
@
click=
"handleClickSubmit
"
>
确定
</button>
</view>
<PopView
title=
"拒单提示"
message=
"确定“拒单”操作,将影响对您的派单频率,\n甚至进入黑名单,请谨慎操作"
:visible
.
sync=
"visibale"
:count=
"count"
@
click=
"handleClick"
buttonText=
"确定"
/>
</view>
</
template
>
<
script
>
import
PopView
from
"@/components/popView/index.vue"
export
default
{
data
()
{
return
{
visibale
:
false
,
orderId
:
''
,
submiting
:
false
,
background
:
{
backgroundColor
:
'none'
,
},
refuse
:{
title
:
'
问题归属
'
,
title
:
'
拒单原因
'
,
list
:[
'时间不匹配'
,
'技术不匹配'
,
'价格过低'
,
'距离太远'
,
'其他'
],
},
formData
:
{
rejectReason
:
''
,
remark
:
''
},
count
:
0
,
// 剩余次数
};
},
components
:{},
computed
:
{
disabledSubmit
()
{
return
!
this
.
formData
.
rejectReason
}
},
components
:{
PopView
},
onLoad
(
e
)
{
this
.
orderId
=
111
if
(
e
&&
e
.
orderId
)
{
this
.
orderId
=
e
.
orderId
}
},
methods
:
{
changeReason
(
reason
)
{
this
.
formData
.
rejectReason
=
reason
},
handleClickSubmit
()
{
if
(
this
.
count
>
0
)
{
this
.
visibale
=
true
}
else
{
let
message
=
'本月无拒单机会,请联系客服'
uni
.
showToast
({
icon
:
'none'
,
title
:
message
,
})
}
},
handleClick
()
{
this
.
visibale
=
false
this
.
submitForm
()
},
async
submitForm
()
{
let
self
=
this
self
.
submiting
=
true
let
res
=
await
self
.
$u
.
api
.
rejectOrder
(
self
.
formData
,
self
.
orderId
)
self
.
submiting
=
false
if
(
res
&&
res
.
code
==
200
)
{
let
data
=
res
.
data
if
(
data
.
code
==
200
)
{
uni
.
showToast
({
title
:
"拒单成功"
,
})
}
else
{
let
message
=
'本月无拒单机会,请联系客服'
uni
.
showToast
({
icon
:
'none'
,
title
:
message
,
})
}
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.bg
{
width
:
750rpx
;
height
:
100vh
;
overflow
:
auto
;
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-repeat
:
no-repeat
;
}
...
...
@@ -63,9 +130,10 @@
border-radius
:
12rpx
;
padding-bottom
:
60rpx
;
background-color
:
#fff
;
min-height
:
800rpx
;
}
.con-box
{
padding
:
30rpx
30rpx
30rpx
2
0rpx
;
padding
:
3
0rpx
;
// border-radius: 12rpx;
background-color
:
#FFFFFF
;
.tit
{
...
...
@@ -79,10 +147,11 @@
margin-right
:
-20rpx
;
.txt-item
{
border-radius
:
12rpx
;
padding
:
24rpx
38rpx
;
min-width
:
196rpx
;
padding-top
:
24rpx
;
padding-bottom
:
24rpx
;
width
:
196rpx
;
text-align
:
center
;
margin-right
:
2
0
rpx
;
margin-right
:
2
2
rpx
;
margin-bottom
:
20rpx
;
background-color
:
#F4F5F7
;
&
.active
{
...
...
@@ -99,6 +168,11 @@
line-height
:
26rpx
;
color
:
#333
;
}
.label
{
font-size
:
24rpx
;
line-height
:
40rpx
;
color
:
#FA5A49
}
.textarea
{
/
deep
/
.u-input
{
...
...
@@ -121,8 +195,13 @@
&
:
:
after
{
content
:
''
;
height
:
0
;
border
:
none
;
}
}
button
[
disabled
]
:not
([
type
])
{
background
:
#D1D4D4
;
color
:
#FFFFFF
;
}
.width-320
{
width
:
320rpx
;
}
...
...
@@ -139,4 +218,10 @@
margin-right
:
10rpx
;
color
:
#FA5A49
}
.bottm-btn-view
{
width
:
100%
;
padding
:
0
80rpx
;
position
:
absolute
;
bottom
:
40rpx
;
}
</
style
>
src/pages/settle/prompt.vue
View file @
8f578a52
<
template
>
<view
class=
"container u-row-between"
v-if=
"info"
>
<Settle
:index=
"pageIndex"
>
<Settle
:index=
"pageIndex"
:type=
"1"
>
<view
class=
"content-view"
>
<!--
<view
style=
"min-height: 120rpx;"
v-if=
"status == 8"
></view>
-->
<view
class=
"u-flex u-row-center"
>
...
...
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