1 line
2.6 KiB
JSON
1 line
2.6 KiB
JSON
{"ast":null,"code":"export default {\n name: \"GetToken_1\",\n data() {\n return {\n proxy: \"/examServer\",\n url: \"/public_api/v1/api_for_vue_exam_1?student_id=\",\n token: \"no token\",\n student_id: \"202241401015\"\n };\n },\n methods: {\n getToken() {\n let url = this.proxy + this.url + this.student_id;\n let that = this;\n this.axios.get(url).then(function (response) {\n that.token = response.data;\n }, function (error) {\n console.log(error.data);\n });\n }\n },\n mounted() {\n window.myVue = this;\n }\n};","map":{"version":3,"names":["name","data","proxy","url","token","student_id","methods","getToken","that","axios","get","then","response","error","console","log","mounted","window","myVue"],"sources":["C:\\exam_app\\app_vue\\src\\components\\GetToken_1.vue"],"sourcesContent":["<template>\r\n <div id=\"token\">{{token}}</div>\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: \"GetToken_1\",\r\n data(){\r\n return{\r\n proxy:\"/examServer\",\r\n url:\"/public_api/v1/api_for_vue_exam_1?student_id=\",\r\n token:\"no token\",\r\n student_id: \"202241401015\"\r\n }\r\n },\r\n methods:{\r\n getToken(){\r\n let url=this.proxy+this.url+this.student_id;\r\n let that=this;\r\n this.axios.get(url).then(\r\n function (response) {\r\n that.token=response.data;\r\n },\r\n function (error) {\r\n console.log(error.data);\r\n }\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":"AAMI,eAAe;EACXA,IAAI,EAAE,YAAY;EAClBC,IAAIA,CAAA,EAAE;IACF,OAAM;MACFC,KAAK,EAAC,aAAa;MACnBC,GAAG,EAAC,+CAA+C;MACnDC,KAAK,EAAC,UAAU;MAChBC,UAAU,EAAE;IAChB;EACJ,CAAC;EACDC,OAAO,EAAC;IACJC,QAAQA,CAAA,EAAE;MACN,IAAIJ,GAAG,GAAC,IAAI,CAACD,KAAK,GAAC,IAAI,CAACC,GAAG,GAAC,IAAI,CAACE,UAAU;MAC3C,IAAIG,IAAI,GAAC,IAAI;MACb,IAAI,CAACC,KAAK,CAACC,GAAG,CAACP,GAAG,CAAC,CAACQ,IAAI,CACpB,UAAUC,QAAQ,EAAE;QAChBJ,IAAI,CAACJ,KAAK,GAACQ,QAAQ,CAACX,IAAI;MAC5B,CAAC,EACD,UAAUY,KAAK,EAAE;QACbC,OAAO,CAACC,GAAG,CAACF,KAAK,CAACZ,IAAI,CAAC;MAC3B,CAEJ;IACJ;EACJ,CAAC;EACDe,OAAOA,CAAA,EAAG;IACNC,MAAM,CAACC,KAAK,GAAC,IAAI;EACrB;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |