-
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
6be722e
commit 288c444
Showing
11 changed files
with
262 additions
and
0 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,18 @@ | ||
|
||
# mip-233-lxkf | ||
|
||
联系客服插件 | ||
|
||
标题|内容 | ||
----|---- | ||
类型|业务,广告 | ||
支持布局|N/S | ||
所需脚本|https://mipcache.bdstatic.com/static/v1/mip-233-lxkf/mip-233-lxkf.js | ||
|
||
## 示例 | ||
|
||
``` html | ||
<mip-233-lxkf data-type="presale111"> | ||
<p class="kefu"><i>客服咨询</i></p> | ||
</mip-233-lxkf> | ||
``` |
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,27 @@ | ||
/** | ||
* @file 联系客服插件 | ||
* @author 233 程序部 | ||
*/ | ||
define(function (require) { | ||
var $ = require('zepto'); | ||
var customElem = require('customElement').create(); | ||
// build 方法,元素插入到文档时执行,仅会执行一次 | ||
customElem.prototype.build = function () { | ||
var element = this.element; | ||
var tag = document.createElement('script'); | ||
var tag2 = document.createElement('script'); | ||
var type = $(element).attr('data-type'); | ||
tag.src = 'https://dl.ntalker.com/js/xn6/ntkfstat.js?siteid=kf_9278'; | ||
tag2.src = 'https://img.233.com/x/plus/kf/1.0.0/kefu.js?v=1.0.0'; | ||
$('body').append(tag); | ||
$('body').append(tag2); | ||
$(element).find('.kefu').click(function () { | ||
if (type === 'presale') { | ||
window.kefu233.presale(); | ||
} else { | ||
window.kefu233.aftersale(); | ||
} | ||
}); | ||
}; | ||
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-lxkf", | ||
"version": "1.0.0", | ||
"description":"233网校联系客服插件", | ||
"author": { | ||
"name": "lxkf", | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# mip-downlink | ||
|
||
mip-downlink 下载软件 | ||
|
||
标题|内容 | ||
----|---- | ||
类型|通用 | ||
支持布局|responsive,fixed-height,fill,container,fixed | ||
所需脚本|http://mipcache.bdstatic.com/static/v1/mip-downlink/mip-downlink.js | ||
|
||
## 示例 | ||
|
||
### 基本用法 | ||
```html | ||
<mip-downlink iurl="http://www.baidu.com/getdownlink" tag="123"> | ||
<span class="adownlink">下载</span> | ||
</mip-downlink> | ||
``` | ||
|
||
## 属性 | ||
|
||
### iurl | ||
|
||
说明:接口地址 | ||
必选项:是 | ||
类型:string | ||
默认值:无 | ||
|
||
## 注意事项 | ||
|
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,27 @@ | ||
/** | ||
* @file mip-downlink 组件 | ||
* @author cc | ||
*/ | ||
|
||
define(function (require) { | ||
|
||
var customElement = require('customElement').create(); | ||
|
||
customElement.prototype.build = function () { | ||
|
||
var $ = require('jquery'); | ||
var element = this.element; | ||
var iurl = element.getAttribute('iurl'); | ||
var id = element.getAttribute('tag'); | ||
if (iurl && id) { | ||
window.gourl = function (url) { | ||
window.location.href = url; | ||
}; | ||
element.onclick = function () { | ||
$.getScript(iurl + '?id=' + id + '&callback=gourl'); | ||
}; | ||
} | ||
}; | ||
|
||
return customElement; | ||
}); |
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,7 @@ | ||
/** | ||
* @file mip-downlink样式文件 | ||
*/ | ||
|
||
mip-downlink { | ||
// TODO | ||
} |
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,15 @@ | ||
{ | ||
"name": "mip-downlink", | ||
"version": "1.0.0", | ||
"description": "下载软件", | ||
"author": "cc", | ||
"contributors": [ | ||
{ | ||
"name": "cc", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"engines": { | ||
"mip": ">=1.1.0" | ||
} | ||
} |
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,36 @@ | ||
# mip-fn-wapheader | ||
<p>蜂鸟网公共头</p> | ||
|
||
## 示例 | ||
|
||
```html | ||
<mip-fn-wapheader pageName = "学院" bbusername="" classUrl="http://m.fengniao.com/academy/" imgSrc="http://icon.fengniao.com/my/images/head/head30.png"></mip-fn-wapheader> | ||
``` | ||
|
||
标题|内容 | ||
----|---- | ||
类型|通用 | ||
所需脚本|http://mipcache.bdstatic.com/static/v1/mip-fn-commonheader/mip-fn-commonheader.js | ||
|
||
## 属性 | ||
### pageName | ||
说明:页面标题 | ||
必选项:是 | ||
类型:字符串 | ||
|
||
### bbusername | ||
说明:用户名 | ||
必选项:是 | ||
类型:字符串 | ||
|
||
### classUrl | ||
说明:返回地址 | ||
必选项:是 | ||
类型:字符串 | ||
取值范围:URL | ||
|
||
### imgSrc | ||
说明:用户头像 | ||
必选项:是 | ||
类型:字符串 | ||
取值范围:URL |
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,60 @@ | ||
/** | ||
* @file mip-fn-wapheader 组件 | ||
* @author fn | ||
*/ | ||
define(function (require) { | ||
var customElem = require('customElement').create(); | ||
|
||
// 生命周期 function list,根据组件情况选用,(一般情况选用 build、firstInviewCallback) start | ||
// build 方法,元素插入到文档时执行,仅会执行一次 | ||
customElem.prototype.build = function () { | ||
// this.element 可取到当前实例对应的 dom 元素 | ||
var element = this.element; | ||
var bbusername = element.getAttribute('bbuserName'); | ||
var pageName = element.getAttribute('pageName'); | ||
var classUrl = element.getAttribute('classUrl'); | ||
var imgSrc = element.getAttribute('imgSrc'); | ||
var headerStr; | ||
|
||
if (bbusername) { | ||
headerStr = '' | ||
+ '<div class="header-user">' | ||
+ '<a href="' + classUrl + '" class="goback">返回上一页</a>' | ||
+ '<span class="channel"></span>' | ||
+ '<span class="page-title">' + pageName + '</span>' | ||
+ '<div id="headerControl" class="control">' | ||
+ '<span class="avator">' | ||
+ '<mip-img layout="responsive" width="30" height="30" src="' + imgSrc + '"></span>' | ||
+ '</div>' | ||
+ '</div>' | ||
+ '<div class="username-layer">' | ||
+ '<a href="http://my.fengniao.com/login.php?action=logout&url=' + window.location + '" class="login-out-button">退出</a>' | ||
+ '<span class="avator"><mip-img layout="responsive" width="30" height="30" src="' + imgSrc + '"></span>' | ||
+ '<span class="username">' + bbusername + '</span>' | ||
+ '<span class="close-username"></span>' | ||
+ '</div>'; | ||
|
||
} else { | ||
headerStr = '' | ||
+ '<div class="header-user">' | ||
+ '<a href="' + classUrl + '" class="goback">返回上一页</a>' | ||
+ '<span class="channel"></span>' | ||
+ '<span class="page-title">' + pageName + '</span>' | ||
+ '<div class="control">' | ||
+ '<a href="/login.php?url=' + window.location + '" class="login-btn">登录</a>' | ||
+ '</div>' | ||
+ '</div>'; | ||
} | ||
element.innerHTML = headerStr; | ||
|
||
var headerControl = element.querySelector('#headerControl'); | ||
|
||
headerControl.addEventListener('click', function () { | ||
element.classList.toggle('show-user-layer'); | ||
}, false); | ||
}; | ||
|
||
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,19 @@ | ||
/* mip-fn-wapheader */ | ||
mip-fn-wapheader {position: relative; left: 0; top: 0; height: 2rem; background-color: #222; text-align: center;} | ||
mip-fn-wapheader .control{position: absolute; right: 0; top: 0; height: 2rem; width: 2.5rem; color: #fff;} | ||
mip-fn-wapheader .control .login-btn{float: right; width: 2rem; height: 2rem; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEUAAABFCAMAAAArU9sbAAAAz1BMVEUAAACampqZmZmampqZmZmZmZmbm5uZmZmZmZmZmZmgoKCZmZmdnZ2goKCampqZmZmZmZmZmZmampqbm5ucnJycnJycnJygoKCZmZmZmZmZmZmampqZmZmZmZmenp6ZmZmgoKCdnZ2dnZ2goKCZmZmZmZmgoKCgoKCZmZmgoKCgoKCbm5uZmZmZmZmgoKCgoKCgoKCZmZmZmZmbm5ugoKCgoKCgoKCZmZmZmZmgoKCgoKCgoKCZmZmgoKCgoKCgoKCZmZmgoKCgoKCZmZmgoKAEML01AAAAQ3RSTlMASf4J9c4ywpjl1dIj+VjchSkaDEM6N+KQdXAQ7tpf6pwXFAL78s/AoVG6BfespqGTgCwm8+3r3a6QhGjKdivKrx1xNIgqwwAAA+pJREFUWMO1WNl24jAMdaABwr7vMJCwl61AF0p38v/fNFLSjBtLpnA4oweIbVmWr69l2UIvpXIzEe+0B8dBuxNPNMslcbFs8vHBMSyDeH5ziYlW0zzyYjZbZ9ro54eym5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uAVfeSa6/H1Ex5hfd1eaG1k16zeUvy3Ty9A5bOAUrucPq7tORhfY+vYjI+/TVd/v//85A3zwiVseMmx0rQt48rnl/STVbl70FmXL8YIr5jbhYWkYD3qWs4XFowbtUwzjhxV9OVQo/DRdC8wAAAABJRU5ErkJggg==) no-repeat 50% 50%; -webkit-background-size: 1.1rem 1.1rem; background-size: 1.1rem 1.1rem; font: 0/0 arial;} | ||
mip-fn-wapheader .control .avator{float: right; width: 2.0rem; height: 2.0rem; overflow: hidden; -webkit-border-radius: 50%; border-radius: 50%;} | ||
/*mip-fn-wapheader .control .avator img,*/ | ||
mip-fn-wapheader .control .avator mip-img{float: right; width: 1rem; height: 1rem; margin: 0.5rem 0.5rem 0 0; border: 1px solid #c7c7c7; -webkit-border-radius: 50%; border-radius: 50%;} | ||
mip-fn-wapheader .header-user{height: 2.0rem;} | ||
mip-fn-wapheader .goback{position: absolute; top: 0; left: 5px; height: 2.0rem; width: 1.0rem; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAuCAMAAADjo+I+AAAAe1BMVEUAAAC7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7uGE7PlAAAAKHRSTlMA+vD24+oj22JZU7FDPDEqC6GPg354a0o3HxQG0sO8mpeHcU0cy8dHen80NgAAAM1JREFUOMuV1NkOgjAQBdBSQHYFEdkEFFz6/1+oJHReejvqfT0hobMJSyI5CWtiR6mCQysvH1xzRVhvqHyAL3dDZzExJYw5jEzMWJQaQxMbjQrg/jc8A/QZPBDOHFZ/4s7TeOKwNLElvAEMNB5NvHMoLhrhoNCnQy64Hx57lpMvLEC6RHOBuCeeEOcjPRryQNWE/EBtonRUtBlyAAYL9SNE3HpgT0DVaAHx9Dk1YloIN0XcEGeIaYVlgzjV/BTc0am4a1Zaz6RDiBLKtVNvmgs5SsGmyzYAAAAASUVORK5CYII=) no-repeat 50% 50%; -webkit-background-size: 0.7rem 1.2rem; background-size: 0.7rem 1.2rem; font: 0/0 arial; -webkit-transform: scale(.8); transform: scale(.8);} | ||
|
||
mip-fn-wapheader .page-title{display: inline-block; height: 2.0rem; color: #fff; text-align: center; line-height: 2.0rem;} | ||
|
||
mip-fn-wapheader .username-layer{-webkit-box-sizing: border-box; box-sizing: border-box; position: absolute; top: 0; left: 0; z-index: 1; width: 100%; height: 2.5rem; padding: 0 0.5rem; background: #e7f2f4; font-size: 0.8rem; line-height: 2.5rem; -webkit-transform: translateY(-300%); transform: translateY(-300%); -webkit-transition: all .5s ease; transition: all .5s ease;} | ||
/*mip-fn-wapheader .username-layer .avator mip,*/ | ||
mip-fn-wapheader .username-layer .avator mip-img{float: left; width: 1.0rem; height: 1.0rem; margin: 0.65rem 0.5rem 0 0; -webkit-border-radius: 50%; border-radius: 50%;} | ||
mip-fn-wapheader .username-layer .username{float: left; margin: 0 0 0 0.75rem;} | ||
mip-fn-wapheader .username-layer .login-out-button{float: right; width: 3.0rem; height: 1.4rem; overflow: hidden; margin: 0.55rem 0 0; -webkit-border-radius: 0.15rem; border-radius: 0.15rem; background: #fff; font-size: 0.7rem; text-align: center; line-height: 1.4rem; cursor: pointer;} | ||
mip-fn-wapheader .username-layer .close-username{display: none; position: absolute; right: 0.75rem; top: 0.75rem; width: 0.75rem; height: 0.75rem; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeBAMAAADJHrORAAAAElBMVEUAAACZmZmZmZmZmZmZmZmZmZn7TU31AAAABXRSTlMA1RWYFoRAm8IAAABySURBVBjTZZHBCYAwDACDuoAF/+oE/TiAI0hx/1WEC3KPBNqmvaNNScx7GFOPq4VxjDieXbw1xh8wBRCzOBdxrmITjhXEpOIUEiucYIUVrPCK3Ve/3lffs55ab/2Pyc2x4rI1sQJYAayQWIF+KQz6qdA/TmkU/QqnJncAAAAASUVORK5CYII=) no-repeat center center; -webkit-background-size: 0.75rem 0.75rem; background-size: 0.75rem 0.75rem;} | ||
mip-fn-wapheader.show-user-layer .username-layer{-webkit-transform: translateY(2.15rem); transform: translateY(2.15rem);} |
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,13 @@ | ||
{ | ||
"name": "mip-fn-wapheader", | ||
"version": "1.0.0", | ||
"description": "蜂鸟网WAP站公共头", | ||
"author": { | ||
"name": "fn", | ||
"email": "[email protected]" | ||
}, | ||
|
||
"engines": { | ||
"mip": ">=1.1.0" | ||
} | ||
} |