Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
h5wandahuijia
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
388b3d25
authored
Feb 22, 2019
by
mamingqun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
替换了公共banner
parent
2dfcffc2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
3 deletions
+46
-3
src/modules/store/index.js
+23
-1
src/pages/index/App.vue
+2
-1
src/pages/index/Shouye.vue
+21
-1
No files found.
src/modules/store/index.js
View file @
388b3d25
import
Vue
from
'vue'
import
Vuex
from
'vuex'
import
Axios
from
'axios'
;
Vue
.
use
(
Vuex
);
...
...
@@ -11,7 +12,9 @@ export default new Vuex.Store({
huojiangBoxScroll
:
0
,
userBoxScroll
:
0
,
activeInfo
:
''
,
ruweiBoxScroll
:
0
ruweiBoxScroll
:
0
,
publicActiveInfo
:
null
,
publicShareInfo
:
null
},
mutations
:
{
changeLastBoxScrollY
(
state
,
num
)
{
...
...
@@ -31,6 +34,24 @@ export default new Vuex.Store({
},
changeRuweiBoxScrollY
(
state
,
num
){
state
.
ruweiBoxScroll
=
num
;
},
getPublicActiveInfo
(
state
,
num
){
axios
.
get
(
'http://web-comment.canskj.cn/wandah5/activity/info'
).
then
((
result
)
=>
{
console
.
log
(
'公共数据'
);
console
.
log
(
result
.
data
.
data
);
state
.
publicActiveInfo
=
result
.
data
.
data
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
});
},
getPublicShareInfo
(
state
,
num
){
axios
.
get
(
'http://web-comment.canskj.cn/wandah5/share/info'
).
then
((
result
)
=>
{
console
.
log
(
'公共数据'
);
console
.
log
(
result
.
data
.
data
);
state
.
publicShareInfo
=
result
.
data
.
data
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
});
}
}
})
\ No newline at end of file
src/pages/index/App.vue
View file @
388b3d25
...
...
@@ -38,7 +38,8 @@ export default {
}
},
created
()
{
// this.hiddenBar();
store
.
commit
(
'getPublicActiveInfo'
);
store
.
commit
(
'getPublicShareInfo'
);
},
mounted
()
{
// var tar_userinfo = localStorage.getItem('tar_userinfo');
...
...
src/pages/index/Shouye.vue
View file @
388b3d25
...
...
@@ -2,6 +2,7 @@
<div
id=
"app1"
>
<div
class=
"topBox5686"
>
<div
class=
"activityButton"
@
click=
"activityOnoff"
></div>
<img
v-if=
"bannerImg"
:src=
"bannerImg"
alt=
""
>
</div>
<div
class=
"middlebox"
>
<div
class=
"tabBoxWrap"
>
...
...
@@ -197,6 +198,13 @@ export default {
return
arr
;
}
},
bannerImg
()
{
if
(
store
.
state
.
publicActiveInfo
)
{
return
store
.
state
.
publicActiveInfo
.
banner
}
else
{
return
null
}
}
},
created
()
{
...
...
@@ -218,6 +226,12 @@ export default {
this
.
getRuweiList
();
// this.hiddenBar();
setTimeout
(()
=>
{
console
.
log
(
'store的数据'
);
console
.
log
(
store
.
state
.
publicActiveInfo
);
},
500
);
},
mounted
()
{
// MessageBox('提示', '“眼遇丹寨万人长桌宴摄影大赛”已经截止,谢谢大家关注');
...
...
@@ -872,9 +886,15 @@ export default {
.topBox5686
{
//
height
:
400px
;
height
:
310px
;
background
:
url("~@/pages/index/assets/images/indexBanner.jpg")
no-repeat
;
//
background
:
url("~@/pages/index/assets/images/indexBanner.jpg")
no-repeat
;
background-size
:
100%
auto
;
position
:
relative
;
overflow
:
hidden
;
img
{
width
:
100%
;
height
:
auto
;
}
.activityButton
{
width
:
170px
;
...
...
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