Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
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
Ygopro Arena Web
Commits
f48746c4
Commit
f48746c4
authored
Apr 13, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
卡组
parent
10c44a0c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
53 deletions
+63
-53
src/api.js
src/api.js
+6
-0
src/assets/img/unknow.jpeg
src/assets/img/unknow.jpeg
+0
-0
src/components/Deck.vue
src/components/Deck.vue
+55
-52
src/components/Index.vue
src/components/Index.vue
+2
-1
No files found.
src/api.js
View file @
f48746c4
...
...
@@ -51,4 +51,10 @@ export default class Api {
return
Vue
.
http
.
get
(
`
${
tmp
}
/deckinfo`
,
{
'
params
'
:
opt
});
}
static
saveDeck
(
opt
)
{
var
tmp
=
"
http://localhost:3000/api
"
const
url
=
`
${
tmp
}
/deckinfo`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
}
src/assets/img/unknow.jpeg
0 → 100644
View file @
f48746c4
46.6 KB
src/components/Deck.vue
View file @
f48746c4
...
...
@@ -2,7 +2,7 @@
<div
class=
"content"
>
<div
class=
"container"
>
<div
class=
"fck"
>
<
!--
<
div
class=
"fck"
>
<form
id=
"search-form"
class=
"search-form"
@
submit.prevent=
"onSubmit"
>
<div
class=
"form-group"
v-bind:class=
"
{ 'has-error': hasError}">
<label
class=
"control-label"
for=
"searchText"
v-if=
"hasError"
>
{{
lang
.
battle
.
notfound
}}
</label>
...
...
@@ -16,47 +16,47 @@
</div>
</div>
</form>
</div>
</div>
-->
<div
class=
"row"
>
<div
class=
"col-md-12"
id=
"profile"
>
<div
class=
"col-md-4"
id=
"profile"
>
<div
class=
"thumbnail"
>
<img
v-bind:src=
"avatar_url"
style=
"height:
2
00px;margin-top:13px;"
>
<img
v-bind:src=
"avatar_url"
style=
"height:
3
00px;margin-top:13px;"
>
<div
class=
"caption"
>
<h3>
<i
class=
"glyphicon glyphicon-user"
></i>
<strong>
{{
username
}}
</strong></h3>
<p
class=
"text-muted"
style=
"font-size:20px;"
>
{{
form
.
desc
}}
。
</p>
<h3>
<!--
<i
class=
"glyphicon glyphicon-user"
></i>
-->
<strong>
{{
username
}}
</strong></h3>
<p
class=
"text-muted"
style=
"font-size:20px;"
>
{{
form
.
desc
}}
</p>
</div>
</div>
</div>
<div
class=
"col-md-8"
>
<i
class=
"el-icon-edit"
></i><el-button
type=
"text"
@
click=
"dialogFormVisible = true"
icon=
"el-icon-edit"
>
编辑
</el-button>
<div
class=
"alert alert-success alert-dismissible"
role=
"alert"
v-if=
"!isNew"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
您可以参与编辑此页面。
<i
class=
"el-icon-edit"
@
click.prevent=
"dialogFormVisible = true"
>
编辑
</i>
</div>
<div
class=
"alert alert-success alert-dismissible"
role=
"alert"
v-if=
"isNew"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
此卡组还未有任何信息。您可以参与编辑此页面。
<i
class=
"el-icon-edit"
@
click.prevent=
"dialogFormVisible = true"
>
编辑
</i>
</div>
<el-dialog
:title=
"username"
v-model=
"dialogFormVisible"
>
<el-form
:model=
"form"
>
<el-form-item
label=
"图片URL"
:label-width=
"formLabelWidth"
>
<el-input
v-model=
"avatar_url"
auto-complete=
"off"
></el-input>
</el-form-item>
<el-form-item
label=
"
活动区域
"
:label-width=
"formLabelWidth"
>
<el-select
v-model=
"form.region"
placeholder=
"请选择
活动区域
"
>
<el-option
label=
"
区域
一"
value=
"shanghai"
></el-option>
<el-option
label=
"
区域
二"
value=
"beijing"
></el-option>
<el-form-item
label=
"
下拉类型
"
:label-width=
"formLabelWidth"
>
<el-select
v-model=
"form.region"
placeholder=
"请选择
类型
"
>
<el-option
label=
"一"
value=
"shanghai"
></el-option>
<el-option
label=
"二"
value=
"beijing"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"卡组描述"
:label-width=
"formLabelWidth"
>
<el-input
type=
"textarea"
:autosize=
"
{ minRows: 2, maxRows: 6}"
placeholder="请输入内容"
v-model="form.desc">
<el-input
type=
"textarea"
:autosize=
"
{ minRows: 2, maxRows: 6}" placeholder="请输入内容" v-model="form.desc">
</el-input>
</el-form-item>
...
...
@@ -64,24 +64,11 @@
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogFormVisible = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
submitModify
"
>
确 定
</el-button>
</div>
</el-dialog>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
{{
lang
.
athletic
}}
</h3>
</div>
</div>
<div
class=
"alert alert-info alert-dismissible"
role=
"alert"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
{{
lang
.
tagInfo
}}
</div>
</div>
</div>
...
...
@@ -94,9 +81,8 @@
import
querystring
from
'
querystring
'
;
import
language
from
'
./lang
'
;
import
img1
from
'
../assets/img/images1.jpeg
'
import
img2
from
'
../assets/img/images2.jpeg
'
import
img3
from
'
../assets/img/images3.jpeg
'
import
unknow
from
'
../assets/img/unknow.jpeg
'
import
API
from
'
../api
'
import
tb_language
from
'
./tb_lang.js
'
...
...
@@ -125,11 +111,11 @@
},
formLabelWidth
:
'
120px
'
,
isNew
:
true
,
searchText
:
""
,
hasError
:
false
,
username
:
""
,
avatar_url
:
""
,
avatar_url
:
unknow
,
isMobile
:
false
,
user_info
:
{
exp
:
0
,
...
...
@@ -191,6 +177,29 @@
},
methods
:
{
submitModify
:
function
()
{
var
param
=
{
name
:
this
.
username
,
desc
:
this
.
form
.
desc
,
url
:
this
.
avatar_url
,
isNew
:
this
.
isNew
}
API
.
saveDeck
(
param
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
this
.
dialogFormVisible
=
false
this
.
$notify
({
title
:
'
操作成功
'
,
message
:
'
感谢您的提交!
'
,
type
:
'
success
'
})
},
(
res
)
=>
{
this
.
hasError
=
true
console
.
log
(
res
)
});
},
onSubmit
:
function
()
{
this
.
searchByUsername
(
this
.
searchText
)
},
...
...
@@ -217,19 +226,13 @@
this
.
username
=
name
if
(
res
.
data
.
code
===
404
)
{
console
.
log
(
'
还没有数据 可以新增
'
)
this
.
isNew
=
true
;
}
else
{
this
.
isNew
=
false
;
console
.
log
(
'
有数据了 可以更新
'
,
JSON
.
stringify
(
res
.
data
))
this
.
avatar_url
=
res
.
data
.
data
.
url
this
.
form
.
desc
=
res
.
data
.
data
.
content
}
this
.
$notify
({
title
:
'
操作成功
'
,
message
:
'
操作成功
'
,
type
:
'
success
'
})
},
(
res
)
=>
{
this
.
hasError
=
true
console
.
log
(
res
)
...
...
src/components/Index.vue
View file @
f48746c4
...
...
@@ -15,7 +15,8 @@
<p
class=
"text-center"
>
{{
lang
.
index
.
p3
}}
</p>
</div>
<div
class=
"row projects"
>
<div
@
click=
"gogo('#/ranking')"
class=
"col-lg-4 col-sm-6 item"
v-bind:class=
"
{ 'fix-width': !isMobile , 'fix-width-m': isMobile }">
<img
class=
"img-responsive"
src=
"../assets/img/image6.png"
>
<div
@
="
gogo
('
#
/
ranking
')"
class=
"col-lg-4 col-sm-6 item"
v-bind:class=
"
{ 'fix-width': !isMobile , 'fix-width-m': isMobile }">
<img
class=
"img-responsive"
src=
"../assets/img/image6.png"
>
<h3
class=
"name"
>
<span
style=
"text-decoration: underline;"
>
{{
lang
.
index
.
h1
}}
</span>
</h3>
...
...
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