1 line
3.3 KiB
JSON
1 line
3.3 KiB
JSON
{"ast":null,"code":"import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, vModelText as _vModelText, withDirectives as _withDirectives, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\";\nconst _hoisted_1 = {\n id: \"token\"\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n return _openBlock(), _createElementBlock(_Fragment, null, [_createElementVNode(\"div\", _hoisted_1, _toDisplayString($data.token), 1 /* TEXT */), _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n id: \"student_id\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $data.student_id = $event)\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $data.student_id]]), _createElementVNode(\"input\", {\n type: \"button\",\n id: \"getToken\",\n onClick: _cache[1] || (_cache[1] = (...args) => $options.getToken && $options.getToken(...args)),\n value: \"getToken\"\n })], 64 /* STABLE_FRAGMENT */);\n}","map":{"version":3,"names":["id","_createElementVNode","_hoisted_1","_toDisplayString","$data","token","type","student_id","$event","onClick","_cache","args","$options","getToken","value"],"sources":["C:\\exam_app\\app_vue\\src\\components\\Login_1.vue"],"sourcesContent":["<template>\r\n <div id=\"token\">{{token}}</div>\r\n <input type=\"text\" id=\"student_id\" v-model=\"student_id\">\r\n <input type=\"button\" id=\"getToken\" @click=\"getToken\" value=\"getToken\">\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: \"Login_1\",\r\n data(){\r\n return{\r\n domain:\"http://10.128.128.249:8022/\",\r\n url:\"public_api/v1/api_for_vue_exam_2\",\r\n student_id: \"\",\r\n token:\"\",\r\n }\r\n },\r\n methods:{\r\n getToken() {\r\n const formData = new FormData();\r\n formData.append(\"student_id\", this.student_id);\r\n let url = this.domain + this.url;\r\n let that = this;\r\n this.axios.post(\r\n url,\r\n formData,\r\n {\r\n headers:{\r\n 'Content-Type': 'multipart/form-data'\r\n }\r\n }\r\n ).then(\r\n function (response) {\r\n that.token=response.data;\r\n },\r\n function (error) {\r\n console.log(error)\r\n }\r\n )\r\n }\r\n },\r\n mounted() {\r\n window.myVue=this;\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n\r\n</style>"],"mappings":";;EACSA,EAAE,EAAC;AAAO;;6DAAfC,mBAAA,CAA+B,OAA/BC,UAA+B,EAAAC,gBAAA,CAAbC,KAAA,CAAAC,KAAK,kB,gBACvBJ,mBAAA,CAAyD;IAAlDK,IAAI,EAAC,MAAM;IAACN,EAAE,EAAC,YAAY;+DAAWI,KAAA,CAAAG,UAAU,GAAAC,MAAA;iDAAVJ,KAAA,CAAAG,UAAU,E,GACvDN,mBAAA,CAAsE;IAA/DK,IAAI,EAAC,QAAQ;IAACN,EAAE,EAAC,UAAU;IAAES,OAAK,EAAAC,MAAA,QAAAA,MAAA,UAAAC,IAAA,KAAEC,QAAA,CAAAC,QAAA,IAAAD,QAAA,CAAAC,QAAA,IAAAF,IAAA,CAAQ;IAAEG,KAAK,EAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |