-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
288c444
commit cab67f8
Showing
5 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
# mip-233-up2now | ||
|
||
将目标时间更新至最新 | ||
|
||
标题|内容 | ||
----|---- | ||
类型|业务,广告 | ||
支持布局|N/S | ||
所需脚本|https://mipcache.bdstatic.com/static/v1/mip-233-up2now/mip-233-up2now.js | ||
|
||
## 示例 | ||
|
||
``` html | ||
<mip-233-up2now><p><span class="article_channel">课程推广</span><i class="time">06-13</i></p></mip-233-up2now> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* @file 将目标时间更新至最新 | ||
* @author 233 程序部 | ||
*/ | ||
define(function (require) { | ||
var $ = require('zepto'); | ||
var customElem = require('customElement').create(); | ||
// build 方法,元素插入到文档时执行,仅会执行一次 | ||
customElem.prototype.build = function () { | ||
var element = this.element; | ||
var date = new Date(); | ||
var month = date.getMonth() + 1; | ||
var day = date.getDate(); | ||
if (month < 10) { | ||
month = '0' + month; | ||
} | ||
$(element).find('.time').html(month + '-' + day); | ||
}; | ||
return customElem; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "mip-233-up2now", | ||
"version": "1.0.0", | ||
"description":"将目标时间更新至最新", | ||
"author": { | ||
"name": "up2now", | ||
"email": "[email protected]", | ||
"url": "www.233.com" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters