使用 google 日历给自己发送免费天气预报短信

  google calendar 可以使用导入url的方式来添加日历, 并且有短信通知,我们可以使用这个功能来为自己免费发送天气预报.

 

  我们要做的就是找一个提供日历事件的网站, 我使用的是 http://1tian.net/weather 的日历, 上面有大部分的县市完全可以满足你的需要,而且是五天的天气。而且他的通知是中文的,  下面我们就开始天加

 

  登陆 http://calendar.google.com , 在左点点击添加 -> 通过 url添加日历, 比如我要添加北京的天气, 在上面网站找到北京的天气页面 http://1tian.net/weather/city/1/  中间有个 ical 的图标, 点右键复制他链接的地址 北京是 http://1tian.net/weather/city/1.ics,


 

把这个地址复制到刚才 google calendar url框里,点击添加, 注意还没完.

  下面是设置发送短信通知.

点击管理日历,  可以看到刚才添加的北京天气在里面 , 点之 , 会进入这个日历的设置页面, 点击通知标签 , 看活动提醒部分, 点击添加提醒,把sms提醒加上就行, 这样就设置完了.

 

  等着收每天五点的免费天气预报提醒短信吧

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
在 Vue 中使用日历,可以使用现成的第三方库,比如 FullCalendar、vue-fullcalendar、v-calendar 等。下面以 FullCalendar 为例,介绍如何在 Vue 中使用日历。 1. 安装 FullCalendar 在项目中安装 FullCalendar,可以使用 npm 进行安装: ``` npm install --save @fullcalendar/vue @fullcalendar/daygrid @fullcalendar/interaction ``` 2. 引入 FullCalendar 在需要使用日历的 Vue 组件中,引入 FullCalendar: ```javascript import FullCalendar from '@fullcalendar/vue' import dayGridPlugin from '@fullcalendar/daygrid' import interactionPlugin from '@fullcalendar/interaction' export default { components: { FullCalendar }, ... } ``` 3. 使用 FullCalendar 在 Vue 组件中使用 FullCalendar,可以在 template 中进行如下的配置: ```html <template> <FullCalendar :plugins="[ dayGridPlugin, interactionPlugin ]" :initialView="'dayGridMonth'" :events="events" @dateClick="handleDateClick" /> </template> ``` 这里的 events 可以是一个数组,用来存储日历中的事件;initialView 则是设置初始的视图,比如 dayGridMonth 表示月视图;@dateClick 则是设置日期点击事件的处理函数。 4. 完整代码示例 ```html <template> <FullCalendar :plugins="[ dayGridPlugin, interactionPlugin ]" :initialView="'dayGridMonth'" :events="events" @dateClick="handleDateClick" /> </template> <script> import FullCalendar from '@fullcalendar/vue' import dayGridPlugin from '@fullcalendar/daygrid' import interactionPlugin from '@fullcalendar/interaction' export default { components: { FullCalendar }, data() { return { events: [ { title: 'Event 1', date: '2022-02-01' }, { title: 'Event 2', date: '2022-02-08' }, { title: 'Event 3', date: '2022-02-15' } ] } }, methods: { handleDateClick(info) { console.log(info.dateStr) } } } </script> ``` 这里的 data 中定义了一个 events 数组,用来存储日历中的事件;methods 中定义了一个 handleDateClick 方法,用来处理日期点击事件,这里只是简单地将日期字符串打印到控制台上。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值