no message
This commit is contained in:
84
unpackage/dist/dev/mp-alipay/pages/sweep/sweep.js
vendored
Normal file
84
unpackage/dist/dev/mp-alipay/pages/sweep/sweep.js
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
const utils_fun = require("../../utils/fun.js");
|
||||
if (!Array) {
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
|
||||
const _easycom_tabbar2 = common_vendor.resolveComponent("tabbar");
|
||||
(_easycom_statusBar2 + _easycom_up_input2 + _easycom_up_button2 + _easycom_tabbar2)();
|
||||
}
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
|
||||
const _easycom_tabbar = () => "../../components/tabbar/tabbar.js";
|
||||
if (!Math) {
|
||||
(_easycom_statusBar + _easycom_up_input + _easycom_up_button + _easycom_tabbar)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "sweep",
|
||||
setup(__props) {
|
||||
const { nav, navTo } = hooks_useNav.useNav();
|
||||
let value = common_vendor.ref("");
|
||||
common_vendor.onLoad(() => {
|
||||
common_vendor.index.hideTabBar();
|
||||
});
|
||||
const scan = async () => {
|
||||
common_vendor.index.scanCode({
|
||||
success: function(res) {
|
||||
let query = utils_fun.urlQuery(res.result);
|
||||
if (!query.num) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请扫描正确的设备码",
|
||||
icon: "none"
|
||||
});
|
||||
} else {
|
||||
navTo(`/pages/home/star?id=${query.num}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const toCd = async () => {
|
||||
if (!value.value) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请输入枪号",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
navTo(`/pages/home/star?id=${value.value}`);
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_assets._imports_0$3,
|
||||
b: common_assets._imports_1$3,
|
||||
c: common_assets._imports_2$1,
|
||||
d: common_vendor.o(($event) => common_vendor.isRef(value) ? value.value = $event : value = $event),
|
||||
e: common_vendor.p({
|
||||
placeholder: "请输入充电枪编号",
|
||||
type: "number",
|
||||
border: "surround",
|
||||
modelValue: common_vendor.unref(value)
|
||||
}),
|
||||
f: common_vendor.o(toCd),
|
||||
g: common_vendor.p({
|
||||
type: "primary",
|
||||
text: "确定"
|
||||
}),
|
||||
h: common_vendor.o(scan),
|
||||
i: common_vendor.p({
|
||||
type: "primary",
|
||||
shape: "circle",
|
||||
text: "扫码充电"
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
path: "/pages/sweep/sweep"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2f0b12d1"]]);
|
||||
my.createPage(MiniProgramPage);
|
||||
Reference in New Issue
Block a user