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
e9c98390
Commit
e9c98390
authored
Apr 21, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
bb1da4f0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
31 deletions
+145
-31
index.js
src/api/index.js
+13
-0
pages.json
src/pages.json
+14
-2
index.vue
src/pages/index/index.vue
+114
-25
test.vue
src/pages/word/test.vue
+4
-4
No files found.
src/api/index.js
View file @
e9c98390
...
@@ -189,3 +189,16 @@ export function getClassFeedBackList(data) {
...
@@ -189,3 +189,16 @@ export function getClassFeedBackList(data) {
data
data
})
})
}
}
/**
* 扫码签到
* @param {JSON参数} data
*/
export
function
getSweepCode
(
data
)
{
return
request
({
url
:
"/class/AddClassCheck"
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/pages.json
View file @
e9c98390
...
@@ -9,7 +9,18 @@
...
@@ -9,7 +9,18 @@
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
}
}
},
{
},{
"path"
:
"pages/index/fail"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},{
"path"
:
"pages/index/success"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/timetable/timeTable"
,
//课表
"path"
:
"pages/timetable/timeTable"
,
//课表
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
...
@@ -49,7 +60,8 @@
...
@@ -49,7 +60,8 @@
"path"
:
"pages/activity/MyExam"
"path"
:
"pages/activity/MyExam"
},{
},{
"path"
:
"pages/study/questionNaire"
"path"
:
"pages/study/questionNaire"
}],
}
],
"subPackages"
:
[{
"subPackages"
:
[{
"root"
:
"pages/course"
,
//课程分包
"root"
:
"pages/course"
,
//课程分包
"pages"
:
[{
"pages"
:
[{
...
...
src/pages/index/index.vue
View file @
e9c98390
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
首页
首页
</view>
</view>
<view
class=
"loginBox"
>
<view
class=
"loginBox"
>
<view
class=
""
v-if=
"userData && userData.AccountName && userData.AccountId>0"
>
<view
v-if=
"userData && userData.AccountName && userData.AccountId>0"
>
{{
userData
.
AccountName
}}
{{
userData
.
AccountName
}}
</view>
</view>
<indexassembly
@
success=
'againdata'
v-else
>
<indexassembly
@
success=
'againdata'
v-else
>
...
@@ -21,14 +21,16 @@
...
@@ -21,14 +21,16 @@
</view>
</view>
</indexassembly>
</indexassembly>
</view>
</view>
<!-- 扫码登陆 -->
<view
class=
"scanBox"
@
click=
"scan"
>
<view
class=
"scanBox"
@
click=
"scan"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png"
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/scan2x.png"
mode=
"aspectFit"
class=
"scanIcon"
></image>
mode=
"aspectFit"
class=
"scanIcon"
>
</image>
</view>
</view>
</view>
</view>
</navbar>
</navbar>
<view
class=
"activeContent"
v-if=
"ActivityList.length > 0"
>
<view
class=
"activeContent"
v-if=
"ActivityList.length > 0"
>
<swiper
class=
"swiper"
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
indicator-color=
"#CCCCCC"
<swiper
class=
"swiper"
:indicator-dots=
"indicatorDots"
:autoplay=
"autoplay"
indicator-color=
"#CCCCCC"
indicator-active-color=
"#000000"
:vertical=
"true"
circular
>
indicator-active-color=
"#000000"
:vertical=
"true"
circular
>
...
@@ -159,6 +161,10 @@
...
@@ -159,6 +161,10 @@
import
{
import
{
getActivityList
getActivityList
}
from
"../../api/activity"
;
}
from
"../../api/activity"
;
import
{
getSweepCode
}
from
'../../api/index.js'
import
{
import
{
getImageColor
getImageColor
}
from
'../../utils/index.js'
}
from
'../../utils/index.js'
...
@@ -166,6 +172,11 @@
...
@@ -166,6 +172,11 @@
import
navbar
from
'../../components/navbar.vue'
import
navbar
from
'../../components/navbar.vue'
import
bottom
from
'../../components/bottom.vue'
import
bottom
from
'../../components/bottom.vue'
export
default
{
export
default
{
// data(){
// return{
// }
// }
components
:
{
components
:
{
indexassembly
,
indexassembly
,
navbar
,
navbar
,
...
@@ -190,7 +201,7 @@
...
@@ -190,7 +201,7 @@
});
});
let
methods
=
{
let
methods
=
{
goTongji
(){
goTongji
()
{
this
.
jumpPage
(
'/pages/study/questionNaire?ActivitySurveyId=6'
);
this
.
jumpPage
(
'/pages/study/questionNaire?ActivitySurveyId=6'
);
},
},
jumpPage
(
url
)
{
jumpPage
(
url
)
{
...
@@ -207,14 +218,89 @@
...
@@ -207,14 +218,89 @@
goActiveDetail
(
Id
)
{
goActiveDetail
(
Id
)
{
this
.
jumpPage
(
`/pages/activity/activityDetails?Id=
${
Id
}
`
);
this
.
jumpPage
(
`/pages/activity/activityDetails?Id=
${
Id
}
`
);
},
},
base64_decode
(
data
)
{
var
b64
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
;
var
o1
,
o2
,
o3
,
h1
,
h2
,
h3
,
h4
,
bits
,
i
=
0
,
ac
=
0
,
dec
=
""
,
tmp_arr
=
[];
if
(
!
data
)
{
return
data
;
}
data
+=
""
;
do
{
h1
=
b64
.
indexOf
(
data
.
charAt
(
i
++
));
h2
=
b64
.
indexOf
(
data
.
charAt
(
i
++
));
h3
=
b64
.
indexOf
(
data
.
charAt
(
i
++
));
h4
=
b64
.
indexOf
(
data
.
charAt
(
i
++
));
bits
=
(
h1
<<
18
)
|
(
h2
<<
12
)
|
(
h3
<<
6
)
|
h4
;
o1
=
(
bits
>>
16
)
&
0xff
;
o2
=
(
bits
>>
8
)
&
0xff
;
o3
=
bits
&
0xff
;
if
(
h3
==
64
)
{
tmp_arr
[
ac
++
]
=
String
.
fromCharCode
(
o1
);
}
else
if
(
h4
==
64
)
{
tmp_arr
[
ac
++
]
=
String
.
fromCharCode
(
o1
,
o2
);
}
else
{
tmp_arr
[
ac
++
]
=
String
.
fromCharCode
(
o1
,
o2
,
o3
);
}
}
while
(
i
<
data
.
length
);
dec
=
tmp_arr
.
join
(
""
);
//dec = utf8_decode(dec);
return
dec
;
},
//{"cmd":"checkin","params":{"classId":0,"ClassDate":"2022-4-19","ClassRoomId":27,
//"School_Id":0,"TeacherId":8,"CheckStatus":0,"StudyNum":"90","ClassTimeId":16531}}
scan
()
{
scan
()
{
// 调起条码扫描
//调起条码扫描
console
.
log
(
"进来了"
)
let
that
=
this
uni
.
scanCode
({
uni
.
scanCode
({
scanType
:
[
'qrCode'
],
scanType
:
[
'qrCode'
],
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
'条码类型:'
+
res
.
scanType
);
// 解码
console
.
log
(
'条码内容:'
+
res
.
result
);
var
saveObj
=
{};
try
{
saveObj
=
that
.
base64_decode
(
res
.
result
)
// console.log(saveObj)
}
catch
(
e
)
{
//TODO handle the exception
// console.log(e)
}
var
jsonObj
=
JSON
.
parse
(
saveObj
)
if
(
jsonObj
.
cmd
==
"checkin"
){
var
userData
=
uni
.
getStorageSync
(
'userInfo'
);
console
.
log
(
"userData"
,
userData
);
jsonObj
.
params
.
StuId
=
userData
.
AccountId
;
var
array
=
[];
array
.
push
(
jsonObj
.
params
);
console
.
log
(
"jsonObj.params"
,
jsonObj
.
params
)
let
result
=
getSweepCode
(
array
);
if
(
result
)
{
// console.log(result)
if
(
result
.
Code
==
1
)
{
console
.
log
(
'扫码成功'
)
uni
.
navigateTo
({
url
:
'./success'
,
})
}
else
{
console
.
log
(
'扫码失败'
)
uni
.
navigateTo
({
url
:
'./fail'
})
}
}
}
}
},
});
});
},
},
async
getActivityData
()
{
async
getActivityData
()
{
...
@@ -278,12 +364,12 @@
...
@@ -278,12 +364,12 @@
}
}
},
},
jumpJiahemini
()
{
jumpJiahemini
()
{
let
userinfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
userinfo
=
uni
.
getStorageSync
(
'userInfo'
);
wx
.
navigateToMiniProgram
({
wx
.
navigateToMiniProgram
({
appId
:
'wx38e054ee42b054f4'
,
appId
:
'wx38e054ee42b054f4'
,
path
:
''
,
//为空则打开首页
path
:
''
,
//为空则打开首页
extraData
:
{
extraData
:
{
Id
:
userinfo
.
Id
||
0
Id
:
userinfo
.
Id
||
0
}
}
})
})
...
@@ -326,18 +412,21 @@
...
@@ -326,18 +412,21 @@
background-color
:
#F5F5F5
;
background-color
:
#F5F5F5
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.wenjuan_dc
{
.wenjuan_dc
{
position
:
fixed
;
position
:
fixed
;
width
:
83
rpx
;
width
:
83
rpx
;
height
:
83
rpx
;
height
:
83
rpx
;
right
:
30
rpx
;
right
:
30
rpx
;
bottom
:
200
rpx
;
bottom
:
200
rpx
;
z-index
:
999
;
z-index
:
999
;
}
}
.wenjuan_dc
img
{
width
:
100%
;
.wenjuan_dc
img
{
height
:
100%
;
width
:
100%
;
height
:
100%
;
}
}
.navbarSticky
{
.navbarSticky
{
display
:
sticky
;
display
:
sticky
;
top
:
0
;
top
:
0
;
...
...
src/pages/word/test.vue
View file @
e9c98390
...
@@ -73,10 +73,6 @@
...
@@ -73,10 +73,6 @@
changeSwiper
(
val
)
{
changeSwiper
(
val
)
{
data
.
curTest
=
val
.
detail
.
current
;
data
.
curTest
=
val
.
detail
.
current
;
const
total
=
data
.
reviewGroupList
.
length
+
data
.
prepGroupList
.
length
const
total
=
data
.
reviewGroupList
.
length
+
data
.
prepGroupList
.
length
if
(
data
.
curTest
==
total
)
{
methods
.
submitWordsTest
()
uni
.
removeStorageSync
(
"testData"
,
obj
);
}
let
obj
=
{
let
obj
=
{
CourseId
:
data
.
msg
.
CourseId
,
CourseId
:
data
.
msg
.
CourseId
,
ChapterId
:
data
.
msg
.
ChapterId
,
ChapterId
:
data
.
msg
.
ChapterId
,
...
@@ -84,6 +80,10 @@
...
@@ -84,6 +80,10 @@
index
:
data
.
curTest
index
:
data
.
curTest
}
}
uni
.
setStorageSync
(
"testData"
,
obj
);
uni
.
setStorageSync
(
"testData"
,
obj
);
if
(
data
.
curTest
==
total
)
{
uni
.
removeStorageSync
(
"testData"
);
methods
.
submitWordsTest
()
}
},
},
next
(
val
,
item
)
{
next
(
val
,
item
)
{
if
(
val
)
{
if
(
val
)
{
...
...
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