文档中心 > JSSDK文档

消息提醒

更新时间:2017/08/07 访问次数:3709

消息提醒

目前手机淘宝开放了消息提醒功能。当用户自己订阅某一类消息的时候,到具体的时间点,手机淘宝会推送一条系统提醒给用户。

淘日历

需要Tida.ready初始化的时候,添加依赖模块: calendar模块

/**
    *  
    [string] title //显示提醒的文案
    [string] startDate //事件开始时间 格式为YYYY-MM-dd hh:mm:ss 年月日时分秒
    [string] endDate //事件结束事件,单次提醒就跟startTime相同即可
    [string] link //跳转到的url
    [string] remind //提前几秒提醒,比如抢购在10:00开始,startTime = 2014-12-12 10:00:00,remind =180,那就是提前3分钟提醒【注意,starttime为开始时间,remind为提前量,调用方不需要自己换算时间】
    [string] description //扩展字段,保存其他信息,用不到可置空 
    */

    Tida.calendar.add({
       title: "日历测试", 
       startDate: "2015-07-09 14:20:00",
       endDate: "2015-07-09 14:40:00",
       link: "http://m.tmall.com",
       description: "description"
    }, function(result) {
       alert(JSON.stringify(result));
       if (result.errorCode) {
         // 添加日历失败
       } else {
         // 添加日历成功
       }
    });

FAQ

关于此文档暂时还没有FAQ
返回
顶部