Commit a78abfe5 by hank

分享以及token修改

parent a2cec90c
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
axios axios
.get('/contest/wechat/info', { .get('/contest/wechat/info', {
params: { params: {
url: encodeURI(location.href.split('#')[0]), url: encodeURI(`${api.indexHref}?shareId=${this.currentId}`),
type: 1 type: 1
} }
}) })
......
...@@ -59,11 +59,11 @@ export default new Vuex.Store({ ...@@ -59,11 +59,11 @@ export default new Vuex.Store({
}, },
setToken (state, token) { setToken (state, token) {
state.token = token state.token = token
localStorage.setItem('token', JSON.stringify(token)) localStorage.setItem('token', token)
}, },
setType (state, type) { setType (state, type) {
state.type = type state.type = type
localStorage.setItem('type', JSON.stringify(type)) localStorage.setItem('type', type)
}, },
getAuth (state, auth) { getAuth (state, auth) {
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
axios axios
.get('/contest/wechat/info', { .get('/contest/wechat/info', {
params: { params: {
url: encodeURI(location.href.split('#')[0]), url: encodeURI(api.indexHref),
type: 1 type: 1
} }
}) })
......
...@@ -547,7 +547,7 @@ export default { ...@@ -547,7 +547,7 @@ export default {
axios axios
.get('/contest/wechat/info', { .get('/contest/wechat/info', {
params: { params: {
url: encodeURI(location.href.split('#')[0]), url: encodeURI(api.indexHref),
type: 1 type: 1
} }
}) })
...@@ -696,12 +696,12 @@ export default { ...@@ -696,12 +696,12 @@ export default {
}); });
wx.error(function (res) { wx.error(function (res) {
// console.log('微信错误'); console.log('微信错误');
// console.log(res); // console.log(res);
}); });
}) })
.catch(err => { .catch(err => {
// console.log('请求的错误'); console.log('请求的错误');
// console.log(err); // console.log(err);
}); });
}, },
......
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
axios axios
.get('/contest/wechat/info', { .get('/contest/wechat/info', {
params: { params: {
url: encodeURI(location.href.split('#')[0]), url: encodeURI(api.indexHref),
type: 1 type: 1
} }
}) })
......
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
axios axios
.get('/contest/wechat/info', { .get('/contest/wechat/info', {
params: { params: {
url: encodeURI(location.href.split('#')[0]), url: encodeURI(api.indexHref),
type: 1 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