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
1d7f7c5b
Commit
1d7f7c5b
authored
Dec 09, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自助机程序修改
parent
1f667a0c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
64 deletions
+46
-64
getSuccess.js
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/getSuccess.js
+38
-15
scanCode.js
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/scanCode.js
+4
-22
workScanCode.js
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/workScanCode.js
+3
-24
getSuccess.html
...-v0.25.2-win-ia32/TubidaNewSale/page/lhgj/getSuccess.html
+1
-3
No files found.
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/getSuccess.js
View file @
1d7f7c5b
$
(
function
(){
$
(
function
(){
let
$body
=
$
.
find
(
".lhgjGetSuccess"
);
let
$guojiCode
=
$body
.
find
(
".guojiCode"
);
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
hisCodeNoPd
=
""
;
/**
/**
* 查询是否支付,会调用next一直查询,直到离开页面
* 查询是否支付,会调用next一直查询,直到离开页面
*/
*/
function
queryPay
()
{
function
queryPay
()
{
Base
.
run
(
function
()
{
Base
.
run
(
function
()
{
let
cache
=
getCache
();
let
orderId
=
window
.
guojiOrderId
;
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
)
{
let
data
=
res
.
data
||
{};
showRes
(
res
);
let
extend
=
data
.
extend
||
{};
let
codeNoPdShow
=
parseInt
(
extend
.
codeNoPdShow
||
""
);
if
(
!
codeNoPdShow
)
{
showStatus
(
"正在等待扫描..."
);
next
();
}
else
{
endEvent
();
showWelcome
(
res
);
}
},
{
},
{
error
:
function
(
res
)
{
error
:
function
(
res
)
{
showStatus
(
res
.
msg
||
res
.
message
);
showStatus
(
res
.
msg
||
res
.
message
);
...
@@ -38,6 +32,37 @@ $(function(){
...
@@ -38,6 +32,37 @@ $(function(){
});
});
}
}
function
showRes
(
res
){
let
data
=
res
.
data
||
{};
let
order
=
res
.
order
||
{};
orderId
=
order
.
orderId
||
""
;
let
extend
=
data
.
extend
||
{};
let
codeNoPd
=
extend
.
codeNoPd
||
""
;
let
codeNoPdShow
=
parseInt
(
extend
.
codeNoPdShow
||
""
);
if
(
!
codeNoPdShow
)
{
showStatus
(
"正在等待扫描..."
);
next
();
if
(
hisCodeNoPd
!=
codeNoPd
){
// 调用C#方法,生成二维码返回路径,根据路径进行操作
hard
.
__execute
(
"ReleaseQR"
,
{
Code
:
codeNoPd
},
function
(
res
)
{
if
(
!
res
)
{
showError
({
msg
:
"生成二维码错误,返回路径为空"
});
return
;
}
hisCodeNoPd
=
codeNoPd
;
$guojiCode
.
attr
(
"src"
,
res
);
},
function
(
res
)
{
showError
(
res
);
});
}
}
else
{
endEvent
();
showWelcome
(
res
);
}
}
/**
/**
* 间隔1秒后查询是否支付
* 间隔1秒后查询是否支付
*/
*/
...
@@ -57,10 +82,8 @@ $(function(){
...
@@ -57,10 +82,8 @@ $(function(){
showError
(
res
);
showError
(
res
);
return
;
return
;
}
else
{
}
else
{
document
.
querySelector
(
".guojiCode"
).
setAttribute
(
"src"
,
window
.
guojiSuccessImg
)
window
.
guojiSuccessImg
=
""
// 加载订单产品信息
// 加载订单产品信息
queryPay
(
);
showRes
(
res
);
}
}
});
});
...
...
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/scanCode.js
View file @
1d7f7c5b
...
@@ -9,12 +9,12 @@ $(function(){
...
@@ -9,12 +9,12 @@ $(function(){
sortSave
:
Base
.
getOrderUrl
(
"sort/save"
),
sortSave
:
Base
.
getOrderUrl
(
"sort/save"
),
getRangeList
:
Base
.
getStoreUrl
(
"sort/time/batchQuery"
)
getRangeList
:
Base
.
getStoreUrl
(
"sort/time/batchQuery"
)
};
};
let
hard
=
Base
.
getHard
();
//返回首页
//返回首页
$scGuojiReturn
.
click
(
function
(){
$scGuojiReturn
.
click
(
function
(){
showResPage
(
null
,
"/page/home/base_welcome.html"
);
showResPage
(
null
,
"/page/home/base_welcome.html"
);
})
});
// 获取设备中心
// 获取设备中心
var
hardEvent
=
{
var
hardEvent
=
{
on
:
function
(
res
)
{
on
:
function
(
res
)
{
...
@@ -73,25 +73,7 @@ $(function(){
...
@@ -73,25 +73,7 @@ $(function(){
visitor
.
visitorMobile
=
order
.
mobile
;
visitor
.
visitorMobile
=
order
.
mobile
;
// 请求地址
// 请求地址
Base
.
Request
(
url
.
sortSave
,
req
,
function
(
res
)
{
Base
.
Request
(
url
.
sortSave
,
req
,
function
(
res
)
{
let
data
=
res
.
data
||
{};
showWaitWelcome
(
res
,
"/page/lhgj/getSuccess.html"
);
let
extend
=
data
.
extend
||
{};
let
codeNoPd
=
extend
.
codeNoPd
||
""
;
// 调用C#方法,生成二维码返回路径,根据路径进行操作
hard
.
__execute
(
"ReleaseQR"
,
{
Code
:
codeNoPd
},
function
(
res
)
{
if
(
!
res
)
{
showError
({
msg
:
"生成二维码错误,返回路径为空"
});
return
;
}
showWaitWelcome
(
null
,
"/page/lhgj/getSuccess.html"
);
window
.
guojiSuccessImg
=
""
window
.
guojiSuccessImg
=
res
// pay.PayCodeUrl = res;
},
function
(
res
)
{
showError
(
res
);
});
},
{
},
{
error
:
function
(
res
)
{
error
:
function
(
res
)
{
showWaitWelcome
(
null
,
"/page/lhgj/getFailure.html"
);
showWaitWelcome
(
null
,
"/page/lhgj/getFailure.html"
);
...
@@ -131,7 +113,7 @@ $(function(){
...
@@ -131,7 +113,7 @@ $(function(){
// 返回根据缓存加载数据的方法
// 返回根据缓存加载数据的方法
setPageLoad
(
function
(
cache
,
$page
)
{
setPageLoad
(
function
(
cache
,
$page
)
{
showSortRange
();
showSortRange
();
var
res
=
Base
.
getRes
(
cache
.
data
);
let
res
=
Base
.
getRes
(
cache
.
data
);
if
(
res
.
error
)
{
if
(
res
.
error
)
{
showError
(
res
);
showError
(
res
);
}
}
...
...
nwjs-v0.25.2-win-ia32/TubidaNewSale/js/lhgj/workScanCode.js
View file @
1d7f7c5b
...
@@ -64,33 +64,12 @@ $(function(){
...
@@ -64,33 +64,12 @@ $(function(){
]
]
}
}
// 请求地址
// 请求地址
Base
.
Request
(
url
.
order
,
req
,
function
(
res
)
{
//下单接口
Base
.
Request
(
url
.
order
,
req
,
function
(
res
)
{
let
data
=
res
.
data
||
{};
// 下单接口
let
extend
=
data
.
extend
||
{};
showWaitWelcome
(
res
,
"/page/lhgj/getSuccess.html"
);
let
codeNoPd
=
extend
.
codeNoPd
||
""
;
window
.
guojiOrderId
=
""
window
.
guojiOrderId
=
data
.
order
.
orderId
||
""
// 调用C#方法,生成二维码返回路径,根据路径进行操作
hard
.
__execute
(
"ReleaseQR"
,
{
Code
:
codeNoPd
},
function
(
res
)
{
if
(
!
res
)
{
showError
({
msg
:
"生成二维码错误,返回路径为空"
});
return
;
}
showWaitWelcome
(
null
,
"/page/lhgj/getSuccess.html"
);
window
.
guojiSuccessImg
=
""
window
.
guojiSuccessImg
=
res
// pay.PayCodeUrl = res;
},
function
(
res
)
{
showError
(
res
);
});
},
{
},
{
error
:
function
(
res
)
{
error
:
function
(
res
)
{
showError
(
res
);
showError
(
res
);
}
}
});
});
}
}
...
...
nwjs-v0.25.2-win-ia32/TubidaNewSale/page/lhgj/getSuccess.html
View file @
1d7f7c5b
<div
class=
"guojiBigbox lhgjGetSuccess"
>
<div
class=
"guojiBigbox"
>
<div
class=
"guojiTop"
>
<div
class=
"guojiTop"
>
<img
src=
"../../img/lhgj/lhgjIcon.png"
class=
"guojiTopImg"
>
<img
src=
"../../img/lhgj/lhgjIcon.png"
class=
"guojiTopImg"
>
</div>
</div>
...
@@ -16,7 +15,6 @@
...
@@ -16,7 +15,6 @@
<span>
(支持微信/支付宝)
</span>
<span>
(支持微信/支付宝)
</span>
</div>
</div>
<img
class=
"guojiCode"
/>
<img
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