Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
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
android
uniapp_vedio
Commits
151be183
Commit
151be183
authored
Jun 03, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
2b43b53b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
387 additions
and
371 deletions
+387
-371
util.js
vedio/common/utils/util.js
+361
-361
c-list.vue
vedio/components/c-list/c-list.vue
+13
-3
c-shelf-empty.vue
vedio/components/c-shelf-empty/c-shelf-empty.vue
+5
-4
home.vue
vedio/pages/home.vue
+8
-3
No files found.
vedio/common/utils/util.js
View file @
151be183
This diff is collapsed.
Click to expand it.
vedio/components/c-list/c-list.vue
View file @
151be183
...
@@ -126,7 +126,17 @@
...
@@ -126,7 +126,17 @@
},
},
computed
:
{
computed
:
{
showEmpty
:
function
()
{
showEmpty
:
function
()
{
return
isEmpty
(
this
.
dataList
);
console
.
log
(
this
.
dataList
)
if
(
isEmpty
(
this
.
dataList
))
{
return
true
}
else
{
if
(
typeof
this
.
dataList
==
'object'
)
{
if
(
this
.
dataList
.
list
!=
undefined
)
{
return
isEmpty
(
this
.
dataList
.
list
)
}
}
}
return
false
},
},
scrollStyle
:
function
()
{
scrollStyle
:
function
()
{
return
{
return
{
...
@@ -290,8 +300,8 @@
...
@@ -290,8 +300,8 @@
...
param
,
...
param
,
...
this
.
param
...
this
.
param
}
}
}
}
apiRequest
({
apiRequest
({
url
:
this
.
url
,
url
:
this
.
url
,
method
:
this
.
method
||
"GET"
,
method
:
this
.
method
||
"GET"
,
...
...
vedio/components/c-shelf-empty/c-shelf-empty.vue
View file @
151be183
...
@@ -19,10 +19,11 @@
...
@@ -19,10 +19,11 @@
};
};
},
},
methods
:
{
methods
:
{
goWareHouse
()
{
goWareHouse
()
{
uni
.
switchTab
({
uni
.
$emit
(
'goWareHouse'
)
url
:
'/pages/warehouse/warehouse'
// uni.switchTab({
});
// url: '/pages/warehouse/warehouse'
// });
}
}
},
},
}
}
...
...
vedio/pages/home.vue
View file @
151be183
...
@@ -86,6 +86,11 @@
...
@@ -86,6 +86,11 @@
mounted
()
{
mounted
()
{
// 渲染完成 初始化首页数据
// 渲染完成 初始化首页数据
this
.
loadComponentData
();
this
.
loadComponentData
();
let
that
=
this
uni
.
$on
(
'goWareHouse'
,
function
(
data
)
{
that
.
tabChange
(
1
)
})
},
},
methods
:
{
methods
:
{
tabChange
(
index
)
{
tabChange
(
index
)
{
...
@@ -93,14 +98,14 @@
...
@@ -93,14 +98,14 @@
this
.
currentPage
=
index
;
this
.
currentPage
=
index
;
this
.
loadComponentData
();
this
.
loadComponentData
();
},
},
loadComponentData
()
{
loadComponentData
()
{
if
(
this
.
currentPage
==
0
)
{
if
(
this
.
currentPage
==
0
)
{
this
.
$refs
.
index
.
show
();
this
.
$refs
.
index
.
show
();
}
else
if
(
this
.
currentPage
==
1
)
{
}
else
if
(
this
.
currentPage
==
1
)
{
this
.
$refs
.
recommend
.
show
();
this
.
$refs
.
recommend
.
show
();
}
else
if
(
this
.
currentPage
==
2
)
{
}
else
if
(
this
.
currentPage
==
2
)
{
this
.
$refs
.
user
.
show
();
this
.
$refs
.
user
.
show
();
}
}
}
}
}
}
}
}
...
...
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