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
ba84084d
Commit
ba84084d
authored
Jan 07, 2022
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ca53f6d4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
250 additions
and
2 deletions
+250
-2
study.js
src/api/study.js
+12
-0
indexassembly.vue
src/pages/index/components/indexassembly.vue
+5
-2
indexNo.vue
src/pages/study/components/indexNo.vue
+156
-0
index.vue
src/pages/study/index.vue
+77
-0
No files found.
src/api/study.js
0 → 100644
View file @
ba84084d
import
request
from
'../utils/request.js'
/**
* 获取我的课程列表
* @param {JSON参数} data
*/
export
function
getMyStudyCourseList
(
data
)
{
return
request
({
url
:
'/AppletIndex/GetMyStudyCourseList'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/pages/index/components/indexassembly.vue
View file @
ba84084d
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
data
.
obj
.
Name
=
info
.
userInfo
.
nickName
;
data
.
obj
.
Name
=
info
.
userInfo
.
nickName
;
data
.
obj
.
Photo
=
info
.
userInfo
.
avatarUrl
;
data
.
obj
.
Photo
=
info
.
userInfo
.
avatarUrl
;
data
.
showPhone
=
true
;
//显示获取手机号码弹窗
data
.
showPhone
=
true
;
//显示获取手机号码弹窗
uni
.
hideTabBar
()
//手机授权弹窗出现 隐藏tabbar 不是层级过高
},
},
fail
:
()
=>
{
fail
:
()
=>
{
...
@@ -132,7 +133,7 @@
...
@@ -132,7 +133,7 @@
})
})
if
(
res
&&
res
.
Data
.
phoneNumber
)
{
if
(
res
&&
res
.
Data
.
phoneNumber
)
{
data
.
obj
.
phoneNum
=
res
.
Data
.
phoneNumber
data
.
obj
.
phoneNum
=
res
.
Data
.
phoneNumber
// data.obj.phoneNum = '1913849057
5
'
// data.obj.phoneNum = '1913849057
7
'
data
.
obj
.
openid
=
res
.
Data
.
openid
data
.
obj
.
openid
=
res
.
Data
.
openid
data
.
obj
.
unionid
=
res
.
Data
.
unionid
data
.
obj
.
unionid
=
res
.
Data
.
unionid
that
.
phoneNumLogin
()
that
.
phoneNumLogin
()
...
@@ -170,10 +171,12 @@
...
@@ -170,10 +171,12 @@
uni
.
setStorageSync
(
"userInfo"
,
res
.
Data
);
uni
.
setStorageSync
(
"userInfo"
,
res
.
Data
);
Toast
.
success
(
"登录成功"
);
Toast
.
success
(
"登录成功"
);
emit
(
'success'
)
emit
(
'success'
)
data
.
showPhone
=
false
data
.
showPhone
=
false
uni
.
showTabBar
()
}
else
{
}
else
{
data
.
showLogin
=
true
;
//防止多次点击登录
data
.
showLogin
=
true
;
//防止多次点击登录
data
.
showPhone
=
false
data
.
showPhone
=
false
uni
.
showTabBar
()
uni
.
hideLoading
();
uni
.
hideLoading
();
if
(
res
.
Data
.
Error
==-
1
){
//如果没找到电话号码 就跳入登录
if
(
res
.
Data
.
Error
==-
1
){
//如果没找到电话号码 就跳入登录
...
...
src/pages/study/components/indexNo.vue
0 → 100644
View file @
ba84084d
<
style
scoped
>
.curriculum-n
{
justify-content
:
center
;
padding
:
100
rpx
30
rpx
50
rpx
;
}
.row
{
display
:
flex
;
align-items
:
center
;
}
.curriculum-top-n
{
width
:
100%
;
height
:
350
rpx
;
border-radius
:
12px
;
background
:
linear-gradient
(
to
bottom
,
#4C50E7
,
#FFFFFF
);
padding
:
5px
;
}
.curriculum-top-nn
{
width
:
100%
;
height
:
100%
;
background
:
#FFF
;
border-radius
:
12px
;
position
:
relative
;
}
.curriculum-top-pl
{
width
:
140
rpx
;
height
:
30px
;
font-size
:
14px
;
color
:
#FFF
;
background
:
linear-gradient
(
to
bottom
,
#5559e8
,
#6d70eb
);
border-bottom-right-radius
:
12px
;
justify-content
:
center
;
}
.curriculum-top-pl-ht
{
width
:
40px
;
height
:
13px
;
background
:
#F5F5F5
;
margin-left
:
5px
;
}
.lijigoumai
{
width
:
130
rpx
;
height
:
50
rpx
;
border-radius
:
26
rpx
;
justify-content
:
center
;
background
:
#5559E8
;
font-size
:
11px
;
color
:
#FFF
;
margin-top
:
13px
;
}
.review
{
height
:
400
rpx
;
background
:
#EBEBEB
;
padding
:
18px
;
}
.reviewcenter
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
margin-top
:
100
rpx
;
}
.lijigoumai2
{
width
:
130
rpx
;
height
:
50
rpx
;
border-radius
:
26
rpx
;
justify-content
:
center
;
background
:
#FFFFFF
;
font-size
:
11px
;
color
:
#4C50E7
;
margin-top
:
13px
;
}
</
style
>
<
template
>
<view>
<view
class=
"row curriculum-n"
:style=
"
{ 'margin-top': `${statusBarHeight}px` }">
<view
class=
"curriculum-top-n"
>
<view
class=
"curriculum-top-nn"
>
<view
class=
"row"
style=
"justify-content: space-between;"
>
<view
class=
"curriculum-top-pl row"
>
当前课程
</view>
<view
class=
"row"
>
<view
class=
"row"
>
<image
style=
"width: 15px;height: 15px;"
src=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/studyindex_nz.png'
></image>
<view
class=
"curriculum-top-pl-ht"
style=
"width: 90px;"
></view>
</view>
<view
class=
"row"
style=
"margin: 0 10px 0 20px;"
>
<image
style=
"width: 15px;height: 15px;"
src=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/studyindex_hb.png'
></image>
<view
class=
"curriculum-top-pl-ht"
></view>
</view>
</view>
</view>
<view
class=
"row"
style=
"justify-content: space-between;padding: 0 11px;margin-top: 15px;"
>
<view
style=
"margin-left: 17px;"
>
<view
style=
"font-size: 13px;font-family: PingFang SC;font-weight: bold;color: #111111;"
>
暂无课程
</view>
<view
style=
"font-size: 10px;font-family: PingFang SC;font-weight: 400;color: #888888;margin-top: 10px;"
>
购买课程后可回顾
</view>
<view
class=
"lijigoumai row"
>
立即购课
</view>
</view>
<view>
<image
style=
"width: 234rpx;height: 226rpx;"
mode=
"aspectFit"
src=
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/studyindex_nan.png'
></image>
</view>
</view>
</view>
</view>
</view>
<view
class=
"review"
>
<view
style=
"font-size: 14px;color: #111111;"
>
课程顾问
<span
style=
"font-size: 10px;color: #999999;"
>
(最近7天课程)
</span>
</view>
<view
class=
"reviewcenter"
>
<view
style=
"font-size: 13px;font-family: PingFang SC;font-weight: bold;color: #111111;"
>
暂无课程
</view>
<view
style=
"font-size: 10px;font-family: PingFang SC;font-weight: 400;color: #888888;margin-top: 10px;"
>
购买课程后可回顾
</view>
<view
class=
"lijigoumai2 row"
>
了解课程
</view>
</view>
</view>
<view
style=
"margin-left: 18px;font-size: 14px;font-family: PingFang SC;font-weight: 400;color: #666666;margin-top: 30px;"
>
加油哦!
</view>
<view
style=
"margin-left: 18px;font-size: 23px;font-family: PingFang SC;font-weight: 400;color: #111111;"
>
考试
</view>
<view
class=
"review reviewcenter"
style=
"height: 300rpx;margin-top: 0;align-items: center;justify-content: center;"
>
<view
style=
"font-size: 13px;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
line-height: 35px;"
>
暂无记录
</view>
<view
style=
"font-size: 10px;margin-top: 10px;
font-family: PingFang SC;
font-weight: 500;
color: #999999;"
>
参与考试后可查看
</view>
</view>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
provide
,}
from
"vue"
;
export
default
{
setup
(
props
)
{
let
data
=
reactive
({
statusBarHeight
:
0
,
})
let
methods
=
{
}
onMounted
(()
=>
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
})
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
}
}
</
script
>
src/pages/study/index.vue
0 → 100644
View file @
ba84084d
<
style
scoped
>
.studyindex
{
width
:
100%
;
height
:
100vh
;
background
:
#F5F5F5
;
}
.row
{
display
:
flex
;
align-items
:
center
;
}
.page-title
{
font-size
:
44
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#0f1b35
;
}
.curriculum
{
width
:
100%
;
}
</
style
>
<
template
>
<view
class=
"studyindex"
>
<van-nav-bar
:border=
"fasle"
fixed
:z-index=
"99"
>
<view
slot=
"left"
class=
"page-title"
title=
"shouye"
>
学习
</view>
</van-nav-bar>
<view
class=
"curriculum"
>
<template
v-if=
"CourseList.length==0"
>
<indexNo></indexNo>
</
template
>
</view>
</view>
</template>
<
script
>
import
indexNo
from
'./components/indexNo.vue'
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
provide
,}
from
"vue"
;
import
{
getMyStudyCourseList
,
//课程列表
}
from
"../../api/study.js"
;
export
default
{
components
:
{
indexNo
,
},
setup
(
props
)
{
let
data
=
reactive
({
CourseList
:[],
//课程列表
statusBarHeight
:
0
,
})
let
methods
=
{
async
getCourseList
()
{
let
res
=
await
getMyStudyCourseList
({});
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
)
data
.
CourseList
=
res
.
Data
}
},
}
onMounted
(()
=>
{
that
.
getCourseList
()
//我的课程列表
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
})
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
}
}
</
script
>
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