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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
26 deletions
+52
-26
src/modules/store/index.js
+4
-0
src/pages/index/Shouye.vue
+26
-16
src/pages/index/index.js
+1
-1
src/pages/user/User.vue
+20
-8
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"
>
...
@@ -204,30 +204,40 @@ export default {
...
@@ -204,30 +204,40 @@ 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
();
this
.
getActiveInfo
();
axios
.
get
(
'http://web-comment.canskj.cn/wandah5/activity/info'
).
then
((
result
)
=>
{
this
.
getLastList
();
console
.
log
(
'result.data.data'
);
// this.getRenqiList();
console
.
log
(
result
.
data
);
//在getActiveInfo里请求了
this
.
getPrizeList
();
this
.
userCenter
=
api
.
userCenterHref
this
.
getUserInfo
();
var
type
=
result
.
data
.
data
.
system_type
;
this
.
fucengButton
=
localStorage
.
getItem
(
"fucengButton"
)
?
'close'
:
'open'
;
axios
.
defaults
.
headers
.
common
[
'systemtype'
]
=
type
;
$
(
'title'
).
text
(
result
.
data
.
data
.
title
);
this
.
getRuweiList
();
_this
.
judgeShare
();
_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.hiddenBar()
;
_this
.
fucengButton
=
localStorage
.
getItem
(
"fucengButton"
)
?
'close'
:
'open'
;
},
},
mounted
()
{
mounted
()
{
...
@@ -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
// 分享图标
...
...
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
...
@@ -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