diff --git a/html/config.html b/html/config.html
index c2a5c7d..40cd3b9 100644
--- a/html/config.html
+++ b/html/config.html
@@ -122,6 +122,18 @@
+
+
-
@@ -155,22 +165,28 @@
var carListener = null;
var pageListener = null;
var fixListener = null;
+ var jumpListener = null;
var weiListener = null;
var btlListener = null;
var userPicker;
var pagePicker;
var fixPicker;
+ var jumpPicker;
var weiPicker;
var btlPicker;
var pickData = [];
var btnArray = ['取消', '确认'];
var pageData = []
var fixData = []
+ var jumpData = []
var weiData = []
var btlData = []
fixData.push({value: 0, text: "需要"})
fixData.push({value: 1, text: "不需要"})
+ jumpData.push({value: 0, text: "自动跳转"})
+ jumpData.push({value: 1, text: "不自动跳转"})
+
pageData.push({value: "index", text: "首页"})
pageData.push({value: "index1", text: "装料页面"})
pageData.push({value: "collection", text: "剩料收集页面"})
@@ -274,6 +290,7 @@
muiInit();
muiInitPage()
muiInitFix()
+ muiInitJump()
muiInitWeightSize()
muiInitBtl()
var indexPage = api.getPrefs({
@@ -301,6 +318,18 @@
})
}
+ var requireJump = api.getPrefs({
+ sync: true,
+ key: 'jump'
+ });
+ if (requireJump) {
+ jumpData.forEach(p => {
+ if (requireJump == p.value) {
+ document.getElementById('jump').innerHTML = p.text
+ }
+ })
+ }
+
var weightSize = api.getPrefs({
sync: true,
key: 'weightSize'
@@ -436,6 +465,34 @@
})(mui, document);
}
+ function muiInitJump() {
+ (function ($, doc) {
+ $.init();
+ $.ready(function () {
+ var _getParam = function _getParam(obj, param) {
+ return obj[param] || '';
+ };
+ if (jumpPicker) {
+ } else {
+ jumpPicker = new $.PopPicker();
+ var showJumpPickerButton = doc.getElementById('jump');
+ jumpListener = null;
+ jumpListener = showJumpPickerButton.addEventListener('tap', function (event) {
+ jumpPicker.show(function (items) {
+ document.getElementById('isJump').value = items[0].value;
+ showJumpPickerButton.innerHTML = items[0].text;
+ if (items[0].text){
+ jump()
+ }
+ });
+ }, false);
+ }
+ jumpPicker.setData(jumpData);
+ });
+ })(mui, document);
+ }
+
+
function muiInitWeightSize() {
(function ($, doc) {
$.init();
@@ -549,6 +606,18 @@
mui.alert('装料前校准"' + name + '"设置成功');
}
}
+ function jump(){
+ var value = document.getElementById('isJump').value;
+ if (value) {
+ console.log(value)
+ api.setPrefs({
+ key: 'jump',
+ value: value
+ });
+ var name = document.getElementById('jump').innerHTML;
+ mui.alert(name + '"设置成功');
+ }
+ }