Commit bc29037c authored by 郝增润's avatar 郝增润

修正分享逻辑

parent 719ea515
...@@ -53,13 +53,13 @@ ...@@ -53,13 +53,13 @@
console.log("登录面板") console.log("登录面板")
var isWechat = JSSDK.Client.isWeixin(); var isWechat = JSSDK.Client.isWeixin();
var isQQ = JSSDK.Client.isQQ(); var isQQ = JSSDK.Client.isQQ();
alert('进来了') // alert('进来了')
if (isWechat || isQQ || window.location.href.indexOf('JDSHARE') !== -1) { if (isWechat || isQQ || window.location.href.indexOf('JDSHARE') !== -1) {
alert('进来了wx') // alert('进来了wx')
var redirectUrlPrimary = window.location.href.replace('autologin2', 'autologin3') + '&source=02' var redirectUrlPrimary = window.location.href.replace('autologin2', 'autologin3') + '&source=02'
alert(redirectUrlPrimary) // alert(redirectUrlPrimary)
var url = 'https://wq.jd.com/pinbind/pintokenredirect?biz=jm-business-center&url=' + encodeURIComponent(redirectUrlPrimary) var url = 'https://wq.jd.com/pinbind/pintokenredirect?biz=jm-business-center&url=' + encodeURIComponent(redirectUrlPrimary)
alert(url) // alert(url)
window.location.href = url; window.location.href = url;
return; return;
} }
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
function isLogin(res) { function isLogin(res) {
console.log("login回调/打开登录面板的回调", res) console.log("login回调/打开登录面板的回调", res)
alert('isLogin') // alert('isLogin')
setTimeout(function () { setTimeout(function () {
console.log(res.data) console.log(res.data)
if (res.data == 1) { if (res.data == 1) {
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
} }
function getToken() { function getToken() {
alert('getToken') // alert('getToken')
console.log("进入获取token方法", window.location.href) console.log("进入获取token方法", window.location.href)
JSSDK.Isv.requestIsvToken({ JSSDK.Isv.requestIsvToken({
url: window.location.href url: window.location.href
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
var venderId = getUrlParam("venderId"); var venderId = getUrlParam("venderId");
var appKey = getUrlParam("appKey"); var appKey = getUrlParam("appKey");
var needCredits = getUrlParam("needCredits"); var needCredits = getUrlParam("needCredits");
alert('token') // alert('token')
alert(token) // alert(token)
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: `/open2Duiba/autologin`, url: `/open2Duiba/autologin`,
...@@ -126,7 +126,7 @@ alert(token) ...@@ -126,7 +126,7 @@ alert(token)
success: function (data, status) { success: function (data, status) {
console.log("autoLogin返回参数:", data) console.log("autoLogin返回参数:", data)
pageUrl = data.data; pageUrl = data.data;
console.log(pageUrl) alert(pageUrl)
window.location.href = pageUrl; window.location.href = pageUrl;
}, },
complete: function () { complete: function () {
......
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