72 lines
2.4 KiB
JavaScript
72 lines
2.4 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../common/vendor.js");
|
|
const _sfc_main = {
|
|
data() {
|
|
return {
|
|
title: "Hello"
|
|
};
|
|
},
|
|
onLoad() {
|
|
var globalEvent = common_vendor.index.requireNativePlugin("globalEvent");
|
|
globalEvent.addEventListener("myEvent", function(e) {
|
|
common_vendor.index.__f__("log", "at pages/denglu.vue:20", "myEvent" + JSON.stringify(e));
|
|
common_vendor.index.showToast({
|
|
title: "myEvent" + JSON.stringify(e),
|
|
duration: 2e3
|
|
});
|
|
});
|
|
},
|
|
methods: {
|
|
testAsyncFunc() {
|
|
var testModule = common_vendor.index.requireNativePlugin("MonitorModule");
|
|
var json = {
|
|
deviceId: "4",
|
|
deviceName: "sdfsfsdf"
|
|
};
|
|
testModule.gotoNativePage(json);
|
|
},
|
|
jumptonve() {
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/ceshianzhuo"
|
|
});
|
|
},
|
|
init(event) {
|
|
var monitorModule = common_vendor.index.requireNativePlugin("MonitorModule");
|
|
monitorModule.initSMBCloudSDK();
|
|
},
|
|
login(event) {
|
|
var monitorModule = common_vendor.index.requireNativePlugin("MonitorModule");
|
|
var loginfo = {
|
|
userName: "admin",
|
|
password: "Bl20230518",
|
|
serverAddress: "121.36.88.64",
|
|
port: 8888
|
|
};
|
|
monitorModule.cloudLoginIn(loginfo, (r) => {
|
|
common_vendor.index.__f__("log", "at pages/denglu.vue:58", "loginResult", r.code);
|
|
common_vendor.index.showToast({
|
|
title: "操作成功",
|
|
duration: 2e3
|
|
});
|
|
});
|
|
},
|
|
logout(event) {
|
|
var monitorModule = common_vendor.index.requireNativePlugin("MonitorModule");
|
|
monitorModule.cloudLoginOut((r) => {
|
|
common_vendor.index.__f__("log", "at pages/denglu.vue:68", "loginResult", r.code);
|
|
});
|
|
}
|
|
}
|
|
};
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return {
|
|
a: common_vendor.o((...args) => $options.init && $options.init(...args)),
|
|
b: common_vendor.o((...args) => $options.login && $options.login(...args)),
|
|
c: common_vendor.o((...args) => $options.logout && $options.logout(...args)),
|
|
d: common_vendor.o((...args) => $options.jumptonve && $options.jumptonve(...args))
|
|
};
|
|
}
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/pages/denglu.js.map
|