Commit 3466edb8 authored by liziwl's avatar liziwl
Browse files

增加天气服务

parent 237287b4
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
<template>
  <div id="weather-container">
    <span id="weather"></span>
  </div>
</template>


<script>
export default {
  name: "weather-span",
  mounted() {
    this.load_weather();
  },

  methods: {
    load_weather() {
      $.getJSON("https://api.sustech.online/weather", function (data) {
        $("#weather-container span").text(data.msg);
      });
    },
  },
};
</script>
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ module.exports = {
      {
        components: {
          Realtimemap: path.resolve(__dirname, './components/Realtime-map.vue'),
          WeatherSpan: path.resolve(__dirname, './components/weather-span.vue'),
          // Adsense_unit: path.resolve(__dirname, './components/adsense-inline-article.vue'),
          // componentsDir: path.resolve(__dirname, './components')

+2 −0
Original line number Diff line number Diff line
# 📚南科手册

<WeatherSpan></WeatherSpan>

* 为 SUSTecher 提供快捷信息查询服务。
* 移动端须点击左上角,打开目录。
* [微信小程序,点击这里](/miniapp)。