Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-h5-ailipay
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b22a2565
authored
Jan 14, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
112c52c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
53 deletions
src/components/Tab.vue
src/mixins/pageMixin.js
src/components/Tab.vue
View file @
b22a256
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
title-inactive-color=
"#BBB"
title-inactive-color=
"#BBB"
title-active-color=
"#2c2c2c"
title-active-color=
"#2c2c2c"
@
click=
"click"
@
click=
"click"
:key=
"updata"
>
>
<template
v-for=
"(i,index) in data"
>
<template
v-for=
"(i,index) in data"
>
<van-tab
<van-tab
...
@@ -33,7 +32,10 @@ export default {
...
@@ -33,7 +32,10 @@ export default {
type
:
Number
,
type
:
Number
,
default
:
0
default
:
0
},
},
updata
:
null
updata
:
{
type
:
Number
,
default
:
new
Date
().
getTime
()
}
},
},
data
()
{
data
()
{
return
{
return
{
...
...
src/mixins/pageMixin.js
View file @
b22a256
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
tabIndex
:
0
,
tabIndex
:
0
,
pageNum
:
1
,
pageNum
:
1
,
list
:
[],
list
:
[],
total
:
0
,
total
:
0
,
flag
:
false
,
flag
:
false
,
updata
:
new
Date
().
getTime
()
updata
:
new
Date
().
getTime
()
}
}
},
},
mounted
()
{
mounted
()
{
let
{
tabIndex
}
=
this
.
getQuery
()
let
{
tabIndex
}
=
this
.
getQuery
()
if
(
tabIndex
)
{
if
(
tabIndex
)
{
this
.
tabIndex
=
Number
(
tabIndex
)
this
.
tabIndex
=
Number
(
tabIndex
)
this
.
updata
=
new
Date
().
getTime
()
this
.
updata
=
new
Date
().
getTime
()
}
this
.
init
()
if
(
this
.
$route
.
meta
.
isTab
)
this
.
init
()
return
}
},
if
(
this
.
$route
.
meta
.
isTab
)
this
.
init
()
methods
:
{
},
init
()
{
methods
:
{
this
.
showLoading
()
init
()
{
let
{
tabIndex
,
pageNum
}
=
this
this
.
showLoading
()
this
[
`getList_
${
tabIndex
}
`
](
pageNum
)
let
{
tabIndex
,
pageNum
}
=
this
},
this
[
`getList_
${
tabIndex
}
`
](
pageNum
)
change
(
index
)
{
},
this
.
tabIndex
=
index
change
(
index
)
{
this
.
clearData
()
this
.
tabIndex
=
index
},
this
.
clearData
()
clearData
()
{
},
this
.
flag
=
false
clearData
()
{
this
.
pageNum
=
1
this
.
flag
=
false
this
.
list
=
[]
this
.
pageNum
=
1
if
(
this
.
$refs
.
scrollView
)
this
.
$refs
.
scrollView
.
finished
=
false
this
.
list
=
[]
this
.
init
()
if
(
this
.
$refs
.
scrollView
)
this
.
$refs
.
scrollView
.
finished
=
false
},
this
.
init
()
onReachBottom
()
{
},
let
{
total
,
pageNum
,
list
}
=
this
onReachBottom
()
{
this
.
$refs
.
scrollView
.
loading
=
false
let
{
total
,
pageNum
,
list
}
=
this
if
(
list
.
length
==
total
)
{
this
.
$refs
.
scrollView
.
loading
=
false
this
.
$refs
.
scrollView
.
finished
=
true
if
(
list
.
length
==
total
)
{
return
this
.
$refs
.
scrollView
.
finished
=
true
}
return
if
(
Math
.
ceil
(
total
/
10
)
>
pageNum
)
{
}
this
.
pageNum
=
pageNum
+
1
if
(
Math
.
ceil
(
total
/
10
)
>
pageNum
)
{
this
.
init
()
this
.
pageNum
=
pageNum
+
1
}
else
{
this
.
init
()
this
.
$refs
.
scrollView
.
finished
=
true
}
else
{
}
this
.
$refs
.
scrollView
.
finished
=
true
}
}
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment