Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
8124c02c
Commit
8124c02c
authored
Aug 04, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 需求变更
parent
3776d164
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
69 deletions
+55
-69
index.vue
src/components/notice-bar/index.vue
+52
-67
boundQuestions.vue
src/pages/learn/boundQuestions.vue
+3
-2
No files found.
src/components/notice-bar/index.vue
View file @
8124c02c
<
template
>
<view
class=
"u-flex top"
>
<!--
<view
class=
"u-flex avatar"
>
<view
class=
"avatar-list"
v-for=
"(item, index) in avatars"
:key=
"index"
>
<image
:src=
"item"
mode=
"aspectFill"
/>
</view>
</view>
-->
<image
:src=
"tongzhiImage"
class=
"notice-image"
/>
<view
class=
"notice"
>
<u-notice-bar
mode=
"vertical"
type=
"none"
font-size=
"24"
:list=
"
[noticeText]
"
:list=
"
list
"
color=
"#FFFFFF"
:volume-icon=
"false"
autoplay
...
...
@@ -25,6 +20,9 @@
export
default
{
data
()
{
return
{
times
:
[],
texts
:
[
''
,
''
,
''
,
''
],
list
:
[
''
,
''
,
''
,
''
],
avatars
:
[],
produceTime
:
1000
,
duration
:
60
*
1000
,
...
...
@@ -102,52 +100,48 @@ export default {
'烟花爆竹产品涉药作业'
,
]
},
noticeText
()
{
return
(
Math
.
ceil
(
this
.
produceTime
/
1000
/
60
)
+
'分钟前 '
+
this
.
surnames
[
this
.
$u
.
random
(
0
,
99
)]
+
'**'
+
'完成了"'
+
this
.
courses
[
this
.
$u
.
random
(
0
,
63
)]
+
'习题"练习'
)
},
defaultUrl
()
{
return
process
.
uniEnv
.
qn_base_url
+
'heads/'
},
tongzhiImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'tongzhi.png'
},
},
created
()
{
this
.
initData
()
this
.
beginNotic
(
this
.
$u
.
random
(
1
,
600
)
*
1000
)
this
.
beginNotic
()
},
methods
:
{
initData
()
{
var
a0
=
this
.
$u
.
random
(
0
,
49
)
var
a1
=
this
.
$u
.
random
(
0
,
49
)
if
(
a1
==
a0
)
a0
=
this
.
$u
.
random
(
0
,
49
)
var
a2
=
this
.
$u
.
random
(
0
,
49
)
if
([
a0
,
a1
].
indexOf
(
a2
)
!=
-
1
)
a2
=
this
.
$u
.
random
(
0
,
49
)
var
a3
=
this
.
$u
.
random
(
0
,
49
)
if
([
a0
,
a1
,
a2
].
indexOf
(
a3
)
!=
-
1
)
a3
=
this
.
$u
.
random
(
0
,
49
)
this
.
avatars
=
[
this
.
defaultUrl
+
(
a0
>
9
?
'a'
:
'a0'
)
+
String
(
a0
)
+
'.jpeg'
,
this
.
defaultUrl
+
(
a1
>
9
?
'a'
:
'a0'
)
+
String
(
a1
)
+
'.jpeg'
,
this
.
defaultUrl
+
(
a2
>
9
?
'a'
:
'a0'
)
+
String
(
a2
)
+
'.jpeg'
,
this
.
defaultUrl
+
(
a3
>
9
?
'a'
:
'a0'
)
+
String
(
a3
)
+
'.jpeg'
,
]
// this.list = [this.noticeText]
var
array
=
[]
for
(
var
i
=
0
;
i
<
4
;
i
++
)
{
array
.
push
(
this
.
$u
.
random
(
1
,
600
)
*
1000
)
this
.
texts
[
i
]
=
'分钟前 '
+
this
.
surnames
[
this
.
$u
.
random
(
0
,
99
)]
+
'**'
+
'完成了"'
+
this
.
courses
[
this
.
$u
.
random
(
0
,
63
)]
+
'习题"练习'
}
array
.
sort
((
a
,
b
)
=>
{
if
(
a
>
b
)
{
return
1
}
else
if
(
a
<
b
)
{
return
-
1
}
else
{
return
0
}
})
this
.
times
=
array
this
.
changeList
()
setInterval
(()
=>
{
this
.
produceTime
+=
this
.
duration
for
(
var
i
=
0
;
i
<
this
.
times
.
length
;
i
++
)
{
this
.
times
[
i
]
+=
this
.
duration
}
this
.
changeList
()
},
this
.
duration
)
},
beginNotic
(
time
)
{
beginNotic
()
{
var
after
=
this
.
$u
.
random
(
1
,
600
)
*
1000
this
.
produceTime
=
time
||
1000
setTimeout
(()
=>
{
this
.
produceData
()
...
...
@@ -155,19 +149,26 @@ export default {
},
after
)
},
produceData
()
{
var
array
=
this
.
avatars
.
slice
(
1
)
var
a0
=
this
.
$u
.
random
(
0
,
49
)
var
str
=
(
a0
>
9
?
'a'
:
'a0'
)
+
String
(
a0
)
+
'.jpeg'
for
(
var
item
of
this
.
avatars
)
{
if
(
item
.
indexOf
(
str
)
!=
-
1
)
{
a0
=
this
.
$u
.
random
(
0
,
49
)
str
=
(
a0
>
9
?
'a'
:
'a0'
)
+
String
(
a0
)
+
'.jpeg'
break
}
var
array
=
this
.
times
.
slice
(
0
,
3
)
this
.
times
=
[
this
.
$u
.
random
(
1
,
600
)
*
1000
,
...
array
]
var
arr
=
this
.
texts
.
slice
(
0
,
3
)
this
.
texts
=
[
'分钟前 '
+
this
.
surnames
[
this
.
$u
.
random
(
0
,
99
)]
+
'**'
+
'完成了"'
+
this
.
courses
[
this
.
$u
.
random
(
0
,
63
)]
+
'习题"练习'
,
...
arr
,
]
this
.
changeList
()
},
changeList
()
{
var
array
=
[
''
,
''
,
''
,
''
]
for
(
var
i
=
0
;
i
<
this
.
times
.
length
;
i
++
)
{
array
[
i
]
=
Math
.
ceil
(
this
.
times
[
i
]
/
1000
/
60
)
+
this
.
texts
[
i
]
}
this
.
avatars
=
[...
array
,
this
.
defaultUrl
+
str
]
// this.list = [this.noticeText]
this
.
list
=
array
},
},
}
...
...
@@ -181,22 +182,6 @@ export default {
width
:
48rpx
;
height
:
48rpx
;
}
// .avatar {
// .avatar-list {
// margin-left: -15rpx;
// display: flex;
// justify-content: flex-start;
// align-items: center;
// image {
// width: 44rpx;
// height: 44rpx;
// border: 2rpx solid #ccc;
// background: #fff;
// border-radius: 50%;
// margin-right: 1px;
// }
// }
// }
.notice
{
flex
:
1
;
width
:
100%
;
...
...
src/pages/learn/boundQuestions.vue
View file @
8124c02c
...
...
@@ -39,9 +39,10 @@
>
扫码自动绑定
</u-button>
<view
class=
"change-button"
@
click=
"$u.throttle(handleChange, 500)"
<!-- 暂时隐藏 -->
<!--
<view
class=
"change-button"
@
click=
"$u.throttle(handleChange, 500)"
>
手动输入卡号、密码绑定
</view
>
>
-->
</view>
<view>
<u-toast
ref=
"uToast"
/>
...
...
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