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
4448f3e5
Commit
4448f3e5
authored
Sep 23, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
feeaf823
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
734 additions
and
684 deletions
+734
-684
index.vue
src/pages/index/index.vue
+733
-683
requestMall.js
src/utils/requestMall.js
+1
-1
No files found.
src/pages/index/index.vue
View file @
4448f3e5
<
template
>
<
template
>
<view
class=
"page-box"
>
<view
class=
"page-box"
>
<van-nav-bar
:border=
"fasle"
fixed
:z-index=
"99"
>
<van-nav-bar
:border=
"fasle"
fixed
:z-index=
"99"
>
<view
slot=
"left"
class=
"page-title"
title=
"shouye"
>
首页
</view>
<view
slot=
"left"
class=
"page-title"
title=
"shouye"
>
首页
</view>
</van-nav-bar>
</van-nav-bar>
<view
class=
"con"
:style=
"
{ 'padding-top': `${statusBarHeight}px` }">
<view
class=
"con"
:style=
"
{ 'padding-top': `${statusBarHeight}px` }">
<view
style=
"height: 100rpx"
></view>
<view
style=
"height: 100rpx"
></view>
<view
class=
"personInfo flex flex_start_center"
>
<view
class=
"personInfo flex flex_start_center"
>
<van-image
<van-image
round
width=
"100rpx"
height=
"100rpx"
fit=
"cover"
round
:src=
"userinfo.UserIcon ? userinfo.UserIcon : userinfo.GroupLogo"
class=
"headimg"
width=
"100rpx"
@
click=
"jumpPage('/pages/login/login')"
/>
height=
"100rpx"
<view
class=
"grow"
>
fit=
"cover"
<view
class=
"name"
>
{{
userinfo
.
AccountName
}}
</view>
:src=
"userinfo.UserIcon ? userinfo.UserIcon : userinfo.GroupLogo"
<view
class=
"phone"
>
class=
"headimg"
{{
userinfo
.
Account
}}
@
click=
"jumpPage('/pages/login/login')"
</view>
/>
</view>
<view
class=
"grow"
>
<view
class=
"saleInfo"
>
<view
class=
"name"
>
{{
userinfo
.
AccountName
}}
</view>
<view
class=
"info1"
>
<view
class=
"phone"
>
<van-icon
name=
"contact"
size=
"23rpx"
style=
"margin-right: 10rpx"
/>
服务人员
{{
userinfo
.
Account
}}
</view>
</view>
<view
class=
"info2 one_line"
>
</view>
<text
style=
"margin-right: 10rpx"
>
课程顾问
</text>
{{
userinfo
.
EnterPhone2
}}
<view
class=
"saleInfo"
>
</view>
<view
class=
"info1"
>
</view>
<van-icon
</view>
name=
"contact"
<view
class=
"baseInfo flex flex_wrap"
>
size=
"23rpx"
<view
class=
"baseInfo_item flex flex_between_center"
v-for=
"(item, index) in baseInfo"
:key=
"index"
style=
"margin-right: 10rpx"
:style=
"
{ 'background-color': item.bgcolor }" @click="jumpPage(item.jumpUrl)">
/>
服务人员
</view
<view
style=
"height: 100%; max-width: 120rpx"
>
>
<view
class=
"baseInfo_name"
>
<view
class=
"info2 one_line"
>
{{
item
.
name
}}
<text
style=
"margin-right: 10rpx"
>
课程顾问
</text
</view>
>
{{
userinfo
.
EnterPhone2
}}
</view
<view
class=
"baseInfo_desc one_line"
:title=
"item.desc"
>
>
{{
item
.
desc
}}
</view>
</view>
</view>
</view>
<view
class=
"baseInfo flex flex_wrap"
>
<van-image
width=
"58rpx"
height=
"66rpx"
fit=
"cover"
:src=
"item.img"
/>
<view
</view>
class=
"baseInfo_item flex flex_between_center"
</view>
v-for=
"(item, index) in baseInfo"
<view
class=
"LearningGarden flex flex_wrap"
>
:key=
"index"
<view
v-for=
"(item, index) in learnList"
:key=
"index"
class=
"LearningGarden-item"
:style=
"
{ 'background-color': item.bgcolor }"
:style=
"
{ backgroundColor: item.bgcolor }" @click="jumpPage(item.jumpUrl)">
@click="jumpPage(item.jumpUrl)"
<view
class=
"LearningGarden-item-name"
>
{{
item
.
name
}}
</view>
>
<view
class=
"LearningGarden-item-desc"
>
{{
item
.
desc
}}
</view>
<view
style=
"height: 100%; max-width: 120rpx"
>
<image
:src=
"item.img"
class=
"LearningGarden-item-img"
/>
<view
class=
"baseInfo_name"
>
</view>
{{
item
.
name
}}
</view>
</view>
<view
class=
"title"
v-if=
"data.indexData.FeedBackList[0].length > 0"
>
<view
class=
"baseInfo_desc one_line"
:title=
"item.desc"
>
课程反馈
{{
item
.
desc
}}
</view>
</view>
<view
class=
"feedback"
v-if=
"data.indexData.FeedBackList[0].length > 0"
>
</view>
<view
class=
"feedback-info flex flex_start_center"
>
<van-image
width=
"58rpx"
height=
"66rpx"
fit=
"cover"
:src=
"item.img"
/>
<image
src=
""
class=
"info-headimg"
/>
</view>
<view
class=
"grow"
>
</view>
<view
class=
"teacher-name"
>
{{
<view
class=
"LearningGarden flex flex_wrap"
>
data
.
indexData
.
FeedBackList
[
0
].
TeacherName
<view
}}
</view>
v-for=
"(item, index) in learnList"
<view
class=
"rate"
>
:key=
"index"
<van-rate
:value=
"data.indexData.FeedBackList[0].Score"
class=
"LearningGarden-item"
:count=
"data.indexData.FeedBackList[0].Score"
:style=
"
{ backgroundColor: item.bgcolor }"
icon=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/rate.png"
@click="jumpPage(item.jumpUrl)"
void-icon=
""
size=
"24rpx"
/>
>
</view>
<view
class=
"LearningGarden-item-name"
>
{{
item
.
name
}}
</view>
</view>
<view
class=
"LearningGarden-item-desc"
>
{{
item
.
desc
}}
</view>
<view
class=
"feedback-all"
@
click=
"jumpPage('/pages/course/feedback')"
>
<image
:src=
"item.img"
class=
"LearningGarden-item-img"
/>
全部
</view>
<van-icon
name=
"arrow"
style=
"margin-left: 30rpx"
/>
</view>
</view>
<view
class=
"timetable"
>
</view>
<view
class=
"timetable_item flex flex_between_center"
>
<view
class=
"two_line feedback-text"
>
<text
class=
"timetable_title"
>
我的课表
</text>
{{
data
.
indexData
.
FeedBackList
[
0
].
Comment
}}
<view
</view>
class=
"timetable_btn"
<view
class=
"flex"
>
@
click=
"
<view
v-for=
"(item, index) in data.indexData.FeedBackList[0].PhotoList"
:key=
"index"
>
<image
:src=
"item"
class=
"feedback-img"
v-if=
"index === 0 || index === 1 || index === 2"
>
</image>
<view
class=
"layer flex flex_center_center"
v-if=
"item.PhotoList.length > 3 && index === 2"
>
+
{{
item
.
PhotoList
.
length
-
3
}}
</view>
</view>
</view>
</view>
<view
class=
"activeContent"
>
<swiper
class=
"swiper"
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
indicator-color=
"#CCCCCC"
indicator-active-color=
"#000000"
:vertical=
"true"
>
<swiper-item
v-for=
"(item,index) in ActivityList"
:key=
"index"
>
<view
class=
"swiperList"
:style=
"
{'background-image': item.CoverImg? `url(${item.CoverImg})`
: `url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/defaultBgimg.png)`}">
<view
class=
"swiper_Time"
>
{{
item
.
BMStart
}}
</view>
<view
class=
"swiper_Name"
>
{{
item
.
ActivityName
}}
</view>
</view>
</swiper-item>
</swiper>
</view>
<view
class=
"timetable"
>
<view
class=
"timetable_item flex flex_between_center"
>
<text
class=
"timetable_title"
>
我的课表
</text>
<view
class=
"timetable_btn"
@
click=
"
jumpPage(`/pages/course/timeTable?classId=$
{indexData.ClassId}`)
jumpPage(`/pages/course/timeTable?classId=$
{indexData.ClassId}`)
"
" v-if="indexData.ClassPlan.TimeStart">
v-if="indexData.ClassPlan.TimeStart"
全部
>
<van-icon
name=
"arrow"
style=
"margin-left: 30rpx"
/>
全部
</view>
<van-icon
name=
"arrow"
style=
"margin-left: 30rpx"
/>
</view>
</view>
<view
class=
"timetable_item2"
>
</view>
日期:
<view
class=
"timetable_item2"
>
<text
v-if=
"indexData.ClassPlan.NewPlanDateTimeStr"
>
{{
日期:
<text
v-if=
"indexData.ClassPlan.NewPlanDateTimeStr"
>
{{
indexData
.
ClassPlan
.
NewPlanDateTimeStr
indexData
.
ClassPlan
.
NewPlanDateTimeStr
}}
</text>
}}
</text>
<text
v-else
>
暂无
</text>
<text
v-else
>
暂无
</text>
</view>
</view>
<view
class=
"timetable_item2"
>
<view
class=
"timetable_item2"
>
时间:
时间:
<text
v-if=
"indexData.ClassPlan.TimeStr"
>
{{
<text
v-if=
"indexData.ClassPlan.TimeStr"
>
{{
indexData
.
ClassPlan
.
TimeStr
indexData
.
ClassPlan
.
TimeStr
}}
</text>
}}
</text>
<text
v-else
>
暂无
</text>
<text
v-else
>
暂无
</text>
</view>
</view>
<view
class=
"timetable_item2"
>
<view
class=
"timetable_item2"
>
老师:
老师:
<text
v-if=
"indexData.ClassPlan.TeacherName"
>
{{
<text
v-if=
"indexData.ClassPlan.TeacherName"
>
{{
indexData
.
ClassPlan
.
TeacherName
indexData
.
ClassPlan
.
TeacherName
}}
</text>
}}
</text>
<text
v-else
>
暂无
</text>
<text
v-else
>
暂无
</text>
</view>
</view>
<view
class=
"timetable_item2"
>
<view
class=
"timetable_item2"
>
状态:
状态:
<text
v-if=
"indexData.ClassPlan.TimeStatusStr === 0"
>
待上课
</text>
<text
v-if=
"indexData.ClassPlan.TimeStatusStr === 0"
>
待上课
</text>
<text
v-if=
"indexData.ClassPlan.TimeStatusStr === 1"
>
上课中
</text>
<text
v-if=
"indexData.ClassPlan.TimeStatusStr === 1"
>
上课中
</text>
<text
v-if=
"indexData.ClassPlan.TimeStatusStr === 2"
>
下课
</text>
<text
v-if=
"indexData.ClassPlan.TimeStatusStr === 2"
>
下课
</text>
</view>
</view>
</view>
</view>
<view
class=
"title"
v-if=
"data.indexData.FeedBackList[0].length > 0"
>
<van-cell-group
:border=
"false"
>
课程反馈
<van-cell
title=
"我的考试"
title-class=
"title"
:border=
"false"
>
</view>
<view
class=
"value"
@
click=
"
<view
class=
"feedback"
v-if=
"data.indexData.FeedBackList[0].length > 0"
>
<view
class=
"feedback-info flex flex_start_center"
>
<image
src=
""
class=
"info-headimg"
/>
<view
class=
"grow"
>
<view
class=
"teacher-name"
>
{{
data
.
indexData
.
FeedBackList
[
0
].
TeacherName
}}
</view>
<view
class=
"rate"
>
<van-rate
:value=
"data.indexData.FeedBackList[0].Score"
:count=
"data.indexData.FeedBackList[0].Score"
icon=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/rate.png"
void-icon=
""
size=
"24rpx"
/>
</view>
</view>
<view
class=
"feedback-all"
@
click=
"jumpPage('/pages/course/feedback')"
>
全部
<van-icon
name=
"arrow"
style=
"margin-left: 30rpx"
/>
</view>
</view>
<view
class=
"two_line feedback-text"
>
{{
data
.
indexData
.
FeedBackList
[
0
].
Comment
}}
</view
>
<view
class=
"flex"
>
<view
v-for=
"(item, index) in data.indexData.FeedBackList[0].PhotoList"
:key=
"index"
>
<image
:src=
"item"
class=
"feedback-img"
v-if=
"index === 0 || index === 1 || index === 2"
></image>
<view
class=
"layer flex flex_center_center"
v-if=
"item.PhotoList.length > 3 && index === 2"
>
+
{{
item
.
PhotoList
.
length
-
3
}}
</view
>
</view>
</view>
</view>
<van-cell-group
:border=
"false"
>
<van-cell
title=
"我的考试"
title-class=
"title"
:border=
"false"
>
<view
class=
"value"
@
click=
"
jumpPage(`/pages/exam/examPaperList?Id=$
{indexData.GuestId}`)
jumpPage(`/pages/exam/examPaperList?Id=$
{indexData.GuestId}`)
"
">
>
查看更多
查看更多
</view>
</view>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
<view
v-if=
"indexData.paperList.length == 0"
>
<view
v-if=
"indexData.paperList.length == 0"
<van-empty
description=
"暂无数据"
/>
><van-empty
description=
"暂无数据"
</view>
/></view>
<view
class=
"mytest flex"
v-if=
"indexData.paperList.length > 0"
>
<view
class=
"mytest flex"
v-if=
"indexData.paperList.length > 0"
>
<view
v-for=
"(item, index) in indexData.paperList"
:key=
"index"
class=
"test-item no_shrink"
:style=
"
{
<view
v-for=
"(item, index) in indexData.paperList"
:key=
"index"
class=
"test-item no_shrink"
:style=
"
{
'background-image': item.PicList[0]
'background-image': item.PicList[0]
? `url(${item.PicList[0]})`
? `url(${item.PicList[0]})`
: `url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/defaultBgimg.png)`,
: `url(https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/defaultBgimg.png)`,
}"
}" @click="getItemStatus(item)">
@click="getItemStatus(item)"
<view
class=
"testName"
>
>
{{
item
.
PaperName
}}
<view
class=
"testName"
>
</view>
{{
item
.
PaperName
}}
<view
class=
"testTime"
>
考试时间:
{{
item
.
ExamStartTime
}}
</view>
</view>
<view
class=
"teacherInfo-bg"
></view>
<view
class=
"testTime"
>
考试时间:
{{
item
.
ExamStartTime
}}
</view>
<view
class=
"teacherInfo flex flex_between_center"
>
<view
class=
"teacherInfo-bg"
></view>
<view
class=
"flex flex_start_center"
>
<view
class=
"teacherInfo flex flex_between_center"
>
<!--
<van-image
<view
class=
"flex flex_start_center"
>
<!--
<van-image
round
round
width=
"45rpx"
width=
"45rpx"
height=
"45rpx"
height=
"45rpx"
...
@@ -199,515 +162,602 @@
...
@@ -199,515 +162,602 @@
src=
"https://img.yzcdn.cn/vant/cat.jpeg"
src=
"https://img.yzcdn.cn/vant/cat.jpeg"
/>
/>
<view
class=
"teacherName"
>
{{
indexData
.
TeacherName
}}
</view>
-->
<view
class=
"teacherName"
>
{{
indexData
.
TeacherName
}}
</view>
-->
</view>
</view>
<view
<view
class=
"test-status"
:class=
"
{
class=
"test-status"
:class=
"
{
'status-blue': item.ExamStatusStr == '未开始',
'status-blue': item.ExamStatusStr == '未开始',
'status-green': item.ExamStatusStr == '已开始',
'status-green': item.ExamStatusStr == '已开始',
'status-black': item.ExamStatusStr == '完成',
'status-black': item.ExamStatusStr == '完成',
'status-red': item.ExamStatusStr == '缺考',
'status-red': item.ExamStatusStr == '缺考',
}"
}">
>
{{
item
.
ExamStatusStr
}}
{{
item
.
ExamStatusStr
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
toRef
,
toRef
,
getCurrentInstance
,
getCurrentInstance
,
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
provide
,
provide
,
}
from
"vue"
;
}
from
"vue"
;
import
{
getIndexInfo
}
from
"../../api/index"
;
import
{
import
{
desensitization
}
from
"../../utils/index"
;
getIndexInfo
export
default
{
}
from
"../../api/index"
;
setup
(
props
)
{
import
{
let
{
proxy
}
=
getCurrentInstance
();
getActivityList
proxy
.
$isLogin
();
}
from
"../../api/activity"
let
data
=
reactive
({
import
{
statusBarHeight
:
0
,
desensitization
userinfo
:
{},
}
from
"../../utils/index"
;
indexData
:
{},
export
default
{
baseInfo
:
[
setup
(
props
)
{
{
let
{
name
:
"学区"
,
proxy
desc
:
""
,
}
=
getCurrentInstance
();
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon2.png"
,
proxy
.
$isLogin
();
bgcolor
:
"#CCEDFE"
,
let
data
=
reactive
({
jumpUrl
:
""
,
statusBarHeight
:
0
,
},
userinfo
:
{},
{
indexData
:
{},
name
:
"课程"
,
baseInfo
:
[{
desc
:
"N1~N3"
,
name
:
"学区"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon1.png"
,
desc
:
""
,
bgcolor
:
"#DDE6FF"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon2.png"
,
jumpUrl
:
"/pages/course/course"
,
bgcolor
:
"#CCEDFE"
,
},
jumpUrl
:
""
,
{
},
name
:
"进度"
,
{
desc
:
"上到哪里了"
,
name
:
"课程"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon4.png"
,
desc
:
"N1~N3"
,
bgcolor
:
"#FFEFE4"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon1.png"
,
jumpUrl
:
`/pages/progress/progress`
,
bgcolor
:
"#DDE6FF"
,
},
jumpUrl
:
"/pages/course/course"
,
{
},
name
:
"剩余课时"
,
{
desc
:
"100"
,
name
:
"进度"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon3.png"
,
desc
:
"上到哪里了"
,
bgcolor
:
"#FFEAFE"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon4.png"
,
jumpUrl
:
`/pages/surplusTime/surplusTime`
,
bgcolor
:
"#FFEFE4"
,
},
jumpUrl
:
`/pages/progress/progress`
,
{
},
name
:
"电子合同"
,
{
desc
:
"5个"
,
name
:
"剩余课时"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon5.png"
,
desc
:
"100"
,
bgcolor
:
"#D9FAF1"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon3.png"
,
jumpUrl
:
"/pages/contract/contract"
,
bgcolor
:
"#FFEAFE"
,
},
jumpUrl
:
`/pages/surplusTime/surplusTime`
,
{
},
name
:
"我的老师"
,
{
desc
:
"李琴"
,
name
:
"电子合同"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon6.png"
,
desc
:
"5个"
,
bgcolor
:
"#FFE7E6"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon5.png"
,
jumpUrl
:
"/pages/course/askForLeaveList"
,
bgcolor
:
"#D9FAF1"
,
},
jumpUrl
:
"/pages/contract/contract"
,
],
},
// 学习园地
{
learnList
:
[
name
:
"我的老师"
,
{
desc
:
"李琴"
,
name
:
"日语学习园地"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/icon6.png"
,
desc
:
"日本語の勉強"
,
bgcolor
:
"#FFE7E6"
,
bgcolor
:
"#F6E5FE"
,
jumpUrl
:
"/pages/course/askForLeaveList"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/garden1.png"
,
},
jumpUrl
:
"/pages/learningGarden/learningGardenList"
,
],
},
// 学习园地
{
learnList
:
[{
name
:
"韩语学习园地"
,
name
:
"日语学习园地"
,
desc
:
"정원"
,
desc
:
"日本語の勉強"
,
bgcolor
:
"#FEF5D6"
,
bgcolor
:
"#F6E5FE"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/garden2.png"
,
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/garden1.png"
,
jumpUrl
:
"/pages/exam/examScore"
,
jumpUrl
:
"/pages/learningGarden/learningGardenList"
,
},
},
],
{
});
name
:
"韩语学习园地"
,
let
methods
=
{
desc
:
"정원"
,
jumpPage
(
url
)
{
bgcolor
:
"#FEF5D6"
,
uni
.
navigateTo
({
img
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/garden2.png"
,
url
:
url
,
jumpUrl
:
"/pages/exam/examScore"
,
});
},
},
],
async
getIndexdata
()
{
indicatorDots
:
true
,
//是否显示轮播指示点
let
res
=
await
getIndexInfo
();
autoplay
:
false
,
if
(
res
)
{
ActiveMsg
:
{
data
.
indexData
=
res
.
Data
;
pageIndex
:
1
,
uni
.
setStorageSync
(
"indexData"
,
res
.
Data
);
pageSize
:
10
,
data
.
baseInfo
[
0
].
desc
=
res
.
Data
.
SName
;
ActivityType
:
0
,
SelectIsEnd
:
0
,
data
.
baseInfo
[
1
].
desc
=
res
.
Data
.
CourseName
;
},
data
.
baseInfo
[
1
].
jumpUrl
=
ActivityList
:
[]
//活动数据
"/pages/course/course?id="
+
res
.
Data
.
CourseId
;
});
data
.
baseInfo
[
2
].
jumpUrl
=
let
methods
=
{
"/pages/progress/progress?id="
+
res
.
Data
.
ClassId
;
jumpPage
(
url
)
{
data
.
baseInfo
[
3
].
desc
=
res
.
Data
.
SurplusHours
+
"课时"
;
uni
.
navigateTo
({
data
.
baseInfo
[
3
].
jumpUrl
=
url
:
url
,
"/pages/surplusTime/surplusTime?id="
+
res
.
Data
.
ClassId
;
});
data
.
baseInfo
[
4
].
desc
=
res
.
Data
.
ContractNum
;
},
data
.
baseInfo
[
5
].
desc
=
res
.
Data
.
TeacherName
;
async
getIndexdata
()
{
}
let
res
=
await
getIndexInfo
();
},
if
(
res
)
{
//根据状态跳转
data
.
indexData
=
res
.
Data
;
getItemStatus
(
item
)
{
uni
.
setStorageSync
(
"indexData"
,
res
.
Data
);
//ExamStatus 1未开始 2已开始 3已考试 4缺考 5已阅卷
data
.
baseInfo
[
0
].
desc
=
res
.
Data
.
SName
;
if
(
item
.
ExamStatus
==
5
)
{
this
.
jumpPage
(
data
.
baseInfo
[
1
].
desc
=
res
.
Data
.
CourseName
;
`/pages/exam/examScore?GuestId=
${
item
.
GuestId
}
&&PaperId=
${
item
.
PaperId
}
&&Id=
${
item
.
Id
}
&&Exam_Student_Id=
${
item
.
Exam_Student_Id
}
&&ExamStatus=
${
item
.
ExamStatus
}
`
data
.
baseInfo
[
1
].
jumpUrl
=
);
"/pages/course/course?id="
+
res
.
Data
.
CourseId
;
}
else
{
data
.
baseInfo
[
2
].
jumpUrl
=
this
.
jumpPage
(
"/pages/progress/progress?id="
+
res
.
Data
.
ClassId
;
`/pages/exam/examPaper?GuestId=
${
item
.
GuestId
}
&&PaperId=
${
item
.
PaperId
}
&&Id=
${
item
.
Id
}
&&Exam_Student_Id=
${
item
.
Exam_Student_Id
}
&&ExamStatus=
${
item
.
ExamStatus
}
`
data
.
baseInfo
[
3
].
desc
=
res
.
Data
.
SurplusHours
+
"课时"
;
);
data
.
baseInfo
[
3
].
jumpUrl
=
}
"/pages/surplusTime/surplusTime?id="
+
res
.
Data
.
ClassId
;
},
data
.
baseInfo
[
4
].
desc
=
res
.
Data
.
ContractNum
;
};
data
.
baseInfo
[
5
].
desc
=
res
.
Data
.
TeacherName
;
}
onMounted
(()
=>
{
},
console
.
log
(
process
.
env
);
async
getActivityData
()
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
let
res
=
await
getActivityList
(
data
.
ActiveMsg
);
data
.
userinfo
=
uni
.
getStorageSync
(
"userInfo"
);
console
.
log
(
res
,
'数据'
);
data
.
userinfo
.
EnterPhone2
=
desensitization
(
if
(
res
.
resultCode
==
1
)
{
data
.
userinfo
.
EnterPhone
,
data
.
ActivityList
=
res
.
data
.
pageData
;
3
,
}
-
4
},
);
//根据状态跳转
});
getItemStatus
(
item
)
{
let
that
=
methods
;
//ExamStatus 1未开始 2已开始 3已考试 4缺考 5已阅卷
return
{
if
(
item
.
ExamStatus
==
5
)
{
...
toRefs
(
data
),
this
.
jumpPage
(
...
methods
,
`/pages/exam/examScore?GuestId=
${
item
.
GuestId
}
&&PaperId=
${
item
.
PaperId
}
&&Id=
${
item
.
Id
}
&&Exam_Student_Id=
${
item
.
Exam_Student_Id
}
&&ExamStatus=
${
item
.
ExamStatus
}
`
};
);
},
}
else
{
onShow
()
{
this
.
jumpPage
(
this
.
getIndexdata
();
`/pages/exam/examPaper?GuestId=
${
item
.
GuestId
}
&&PaperId=
${
item
.
PaperId
}
&&Id=
${
item
.
Id
}
&&Exam_Student_Id=
${
item
.
Exam_Student_Id
}
&&ExamStatus=
${
item
.
ExamStatus
}
`
},
);
onLoad
()
{
}
uni
.
setNavigationBarTitle
({
},
title
:
"首页"
,
};
});
},
onMounted
(()
=>
{
onShareAppMessage
()
{
console
.
log
(
process
.
env
);
return
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
title
:
"甲小鹤"
,
data
.
userinfo
=
uni
.
getStorageSync
(
"userInfo"
);
query
:
"/pages/index/index"
,
data
.
userinfo
.
EnterPhone2
=
desensitization
(
imageUrl
:
""
,
data
.
userinfo
.
EnterPhone
,
};
3
,
},
-
4
onShareTimeline
()
{
);
return
{
});
title
:
"甲小鹤"
,
let
that
=
methods
;
query
:
"/pages/index/index"
,
return
{
imageUrl
:
""
,
...
toRefs
(
data
),
};
...
methods
,
},
};
};
},
onShow
()
{
this
.
getIndexdata
();
this
.
getActivityData
();
},
onLoad
()
{
uni
.
setNavigationBarTitle
({
title
:
"首页"
,
});
},
onShareAppMessage
()
{
return
{
title
:
"甲小鹤"
,
query
:
"/pages/index/index"
,
imageUrl
:
""
,
};
},
onShareTimeline
()
{
return
{
title
:
"甲小鹤"
,
query
:
"/pages/index/index"
,
imageUrl
:
""
,
};
},
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.con
{
.con
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
100
rpx
30
rpx
50
rpx
;
padding
:
100
rpx
30
rpx
50
rpx
;
}
}
.page-title
{
font-size
:
44
rpx
;
.page-title
{
font-family
:
PingFang
SC
;
font-size
:
44
rpx
;
font-weight
:
bold
;
font-family
:
PingFang
SC
;
color
:
#0f1b35
;
font-weight
:
bold
;
}
color
:
#0f1b35
;
.personInfo
{
}
height
:
100
rpx
;
position
:
relative
;
.personInfo
{
margin-bottom
:
50
rpx
;
height
:
100
rpx
;
}
position
:
relative
;
margin-bottom
:
50
rpx
;
.headimg
{
}
margin-right
:
30
rpx
;
}
.headimg
{
margin-right
:
30
rpx
;
.name
{
}
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
.name
{
font-weight
:
bold
;
font-size
:
30
rpx
;
color
:
#0f1b35
;
font-family
:
PingFang
SC
;
}
font-weight
:
bold
;
color
:
#0f1b35
;
.phone
{
}
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
.phone
{
font-weight
:
500
;
font-size
:
26
rpx
;
color
:
#999999
;
font-family
:
PingFang
SC
;
}
font-weight
:
500
;
color
:
#999999
;
.saleInfo
{
}
/* width: 200rpx; */
height
:
66
rpx
;
.saleInfo
{
background-color
:
#00acf9
;
/* width: 200rpx; */
border-radius
:
33
rpx
0
rpx
0
rpx
33
rpx
;
height
:
66
rpx
;
position
:
absolute
;
background-color
:
#00acf9
;
top
:
50%
;
border-radius
:
33
rpx
0
rpx
0
rpx
33
rpx
;
transform
:
translateY
(
-50%
);
position
:
absolute
;
right
:
-30
rpx
;
top
:
50%
;
z-index
:
10
;
transform
:
translateY
(
-50%
);
box-sizing
:
border-box
;
right
:
-30
rpx
;
padding
:
0
20
rpx
;
z-index
:
10
;
font-family
:
PingFang
SC
;
box-sizing
:
border-box
;
color
:
#ffffff
;
padding
:
0
20
rpx
;
}
font-family
:
PingFang
SC
;
color
:
#ffffff
;
.saleInfo
.info1
{
}
text-align
:
center
;
font-size
:
22
rpx
;
.saleInfo
.info1
{
font-weight
:
bold
;
text-align
:
center
;
}
font-size
:
22
rpx
;
font-weight
:
bold
;
.saleInfo
.info2
{
}
font-size
:
20
rpx
;
}
.saleInfo
.info2
{
font-size
:
20
rpx
;
.baseInfo
{
}
margin-bottom
:
10
rpx
;
}
.baseInfo
{
margin-bottom
:
10
rpx
;
.baseInfo_item
{
}
width
:
220
rpx
;
height
:
140
rpx
;
.baseInfo_item
{
border-radius
:
20
rpx
;
width
:
220
rpx
;
box-sizing
:
border-box
;
height
:
140
rpx
;
padding
:
38
rpx
20
rpx
;
border-radius
:
20
rpx
;
margin-right
:
15
rpx
;
box-sizing
:
border-box
;
margin-bottom
:
30
rpx
;
padding
:
38
rpx
20
rpx
;
}
margin-right
:
15
rpx
;
margin-bottom
:
30
rpx
;
.baseInfo
.baseInfo_item
:nth-child
(
3n
)
{
}
margin-right
:
0
rpx
;
}
.baseInfo
.baseInfo_item
:nth-child
(
3n
)
{
margin-right
:
0
rpx
;
.baseInfo_name
{
}
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
.baseInfo_name
{
font-weight
:
bold
;
font-size
:
28
rpx
;
color
:
#0f1b35
;
font-family
:
PingFang
SC
;
margin
:
-7
rpx
0
3
rpx
0
;
font-weight
:
bold
;
}
color
:
#0f1b35
;
margin
:
-7
rpx
0
3
rpx
0
;
.baseInfo_desc
{
}
font-size
:
22
rpx
;
font-family
:
PingFang
SC
;
.baseInfo_desc
{
font-weight
:
500
;
font-size
:
22
rpx
;
color
:
#333e52
;
font-family
:
PingFang
SC
;
}
font-weight
:
500
;
color
:
#333e52
;
.timetable
{
}
height
:
360
rpx
;
background-image
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coursebg.png")
;
.timetable
{
background-size
:
cover
;
height
:
360
rpx
;
background-repeat
:
no-repeat
;
background-image
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coursebg.png")
;
background-position
:
center
;
background-size
:
cover
;
border-radius
:
20
rpx
;
background-repeat
:
no-repeat
;
overflow
:
hidden
;
background-position
:
center
;
box-sizing
:
border-box
;
border-radius
:
20
rpx
;
padding
:
30
rpx
30
rpx
0
50
rpx
;
overflow
:
hidden
;
margin-bottom
:
50
rpx
;
box-sizing
:
border-box
;
}
padding
:
30
rpx
30
rpx
0
50
rpx
;
margin-bottom
:
50
rpx
;
.timetable_item
{
}
color
:
#fff
;
margin-bottom
:
20
rpx
;
.timetable_item
{
}
color
:
#fff
;
margin-bottom
:
20
rpx
;
.timetable_title
{
}
font-size
:
32
rpx
;
font-family
:
PingFang
SC
;
.timetable_title
{
font-weight
:
bold
;
font-size
:
32
rpx
;
}
font-family
:
PingFang
SC
;
font-weight
:
bold
;
.timetable_btn
{
}
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
.timetable_btn
{
/* font-weight: 500; */
font-size
:
24
rpx
;
}
font-family
:
PingFang
SC
;
/* font-weight: 500; */
.timetable_item2
{
}
color
:
#fff
;
margin-bottom
:
20
rpx
;
.timetable_item2
{
font-size
:
26
rpx
;
color
:
#fff
;
font-family
:
PingFang
SC
;
margin-bottom
:
20
rpx
;
font-weight
:
500
;
font-size
:
26
rpx
;
}
font-family
:
PingFang
SC
;
font-weight
:
500
;
/
deep
/
.title
{
}
font-size
:
32
rpx
;
font-family
:
PingFang
SC
;
/
deep
/
.title
{
font-weight
:
800
;
font-size
:
32
rpx
;
color
:
#0f1b35
;
font-family
:
PingFang
SC
;
}
font-weight
:
800
;
color
:
#0f1b35
;
/
deep
/
.value
{
}
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
/
deep
/
.value
{
font-weight
:
500
;
font-size
:
24
rpx
;
color
:
#333f53
;
font-family
:
PingFang
SC
;
}
font-weight
:
500
;
color
:
#333f53
;
/
deep
/
.van-cell
{
}
padding
:
0
;
}
/
deep
/
.van-cell
{
padding
:
0
;
.mytest
{
}
width
:
720
rpx
;
height
:
250
rpx
;
.mytest
{
margin-top
:
30
rpx
;
width
:
720
rpx
;
overflow-x
:
scroll
;
height
:
250
rpx
;
overflow-y
:
hidden
;
margin-top
:
30
rpx
;
-webkit-overflow-scrolling
:
touch
;
overflow-x
:
scroll
;
transition
:
all
0.5s
;
overflow-y
:
hidden
;
}
-webkit-overflow-scrolling
:
touch
;
transition
:
all
0.5s
;
.test-item
{
}
width
:
620
rpx
;
height
:
250
rpx
;
.test-item
{
box-sizing
:
border-box
;
width
:
620
rpx
;
border-radius
:
20
rpx
;
height
:
250
rpx
;
overflow
:
hidden
;
box-sizing
:
border-box
;
margin-right
:
30
rpx
;
border-radius
:
20
rpx
;
background-repeat
:
no-repeat
;
overflow
:
hidden
;
background-position
:
center
;
margin-right
:
30
rpx
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-origin
:
border-box
;
background-position
:
center
;
background-clip
:
border-box
;
background-size
:
cover
;
padding-top
:
60
rpx
;
background-origin
:
border-box
;
padding-left
:
44
rpx
;
background-clip
:
border-box
;
position
:
relative
;
padding-top
:
60
rpx
;
}
padding-left
:
44
rpx
;
position
:
relative
;
.testName
{
}
font-size
:
40
rpx
;
font-family
:
PingFang
SC
;
.testName
{
font-weight
:
bold
;
font-size
:
40
rpx
;
color
:
#0f1b35
;
font-family
:
PingFang
SC
;
margin-bottom
:
20
rpx
;
font-weight
:
bold
;
}
color
:
#0f1b35
;
margin-bottom
:
20
rpx
;
.testTime
{
}
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
.testTime
{
font-weight
:
500
;
font-size
:
28
rpx
;
color
:
#0f1b35
;
font-family
:
PingFang
SC
;
}
font-weight
:
500
;
.teacherInfo-bg
{
color
:
#0f1b35
;
position
:
absolute
;
}
left
:
0
;
bottom
:
0
;
.teacherInfo-bg
{
width
:
620
rpx
;
position
:
absolute
;
height
:
70
rpx
;
left
:
0
;
background-image
:
linear-gradient
(
90deg
,
#000000
,
#ffffff
);
bottom
:
0
;
opacity
:
0.4
;
width
:
620
rpx
;
z-index
:
1
;
height
:
70
rpx
;
}
background-image
:
linear-gradient
(
90deg
,
#000000
,
#ffffff
);
.teacherInfo
{
opacity
:
0.4
;
position
:
absolute
;
z-index
:
1
;
left
:
0
;
}
bottom
:
0
;
width
:
620
rpx
;
.teacherInfo
{
height
:
70
rpx
;
position
:
absolute
;
z-index
:
2
;
left
:
0
;
box-sizing
:
border-box
;
bottom
:
0
;
padding
:
0
30
rpx
;
width
:
620
rpx
;
}
height
:
70
rpx
;
.teacherName
{
z-index
:
2
;
font-size
:
24
rpx
;
box-sizing
:
border-box
;
font-family
:
PingFang
SC
;
padding
:
0
30
rpx
;
font-weight
:
500
;
}
color
:
#ffffff
;
margin-left
:
10
rpx
;
.teacherName
{
}
font-size
:
24
rpx
;
.test-status
{
font-family
:
PingFang
SC
;
font-size
:
24
rpx
;
font-weight
:
500
;
font-family
:
PingFang
SC
;
color
:
#ffffff
;
font-weight
:
bold
;
margin-left
:
10
rpx
;
/* color: #00acf9; */
}
}
.status-blue
{
.test-status
{
color
:
#00acf9
;
font-size
:
24
rpx
;
}
font-family
:
PingFang
SC
;
.status-green
{
font-weight
:
bold
;
color
:
#00df9f
;
/* color: #00acf9; */
}
}
.status-black
{
color
:
#111111
;
.status-blue
{
}
color
:
#00acf9
;
.status-red
{
}
color
:
#ff3816
;
}
.status-green
{
.LearningGarden
{
color
:
#00df9f
;
box-sizing
:
border-box
;
}
margin-bottom
:
10
rpx
;
}
.status-black
{
.LearningGarden-item
{
color
:
#111111
;
width
:
330
rpx
;
}
height
:
140
rpx
;
border-radius
:
20
rpx
;
.status-red
{
margin-right
:
30
rpx
;
color
:
#ff3816
;
margin-bottom
:
30
rpx
;
}
box-sizing
:
border-box
;
padding
:
30
rpx
20
rpx
;
.LearningGarden
{
position
:
relative
;
box-sizing
:
border-box
;
}
margin-bottom
:
10
rpx
;
.LearningGarden
.LearningGarden-item
:nth-child
(
2n
)
{
}
margin-right
:
0
rpx
!important
;
}
.LearningGarden-item
{
.LearningGarden-item-name
{
width
:
330
rpx
;
width
:
220
rpx
;
height
:
140
rpx
;
font-size
:
28
rpx
;
border-radius
:
20
rpx
;
font-family
:
PingFang
SC
;
margin-right
:
30
rpx
;
font-weight
:
bold
;
margin-bottom
:
30
rpx
;
color
:
#0f1b35
;
box-sizing
:
border-box
;
}
padding
:
30
rpx
20
rpx
;
.LearningGarden-item-desc
{
position
:
relative
;
width
:
220
rpx
;
}
font-size
:
22
rpx
;
font-family
:
PingFang
SC
;
.LearningGarden
.LearningGarden-item
:nth-child
(
2n
)
{
font-weight
:
500
;
margin-right
:
0
rpx
!important
;
color
:
#333e52
;
}
margin-top
:
10
rpx
;
}
.LearningGarden-item-name
{
.LearningGarden-item-img
{
width
:
220
rpx
;
width
:
64
rpx
;
font-size
:
28
rpx
;
height
:
66
rpx
;
font-family
:
PingFang
SC
;
position
:
absolute
;
font-weight
:
bold
;
top
:
38
rpx
;
color
:
#0f1b35
;
right
:
20
rpx
;
}
}
.feedback
{
.LearningGarden-item-desc
{
margin
:
30
rpx
0
;
width
:
220
rpx
;
}
font-size
:
22
rpx
;
.feedback-info
{
font-family
:
PingFang
SC
;
height
:
60
rpx
;
font-weight
:
500
;
}
color
:
#333e52
;
.info-headimg
{
margin-top
:
10
rpx
;
width
:
60
rpx
;
}
height
:
60
rpx
;
background-color
:
#c4a1a1
;
.LearningGarden-item-img
{
border-radius
:
50%
;
width
:
64
rpx
;
margin-right
:
20
rpx
;
height
:
66
rpx
;
}
position
:
absolute
;
.teacher-name
{
top
:
38
rpx
;
font-size
:
26
rpx
;
right
:
20
rpx
;
font-family
:
PingFang
SC
;
}
font-weight
:
500
;
color
:
#111111
;
.feedback
{
}
margin
:
30
rpx
0
;
.feedback-all
{
}
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
.feedback-info
{
font-weight
:
500
;
height
:
60
rpx
;
color
:
#999999
;
}
}
.feedback-text
{
.info-headimg
{
font-size
:
24
rpx
;
width
:
60
rpx
;
font-family
:
PingFang
SC
;
height
:
60
rpx
;
font-weight
:
400
;
background-color
:
#c4a1a1
;
color
:
#111111
;
border-radius
:
50%
;
margin
:
20
rpx
0
;
margin-right
:
20
rpx
;
}
}
.feedback-img
{
width
:
210
rpx
;
.teacher-name
{
height
:
210
rpx
;
font-size
:
26
rpx
;
border-radius
:
20
rpx
;
font-family
:
PingFang
SC
;
background-color
:
#eee
;
font-weight
:
500
;
margin-right
:
30
rpx
;
color
:
#111111
;
}
}
.feedback-img
:nth-child
(
3n
)
{
margin-right
:
0
rpx
!important
;
.feedback-all
{
}
font-size
:
24
rpx
;
.layer
{
font-family
:
PingFang
SC
;
width
:
210
rpx
;
font-weight
:
500
;
height
:
210
rpx
;
color
:
#999999
;
background-color
:
#cbd9ed
;
}
font-size
:
36
rpx
;
font-family
:
PingFang
SC
;
.feedback-text
{
font-weight
:
bold
;
font-size
:
24
rpx
;
color
:
#111111
;
font-family
:
PingFang
SC
;
}
font-weight
:
400
;
color
:
#111111
;
margin
:
20
rpx
0
;
}
.feedback-img
{
width
:
210
rpx
;
height
:
210
rpx
;
border-radius
:
20
rpx
;
background-color
:
#eee
;
margin-right
:
30
rpx
;
}
.feedback-img
:nth-child
(
3n
)
{
margin-right
:
0
rpx
!important
;
}
.layer
{
width
:
210
rpx
;
height
:
210
rpx
;
background-color
:
#cbd9ed
;
font-size
:
36
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.activeContent
{
width
:
100%
;
height
:
250
rpx
;
border-radius
:
20
rpx
;
margin-bottom
:
30
rpx
;
overflow
:
hidden
;
}
.swiperList
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
center
;
box-sizing
:
border-box
;
overflow
:
hidden
;
color
:
#fff
;
border-radius
:
20
rpx
;
}
.swiper_Time
{
position
:
absolute
;
top
:
20
rpx
;
right
:
40
rpx
;
}
.swiper_Name
{
position
:
absolute
;
bottom
:
45
rpx
;
left
:
30
rpx
;
}
/* .swiper /deep/ .wx-swiper-dots{
position: relative;
right:-380px;
top:20px;
} */
.swiper
/
deep
/
.wx-swiper-dot
{
width
:
10
rpx
;
height
:
10
rpx
;
margin-right
:
0
;
}
</
style
>
</
style
>
src/utils/requestMall.js
View file @
4448f3e5
//请求电商接口
//请求电商接口
let
host
=
''
let
host
=
''
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
host
=
'http://192.168.20.
17:8014
/api'
host
=
'http://192.168.20.
24:8200
/api'
}
else
{
}
else
{
host
=
"https://mallapi.oytour.com/api"
host
=
"https://mallapi.oytour.com/api"
}
}
...
...
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