diff --git a/mip-bnmanhua-ws/README.md b/mip-bnmanhua-ws/README.md new file mode 100644 index 00000000..f85bbdae --- /dev/null +++ b/mip-bnmanhua-ws/README.md @@ -0,0 +1,25 @@ +# mip-bnmanhua-ws + +mip-bnmanhua-ws 用于投放第本站产品 + +标题|内容 +----|---- +类型|广告 +支持布局|responsive,fixed-height,fill,container,fixed +所需脚本|http://mipcache.bdstatic.com/extensions/platform/v1/mip-bnmanhua-ws/mip-bnmanhua-ws.js + +## 示例 + +### 基本用法 +```html + + + +``` + +## 属性 + +### mip-bnmanhua-ws + +说明:用于投放第本站产品 , 在组件中以图片的形式展示 +必选项:否 \ No newline at end of file diff --git a/mip-bnmanhua-ws/mip-bnmanhua-ws.js b/mip-bnmanhua-ws/mip-bnmanhua-ws.js new file mode 100644 index 00000000..e6bdfa74 --- /dev/null +++ b/mip-bnmanhua-ws/mip-bnmanhua-ws.js @@ -0,0 +1,27 @@ +/** + * @file mip-bnmanhua-ws + * + * @author bnmanhua + */ + +define(function (require) { + var $ = require('zepto'); + var mip = $('mip-bnmanhua-ws'); + var customElement = require('customElement').create(); + + /** + * 构造元素,只会运行一次 + */ + customElement.prototype.build = function () { + var node = document.createElement('script'); + node.type = 'text/javascript'; + node.src = 'https://www.bnmanhua.com/mip/bnmanhua.js'; + node.async = 'true'; + var parent = document.getElementsByTagName('head')[0]; + if (parent) { + parent.insertBefore(node, parent.firstChild); + } + }; + + return customElement; +}); diff --git a/mip-bnmanhua-ws/package.json b/mip-bnmanhua-ws/package.json new file mode 100644 index 00000000..435f2f10 --- /dev/null +++ b/mip-bnmanhua-ws/package.json @@ -0,0 +1,15 @@ +{ + "name": "mip-bnmanhua-ws", + "version": "1.0.0", + "description": "用于投放第本站产品广告", + "contributors": [ + { + "name": "bnmanhua", + "email": "513741179@qq.com", + "url": "https://www.bnmanhua.com/" + } + ], + "engines": { + "mip": ">=1.1.0" + } +} \ No newline at end of file