Commit 007c29e9 by 刘泽奇

123

parents 02885e16 a374b20e
...@@ -48,47 +48,47 @@ module.exports = function (app) { ...@@ -48,47 +48,47 @@ module.exports = function (app) {
}); });
} }
}); });
app.get("/login", async function (req, res) { // app.get("/login", async function (req, res) {
try { // try {
var params = req.query; // var params = req.query;
if (!params.state || !params.token_type || !params.access_token) { // if (!params.state || !params.token_type || !params.access_token) {
res.redirect("http://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=http://tm.plus.jdcloud.com/jdtm/getUser&state=jdindentlist&client_id=9841572588670903"); // res.redirect("http://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=http://tm.plus.jdcloud.com/jdtm/getUser&state=jdindentlist&client_id=9841572588670903");
return; // return;
} // }
var getUserparams = { // var getUserparams = {
actionProcess: "jd", // actionProcess: "jd",
authUrl: "https://oauth2.jdcloud.com/userinfo", // authUrl: "https://oauth2.jdcloud.com/userinfo",
authToken: params.token_type + " " + params.access_token // authToken: params.token_type + " " + params.access_token
}; // };
var userItemResult = await tmqueryCtl.getJdUserInfo(getUserparams, req.query, req); // var userItemResult = await tmqueryCtl.getJdUserInfo(getUserparams, req.query, req);
logClient.info("jd", { // logClient.info("jd", {
optitle: "###获取京东用户结果...getJdUserInfo", // optitle: "###获取京东用户结果...getJdUserInfo",
op: "/jdtm/loginUser", // op: "/jdtm/loginUser",
content: "参数=" + JSON.stringify(getUserparams) + ",result=" + JSON.stringify(userItemResult), // content: "参数=" + JSON.stringify(getUserparams) + ",result=" + JSON.stringify(userItemResult),
clientIp: "" // clientIp: ""
}); // });
if (userItemResult.status != 0) { // if (userItemResult.status != 0) {
res.redirect("/#/jd/jdindentlist"); // res.redirect("/#/jd/jdindentlist");
return; // return;
} // }
if (!userItemResult.data.encryptChannelUserId || userItemResult.data.encryptChannelUserId == "undefined") { // if (!userItemResult.data.encryptChannelUserId || userItemResult.data.encryptChannelUserId == "undefined") {
userItemResult = await tmqueryCtl.getUserIdEncryptStr(getUserparams, req.query, req); // userItemResult = await tmqueryCtl.getUserIdEncryptStr(getUserparams, req.query, req);
if (userItemResult.status != 0) { // if (userItemResult.status != 0) {
res.redirect("/#/jd/jdindentlist"); // res.redirect("/#/jd/jdindentlist");
return; // return;
} // }
} // }
var skipUrl = "/#/jd/" + params.state + "?channelUserId=" + encodeURIComponent(userItemResult.data.encryptChannelUserId); // var skipUrl = "/#/jd/" + params.state + "?channelUserId=" + encodeURIComponent(userItemResult.data.encryptChannelUserId);
res.redirect(skipUrl); // res.redirect(skipUrl);
} catch (error) { // } catch (error) {
logClient.error("jd", { // logClient.error("jd", {
optitle: "###获取京东用户异常...getJdUserInfo", // optitle: "###获取京东用户异常...getJdUserInfo",
op: "/jdtm/loginUser", // op: "/jdtm/loginUser",
content: error.stack, // content: error.stack,
clientIp: "" // clientIp: ""
}); // });
} // }
}); // });
app.get("/jd/orderNotify", async function (req, res) { app.get("/jd/orderNotify", async function (req, res) {
logClient.payLog("jd", { logClient.payLog("jd", {
optitle: "###操作订单结果参数...orderNotify", optitle: "###操作订单结果参数...orderNotify",
...@@ -112,8 +112,8 @@ module.exports = function (app) { ...@@ -112,8 +112,8 @@ module.exports = function (app) {
{ {
instanceId: req.query.orderBizId, instanceId: req.query.orderBizId,
appInfo: { appInfo: {
authUrl: "http://tm.plus.jdcloud.com/jd/skipPage?channelUserId=" + req.query.jdPin, authUrl: "https://tm.plus.jdcloud.com/jd/skipPage?channelUserId=" + req.query.jdPin,
adminUrl: "http://tm.plus.jdcloud.com/login" adminUrl: "https://tm.plus.jdcloud.com"
} }
}; };
res.end(JSON.stringify(params)); res.end(JSON.stringify(params));
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<span @click="loginOut" v-if="user_Name">退出</span> <span @click="loginOut" v-if="user_Name">退出</span>
</div> </div>
<div v-else> <div v-else>
<a href="https://login.jdcloud.com/?returnUrl=http%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a> <a href="https://login.jdcloud.com/?returnUrl=https%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a>
<a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px; <a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px;
line-height: 26px;">免费注册</a> line-height: 26px;">免费注册</a>
</div> </div>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
let _this = this; let _this = this;
$.ajax({ $.ajax({
async: true, async: true,
url: "http://login.jdcloud.com/logout", url: "https://login.jdcloud.com/logout",
type: "GET", type: "GET",
dataType: "jsonp", dataType: "jsonp",
jsonp: 'callback', jsonp: 'callback',
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span @click="loginOut" v-if="user_Name">退出</span> <span @click="loginOut" v-if="user_Name">退出</span>
</div> </div>
<div v-else> <div v-else>
<a href="https://login.jdcloud.com/?returnUrl=http%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a> <a href="https://login.jdcloud.com/?returnUrl=https%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a>
<a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px; <a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px;
line-height: 26px;">免费注册</a> line-height: 26px;">免费注册</a>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<span @click="loginOut" v-if="user_Name">退出</span> <span @click="loginOut" v-if="user_Name">退出</span>
</div> </div>
<div v-else> <div v-else>
<a href="https://login.jdcloud.com/?returnUrl=http%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a> <a href="https://login.jdcloud.com/?returnUrl=https%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a>
<a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px; <a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px;
line-height: 26px;">免费注册</a> line-height: 26px;">免费注册</a>
</div> </div>
......
...@@ -490,7 +490,7 @@ ...@@ -490,7 +490,7 @@
let _this = this; let _this = this;
$.ajax({ $.ajax({
async: true, async: true,
url: "http://login.jdcloud.com/logout", url: "https://login.jdcloud.com/logout",
type: "GET", type: "GET",
dataType: "jsonp", dataType: "jsonp",
jsonp: 'callback', jsonp: 'callback',
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
<span v-show="itemCode" @click="showDialog(4)"><i class="el-icon-edit"></i> <span v-show="itemCode" @click="showDialog(4)"><i class="el-icon-edit"></i>
修改</span> 修改</span>
</div> </div>
<ul v-if="applyInfo.customerType != \'person\'"> <ul v-if="applyInfo.customerType == \'person\'">
<li><span>公司名称:</span><span>{{applyInfo.name?applyInfo.name:\"-\"}}</span> <li><span>公司名称:</span><span>{{applyInfo.name?applyInfo.name:\"-\"}}</span>
</li> </li>
<li><span>统一社会信用代码:</span><span>{{applyInfo.code?applyInfo.code:\'-\'}}</span> <li><span>统一社会信用代码:</span><span>{{applyInfo.code?applyInfo.code:\'-\'}}</span>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<span @click="loginOut" v-if="user_Name">退出</span> <span @click="loginOut" v-if="user_Name">退出</span>
</div> </div>
<div v-else> <div v-else>
<a href="https://login.jdcloud.com/?returnUrl=http%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a> <a href="https://login.jdcloud.com/?returnUrl=https%3A%2F%2Ftm.plus.jdcloud.com%2F%23%2Fjd%2Fjdindentlist" class="jdindentlist-header-login" >登录</a>
<a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px; <a href="https://user.jdcloud.com/register?source=jdcloud&ReturnUrl=https%3A%2F%2Fwww.jdcloud.com" style="display:inline-block;color: #fff;padding: 0 15px;background:linear-gradient(80deg,#3171ff 0,#a14faf 100%);border-radius:13px;height: 26px;
line-height: 26px;">免费注册</a> line-height: 26px;">免费注册</a>
</div> </div>
......
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