|
|
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((a=>t.resolve(e()).then((()=>a))),(a=>t.resolve(e()).then((()=>{throw a}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";const t="/static/forw.png",a=(e,t)=>{const a=e.__vccOpts||e;for(const[n,o]of t)a[n]=o;return a};const n=a({data:()=>({}),methods:{}},[["render",function(a,n,o,l,s,r){return e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("view",{class:"begin"},"我的班级"),e.createElementVNode("view",{class:"page-body"},[e.createElementVNode("view",{class:"btn-area"},[e.createElementVNode("navigator",{url:"/pages/index/question/question","hover-class":"navigator-hover"},[e.createElementVNode("button",{type:"default",class:"btn-with-icon"},[e.createElementVNode("view",{class:"btn-content"},[e.createElementVNode("image",{class:"btn-icon",src:"/static/class1.png"}),e.createElementVNode("view",{class:"shangke"},"上课次数:9")]),e.createElementVNode("view",{class:"btn-text"},"签到模拟"),e.createElementVNode("image",{src:t,class:"forward-icon"})])]),e.createElementVNode("navigator",{url:"/pages/index/attendance/attendance","hover-class":"navigator-hover"},[e.createElementVNode("button",{type:"default",class:"btn-with-icon"},[e.createElementVNode("view",{class:"btn-content"},[e.createElementVNode("image",{class:"btn-icon",src:"/static/class2.png"}),e.createElementVNode("view",{class:"shangke"},"上课次数:5")]),e.createElementVNode("view",{class:"btn-text"},"点名模拟"),e.createElementVNode("image",{src:t,class:"forward-icon"})])])])])])}]]);const o=a({data:()=>({availablePoints:140,products:[{name:"提问转移",price:25,description:"该商品允许用户将自己的提问转移到其他用户",message:""},{name:"免密钥签到",price:50,description:"购买此商品后,用户可以享受一次免密钥签到服务",message:""},{name:"成绩+1",price:200,description:"购买此商品后,用户可以获得额外的分数",message:""}]}),methods:{confirmPurchase(e){e.price>this.availablePoints?e.message="积分不足,无法购买该商品!":(this.availablePoints-=e.price,e.message=`购买成功!${e.name} 已购买,消耗 ${e.price} 积分。`)}}},[["render",function(t,a,n,o,l,s){return e.openBlock(),e.createElementBlock("view",{class:"product-list"},[e.createElementVNode("h2",null,"可用积分: "+e.toDisplayString(l.availablePoints)+" 积分",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.products,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"product-item"},[e.createElementVNode("h2",null,e.toDisplayString(t.name),1),e.createElementVNode("p",{class:"shop-pri"},[e.createElementVNode("span",{style:{"font-size":"48rpx",color:"firebrick","font-weight":"bold","margin-left":"auto"}},e.toDisplayString(t.price),1),e.createElementVNode("span",{style:{"align-items":"center","padding-left":"10rpx"}},"积分")]),e.createElementVNode("p",null,"介绍: "+e.toDisplayString(t.description),1),e.createElementVNode("view",{class:"shop-btn"},[e.createElementVNode("button",{onClick:e=>s.confirmPurchase(t)},"确认购买",8,["onClick"])]),t.message?(e.openBlock(),e.createElementBlock("view",{key:0,class:"message"},e.toDisplayString(t.message),1)):e.createCommentVNode("",!0)])))),128))])}],["__scopeId","data-v-60c61bc9"]]);const l=a({data:()=>({name:"",studentId:"",className:"",age:"",major:""}),methods:{saveInfo(){uni.showToast({title:"信息已保存",icon:"success"})}}},[["render",function(t,a,n,o,l,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"header"},[e.createElementVNode("navigator",{url:"/pages/login/login"},[e.createElementVNode("image",{src:"/static/exit.png",class:"exit",style:{height:"32px",width:"32px"}})])]),e.createElementVNode("view",{class:"profile-container"},[e.createElementVNode("navigator",{url:"/pages/login/login"},[e.createElementVNode("view",{class:"avatar-display"},[e.createElementVNode("image",{src:"/static/ava.png",mode:"aspectFit",class:"avatar-image"})])]),e.createElementVNode("view",{class:"form"},[e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"label"},"姓名"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>l.name=e),class:"info-input"},null,512),[[e.vModelText,l.name]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"label"},"学号"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=e=>l.studentId=e),class:"info-input"},null,512),[[e.vModelText,l.studentId]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"label"},"班级"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[2]||(a[2]=e=>l.className=e),class:"info-input"},null,512),[[e.vModelText,l.className]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"label"},"年龄"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[3]||(a[3]=e=>l.age=e),class:"info-input"},null,512),[[e.vModelText,l.age]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"label"},"专业"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[4]||(a[4]=e=>l.major=e),class:"info-input"},null,512),[[e.vModelText,l.major]])]),e.createElementVNode("button",{onClick:a[5]||(a[5]=(...e)=>s.saveInfo&&s.saveInfo(...e)),class:"save-button"},"保存信息")])])],64)}],["__scopeId","data-v-d68e552e"]]);function s(e,t,...a){uni.__log__?uni.__log__(e,t,...a):console[e].apply(console,[...a,t])}const r=a({__name:"rank",setup(t){const a=e.ref([]);return e.onMounted((()=>{(async()=>{try{let e=await uni.request({url:"http://10.198.140.41:3000/api/upload",method:"GET"});e&&e.data&&(a.value=e.data.map((e=>({name:e.name,score:e.points}))),a.value.sort(((e,t)=>t.score-e.score)))}catch(e){s("error","at pages/rank/rank.vue:51","获取学生数据失败:",e)}})()})),(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"rrpage"},[e.createElementVNode("view",{class:"rtop-nav"},[e.createElementVNode("view",{class:"rtop-left"},"姓名"),e.createElementVNode("view",{class:"rtop-scole"},"积分"),e.createElementVNode("view",{class:"rtop-rank"},"名次")]),e.createElementVNode("view",{class:"rrpage-body"},[e.createElementVNode("view",{class:"rank-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"rank-item",key:a},[e.createElementVNode("view",{class:"rank-info rank-name"},[e.createElementVNode("text",null,e.toDisplayString(t.name),1)]),e.createElementVNode("view",{class:"rank-info rank-score"},[e.createElementVNode("text",null,e.toDisplayString(t.score),1)]),e.createElementVNode("view",{class:"rank-info rank-position"},[e.createElementVNode("text",null,e.toDisplayString(a+1),1)])])))),128))])]),e.createElementVNode("navigator",{url:"mine rank/mine rank","hover-class":"navigator-hover"},[e.createElementVNode("view",{class:"rbtn-area"},"我的排名")])]))}},[["__scopeId","data-v-49fd074f"]]);const i=a({data:()=>({signInCount:0,Answers:0}),computed:{totalPoints(){return 2*this.signInCount+3*this.Answers}}},[["render",function(t,a,n,o,l,s){return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createElementVNode("view",{class:"circle"},[e.createElementVNode("text",{class:"total-points"},e.toDisplayString(s.totalPoints),1),e.createElementVNode("text",{class:"points-label"},"总积分")]),e.createElementVNode("view",{class:"stats"},[e.createElementVNode("view",{class:"stat-item"},[e.createElementVNode("text",null,"签到次数:"),e.createElementVNode("text",{class:"count"},e.toDisplayString(l.signInCount),1)]),e.createElementVNode("view",{class:"stat-item"},[e.createElementVNode("text",null,"回答问题次数: "),e.createElementVNode("text",{class:"count"},e.toDisplayString(l.Answers),1)])])])}]]),c=a({__name:"question",setup(t){const a=e.ref(""),n=e.ref(""),o=e.ref(""),l=e.ref([]),r=e.ref(null),i=()=>{if(0===l.value.length)return void uni.showToast({title:"没有学生数据",icon:"none"});const e=Math.floor(Math.random()*l.value.length);r.value=l.value[e]},c=async()=>{r.value?""!==a.value.trim()?(a.value===o.value?(r.value.points+=2,uni.showToast({title:"回答正确",icon:"success"})):(r.value.points-=1,uni.showToast({title:"回答错误",icon:"none"})),a.value="",await d(r.value)):uni.showToast({title:"请输入答案",icon:"none"}):uni.showToast({title:"请先选择天选之子",icon:"none"})},u=()=>{r.value&&(r.value.points+=1,uni.showToast({title:"签到成功",icon:"success"}))},d=async e=>{try{const t=await uni.request({url:"http://10.198.140.41:3000/api/upload",method:"POST",data:{name:e.name,points:r.value.points},header:{"Content-Type":"application/json"}});200===t.statusCode?s("log","at pages/index/question/question.vue:148","Attendance updated successfully:",t.data):s("error","at pages/index/question/question.vue:150","Failed to update attendance:",t.data)}catch(t){s("error","at pages/index/question/question.vue:153","Error occurred while updating attendance:",t)}};return e.onMounted((()=>{(async()=>{try{const e=await uni.request({url:"http://10.198.140.41:3000/api/questions",method:"GET"});if(200===e.statusCode&&e.data.length>0){const t=e.data[0];n.value=t.question,o.value=t.correctAnswer}else s("error","at pages/index/question/question.vue:47","获取问题失败:",e),uni.showToast({title:"无法获取问题",icon:"none"})}catch(e){s("error","at pages/index/question/question.vue:51","请求时发生错误:",e),uni.showToast({title:"网络错误",icon:"none"})}})(),(async()=>{try{let e=await uni.request({url:"http://10.198.140.41:3000/api/upload",method:"GET"});e&&e.data&&(l.value=e.data.map((e=>({name:e.name,points:e.points||0}))),s("log","at pages/index/question/question.vue:68",l.value))}catch(e){s("error","at pages/index/question/question.vue:71","获取学生数据失败:",e)}})()})),(t,o)=>{var l;return e.openBlock(),e.createElementBlock("view",null,[n.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"question-container"},[e.createElementVNode("text",null,"问题: "+e.toDisplayString(n.value),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=e=>a.value=e),placeholder:"请输入你的答案",class:"answer-input"},null,512),[[e.vModelText,a.value]]),e.createElementVNode("button",{onClick:c,class:"button"},"提交答案")])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"txzz"},[e.createElementVNode("button",{onClick:i,style:{width:"320px"}},[e.createElementVNode("text",null,"天选之子:"+e.toDisplayString((null==(l=r.value)?void 0:l.name)||"点击选择"),1)]),r.value?(e.openBlock(),e.createElementBlock("text",{key:0},"当前积分: "+e.toDisplayString(r.value.points),1)):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:"atten"},[e.createElementVNode("button",{onClick:u,class:"button"},"签到")])])}}},[["__scopeId","data-v-445667fd"]]),u=a({__name:"attendance",setup(t){const a=e.ref([]),n=e.ref([]),o=async()=>{if(0===a.value.length)return void s("warn","at pages/index/attendance/attendance.vue:61","没有学生数据可供点名");const e=Math.floor(11*Math.random())+20,t=a.value.sort((()=>.5-Math.random())).slice(0,Math.min(e,a.value.length));t.forEach((e=>{e.signed=!0,e.points+=3})),n.value=t,await Promise.all(t.map((e=>l(e))))},l=async e=>{try{const t=await uni.request({url:"http://10.198.140.41:3000/api/upload",method:"PUT",data:{points:e.points},header:{"Content-Type":"application/json"}});200===t.statusCode?s("log","at pages/index/attendance/attendance.vue:127","Attendance updated successfully:",t.data):s("error","at pages/index/attendance/attendance.vue:131","Failed to update attendance:",t.data)}catch(t){s("error","at pages/index/attendance/attendance.vue:137","Error occurred while updating attendance:",t)}};return e.onMounted((()=>{(async()=>{try{let e=await uni.request({url:"http://10.198.140.41:3000/api/upload",method:"GET"});e&&e.data&&(a.value=e.data.map((e=>({name:e.name,signed:!1,points:e.points||0}))))}catch(e){s("error","at pages/index/attendance/attendance.vue:51","获取学生数据失败:",e)}})()})),(t,a)=>(e.openBlock(),e.createElementBlock("view",null,[e.createElementVNode("input",{type:"file",accept:".xlsx, .xls",onChange:a[0]||(a[0]=(...e)=>t.handleFileUpload&&t.handleFileUpload(...e)),class:"file-input"},null,32),e.createElementVNode("button",{onClick:a[1]||(a[1]=(...e)=>t.upload&&t.upload(...e)),class:"button"},"上传名单"),e.createElementVNode("view",null,[e.createElementVNode("button",{onClick:o,class:"button"},"随机点名")]),e.createElementVNode("view",{class:"list"},[e.createElementVNode("view",{class:"list-header"},[e.createElementVNode("text",{class:"list-left"},"签到学生名单"),e.createElementVNode("text",{class:"list-mid"},"状态"),e.createElementVNode("text",{class:"list-right"},"积分")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{key:a,class:"list-item"},[e.createElementVNode("text",{class:"item-left"},e.toDisplayString(t.name),1),e.createElementVNode("text",{class:"item-mid"},e.toDisplayString(t.signed?"✔":""),1),e.createElementVNode("text",{class:"item-right"},e.toDisplayString(t.points),1)])))),128))])]))}},[["__scopeId","data-v-6aae2cc9"]]);const d=a({methods:{selectIdentity(e){uni.setStorageSync("selectedIdentity",e)}}},[["render",function(t,a,n,o,l,s){return e.openBlock(),e.createElementBlock("view",{class:"container"},[e.createElementVNode("navigator",{url:"/pages/login/zhuce/register/teacher"},[e.createElementVNode("view",{class:"section"},[e.createElementVNode("image",{src:"/static/teacher.png",mode:"aspectFit",class:"identity-image"}),e.createElementVNode("button",{class:"identity-button",onClick:a[0]||(a[0]=e=>s.selectIdentity("teacher"))},"我是老师")])]),e.createElementVNode("view",{class:"divider"}),e.createElementVNode("navigator",{url:"/pages/login/zhuce/register/register"},[e.createElementVNode("view",{class:"section"},[e.createElementVNode("image",{src:"/static/student.png",mode:"aspectFit",class:"identity-image"}),e.createElementVNode("button",{class:"identity-button",onClick:a[1]||(a[1]=e=>s.selectIdentity("student"))},"我是学生")])])])}]]),p=a({__name:"register",setup(t){const a=e.ref({name:"",studentId:"",password:"",confirmPassword:""}),n=e.ref([]),o=async()=>{if(a.value.name&&a.value.password&&a.value.confirmPassword&&a.value.studentId)if(a.value.password===a.value.confirmPassword){s("log","at pages/login/zhuce/register/register.vue:53","注册信息:",a.value);try{let e=await uni.request({url:"http://10.198.140.41:3000/api/students/register",method:"POST",header:{"Content-Type":"application/json"},data:{name:a.value.name,studentId:a.value.studentId,password:a.value.password,confirmPassword:a.value.confirmPassword}});s("log","at pages/login/zhuce/register/register.vue:70","响应数据:",e.data),e&&e.data&&(n.value=e.data,"注册成功,欢迎同学"===e.data.message&&(s("log","at pages/login/zhuce/register/register.vue:75","注册成功!"),uni.navigateTo({url:"/pages/login/stulogin"})))}catch(e){s("error","at pages/login/zhuce/register/register.vue:82","注册失败:",e.response?e.response.data:e)}}else s("error","at pages/login/zhuce/register/register.vue:49","密码和确认密码不一致");else s("error","at pages/login/zhuce/register/register.vue:44","请填写所有字段")};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"login-container"},[e.createElementVNode("view",{class:"form"},[e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"👤"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[0]||(n[0]=e=>a.value.name=e),placeholder:"请输入账号"},null,512),[[e.vModelText,a.value.name]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"✌"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[1]||(n[1]=e=>a.value.studentId=e),placeholder:"请输入学号"},null,512),[[e.vModelText,a.value.studentId]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"🔒"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[2]||(n[2]=e=>a.value.password=e),type:"password",placeholder:"请输入密码"},null,512),[[e.vModelText,a.value.password]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"🔒"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[3]||(n[3]=e=>a.value.confirmPassword=e),type:"password",placeholder:"确认输入密码"},null,512),[[e.vModelText,a.value.confirmPassword]])])]),e.createElementVNode("button",{class:"login-button",onClick:o},"注册")]))}},[["__scopeId","data-v-ad0bcc4e"]]),m=a({__name:"teacher",setup(t){const a=e.ref({username:"",password:"",confirmPassword:""}),n=e.ref([]),o=async()=>{if(a.value.username&&a.value.password&&a.value.confirmPassword)if(a.value.password===a.value.confirmPassword){s("log","at pages/login/zhuce/register/teacher.vue:48","注册信息:",a.value);try{let e=await uni.request({url:"http://10.198.140.41:3000/api/teacher/register",method:"POST",header:{"Content-Type":"application/json"},data:{username:a.value.username,password:a.value.password,confirmPassword:a.value.confirmPassword}});s("log","at pages/login/zhuce/register/teacher.vue:64","响应数据:",e.data),e&&e.data&&(n.value=e.data,"注册成功,欢迎老师"===e.data.message&&(s("log","at pages/login/zhuce/register/teacher.vue:69","注册成功!"),uni.navigateTo({url:"/pages/login/login"})))}catch(e){s("error","at pages/login/zhuce/register/teacher.vue:76","注册失败:",e.response?e.response.data:e)}}else s("error","at pages/login/zhuce/register/teacher.vue:44","密码和确认密码不一致");else s("error","at pages/login/zhuce/register/teacher.vue:39","请填写所有字段")};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"login-container"},[e.createElementVNode("view",{class:"form"},[e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"👤"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[0]||(n[0]=e=>a.value.username=e),placeholder:"请输入账号"},null,512),[[e.vModelText,a.value.username]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"🔒"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[1]||(n[1]=e=>a.value.password=e),type:"password",placeholder:"请输入密码"},null,512),[[e.vModelText,a.value.password]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"🔒"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[2]||(n[2]=e=>a.value.confirmPassword=e),type:"password",placeholder:"确认输入密码"},null,512),[[e.vModelText,a.value.confirmPassword]])])]),e.createElementVNode("button",{class:"login-button",onClick:o},"注册")]))}},[["__scopeId","data-v-76bca410"]]),g=a({__name:"stulogin",setup(t){const a=e.ref({studentId:"",password:""}),n=e.ref([]),o=()=>{uni.navigateTo({url:"/pages/login/zhuce/shenfen",success:e=>{s("log","at pages/login/stulogin.vue:36","成功跳转到注册页面")},fail:e=>{s("error","at pages/login/stulogin.vue:39","跳转失败:",e)}})},l=async()=>{try{let e=await uni.request({url:"http://10.198.140.41:3000/api/students/login",method:"POST",header:{"Content-Type":"application/json"},data:{studentId:a.value.studentId,password:a.value.password}});s("log","at pages/login/stulogin.vue:58","响应数据:",e.data),e&&e.data&&(n.value=e.data,"登录成功"===e.data.message&&(s("log","at pages/login/stulogin.vue:63","登录成功!"),uni.switchTab({url:"/pages/index/index"})))}catch(e){s("error","at pages/login/stulogin.vue:70","登录请求失败:",e)}};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"login-container"},[e.createElementVNode("view",{class:"form"},[e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"👤"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[0]||(n[0]=e=>a.value.studentId=e),placeholder:"请输入账号"},null,512),[[e.vModelText,a.value.studentId]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"🔒"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[1]||(n[1]=e=>a.value.password=e),type:"password",placeholder:"请输入密码"},null,512),[[e.vModelText,a.value.password]])])]),e.createElementVNode("button",{class:"login-button",onClick:l},"登录"),e.createElementVNode("button",{class:"register-button",onClick:o},"注册")]))}},[["__scopeId","data-v-2cad1412"]]),v=a({__name:"login",setup(t){const a=e.ref({username:"",password:""}),n=e.ref([]),o=()=>{uni.navigateTo({url:"/pages/login/zhuce/shenfen",success:e=>{s("log","at pages/login/login.vue:36","成功跳转到注册页面")},fail:e=>{s("error","at pages/login/login.vue:39","跳转失败:",e)}})},l=async()=>{try{let e=await uni.request({url:"http://10.198.140.41:3000/api/teacher/login",method:"POST",header:{"Content-Type":"application/json"},data:{username:a.value.username,password:a.value.password}});s("log","at pages/login/login.vue:58","响应数据:",e.data),s("log","at pages/login/login.vue:59","登录信息:",a.value),e&&e.data&&(n.value=e.data,"登录成功"===e.data.message&&(uni.switchTab({url:"/pages/index/index"}),s("log","at pages/login/login.vue:67","登录成功!")))}catch(e){s("error","at pages/login/login.vue:71","登录请求失败:",e)}};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"login-container"},[e.createElementVNode("view",{class:"form"},[e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"👤"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[0]||(n[0]=e=>a.value.username=e),placeholder:"请输入账号"},null,512),[[e.vModelText,a.value.username]])]),e.createElementVNode("view",{class:"input-group"},[e.createElementVNode("text",{class:"icon"},"🔒"),e.withDirectives(e.createElementVNode("input",{class:"input","onUpdate:modelValue":n[1]||(n[1]=e=>a.value.password=e),type:"password",placeholder:"请输入密码"},null,512),[[e.vModelText,a.value.password]])])]),e.createElementVNode("button",{class:"login-button",onClick:l},"登录"),e.createElementVNode("button",{class:"register-button",onClick:o},"注册")]))}},[["__scopeId","data-v-4958dc7a"]]);__definePage("pages/index/index",n),__definePage("pages/shop/shop",o),__definePage("pages/information/information",l),__definePage("pages/rank/rank",r),__definePage("pages/rank/mine rank/mine rank",i),__definePage("pages/index/question/question",c),__definePage("pages/index/attendance/attendance",u),__definePage("pages/login/zhuce/shenfen",d),__definePage("pages/login/zhuce/register/register",p),__definePage("pages/login/zhuce/register/teacher",m),__definePage("pages/login/stulogin",g),__definePage("pages/login/login",v);const w={onLaunch:function(){s("log","at App.vue:4","App Launch")},onShow:function(){s("log","at App.vue:7","App Show")},onHide:function(){s("log","at App.vue:10","App Hide")}};const{app:h,Vuex:E,Pinia:V}={app:e.createVueApp(w)};uni.Vuex=E,uni.Pinia=V,h.provide("__globalStyles",__uniConfig.styles),h._component.mpType="app",h._component.render=()=>{},h.mount("#app")}(Vue);
|