diff --git a/sites/kuk8.com/.editorconfig b/sites/kuk8.com/.editorconfig new file mode 100644 index 000000000..cb530eac4 --- /dev/null +++ b/sites/kuk8.com/.editorconfig @@ -0,0 +1,14 @@ +UTF-8 +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org +root = true +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +[*.{js,styl,html,json,vue}] +indent_size = 2 +indent_style = space +[*.md] +trim_trailing_whitespace = false diff --git a/sites/kuk8.com/.eslintignore b/sites/kuk8.com/.eslintignore new file mode 100644 index 000000000..db4c6d9b6 --- /dev/null +++ b/sites/kuk8.com/.eslintignore @@ -0,0 +1,2 @@ +dist +node_modules \ No newline at end of file diff --git a/sites/kuk8.com/.eslintrc b/sites/kuk8.com/.eslintrc new file mode 100644 index 000000000..84a3a2e9c --- /dev/null +++ b/sites/kuk8.com/.eslintrc @@ -0,0 +1,39 @@ +{ + "parser": "vue-eslint-parser", + "parserOptions": { + "ecmaVersion": 8, + "sourceType": "module", + "allowImportExportEverywhere": false + }, + "extends": [ + "standard", + "plugin:vue/recommended" + ], + "plugins": [ + "jsdoc" + ], + "globals": { + "MIP": true + }, + "env": { + "browser": true + }, + "rules": { + "jsdoc/check-param-names": 1, + "jsdoc/check-tag-names": 1, + "jsdoc/check-types": 1, + "jsdoc/newline-after-description": 1, + "jsdoc/no-undefined-types": 1, + "jsdoc/require-description-complete-sentence": 0, + "jsdoc/require-example": 0, + "jsdoc/require-hyphen-before-param-description": 0, + "jsdoc/require-param": 1, + "jsdoc/require-param-description": 1, + "jsdoc/require-param-name": 1, + "jsdoc/require-param-type": 1, + "jsdoc/require-returns-description": 1, + "jsdoc/require-returns-type": 1, + "jsdoc/valid-types": 1, + "no-var": 2 + } +} diff --git a/sites/kuk8.com/.gitignore b/sites/kuk8.com/.gitignore new file mode 100644 index 000000000..1207415d5 --- /dev/null +++ b/sites/kuk8.com/.gitignore @@ -0,0 +1,8 @@ +node_modules/ +dist/ +.idea/ +*.log +Thumbs.db +.DS_Store +*.swp +*.gz diff --git a/sites/kuk8.com/common/.gitkeep b/sites/kuk8.com/common/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/sites/kuk8.com/components/mip-kuk8-pcurl/README.md b/sites/kuk8.com/components/mip-kuk8-pcurl/README.md new file mode 100644 index 000000000..78ac30415 --- /dev/null +++ b/sites/kuk8.com/components/mip-kuk8-pcurl/README.md @@ -0,0 +1,32 @@ +# mip-kuk8-pcurl + +标题|内容 +----|---- +类型| +支持布局| +所需脚本| [https://c.mipcdn.com/extensions/platform/v2/kuk8.com/mip-kuk8-pcurl/mip-kuk8-pcurl.js](https://c.mipcdn.com/extensions/platform/v2/kuk8.com/mip-kuk8-pcurl/mip-kuk8-pcurl.js) + +## 说明 + +判断访问设备是否是移动设备,若不是跳转到对应的PC网址 + +## 示例 + + + + +``` +// 代码示例 +``` + +## 属性 + +### 属性1 + +**说明**: + +**必选项**: + +**单位**: + +**默认值**: \ No newline at end of file diff --git a/sites/kuk8.com/components/mip-kuk8-pcurl/example/index.html b/sites/kuk8.com/components/mip-kuk8-pcurl/example/index.html new file mode 100644 index 000000000..538bfd731 --- /dev/null +++ b/sites/kuk8.com/components/mip-kuk8-pcurl/example/index.html @@ -0,0 +1,15 @@ + + + + + + MIP识别PC浏览器访问跳转到对应PC网址 + + + + + + + + + diff --git a/sites/kuk8.com/components/mip-kuk8-pcurl/index.less b/sites/kuk8.com/components/mip-kuk8-pcurl/index.less new file mode 100644 index 000000000..1bb2d8527 --- /dev/null +++ b/sites/kuk8.com/components/mip-kuk8-pcurl/index.less @@ -0,0 +1,6 @@ +mip-kuk8-pcurl { + .wrapper { + margin: 0 auto; + text-align: center; + } +} diff --git a/sites/kuk8.com/components/mip-kuk8-pcurl/mip-kuk8-pcurl.js b/sites/kuk8.com/components/mip-kuk8-pcurl/mip-kuk8-pcurl.js new file mode 100644 index 000000000..1146192d6 --- /dev/null +++ b/sites/kuk8.com/components/mip-kuk8-pcurl/mip-kuk8-pcurl.js @@ -0,0 +1,27 @@ +import './index.less' +let { util } = MIP +let { platform } = util +function shebei () { + let ios = platform.isIOS() + let android = platform.isAndroid() + if (ios || android) { + return true + } else { + return false + } +} +function topc (mipurl) { + let wwwurl = mipurl.replace('mip', 'www') + window.location.href = wwwurl +} +export default class MIPKuk8Pcurl extends MIP.CustomElement { + build () { + let element = this.element + let mipurl = this.element.getAttribute('url') + let isOk = shebei() + if (!isOk) { + let wwwurl = topc(mipurl) + element.innerHTML = wwwurl + } + } +} diff --git a/sites/kuk8.com/example/index.html b/sites/kuk8.com/example/index.html new file mode 100644 index 000000000..7bdbcb938 --- /dev/null +++ b/sites/kuk8.com/example/index.html @@ -0,0 +1,15 @@ + + + + + + MIP识别PC浏览器访问跳转到对应PC网址 + + + + + + + + + \ No newline at end of file diff --git a/sites/kuk8.com/mip.config.js b/sites/kuk8.com/mip.config.js new file mode 100644 index 000000000..d5457bef4 --- /dev/null +++ b/sites/kuk8.com/mip.config.js @@ -0,0 +1,31 @@ +/** + * @file mip页面项目配置项 + * @author + */ + +module.exports = { + dev: { + /** + * 启动mip server调试的端口号 + * + * @type {number} + */ + port: 8111, + + /** + * 启用调试页面自动刷新 + * + * @type {boolean} + */ + livereload: true, + + /** + * server 启动自动打开页面,false 为关闭 + * 如: + * autoopen: '/example/index.html' + * + * @type {string|boolean} + */ + autoopen: false + } +} diff --git a/sites/kuk8.com/package.json b/sites/kuk8.com/package.json new file mode 100644 index 000000000..58e56fbb1 --- /dev/null +++ b/sites/kuk8.com/package.json @@ -0,0 +1,25 @@ +{ + "name": "kuk8.com", + "version": "0.0.1", + "description": "kuk8", + "scripts": { + "dev": "mip2 dev", + "build": "mip2 build", + "lint": "npm run lint:js", + "lint:js": "eslint --ext .vue,.js .", + "fix": "npm run fix:js", + "fix:js": "eslint --ext .vue,.js . --fix" + }, + "author": "123liujunyu (39754685+123liujunyu@users.noreply.github.com)", + "dependencies": {}, + "devDependencies": { + "eslint": "^4.19.1", + "eslint-config-standard": "^11.0.0", + "eslint-plugin-import": "^2.12.0", + "eslint-plugin-jsdoc": "^3.7.1", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-promise": "^3.8.0", + "eslint-plugin-standard": "^3.1.0", + "eslint-plugin-vue": "^4.5.0" + } +} diff --git a/sites/kuk8.com/static/.gitkeep b/sites/kuk8.com/static/.gitkeep new file mode 100644 index 000000000..e69de29bb