Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
8b9a0d18
Commit
8b9a0d18
authored
Jul 28, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0
parents
59203b55
32ec109f
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1149 additions
and
581 deletions
+1149
-581
.env.dev.js
.env.dev.js
+2
-2
learn.js
src/api/learn.js
+8
-0
user.js
src/api/user.js
+17
-7
index.vue
src/components/calendar/index.vue
+720
-0
index.vue
src/components/record-cell/index.vue
+33
-10
pages.json
src/pages.json
+1
-1
detail.vue
src/pages/cert/detail.vue
+29
-40
detailLearn.vue
src/pages/cert/detailLearn.vue
+14
-6
cert.vue
src/pages/index/cert.vue
+96
-232
index.vue
src/pages/index/index.vue
+4
-2
record.vue
src/pages/learn/record.vue
+166
-76
bank.vue
src/pages/mine/bank.vue
+24
-172
certify.vue
src/pages/mine/certify.vue
+17
-15
company.vue
src/pages/mine/company.vue
+0
-4
info.vue
src/pages/mine/info.vue
+18
-14
No files found.
.env.dev.js
View file @
8b9a0d18
const
UNI_APP
=
{
const
UNI_APP
=
{
apiUrl
:
'http://192.168.
0.204
:8760'
,
apiUrl
:
'http://192.168.
1.22
:8760'
,
qn_base_url
:
'https://qn-static.banshouhui.com/study/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/study/'
,
qn_asset_url
:
'http
://deudn.c.pp.cc
/'
,
qn_asset_url
:
'http
s://img2.banshouhui.com
/'
,
uCenterUrl
:
'http://192.168.0.5:8093/'
,
//'http://rest-u.yunya.com/'
uCenterUrl
:
'http://192.168.0.5:8093/'
,
//'http://rest-u.yunya.com/'
argoDebugMode
:
1
,
argoDebugMode
:
1
,
version
:
'v1.0.0'
,
version
:
'v1.0.0'
,
...
...
src/api/learn.js
View file @
8b9a0d18
...
@@ -89,6 +89,13 @@ let learnApiFun = function(vm) {
...
@@ -89,6 +89,13 @@ let learnApiFun = function(vm) {
// 检查是否具有体验资格
// 检查是否具有体验资格
let
checkGetQuestion
=
async
(
questionWarehouseId
)
=>
let
checkGetQuestion
=
async
(
questionWarehouseId
)
=>
await
vm
.
$u
.
get
(
'/rest/question/checkGetQuestion/'
+
questionWarehouseId
)
await
vm
.
$u
.
get
(
'/rest/question/checkGetQuestion/'
+
questionWarehouseId
)
// 每日一练统计
let
everyTaskList
=
async
(
questionWarehouseId
,
params
=
{})
=>
await
vm
.
$u
.
get
(
'/rest/question/query/everyTaskList/'
+
questionWarehouseId
,
params
)
const
learnApi
=
{
const
learnApi
=
{
getQuestion
,
getQuestion
,
getQuestionTotal
,
getQuestionTotal
,
...
@@ -111,6 +118,7 @@ let learnApiFun = function(vm) {
...
@@ -111,6 +118,7 @@ let learnApiFun = function(vm) {
bindCard
,
bindCard
,
searchQuestion
,
searchQuestion
,
checkGetQuestion
,
checkGetQuestion
,
everyTaskList
,
}
}
return
learnApi
return
learnApi
}
}
...
...
src/api/user.js
View file @
8b9a0d18
...
@@ -14,21 +14,29 @@ let userApiFun = function(vm) {
...
@@ -14,21 +14,29 @@ let userApiFun = function(vm) {
//验证身份证反面
//验证身份证反面
let
checkIdCardBack
=
async
(
params
=
{})
=>
let
checkIdCardBack
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
uCenterUrl
+
'v1/settled/card-back'
,
params
)
await
vm
.
$u
.
post
(
uCenterUrl
+
'v1/settled/card-back'
,
params
)
//获取国家证列表
let
getCountryCertList
=
async
(
params
=
{})
=>
let
getCountryCertList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
apiUrl
+
'/rest/certificate/query'
,
params
)
await
vm
.
$u
.
post
(
apiUrl
+
'/rest/certificate/query'
,
params
)
//获取学时证列表
let
getlearnCertList
=
async
(
params
=
{})
=>
let
getlearnCertList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/getSchoolCertificate'
,
params
)
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/getSchoolCertificate'
,
params
)
//获取学时证详情
let
getlearnCertDetail
=
async
(
questionWarehouseId
,
params
=
{}
)
=>
let
getlearnCertDetail
=
async
(
questionWarehouseId
)
=>
await
vm
.
$u
.
get
(
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/getSchoolCertificate/'
+
questionWarehouseId
,
apiUrl
+
'/rest/question/getSchoolCertificate/'
+
questionWarehouseId
params
)
)
//证书查询结果
let
getCertFromOut
=
async
(
params
=
{})
=>
let
getCertFromOut
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/certificate/national'
,
params
)
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/certificate/national'
,
params
)
//身份证识别
let
getCertifyInfoByType
=
async
(
type
,
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/student/get/idCard/'
+
type
,
params
)
//获取学员题库列表
let
getUserQuestionWareHouse
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/question/query/allStudentQuestionWarehouse'
,
params
)
const
userApi
=
{
const
userApi
=
{
updateUserInfo
,
updateUserInfo
,
...
@@ -39,6 +47,8 @@ let userApiFun = function(vm) {
...
@@ -39,6 +47,8 @@ let userApiFun = function(vm) {
getlearnCertList
,
getlearnCertList
,
getlearnCertDetail
,
getlearnCertDetail
,
getCertFromOut
,
getCertFromOut
,
getCertifyInfoByType
,
getUserQuestionWareHouse
,
}
}
return
userApi
return
userApi
}
}
...
...
src/components/calendar/index.vue
0 → 100644
View file @
8b9a0d18
<
template
>
<!--
<u-popup
closeable
:maskCloseAble=
"maskCloseAble"
mode=
"bottom"
:popup=
"false"
v-model=
"value"
length=
"auto"
:safeAreaInsetBottom=
"safeAreaInsetBottom"
@
close=
"close"
:z-index=
"uZIndex"
:border-radius=
"borderRadius"
:closeable=
"closeable"
>
-->
<view
class=
"u-calendar"
>
<!--
<view
class=
"u-calendar__header"
>
<view
class=
"u-calendar__header__text"
v-if=
"!$slots['tooltip']"
>
{{
toolTip
}}
</view>
<slot
v-else
name=
"tooltip"
/>
</view>
-->
<view
class=
"u-calendar__action u-flex u-row-center"
>
<view
class=
"u-calendar__action__icon"
>
<u-icon
v-if=
"changeYear"
name=
"arrow-left-double"
:color=
"yearArrowColor"
@
click=
"changeYearHandler(0)"
></u-icon>
</view>
<view
class=
"u-calendar__action__icon"
>
<u-icon
v-if=
"changeMonth"
name=
"arrow-left"
:color=
"monthArrowColor"
@
click=
"changeMonthHandler(0)"
></u-icon>
</view>
<view
class=
"u-calendar__action__text"
>
{{
showTitle
}}
</view>
<view
class=
"u-calendar__action__icon"
>
<u-icon
v-if=
"changeMonth"
name=
"arrow-right"
:color=
"monthArrowColor"
@
click=
"changeMonthHandler(1)"
></u-icon>
</view>
<view
class=
"u-calendar__action__icon"
>
<u-icon
v-if=
"changeYear"
name=
"arrow-right-double"
:color=
"yearArrowColor"
@
click=
"changeYearHandler(1)"
></u-icon>
</view>
</view>
<view
class=
"u-calendar__line"
></view>
<view
class=
"u-calendar__week-day"
>
<view
class=
"u-calendar__week-day__text"
v-for=
"(item, index) in weekDayZh"
:key=
"index"
>
{{
item
}}
</view
>
</view>
<view
class=
"u-calendar__content"
>
<!-- 前置空白部分 -->
<block
v-for=
"(item, index) in weekdayArr"
:key=
"index"
>
<view
class=
"u-calendar__content__item"
></view>
</block>
<view
class=
"u-calendar__content__item"
:class=
"
{
'u-hover-class': openDisAbled(year, month, index + 1),
'u-calendar__content--start-date':
(mode == 'range'
&&
startDate == `${year}-${month}-${index + 1}`) ||
mode == 'date',
'u-calendar__content--end-date':
(mode == 'range'
&&
endDate == `${year}-${month}-${index + 1}`) ||
mode == 'date',
}"
v-for="(item, index) in daysArr"
:key="index"
@tap="dateClick(index)"
>
<view
class=
"u-calendar__content__item__inner"
:style=
"
{
color: getColor(index, 2),
backgroundColor: getColor(index, 1),
'box-shadow': getShadow(index),
}"
>
<view>
{{
index
+
1
}}
</view>
</view>
<view
class=
"u-calendar__content__item__tips"
:style=
"
{ color: activeColor }"
v-if="
mode == 'range'
&&
startDate == `${year}-${month}-${index + 1}`
&&
startDate != endDate
"
>
{{
startText
}}
</view
>
<view
class=
"u-calendar__content__item__tips"
:style=
"
{ color: activeColor }"
v-if="mode == 'range'
&&
endDate == `${year}-${month}-${index + 1}`"
>
{{
endText
}}
</view
>
</view>
<!--
<view
class=
"u-calendar__content__bg-month"
>
{{
month
}}
</view>
-->
</view>
<view
class=
"u-calendar__line"
></view>
<!--
<view
class=
"u-calendar__bottom"
>
<view
class=
"u-calendar__bottom__choose"
>
<text>
{{
mode
==
'date'
?
activeDate
:
startDate
}}
</text>
<text
v-if=
"endDate"
>
至
{{
endDate
}}
</text>
</view>
<view
class=
"u-calendar__bottom__btn"
>
<u-button
:type=
"btnType"
shape=
"circle"
size=
"default"
@
click=
"btnFix()"
>
确定
</u-button>
</view>
</view>
-->
</view>
<!--
</u-popup>
-->
</
template
>
<
script
>
/**
* calendar 日历
* @description 此组件用于选择日期或显示日期。
* @property {String} mode 选择日期的模式,date-为单个日期,range-为选择日期范围
* @property {Boolean} v-model 布尔值变量,用于控制日历的弹出与收起
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
* @property {Boolean} change-year 是否显示顶部的切换年份方向的按钮(默认true)
* @property {Boolean} change-month 是否显示顶部的切换月份方向的按钮(默认true)
* @property {String Number} max-year 可切换的最大年份(默认2050)
* @property {String Number} min-year 可切换的最小年份(默认1950)
* @property {String Number} min-date 最小可选日期(默认1950-01-01)
* @property {String Number} max-date 最大可选日期(默认当前日期)
* @property {String Number} 弹窗顶部左右两边的圆角值,单位rpx(默认20)
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭日历(默认true)
* @property {String} month-arrow-color 月份切换按钮箭头颜色(默认#606266)
* @property {String} year-arrow-color 年份切换按钮箭头颜色(默认#909399)
* @property {String} color 日期字体的默认颜色(默认#303133)
* @property {String} active-bg-color 起始/结束日期按钮的背景色(默认#2953FF)
* @property {String Number} z-index 弹出时的z-index值(默认10075)
* @property {String} active-color 起始/结束日期按钮的字体颜色(默认#ffffff)
* @property {String} range-bg-color 起始/结束日期之间的区域的背景颜色(默认rgba(41,121,255,0.13))
* @property {String} range-color 选择范围内字体颜色(默认#2953FF)
* @property {String} start-text 起始日期底部的提示文字(默认 '开始')
* @property {String} end-text 结束日期底部的提示文字(默认 '结束')
* @property {String} btn-type 底部确定按钮的主题(默认 'primary')
* @property {Boolean} closeable 是否显示右上角的关闭图标(默认true)
* @example <u-calendar :initialDays="['2017-07-28']"></u-calendar>
*/
export
default
{
name
:
'u-calendar'
,
props
:
{
safeAreaInsetBottom
:
{
type
:
Boolean
,
default
:
false
,
},
// 是否允许通过点击遮罩关闭Picker
maskCloseAble
:
{
type
:
Boolean
,
default
:
true
,
},
// 通过双向绑定控制组件的弹出与收起
value
:
{
type
:
Boolean
,
default
:
false
,
},
// 弹出的z-index值
zIndex
:
{
type
:
[
String
,
Number
],
default
:
0
,
},
// 是否允许切换年份
changeYear
:
{
type
:
Boolean
,
default
:
false
,
},
// 是否允许切换月份
changeMonth
:
{
type
:
Boolean
,
default
:
true
,
},
// date-单个日期选择,range-开始日期+结束日期选择
mode
:
{
type
:
String
,
default
:
'date'
,
},
// 可切换的最大年份
maxYear
:
{
type
:
[
Number
,
String
],
default
:
2050
,
},
// 可切换的最小年份
minYear
:
{
type
:
[
Number
,
String
],
default
:
1950
,
},
// 最小可选日期(不在范围内日期禁用不可选)
minDate
:
{
type
:
[
Number
,
String
],
default
:
'1950-01-01'
,
},
/**
* 最大可选日期
* 默认最大值为今天,之后的日期不可选
* 2030-12-31
* */
maxDate
:
{
type
:
[
Number
,
String
],
default
:
''
,
},
// 弹窗顶部左右两边的圆角值
borderRadius
:
{
type
:
[
String
,
Number
],
default
:
20
,
},
// 月份切换按钮箭头颜色
monthArrowColor
:
{
type
:
String
,
default
:
'#606266'
,
},
// 年份切换按钮箭头颜色
yearArrowColor
:
{
type
:
String
,
default
:
'#909399'
,
},
// 默认日期字体颜色
color
:
{
type
:
String
,
default
:
'#191C27'
,
},
// 选中|起始结束日期背景色
activeBgColor
:
{
type
:
String
,
default
:
'#2953FF'
,
},
// 选中|起始结束日期字体颜色
activeColor
:
{
type
:
String
,
default
:
'#ffffff'
,
},
// 范围内日期背景色
rangeBgColor
:
{
type
:
String
,
default
:
'rgba(41,121,255,0.13)'
,
},
// 范围内日期字体颜色
rangeColor
:
{
type
:
String
,
default
:
'#2953FF'
,
},
// mode=range时生效,起始日期自定义文案
startText
:
{
type
:
String
,
default
:
'开始'
,
},
// mode=range时生效,结束日期自定义文案
endText
:
{
type
:
String
,
default
:
'结束'
,
},
//按钮样式类型
btnType
:
{
type
:
String
,
default
:
'primary'
,
},
// 当前选中日期带选中效果
isActiveCurrent
:
{
type
:
Boolean
,
default
:
true
,
},
// 是否可选
disabled
:
{
type
:
Boolean
,
default
:
true
,
},
// 切换年月是否触发事件 mode=date时生效
isChange
:
{
type
:
Boolean
,
default
:
true
,
},
// 是否显示右上角的关闭图标
closeable
:
{
type
:
Boolean
,
default
:
true
,
},
// 初始日期
initialDays
:
{
type
:
Array
,
default
()
{
return
[]
},
},
},
data
()
{
return
{
// 星期几,值为1-7
weekday
:
1
,
weekdayArr
:
[],
// 当前月有多少天
days
:
0
,
daysArr
:
[],
showTitle
:
''
,
year
:
2020
,
month
:
0
,
day
:
0
,
startYear
:
0
,
startMonth
:
0
,
startDay
:
0
,
endYear
:
0
,
endMonth
:
0
,
endDay
:
0
,
today
:
''
,
activeDate
:
[],
startDate
:
''
,
endDate
:
''
,
isStart
:
true
,
min
:
null
,
max
:
null
,
weekDayZh
:
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
],
}
},
computed
:
{
dataChange
()
{
return
`
${
this
.
mode
}
-
${
this
.
minDate
}
-
${
this
.
maxDate
}
`
},
uZIndex
()
{
// 如果用户有传递z-index值,优先使用
return
this
.
zIndex
?
this
.
zIndex
:
this
.
$u
.
zIndex
.
popup
},
},
watch
:
{
initialDays
(
val
)
{
this
.
activeDate
=
val
},
dataChange
(
val
)
{
this
.
init
()
},
},
created
()
{
this
.
init
()
},
methods
:
{
getColor
(
index
,
type
)
{
let
color
=
type
==
1
?
''
:
this
.
color
let
day
=
index
+
1
let
date
=
`
${
this
.
year
}
-
${
this
.
month
}
-
${
day
}
`
let
timestamp
=
new
Date
(
date
.
replace
(
/
\-
/g
,
'/'
)).
getTime
()
let
start
=
this
.
startDate
.
replace
(
/
\-
/g
,
'/'
)
let
end
=
this
.
endDate
.
replace
(
/
\-
/g
,
'/'
)
if
(
(
this
.
isActiveCurrent
&&
this
.
activeDate
.
indexOf
(
date
)
!=
-
1
)
||
this
.
startDate
==
date
||
this
.
endDate
==
date
)
{
color
=
type
==
1
?
this
.
activeBgColor
:
this
.
activeColor
}
else
if
(
this
.
endDate
&&
timestamp
>
new
Date
(
start
).
getTime
()
&&
timestamp
<
new
Date
(
end
).
getTime
()
)
{
color
=
type
==
1
?
this
.
rangeBgColor
:
this
.
rangeColor
}
return
color
},
getShadow
(
index
)
{
let
day
=
index
+
1
let
date
=
`
${
this
.
year
}
-
${
this
.
month
}
-
${
day
}
`
if
(
this
.
isActiveCurrent
&&
this
.
activeDate
.
indexOf
(
date
)
!=
-
1
)
{
return
'0 6rpx 12rpx rgba(41, 83, 255, 0.3)'
}
else
{
return
''
}
},
init
()
{
let
now
=
new
Date
()
this
.
year
=
now
.
getFullYear
()
this
.
month
=
now
.
getMonth
()
+
1
this
.
day
=
now
.
getDate
()
this
.
today
=
`
${
now
.
getFullYear
()}
-
${
now
.
getMonth
()
+
1
}
-
${
now
.
getDate
()}
`
this
.
activeDate
=
[...
this
.
initialDays
]
||
[
this
.
today
]
this
.
min
=
this
.
initDate
(
this
.
minDate
)
this
.
max
=
this
.
initDate
(
this
.
maxDate
||
this
.
today
)
this
.
startDate
=
''
this
.
startYear
=
0
this
.
startMonth
=
0
this
.
startDay
=
0
this
.
endYear
=
0
this
.
endMonth
=
0
this
.
endDay
=
0
this
.
endDate
=
''
this
.
isStart
=
true
this
.
changeData
()
},
//日期处理
initDate
(
date
)
{
let
fdate
=
date
.
split
(
'-'
)
return
{
year
:
Number
(
fdate
[
0
]
||
1920
),
month
:
Number
(
fdate
[
1
]
||
1
),
day
:
Number
(
fdate
[
2
]
||
1
),
}
},
openDisAbled
:
function
(
year
,
month
,
day
)
{
let
bool
=
true
let
date
=
`
${
year
}
/
${
month
}
/
${
day
}
`
// let today = this.today.replace(/\-/g, '/');
let
min
=
`
${
this
.
min
.
year
}
/
${
this
.
min
.
month
}
/
${
this
.
min
.
day
}
`
let
max
=
`
${
this
.
max
.
year
}
/
${
this
.
max
.
month
}
/
${
this
.
max
.
day
}
`
let
timestamp
=
new
Date
(
date
).
getTime
()
if
(
timestamp
>=
new
Date
(
min
).
getTime
()
&&
timestamp
<=
new
Date
(
max
).
getTime
()
)
{
bool
=
false
}
return
bool
},
generateArray
:
function
(
start
,
end
)
{
return
Array
.
from
(
new
Array
(
end
+
1
).
keys
()).
slice
(
start
)
},
formatNum
:
function
(
num
)
{
return
num
<
10
?
'0'
+
num
:
num
+
''
},
//一个月有多少天
getMonthDay
(
year
,
month
)
{
let
days
=
new
Date
(
year
,
month
,
0
).
getDate
()
return
days
},
getWeekday
(
year
,
month
)
{
let
date
=
new
Date
(
`
${
year
}
/
${
month
}
/01 00:00:00`
)
return
date
.
getDay
()
},
checkRange
(
year
)
{
let
overstep
=
false
if
(
year
<
this
.
minYear
||
year
>
this
.
maxYear
)
{
uni
.
showToast
({
title
:
'日期超出范围啦~'
,
icon
:
'none'
,
})
overstep
=
true
}
return
overstep
},
changeMonthHandler
(
isAdd
)
{
if
(
isAdd
)
{
let
month
=
this
.
month
+
1
let
year
=
month
>
12
?
this
.
year
+
1
:
this
.
year
if
(
!
this
.
checkRange
(
year
))
{
this
.
month
=
month
>
12
?
1
:
month
this
.
year
=
year
this
.
changeData
()
}
}
else
{
let
month
=
this
.
month
-
1
let
year
=
month
<
1
?
this
.
year
-
1
:
this
.
year
if
(
!
this
.
checkRange
(
year
))
{
this
.
month
=
month
<
1
?
12
:
month
this
.
year
=
year
this
.
changeData
()
}
}
},
changeYearHandler
(
isAdd
)
{
let
year
=
isAdd
?
this
.
year
+
1
:
this
.
year
-
1
if
(
!
this
.
checkRange
(
year
))
{
this
.
year
=
year
this
.
changeData
()
}
},
changeData
()
{
this
.
days
=
this
.
getMonthDay
(
this
.
year
,
this
.
month
)
this
.
daysArr
=
this
.
generateArray
(
1
,
this
.
days
)
this
.
weekday
=
this
.
getWeekday
(
this
.
year
,
this
.
month
)
this
.
weekdayArr
=
this
.
generateArray
(
1
,
this
.
weekday
)
this
.
showTitle
=
`
${
this
.
year
}
年
${
this
.
month
}
月`
if
(
this
.
isChange
&&
this
.
mode
==
'date'
)
{
this
.
btnFix
()
}
},
dateClick
(
day
)
{
if
(
this
.
disabled
)
return
day
+=
1
if
(
!
this
.
openDisAbled
(
this
.
year
,
this
.
month
,
day
))
{
this
.
day
=
day
let
date
=
`
${
this
.
year
}
-
${
this
.
month
}
-
${
day
}
`
if
(
this
.
mode
==
'date'
)
{
var
index
=
this
.
activeDate
.
indexOf
(
date
)
if
(
index
!=
-
1
)
{
this
.
activeDate
.
splice
(
index
,
1
)
}
else
{
this
.
activeDate
.
push
(
date
)
}
}
else
{
let
compare
=
new
Date
(
date
.
replace
(
/
\-
/g
,
'/'
)).
getTime
()
<
new
Date
(
this
.
startDate
.
replace
(
/
\-
/g
,
'/'
)).
getTime
()
if
(
this
.
isStart
||
compare
)
{
this
.
startDate
=
date
this
.
startYear
=
this
.
year
this
.
startMonth
=
this
.
month
this
.
startDay
=
this
.
day
this
.
endYear
=
0
this
.
endMonth
=
0
this
.
endDay
=
0
this
.
endDate
=
''
this
.
activeDate
=
[]
this
.
isStart
=
false
}
else
{
this
.
endDate
=
date
this
.
endYear
=
this
.
year
this
.
endMonth
=
this
.
month
this
.
endDay
=
this
.
day
this
.
isStart
=
true
}
}
}
},
close
()
{
// 修改通过v-model绑定的父组件变量的值为false,从而隐藏日历弹窗
this
.
$emit
(
'input'
,
false
)
},
getWeekText
(
date
)
{
date
=
new
Date
(
`
${
date
.
replace
(
/
\-
/g
,
'/'
)}
00:00:00`
)
let
week
=
date
.
getDay
()
return
'星期'
+
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
][
week
]
},
btnFix
()
{
if
(
this
.
mode
==
'date'
)
{
// let arr = this.activeDate.split('-')
// let year = this.isChange ? this.year : Number(arr[0]);
// let month = this.isChange ? this.month : Number(arr[1]);
// let day = this.isChange ? this.day : Number(arr[2]);
//当前月有多少天
// let days = this.getMonthDay(year, month)
// let result = `${year}-${this.formatNum(month)}-${this.formatNum(day)}`
// let weekText = this.getWeekText(result)
// let isToday = false
// if (`${year}-${month}-${day}` == this.today) {
// //今天
// isToday = true
// }
this
.
$emit
(
'change'
,
{
year
:
this
.
year
,
month
:
this
.
month
,
// day: day,
activeDate
:
this
.
activeDate
,
// days: days,
// result: result,
// week: weekText,
// isToday: isToday,
// switch: show //是否是切换年月操作
})
}
else
{
if
(
!
this
.
startDate
||
!
this
.
endDate
)
return
let
startMonth
=
this
.
formatNum
(
this
.
startMonth
)
let
startDay
=
this
.
formatNum
(
this
.
startDay
)
let
startDate
=
`
${
this
.
startYear
}
-
${
startMonth
}
-
${
startDay
}
`
let
startWeek
=
this
.
getWeekText
(
startDate
)
let
endMonth
=
this
.
formatNum
(
this
.
endMonth
)
let
endDay
=
this
.
formatNum
(
this
.
endDay
)
let
endDate
=
`
${
this
.
endYear
}
-
${
endMonth
}
-
${
endDay
}
`
let
endWeek
=
this
.
getWeekText
(
endDate
)
this
.
$emit
(
'change'
,
{
startYear
:
this
.
startYear
,
startMonth
:
this
.
startMonth
,
startDay
:
this
.
startDay
,
startDate
:
startDate
,
startWeek
:
startWeek
,
endYear
:
this
.
endYear
,
endMonth
:
this
.
endMonth
,
endDay
:
this
.
endDay
,
endDate
:
endDate
,
endWeek
:
endWeek
,
})
}
},
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
// @import "@/uview-ui/libs/css/style.components.scss";
.u-calendar
{
color
:
$u-content-color
;
&
__action
{
padding
:
40rpx
0
30rpx
0
;
&
__icon
{
margin
:
0
16rpx
;
}
&
__text
{
padding
:
0
16rpx
;
color
:
$u-main-color
;
font-size
:
32rpx
;
line-height
:
32rpx
;
font-weight
:
bold
;
}
}
&
__line
{
background-color
:
#e8ebf3
;
width
:
100vw
;
height
:
2rpx
;
}
&
__week-day
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
30rpx
20rpx
0
20rpx
;
overflow
:
hidden
;
&
__text
{
flex
:
1
;
text-align
:
center
;
}
}
&
__content
{
width
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
0
20rpx
30rpx
10rpx
;
box-sizing
:
border-box
;
background-color
:
#fff
;
position
:
relative
;
&
--end-date
{
border-top-right-radius
:
8rpx
;
border-bottom-right-radius
:
8rpx
;
}
&
--start-date
{
border-top-left-radius
:
8rpx
;
border-bottom-left-radius
:
8rpx
;
}
&
__item
{
width
:
14
.2857%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
12rpx
20rpx
;
overflow
:
hidden
;
position
:
relative
;
z-index
:
2
;
&
.u-hover-class
{
opacity
:
0
.25
;
}
&
__inner
{
height
:
60rpx
;
width
:
60rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
font-size
:
32rpx
;
position
:
relative
;
border-radius
:
50%
;
&
__desc
{
width
:
100%
;
font-size
:
24rpx
;
line-height
:
24rpx
;
transform
:
scale
(
0
.75
);
transform-origin
:
center
center
;
position
:
absolute
;
left
:
0
;
text-align
:
center
;
bottom
:
2rpx
;
}
}
&
__tips
{
width
:
100%
;
font-size
:
24rpx
;
line-height
:
24rpx
;
position
:
absolute
;
left
:
0
;
transform
:
scale
(
0
.8
);
transform-origin
:
center
center
;
text-align
:
center
;
bottom
:
8rpx
;
z-index
:
2
;
}
}
&
__bg-month
{
position
:
absolute
;
font-size
:
130px
;
line-height
:
130px
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
color
:
#e4e7ed
;
z-index
:
1
;
}
}
&
__bottom
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
background-color
:
#fff
;
padding
:
0
40rpx
30rpx
;
box-sizing
:
border-box
;
font-size
:
24rpx
;
color
:
$u-tips-color
;
&
__choose
{
height
:
50rpx
;
}
&
__btn
{
width
:
100%
;
}
}
}
</
style
>
src/components/record-cell/index.vue
View file @
8b9a0d18
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
<view
<view
v-if=
"key == 'result'"
v-if=
"key == 'result'"
:class=
"['result-text',
{ passed: passed }]"
:class=
"['result-text',
{ passed: passed }]"
>
{{
resultText
}}
</view
>
{{
data
[
key
]
}}
</view
>
>
<view
v-else
class=
"content-text"
>
{{
info
[
key
]
}}
</view>
<view
v-else
class=
"content-text"
>
{{
data
[
key
]
}}
</view>
<view
class=
"unit-text"
>
{{
units
[
key
]
}}
</view>
<view
v-if=
"units[key]"
class=
"unit-text"
>
{{
units
[
key
]
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -32,26 +32,48 @@ export default {
...
@@ -32,26 +32,48 @@ export default {
return
{}
return
{}
},
},
computed
:
{
computed
:
{
data
()
{
return
{
take
:
this
.
take
,
point
:
this
.
info
.
point
,
result
:
this
.
resultText
,
}
},
take
()
{
if
(
this
.
info
.
startDatetime
&&
this
.
info
.
endDatetime
)
{
let
timesStart
=
new
Date
(
this
.
info
.
startDatetime
.
replace
(
/
\-
/g
,
'/'
)
).
getTime
()
let
timesEnd
=
new
Date
(
this
.
info
.
endDatetime
.
replace
(
/
\-
/g
,
'/'
)
).
getTime
()
return
Math
.
ceil
((
timesEnd
-
timesStart
)
/
1000
/
60
)
}
return
0
},
timeText
()
{
timeText
()
{
return
this
.
$u
.
timeFormat
(
this
.
info
.
date
,
'yyyy.mm.dd'
)
return
this
.
info
.
endDatetime
?
this
.
info
.
endDatetime
.
split
(
' '
)[
0
].
replace
(
/
\-
/g
,
'.'
)
:
this
.
$u
.
timeFormat
(
new
Date
().
getTime
(),
'yyyy.mm.dd'
)
},
},
labels
()
{
labels
()
{
return
{
return
{
t
im
e
:
'模考用时'
,
t
ak
e
:
'模考用时'
,
score
:
'模考成绩'
,
point
:
'模考成绩'
,
result
:
'是否及格'
,
result
:
'是否及格'
,
}
}
},
},
units
()
{
units
()
{
return
{
return
{
t
im
e
:
'分钟'
,
t
ak
e
:
'分钟'
,
score
:
'分'
,
point
:
'分'
,
result
:
''
,
result
:
''
,
}
}
},
},
passed
()
{
passed
()
{
// 及格、不及格
// 及格、不及格
return
this
.
info
.
score
>=
60
return
this
.
info
.
point
>=
60
},
},
resultText
()
{
resultText
()
{
return
this
.
passed
?
'及格'
:
'不及格'
return
this
.
passed
?
'及格'
:
'不及格'
...
@@ -83,6 +105,7 @@ export default {
...
@@ -83,6 +105,7 @@ export default {
padding-top
:
16rpx
;
padding-top
:
16rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
flex-end
;
align-items
:
flex-end
;
justify-content
:
center
;
.result-text
{
.result-text
{
font-size
:
44rpx
;
font-size
:
44rpx
;
color
:
#fa5a49
;
color
:
#fa5a49
;
...
@@ -103,7 +126,7 @@ export default {
...
@@ -103,7 +126,7 @@ export default {
.unit-text
{
.unit-text
{
padding-left
:
14rpx
;
padding-left
:
14rpx
;
font-weight
:
400
;
font-weight
:
400
;
margin-bottom
:
1
1
rpx
;
margin-bottom
:
1
2
rpx
;
}
}
}
}
}
}
...
...
src/pages.json
View file @
8b9a0d18
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"证书"
,
"navigationBarTitleText"
:
"证书"
,
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"disableScroll"
:
fals
e
"disableScroll"
:
tru
e
}
}
},
},
{
{
...
...
src/pages/cert/detail.vue
View file @
8b9a0d18
...
@@ -14,15 +14,11 @@
...
@@ -14,15 +14,11 @@
<u-image
:src=
"topImage"
height=
"116rpx"
width=
"100%"
></u-image>
<u-image
:src=
"topImage"
height=
"116rpx"
width=
"100%"
></u-image>
</view>
</view>
<view
class=
"table-list"
>
<view
class=
"table-list"
>
<view
v-if=
"type == 'country'"
class=
"item
"
>
<view
class=
"item"
v-for=
"(data, k) in dataList
"
>
<view
class=
"name"
>
{{
certName
}}
</view>
<view
class=
"name"
>
{{
certName
[
k
]
}}
</view>
<view
class=
"table"
>
<view
class=
"table"
>
<u-table
border-color=
"#9EA5BB"
>
<u-table
border-color=
"#9EA5BB"
>
<u-tr
<u-tr
v-for=
"(item, i) in data"
:key=
"i"
class=
"u-tr"
>
v-for=
"(item, i) in data.certificateTextContent"
:key=
"i"
class=
"u-tr"
>
<u-td
<u-td
v-for=
"(val, name, index) in item"
v-for=
"(val, name, index) in item"
:key=
"index"
:key=
"index"
...
@@ -48,16 +44,13 @@
...
@@ -48,16 +44,13 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
data
:
{
dataList
:
[],
certificateTextContent
:
[],
},
learnData
:
{},
learnData
:
{},
type
:
null
,
certName
:
[],
certName
:
''
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'tezhongzuoyepingtai@2x.png'
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'tezhongzuoyepingtai@2x.png'
,
}
}
},
},
on
Show
:
function
()
{
on
Load
:
function
()
{
this
.
formatDataByType
()
this
.
formatDataByType
()
},
},
computed
:
{
computed
:
{
...
@@ -111,39 +104,33 @@ export default {
...
@@ -111,39 +104,33 @@ export default {
return
return
}
}
let
certData
=
getApp
().
globalData
.
certItemData
let
certData
=
getApp
().
globalData
.
certItemData
this
.
certName
=
certData
.
certificateName
if
(
certData
.
type
==
'country'
)
{
console
.
log
(
'ok'
)
this
.
type
=
'country'
this
.
certName
=
certData
.
certificateName
let
countryData
=
[]
let
countryData
=
[]
let
count
=
certData
.
data
.
count
||
2
let
certName
=
[]
let
list
let
count
,
list
console
.
log
(
'data is'
,
certData
.
data
)
for
(
let
k
in
certData
)
{
if
(
!
certData
.
data
.
certificateTextContent
)
{
countryData
[
k
]
=
[]
count
=
certData
[
k
].
data
.
count
||
2
certName
[
k
]
=
certData
[
k
].
certificateName
.
replace
(
'作业'
,
'证'
)
//格式化表格数据为json
if
(
!
certData
[
k
].
data
.
certificateTextContent
)
{
list
=
JSON
.
parse
(
list
=
JSON
.
parse
(
JSON
.
parse
(
JSON
.
stringify
(
certData
.
data
.
certificateContent
))
JSON
.
parse
(
JSON
.
stringify
(
certData
[
k
]
.
data
.
certificateContent
))
)
)
console
.
log
(
'list is'
,
list
)
}
else
{
}
else
{
list
=
certData
.
data
.
certificateTextContent
list
=
certData
[
k
]
.
data
.
certificateTextContent
}
}
//组合表格数据
for
(
let
key
in
list
)
{
for
(
let
key
in
list
)
{
countryData
[
key
]
=
[]
countryData
[
k
][
k
ey
]
=
[]
for
(
let
i
=
1
;
i
<=
count
;
i
++
)
{
for
(
let
i
=
1
;
i
<=
count
;
i
++
)
{
countryData
[
key
].
push
(
list
[
key
][
'filedName_'
+
i
])
countryData
[
k
][
k
ey
].
push
(
list
[
key
][
'filedName_'
+
i
])
countryData
[
key
].
push
(
list
[
key
][
'filedValue_'
+
i
])
countryData
[
k
][
k
ey
].
push
(
list
[
key
][
'filedValue_'
+
i
])
}
}
}
}
console
.
log
(
'data countryData'
,
countryData
)
certData
.
data
.
certificateTextContent
=
countryData
this
.
data
=
certData
.
data
console
.
log
(
'data log'
,
this
.
data
)
}
else
if
(
certData
.
type
==
'learn'
)
{
this
.
type
=
'learn'
this
.
learnData
=
certData
.
data
}
}
this
.
certName
=
certName
this
.
dataList
=
countryData
console
.
log
(
'data redo log'
,
this
.
dataList
)
},
},
},
},
}
}
...
@@ -156,13 +143,15 @@ export default {
...
@@ -156,13 +143,15 @@ export default {
color
:
transparent
;
color
:
transparent
;
display
:
none
;
display
:
none
;
}
}
page
{
background-color
:
#2953ff
;
}
.begin-answer
{
.begin-answer
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
background-color
:
#2953ff
;
background-size
:
100%
920rpx
;
background-size
:
100%
920rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
height
:
1
2
0vh
;
height
:
1
0
0vh
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
width
:
100%
;
width
:
100%
;
...
@@ -173,7 +162,7 @@ export default {
...
@@ -173,7 +162,7 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
padding
:
30rpx
24rpx
0rpx
24rpx
;
padding
:
30rpx
24rpx
5
0rpx
24rpx
;
}
}
.cert-body
{
.cert-body
{
...
...
src/pages/cert/detailLearn.vue
View file @
8b9a0d18
...
@@ -85,16 +85,24 @@ export default {
...
@@ -85,16 +85,24 @@ export default {
type
:
null
,
type
:
null
,
certName
:
''
,
certName
:
''
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'xueshitoubu@2x.png'
,
topImage
:
process
.
uniEnv
.
qn_base_url
+
'xueshitoubu@2x.png'
,
workPlace
:
''
}
}
},
},
onLoad
(){
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
workPlace
=
res
&&
res
.
workUnit
||
null
})
},
onShow
:
function
()
{
onShow
:
function
()
{
this
.
formatDataByType
()
this
.
formatDataByType
()
},
},
computed
:
{
computed
:
{
nowDate
(){
nowDate
(){
var
Today
=
new
Date
();
var
Today
=
new
Date
();
let
m
=
(
Today
.
getMonth
()
+
1
)
let
m
=
String
(
Today
.
getMonth
()
+
1
)
let
d
=
Today
.
getDate
()
let
d
=
String
(
Today
.
getDate
())
console
.
log
(
'd length'
,
d
.
length
)
return
(
Today
.
getFullYear
()
+
'.'
+
(
m
.
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
d
.
length
>
1
?
d
:
'0'
+
d
))
return
(
Today
.
getFullYear
()
+
'.'
+
(
m
.
length
>
1
?
m
:
'0'
+
m
)
+
'.'
+
(
d
.
length
>
1
?
d
:
'0'
+
d
))
},
},
headPhoto
(){
headPhoto
(){
...
@@ -113,7 +121,7 @@ export default {
...
@@ -113,7 +121,7 @@ export default {
return
this
.
learnData
.
idCard
||
' '
return
this
.
learnData
.
idCard
||
' '
},
},
company
()
{
company
()
{
return
this
.
learnData
.
company
||
' '
return
this
.
workPlace
},
},
subjectName
()
{
subjectName
()
{
return
this
.
learnData
.
subjectName
||
' '
return
this
.
learnData
.
subjectName
||
' '
...
@@ -122,13 +130,13 @@ export default {
...
@@ -122,13 +130,13 @@ export default {
return
this
.
learnData
.
institutionName
||
'模考大师'
return
this
.
learnData
.
institutionName
||
'模考大师'
},
},
maxpoint
()
{
maxpoint
()
{
return
this
.
learnData
.
maxPoint
||
0
return
this
.
learnData
.
maxPoint
>
0
&&
this
.
learnData
.
maxPoint
||
''
},
},
learnTime
()
{
learnTime
()
{
return
this
.
learnData
.
time
||
0
return
this
.
learnData
.
maxPoint
>
0
&&
this
.
learnData
.
time
||
''
},
},
resultForTest
()
{
resultForTest
()
{
return
(
this
.
learnData
.
maxPoint
>
80
&&
'合格'
)
||
'不合格
'
return
this
.
learnData
.
maxPoint
>
0
&&
((
this
.
learnData
.
maxPoint
>
80
&&
'合格'
)
||
'不合格'
)
||
'
'
},
},
},
},
methods
:
{
methods
:
{
...
...
src/pages/index/cert.vue
View file @
8b9a0d18
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
titleColor=
"#000000"
titleColor=
"#000000"
:border-bottom=
"false"
:border-bottom=
"false"
title-bold
title-bold
:is-back=
"false"
></u-navbar>
></u-navbar>
<view
class=
"study"
>
<view
class=
"study"
>
<u-tabs-swiper
<u-tabs-swiper
...
@@ -28,7 +29,8 @@
...
@@ -28,7 +29,8 @@
@
transition=
"transition"
@
transition=
"transition"
@
animationfinish=
"animationfinish"
@
animationfinish=
"animationfinish"
>
>
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
>
<swiper-item>
<view
style=
"width: 100%;height: 100%;overflow: auto;"
>
<view
class=
"tips-top"
>
<view
class=
"tips-top"
>
<view
class=
"all-text"
>
<view
class=
"all-text"
>
正式考试后
正式考试后
...
@@ -40,7 +42,7 @@
...
@@ -40,7 +42,7 @@
</view>
</view>
</view>
</view>
<scroll-view
scroll-y
style=
"width: 702rpx;padding: 0 24rpx
;"
>
<view
style=
"padding: 0 12px;height: 100%;overflow: auto
;"
>
<view
class=
" form"
>
<view
class=
" form"
>
<view
class=
"item"
>
<view
class=
"item"
>
<text
class=
"title"
>
选择查询证书类型
</text>
<text
class=
"title"
>
选择查询证书类型
</text>
...
@@ -48,8 +50,6 @@
...
@@ -48,8 +50,6 @@
v-model=
"checkType"
v-model=
"checkType"
:type=
"type"
:type=
"type"
:border=
"border"
:border=
"border"
@
click=
"show = true"
value=
"特种作业操作证查询"
placeholder=
"请选择"
placeholder=
"请选择"
/>
/>
</view>
</view>
...
@@ -74,30 +74,18 @@
...
@@ -74,30 +74,18 @@
<view
class=
"tips-bottom"
>
请确认与所在考试省份一致
</view>
<view
class=
"tips-bottom"
>
请确认与所在考试省份一致
</view>
</view>
</view>
<button
class=
"sub-button"
@
tap=
"submit"
>
查询
</button>
<button
class=
"sub-button"
@
tap=
"submit"
>
查询
</button>
</scroll-view>
</view>
</view>
</swiper-item>
</swiper-item>
<swiper-item
@
touchmove
.
stop
.
prevent=
"stopTouchMove"
>
<swiper-item>
<scroll-view
<view
v-if=
"hasData"
class=
"list-view"
style=
"width: 100%;height: 100%;overflow: auto;padding: 0 12px;padding-bottom: 100rpx;"
>
scroll-y
<view
class=
"item"
v-for=
"(item, key) in countryCertList"
:key=
"key"
@
tap=
"goDetail([item])"
>
style=
"width: 702rpx;padding: 0 24rpx;"
@
scrolltolower=
"onreachBottom"
scroll-y=
"true"
refresher-enabled=
"true"
:refresher-triggered=
"triggered"
:refresher-threshold=
"100"
@
refresherpulling=
"onPulling"
@
refresherrefresh=
"onRefresh"
@
refresherrestore=
"onRestore"
@
refresherabort=
"onAbort"
>
<view
v-if=
"hasData"
class=
"list-view"
>
<view
class=
"item"
v-for=
"(item, key) in countryCertList"
:key=
"key"
@
tap=
"goDetail(item)"
>
<u-image
:src=
"item.bgImage"
width=
"100%"
height=
"100%"
class=
"bg-image"
></u-image>
<u-image
:src=
"item.bgImage"
width=
"100%"
height=
"100%"
class=
"bg-image"
></u-image>
<view
class=
"name"
>
<view
class=
"name"
>
{{
item
.
certificateName
}}
{{
item
.
certificateName
}}
</view>
</view>
</view>
</view>
<view
class=
"item"
v-for=
"(item, key) in learnCertList"
:key=
"key"
@
tap=
"goDetail(item
)"
>
<view
class=
"item"
v-for=
"(item, key) in learnCertList"
:key=
"key"
@
tap=
"goDetail([item]
)"
>
<u-image
:src=
"item.bgImage"
width=
"100%"
height=
"100%"
class=
"bg-image"
></u-image>
<u-image
:src=
"item.bgImage"
width=
"100%"
height=
"100%"
class=
"bg-image"
></u-image>
<view
class=
"learn-name"
>
<view
class=
"learn-name"
>
{{
item
.
certificateName
}}
{{
item
.
certificateName
}}
...
@@ -115,7 +103,6 @@
...
@@ -115,7 +103,6 @@
>
当前暂无证书内容
</text
>
当前暂无证书内容
</text
>
>
</view>
</view>
</scroll-view>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</view>
</view>
...
@@ -184,6 +171,15 @@ export default {
...
@@ -184,6 +171,15 @@ export default {
}
}
},
},
onLoad
()
{
onLoad
()
{
if
(
!
this
.
vuex_token
)
{
this
.
$u
.
toast
(
'请先登录'
)
let
that
=
this
setTimeout
(
function
(){
that
.
$u
.
route
({
url
:
'pages/login/index'
,
})
},
1000
)
}
this
.
checkType
=
'特种作业操作证查询'
this
.
checkType
=
'特种作业操作证查询'
},
},
onShow
:
function
(
param
)
{
onShow
:
function
(
param
)
{
...
@@ -197,10 +193,6 @@ export default {
...
@@ -197,10 +193,6 @@ export default {
},
},
methods
:
{
methods
:
{
submit
(){
submit
(){
if
(
!
this
.
checkType
){
this
.
$u
.
toast
(
'请选择查询类型'
)
return
}
console
.
log
(
'cert'
,
this
.
certId
)
console
.
log
(
'cert'
,
this
.
certId
)
if
(
!
this
.
certId
){
if
(
!
this
.
certId
){
this
.
$u
.
toast
(
'请填写证件号码!'
)
this
.
$u
.
toast
(
'请填写证件号码!'
)
...
@@ -221,16 +213,19 @@ export default {
...
@@ -221,16 +213,19 @@ export default {
this
.
$u
.
toast
(
'证书暂未公布'
)
this
.
$u
.
toast
(
'证书暂未公布'
)
return
return
}
}
let
data
=
[]
for
(
let
index
in
res
){
let
item
=
{}
let
item
=
{}
item
.
certificateName
=
res
[
0
].
certificateName
.
replace
(
'作业'
,
'证'
)
item
.
certificateName
=
res
[
index
].
certificateName
.
replace
(
'作业'
,
'证'
)
item
.
bgImage
=
this
.
countryCertImage
item
.
bgImage
=
this
.
countryCertImage
item
.
type
=
'country'
item
.
type
=
'country'
item
.
key
=
0
item
.
key
=
index
item
.
data
=
res
[
0
]
item
.
data
=
res
[
index
]
this
.
goDetail
(
item
)
data
.
push
(
item
)
}
this
.
goDetail
(
data
)
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
this
.
$u
.
toast
(
'证书暂未公布'
)
return
return
})
})
},
},
...
@@ -263,128 +258,6 @@ export default {
...
@@ -263,128 +258,6 @@ export default {
//获取学时数据
//获取学时数据
getLearnCert
(){
getLearnCert
(){
this
.
$u
.
api
.
getlearnCertList
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getlearnCertList
().
then
((
res
)
=>
{
// res = [
// {
// "id": "1415602594134360064",
// "createTime": "2021-07-15 17:41:51",
// "createdBy": "1415215255998431232",
// "updateTime": "2021-07-15 17:41:51",
// "updatedBy": null,
// "echoMap": {
// "studentId": {
// "id": "1414459877807357952",
// "createTime": "2021-07-12 13:41:29",
// "createdBy": "3",
// "updateTime": "2021-07-20 20:41:13",
// "updatedBy": "1414459877807357952",
// "echoMap": {},
// "cardCount": null,
// "consumeAmount": null,
// "loginTime": null,
// "code": "XY20210723000001",
// "unionid": "",
// "nickname": "",
// "name": "",
// "phoneNumber": "11111111111",
// "avatarPath": "",
// "identityNumber": "",
// "identityFrontPath": "",
// "identityBackPath": "",
// "certificatePhotoPath": "",
// "certificateValidityDate": null,
// "workUnit": "",
// "address": ""
// },
// "questionWarehouseId": {
// "id": "1",
// "createTime": "2021-07-12 16:33:20",
// "createdBy": null,
// "updateTime": "2021-07-21 14:40:44",
// "updatedBy": "1413688964405002240",
// "echoMap": {},
// "institutionId": "1",
// "subjectId": "1413687160678121472",
// "title": "测试1",
// "subtitle": "侧首",
// "description": "哈哈哈哈",
// "effectiveTime": "1",
// "provinceId": "470715",
// "cityId": "475286",
// "type": "1",
// "price": "100.00",
// "realPrice": "50.00",
// "state": true,
// "remark": "123231",
// "version": null
// }
// },
// "number": null,
// "questionWarehouseId": "1",
// "institutionId": "-1",
// "studentId": "1414459877807357952",
// "cardId": "1416278788987158528"
// },
// {
// "id": "1418473748293484544",
// "createTime": "2021-07-23 15:31:10",
// "createdBy": "1414459877807357952",
// "updateTime": "2021-07-24 14:45:15",
// "updatedBy": "1414459877807357952",
// "echoMap": {
// "studentId": {
// "id": "1414459877807357952",
// "createTime": "2021-07-12 13:41:29",
// "createdBy": "3",
// "updateTime": "2021-07-20 20:41:13",
// "updatedBy": "1414459877807357952",
// "echoMap": {},
// "cardCount": null,
// "consumeAmount": null,
// "loginTime": null,
// "code": "XY20210723000001",
// "unionid": "",
// "nickname": "",
// "name": "",
// "phoneNumber": "11111111111",
// "avatarPath": "",
// "identityNumber": "",
// "identityFrontPath": "",
// "identityBackPath": "",
// "certificatePhotoPath": "",
// "certificateValidityDate": null,
// "workUnit": "",
// "address": ""
// },
// "questionWarehouseId": {
// "id": "1414854649273384960",
// "createTime": "2021-07-13 15:50:10",
// "createdBy": "1413688964405002240",
// "updateTime": "2021-07-23 14:41:30",
// "updatedBy": "1413688964405002240",
// "echoMap": {},
// "institutionId": "1",
// "subjectId": "1418169087225233408",
// "title": "登高架设作业",
// "subtitle": "大狼狗",
// "description": "sad",
// "effectiveTime": "0",
// "provinceId": "470715",
// "cityId": "475286",
// "type": "1",
// "price": "100.00",
// "realPrice": "60.00",
// "state": true,
// "remark": "",
// "version": "0"
// }
// },
// "number": null,
// "questionWarehouseId": "1414854649273384960",
// "institutionId": "-1",
// "studentId": "1414459877807357952",
// "cardId": "0"
// }
// ]
console
.
log
(
'学时证'
,
res
);
console
.
log
(
'学时证'
,
res
);
if
(
!
res
||
res
.
length
==
0
){
if
(
!
res
||
res
.
length
==
0
){
//空显示缺醒
//空显示缺醒
...
@@ -410,22 +283,10 @@ export default {
...
@@ -410,22 +283,10 @@ export default {
},
},
goDetail
(
param
){
goDetail
(
param
){
console
.
log
(
'goto param'
,
param
)
console
.
log
(
'goto param'
,
param
)
if
(
param
.
type
==
'learn'
){
if
(
param
[
0
].
type
==
'learn'
){
param
=
param
[
0
]
console
.
log
(
'点击学时证,请求详情,组装参数再传过去'
)
console
.
log
(
'点击学时证,请求详情,组装参数再传过去'
)
this
.
$u
.
api
.
getlearnCertDetail
(
param
.
id
).
then
((
res
)
=>
{
this
.
$u
.
api
.
getlearnCertDetail
(
param
.
id
).
then
((
res
)
=>
{
// let res = {
// photo: "https://thirdwx.qlogo.cn/mmopen/vi_32/c20Wk8HTurnNnKJMmnAnib9CUtqicwKKIMCvzViaBn0icNnpmeOQbSiaRklWCcfUOlW7oqj2o7u65d6F3ZwmZtLVZaw/132",//头像,
// name: "阿三哥",//名字,
// idCard: "111141222",//身份证,
// company: "维修班",//工作单位,
// subjectName: "测试1",//资格类型,
// institutionName: '阿斯顿学院',//培训机构名称,
// startDate: "2011-01-01",//培训开始时间,
// endDate: "2021-07-24",//培训结束时间,
// maxPoint: 20,//最高分,
// time: 0,//学时,
// questionWarehouse: null,
// }
param
.
data
=
res
param
.
data
=
res
getApp
().
globalData
.
certItemData
=
param
getApp
().
globalData
.
certItemData
=
param
this
.
$u
.
route
({
this
.
$u
.
route
({
...
@@ -499,6 +360,7 @@ export default {
...
@@ -499,6 +360,7 @@ export default {
let
current
=
e
.
detail
.
current
let
current
=
e
.
detail
.
current
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
)
this
.
$refs
.
uTabs
.
setFinishCurrent
(
current
)
this
.
swiperCurrent
=
current
this
.
swiperCurrent
=
current
this
.
tabsChange
(
current
)
this
.
current
=
current
this
.
current
=
current
},
},
},
},
...
@@ -527,9 +389,8 @@ page {
...
@@ -527,9 +389,8 @@ page {
width
:
100%
;
width
:
100%
;
}
}
.study
{
.study
{
height
:
100
vh
;
height
:
100
%
;
background
:
none
;
background
:
none
;
/* padding: 0rpx 24rpx; */
}
}
.form
{
.form
{
display
:
flex
;
display
:
flex
;
...
@@ -611,12 +472,15 @@ page {
...
@@ -611,12 +472,15 @@ page {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
text-align
:
center
;
text-align
:
center
;
line-height
:
444rpx
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
font-size
:
60rpx
;
font-size
:
60rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
white
;
color
:
white
;
display
:
flex
;
flex-direction
:
column
;
vertical-align
:
middle
;
padding
:
160rpx
50rpx
0
50rpx
;
}
}
.learn-name
{
.learn-name
{
width
:
100%
;
width
:
100%
;
...
...
src/pages/index/index.vue
View file @
8b9a0d18
...
@@ -413,8 +413,10 @@ export default {
...
@@ -413,8 +413,10 @@ export default {
if
(
this
.
info
.
id
)
{
if
(
this
.
info
.
id
)
{
// 跳转到学练记录
// 跳转到学练记录
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/record?part='
,
url
:
'pages/learn/record?key='
,
key
,
params
:
{
key
:
key
,
},
})
})
}
else
{
}
else
{
this
.
$refs
.
uToast
.
show
({
this
.
$refs
.
uToast
.
show
({
...
...
src/pages/learn/record.vue
View file @
8b9a0d18
...
@@ -16,9 +16,22 @@
...
@@ -16,9 +16,22 @@
<image
class=
"xunzhang-image"
:src=
"xunzhangImage"
></image>
<image
class=
"xunzhang-image"
:src=
"xunzhangImage"
></image>
</view>
</view>
<view
class=
"body-view"
>
<view
class=
"body-view"
>
<scroll-view
scroll-y=
"true"
class=
"scroll-view"
@
scrolltolower=
"reachBottom"
scroll-anchoring
enable-back-to-top
:scroll-into-view=
"scrollId"
>
<view
class=
"date-view"
>
<view
class=
"date-view"
>
<view
class=
"content-title"
id=
"part-days"
>
每日一练
</view>
<view
class=
"content-title"
id=
"part-days"
>
每日一练
</view>
<view
class=
"date-content"
></view>
<view
class=
"date-content"
>
<Calendar
:initialDays=
"days"
@
change=
"handleChangeMonth"
></Calendar>
</view>
</view>
</view>
<view
class=
"charts-view"
>
<view
class=
"charts-view"
>
<view
class=
"content-title"
id=
"part-total"
>
练习分析
</view>
<view
class=
"content-title"
id=
"part-total"
>
练习分析
</view>
...
@@ -64,30 +77,42 @@
...
@@ -64,30 +77,42 @@
<view
class=
"content-title"
id=
"part-today"
>
模考成绩
</view>
<view
class=
"content-title"
id=
"part-today"
>
模考成绩
</view>
<view
class=
"list-content"
>
<view
class=
"list-content"
>
<RecordCell
<RecordCell
v-for=
"(item, index) in showedList
"
v-for=
"(item, index) in lists
"
:key=
"index"
:key=
"index"
:info=
"item"
:info=
"item"
></RecordCell>
></RecordCell>
<view
class=
"show-more"
@
click=
"showAll = true"
v-if=
"!showAll"
>
<!--
<view
class=
"show-more"
@
click=
"showAll = true"
v-if=
"!showAll"
>
<u-icon
name=
"arrow-down"
></u-icon>
<u-icon
name=
"arrow-down"
></u-icon>
<text>
查看更多
</text>
<text>
查看更多
</text>
</view>
-->
</view>
</view>
<u-loadmore
v-show=
"
(recordParams.current == 1 && loaded) || recordParams.current > 1
"
:status=
"currentLoadStatus"
></u-loadmore>
</view>
</view>
</view>
</
scroll-
view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
RecordCell
from
'@/components/record-cell'
import
RecordCell
from
'@/components/record-cell'
import
Calendar
from
'@/components/calendar'
export
default
{
export
default
{
components
:
{
RecordCell
},
components
:
{
RecordCell
,
Calendar
},
data
()
{
data
()
{
return
{
return
{
lists
:
[],
lists
:
[],
days
:
[],
showSelect
:
false
,
showSelect
:
false
,
showAll
:
false
,
showAll
:
false
,
scrollId
:
null
,
scrollId
:
null
,
loaded
:
false
,
items
:
[
items
:
[
{
{
title
:
'近7天'
,
title
:
'近7天'
,
...
@@ -102,9 +127,13 @@ export default {
...
@@ -102,9 +127,13 @@ export default {
selected
:
false
,
selected
:
false
,
},
},
],
],
currentLoadStatus
:
'loading'
,
rangeDay0
:
this
.
getDate
(),
// 自定义开始日期
rangeDay0
:
this
.
getDate
(),
// 自定义开始日期
rangeDay1
:
this
.
getDate
(),
// 自定义结束日期
rangeDay1
:
this
.
getDate
(),
// 自定义结束日期
recordParams
:
{
current
:
0
,
size
:
15
,
},
}
}
},
},
...
@@ -119,23 +148,74 @@ export default {
...
@@ -119,23 +148,74 @@ export default {
day
:
true
,
day
:
true
,
}
}
},
},
showedList
()
{
return
this
.
showAll
?
this
.
lists
:
this
.
lists
.
slice
(
0
,
2
)
},
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
if
(
e
&&
e
.
key
)
{
if
(
e
&&
e
.
key
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
scrollId
=
'part-'
+
e
.
key
this
.
scrollId
=
'part-'
+
e
.
key
},
500
)
})
})
}
}
this
.
lists
=
[
this
.
queryExamRecord
()
{
time
:
36
,
score
:
80
,
date
:
new
Date
().
getTime
},
{
time
:
100
,
score
:
40
,
date
:
new
Date
().
getTime
},
{
time
:
40
,
score
:
60
,
date
:
new
Date
().
getTime
},
]
},
},
methods
:
{
methods
:
{
// 每日一练统计
everyTaskList
(
year
,
month
)
{
var
params
=
{
startDate
:
this
.
$u
.
timeFormat
(
new
Date
(
year
,
month
-
1
,
1
).
getTime
(),
'yyyy-mm-dd'
),
endDate
:
this
.
$u
.
timeFormat
(
new
Date
(
year
,
month
,
0
).
getTime
(),
'yyyy-mm-dd'
),
}
this
.
$u
.
api
.
everyTaskList
(
this
.
questionWarehouseId
,
params
)
.
then
((
res
)
=>
{
this
.
days
=
[]
for
(
var
item
of
res
)
{
this
.
days
.
push
(
item
.
time
.
replace
(
/
\-
0/g
,
'
\
-'
))
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
// 模考记录
queryExamRecord
()
{
this
.
recordParams
.
current
+=
1
;(
this
.
recordParams
.
model
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
}),
this
.
$u
.
api
.
queryExamRecord
(
this
.
recordParams
)
.
then
((
res
)
=>
{
this
.
loaded
=
true
if
(
this
.
recordParams
.
current
==
1
)
{
this
.
lists
=
[]
}
if
((
res
.
records
||
[]).
length
>
0
)
{
this
.
lists
.
push
(...
res
.
records
)
}
this
.
currentLoadStatus
=
res
.
total
>
this
.
lists
.
length
&&
(
res
.
records
||
[]).
length
==
this
.
recordParams
.
size
?
'loadmore'
:
'nomore'
})
.
catch
((
err
)
=>
{
this
.
loaded
=
true
console
.
log
(
err
)
})
},
handleChangeMonth
(
e
)
{
this
.
everyTaskList
(
e
.
year
,
e
.
month
)
},
handleClick
()
{},
handleClick
()
{},
handleClickRange
(
index
)
{
handleClickRange
(
index
)
{
for
(
var
item
of
this
.
items
)
{
for
(
var
item
of
this
.
items
)
{
...
@@ -158,17 +238,16 @@ export default {
...
@@ -158,17 +238,16 @@ export default {
getDate
()
{
getDate
()
{
return
this
.
$u
.
timeFormat
(
new
Date
().
getTime
(),
'yyyy-mm-dd'
)
return
this
.
$u
.
timeFormat
(
new
Date
().
getTime
(),
'yyyy-mm-dd'
)
},
},
reachBottom
()
{
if
(
this
.
currentLoadStatus
!=
'loadmore'
)
return
this
.
currentLoadStatus
==
'loading'
this
.
queryExamRecord
()
},
},
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
.record-view
{
.record-view
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -207,26 +286,34 @@ export default {
...
@@ -207,26 +286,34 @@ export default {
}
}
}
}
.body-view
{
.body-view
{
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
border-radius
:
24rpx
24rpx
0
0
;
border-radius
:
24rpx
24rpx
0
0
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
height
:
100%
;
height
:
100%
;
overflow
:
auto
;
overflow
:
auto
;
padding
:
24rpx
30rpx
44rpx
30rpx
;
.scroll-view
{
height
:
100%
;
}
.date-view
{
.date-view
{
.date-content
{
.date-content
{
min-height
:
6
48
rpx
;
min-height
:
6
50
rpx
;
}
}
}
}
.content-title
{
.content-title
{
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#191c27
;
color
:
#191c27
;
font-weight
:
bold
;
font-weight
:
bold
;
padding
:
24rpx
30rpx
0rpx
30rpx
;
}
}
.charts-view
{
.charts-view
{
.range-view
{
.range-view
{
display
:
flex
;
display
:
flex
;
margin-top
:
40rpx
;
margin
:
40rpx
30rpx
40rpx
30rpx
;
margin-bottom
:
40rpx
;
.range-title
{
.range-title
{
font-size
:
28rpx
;
font-size
:
28rpx
;
color
:
#9ea5bb
;
color
:
#9ea5bb
;
...
@@ -248,7 +335,7 @@ export default {
...
@@ -248,7 +335,7 @@ export default {
}
}
}
}
.days-select-view
{
.days-select-view
{
margin-left
:
1
54
rpx
;
margin-left
:
1
68
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
color
:
#9ea5bb
;
color
:
#9ea5bb
;
...
@@ -275,7 +362,10 @@ export default {
...
@@ -275,7 +362,10 @@ export default {
}
}
}
}
.list-view
{
.list-view
{
padding-bottom
:
20rpx
;
.list-content
{
.list-content
{
padding
:
0
30rpx
20rpx
30rpx
;
.show-more
{
.show-more
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
...
...
src/pages/mine/bank.vue
View file @
8b9a0d18
...
@@ -50,176 +50,7 @@ export default {
...
@@ -50,176 +50,7 @@ export default {
},
},
onLoad
()
{
onLoad
()
{
this
.
$u
.
api
.
getUserQuestionWareHouse
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserQuestionWareHouse
().
then
((
res
)
=>
{
res
=
[
console
.
log
(
'tiku list'
,
res
)
{
id
:
'1415266126815821824'
,
createTime
:
'2021-07-14 19:05:14'
,
createdBy
:
'1415215255998431232'
,
updateTime
:
'2021-07-14 19:05:14'
,
updatedBy
:
'1415215255998431232'
,
echoMap
:
{
studentId
:
{
id
:
'1414459877807357952'
,
createTime
:
'2021-07-12 13:41:29'
,
createdBy
:
'3'
,
updateTime
:
'2021-07-20 20:41:13'
,
updatedBy
:
'1414459877807357952'
,
echoMap
:
{},
cardCount
:
null
,
consumeAmount
:
null
,
loginTime
:
null
,
unionid
:
''
,
nickname
:
''
,
name
:
''
,
phoneNumber
:
'11111111111'
,
avatarPath
:
''
,
identityNumber
:
''
,
identityFrontPath
:
''
,
identityBackPath
:
''
,
certificatePhotoPath
:
''
,
certificateValidityDate
:
null
,
workUnit
:
''
,
address
:
''
,
},
questionWarehouseId
:
{
id
:
'1414854649273384960'
,
createTime
:
'2021-07-13 15:50:10'
,
createdBy
:
'1413688964405002240'
,
updateTime
:
'2021-07-22 19:21:00'
,
updatedBy
:
'1413688964405002240'
,
echoMap
:
{},
institutionId
:
'1'
,
subjectId
:
'1418169087225233408'
,
title
:
'测试题库'
,
subtitle
:
'大狼狗'
,
description
:
'sad'
,
effectiveTime
:
'0'
,
provinceId
:
'470715'
,
cityId
:
'475286'
,
type
:
'1'
,
price
:
'100.00'
,
realPrice
:
'60.00'
,
state
:
true
,
remark
:
''
,
version
:
'0'
,
},
cardId
:
{
id
:
'1416278788987158528'
,
createTime
:
'2021-07-17 14:09:11'
,
createdBy
:
'1410776147574128640'
,
updateTime
:
'2021-07-17 14:09:11'
,
updatedBy
:
'1410776147574128640'
,
echoMap
:
{},
unitPrice
:
null
,
buyTime
:
null
,
subjectNames
:
null
,
instrtutionId
:
'1'
,
studentId
:
null
,
questionWarehouseId
:
'1'
,
cardType
:
'02'
,
cardNumber
:
'621001200010719'
,
cardSecret
:
'9923sibv'
,
cardStatus
:
5
,
isEnable
:
1
,
effectiveDay
:
30
,
bindingTime
:
null
,
activationTime
:
null
,
sourceType
:
{
code
:
'INSTRTUTION_SEND'
,
desc
:
'机构发卡'
,
},
sourceOrderId
:
'1416278788521590784'
,
},
},
questionWarehouseId
:
'1414854649273384960'
,
studentId
:
'1414459877807357952'
,
cardId
:
'1416278788987158528'
,
},
{
id
:
'1415602594134360064'
,
createTime
:
'2021-07-15 17:41:51'
,
createdBy
:
'1415215255998431232'
,
updateTime
:
'2021-07-15 17:41:51'
,
updatedBy
:
null
,
echoMap
:
{
studentId
:
{
id
:
'1414459877807357952'
,
createTime
:
'2021-07-12 13:41:29'
,
createdBy
:
'3'
,
updateTime
:
'2021-07-20 20:41:13'
,
updatedBy
:
'1414459877807357952'
,
echoMap
:
{},
cardCount
:
null
,
consumeAmount
:
null
,
loginTime
:
null
,
unionid
:
''
,
nickname
:
''
,
name
:
''
,
phoneNumber
:
'11111111111'
,
avatarPath
:
''
,
identityNumber
:
''
,
identityFrontPath
:
''
,
identityBackPath
:
''
,
certificatePhotoPath
:
''
,
certificateValidityDate
:
null
,
workUnit
:
''
,
address
:
''
,
},
questionWarehouseId
:
{
id
:
'1'
,
createTime
:
'2021-07-12 16:33:20'
,
createdBy
:
null
,
updateTime
:
'2021-07-21 14:40:44'
,
updatedBy
:
'1413688964405002240'
,
echoMap
:
{},
institutionId
:
'1'
,
subjectId
:
'1413687160678121472'
,
title
:
'测试1'
,
subtitle
:
'侧首'
,
description
:
'哈哈哈哈'
,
effectiveTime
:
'1'
,
provinceId
:
'470715'
,
cityId
:
'475286'
,
type
:
'1'
,
price
:
'100.00'
,
realPrice
:
'50.00'
,
state
:
true
,
remark
:
'123231'
,
version
:
null
,
},
cardId
:
{
id
:
'1416278788987158528'
,
createTime
:
'2021-07-17 14:09:11'
,
createdBy
:
'1410776147574128640'
,
updateTime
:
'2021-07-17 14:09:11'
,
updatedBy
:
'1410776147574128640'
,
echoMap
:
{},
unitPrice
:
null
,
buyTime
:
null
,
subjectNames
:
null
,
instrtutionId
:
'1'
,
studentId
:
null
,
questionWarehouseId
:
'1'
,
cardType
:
'02'
,
cardNumber
:
'621001200010719'
,
cardSecret
:
'9923sibv'
,
cardStatus
:
15
,
isEnable
:
1
,
effectiveDay
:
30
,
bindingTime
:
null
,
activationTime
:
null
,
sourceType
:
{
code
:
'INSTRTUTION_SEND'
,
desc
:
'机构发卡'
,
},
sourceOrderId
:
'1416278788521590784'
,
},
},
questionWarehouseId
:
'1'
,
studentId
:
'1414459877807357952'
,
cardId
:
'1416278788987158528'
,
},
]
let
length
=
res
.
length
let
length
=
res
.
length
if
(
res
.
length
<=
0
)
{
if
(
res
.
length
<=
0
)
{
this
.
lists
=
[]
this
.
lists
=
[]
...
@@ -237,7 +68,6 @@ export default {
...
@@ -237,7 +68,6 @@ export default {
//绑卡或支付时间
//绑卡或支付时间
data
[
i
].
title
=
res
[
i
].
echoMap
.
questionWarehouseId
.
title
data
[
i
].
title
=
res
[
i
].
echoMap
.
questionWarehouseId
.
title
data
[
i
].
subtitle
=
res
[
i
].
echoMap
.
questionWarehouseId
.
subtitle
data
[
i
].
time
=
data
[
i
].
time
=
res
[
i
].
echoMap
.
cardId
.
bindingTime
||
res
[
i
].
echoMap
.
cardId
.
bindingTime
||
res
[
i
].
echoMap
.
cardId
.
buyTime
||
res
[
i
].
echoMap
.
cardId
.
buyTime
||
...
@@ -247,18 +77,28 @@ export default {
...
@@ -247,18 +77,28 @@ export default {
case
0
:
case
0
:
status
=
'未绑定'
status
=
'未绑定'
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
subtitle
=
'请前往绑定'
break
break
case
5
:
case
5
:
status
=
'已绑定'
status
=
'已绑定'
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
data
[
i
].
subtitle
=
'请前往首页答题联系吧'
break
break
case
10
:
case
10
:
status
=
'已激活'
status
=
'已激活'
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
data
[
i
].
statusStyle
=
{
color
:
'#2953FF'
}
let
leaveDay
=
0
if
(
res
[
i
].
echoMap
.
cardId
&&
res
[
i
].
echoMap
.
cardId
.
activationTime
)
{
let
diff
=
this
.
datedifference
(
sDate1
,
sDate2
)
leaveDay
=
res
[
i
].
echoMap
.
cardId
.
effectiveDay
-
diff
leaveDay
=
leaveDay
>
0
?
leaveDay
:
0
}
data
[
i
].
subtitle
=
'题库将于'
+
leaveDay
+
'天后到期'
break
break
case
15
:
case
15
:
status
=
'已失效'
status
=
'已失效'
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
statusStyle
=
{
color
:
'#9EA5BB'
}
data
[
i
].
subtitle
=
'题库已失效'
break
break
default
:
default
:
break
break
...
@@ -266,9 +106,21 @@ export default {
...
@@ -266,9 +106,21 @@ export default {
data
[
i
].
status
=
status
data
[
i
].
status
=
status
}
}
this
.
lists
=
data
this
.
lists
=
data
console
.
log
(
data
)
console
.
log
(
'tiku data'
,
data
)
})
})
},
},
methods
:
{
datedifference
(
sDate1
,
sDate2
)
{
//2021-01-01,2020-02-01,31
var
dateSpan
,
tempDate
,
iDays
sDate1
=
Date
.
parse
(
sDate1
)
sDate2
=
Date
.
parse
(
sDate2
)
dateSpan
=
sDate2
-
sDate1
dateSpan
=
Math
.
abs
(
dateSpan
)
iDays
=
Math
.
floor
(
dateSpan
/
(
24
*
3600
*
1000
))
return
iDays
},
},
}
}
</
script
>
</
script
>
...
...
src/pages/mine/certify.vue
View file @
8b9a0d18
...
@@ -150,15 +150,16 @@ export default {
...
@@ -150,15 +150,16 @@ export default {
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
this
.
student
.
identityFrontPath
=
res
.
key
this
.
student
.
identityFrontPath
=
res
.
key
this
.
$u
.
api
this
.
$u
.
api
.
checkIdCardFront
({
id_card_front
:
res
.
key
})
.
getCertifyInfoByType
(
'front'
,
{
.
then
(()
=>
{})
url
:
process
.
uniEnv
.
qn_asset_url
+
res
.
key
,
})
.
then
((
res
)
=>
{
console
.
log
(
'识别结果'
,
res
)
this
.
student
.
name
=
res
.
name
this
.
student
.
identityNumber
=
res
.
number
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
if
(
data
.
errMsg
==
'request:ok'
)
{
this
.
student
.
name
=
data
.
data
.
id_card_name
this
.
student
.
identityNumber
=
data
.
data
.
id_card_number
}
else
{
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$u
.
toast
(
'识别身份证信息错误'
)
}
})
})
})
})
},
},
...
@@ -167,14 +168,15 @@ export default {
...
@@ -167,14 +168,15 @@ export default {
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
upload
.
getPhoto
(
1
,
this
.
token
).
then
((
res
)
=>
{
this
.
student
.
identityBackPath
=
res
.
key
this
.
student
.
identityBackPath
=
res
.
key
this
.
$u
.
api
this
.
$u
.
api
.
checkIdCardBack
({
id_card_back
:
res
.
key
})
.
getCertifyInfoByType
(
'back'
,
{
.
then
(()
=>
{})
url
:
process
.
uniEnv
.
qn_asset_url
+
res
.
key
,
})
.
then
((
res
)
=>
{
console
.
log
(
'识别结果'
,
res
)
this
.
student
.
certificateValidityDate
=
res
.
expire
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
if
(
data
.
errMsg
==
'request:ok'
)
{
this
.
student
.
certificateValidityDate
=
data
.
data
.
id_card_expire
}
else
{
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$u
.
toast
(
'识别身份证信息错误'
)
}
})
})
})
})
},
},
...
...
src/pages/mine/company.vue
View file @
8b9a0d18
...
@@ -47,10 +47,6 @@ export default {
...
@@ -47,10 +47,6 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
if
(
this
.
student
.
workUnit
==
''
)
{
this
.
$u
.
toast
(
'请输入工作单位名称'
)
return
}
this
.
$u
.
api
this
.
$u
.
api
.
updateUserInfo
({
.
updateUserInfo
({
workUnit
:
this
.
student
.
workUnit
,
workUnit
:
this
.
student
.
workUnit
,
...
...
src/pages/mine/info.vue
View file @
8b9a0d18
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
>
>
<view
slot=
"right-icon"
>
<view
slot=
"right-icon"
>
<u-image
<u-image
v-if=
"
isupLo
adCertPhoto"
v-if=
"
he
adCertPhoto"
width=
"92rpx"
width=
"92rpx"
height=
"120rpx"
height=
"120rpx"
:src=
"headCertPhoto"
:src=
"headCertPhoto"
...
@@ -82,7 +82,9 @@ import login from '@/common/login'
...
@@ -82,7 +82,9 @@ import login from '@/common/login'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
student
:
{},
student
:
{
isCertify
:
false
,
},
token
:
null
,
token
:
null
,
code
:
''
,
code
:
''
,
}
}
...
@@ -94,13 +96,11 @@ export default {
...
@@ -94,13 +96,11 @@ export default {
)
)
},
},
headCertPhoto
()
{
headCertPhoto
()
{
return
(
console
.
log
(
(
this
.
student
&&
this
.
student
.
certificatePhotoPath
)
||
'touxiang bianle'
,
process
.
uniEnv
.
qn_base_url
+
'xitongtouxiang.p
ng'
this
.
student
?
this
.
student
.
certificatePhotoPath
:
'ko
ng'
)
)
},
return
(
this
.
student
&&
this
.
student
.
certificatePhotoPath
)
||
false
isupLoadCertPhoto
()
{
return
(
this
.
student
&&
this
.
student
.
identityNumber
)
||
false
},
},
getMobile
()
{
getMobile
()
{
return
(
return
(
...
@@ -115,20 +115,24 @@ export default {
...
@@ -115,20 +115,24 @@ export default {
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
'去填写'
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
'去填写'
},
},
getCertifyStatus
()
{
getCertifyStatus
()
{
return
this
.
student
&&
this
.
student
.
isCertify
?
'已认证'
:
'去认证'
console
.
log
(
'is cert'
,
this
.
student
.
isCertify
)
return
this
.
student
.
isCertify
?
'已认证'
:
'去认证'
},
},
},
},
onLoad
()
{
onLoad
()
{
this
.
$u
.
api
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'banshou-userprofile'
})
.
getQiNiuToken
({
bucketName
:
'banshou-userprofile'
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
token
=
data
.
data
.
token
//token为七牛云的token一般由后台接口提供
console
.
log
(
'chushihua token'
,
res
)
getApp
().
globalData
.
qiNiuToken
=
data
.
data
.
token
this
.
token
=
res
//token为七牛云的token一般由后台接口提供
getApp
().
globalData
.
qiNiuToken
=
res
})
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
if
(
res
&&
res
.
identityNumber
)
{
console
.
log
(
'huoqu userinfo'
,
res
)
this
.
student
.
isCertify
=
true
res
.
isCertify
=
}
res
&&
res
.
identityNumber
&&
res
.
identityNumber
.
length
>
5
?
true
:
false
this
.
student
=
res
this
.
student
=
res
})
})
},
},
...
...
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