Commit f7770191 authored by 杨思琦's avatar 杨思琦

fix: 删除url后缀

parent 5051e9ce
Pipeline #63508 passed with stages
...@@ -6,7 +6,7 @@ const WxLogin = props => { ...@@ -6,7 +6,7 @@ const WxLogin = props => {
: props.self_redirect === !1 && (self_redirect = 'false'); : props.self_redirect === !1 && (self_redirect = 'false');
let url = `https://open.weixin.qq.com/connect/qrconnect?appid=${ let url = `https://open.weixin.qq.com/connect/qrconnect?appid=${
props.appid props.appid
}&scope=${props.scope}&redirect_uri=${props.redirect_uri}&state=${ }&scope=${props.scope}&redirect_uri=${props.redirect_uri.replace('#/', '')}&state=${
props.state props.state
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
}&login_type=jssdk&self_redirect=${self_redirect}&styletype=${props.styletype || }&login_type=jssdk&self_redirect=${self_redirect}&styletype=${props.styletype ||
......
...@@ -10,7 +10,7 @@ const useWeCom = props => { ...@@ -10,7 +10,7 @@ const useWeCom = props => {
id: props.container || 'wxlogin_container', id: props.container || 'wxlogin_container',
appid: props.appid || WECOM_APPID, appid: props.appid || WECOM_APPID,
agentid: props.agentid || AGENTID_CLOUD, agentid: props.agentid || AGENTID_CLOUD,
redirect_uri: props.redirect_uri || encodeURIComponent(window.location.href.replace('#/', '')), redirect_uri: props.redirect_uri.replace('#/', '') || encodeURIComponent(window.location.href.replace('#/', '')),
href: props.href || 'https://panda-water.cn/web4/styles/wx.css', href: props.href || 'https://panda-water.cn/web4/styles/wx.css',
self_redirect: false, self_redirect: false,
state: props.state || 'STATE', state: props.state || 'STATE',
...@@ -42,7 +42,7 @@ const useIOTQRCode = () => { ...@@ -42,7 +42,7 @@ const useIOTQRCode = () => {
container: 'wxlogin_container', container: 'wxlogin_container',
appid: WECOM_APPID, appid: WECOM_APPID,
agentid: AGENTID_CLOUD, agentid: AGENTID_CLOUD,
redirect_uri: encodeURIComponent(window.location.href), // window.location.href redirect_uri: encodeURIComponent(window.location.href.replace('#/', '')), // window.location.href
href: 'https://panda-water.cn/web4/styles/wecom.css', href: 'https://panda-water.cn/web4/styles/wecom.css',
state: rstate, state: rstate,
}, },
......
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 to comment