Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
wanda-ball
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
1864773e
authored
May 23, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
c92e045c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
7 deletions
+44
-7
src/components/Detail.vue
+18
-2
src/modules/js/api.js
+1
-1
src/modules/js/request.js
+3
-0
src/modules/store/index.js
+14
-2
src/pages/index/Shouye.vue
+2
-2
src/pages/index/index.js
+3
-0
src/pages/user/user.js
+3
-0
No files found.
src/components/Detail.vue
View file @
1864773e
...
...
@@ -2,7 +2,9 @@
<section
class=
"detailWrap"
>
<div
v-if=
"pictureInfo"
>
<div
v-if=
"imgLock"
:class=
"['imgBox',top0]"
>
<img
ref=
"picte"
:src=
"pictureInfo.image"
alt
>
<img
ref=
"picte"
v-if=
"!pictureInfo.video"
:src=
"pictureInfo.image"
alt
>
<video
ref=
"picte"
controls
v-if=
"pictureInfo.video"
:src=
"pictureInfo.video"
alt
>
</video>
</div>
<div
v-else
class=
"loadingBox"
>
loading
</div>
<div
class=
"userInfo"
>
...
...
@@ -335,7 +337,16 @@ export default {
});
},
share
()
{
this
.
shareOnoff
=
true
;
var
_this
=
this
window
.
wx
.
miniProgram
.
getEnv
(
function
(
res
)
{
if
(
res
.
miniprogram
)
{
// alert(res.miniprogram)
window
.
wx
.
miniProgram
.
postMessage
({
data
:
{
id
:
'1234'
},
page
:
'detail'
});
// 传的参数
}
else
{
_this
.
shareOnoff
=
true
;
}
})
// this.shareOnoff = true;
},
closeShare
()
{
this
.
shareOnoff
=
false
;
...
...
@@ -519,6 +530,11 @@ export default {
transform
:
translate
(
-50%
,
-50%
);
img
{
width
:
100%
;
height
:
auto
;
}
video
{
width
:
100%
;
height
:
auto
;
}
}
...
...
src/modules/js/api.js
View file @
1864773e
...
...
@@ -31,7 +31,7 @@ var wrapHref = ( mode === 'development' ? 'http://web-comment.iyunfish.cn' : 'ht
//首页地址
var
indexHref
=
url
+
'/video/index.html'
;
// 个人中心地址
var
userCenterHref
=
url
+
'/video/user.html'
;
var
userCenterHref
=
'https://wanda-h5.bdideal.com'
+
'/video/user.html'
;
var
shareImg
=
url
+
'/static/share.jpg'
;
var
signHref
=
'http://mr-static.maxrocky.com/h5/wanda/dzgp/index.html'
export
default
{
...
...
src/modules/js/request.js
View file @
1864773e
...
...
@@ -17,6 +17,9 @@ axios.interceptors.request.use(
if
(
store
.
state
.
token
)
{
config
.
headers
[
'accessToken'
]
=
store
.
state
.
token
// 让每个请求携带token--['ticket']为自定义key 请根据实际情况自行修改
}
if
(
store
.
state
.
type
)
{
config
.
headers
[
'type'
]
=
store
.
state
.
type
// 让每个请求携带token--['ticket']为自定义key 请根据实际情况自行修改
}
if
(
!
config
.
headers
[
'Content-Type'
])
{
if
(
config
.
url
!=
'/upload'
)
{
config
.
headers
[
'Content-Type'
]
=
'application/json'
...
...
src/modules/store/index.js
View file @
1864773e
...
...
@@ -15,7 +15,8 @@ export default new Vuex.Store({
ruweiBoxScroll
:
0
,
ruweigonggao
:
null
,
userInfo
:
localStorage
.
getItem
(
'userInfo'
)
||
{},
token
:
localStorage
.
getItem
(
'token'
)
||
''
token
:
localStorage
.
getItem
(
'token'
)
||
''
,
type
:
localStorage
.
getItem
(
'type'
)
||
''
},
mutations
:
{
changeLastBoxScrollY
(
state
,
num
)
{
...
...
@@ -59,6 +60,10 @@ export default new Vuex.Store({
state
.
token
=
token
localStorage
.
setItem
(
'token'
,
JSON
.
stringify
(
token
))
},
setType
(
state
,
type
)
{
state
.
type
=
type
localStorage
.
setItem
(
'type'
,
JSON
.
stringify
(
type
))
},
getAuth
(
state
,
auth
)
{
},
...
...
@@ -83,8 +88,13 @@ export default new Vuex.Store({
actions
:
{
getAuth
({
commit
,
state
})
{
window
.
localStorage
.
removeItem
(
'token'
)
window
.
localStorage
.
removeItem
(
'type'
)
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
get
(
'/weixin/info'
).
then
(
res
=>
{
axios
.
get
(
'/weixin/info'
,
{
params
:
{
type
:
1
}
}).
then
(
res
=>
{
window
.
localStorage
.
setItem
(
'callbackurl'
,
location
.
href
)
location
.
href
=
res
.
data
.
data
.
url
})
...
...
@@ -99,7 +109,9 @@ export default new Vuex.Store({
}
}).
then
(
res
=>
{
window
.
localStorage
.
setItem
(
'token'
,
res
.
data
.
data
.
accessToken
)
window
.
localStorage
.
setItem
(
'type'
,
res
.
data
.
data
.
type
)
state
.
token
=
res
.
data
.
data
.
accessToken
state
.
type
=
res
.
data
.
data
.
type
// location.href = res.data.data.url + '/video/2.html'
resolve
(
res
.
data
.
data
.
accessToken
)
commit
(
'getUserInfo'
)
...
...
src/pages/index/Shouye.vue
View file @
1864773e
...
...
@@ -121,7 +121,7 @@
<!--
<a
v-show=
"tabActive !== 3"
href=
"./user.html"
class=
"user"
></a>
-->
<a
v-show=
"tabActive !== 3"
:href=
"userCenter"
class=
"user"
></a>
<mt-actionsheet
:actions=
"wangqiTitle"
v-model=
"wangqiList"
></mt-actionsheet>
<
Fuceng
v-if=
"fucengButton=== 'close'?false:true"
></Fuceng
>
<
!--
<Fuceng
v-if=
"fucengButton=== 'close'?false:true"
></Fuceng>
--
>
</div>
</
template
>
...
...
@@ -1244,7 +1244,7 @@ export default {
}
.joinus
{
position
:
fixed
;
//
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
height
:
90px
;
...
...
src/pages/index/index.js
View file @
1864773e
...
...
@@ -94,6 +94,9 @@ router.beforeEach((to, from, next) => {
_hmt
.
push
([
'_trackPageview'
,
'/#'
+
to
.
fullPath
]);
}
}
if
(
getQuery
(
'type'
))
{
store
.
commit
(
'setType'
,
getQuery
(
'type'
))
}
if
(
getQuery
(
'code'
)
&&
!
store
.
state
.
token
)
{
store
.
dispatch
(
'getToken'
,
getQuery
(
'code'
)).
then
(
res
=>
{
next
()
...
...
src/pages/user/user.js
View file @
1864773e
...
...
@@ -72,6 +72,9 @@ router.beforeEach((to, from, next) => {
_hmt
.
push
([
'_trackPageview'
,
'/#'
+
to
.
fullPath
]);
}
}
if
(
getQuery
(
'type'
))
{
store
.
commit
(
'setType'
,
getQuery
(
'type'
))
}
if
(
getQuery
(
'code'
)
&&
!
store
.
state
.
token
)
{
store
.
dispatch
(
'getToken'
,
getQuery
(
'code'
)).
then
(
res
=>
{
next
()
...
...
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