Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
poolin_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2a11f561
authored
Jan 30, 2018
by
zhanghui1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语言选择
parent
df51965b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
38 deletions
+34
-38
src/App.vue
+1
-3
src/components/Settings/Language.vue
+28
-33
src/components/Settings/index.vue
+4
-1
src/main.js
+1
-1
No files found.
src/App.vue
View file @
2a11f561
<
template
>
<
template
>
<div
id=
"app"
:class=
"gradeClass"
>
<div
id=
"app"
:class=
"gradeClass"
>
<transition
:name=
"'vux-pop-' + (direction === '' ? '' : (direction === 'forward' ? 'in' : 'out'))"
>
<transition
:name=
"'vux-pop-' + (direction === '' ? '' : (direction === 'forward' ? 'in' : 'out'))"
>
<!--
<mr-navigation>
<!--
<mr-navigation></mr-navigation>
是否开启缓存 -->
</mr-navigation>
-->
<router-view></router-view>
<router-view></router-view>
</transition>
</transition>
</div>
</div>
...
...
src/components/Settings/Language.vue
View file @
2a11f561
...
@@ -6,37 +6,18 @@
...
@@ -6,37 +6,18 @@
</div>
</div>
<div
class=
"page-content top"
>
<div
class=
"page-content top"
>
<div
class=
"language-content"
>
<div
class=
"language-content"
>
<div
class=
"language-item"
@
click=
"toggleClass(0)"
:class=
"index==0?'active':''"
>
<!--
<div
class=
"language-item"
@
click=
"toggleClass('auto')"
:class=
"language=='auto'?'active':''"
>
<div
class=
"language-title"
>
<div
class=
"language-title"
>
自动
</div>
自动
<div
:class=
"language=='auto'?'language-selected':''"
>
</div>
</div>
</div>
-->
<div
:class=
"index==0?'language-selected':''"
>
<div
class=
"language-item"
@
click=
"toggleClass('zh-cn')"
:class=
"language=='zh-cn'?'active':''"
>
<div
class=
"language-title"
>
中文
<span
class=
"language-img zh-cn"
></span></div>
</div>
<div
:class=
"language=='zh-cn'?'language-selected':''"
></div>
</div>
<div
class=
"language-item"
@
click=
"toggleClass(1)"
:class=
"index==1?'active':''"
>
<div
class=
"language-title"
>
中文
<span
class=
"language-img zh-cn"
>
</span>
</div>
<div
:class=
"index==1?'language-selected':''"
>
</div>
</div>
<div
class=
"language-item"
@
click=
"toggleClass(2)"
:class=
"index==2?'active':''"
>
<div
class=
"language-title"
>
英文
<span
class=
"language-img en"
>
</span>
<!--
<img
src=
"../../assets/img/en.png"
alt=
""
>
-->
</div>
<div
:class=
"index==2?'language-selected':''"
>
</div>
</div>
</div>
<!--
<div
class=
"language-item"
@
click=
"toggleClass('en')"
:class=
"language=='en'?'active':''"
>
<div
class=
"language-title"
>
英文
<span
class=
"language-img en"
></span></div>
<div
:class=
"language=='en'?'language-selected':''"
></div>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -46,7 +27,11 @@ export default {
...
@@ -46,7 +27,11 @@ export default {
name
:
'language'
,
name
:
'language'
,
data
()
{
data
()
{
return
{
return
{
index
:
0
}
},
computed
:
{
language
:
function
()
{
return
this
.
$store
.
state
.
language
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -56,8 +41,18 @@ export default {
...
@@ -56,8 +41,18 @@ export default {
goBack
()
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
},
},
toggleClass
(
n
){
toggleClass
(
language
)
{
this
.
index
=
n
;
switch
(
language
)
{
case
'auto'
:
this
.
$store
.
commit
(
'setLanguage'
,
this
.
$store
.
state
.
language
)
break
;
case
'zh-cn'
:
this
.
$store
.
commit
(
'setLanguage'
,
'zh-cn'
)
break
;
case
'en'
:
this
.
$store
.
commit
(
'setLanguage'
,
'en'
)
break
;
}
}
}
}
}
}
}
...
...
src/components/Settings/index.vue
View file @
2a11f561
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<span
class=
"fore-link-text"
>
矿工必看
</span>
<span
class=
"fore-link-text"
>
矿工必看
</span>
</mt-cell>
</mt-cell>
<mt-cell
title=
"语言设置"
is-link
to=
"/language"
>
<mt-cell
title=
"语言设置"
is-link
to=
"/language"
>
<span
class=
"language-img
zh-cn
"
></span>
<span
class=
"language-img
"
:class=
"language
"
></span>
</mt-cell>
</mt-cell>
</div>
</div>
</div>
</div>
...
@@ -72,6 +72,9 @@ export default {
...
@@ -72,6 +72,9 @@ export default {
},
},
region_id
()
{
region_id
()
{
return
this
.
$store
.
state
.
region_id
||
localStorage
.
getItem
(
'region_id'
);
return
this
.
$store
.
state
.
region_id
||
localStorage
.
getItem
(
'region_id'
);
},
language
()
{
return
this
.
$store
.
state
.
language
||
localStorage
.
getItem
(
'language'
);
}
}
},
},
mounted
()
{
mounted
()
{
...
...
src/main.js
View file @
2a11f561
...
@@ -48,7 +48,7 @@ axios.interceptors.request.use(config => {
...
@@ -48,7 +48,7 @@ axios.interceptors.request.use(config => {
function
checkToken
()
{
function
checkToken
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlEwTTBNRUl4UVRVME5qazJNa0ZFT0RCRk56WkJNVGc0TmtFd09UWkNOakZGTlRFMFEwVTJOdyJ9.eyJpc3MiOiJodHRwczovL2Jsb2NraW4uYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfDVhMzM4MWE2ZjczMzNjNjdkMzMxOWZiYyIsImF1ZCI6WyJodHRwczovL3d3dy5wb29saW4uY29tL2FwaSIsImh0dHBzOi8vYmxvY2tpbi5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNTE3MzA
wNDc1LCJleHAiOjE1MTczMDc2NzUsImF6cCI6IkZhczI5dWJNNW52NElFMlZUQ3ZEWU5iaWtIeTF0bDBkIiwic2NvcGUiOiJvcGVuaWQgcHJvZ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aP2r-FAUu5C_ThTcjme8KhswQNwIowrcy82gwULlvN0ldUb4UlilwDSXPUlUkDC3LY7SXpiyfxbKrKejjJmDgvl2FSKiFjTbzvA7XIhCu8HuIXg
'
);
})
})
}
}
...
...
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