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
c9610869
Commit
c9610869
authored
Aug 16, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化样式,不默认收藏
parent
2e673af8
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
71 additions
and
68 deletions
+71
-68
App.vue
vedio/App.vue
+1
-1
userServices.js
vedio/common/services/userServices.js
+2
-3
bookcity.vue
vedio/components/bookcity/bookcity.vue
+20
-2
index.js
vedio/components/bookcity/services/index.js
+9
-2
bookshelf.vue
vedio/components/bookshelf/bookshelf.vue
+10
-8
bookshelf-list.vue
vedio/components/bookshelf/components/bookshelf-list.vue
+1
-2
index.js
vedio/components/warehouse/services/index.js
+15
-22
warehouse.vue
vedio/components/warehouse/warehouse.vue
+11
-26
common.js
vedio/mixins/common.js
+2
-2
No files found.
vedio/App.vue
View file @
c9610869
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
this
.
globalData
.
bottomSafePadding
=
Math
.
max
(
res
.
screenHeight
-
res
.
safeArea
.
bottom
,
12
);
this
.
globalData
.
bottomSafePadding
=
Math
.
max
(
res
.
screenHeight
-
res
.
safeArea
.
bottom
,
12
);
// #endif
// #endif
try
{
try
{
let
value
=
uni
.
getStorageSync
(
'token'
)
||
''
;
let
value
=
uni
.
getStorageSync
(
"TOKEN"
)
||
''
;
let
inviteUId
=
uni
.
getStorageSync
(
'inviteUId'
)
||
''
;
let
inviteUId
=
uni
.
getStorageSync
(
'inviteUId'
)
||
''
;
if
(
!
inviteUId
&&
options
.
query
.
inviteUId
)
{
if
(
!
inviteUId
&&
options
.
query
.
inviteUId
)
{
...
...
vedio/common/services/userServices.js
View file @
c9610869
...
@@ -247,8 +247,7 @@ function saveToken(token) {
...
@@ -247,8 +247,7 @@ function saveToken(token) {
function
readToken
()
{
function
readToken
()
{
if
(
!
LOCAL_TOKEN
)
{
if
(
!
LOCAL_TOKEN
)
{
// LOCAL_TOKEN = readStorage(KEY_STORAGE_TOKEN)
LOCAL_TOKEN
=
readStorage
(
KEY_STORAGE_TOKEN
)
LOCAL_TOKEN
=
readStorage
(
'token'
)
}
}
return
LOCAL_TOKEN
;
return
LOCAL_TOKEN
;
}
}
...
...
vedio/components/bookcity/bookcity.vue
View file @
c9610869
...
@@ -9,6 +9,12 @@
...
@@ -9,6 +9,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
gotoBookContentPage
}
from
'../../common/services/page-route'
import
{
getFirstShow
}
from
"./services/index.js"
import
RecommendList
from
"../recommend-list/recommend-list.vue"
;
import
RecommendList
from
"../recommend-list/recommend-list.vue"
;
import
Banner
from
"../banner/banner.vue"
;
import
Banner
from
"../banner/banner.vue"
;
import
SystemInfoMixin
from
"../../common/mixins/system-info-mixin.js"
import
SystemInfoMixin
from
"../../common/mixins/system-info-mixin.js"
...
@@ -34,10 +40,22 @@
...
@@ -34,10 +40,22 @@
},
},
methods
:
{
methods
:
{
show
()
{
show
()
{
this
.
getFirstShowData
();
},
},
hide
()
{
hide
()
{
},
getFirstShowData
()
{
getFirstShow
((
success
,
data
)
=>
{
if
(
success
)
{
setTimeout
(()
=>
{
// 匹配用户直接跳转小说
if
(
data
.
articleMsg
!=
null
)
{
gotoBookContentPage
(
data
.
articleMsg
.
id
,
data
.
articleMsg
.
shortis
);
}
},
800
);
}
})
},
},
initData
()
{
initData
()
{
this
.
refreshList
();
this
.
refreshList
();
...
...
vedio/components/bookcity/services/index.js
View file @
c9610869
...
@@ -3,6 +3,13 @@ import {
...
@@ -3,6 +3,13 @@ import {
apiPOST
apiPOST
}
from
"../../../common/utils/apiRequest.js"
}
from
"../../../common/utils/apiRequest.js"
function
getFirstShow
(
callback
)
{
apiPOST
({
url
:
"/book/firstArticle"
,
callback
})
}
module
.
exports
=
{
module
.
exports
=
{
getFirstShow
}
}
\ No newline at end of file
vedio/components/bookshelf/bookshelf.vue
View file @
c9610869
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
this
.
initData
();
this
.
initData
();
// 监听收藏变动
// 监听收藏变动
watchCollectionChange
(()
=>
{
watchCollectionChange
(()
=>
{
this
.
refresh
Lis
t
();
this
.
refresh
Collec
t
();
},
this
);
},
this
);
},
},
onShow
()
{
onShow
()
{
...
@@ -55,19 +55,21 @@
...
@@ -55,19 +55,21 @@
},
},
initData
()
{
initData
()
{
this
.
refreshList
();
this
.
refreshCollect
();
this
.
refreshBook
();
},
},
// 刷新数据列表
refreshCollect
()
{
refreshList
()
{
let
ref2
=
this
.
$refs
.
recommendList
;
if
(
ref2
)
{
ref2
.
refreshList
();
}
let
ref
=
this
.
$refs
.
bookList
;
let
ref
=
this
.
$refs
.
bookList
;
if
(
ref
)
{
if
(
ref
)
{
ref
.
refreshList
();
ref
.
refreshList
();
}
}
},
},
refreshBook
()
{
let
ref
=
this
.
$refs
.
recommendList
;
if
(
ref
)
{
ref
.
refreshList
();
}
},
initHeight
()
{
initHeight
()
{
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
query
.
exec
((
res
)
=>
{
query
.
exec
((
res
)
=>
{
...
...
vedio/components/bookshelf/components/bookshelf-list.vue
View file @
c9610869
...
@@ -132,7 +132,6 @@
...
@@ -132,7 +132,6 @@
}
}
}
}
}
}
console
.
log
(
'AAAA'
+
str
)
collectionBook
(
false
,
str
,
(
success
,
data
)
=>
{
collectionBook
(
false
,
str
,
(
success
,
data
)
=>
{
if
(
success
)
{
if
(
success
)
{
...
...
vedio/components/warehouse/services/index.js
View file @
c9610869
...
@@ -10,14 +10,7 @@ function getCategorys(callback) {
...
@@ -10,14 +10,7 @@ function getCategorys(callback) {
})
})
}
}
function
getFirstShow
(
callback
)
{
apiPOST
({
url
:
"/book/firstArticle"
,
callback
})
}
module
.
exports
=
{
module
.
exports
=
{
getCategorys
,
getCategorys
getFirstShow
}
}
\ No newline at end of file
vedio/components/warehouse/warehouse.vue
View file @
c9610869
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
gotoBookContentPage
gotoBookContentPage
}
from
'../../common/services/page-route'
}
from
'../../common/services/page-route'
import
{
import
{
getCategorys
,
getCategorys
getFirstShow
}
from
"./services/index.js"
}
from
"./services/index.js"
import
{
import
{
isEmpty
isEmpty
...
@@ -48,8 +47,9 @@
...
@@ -48,8 +47,9 @@
currentIndex
:
0
,
currentIndex
:
0
,
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{},
onReady
()
{
this
.
getCategoryData
()
},
},
computed
:
{
computed
:
{
showEmpty
:
function
()
{
showEmpty
:
function
()
{
...
@@ -83,16 +83,14 @@
...
@@ -83,16 +83,14 @@
},
},
methods
:
{
methods
:
{
show
()
{
show
()
{
this
.
getFirstShowData
();
// if (wx.setVisualEffectOnCapture) {
this
.
getCategoryData
();
// wx.setVisualEffectOnCapture({
if
(
wx
.
setVisualEffectOnCapture
)
{
// visualEffect: 'hidden',
wx
.
setVisualEffectOnCapture
({
// success: (res) => {
visualEffect
:
'hidden'
,
success
:
(
res
)
=>
{
},
//
},
})
//
})
}
//
}
},
},
hide
()
{
hide
()
{
...
@@ -102,19 +100,6 @@
...
@@ -102,19 +100,6 @@
this
.
initHeight
()
this
.
initHeight
()
},
300
)
},
300
)
},
},
getFirstShowData
()
{
getFirstShow
((
success
,
data
)
=>
{
if
(
success
)
{
setTimeout
(()
=>
{
// 匹配用户直接跳转小说
if
(
data
.
articleMsg
!=
null
)
{
gotoBookContentPage
(
data
.
articleMsg
.
id
,
data
.
articleMsg
.
shortis
);
}
},
800
);
}
})
},
getCategoryData
()
{
getCategoryData
()
{
getCategorys
((
success
,
data
)
=>
{
getCategorys
((
success
,
data
)
=>
{
if
(
success
)
{
if
(
success
)
{
...
...
vedio/mixins/common.js
View file @
c9610869
...
@@ -80,7 +80,7 @@ export default {
...
@@ -80,7 +80,7 @@ export default {
// navigateTo('user/login?redirect=' + encodeURIComponent(redirect));
// navigateTo('user/login?redirect=' + encodeURIComponent(redirect));
},
},
logout
()
{
logout
()
{
uni
.
removeStorageSync
(
'token'
);
// uni.removeStorageSync("TOKEN"
);
},
},
post
(
options
)
{
post
(
options
)
{
options
=
Object
.
assign
({
options
=
Object
.
assign
({
...
...
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