Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
N
nwjs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
nwjs
Commits
ce1fee66
Commit
ce1fee66
authored
Dec 09, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自助机版本
parent
a9f12447
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
51 deletions
+52
-51
getSuccess.js
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/getSuccess.js
+51
-50
getSuccess.html
...-v0.25.2-win-ia32/TubidaNewSale/page/lhgj/getSuccess.html
+1
-1
No files found.
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/getSuccess.js
View file @
ce1fee66
$
(
function
(){
$
(
function
(){
let
$body
=
$
.
find
(
".lhgjGetSuccess"
);
let
$body
=
$
(
".lhgjGetSuccess"
);
let
$guojiCode
=
$body
.
find
(
".guojiCode"
);
let
hard
=
Base
.
getHard
();
let
hard
=
Base
.
getHard
();
let
url
=
{
let
url
=
{
pay
:
Base
.
getOrderUrl
(
"order/wait"
)
pay
:
Base
.
getOrderUrl
(
"order/wait"
)
};
};
let
flag
=
0
;
let
flag
=
0
;
var
orderId
=
""
;
var
orderId
=
""
;
var
hisCodeNoPd
=
""
;
var
hisCodeNoPd
=
""
;
/**
/**
* 查询是否支付,会调用next一直查询,直到离开页面
* 查询是否支付,会调用next一直查询,直到离开页面
*/
*/
function
queryPay
()
{
function
queryPay
()
{
Base
.
run
(
function
()
{
Base
.
run
(
function
()
{
Base
.
Request
(
url
.
pay
,
{
Base
.
Request
(
url
.
pay
,
{
order
:
{
order
:
{
companyId
:
Base
.
config
.
companyId
,
companyId
:
Base
.
config
.
companyId
,
orderId
:
orderId
orderId
:
orderId
}
}
},
function
(
res
)
{
},
function
(
res
)
{
showRes
(
res
);
showRes
(
res
);
},
{
},
{
error
:
function
(
res
)
{
error
:
function
(
res
)
{
showStatus
(
res
.
msg
||
res
.
message
);
showStatus
(
res
.
msg
||
res
.
message
);
next
();
next
();
}
}
});
});
},
function
(
res
)
{
},
function
(
res
)
{
showError
(
res
);
showError
(
res
);
});
});
}
}
function
showRes
(
res
){
function
showRes
(
res
){
let
data
=
res
.
data
||
{};
let
data
=
res
.
data
||
{};
let
order
=
res
.
order
||
{};
let
order
=
data
.
order
||
{};
orderId
=
order
.
orderId
||
""
;
let
extend
=
data
.
extend
||
{};
let
extend
=
data
.
extend
||
{};
orderId
=
order
.
orderId
||
""
;
let
codeNoPd
=
extend
.
codeNoPd
||
""
;
let
codeNoPd
=
extend
.
codeNoPd
||
""
;
let
codeNoPdShow
=
parseInt
(
extend
.
codeNoPdShow
||
""
);
let
codeNoPdShow
=
parseInt
(
extend
.
codeNoPdShow
||
""
);
if
(
!
codeNoPdShow
)
{
if
(
!
codeNoPdShow
)
{
...
@@ -47,12 +46,13 @@ $(function(){
...
@@ -47,12 +46,13 @@ $(function(){
hard
.
__execute
(
"ReleaseQR"
,
{
hard
.
__execute
(
"ReleaseQR"
,
{
Code
:
codeNoPd
Code
:
codeNoPd
},
function
(
res
)
{
},
function
(
res
)
{
debugger
;
if
(
!
res
)
{
if
(
!
res
)
{
showError
({
msg
:
"生成二维码错误,返回路径为空"
});
showError
({
msg
:
"生成二维码错误,返回路径为空"
});
return
;
return
;
}
}
hisCodeNoPd
=
codeNoPd
;
hisCodeNoPd
=
codeNoPd
;
$
guojiCode
.
attr
(
"src"
,
res
);
$
(
"#lhgjGetSuccessImg"
).
attr
(
"src"
,
""
)
.
attr
(
"src"
,
res
);
},
function
(
res
)
{
},
function
(
res
)
{
showError
(
res
);
showError
(
res
);
});
});
...
@@ -63,31 +63,32 @@ $(function(){
...
@@ -63,31 +63,32 @@ $(function(){
}
}
}
}
/**
/**
* 间隔1秒后查询是否支付
* 间隔1秒后查询是否支付
*/
*/
function
next
()
{
function
next
()
{
clearTimeout
(
flag
);
clearTimeout
(
flag
);
flag
=
setTimeout
(
queryPay
,
1000
);
flag
=
setTimeout
(
queryPay
,
1000
);
}
}
function
endEvent
()
{
clearTimeout
(
flag
);
}
function
endEvent
()
{
clearTimeout
(
flag
);
}
// 返回根据缓存加载数据的方法
// 返回根据缓存加载数据的方法
setPageLoad
(
function
(
cache
,
$page
)
{
setPageLoad
(
function
(
cache
,
$page
)
{
let
res
=
Base
.
getRes
(
cache
.
data
);
debugger
;
if
(
res
.
error
)
{
let
res
=
Base
.
getRes
(
cache
.
data
);
showError
(
res
);
if
(
res
.
error
)
{
return
;
showError
(
res
);
}
else
{
return
;
// 加载订单产品信息
}
else
{
showRes
(
res
);
// 加载订单产品信息
}
showRes
(
res
);
}
});
});
setPageClose
(
function
()
{
setPageClose
(
function
()
{
endEvent
();
endEvent
();
});
});
});
});
\ No newline at end of file
nwjs-v0.25.2-win-ia32/TubidaNewSale/page/lhgj/getSuccess.html
View file @
ce1fee66
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
style=
"font-size: 40px;color: #FF0000;margin-bottom: 29px;"
>
<div
style=
"font-size: 40px;color: #FF0000;margin-bottom: 29px;"
>
<span>
(支持微信/支付宝)
</span>
<span>
(支持微信/支付宝)
</span>
</div>
</div>
<img
class=
"guojiCode"
/>
<img
id=
"lhgjGetSuccessImg"
class=
"guojiCode"
/>
<div>
<div>
<!-- <span style="color: #FF0000;font-size: 40px;" class="IndexTime"></span>s -->
<!-- <span style="color: #FF0000;font-size: 40px;" class="IndexTime"></span>s -->
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment