1.19 index.html初始化参数

This commit is contained in:
2024-11-19 14:52:11 +08:00
parent 5769b7670b
commit 59c228f36c
3 changed files with 34 additions and 15 deletions

View File

@ -11,7 +11,7 @@ android {
minSdk 28 minSdk 28
targetSdk 28 targetSdk 28
versionCode 1 versionCode 1
versionName "1.18" versionName "1.19"
// 1.0 IDATA广播模式处理 // 1.0 IDATA广播模式处理
// 1.1 霍尼韦尔的监听修改扫描网站二维码跳出程序监听失效调整、斑马PDA广播模式设置 // 1.1 霍尼韦尔的监听修改扫描网站二维码跳出程序监听失效调整、斑马PDA广播模式设置
@ -32,6 +32,7 @@ android {
// 1.16 idata pda 不设置模式 // 1.16 idata pda 不设置模式
// 1.17 霍尼韦尔EDA51、EDA50P调用扫描枪的方法在关闭的时候停止调用扫描枪 // 1.17 霍尼韦尔EDA51、EDA50P调用扫描枪的方法在关闭的时候停止调用扫描枪
// 1.18 瑞兴平板,读取扫描结果,使用同步加锁模式 // 1.18 瑞兴平板,读取扫描结果,使用同步加锁模式
// 1.19 index页面接入初始化数据
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk { ndk {
abiFilters 'armeabi-v7a' abiFilters 'armeabi-v7a'

View File

@ -99,20 +99,6 @@
</style> </style>
<script>
function saveSetting(){
var data=JSON.stringify({
"address":document.getElementById('address').value,
"port":document.getElementById('port').value,
"path":document.getElementById('path').value,
"screen_rotation":document.getElementById('screen_rotation').value,
"hide_bar":document.getElementById('hide_bar').value
});
window.NetworkSettingEngine.saveSetting(data);
window.View.reload();
}
</script>
</head> </head>
@ -148,4 +134,35 @@
</div> </div>
</div> </div>
</body> </body>
<script>
function init() {
var dstr = window.NetworkSettingEngine.getStringSetting();
if (dstr.length > 0) {
var d = JSON.parse(dstr);
document.getElementById('address').value = d.address;
document.getElementById('port').value = d.port;
document.getElementById('path').value = d.path;
document.getElementById('screen_rotation').value = d.screen_rotation;
document.getElementById('hide_bar').value = d.hide_bar;
console.log("d_data_end_=========================");
}
}
init();
function saveSetting(){
var data=JSON.stringify({
"address":document.getElementById('address').value,
"port":document.getElementById('port').value,
"path":document.getElementById('path').value,
"screen_rotation":document.getElementById('screen_rotation').value,
"hide_bar":document.getElementById('hide_bar').value
});
window.NetworkSettingEngine.saveSetting(data);
window.View.reload();
}
</script>
</html> </html>

View File

@ -45,6 +45,7 @@ public class NetworkSettingEngine implements SettingEngine {
networkSetting.setPort(port); networkSetting.setPort(port);
networkSetting.setPath(path); networkSetting.setPath(path);
networkSetting.setScreen_rotation(screen_rotation); networkSetting.setScreen_rotation(screen_rotation);
networkSetting.setHide_bar(spf.getInt("hide_bar", 3));
return networkSetting; return networkSetting;
} }