提交 fee2f419 编写于 作者: guofeng.chen's avatar guofeng.chen

测试登录

上级 e24668cc
...@@ -83,7 +83,7 @@ function fliterRoute(query, path) { ...@@ -83,7 +83,7 @@ function fliterRoute(query, path) {
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
console.log('_____href_____', location.href) console.log('_____href_____', location.href)
if (path === '/goods-detail') { if (to.path === '/goods-detail') {
let searchQuery = querystring(location.search); let searchQuery = querystring(location.search);
if (searchQuery.code) { if (searchQuery.code) {
let newUrl = location.origin + location.pathname + '#/goods-detail?code=' + searchQuery.code; let newUrl = location.origin + location.pathname + '#/goods-detail?code=' + searchQuery.code;
......
...@@ -209,7 +209,7 @@ export function isWeiXin() { ...@@ -209,7 +209,7 @@ export function isWeiXin() {
export const wxOauth = () => { export const wxOauth = () => {
let url = location.href, redirectUrl; let url = location.href, redirectUrl;
let appId = getAPPID(); let appId = getAPPID();
url = url.split('?')[0]; // url = url.split('?')[0];
redirectUrl = encodeURIComponent(url); redirectUrl = encodeURIComponent(url);
console.log('wxOauth redirectUrl => ', redirectUrl); console.log('wxOauth redirectUrl => ', redirectUrl);
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUrl}&response_type=code&scope=snsapi_userinfo&#wechat_redirect`; window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUrl}&response_type=code&scope=snsapi_userinfo&#wechat_redirect`;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册