"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_cc_myTabbar2=common_vendor.resolveComponent("cc-myTabbar");(_easycom_statusBar2+_easycom_up_input2+_easycom_up_button2+_easycom_cc_myTabbar2)()}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_cc_myTabbar=()=>"../../uni_modules/cc-myTabbar/components/cc-myTabbar/cc-myTabbar.js";if(!Math){(_easycom_statusBar+_easycom_up_input+_easycom_up_button+_easycom_cc_myTabbar)()}const _sfc_main={__name:"sweep",setup(__props){const{nav:nav,navTo: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)=>({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({tabBarShow:2})})}};const MiniProgramPage=common_vendor._export_sfc(_sfc_main,[["__scopeId","data-v-e6ca96d6"]]);my.createPage(MiniProgramPage);
