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
94ed0d8f
Commit
94ed0d8f
authored
Oct 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
50122d51
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
123 additions
and
78 deletions
+123
-78
index.js
src/api/index.js
+24
-0
feedback.vue
src/pages/course/feedback.vue
+1
-1
timeTable.vue
src/pages/course/timeTable.vue
+6
-0
index.vue
src/pages/index/index.vue
+52
-12
login.vue
src/pages/login/login.vue
+40
-65
No files found.
src/api/index.js
View file @
94ed0d8f
...
...
@@ -12,6 +12,30 @@ export function login(data) {
})
}
/**
* 解密手机号
* @param {JSON参数} data
*/
export
function
parsePhone
(
data
)
{
return
request
({
url
:
'/AppletLogin/GetGuestWeiXinMobile'
,
method
:
'post'
,
data
})
}
/**
* 手机号登录
* @param {JSON参数} data
*/
export
function
phoneLogin
(
data
)
{
return
request
({
url
:
'/AppletLogin/LoginByAccount'
,
method
:
'post'
,
data
})
}
/**
* 获取首页信息
* @param {JSON参数} data
...
...
src/pages/course/feedback.vue
View file @
94ed0d8f
...
...
@@ -39,7 +39,7 @@
class=
"feedback-img"
v-if=
"index1 === 0 || index1 === 1 || index1 === 2"
>
<view
style=
"width: 100%; height: 100%;position: relative;"
v-if=
"index1 === 0 || index1 === 1 || index1 === 2"
>
<view
style=
"width: 100%; height: 100%;position: relative;"
>
<image
:src=
"item1"
style=
"width: 100%; height: 100%"
...
...
src/pages/course/timeTable.vue
View file @
94ed0d8f
...
...
@@ -93,6 +93,9 @@
</view>
</view>
<view
class=
"Timetable-box"
>
<view
class=
"flex flex_center_center"
v-if=
"loading"
>
<van-loading
size=
"48rpx"
type=
"spinner"
>
加载中...
</van-loading>
</view>
<van-empty
description=
"暂无数据"
v-if=
"dataList.length === 0"
/>
<view
v-for=
"(item, index) in dataList"
...
...
@@ -211,11 +214,14 @@ export default {
statusBarHeight
:
0
,
dataList
:
[],
allData
:[],
loading
:
false
,
});
let
methods
=
{
async
getData
()
{
data
.
loading
=
true
let
res
=
await
getStundentPlanStatistical
(
data
.
msg
);
data
.
loading
=
false
if
(
res
)
{
data
.
dataList
=
res
.
Data
;
}
...
...
src/pages/index/index.vue
View file @
94ed0d8f
...
...
@@ -80,7 +80,7 @@
<view
class=
"teacher-name one_line"
v-if=
"indexData.FeedBackList[0].TeacherName"
>
{{
indexData
.
FeedBackList
[
0
].
TeacherName
}}
{{
indexData
.
FeedBackList
[
0
].
CourseName
}}
{{
indexData
.
FeedBackList
[
0
].
CreateTime
.
replace
(
'T'
,
' '
)
}}
</view
>
{{
indexData
.
FeedBackList
[
0
].
TeacherName
}}
{{
indexData
.
FeedBackList
[
0
].
CourseName
}}
</view
>
<view
class=
"rate"
>
<van-rate
...
...
@@ -90,6 +90,7 @@
void-icon=
""
size=
"24rpx"
/>
<text
class=
"FeedBackTime"
>
{{
indexData
.
FeedBackList
[
0
].
ClassDateStr
}}
{{
indexData
.
FeedBackList
[
0
].
StartTime
}}
</text>
</view>
</view>
<view
...
...
@@ -109,15 +110,32 @@
:key=
"index"
v-if=
"index === 0 || index === 1 || index === 2"
class=
"feedback-img"
@
click=
"previewImage(indexData.FeedBackList[0].PhotoList, index)"
>
<image
:src=
"item"
style=
"width: 100%; height: 100%"
mode=
"aspectFill"
v-if=
"index === 0 || index === 1 || index === 2"
>
</image>
<view
style=
"width: 100%; height: 100%"
>
<image
:src=
"item"
style=
"width: 100%; height: 100%"
mode=
"aspectFill"
v-if=
"item.indexOf('mp4')==-1"
@
click=
"previewImage(item, index)"
>
</image>
<video
:id=
"'myVideo'+index"
:src=
"item"
style=
"width: 100%; height: 100%;"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
v-if=
"item.indexOf('mp4')!=-1"
></video>
<view
@
click=
"enlarge(index)"
v-if=
"item.indexOf('mp4')!=-1"
style=
"position: absolute;left: 50%;top: 50%;margin-top: -49rpx;margin-left: -49rpx;width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;"
>
<!-- 播放按钮 -->
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
mode=
""
></image>
</view>
</view>
<view
class=
"layer"
v-if=
"
...
...
@@ -363,6 +381,7 @@ export default {
SelectIsEnd
:
0
,
},
ActivityList
:
[],
//活动数据
videoContext
:
null
});
let
methods
=
{
...
...
@@ -392,7 +411,6 @@ export default {
},
async
getActivityData
()
{
let
res
=
await
getActivityList
(
data
.
ActiveMsg
);
console
.
log
(
res
,
"数据"
);
if
(
res
.
resultCode
==
1
)
{
data
.
ActivityList
=
res
.
data
.
pageData
;
}
...
...
@@ -414,7 +432,8 @@ export default {
goActiveDetail
(
Id
)
{
this
.
jumpPage
(
`/pages/activity/activityDetails?Id=
${
Id
}
`
);
},
previewImage
(
arr
,
i
)
{
previewImage
(
item
,
i
)
{
let
arr
=
[
item
]
uni
.
previewImage
({
urls
:
arr
,
current
:
i
,
...
...
@@ -427,6 +446,20 @@ export default {
},
});
},
enlarge
(
i
)
{
// 全屏
data
.
videoContext
=
uni
.
createVideoContext
(
'myVideo'
+
i
);
data
.
videoContext
.
requestFullScreen
({
direction
:
0
})
},
videoControl
(
e
){
if
(
e
.
detail
.
fullScreen
==
false
){
data
.
videoContext
.
stop
()
data
.
controls
=
false
}
else
{
data
.
videoContext
.
play
()
data
.
controls
=
true
}
},
};
onMounted
(()
=>
{
...
...
@@ -787,7 +820,13 @@ export default {
font-weight
:
500
;
color
:
#111111
;
}
.FeedBackTime
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
margin-left
:
20
rpx
;
}
.feedback-all
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -808,6 +847,7 @@ export default {
height
:
210
rpx
;
border-radius
:
20
rpx
;
background-color
:
#eee
;
overflow
:
hidden
;
margin-right
:
30
rpx
;
position
:
relative
;
box-shadow
:
0
rpx
10
rpx
30
rpx
0
rpx
rgba
(
36
,
36
,
36
,
0.2
);
...
...
src/pages/login/login.vue
View file @
94ed0d8f
<
template
>
<view
class=
""
>
<view
>
<van-nav-bar>
<van-icon
slot=
"left"
name=
"cross"
size=
"50rpx"
@
click=
"back"
/>
</van-nav-bar>
...
...
@@ -35,7 +35,11 @@
</van-field>
</van-cell-group>
</view>
<van-button
block
custom-class=
"loginBtn"
@
click=
"login"
>
登录
</van-button>
<view
class=
"flex flex_between_center btnBox"
>
<view
class=
"loginBtn flex flex_center_center"
@
click=
"login"
>
账号登录
</view>
<button
class=
"loginBtn"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getphonenumber"
>
手机号一键登录
</button>
</view>
<!--
<view
class=
"auth"
@
click=
"authLogin"
>
授权手机号一键登录
</view>
-->
<van-toast
id=
"van-toast"
/>
</view>
...
...
@@ -54,7 +58,7 @@ import {
inject
,
}
from
"vue"
;
// import Toast from "../../wxcomponents/vant/toast/toast";
import
{
login
}
from
"../../api/index"
;
import
{
login
,
phoneLogin
,
parsePhone
}
from
"../../api/index"
;
export
default
{
setup
(
props
,
context
)
{
let
Toast
=
inject
(
"$toast"
);
...
...
@@ -78,52 +82,8 @@ export default {
});
clearTimeout
();
},
authLogin
()
{
// that.getUserProfile();
},
// getUserProfile() {
// //新的获取用户资料
// wx.getUserProfile({
// desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
// success: (info) => {
// console.log(83, info);
// that.getUserInfo(info);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// },
// getUserInfo(info) {
// uni.getProvider({
// service: "oauth",
// success: function (res) {
// if (~res.provider.indexOf("weixin")) {
// uni.login({
// provider: "weixin",
// success: (_res) => {
// console.log(107, _res);
// that.getunionid(_res.code);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// } else {
// uni.showToast({
// title: "请先安装微信或升级版本",
// icon: "none",
// });
// }
// },
// });
// },
async
login
()
{
if
(
msg
.
Account
==
""
||
!
msg
.
Account
)
{
Toast
.
fail
(
"请输入账号"
);
...
...
@@ -152,19 +112,24 @@ export default {
},
1000
);
}
},
// getunionid(code) {
// let appid = "wxaa108410092fd276";
// let secret = "31cd99f321612f95b0006905032de7f0";
// uni.request({
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${appid}&secret=${secret}&js_code=${code}&grant_type=authorization_code`,
// success: (res) => {
// console.log(150, res);
// },
// fail: (err) => {
// console.log(154, err);
// },
// });
// },
getphonenumber
(
e
){
console
.
log
(
117
,
e
)
let
encryptedData
=
e
.
detail
.
encryptedData
;
let
iv
=
e
.
detail
.
iv
;
uni
.
login
({
provider
:
'weixin'
,
success
:
async
(
loginRes
)
=>
{
let
code
=
loginRes
.
code
let
res
=
await
parsePhone
({
encryptedData
,
iv
,
code
})
console
.
log
(
0
,
res
)
}
});
}
};
onMounted
(()
=>
{});
let
that
=
methods
;
...
...
@@ -208,12 +173,11 @@ export default {
padding-top
:
50
rpx
;
}
/
deep
/
.loginBtn
{
width
:
60
0
rpx
;
.loginBtn
{
width
:
26
0
rpx
;
height
:
90
rpx
;
background-color
:
#00acf9
;
border-radius
:
12
rpx
;
margin
:
0
auto
;
font-size
:
32
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
...
...
@@ -234,4 +198,15 @@ export default {
font-size
:
30
rpx
;
color
:
#111111
;
}
.btnBox
{
width
:
600
rpx
;
height
:
90
rpx
;
/* background-color: #00acf9; */
border-radius
:
12
rpx
;
margin
:
0
auto
;
font-size
:
32
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#ffffff
;
}
</
style
>
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