|
@@ -146,6 +146,13 @@
|
|
|
<div id="statsResult" class="result" style="display: none;"></div>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="test-section">
|
|
|
+ <h3>读卡(1101)测试</h3>
|
|
|
+ <p>测试读卡接口(交易1101),检查debug信息是否被正确保留:</p>
|
|
|
+ <button onclick="testReadCard()">测试读卡(1101)</button>
|
|
|
+ <div id="readCardResult" class="result" style="display: none;"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="test-section">
|
|
|
<h3>签到状态测试</h3>
|
|
|
<p>测试签到状态接口,检查debug信息是否被正确保留:</p>
|
|
@@ -387,6 +394,17 @@
|
|
|
showResult('statsResult', result, '统计信息测试');
|
|
|
}
|
|
|
|
|
|
+ // 测试读卡(1101)
|
|
|
+ async function testReadCard() {
|
|
|
+ const requestData = {
|
|
|
+ action: "transaction",
|
|
|
+ transactionName: "ReadCard", // 或者使用 transactionCode: "1101"
|
|
|
+ timestamp: new Date().toISOString()
|
|
|
+ };
|
|
|
+ const result = await callAPI(requestData);
|
|
|
+ showResult('readCardResult', result, '读卡(1101)测试');
|
|
|
+ }
|
|
|
+
|
|
|
// 测试签到状态
|
|
|
async function testSignInStatus() {
|
|
|
const requestData = {
|
|
@@ -421,6 +439,7 @@
|
|
|
{ name: '初始化(测试模式)', func: testInitTestMode },
|
|
|
{ name: '健康检查', func: testHealth },
|
|
|
{ name: '统计信息', func: testStats },
|
|
|
+ { name: '读卡(1101)', func: testReadCard },
|
|
|
{ name: '签到状态', func: testSignInStatus },
|
|
|
{ name: '签退(9002)', func: testSignOut }
|
|
|
];
|
|
@@ -436,10 +455,14 @@
|
|
|
action: test.name.includes('初始化') ? 'init' :
|
|
|
test.name.includes('健康') ? 'health' :
|
|
|
test.name.includes('统计') ? 'stats' :
|
|
|
+ test.name.includes('读卡') ? 'transaction' :
|
|
|
test.name.includes('签到状态') ? 'signin_status' :
|
|
|
test.name.includes('签退') ? 'signout' : 'init',
|
|
|
timestamp: new Date().toISOString()
|
|
|
};
|
|
|
+ if (test.name.includes('读卡')) {
|
|
|
+ requestData.transactionName = 'ReadCard';
|
|
|
+ }
|
|
|
|
|
|
if (test.name.includes('带配置')) {
|
|
|
requestData.config = {
|