Commit dbae01d7 by dliangx

index.html

parent 8d4ff898
...@@ -16,15 +16,13 @@ func QueryJumpUrl(ctx context.Context, c *app.RequestContext) { ...@@ -16,15 +16,13 @@ func QueryJumpUrl(ctx context.Context, c *app.RequestContext) {
var req model.PayResultReq var req model.PayResultReq
var resp model.HttpBodyResp[string] var resp model.HttpBodyResp[string]
err = c.BindAndValidate(&req) err = c.BindAndValidate(&req)
if err != nil { if err != nil || req.DuebillNoOrg == "" {
resp.Head.Code = nltconst.PARAM_ERROR resp.Head.Code = nltconst.PARAM_ERROR
resp.Head.ServiceTime = nltconst.GetNowTime() resp.Head.ServiceTime = nltconst.GetNowTime()
c.JSON(consts.StatusOK, resp) c.JSON(consts.StatusOK, resp)
return return
} }
println(req.DuebillNoOrg)
rows, err := db.DB.Query("select disburse_sign_url from loan_orderinfo where serial_no = ? ", &req.DuebillNoOrg) rows, err := db.DB.Query("select disburse_sign_url from loan_orderinfo where serial_no = ? ", &req.DuebillNoOrg)
if err != nil { if err != nil {
......
...@@ -73,9 +73,7 @@ ...@@ -73,9 +73,7 @@
}); });
const idParam = searchParams.get("param"); const idParam = searchParams.get("param");
var data = { var data = {
request: {
duebillNoOrg: idParam, duebillNoOrg: idParam,
},
}; };
fetch(url, { fetch(url, {
method: "POST", method: "POST",
...@@ -83,8 +81,9 @@ ...@@ -83,8 +81,9 @@
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
body: JSON.stringify(data), body: JSON.stringify(data),
}) }).then(response => response.json())
.then((res) => { .then(res => {
if (res.head.code == "000000") { if (res.head.code == "000000") {
window.location.href = res.body; window.location.href = res.body;
}else{ }else{
......
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