Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
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
郭成尧
2016-07-19 18:39:55 +0800
Commit
78b4741e6211f3edb3e47e84aad7388ea522ed07
1 parent
7b651694
组件调用
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
22 deletions
apps/channel/controllers/brand.js
apps/channel/router.js
public/vue/channel/letter-list.vue
apps/channel/controllers/brand.js
View file @
78b4741
...
...
@@ -49,6 +49,10 @@ const component = {
{
id
:
'E'
,
name
:
'E'
},
{
id
:
'F'
,
name
:
'F'
}
]
);
...
...
apps/channel/router.js
View file @
78b4741
...
...
@@ -14,5 +14,6 @@ const router = expressRouter();
router
.
get
(
'/'
,
channel
.
index
);
// 首页
router
.
get
(
'/brand'
,
channel
.
brand
);
// 店铺首页
router
.
get
(
'/brand/letterList'
,
channel
.
letterList
);
// 店铺首页
module
.
exports
=
router
;
...
...
public/vue/channel/letter-list.vue
View file @
78b4741
...
...
@@ -26,32 +26,22 @@
</style>
<script>
var $ = require('yoho-jquery');
module.exports = {
data: function () {
return {
items: [
{
id: 'A',
name: 'A'
},
{
id: 'B',
name: 'B'
},
{
id: 'C',
name: 'C'
},
{
id: 'D',
name: 'D'
},
{
id: 'E',
name: 'E'
}
]
items: []
}
},
init() {
$.ajax({
url: '/brand/letterList'
}).then(result => {
this.items = result;
}).fail(() => {
tip('网络错误');
});
}
};
...
...
Please
register
or
login
to post a comment