Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
2a24d8e8
Commit
2a24d8e8
authored
Aug 13, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ca5477bc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
222 additions
and
123 deletions
+222
-123
index.js
src/api/index.js
+1
-1
contract.vue
src/pages/contract/contract.vue
+12
-5
askForLeave.vue
src/pages/course/askForLeave.vue
+139
-63
course.vue
src/pages/course/course.vue
+4
-2
timeTable-item.vue
src/pages/course/timeTable-item.vue
+4
-2
index.vue
src/pages/index/index.vue
+9
-8
progress.vue
src/pages/progress/progress.vue
+4
-33
surplusTime.vue
src/pages/surplusTime/surplusTime.vue
+6
-4
index.js
src/utils/index.js
+43
-5
No files found.
src/api/index.js
View file @
2a24d8e8
...
...
@@ -90,7 +90,7 @@ export function getStundentSurplus(data) {
*/
export
function
setStudentLeave
(
data
)
{
return
request
({
url
:
'/
AppletIndex
/SetStudentLeave'
,
url
:
'/
LeaveStudent
/SetStudentLeave'
,
method
:
'post'
,
data
})
...
...
src/pages/contract/contract.vue
View file @
2a24d8e8
...
...
@@ -8,17 +8,23 @@
width=
"58rpx"
height=
"66rpx"
fit=
"cover"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon
2
.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon
5
.png"
/>
</view>
<view
class=
"top-right flex_grow"
>
<view
class=
"course-name"
>
合同
</view>
<view
class=
"course-name"
>
{{
CourseName
}}
</view>
<view
class=
"section-name"
>
{{
data
.
length
}}
个合同
</view>
</view>
</view>
<view
v-for=
"(item, index) in data"
:key=
"index"
class=
"data-item"
>
<view
class=
"contract-name"
><van-icon
name=
"description"
style=
"margin-right: 10rpx"
/>
<view
class=
"contract-name"
>
<van-image
width=
"22rpx"
height=
"24rpx"
fit=
"cover"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/contracticon.png"
style=
"margin-right: 10rpx"
/>
{{
item
.
ContractNo
}}
</view
>
<view
class=
"contract-con"
v-if=
"item.Type === 1"
>
订单合同
</view>
...
...
@@ -48,16 +54,17 @@ import {
onMounted
,
}
from
"vue"
;
import
{
getContract
}
from
"../../api/index"
;
let
{
CourseName
}
=
uni
.
getStorageSync
(
"indexData"
);
export
default
{
setup
()
{
let
data
=
reactive
({
pageloading
:
false
,
CourseName
,
data
:
[],
});
let
methods
=
{
async
getdata
()
{
let
res
=
await
getContract
({});
if
(
res
)
{
if
(
res
.
Data
.
length
===
0
)
{
data
.
pageloading
=
true
;
...
...
src/pages/course/askForLeave.vue
View file @
2a24d8e8
This diff is collapsed.
Click to expand it.
src/pages/course/course.vue
View file @
2a24d8e8
...
...
@@ -11,8 +11,8 @@
/>
</view>
<view
class=
"top-right flex_grow"
>
<view
class=
"course-name"
>
0到N3直通车(公司内部班)
</view>
<view
class=
"section-name"
>
下面内容
章节
</view>
<view
class=
"course-name"
>
{{
CourseName
}}
</view>
<view
class=
"section-name"
>
{{
data
.
length
}}
个
章节
</view>
</view>
</view>
<view
v-for=
"(item, index) in data"
:key=
"index"
>
...
...
@@ -64,6 +64,7 @@ import {
inject
,
}
from
"vue"
;
import
{
getCourse
}
from
"../../api/index"
;
let
{
CourseName
}
=
uni
.
getStorageSync
(
"indexData"
);
export
default
{
setup
()
{
let
data
=
reactive
({
...
...
@@ -71,6 +72,7 @@ export default {
msg
:
{
CourseId
:
0
,
},
CourseName
,
});
let
methods
=
{
jumpPage
(
item
)
{
...
...
src/pages/course/timeTable-item.vue
View file @
2a24d8e8
...
...
@@ -43,8 +43,11 @@
<van-button
custom-class=
"already-leave-btn one_line"
v-if=
"item.IsLeave === 0"
>
已请假
</van-button
>
<view
v-if=
"item.IsCheck === -1"
>
去上课
</view>
<view
v-if=
"item.IsCheck === 0"
>
正常
</view>
<view
v-if=
"item.IsCheck === 1"
>
缺勤
</view>
</van-button>
</view>
</view>
</view>
...
...
@@ -73,7 +76,6 @@ export default {
});
},
};
console
.
log
(
57
,
props
);
return
{
...
toRefs
(
props
),
...
methods
,
...
...
src/pages/index/index.vue
View file @
2a24d8e8
...
...
@@ -172,14 +172,14 @@ export default {
{
name
:
"电子合同"
,
desc
:
"5个"
,
img
:
"https://
img.yzcdn.cn/vant/cat.jpe
g"
,
img
:
"https://
viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon5.pn
g"
,
bgcolor
:
"#D9FAF1"
,
jumpUrl
:
"/pages/contract/contract"
,
},
{
name
:
"我的老师"
,
desc
:
"李琴"
,
img
:
"https://
img.yzcdn.cn/vant/cat.jpe
g"
,
img
:
"https://
viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon6.pn
g"
,
bgcolor
:
"#FFE7E6"
,
jumpUrl
:
""
,
},
...
...
@@ -235,9 +235,7 @@ export default {
getSystemInfo
((
res
)
=>
{
data
.
statusBarHeight
=
res
.
statusBarHeight
;
});
data
.
userinfo
=
uni
.
getStorageSync
(
"userInfo"
);
console
.
log
(
"tag"
,
data
.
userinfo
);
data
.
userinfo
.
EnterPhone2
=
desensitization
(
data
.
userinfo
.
EnterPhone
,
3
,
...
...
@@ -358,17 +356,20 @@ export default {
.timetable
{
height
:
360
rpx
;
background-image
:
linear-gradient
(
0deg
,
#ffffff
,
#00adfd
);
background-image
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coursebg.png")
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
center
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
box-sizing
:
border-box
;
padding
:
3
3
rpx
30
rpx
0
50
rpx
;
padding
:
3
0
rpx
30
rpx
0
50
rpx
;
margin-bottom
:
50
rpx
;
}
.timetable_item
{
color
:
#fff
;
margin-bottom
:
2
5
rpx
;
margin-bottom
:
2
0
rpx
;
}
.timetable_title
{
...
...
@@ -385,7 +386,7 @@ export default {
.timetable_item2
{
color
:
#fff
;
margin-bottom
:
2
5
rpx
;
margin-bottom
:
2
0
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
...
...
src/pages/progress/progress.vue
View file @
2a24d8e8
...
...
@@ -11,8 +11,8 @@
/>
</view>
<view
class=
"top-right flex_grow"
>
<view
class=
"course-name"
>
0到N3直通车(公司内部班)
</view>
<view
class=
"section-name"
>
下面内容
章节
</view>
<view
class=
"course-name"
>
{{
CourseName
}}
</view>
<view
class=
"section-name"
>
{{
data
.
length
}}
个
章节
</view>
</view>
</view>
<view
v-for=
"(item, index) in data"
:key=
"index"
>
...
...
@@ -44,37 +44,6 @@
</view>
</view>
</view>
<!-- 章节内容 -->
<!--
<van-overlay
:show=
"showLayer"
>
<view
class=
"wrapper"
>
<view
class=
"info"
>
<view
class=
"info-top flex flex_start_center"
>
<view
class=
"left-icon"
></view>
<view
class=
"wrapper-title"
>
第一次课 五十音图
</view>
</view>
<view
class=
"info-main"
>
<view
class=
"flex flex flex_start_center wrapper-section"
>
<view
class=
"left-bot"
></view>
章节学习内容
</view>
<view
class=
"info-con"
>
1、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
2、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
3、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
4、章节学习的具体内容,比如活动篇什
么什么,理解篇什么什么,语法什么。
</view>
<view
class=
"Know-btn flex flex_center_center"
@
click=
"closeLayer"
>
我知道了
</view>
</view>
</view>
</view>
</van-overlay>
-->
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
...
...
@@ -91,6 +60,7 @@ import {
onMounted
,
}
from
"vue"
;
import
{
getProgress
}
from
"../../api/index"
;
let
{
CourseName
}
=
uni
.
getStorageSync
(
"indexData"
);
export
default
{
setup
()
{
let
data
=
reactive
({
...
...
@@ -112,6 +82,7 @@ export default {
],
},
],
CourseName
,
});
let
methods
=
{
openLayer
()
{
...
...
src/pages/surplusTime/surplusTime.vue
View file @
2a24d8e8
...
...
@@ -11,8 +11,8 @@
/>
</view>
<view
class=
"top-right flex_grow"
>
<view
class=
"course-name"
>
0到N3直通车(公司内部班)
</view>
<view
class=
"section-name"
>
下面内容章节
</view>
<view
class=
"course-name"
>
{{
CourseName
}}
</view>
<view
class=
"section-name"
>
{{
SurplusHours
}}
课时
</view>
</view>
</view>
<van-empty
description=
"暂无内容"
v-if=
"data.length === 0"
/>
...
...
@@ -31,10 +31,9 @@
width=
"18rpx"
height=
"22rpx"
fit=
"cover"
:src=
"item.UserIcon
"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/user.png
"
style=
"margin-right: 10rpx"
/>
<!-- https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/user.png -->
<text
class=
"mr-30 teacherName"
>
{{
item
.
TeacherName
}}
</text>
<van-image
width=
"24rpx"
...
...
@@ -77,10 +76,13 @@ import {
onMounted
,
}
from
"vue"
;
import
{
getStundentSurplus
}
from
"../../api/index"
;
let
{
CourseName
,
SurplusHours
}
=
uni
.
getStorageSync
(
"indexData"
);
export
default
{
setup
()
{
let
data
=
reactive
({
showLayer
:
false
,
CourseName
,
SurplusHours
,
msg
:
{
ClassId
:
0
},
data
:
[],
});
...
...
src/utils/index.js
View file @
2a24d8e8
...
...
@@ -9,16 +9,54 @@ export let getSystemInfo = (callback) => {
//脱敏
export
let
desensitization
=
(
str
,
beginLen
,
endLen
)
=>
{
let
len
=
str
.
length
;
let
firstStr
=
str
.
substr
(
0
,
beginLen
);
let
lastStr
=
str
.
substr
(
endLen
);
let
middleStr
=
str
.
substring
(
beginLen
,
len
-
Math
.
abs
(
endLen
)).
replace
(
/
[\s\S]
/ig
,
'*'
);
let
tempStr
=
firstStr
+
middleStr
+
lastStr
;
return
tempStr
;
}
export
let
upload
=
(
file
,
successCallback
)
=>
{
let
{
UploadConfig
}
=
uni
.
getStorageSync
(
'userInfo'
)
for
(
let
i
=
0
;
i
<
file
.
length
;
i
++
)
{
urlTobase64
(
file
[
i
].
url
,
(
base64Str
)
=>
{
console
.
log
(
23
,
base64Str
)
uni
.
uploadFile
({
url
:
UploadConfig
.
UploadDomain
+
"/UploadBase64"
,
filePath
:
base64Str
,
name
:
'myfile'
,
success
(
res
)
{
successCallback
(
res
.
data
)
},
fail
(
err
)
{
console
.
log
(
"uploadErr"
,
err
)
}
});
})
}
}
// let strTobase64 = (str) => {
// var buf = new ArrayBuffer(str.length * 2);
// var bufView = new Uint16Array(buf);
// for (var i = 0, strlen = str.length; i < strlen; i++) {
// bufView[i] = str.charCodeAt(i);
// }
// var base64 = uni.arrayBufferToBase64(buf);
// base64 = 'data:image/jpeg;base64,' + base64;
// return base64;
// }
let
urlTobase64
=
(
file
,
suc
)
=>
{
uni
.
getFileSystemManager
().
readFile
({
filePath
:
file
,
//选择图片返回的相对路径
encoding
:
'base64'
,
//编码格式
success
:
(
res
)
=>
{
//成功的回调
let
data
=
res
.
data
;
let
base64
=
'data:image/png;base64,'
+
data
suc
(
base64
);
}
});
}
\ No newline at end of file
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