Commit 3dd90d38 authored by waterword's avatar waterword

add new

parent 3f3d5017
<html>
<div class="screen" onpress="touchedScreen" onrelease="releasedScreen" onclick="touchedReturn">
<template for="appItem" key="app" index="index">
<div class="testBlock" id="app.id"></div>
</template>
<div id="id_pointDiv" style="top:0;left:0;width: 480;height: 480;background-color: transparent;"></div>
<text class="testTopxy" id="text_xy" >{{crtText_xy}}</text>
<text class="testReturn_2" id="id_back" onpress="touchedScreen" onclick="touchedBackButton"
style="top: 0;left:0 ;color: #000000;background-color: #858282;">back</text>
</div>
</html>
<script>
var router = require("@system.router");
var lvgl = require("@native.lvgl7");
var point_div = undefined;
var point_div_list = undefined;
var FirstStartupFlag = 1;
export default {
data: {
crtText_xy: "",
},
notRender: function () {
for (x = 0; x < 15; x++) {
for (y = 0; y < 15; y++) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
this.$setBackgroundColor(relId, 0xFFFFFF)
}
}
},
// var dom = require("dom.js"); app.js引入
pointInit: function () {
var getPointTopDiv = document.getElementById('id_pointDiv');
console.log("getPointTopDiv:" + getPointTopDiv);
if (!getPointTopDiv)
return
if (!point_div) {
point_div = document.createElement('div', {
top: 0,
left: 0,
width: 480,
height: 480,
}, getPointTopDiv)
}
if (point_div_list) {
point_div.removeChild(point_div_list)
return;
}
point_div_list = document.createElement('div', {
top: 0,
left: 0,
width: 480,
height: 480,
}, point_div)
},
drawPointEvent: function (x, y) {
document.createElement('div', {
top: y,
left: x,
width: 4,
height: 4,
"background-color": "#ff0000",
}, point_div_list)
},
drawChanlePointEvent: function (x, y) {
document.createElement('div', {
top: y,
left: x,
width: 8,
height: 8,
"background-color": "#ff0000",
}, point_div_list)
},
resetDrawDiv: function () {
// if (point_div_list) {
point_div.removeChild(point_div_list)
// return;
//}
point_div_list = document.createElement('div', {
top: 0,
left: 0,
width: 480,
height: 480,
}, point_div)
},
onInit: function () {
},
onShow: function () {
console.log(this.$uri + "===========factoryTestTouch onShow=============");
console.log("FirstStartupFlag:" + FirstStartupFlag);
if (FirstStartupFlag == 1) {
// this.timerSet();
this.pointInit();
}
this.$enableMouseMoveEvent(true);
},
onHide: function () {
console.log(this.$uri + "===========factoryTestTouch onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========factoryTestTouch onQuit=============");
this.clearTimer();
},
/*************** timer ***************/
clearTimer: function () {
this.$clearTimeout(this.testTimer);
},
initDiv: function (x, y) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
this.$setPos(relId, x * 32, y * 32);
// if (this.flagBashStd[x][y] == 1) {
// this.$setBackgroundColor(relId, 0x000000);
// }
},
chanelDiv: function (x, y) {
var relId = "id_block" + x + "_" + y;
console.log("relId :" + relId);
this.$setPos(relId, -480, -480);
this.$setBackgroundColor(relId, 0x000000)
this.flagBashStd[x][y] = 1;
this.flagBash[x][y] = 1;
},
/*************** event ***************/
/*************** gesture ***************/
onGestureEvent: function (dir, x, y) {
console.log(dir + " " + x + " " + y);
},
// refDivColor: function (coor) {
// var relId = "id_block" + coor
// console.log("relId :" + relId);
// this.$setBackgroundColor(relId, 0x00ff00);
// // this.$setPos(relId, gridX * 32, gridY * 32); // 确保位置正确
// },
refChannleDivColor: function (coor) {
var relId = "id_block" + coor;
console.log("refDivColor - relId: " + relId);
if (document.getElementById(relId)) {
console.log("Element found: " + relId);
this.$setBackgroundColor(relId, 0xFFFFFF);
} else {
console.log("Element not found: " + relId);
}
},
refDivColor: function (coor) {
var relId = "id_block" + coor;
console.log("refDivColor - relId: " + relId);
if (document.getElementById(relId)) {
console.log("Element found: " + relId);
this.$setBackgroundColor(relId, 0x00ff00);
} else {
console.log("Element not found: " + relId);
}
},
onmousemove: function (gx, gy, topNode, x, y) {
console.log("onmousemove--->gx:" + gx + " gy:" + gy);
if (gx > 480 || gy > 480)
return;
this.drawPointEvent(gx, gy)
this.crtText_xy = "x:" + gx + " y:" + gy;
},
touchedScreen: function (node, topNode, x, y) {
console.log("X:" + x + " Y:" + y);
// this.$enableMouseMoveEvent(true);
},
releasedScreen: function (node, topNode, x, y) {
// this.$enableMouseMoveEvent(false);
},
touchedReturn: function (node, topNode, x, y) {
//this.checkFlagBash();
},
touchedBackButton: function (node, topNode, x, y) {
router.push({
path: "factory_testList",
});
},
};
</script>
<style>
.screen {
width: 480px;
height: 480px;
top: 0px;
left: 0px;
background-color: #A4A4AC;
position: relative;
}
.testBlock {
position: absolute;
width: 32px;
height: 32px;
background-color: #ffffff;
border-width: 1px;
border-color: black;
}
.testBlock:hover {
background-color: #6FAF58;
}
.testReturn_2 {
position: absolute;
width: 30;
height: 15;
text-align: center;
text-overflow: ellipsis;
font-size: 12;
}
.testTopxy {
position: absolute;
width: 480;
height: 20;
text-align: center;
text-overflow: ellipsis;
font-size: 14;
background-color: transparent;
color: #2bff00;
}
.testReturn {
position: absolute;
width: 96;
height: 64;
text-align: center;
text-overflow: ellipsis;
font-size: 44;
}
#id_yes {
bottom: 20px;
left: 20px;
}
#id_ng {
bottom: 20px;
right: 20px;
}
#id_back {
bottom: 20px;
right: 20px;
}
.fullScreen {
top: 0;
left: 0;
width: 480;
height: 480;
background-color: transparent;
}
.point {
width: 2;
height: 2;
background-color: #ff0000;
}
.infoText {
width: 480;
height: 30;
top: 150;
text-align: center;
font-size: 13;
background-color: transparent;
color: greenyellow;
}
</style>
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
</div> </div>
<div style="left:140 ; top:190 ;width: 200;height: 96;"> <div style="left:140 ; top:190 ;width: 200;height: 96;">
<text class="fontsize24" style="width: 200; top: 0;color: rgb(0, 0, 0);text-align: center;">发送次数</text> <text class="fontsize24" style="width: 200; top: 0;color: rgb(0, 0, 0);text-align: center;">接收次数</text>
<div style="left:0 ; top:34 ;width: 200;height: 96;background-color: #99D0F7"> <div style="left:0 ; top:34 ;width: 200;height: 96;background-color: #99D0F7">
<text class="fontsize24" id="recvCommValueText" <text class="fontsize24" id="recvCommValueText"
style="top: 15;width: 200;color:rgb(44, 123, 24);text-align: center;">{{recvCommValueText}}</text> style="top: 15;width: 200;color:rgb(44, 123, 24);text-align: center;">{{recvCommValueText}}</text>
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
<text class="testReturn" id="id_startscanWifi" onpress="touchedScreen" <text class="testReturn" id="id_startscanWifi" onpress="touchedScreen"
onclick="touchedStartScanWifiButton" style="top: 0;color: #000000;">开始扫描</text> onclick="touchedStartScanWifiButton" style="top: 0;color: #000000;">开始扫描</text>
</div> </div>
<div id="id_startscanWifiHide"
style="top:-480; left:360 ; width: 100;height: 96;background-color: #FF9700;"></div>
</div> </div>
<div style="left:10;top: 366;width: 460;height: 96; background-color: transparent;"> <div style="left:10;top: 366;width: 460;height: 96; background-color: transparent;">
<div style="left:10 ; width: 100;height: 96;background-color: #858282;"> <div style="left:10 ; width: 100;height: 96;background-color: #858282;">
...@@ -84,6 +86,9 @@ ...@@ -84,6 +86,9 @@
onclick="touchedStartScanWifiDetailsButton" onclick="touchedStartScanWifiDetailsButton"
style="top: 25;color: #000000; width: 150;font-size: 34;">开始扫描</text> style="top: 25;color: #000000; width: 150;font-size: 34;">开始扫描</text>
</div> </div>
<div id="id_startscanWifi_List_hide"
style="top:-480; left:250; width: 150;height: 96;background-color: #FF9700;">
</div>
</div> </div>
</div> </div>
...@@ -435,7 +440,7 @@ ...@@ -435,7 +440,7 @@
}, },
], ],
crtTitleWlanEnterPasswordText: "Spectrum0 2.4GHz", crtTitleWlanEnterPasswordText: "Spectrum0 2.4GHz",
crtPasswordText: "请输入WIIFI密码", crtPasswordText: "请输入WIFI密码",
crtEnterPasswordReminderText: "Enter at least 8 digits", crtEnterPasswordReminderText: "Enter at least 8 digits",
visibilityPngSrc: "./../RE860A/images/settings/passwordInvisiable.png", visibilityPngSrc: "./../RE860A/images/settings/passwordInvisiable.png",
left: "<", left: "<",
...@@ -1151,7 +1156,7 @@ ...@@ -1151,7 +1156,7 @@
this.wifiInfo_TEXT = this.initWifissid + "当前信号强度:" + wifiInfo.signalLevel; this.wifiInfo_TEXT = this.initWifissid + "当前信号强度:" + wifiInfo.signalLevel;
this.wifiInfoWarn_TEXT = this.initWifissid + "信号强度需要大于-38dB"; this.wifiInfoWarn_TEXT = this.initWifissid + "信号强度需要大于-38dB";
var connectStatus = wifiInfo.isConnected; var connectStatus = wifiInfo.isConnected;
this.wifiInfoState_TEXT = connectStatus ? "WIFI测试成功" : "WIFI测试失败" // this.wifiInfoState_TEXT = connectStatus ? "WIFI测试成功" : "WIFI测试失败"
this.$setTextColor("wifiInfoState_TEXT", connectStatus ? "#ff0000" : "#000000"); this.$setTextColor("wifiInfoState_TEXT", connectStatus ? "#ff0000" : "#000000");
console.log("SSID: " + wifiInfo.ssid); console.log("SSID: " + wifiInfo.ssid);
...@@ -1163,10 +1168,12 @@ ...@@ -1163,10 +1168,12 @@
if (wifiInfo.signalLevel > -38) { if (wifiInfo.signalLevel > -38) {
console.log("okok"); console.log("okok");
this.$setY("id_yes", 0); this.$setY("id_yes", 0);
this.wifiInfoState_TEXT ="WIFI测试成功"
} else { } else {
console.log("no"); console.log("no");
this.$setY("id_yes", -480); this.$setY("id_yes", -480);
// this.wifiInfoState_TEXT = connectStatus + "但是信号强度需要大于-38dB" this.wifiInfoState_TEXT ="WIFI测试失败"
// this.wifiInfoState_TEXT = connectStatus + "但是信号强度需要大于-38dB"
} }
//成功 //成功
...@@ -1181,7 +1188,8 @@ ...@@ -1181,7 +1188,8 @@
}, },
onShow: function () { onShow: function () {
this.$setOpacity("id_startscanWifiHide", 0.7)
this.$setOpacity("id_startscanWifi_List_hide", 0.5)
this.$setOpacity("id_hide", 0.5) this.$setOpacity("id_hide", 0.5)
...@@ -1225,8 +1233,11 @@ ...@@ -1225,8 +1233,11 @@
this.setPickPara("setTimePicker12Minute", 40, 26); this.setPickPara("setTimePicker12Minute", 40, 26);
this.setPickPara("setTimePickerAMPM", 40, 26); this.setPickPara("setTimePickerAMPM", 40, 26);
if (userData.factoryFlag == 0) {
globalThat.$FontPath = "./../re860a-v1.0/GothamMedium.ttf"; globalThat.$FontPath = "./../re860a-v1.0/GothamMedium.ttf";
} else {
globalThat.$FontPath = "./../RE860A/GothamMedium.ttf";
}
this.$setTextFontSize("enterPasswordShowInvisiableText", 24); this.$setTextFontSize("enterPasswordShowInvisiableText", 24);
this.$setText("enterPasswordShowInvisiableText", "`"); this.$setText("enterPasswordShowInvisiableText", "`");
globalThat.$FontPath = "SimHei_GB2312_80_t.ttf"; globalThat.$FontPath = "SimHei_GB2312_80_t.ttf";
...@@ -1278,18 +1289,66 @@ ...@@ -1278,18 +1289,66 @@
touchedscanWifiList: function (node, topNode, x, y) { touchedscanWifiList: function (node, topNode, x, y) {
factoryDivPageJump.movePage("id_enableWLANChooseOnDiv"); factoryDivPageJump.movePage("id_enableWLANChooseOnDiv");
}, },
//touchedStartScanWifiButton: function (node, topNode, x, y) {
// router.push({
// path: "factory_testList",
// });
//factoryDivPageJump.movePage("wifiHmoe", "id_enableWLANChooseOnDiv");
// wifiEventJS.enableWLANSwitch();
//},
hideShowConnectbutton: function (option) {
console.log("hideShowConnectbutton option=" + option);
switch (option) {
case 0:
console.log("id_startscanWifiHide --> 0");
this.$setY("id_startscanWifiHide", 0)
break;
case 1:
console.log("id_startscanWifiHide -->1");
this.$setY("id_startscanWifiHide", -480)
break;
default:
break;
}
},
touchedStartScanWifiButton: function (node, topNode, x, y) { touchedStartScanWifiButton: function (node, topNode, x, y) {
// router.push({ console.log("touchedStartScanWifiButton");
// path: "factory_testList", console.log("====================================================");
// }); this.hideShowConnectbutton(0);
//factoryDivPageJump.movePage("wifiHmoe", "id_enableWLANChooseOnDiv"); wifiEventJS.connect_wifi(this.initWifissid, this.initWifipwd);
wifiEventJS.enableWLANSwitch(); setTimeout(() => {
this.hideShowConnectbutton(1);
}, 10000);
},
hideShowConnectListbutton: function (option) {
console.log("hideShowConnectbutton option=" + option);
switch (option) {
case 0:
console.log("id_startscanWifi_List_hide --> 0");
this.$setY("id_startscanWifi_List_hide", 0)
break;
case 1:
console.log("id_startscanWifi_List_hide -->1");
this.$setY("id_startscanWifi_List_hide", -480)
break;
default:
break;
}
}, },
touchedStartScanWifiDetailsButton: function (node, topNode, x, y) { touchedStartScanWifiDetailsButton: function (node, topNode, x, y) {
console.log("========touchedStartScanWifiDetailsButton======="); console.log("========touchedStartScanWifiDetailsButton=======");
this.hideShowConnectListbutton(0)
wifiEventJS.enableWLANSwitch(); wifiEventJS.enableWLANSwitch();
setTimeout(() => {
this.hideShowConnectListbutton(1);
}, 10000);
}, },
touchedDetailsBackButton: function (node, topNode, x, y) { touchedDetailsBackButton: function (node, topNode, x, y) {
console.log("========touchedDetailsBackButton======="); console.log("========touchedDetailsBackButton=======");
factoryDivPageJump.movePage("wifiHmoe"); factoryDivPageJump.movePage("wifiHmoe");
......
...@@ -107,8 +107,8 @@ ...@@ -107,8 +107,8 @@
crtsystemId1_TextHeader1: "SN码:", crtsystemId1_TextHeader1: "SN码:",
crtsystemId1_TextHeader2: "固件版本号:", crtsystemId1_TextHeader2: "固件版本号:",
crtsystemId1_TextHeader3: "硬件版本号:", crtsystemId1_TextHeader3: "硬件版本号:",
crtsystemId1_TextHeader4: "DSP固件版本:", crtsystemId1_TextHeader4: "TP版本:",
crtsystemId1_TextHeader5: "DSP算法版本:", crtsystemId1_TextHeader5: "DDR:",
crtsystemId1_TextValue1: "NG", crtsystemId1_TextValue1: "NG",
crtsystemId1_TextValue2: "NG", crtsystemId1_TextValue2: "NG",
crtsystemId1_TextValue3: "NG", crtsystemId1_TextValue3: "NG",
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
crtsystemId2_title_TEXT: "系统信息(2)", crtsystemId2_title_TEXT: "系统信息(2)",
crtsystemId2_TextHeader1: "WiFi MAC:", crtsystemId2_TextHeader1: "WiFi MAC:",
crtsystemId2_TextHeader2: "蓝牙MAC:", crtsystemId2_TextHeader2: "蓝牙MAC:",
crtsystemId2_TextHeader3: "语音license:", crtsystemId2_TextHeader3: "MSDKlicense:",
crtsystemId2_TextHeader4: "CPU温度:", crtsystemId2_TextHeader4: "CPU温度:",
crtsystemId2_TextHeader5: "存储空间:", crtsystemId2_TextHeader5: "存储空间:",
crtsystemId2_TextValue1: "NG", crtsystemId2_TextValue1: "NG",
...@@ -136,8 +136,8 @@ ...@@ -136,8 +136,8 @@
crtsystemId3_TextValue3: "NG", crtsystemId3_TextValue3: "NG",
crtsystemId3_TextValue4: "NG", crtsystemId3_TextValue4: "NG",
crtsystemId3_TextValue5: "NG", crtsystemId3_TextValue5: "NG",
crtsystemId1_crtTextTips: "绿/黄色代表通过,红色代表不通过(黄色表示系统做过0TA升级)", crtsystemId1_crtTextTips: "绿色代表通过,红色代表不通过",
crtsystemId2_crtTextTips: "绿/黄色代表通过,红色代表不通过(黄色表示系统做过0TA升级)", crtsystemId2_crtTextTips: "绿色代表通过,红色代表不通过",
crtsystemId3_crtTextTips: "该页信息不作判定", crtsystemId3_crtTextTips: "该页信息不作判定",
pagecnt: 1, pagecnt: 1,
factoryTestSystemCheck: 0, factoryTestSystemCheck: 0,
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
</template> </template>
<text class="verSNTitle">{{ crtSNTitle }}</text> <text class="verSNTitle">{{ crtSNTitle }}</text>
<text class="verSNValue">{{ crtSNValue }}</text> <text class="verSNValue" id="SNValue">{{ crtSNValue }}</text>
</div> </div>
</html> </html>
...@@ -142,6 +142,15 @@ ...@@ -142,6 +142,15 @@
en: 1, en: 1,
index: 0, index: 0,
}, },
{
id: "id_factoryTestTp",
name: "tp",
startup: "factoryTestTp",
top: 370,
left: 350,
en: 1,
index: 0,
},
], ],
}, },
...@@ -220,6 +229,17 @@ ...@@ -220,6 +229,17 @@
onShow: function () { onShow: function () {
console.log(this.$uri + "===========onShow============="); console.log(this.$uri + "===========onShow=============");
if (userData.factoryFlag == 0) {
globalThat.$FontPath = "./../re860a-v1.0/GothamMedium.ttf";
} else {
globalThat.$FontPath = "./../RE860A/GothamMedium.ttf";
}
this.$setTextFontSize("SNValue", 16);
// this.$setText("SNValue", "`");
globalThat.$FontPath = "SimHei_GB2312_80_t.ttf";
this.initShow(); this.initShow();
}, },
......
...@@ -16,8 +16,8 @@ const textValueKeys = [ ...@@ -16,8 +16,8 @@ const textValueKeys = [
"crtsystemId1_TextValue1", "crtsystemId1_TextValue1",
"crtsystemId1_TextValue2", "crtsystemId1_TextValue2",
"crtsystemId1_TextValue3", "crtsystemId1_TextValue3",
// "crtsystemId1_TextValue4", "crtsystemId1_TextValue4",
// "crtsystemId1_TextValue5", "crtsystemId1_TextValue5",
"crtsystemId2_TextValue1", "crtsystemId2_TextValue1",
// "crtsystemId2_TextValue2", // "crtsystemId2_TextValue2",
...@@ -103,8 +103,8 @@ function updateSystemInfo() { ...@@ -103,8 +103,8 @@ function updateSystemInfo() {
that.crtsystemId1_TextValue1 = systemInfo.sn; that.crtsystemId1_TextValue1 = systemInfo.sn;
that.crtsystemId1_TextValue2 = systemInfo.softwareVersion; that.crtsystemId1_TextValue2 = systemInfo.softwareVersion;
that.crtsystemId1_TextValue3 = systemInfo.hardwareVersion; that.crtsystemId1_TextValue3 = systemInfo.hardwareVersion;
// that.crtsystemId1_TextValue4: "NG", that.crtsystemId1_TextValue4 = "NG",
// that.crtsystemId1_TextValue5: "NG", that.crtsystemId1_TextValue5 = "792 MHZ",
// that.crtsystemId2_TextHeader1: "WiFi MAC:", // that.crtsystemId2_TextHeader1: "WiFi MAC:",
// that.crtsystemId2_TextHeader2: "蓝牙MAC:", // that.crtsystemId2_TextHeader2: "蓝牙MAC:",
...@@ -162,7 +162,7 @@ function startSystemInfoTimer(obj) { ...@@ -162,7 +162,7 @@ function startSystemInfoTimer(obj) {
} }
systemInfoTimer = setInterval(() => { systemInfoTimer = setInterval(() => {
updateSystemInfo(); updateSystemInfo();
}, 500); }, 2000);
console.log("系统信息定时器已启动(500ms)"); console.log("系统信息定时器已启动(500ms)");
} }
......
...@@ -108,6 +108,7 @@ function onGotoWlanEnterPasswordPageEvent(value, signal) { ...@@ -108,6 +108,7 @@ function onGotoWlanEnterPasswordPageEvent(value, signal) {
function connect_wifi(ssid, psk) { function connect_wifi(ssid, psk) {
systemCtrl.executeSystemCommand("killall -9 udhcpc")
systemCtrl.executeSystemCommand("wpa_cli -p /tmp/wpa_supplicant/sockets -i wlan0 set_network 0 ssid \'\"" + ssid + "\"\'") systemCtrl.executeSystemCommand("wpa_cli -p /tmp/wpa_supplicant/sockets -i wlan0 set_network 0 ssid \'\"" + ssid + "\"\'")
systemCtrl.executeSystemCommand("usleep 10000") //10ms 用于缓冲 systemCtrl.executeSystemCommand("usleep 10000") //10ms 用于缓冲
systemCtrl.executeSystemCommand("wpa_cli -p /tmp/wpa_supplicant/sockets -i wlan0 set_network 0 psk \'\"" + psk + "\"\'") systemCtrl.executeSystemCommand("wpa_cli -p /tmp/wpa_supplicant/sockets -i wlan0 set_network 0 psk \'\"" + psk + "\"\'")
......
This diff is collapsed.
{"color":2,"touch":0,"wifi":0,"sound":0,"uartComm":0,"bright":0,"licenseAuthor":0,"systemCheck":0,"clearAll":0,"start":0} {"color":2,"touch":0,"wifi":2,"sound":0,"uartComm":0,"bright":0,"licenseAuthor":0,"systemCheck":0,"clearAll":0,"start":0}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment