|
@@ -40,6 +40,11 @@ class BridgeModel {
|
|
uploadInstance.configUploadParam(params)
|
|
uploadInstance.configUploadParam(params)
|
|
router.pushUrl({ url: "pages/CameraPage" })
|
|
router.pushUrl({ url: "pages/CameraPage" })
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ exitApp(params: string): void {
|
|
|
|
+ let pro = new process.ProcessManager();
|
|
|
|
+ pro.exit(0);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -56,7 +61,7 @@ struct Index {
|
|
if (!this.hasRegistered) {
|
|
if (!this.hasRegistered) {
|
|
console.info(TAG, `registerJavaScriptProxy:`);
|
|
console.info(TAG, `registerJavaScriptProxy:`);
|
|
|
|
|
|
- this.controller.registerJavaScriptProxy(this.bridgeObj, TAG, ["download", "selectFile", "startCamera", "goToDevicePage"])
|
|
|
|
|
|
+ this.controller.registerJavaScriptProxy(this.bridgeObj, TAG, ["download", "selectFile", "startCamera", "goToDevicePage", "exitApp"])
|
|
this.controller.refresh()
|
|
this.controller.refresh()
|
|
this.hasRegistered = true
|
|
this.hasRegistered = true
|
|
|
|
|
|
@@ -71,6 +76,10 @@ struct Index {
|
|
// Web({ src: $rawfile('doc_old.html'), controller: this.controller })//测试官方文档 这个是好使的
|
|
// Web({ src: $rawfile('doc_old.html'), controller: this.controller })//测试官方文档 这个是好使的
|
|
|
|
|
|
// Web({
|
|
// Web({
|
|
|
|
+ // src: "http://192.168.101.90:3005/login",
|
|
|
|
+ // controller: this.controller
|
|
|
|
+ // })
|
|
|
|
+ // Web({
|
|
// src: "http://10.88.20.88:3005",
|
|
// src: "http://10.88.20.88:3005",
|
|
// controller: this.controller
|
|
// controller: this.controller
|
|
// })
|
|
// })
|
|
@@ -111,18 +120,18 @@ struct Index {
|
|
|
|
|
|
|
|
|
|
// 退出程序
|
|
// 退出程序
|
|
- Row() {
|
|
|
|
- Image($r('app.media.shutdown'))
|
|
|
|
- .width(px2vp(80))
|
|
|
|
- .height(px2vp(80))
|
|
|
|
- .onClick(() => {
|
|
|
|
- let pro = new process.ProcessManager();
|
|
|
|
- pro.exit(0);
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }.width(px2vp(1920))
|
|
|
|
- .height(px2vp(80))
|
|
|
|
- .justifyContent(FlexAlign.End)
|
|
|
|
|
|
+ // Row() {
|
|
|
|
+ // Image($r('app.media.shutdown'))
|
|
|
|
+ // .width(px2vp(80))
|
|
|
|
+ // .height(px2vp(80))
|
|
|
|
+ // .onClick(() => {
|
|
|
|
+ // let pro = new process.ProcessManager();
|
|
|
|
+ // pro.exit(0);
|
|
|
|
+ // })
|
|
|
|
+ //
|
|
|
|
+ // }.width(px2vp(1920))
|
|
|
|
+ // .height(px2vp(80))
|
|
|
|
+ // .justifyContent(FlexAlign.End)
|
|
}.width(px2vp(1920))
|
|
}.width(px2vp(1920))
|
|
.height(px2vp(1080))
|
|
.height(px2vp(1080))
|
|
.align(Alignment.BottomEnd)
|
|
.align(Alignment.BottomEnd)
|