"use strict";const e=require("../../common/vendor.js"),l=require("../../sheep/config/index.js");if(!Array){const o=e.resolveComponent("uni-nav-bar"),i=e.resolveComponent("l-signature");(o+i)()}const d=()=>"../../uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.js",p=()=>"../../uni_modules/lime-signature/components/l-signature/l-signature.js";Math||(f+d+p)();const f=()=>"../components/header_tops_tips.js",m={__name:"signature",props:{},emits:["active","ride_id"],setup(o,{emit:i}){const _=o;e.toRefs(_),e.ref(0);const a=e.ref(null);function s(n){n=="save"?a.value.canvasToTempFilePath({success:c=>{e.index.uploadFile({url:`${l.baseUrl+l.apiPath}/infra/file/upload`,filePath:c.tempFilePath,name:"file",method:"post",header:{"tenant-id":1,Authorization:e.index.getStorageSync("token")},success:t=>{const u=JSON.parse(t.data);u.code==0?(e.index.setStorageSync("signature",u.data),e.index.showModal({title:"签名成功",content:"签名成功,点击确认返回上一级",success:v=>{setTimeout(()=>{r()},1e3)}})):e.index.showToast({icon:"error",title:"上传失败"})}})}}):n=="undo"?a.value.undo():n=="clear"&&a.value.clear()}function r(){e.index.setStorageSync("signature_back","reset"),e.index.navigateBack()}return(n,c)=>({a:e.o(r),b:e.p({["left-icon"]:"left",title:"签名",backgroundColor:"#e6eafa"}),c:e.sr(a,"0499dc8f-2",{k:"signatureRef"}),d:e.p({penColor:n.penColor,penSize:n.penSize}),e:e.o(t=>s("clear")),f:e.o(t=>s("undo")),g:e.o(t=>s("save"))})}},g=e._export_sfc(m,[["__scopeId","data-v-0499dc8f"],["__file","D:/xiangmu/佰安出行/app/s-applet/pages/home/signature.vue"]]);wx.createPage(g);