Commit a78abfe5 by hank

分享以及token修改

parent a2cec90c
......@@ -156,7 +156,7 @@ export default {
axios
.get('/contest/wechat/info', {
params: {
url: encodeURI(location.href.split('#')[0]),
url: encodeURI(`${api.indexHref}?shareId=${this.currentId}`),
type: 1
}
})
......
......@@ -59,11 +59,11 @@ export default new Vuex.Store({
},
setToken (state, token) {
state.token = token
localStorage.setItem('token', JSON.stringify(token))
localStorage.setItem('token', token)
},
setType (state, type) {
state.type = type
localStorage.setItem('type', JSON.stringify(type))
localStorage.setItem('type', type)
},
getAuth (state, auth) {
......
......@@ -65,7 +65,7 @@ export default {
axios
.get('/contest/wechat/info', {
params: {
url: encodeURI(location.href.split('#')[0]),
url: encodeURI(api.indexHref),
type: 1
}
})
......
......@@ -547,7 +547,7 @@ export default {
axios
.get('/contest/wechat/info', {
params: {
url: encodeURI(location.href.split('#')[0]),
url: encodeURI(api.indexHref),
type: 1
}
})
......@@ -696,12 +696,12 @@ export default {
});
wx.error(function (res) {
// console.log('微信错误');
console.log('微信错误');
// console.log(res);
});
})
.catch(err => {
// console.log('请求的错误');
console.log('请求的错误');
// console.log(err);
});
},
......
......@@ -58,7 +58,7 @@ export default {
axios
.get('/contest/wechat/info', {
params: {
url: encodeURI(location.href.split('#')[0]),
url: encodeURI(api.indexHref),
type: 1
}
})
......
......@@ -164,7 +164,7 @@ export default {
axios
.get('/contest/wechat/info', {
params: {
url: encodeURI(location.href.split('#')[0]),
url: encodeURI(api.indexHref),
type: 1
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment