Skip to content

Commit

Permalink
update extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
mip-platform committed Jun 29, 2017
1 parent 02892f4 commit f968161
Show file tree
Hide file tree
Showing 24 changed files with 432 additions and 13 deletions.
62 changes: 62 additions & 0 deletions mip-233-ksbm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# mip-233-ksbm

考试报名功能

标题|内容
----|----
类型|业务,广告
支持布局|N/S
所需脚本|https://mipcache.bdstatic.com/static/v1/mip-233-ksbm/mip-233-ksbm.js

## 示例

``` html
<!--考试报名弹窗插件-->
<mip-233-ksbm data-change="change-icon" data-content="ksbm">
<span class="change-icon">切换</span>
</mip-233-ksbm>
<!--/考试报名弹窗插件-->
<!--考试报名弹窗-->
<div class="body_mask hide ksbm">
<div class="popup popup2">
<div class="popup-cma clearfix">
<h3>切换地区<span class="close-btn">关闭</span></h3>
<ul class="w1 clearfix">
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">天津</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">北京</a></li>
<li class="btbd"><a href="#">上海</a></li>
</ul>
</div>
</div>
</div>
<!--/考试报名弹窗-->
```
26 changes: 26 additions & 0 deletions mip-233-ksbm/mip-233-ksbm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @file 倒计时功能
* @author 233 程序部
*/
define(function (require) {
var $ = require('zepto');
var customElem = require('customElement').create();
// build 方法,元素插入到文档时执行,仅会执行一次
customElem.prototype.build = function () {
var element = this.element;
var change = $(element).attr('data-change');
var content = $(element).attr('data-content');
var flag = false;
$(element).find('.' + change).click(function () {
if (flag) {
$('.' + content).hide();
} else {
$('.' + content).removeClass('hide').show();
}
});
$('.' + content).find('.close-btn').click(function () {
$('.' + content).hide();
});
};
return customElem;
});
10 changes: 10 additions & 0 deletions mip-233-ksbm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "mip-233-ksbm",
"version": "1.0.0",
"description":"考试报名功能",
"author": {
"name": "ksbm",
"email": "[email protected]",
"url": "www.233.com"
}
}
2 changes: 1 addition & 1 deletion mip-233-newsmore/mip-233-newsmore.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ define(function (require) {
success: function (data) {
if (data) {
$(element).find('.news-content').html($(element).find('.news-content').html() + data);
obj.attr('data-page', ++page);
$(element).attr('data-page', ++page);
}
},
error: function (data) {
Expand Down
2 changes: 1 addition & 1 deletion mip-233-newsmore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mip-233-newsmore",
"version": "1.0.0",
"version": "1.0.1",
"description":"分页加载新闻插件",
"author": {
"name": "newsmore",
Expand Down
23 changes: 23 additions & 0 deletions mip-233-yytx/mip-233-yytx.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ define(function (require) {
var lastTime = 60;
var timer = null;
var domain = $(element).attr('data-domain');
var cdomain = $(element).attr('data-cdomain');
// 点获取验证码后,过60秒才能再次提交
function change() {
flag = false;
Expand All @@ -25,6 +26,28 @@ define(function (require) {
$('#getyanzheng').addClass('grey').html('重新发(' + lastTime + ')');
}
}
// 动态加载 select 数据
function chrKemulist() {
var htm = '';
$.ajax({
type: 'get',
scriptCharset: 'utf-8',
url: 'http://m.233.com/include201610/json/' + (('undefined' !== typeof cdomain && cdomain !== '') ? cdomain : domain) + '.json',
dataType: 'json',
success: function (data) {
for (var i = 0; i < data.myClass.length; i++) {
var n = data.myClass[i];
htm = htm + '<option value ="' + n.ClassID + '" style="text-align:right">';
htm = htm + n.ClassName + '</option>';
}
$('#kemu').html(htm);
},
error: function () { },
async: true,
cache: false
});
}
chrKemulist();
$('.orange-btn').click(function () {
$(element).find('.body_mask').removeClass('hide').show();
});
Expand Down
2 changes: 1 addition & 1 deletion mip-233-yytx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mip-233-yytx",
"version": "1.0.1",
"version": "1.0.2",
"description":"预约提醒插件",
"author": {
"name": "233预约提醒",
Expand Down
4 changes: 2 additions & 2 deletions mip-ad-link/mip-ad-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ define(function (require) {
customElement.prototype.build = function () {
$('#article_body').find('mip-img').parent().css('text-indent', 'initial');
$('#article_body').find('mip-img').parent().css('text-align', 'center');
$('#article_body').find('mip-img').parent().append('<mip-link href="https://m.cnkang.com/pic/" class="tianjia">点击图片,查看无码私图(套图)</mip-link>');
$('#article_body').find('mip-img').parent().append('<a href="https://m.cnkang.com/pic/" class="tianjia">点击图片,查看无码私图(套图)</a>');
$(function () {
var imgs = $('#article_body mip-img');
if (imgs.length) {
Expand All @@ -23,7 +23,7 @@ define(function (require) {
var urls = data.url;
urls = shuffle(urls).slice(0, imgs.length);
imgs.each(function (index, el) {
$(this).wrap('<mip-link href = ' + urls[index] + '/></mip-link>');
$(this).wrap('<a href = ' + urls[index] + '/></a>');
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion mip-ad-link/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mip-ad-link",
"version": "1.3.0",
"version": "1.4.0",
"description": "康网图片增加链接代码",
"contributors": [
{
Expand Down
28 changes: 28 additions & 0 deletions mip-clickup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# mip-clickup

mip-clickup 康网链接点击记录

标题|内容
----|----
类型|通用
支持布局|responsive,fixed-height,fill,container,fixed
所需脚本|https://mipcache.bdstatic.com/extensions/platform/v1/mip-clickup/mip-clickup.js

## 示例

### 康网链接点击记录
```html
<mip-clickup>
<div>
<a class="clickup" href="http://blog.sumcool.com/m/blog_151029_01.php?aid=100" target="_blank"><span >广告</span>放荡少妇竟按住邻居疯狂抽搐连续6次高潮!
<span class="canshu">1</span>
</a>
</div>
</mip-clickup>
```
```style
<style mip-custom>
.canshu{display:none;}
</style>
```

19 changes: 19 additions & 0 deletions mip-clickup/mip-clickup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @file mip-clickup 康网链接点击记录
* @author cnkang
*/

define(function (require) {
var $ = require('zepto');
var util = require('util');
var platform = util.platform;
var customElement = require('customElement').create();
customElement.prototype.build = function () {
$('.clickup').click(function () {
var canshu = $('.canshu').html();
var shuliang = parseFloat(10000000000000 * Math.random());
$.ajax({url: 'https://m.cnkang.com/api/urlview?position=' + canshu + '&' + new Date().getTime() + shuliang});
});
};
return customElement;
});
7 changes: 7 additions & 0 deletions mip-clickup/mip-clickup.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @file mip-clickup样式文件
*/

mip-clickup {
// TODO
}
14 changes: 14 additions & 0 deletions mip-clickup/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "mip-clickup",
"version": "1.0.0",
"description": "康网链接点击记录",
"contributors": [
{
"name": "sunruinian",
"email": "[email protected]"
}
],
"engines": {
"mip": ">=1.1.0"
}
}
49 changes: 49 additions & 0 deletions mip-copy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# mip-copy

mip-copy 康网点击换一换

标题|内容
----|----
类型|通用
支持布局|responsive,fixed-height,fill,container,fixed
所需脚本|https://mipcache.bdstatic.com/extensions/platform/v1/mip-copy/mip-copy.js

## 示例

### 康网点击换一换
```html
<mip-copy>
<div class="block15" data-change-block="">
<dl class="block15_title">
<dt></dt>
<dd>热词推荐</dd>
<a href="http://m.sandbox.cnkang.com/pic/mip/6773564.html" class="changMore" data-change-btn="" data-change-api="http://m.sandbox.cnkang.com/sex/cnkang/gettagsapi?columnid=3696&from=mip&num=21"><span></span>换一换</a>
</dl>
<div class="iy02" data-change-content="">
<a href="http://m.sandbox.cnkang.com/pic/keyword/14927.html" class="link05" >高清美女</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14925.html" >美腿诱惑</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14919.html" >艺术写真</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14916.html" class="link05" >浴室</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14910.html" >吊带</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14908.html" class="link05" >性感诱惑</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14907.html" >泳装</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14906.html" >大美女</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14903.html" class="link05" >极品美女</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14900.html" >欧美美女</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14898.html" >泳装美女</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14892.html" >足球宝贝</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14890.html" >学生妹</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14887.html" >写真集</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14878.html" >人体摄影</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14874.html" >写真</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14872.html" >捆绑</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14863.html" >内涵图</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14859.html" >模特</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14858.html" >帅哥</a>
<a href="http://m.sandbox.cnkang.com/pic/keyword/14852.html" >人体</a>
</div>
</div>
</mip-copy>
```


34 changes: 34 additions & 0 deletions mip-copy/mip-copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* @file mip-copy 康网点击换一换
* @author cnkang
*/

define(function (require) {
var $ = require('zepto');
var util = require('util');
var platform = util.platform;
var customElement = require('customElement').create();
customElement.prototype.build = function () {
$(document).ready(function (e) {
$('[data-change-block]').on('click', '[data-change-btn]', function (event) {
event.preventDefault();
var changeBtn = $(this);
var apiStr = changeBtn.attr('data-change-api');
var joinChar = apiStr.indexOf('?') > - 1 ? '&' : '?';
var fetchApi = apiStr + joinChar + 'ts=' + new Date().getTime();
var changeContentBlock = changeBtn.parents('[data-change-block]').find('[data-change-content]');
if (changeBtn.attr('changing')) {
return;
}
changeBtn.attr('changing', 'yes');
$.get(fetchApi, function (data) {
changeBtn.removeAttr('changing');
var htmlStr = $(data).find('[data-change-content]').html();
changeContentBlock.html(htmlStr);
});
});
});
};
return customElement;
});

7 changes: 7 additions & 0 deletions mip-copy/mip-copy.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @file mip-copy样式文件
*/

mip-copy {
// TODO
}
14 changes: 14 additions & 0 deletions mip-copy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "mip-copy",
"version": "1.0.0",
"description": "康网点击换一换",
"contributors": [
{
"name": "sunruinian",
"email": "[email protected]"
}
],
"engines": {
"mip": ">=1.1.0"
}
}
2 changes: 1 addition & 1 deletion mip-fn-comment-reply/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# mip-fn-comment-reply
<p>蜂鸟网WAP站评论回复</p>
<p>蜂鸟网WAP站评论内容回复</p>

## 示例
```html
Expand Down
Loading

0 comments on commit f968161

Please sign in to comment.