Commit dbae01d7 by dliangx

index.html

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