Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Tao
5 years ago
Commit
987ead828185cd92162dfd954bc16783959a89bd
1 parent
e3a05458
modify news tips
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
16 deletions
apps/pages/home/channel/channel.vue
apps/pages/home/indexPage/components/tabs.vue
apps/store/home/channel.js
config/home-api-map.js
apps/pages/home/channel/channel.vue
View file @
987ead8
...
...
@@ -133,7 +133,6 @@ export default {
this.fetchChannelList();
}
this.init();
this.getAllInboxCatInfo();
this.PAGE_URL = window.location.href;
...
...
@@ -152,7 +151,7 @@ export default {
this.refreshProductList(this.active);
},
methods: {
...mapActions(['fetchChannelList'
,'getAllInboxCatInfo'
]),
...mapActions(['fetchChannelList']),
...mapActionsList(['fetchProductList']),
init() {
this.$nextTick(() => {
...
...
apps/pages/home/indexPage/components/tabs.vue
View file @
987ead8
...
...
@@ -12,7 +12,7 @@
<script>
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('home/channel');
const { mapState
, mapActions
} = createNamespacedHelpers('home/channel');
import Widget from './widget';
export default {
...
...
@@ -36,12 +36,16 @@ export default {
},
...mapState(['showMsg'])
},
watch: {
'showMsg':function(sss) {
console.log(sss);
}
activated() {
this.getAllInboxCatInfo();
},
// watch: {
// 'showMsg':function(sss) {
// console.log(sss);
// }
// },
methods: {
...mapActions(['getAllInboxCatInfo']),
onClick(index) {
this.$emit('click', index);
}
...
...
apps/store/home/channel.js
View file @
987ead8
...
...
@@ -54,12 +54,11 @@ export default function() {
Vue
.
set
(
state
.
channelList
,
'page'
,
productlist
.
page
);
},
[
Types
.
FETCH_NEWSACTIVE
](
state
,
{
list
})
{
state
.
showMsg
=
false
;
list
&&
list
.
map
((
item
)
=>
{
if
(
item
.
id
===
6
&&
item
.
unReadCount
>
0
)
{
if
(
item
.
unReadCount
>
0
)
{
state
.
showMsg
=
true
;
}
else
{
state
.
showMsg
=
false
;
}
}
});
},
},
...
...
@@ -88,10 +87,10 @@ export default function() {
}
},
async
getAllInboxCatInfo
({
commit
})
{
const
result
=
await
this
.
$api
.
get
(
'/api/ufo/home/
getAllInboxCat
Info'
,
{});
const
result
=
await
this
.
$api
.
get
(
'/api/ufo/home/
listInboxType
Info'
,
{});
if
(
result
.
code
===
200
)
{
commit
(
Types
.
FETCH_NEWSACTIVE
,
{
list
:
result
.
data
.
list
});
commit
(
Types
.
FETCH_NEWSACTIVE
,
{
list
:
result
.
data
||
[]
});
}
}
},
...
...
config/home-api-map.js
View file @
987ead8
...
...
@@ -132,10 +132,10 @@ module.exports = {
api
:
'ufo.user.getUserAliPayAccountInfo'
,
param
:
{}
},
'/api/ufo/home/getAllInboxCatInfo'
:
{
// ufo: true,
'/api/ufo/home/listInboxTypeInfo'
:
{
ufo
:
true
,
auth
:
true
,
api
:
'
app.inbox.getAllInboxCat
Info'
,
api
:
'
ufo.users.listInboxType
Info'
,
param
:
{}
},
};
...
...
Please
register
or
login
to post a comment