我这个button点击之后没有反应

就是这个button绑定上事件后没有反应,运行之后看控制台也没有报错或者什么的,希望帮忙看看到底那边出了问题

img

控制台报错了吗
是不是这两个引入有问题

img


建议你把这两个下载下来,在本地引入

你的get请求的api是用不了的吧


<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="text" v-model="city" />
        <input type="button" value="搜索" @click="searchw"><br>
        <a href="#">北京</a>
        <a href="#">深圳</a>
        <a href="#">上海</a>
        <a href="#">南京</a>
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
        <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
        <script>
            var app = new Vue(
                {
                    el: "#app",
                    data: {
                        city: "24141"
                    },
                    methods: {
                        searchw: function () {
                            console.log(111)
                            axios.get("http://wthrch.etouch.cn/weather mini?city=" + this.city)
                                .then(function (response) {
                                    console.log(response.data);
                                })
                        }
                    }
                })
        </script>
        </div>
</body>
</html>

可以输出啊