Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
1ae8dc89
Commit
1ae8dc89
authored
Aug 27, 2021
by
wanghuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loadingbar
parent
065b1888
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
299 additions
and
10 deletions
+299
-10
GoodsList.jsx
c_client/src/components/_tb_comps/GoodsList/GoodsList.jsx
+25
-3
GoodsList.module.less
.../src/components/_tb_comps/GoodsList/GoodsList.module.less
+33
-0
LoadingBar.jsx
c_client/src/components/_tb_comps/LoadingBar/LoadingBar.jsx
+19
-0
LoadingBar.module.less
...rc/components/_tb_comps/LoadingBar/LoadingBar.module.less
+33
-0
const.js
c_client/src/const.js
+1
-1
browseGoods.jsx
c_client/src/pages/packageGood/browseGoods/browseGoods.jsx
+188
-6
No files found.
c_client/src/components/_tb_comps/GoodsList/GoodsList.jsx
View file @
1ae8dc89
import
React
,
{
useState
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
{
View
,
Image
,
ScrollView
}
from
'@tarojs/components'
import
classnames
from
'classnames'
import
tbccTs
from
'tbcc-sdk-ts'
const
{
openDetail
}
=
tbccTs
.
tb
import
styles
from
'./GoodsList.module.less'
import
LoadingBar
from
'../LoadingBar/LoadingBar'
function
GoodsList
(
props
)
{
const
{
...
...
@@ -16,10 +17,12 @@ function GoodsList(props) {
no_collect
:
'//yun.dui88.com/taobaomini/clientCTest/collection_no_collect@2x.png'
,
img
:
'//yun.dui88.com/taobaomini/clientCTest/goods_img@2x.png'
},
color
:
'#181818'
color
:
'#181818'
,
loadFlag
:
"DEFAULT"
},
onOpenDetail
,
onCompleteTask
onCompleteTask
,
count
}
=
props
const
goToGoodsDetail
=
async
(
item
)
=>
{
...
...
@@ -69,6 +72,25 @@ function GoodsList(props) {
)
})
}
{
task
.
loadFlag
&&
<
View
className=
{
styles
[
'browse_loading'
]
}
>
{
task
.
loadFlag
==
'NUMBER'
&&
<>
<
View
className=
{
styles
[
'count_img'
]
}
>
<
View
className=
{
styles
[
'count_time'
]
}
>
{
count
}
s
</
View
>
</
View
>
</>
}
{
task
.
loadFlag
==
'PICTURE'
&&
<
LoadingBar
/>
}
</
View
>
}
</
View
>
</
ScrollView
>
)
...
...
c_client/src/components/_tb_comps/GoodsList/GoodsList.module.less
View file @
1ae8dc89
...
...
@@ -6,6 +6,7 @@
display: flex;
flex-wrap: wrap;
}
.content-item {
width: 340px;
height: 510px;
...
...
@@ -77,4 +78,36 @@
right: 19px;
background: #eee;
}
.browse_loading{
width: 200px;
height: 200px;
position: fixed;
right: 20px;
top: 400px;
border: 1px solid cyan;
box-sizing: border-box;
}
.count_img{
width: 100%;
height: 100%;
border: 1px solid rgb(47, 131, 99);
box-sizing: border-box;
background-image: url('//yun.dui88.com/7f705da9-5f16-4cf1-a239-3903c5c23995.png');
.image-property(contain, center center);
}
.count_time{
width: 100px;
height: 60px;
line-height: 60px;
margin: 40px auto 0;
border: 1px solid cyan;
box-sizing: border-box;
font-size: 40px;
font-weight: 600;
color: #000;
text-align: center;
}
\ No newline at end of file
c_client/src/components/_tb_comps/LoadingBar/LoadingBar.jsx
0 → 100644
View file @
1ae8dc89
import
React
,{
useState
,
useEffect
}
from
'react'
import
{
View
,
Image
,
Text
}
from
'@tarojs/components'
import
styles
from
'./LoadingBar.module.less'
const
LoadingBar
=
(
props
)
=>
{
const
{
bg
=
'https://yun.duiba.com.cn/spark/assets/5a725b9e4ebf436a0a92c6317a5a4e47d87c8c1f.png'
,
bgTop
=
'https://yun.duiba.com.cn/spark/assets/ccc405e28a5140d3aff9dff27b97fa5fb6bd7ff5.png'
}
=
props
;
return
(
<
View
className=
{
styles
[
'load_container'
]
}
>
<
View
className=
{
styles
[
'load_content'
]
}
>
<
View
className=
{
styles
[
'load_bg'
]
}
style=
{
{
backgroundImage
:
`url(${bg})`
}
}
></
View
>
<
View
className=
{
styles
[
'load_top'
]
}
style=
{
{
backgroundImage
:
`url(${bgTop})`
}
}
></
View
>
</
View
>
</
View
>
)
}
export
default
LoadingBar
\ No newline at end of file
c_client/src/components/_tb_comps/LoadingBar/LoadingBar.module.less
0 → 100644
View file @
1ae8dc89
.load_container{
.load_content{
width: 200px;
height: 80px;
margin: 0 auto;
overflow: hidden;
}
.load_bg,
.load_top{
width: 200px;
height: 60px;
position: absolute;
background-size: cover;
background-repeat: no-repeat;
}
.load_top{
animation: move 15s linear forwards;
}
}
@keyframes move {
0%{
clip-path: inset(0% 0% 0% 0%);
}
99%{
opacity: 1;
}
100%{
clip-path: inset(0% 100% 0% 0%);
opacity: 0;
}
}
\ No newline at end of file
c_client/src/const.js
View file @
1ae8dc89
...
...
@@ -97,7 +97,7 @@ export const TASK_CONFIG = {
},
jumpLinkType
:
1
,
// 1 跳转浏览15s 才算完成 2 跳转即算完成
browseTime
:
15
,
// 浏览时间
browseGoodType
:
3
,
// 1 浏览15s 才算完成 2 点击就算完成任务 3 浏览指定商品详情页 15s
browseGoodType
:
1
,
// 1 浏览15s 才算完成 2 点击就算完成任务 3 浏览指定商品详情页 15s
showTaskType
:
1
,
// 1 弹窗 2 列表
orderGoodType
:
1
,
// 1 集合页下单 2 跳转店铺
}
...
...
c_client/src/pages/packageGood/browseGoods/browseGoods.jsx
View file @
1ae8dc89
This diff is collapsed.
Click to expand it.
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