"use strict";const e=require("../../common/vendor.js"),a=require("../../config/user.js"),o={__name:"index",setup(o){const t=e.ref(["设备故障","收费问题","使用建议","其他"]),n=e.ref(-1),u=e.ref(""),i=e.ref("");e.ref([]);const l=e.ref(""),s=async()=>{if(-1===n.value)return void e.index.showToast({title:"请选择问题类型",icon:"none"});if(!i.value.trim())return void e.index.showToast({title:"请描述您的问题",icon:"none"});if(!l.value)return void e.index.showToast({title:"请留下联系方式",icon:"none"});"设备故障"==t.value[n.value]||"收费问题"==t.value[n.value]?u.value="complain":u.value="suggestion";const o={type:u.value,content:i.value,phone:l.value};200==(await a.addUserFeedback(o)).code?e.index.showToast({title:"反馈成功",icon:"success"}):e.index.showToast({title:"反馈失败",icon:"none"})};return(a,o)=>({a:e.f(t.value,((a,o,t)=>({a:e.t(a),b:o,c:n.value===o?1:"",d:e.o((e=>(e=>{n.value=e})(o)),o)}))),b:i.value,c:e.o((e=>i.value=e.detail.value)),d:e.t(i.value.length),e:l.value,f:e.o((e=>l.value=e.detail.value)),g:e.o(s)})}},t=e._export_sfc(o,[["__scopeId","data-v-22cdb973"]]);wx.createPage(t);
