_:n78e4c5e276fb4736acc1c1f201c1b653xb1
<http://schema.org/text>
"<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;title&gt;Title&lt;/title&gt;\n    &lt;script src=\"js/vue.js\"&gt;&lt;/script&gt;\n    &lt;script src=\"js/axios.js\"&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n    &lt;div id=\"app\"&gt;\n        &lt;input type=\"text\" v-model=\"city\"&gt;\n        &lt;button @click=\"get_weather\"&gt;点击获取天气&lt;/button&gt;\n    &lt;/div&gt;\n    &lt;script&gt;\n        let vm = new Vue({\n            el:\"#app\",\n            data:{\n                city:\"\",\n            },\n            methods:{\n                get_weather(){\n                    // http://wthrcdn.etouch.cn/weather_mini?city=城市名称\n                    axios.get(\"http://wthrcdn.etouch.cn/weather_mini?city=\"+this.city)\n                        .then(response=&gt;{\n                            console.log(response);\n \n                        }).catch(error=&gt;{\n                            console.log(error.response)\n                    });\n                }\n            }\n        })\n    &lt;/script&gt;\n&lt;/body&gt;\n&lt;/html&gt;</code><script async=\"\" crossorigin=\"anonymous\" data-hljs-style=\"github-gist\" integrity=\"sha384-PG1zopchh98J/8eUG/5ESEA+dE1Art6Ym1XKxLljmoOwlodOfUguCC/cydPWZSQ/\" onload=\"hljsLoader.highlightBlocks(this.parentNode)\" src=\"https://cdn.jsdelivr.net/gh/s9e/hljs-loader@1.0.8/loader.min.js\"></script></pre>"
<https://m.zkdygl.com/d/99-vue>