|
|
@@ -2,6 +2,7 @@
|
|
|
<view class="setting-wrap">
|
|
|
<div class="header">
|
|
|
<div class="name">智能实验终端</div>
|
|
|
+ <div class="activation-btn" @click="confirmInfo" style="border-right: 1px solid;">修改信息</div>
|
|
|
<div class="activation-btn" @click="confirm">激活终端</div>
|
|
|
</div>
|
|
|
<view class="lab-input-wrap">
|
|
|
@@ -139,7 +140,7 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- this.sdkKey = res.data.configValue|| ''
|
|
|
+ this.sdkKey = res.data.configValue || ''
|
|
|
},
|
|
|
testSave() {
|
|
|
// 测试用的方法
|
|
|
@@ -233,7 +234,7 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
- title: "激活失败,请重新确认激活",
|
|
|
+ title: "激活失败,错误编号:" + res.code,
|
|
|
icon: "none",
|
|
|
duration: 1000,
|
|
|
});
|
|
|
@@ -241,6 +242,56 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ // 只注册信息
|
|
|
+ confirmInfo() {
|
|
|
+ if (!this.no) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "终端编号不能为空",
|
|
|
+ icon: "none",
|
|
|
+ duration: 1000,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "确认设置" + this.no + "为当前系统的终端编号?",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+
|
|
|
+ uni.setStorageSync("labsop_ip", this.ip || "");
|
|
|
+
|
|
|
+ uni.setStorageSync("labsop_no", this.no || "");
|
|
|
+
|
|
|
+ uni.setStorageSync("labsop_tenant", this.tenant || "");
|
|
|
+
|
|
|
+ uni.setStorageSync(
|
|
|
+ "labsop_android_token",
|
|
|
+ this.token || ""
|
|
|
+ );
|
|
|
+
|
|
|
+ uni.setStorageSync(
|
|
|
+ "labsop_service_path",
|
|
|
+ this.service_path || ""
|
|
|
+ );
|
|
|
+
|
|
|
+ uni.setStorageSync(
|
|
|
+ "labsop_headerImg",
|
|
|
+ this.headerImg || "static/images/header.png"
|
|
|
+ );
|
|
|
+
|
|
|
+ uni.setStorageSync("labsop_filePath", this.filePath || "");
|
|
|
+
|
|
|
+ uni.showToast({
|
|
|
+ title: "保存成功",
|
|
|
+ duration: 1000,
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ plus.runtime.restart();
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
// 清空人脸库
|
|
|
clearFace() {
|
|
|
module.clearFace((res) => {
|