Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
U
uni-app-base
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
tangfh
uni-app-base
Commits
70e66e07
Commit
70e66e07
authored
Jun 19, 2023
by
tangfh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+
parent
b18e59ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
base-tab.vue
pages/template/base-tab.vue
+6
-7
No files found.
pages/template/base-tab.vue
View file @
70e66e07
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<swiper-item
class=
"swiper-item"
v-for=
"(tab,index) in tabList"
:key=
"index"
>
<swiper-item
class=
"swiper-item"
v-for=
"(tab,index) in tabList"
:key=
"index"
>
<scroll-view
class=
"scroll-v"
scroll-y
:refresher-enabled=
"true"
@
refresherrefresh=
"onRefresh()"
<scroll-view
class=
"scroll-v"
scroll-y
:refresher-enabled=
"true"
@
refresherrefresh=
"onRefresh()"
:enable-back-to-top=
"true"
:lower-threshold=
"75"
:refresher-triggered=
"tab.refreshing"
:enable-back-to-top=
"true"
:lower-threshold=
"75"
:refresher-triggered=
"tab.refreshing"
@
scrolltolower=
"
l
oadMore(index)"
:style=
"
{height: (swiperHeight) + 'px'}">
@
scrolltolower=
"
onL
oadMore(index)"
:style=
"
{height: (swiperHeight) + 'px'}">
<view
class=
"flex-column"
v-if=
"tab.data.length > 0"
:style=
"
{'min-height': (svHeight + 'rpx')}">
<view
class=
"flex-column"
v-if=
"tab.data.length > 0"
:style=
"
{'min-height': (svHeight + 'rpx')}">
<view
class=
"view-tmp1 active"
v-for=
"(item2, index2) in tab.data"
:index=
"index2"
:key=
"index2"
<view
class=
"view-tmp1 active"
v-for=
"(item2, index2) in tab.data"
:index=
"index2"
:key=
"index2"
:item=
"item2"
@
onItemClick=
"onItemClick"
></view>
:item=
"item2"
@
onItemClick=
"onItemClick"
></view>
...
@@ -131,13 +131,13 @@
...
@@ -131,13 +131,13 @@
tab
.
limit
=
10
;
tab
.
limit
=
10
;
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
more
;
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
more
;
tab
.
total_pages
=
1
;
tab
.
total_pages
=
1
;
tab
.
data
.
push
([{},{},{}]);
//
tab.data.push([{},{},{}]);
tab
.
channel
=
REPAIR_LIST_TYPE
.
wait_alloc
.
text
tab
.
channel
=
REPAIR_LIST_TYPE
.
wait_alloc
.
text
}
else
if
(
tabBar
.
type
==
REPAIR_LIST_TYPE
.
alloced
.
type
)
{
}
else
if
(
tabBar
.
type
==
REPAIR_LIST_TYPE
.
alloced
.
type
)
{
tab
.
limit
=
5
;
tab
.
limit
=
5
;
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
more
;
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
more
;
tab
.
total_pages
=
1
;
tab
.
total_pages
=
1
;
tab
.
data
.
push
([{},{},{},{},{},{}]);
//
tab.data.push([{},{},{},{},{},{}]);
tab
.
channel
=
REPAIR_LIST_TYPE
.
alloced
.
text
tab
.
channel
=
REPAIR_LIST_TYPE
.
alloced
.
text
}
}
if
(
tab
.
total_pages
==
1
)
{
if
(
tab
.
total_pages
==
1
)
{
...
@@ -177,7 +177,6 @@
...
@@ -177,7 +177,6 @@
}
}
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
loading
;
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
loading
;
tab
.
page
++
;
tab
.
page
++
;
tab
.
loadStatus
=
tab
.
page
>
tab
.
total_pages
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
this
.
getList
(
this
.
tabIndex
);
this
.
getList
(
this
.
tabIndex
);
},
},
getList
(
index
)
{
getList
(
index
)
{
...
@@ -226,15 +225,15 @@
...
@@ -226,15 +225,15 @@
// }
// }
// })
// })
if
(
tab
.
refreshing
||
tab
.
data
.
length
==
0
)
{
if
(
tab
.
refreshing
||
tab
.
data
.
length
==
0
)
{
tab
.
total_page
=
util
.
calTotalPage
(
data
.
total_list
);
tab
.
total_page
s
=
util
.
calTotalPage
(
data
.
total_list
);
this
.
clearTabData
(
this
.
tabIndex
);
this
.
clearTabData
(
this
.
tabIndex
);
tab
.
data
=
list
;
tab
.
data
=
list
;
tab
.
loadStatus
=
tab
.
total_page
==
1
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
tab
.
loadStatus
=
tab
.
total_page
s
==
1
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
}
else
if
(
tab
.
loadStatus
==
constant
.
LOAD_STATUS
.
loading
)
{
}
else
if
(
tab
.
loadStatus
==
constant
.
LOAD_STATUS
.
loading
)
{
if
(
list
.
length
>
0
)
{
if
(
list
.
length
>
0
)
{
tab
.
data
=
tab
.
data
.
concat
(
list
);
tab
.
data
=
tab
.
data
.
concat
(
list
);
}
}
tab
.
loadStatus
=
tab
.
page
==
tab
.
total_page
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
tab
.
loadStatus
=
tab
.
page
==
tab
.
total_page
s
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
}
}
tab
.
contentStatus
=
tab
.
data
.
length
==
0
?
constant
.
CONTENT_STATUS
.
EMPTY
:
{};
tab
.
contentStatus
=
tab
.
data
.
length
==
0
?
constant
.
CONTENT_STATUS
.
EMPTY
:
{};
},
},
...
...
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