Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
console
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
console
Commits
3537c44c
Commit
3537c44c
authored
Dec 30, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2041df27
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
52 deletions
+27
-52
app/app.service.ts
app/app.service.ts
+4
-3
app/apps.component.html
app/apps.component.html
+10
-8
app/apps.component.ts
app/apps.component.ts
+1
-2
app/mycard.component.html
app/mycard.component.html
+5
-27
app/routing.module.ts
app/routing.module.ts
+2
-2
index.html
index.html
+1
-1
public/stylesheets/style.css
public/stylesheets/style.css
+2
-7
server.ts
server.ts
+2
-2
No files found.
app/app.service.ts
View file @
3537c44c
...
...
@@ -11,9 +11,10 @@ export class AppService {
}
async
getApps
():
Promise
<
App
[]
>
{
return
this
.
http
.
get
(
'
http://localhost/apps
'
).
map
((
response
)
=>
{
return
response
.
json
();
getApps
():
Promise
<
App
[]
>
{
return
this
.
http
.
get
(
'
http://localhost:8000/apps
'
).
map
((
response
)
=>
{
console
.
log
({
"
id
"
:
"
byabyabya
"
});
return
[
<
App
>
{
"
id
"
:
"
byabyabya
"
}]
}).
toPromise
();
}
}
app/apps.component.html
View file @
3537c44c
<div
*ngIf=
"apps"
>
<ul>
<li
*ngFor=
"let app of apps"
>
{{app.id}}
</li>
</ul>
</div>
<md-list
*ngIf=
"apps"
>
<md-list-item
*ngFor=
"let app of apps"
>
<img
md-list-avatar
src=
"https://mycard.moe/logo.png"
alt=
"..."
>
<h3
md-line
>
{{app.id}}
</h3>
<p
md-line
>
<span>
{{app.id}}
</span>
<span
class=
"demo-2"
>
-- {{app.id}}
</span>
</p>
</md-list-item>
</md-list>
app/apps.component.ts
View file @
3537c44c
...
...
@@ -12,11 +12,10 @@ export class AppsComponent implements OnInit {
apps
:
App
[];
constructor
(
private
appService
:
AppService
)
{
console
.
log
(
module
);
}
async
ngOnInit
()
{
await
this
.
getApps
(
);
console
.
log
(
await
this
.
getApps
()
);
}
async
getApps
()
{
...
...
app/mycard.component.html
View file @
3537c44c
<nav
_ngcontent-ere-195=
""
class=
"docs-navbar"
>
<a
_ngcontent-ere-195=
""
aria-label=
"Angular Material"
md-button=
""
routerlink=
"/"
href=
"/"
aria-disabled=
"false"
tabindex=
"0"
><span
class=
"md-button-wrapper"
>
<img
_ngcontent-ere-195=
""
alt=
"Angular"
class=
"docs-angular-logo"
src=
"../../../assets/img/homepage/angular-white-transparent.svg"
>
<span
_ngcontent-ere-195=
""
>
Material
</span>
</span>
<!--template bindings={}-->
<div
class=
"md-button-ripple"
md-ripple=
""
mdripplebackgroundcolor=
"rgba(0, 0, 0, 0)"
>
<div
class=
"md-ripple-background"
></div>
</div>
<div
class=
"md-button-focus-overlay"
></div>
</a>
<a
_ngcontent-ere-195=
""
md-button=
""
routerlink=
"components"
href=
"/components"
aria-disabled=
"false"
tabindex=
"0"
><span
class=
"md-button-wrapper"
>
Components
</span>
<!--template bindings={}-->
<div
class=
"md-button-ripple"
md-ripple=
""
mdripplebackgroundcolor=
"rgba(0, 0, 0, 0)"
>
<div
class=
"md-ripple-background"
></div>
</div>
<div
class=
"md-button-focus-overlay"
></div>
</a>
<a
_ngcontent-ere-195=
""
md-button=
""
routerlink=
"guides"
href=
"/guides"
aria-disabled=
"false"
tabindex=
"0"
><span
class=
"md-button-wrapper"
>
Guides
</span>
<!--template bindings={}-->
<div
class=
"md-button-ripple"
md-ripple=
""
mdripplebackgroundcolor=
"rgba(0, 0, 0, 0)"
>
<div
class=
"md-ripple-background"
></div>
</div>
<div
class=
"md-button-focus-overlay"
></div>
</a>
</nav>
<md-toolbar
color=
"primary"
>
<a
md-button
routerLink=
"/"
>
MyCard 开发者控制台
</a>
<a
md-button
routerLink=
"/apps"
>
应用
</a>
<a
md-button
routerLink=
"/apps"
>
捆绑包
</a>
</md-toolbar>
<router-outlet></router-outlet>
\ No newline at end of file
app/routing.module.ts
View file @
3537c44c
...
...
@@ -7,8 +7,8 @@ import {AppsComponent} from './apps.component';
const
routes
:
Routes
=
[
{
path
:
''
,
redirectTo
:
'
/apps
/1
'
,
pathMatch
:
'
full
'
},
{
path
:
'
apps
/:id
'
,
component
:
AppsComponent
},
{
path
:
''
,
redirectTo
:
'
/apps
'
,
pathMatch
:
'
full
'
},
{
path
:
'
apps
'
,
component
:
AppsComponent
},
];
@
NgModule
({
...
...
index.html
View file @
3537c44c
<!DOCTYPE html>
<html>
<head>
<title>
MyCard
Console
</title>
<title>
MyCard
开发者控制台
</title>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<base
href=
"/"
>
...
...
public/stylesheets/style.css
View file @
3537c44c
body
{
padding
:
50px
;
font
:
14px
"Lucida Grande"
,
Helvetica
,
Arial
,
sans-serif
;
}
a
{
color
:
#00B7FF
;
}
margin
:
0
;
}
\ No newline at end of file
server.ts
View file @
3537c44c
...
...
@@ -7,7 +7,7 @@ import packages from './routes/packages';
import
bodyParser
=
require
(
'
koa-bodyparser
'
);
import
Mongorito
=
require
(
'
mongorito
'
);
const
url
=
'
mongodb://127.0.0.1:27017/mycard
'
;
const
url
=
require
(
'
./mongodb_config.json
'
).
dbSettings
.
connectionString
;
const
app
=
new
Koa
();
...
...
@@ -47,5 +47,5 @@ app.use(users.routes());
app
.
use
(
apps
.
routes
());
app
.
use
(
packages
.
routes
());
Mongorito
.
connect
(
url
).
then
(()
=>
{
app
.
listen
(
80
);
app
.
listen
(
80
00
);
});
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