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
0c8da49d
authored
Feb 26, 2019
by
mamingqun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改地址之前
parent
9e6a7ba4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
34 deletions
+60
-34
src/modules/store/index.js
+4
-0
src/pages/index/Shouye.vue
+33
-23
src/pages/index/index.js
+1
-1
src/pages/user/User.vue
+21
-9
src/pages/user/user.js
+1
-1
No files found.
src/modules/store/index.js
View file @
0c8da49d
import
Vue
from
'vue'
import
Vue
from
'vue'
import
Vuex
from
'vuex'
import
Vuex
from
'vuex'
import
$
from
'jquery'
;
import
$
from
'jquery'
;
import
axios
from
'axios'
;
Vue
.
use
(
Vuex
);
Vue
.
use
(
Vuex
);
...
@@ -38,6 +39,9 @@ export default new Vuex.Store({
...
@@ -38,6 +39,9 @@ export default new Vuex.Store({
getPublicActiveInfo
(
state
,
num
){
getPublicActiveInfo
(
state
,
num
){
axios
.
get
(
'http://web-comment.canskj.cn/wandah5/activity/info'
).
then
((
result
)
=>
{
axios
.
get
(
'http://web-comment.canskj.cn/wandah5/activity/info'
).
then
((
result
)
=>
{
state
.
publicActiveInfo
=
result
.
data
.
data
state
.
publicActiveInfo
=
result
.
data
.
data
axios
.
defaults
.
headers
.
common
[
'systemtype'
]
=
state
.
publicActiveInfo
.
system_type
;
$
(
'title'
).
text
(
result
.
data
.
data
.
title
);
$
(
'title'
).
text
(
result
.
data
.
data
.
title
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
...
...
src/pages/index/Shouye.vue
View file @
0c8da49d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
id=
"app1"
>
<div
id=
"app1"
>
<div
class=
"topBox5686"
>
<div
class=
"topBox5686"
>
<div
class=
"activityButton"
@
click=
"activityOnoff"
></div>
<div
class=
"activityButton"
@
click=
"activityOnoff"
></div>
<img
v-if=
"bannerImg"
:src=
"bannerImg"
alt
=
""
>
<img
v-if=
"bannerImg"
:src=
"bannerImg"
alt
>
</div>
</div>
<div
class=
"middlebox"
>
<div
class=
"middlebox"
>
<div
class=
"tabBoxWrap"
>
<div
class=
"tabBoxWrap"
>
...
@@ -141,7 +141,7 @@ import ruwei from './ruwei.vue';
...
@@ -141,7 +141,7 @@ import ruwei from './ruwei.vue';
import
api
from
'@/modules/js/api.js'
;
import
api
from
'@/modules/js/api.js'
;
import
tools
from
'@/modules/js/tools'
;
import
tools
from
'@/modules/js/tools'
;
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -204,31 +204,41 @@ export default {
...
@@ -204,31 +204,41 @@ export default {
bannerImg
()
{
bannerImg
()
{
if
(
store
.
state
.
publicActiveInfo
)
{
if
(
store
.
state
.
publicActiveInfo
)
{
return
store
.
state
.
publicActiveInfo
.
banner
return
store
.
state
.
publicActiveInfo
.
banner
}
else
{
}
else
{
return
null
return
null
}
}
}
}
},
},
created
()
{
created
()
{
this
.
judgeShare
();
var
_this
=
this
;
this
.
getIsAward
();
axios
.
get
(
'http://web-comment.canskj.cn/wandah5/activity/info'
).
then
((
result
)
=>
{
this
.
getActiveInfo
();
console
.
log
(
'result.data.data'
);
this
.
getLastList
();
console
.
log
(
result
.
data
);
// this.getRenqiList();
//在getActiveInfo里请求了
this
.
getPrizeList
();
var
type
=
result
.
data
.
data
.
system_type
;
axios
.
defaults
.
headers
.
common
[
'systemtype'
]
=
type
;
this
.
userCenter
=
api
.
userCenterHref
$
(
'title'
).
text
(
result
.
data
.
data
.
title
);
this
.
getUserInfo
();
_this
.
judgeShare
();
this
.
fucengButton
=
localStorage
.
getItem
(
"fucengButton"
)
?
'close'
:
'open'
;
_this
.
getIsAward
();
_this
.
getActiveInfo
();
_this
.
getLastList
();
// _this.getRenqiList();
//在getActiveInfo里请求了
_this
.
getPrizeList
();
_this
.
userCenter
=
api
.
userCenterHref
_this
.
getUserInfo
();
_this
.
getRuweiList
();
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
});
this
.
getRuweiList
()
;
_this
.
fucengButton
=
localStorage
.
getItem
(
"fucengButton"
)
?
'close'
:
'open'
;
// this.hiddenBar();
},
},
mounted
()
{
mounted
()
{
// MessageBox('提示', '“眼遇丹寨万人长桌宴摄影大赛”已经截止,谢谢大家关注');
// MessageBox('提示', '“眼遇丹寨万人长桌宴摄影大赛”已经截止,谢谢大家关注');
...
@@ -248,7 +258,7 @@ export default {
...
@@ -248,7 +258,7 @@ export default {
// this.bannerHeight = $('.topBox5686').height();
// this.bannerHeight = $('.topBox5686').height();
// }, 200);
// }, 200);
},
},
activated
(){
activated
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getWeixinPowerShare
();
this
.
getWeixinPowerShare
();
},
400
);
},
400
);
...
@@ -589,7 +599,7 @@ export default {
...
@@ -589,7 +599,7 @@ export default {
wx
.
updateAppMessageShareData
(
wx
.
updateAppMessageShareData
(
{
{
// title: _this.$randomText() , // 分享标题
// title: _this.$randomText() , // 分享标题
title
:
tools
.
randomShareTitle
()
,
// 分享标题
title
:
tools
.
randomShareTitle
(),
// 分享标题
desc
:
tools
.
randomShareDesc
(),
// 分享描述
desc
:
tools
.
randomShareDesc
(),
// 分享描述
link
:
api
.
wrapHref
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
api
.
wrapHref
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
api
.
shareImg
// 分享图标
imgUrl
:
api
.
shareImg
// 分享图标
...
@@ -784,7 +794,7 @@ export default {
...
@@ -784,7 +794,7 @@ export default {
// message: '请您认真填写参赛信息 若您最终获奖 我们将第一时间与您联系 便于发奖。'
// message: '请您认真填写参赛信息 若您最终获奖 我们将第一时间与您联系 便于发奖。'
// });
// });
// setTimeout(() => {
// setTimeout(() => {
this
.
$router
.
push
({
path
:
'/address'
,
query
:
{
plan
:
'isIndex'
}
});
this
.
$router
.
push
({
path
:
'/address'
,
query
:
{
plan
:
'isIndex'
}
});
// }, 2000);
// }, 2000);
}
}
},
},
...
...
src/pages/index/index.js
View file @
0c8da49d
...
@@ -17,7 +17,7 @@ window.axios = axios;
...
@@ -17,7 +17,7 @@ window.axios = axios;
import
api
from
'@/modules/js/api.js'
;
import
api
from
'@/modules/js/api.js'
;
axios
.
defaults
.
baseURL
=
api
.
server
;
axios
.
defaults
.
baseURL
=
api
.
server
;
axios
.
defaults
.
timeout
=
10000
;
axios
.
defaults
.
timeout
=
10000
;
axios
.
defaults
.
headers
.
common
[
'systemtype'
]
=
api
.
extra
;
//
axios.defaults.headers.common['systemtype'] = api.extra;
import
fastclick
from
'fastclick'
import
fastclick
from
'fastclick'
...
...
src/pages/user/User.vue
View file @
0c8da49d
...
@@ -58,7 +58,7 @@ import wx from 'weixin-js-sdk';
...
@@ -58,7 +58,7 @@ import wx from 'weixin-js-sdk';
import
api
from
'@/modules/js/api.js'
;
import
api
from
'@/modules/js/api.js'
;
import
tools
from
'@/modules/js/tools'
;
import
tools
from
'@/modules/js/tools'
;
export
default
{
export
default
{
...
@@ -76,10 +76,22 @@ export default {
...
@@ -76,10 +76,22 @@ export default {
},
},
store
,
store
,
created
()
{
created
()
{
this
.
getUserInfo
();
this
.
getUserImgList
();
var
_this
=
this
this
.
indexHref
=
api
.
indexHref
;
axios
.
get
(
'http://web-comment.canskj.cn/wandah5/activity/info'
).
then
((
result
)
=>
{
// this.hiddenBar();
var
type
=
result
.
data
.
data
.
system_type
;
axios
.
defaults
.
headers
.
common
[
'systemtype'
]
=
type
;
$
(
'title'
).
text
(
result
.
data
.
data
.
title
);
_this
.
getUserInfo
();
_this
.
getUserImgList
();
_this
.
indexHref
=
api
.
indexHref
;
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
});
},
},
mounted
()
{
mounted
()
{
this
.
getWeixinPowerShare
();
this
.
getWeixinPowerShare
();
...
@@ -96,7 +108,7 @@ export default {
...
@@ -96,7 +108,7 @@ export default {
this
.
getUserImgList
();
this
.
getUserImgList
();
})
})
},
},
activated
(){
activated
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getWeixinPowerShare
();
this
.
getWeixinPowerShare
();
},
400
);
},
400
);
...
@@ -222,12 +234,12 @@ export default {
...
@@ -222,12 +234,12 @@ export default {
// // 自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
// // 自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
wx
.
updateAppMessageShareData
(
wx
.
updateAppMessageShareData
(
{
{
title
:
tools
.
randomShareTitle
()
,
// 分享标题
title
:
tools
.
randomShareTitle
(),
// 分享标题
desc
:
tools
.
randomShareDesc
(),
// 分享描述
desc
:
tools
.
randomShareDesc
(),
// 分享描述
link
:
api
.
wrapHref
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
api
.
wrapHref
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
api
.
shareImg
// 分享图标
imgUrl
:
api
.
shareImg
// 分享图标
},
},
function
(
res
)
{
function
(
res
)
{
//这里是回调函数
//这里是回调函数
}
}
);
);
...
@@ -239,7 +251,7 @@ export default {
...
@@ -239,7 +251,7 @@ export default {
link
:
api
.
wrapHref
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link
:
api
.
wrapHref
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
api
.
shareImg
// 分享图标
imgUrl
:
api
.
shareImg
// 分享图标
},
},
function
(
res
)
{
function
(
res
)
{
//这里是回调函数
//这里是回调函数
}
}
);
);
...
...
src/pages/user/user.js
View file @
0c8da49d
...
@@ -13,7 +13,7 @@ import '@/modules/js/flexible.js';
...
@@ -13,7 +13,7 @@ import '@/modules/js/flexible.js';
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
api
from
'@/modules/js/api.js'
;
import
api
from
'@/modules/js/api.js'
;
axios
.
defaults
.
baseURL
=
api
.
server
;
axios
.
defaults
.
baseURL
=
api
.
server
;
axios
.
defaults
.
headers
.
common
[
'systemtype'
]
=
api
.
extra
;
//
axios.defaults.headers.common['systemtype'] = api.extra;
import
VConsole
from
'vconsole'
;
import
VConsole
from
'vconsole'
;
...
...
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