From b57bd6ec37eabd86acf3ad48a9285d519231142f Mon Sep 17 00:00:00 2001 From: zhouhero Date: Fri, 9 Mar 2018 13:25:28 +0800 Subject: [PATCH 1/9] Fixed img and link issue #38 --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0a0d595..229b307 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ npm-debug.log selenium-debug.log .idea package-lock.json +.eslintrc.js +.eslintignore \ No newline at end of file From 9b476a3a970878dd8f6b765a68232f6ed9ae489b Mon Sep 17 00:00:00 2001 From: zhouhero Date: Fri, 9 Mar 2018 13:31:18 +0800 Subject: [PATCH 2/9] Fixed img and link issue #38 --- src/views/Introduction.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Introduction.vue b/src/views/Introduction.vue index e3f0c40..793c57a 100644 --- a/src/views/Introduction.vue +++ b/src/views/Introduction.vue @@ -126,7 +126,7 @@

基于WZ框架开发出的边看边买推荐系统

-

立即访问

+

立即访问

From dc6ca0be77b1a9afe39c254f9b64eecf801c3fd3 Mon Sep 17 00:00:00 2001 From: zhouhero Date: Mon, 12 Mar 2018 20:38:30 +0800 Subject: [PATCH 3/9] Delete useless code --- src/utils/fetch.js | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 3ee2f51..3d940b6 100755 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -12,9 +12,6 @@ const service = axios.create({ // request拦截器 service.interceptors.request.use(config => { // Do something before request is sent - if (store.getters.token) { - config.headers['X-Token'] = store.getters.token; // 让每个请求携带token--['X-Token']为自定义key 请根据实际情况自行修改 - } return config; }, error => { // Do something with request error @@ -25,33 +22,6 @@ service.interceptors.request.use(config => { // respone拦截器 service.interceptors.response.use( response => response, - /** - * 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页 - * 如通过xmlhttprequest 状态码标识 逻辑可写在下面error中 - */ -// const res = response.data; -// if (res.code !== 20000) { -// Message({ -// message: res.message, -// type: 'error', -// duration: 5 * 1000 -// }); -// // 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了; -// if (res.code === 50008 || res.code === 50012 || res.code === 50014) { -// MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登录', '确定登出', { -// confirmButtonText: '重新登录', -// cancelButtonText: '取消', -// type: 'warning' -// }).then(() => { -// store.dispatch('FedLogOut').then(() => { -// location.reload();// 为了重新实例化vue-router对象 避免bug -// }); -// }) -// } -// return Promise.reject(error); -// } else { -// return response.data; -// } error => { console.log('err' + error);// for debug vue.$Message.error({ From b49d5ce5129c0b5dd9e97b4ef7d03abd6cab34d2 Mon Sep 17 00:00:00 2001 From: zhouhero Date: Mon, 12 Mar 2018 20:43:15 +0800 Subject: [PATCH 4/9] Delete useless code --- .eslintignore | 3 - .eslintrc.js | 318 -------------------------------------------------- 2 files changed, 321 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index e3a4037..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -build/*.js -config/*.js -src/assets diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index a388ba2..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,318 +0,0 @@ -module.exports = { - root: true, - parser: 'babel-eslint', - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true - }, - extends: 'eslint:recommended', - // required to lint *.vue files - plugins: [ - 'html' - ], - // check if imports actually resolve - 'settings': { - 'import/resolver': { - 'webpack': { - 'config': 'build/webpack.base.conf.js' - } - } - }, - // add your custom rules here - 'rules': { - // don't require .vue extension when importing - // 'import/extensions': ['error', 'always', { - // 'js': 'never', - // 'vue': 'never' - // }], - // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - /* - * Possible Errors - */ - - // disallow unnecessary parentheses - 'no-extra-parens': ['error', 'all', {'nestedBinaryExpressions': false}], - - // disallow negating the left operand of relational operators - 'no-unsafe-negation': 'error', - - // enforce valid JSDoc comments - 'valid-jsdoc': 'off', - - /* - * Best Practices - */ - - // enforce return statements in callbacks of array methods - 'array-callback-return': 'error', - - // enforce consistent brace style for all control statements - curly: ['error', 'multi-line'], - - // enforce consistent newlines before and after dots - 'dot-location': ['error', 'property'], - - // enforce dot notation whenever possible - 'dot-notation': 'error', - - // require the use of === and !== - 'eqeqeq': ['error', 'smart'], - - // disallow the use of arguments.caller or arguments.callee - 'no-caller': 'error', - - // disallow empty functions - 'no-empty-function': 'error', - - // disallow unnecessary calls to .bind() - 'no-extra-bind': 'error', - - // disallow unnecessary labels - 'no-extra-label': 'error', - - // disallow leading or trailing decimal points in numeric literals - 'no-floating-decimal': 'error', - - // disallow assignments to native objects or read-only global variables - 'no-global-assign': 'error', - - // disallow the use of eval()-like methods - 'no-implied-eval': 'error', - - // disallow the use of the __iterator__ property - 'no-iterator': 'error', - - // disallow unnecessary nested blocks - 'no-lone-blocks': 'error', - - // disallow multiple spaces - 'no-multi-spaces': 'error', - - // disallow new operators with the String, Number, and Boolean objects - 'no-new-wrappers': 'error', - - // disallow octal escape sequences in string literals - 'no-octal-escape': 'error', - - // disallow the use of the __proto__ property - 'no-proto': 'error', - - // disallow comparisons where both sides are exactly the same - 'no-self-compare': 'error', - - // disallow throwing literals as exceptions - 'no-throw-literal': 'error', - - // disallow unused expressions - 'no-unused-expressions': 'error', - - // disallow unnecessary calls to .call() and .apply() - 'no-useless-call': 'error', - - // disallow unnecessary concatenation of literals or template literals - 'no-useless-concat': 'error', - - // disallow unnecessary escape characters - 'no-useless-escape': 'error', - - // disallow void operators - 'no-void': 'error', - - // require parentheses around immediate function invocations - 'wrap-iife': 'error', - - // require or disallow “Yoda” conditions - yoda: 'error', - - /* - * Variables - */ - - // disallow labels that share a name with a variable - 'no-label-var': 'error', - - // disallow initializing variables to undefined - 'no-undef-init': 'error', - 'no-undef': 'off', - // disallow the use of variables before they are defined - 'no-use-before-define': 'error', - - /* - * Node.js and CommonJS - */ - - // disallow new operators with calls to require - 'no-new-require': 'error', - - /* - * Stylistic Issues - */ - - // enforce consistent spacing inside array brackets - 'array-bracket-spacing': 'error', - - // enforce consistent spacing inside single-line blocks - 'block-spacing': 'error', - - // enforce consistent brace style for blocks - 'brace-style': ['error', '1tbs', {'allowSingleLine': true}], - - // require or disallow trailing commas - 'comma-dangle': 'error', - - // enforce consistent spacing before and after commas - 'comma-spacing': 'error', - - // enforce consistent comma style - 'comma-style': 'error', - - // enforce consistent spacing inside computed property brackets - 'computed-property-spacing': 'error', - - // require or disallow spacing between function identifiers and their invocations - 'func-call-spacing': 'error', - - // enforce consistent indentation - indent: ['error', 2, {SwitchCase: 1}], - - // enforce the consistent use of either double or single quotes in JSX attributes - 'jsx-quotes': 'error', - - // enforce consistent spacing between keys and values in object literal properties - 'key-spacing': 'error', - - // enforce consistent spacing before and after keywords - 'keyword-spacing': 'error', - - // enforce consistent linebreak style - 'linebreak-style': 'error', - - // require or disallow newlines around directives - 'lines-around-directive': 'error', - - // require constructor names to begin with a capital letter - 'new-cap': 'off', - - // require parentheses when invoking a constructor with no arguments - 'new-parens': 'error', - - // disallow Array constructors - 'no-array-constructor': 'error', - - // disallow Object constructors - 'no-new-object': 'error', - - // disallow trailing whitespace at the end of lines - 'no-trailing-spaces': 'error', - - // disallow ternary operators when simpler alternatives exist - 'no-unneeded-ternary': 'error', - - // disallow whitespace before properties - 'no-whitespace-before-property': 'error', - - // enforce consistent spacing inside braces - 'object-curly-spacing': ['error', 'always'], - - // require or disallow padding within blocks - 'padded-blocks': ['error', 'never'], - - // require quotes around object literal property names - 'quote-props': ['error', 'as-needed'], - - // enforce the consistent use of either backticks, double, or single quotes - quotes: ['error', 'single'], - - // enforce consistent spacing before and after semicolons - 'semi-spacing': 'error', - - // require or disallow semicolons instead of ASI - // semi: ['error', 'never'], - - // enforce consistent spacing before blocks - 'space-before-blocks': 'error', - - 'no-console': 'off', - - // enforce consistent spacing before function definition opening parenthesis - 'space-before-function-paren': ['error', 'never'], - - // enforce consistent spacing inside parentheses - 'space-in-parens': 'error', - - // require spacing around infix operators - 'space-infix-ops': 'error', - - // enforce consistent spacing before or after unary operators - 'space-unary-ops': 'error', - - // enforce consistent spacing after the // or /* in a comment - 'spaced-comment': 'error', - - // require or disallow Unicode byte order mark (BOM) - 'unicode-bom': 'error', - - - /* - * ECMAScript 6 - */ - - // require braces around arrow function bodies - 'arrow-body-style': 'error', - - // require parentheses around arrow function arguments - 'arrow-parens': ['error', 'as-needed'], - - // enforce consistent spacing before and after the arrow in arrow functions - 'arrow-spacing': 'error', - - // enforce consistent spacing around * operators in generator functions - 'generator-star-spacing': ['error', 'after'], - - // disallow duplicate module imports - 'no-duplicate-imports': 'error', - - // disallow unnecessary computed property keys in object literals - 'no-useless-computed-key': 'error', - - // disallow unnecessary constructors - 'no-useless-constructor': 'error', - - // disallow renaming import, export, and destructured assignments to the same name - 'no-useless-rename': 'error', - - // require let or const instead of var - 'no-var': 'error', - - // require or disallow method and property shorthand syntax for object literals - 'object-shorthand': 'error', - - // require arrow functions as callbacks - 'prefer-arrow-callback': 'error', - - // require const declarations for variables that are never reassigned after declared - 'prefer-const': 'error', - - // disallow parseInt() in favor of binary, octal, and hexadecimal literals - 'prefer-numeric-literals': 'error', - - // require rest parameters instead of arguments - 'prefer-rest-params': 'error', - - // require spread operators instead of .apply() - 'prefer-spread': 'error', - - // enforce spacing between rest and spread operators and their expressions - 'rest-spread-spacing': 'error', - - // require or disallow spacing around embedded expressions of template strings - 'template-curly-spacing': 'error', - - // require or disallow spacing around the * in yield* expressions - 'yield-star-spacing': 'error' - } -} From ee62a451721d3da5b951cbfe0948fc2cacfb99ab Mon Sep 17 00:00:00 2001 From: zhouhero Date: Mon, 12 Mar 2018 20:50:39 +0800 Subject: [PATCH 5/9] Delete useless code --- src/views/login/index.vue | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 12111cd..31bddf8 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -131,23 +131,6 @@ animate(); } }); }, - afterQRScan() { - // const hash = window.location.hash.slice(1); - // const hashObj = getQueryObject(hash); - // const originUrl = window.location.origin; - // history.replaceState({}, '', originUrl); - // const codeMap = { - // wechat: 'code', - // tencent: 'code' - // }; - // const codeName = hashObj[codeMap[this.auth_type]]; - // if (!codeName) { - // } else { - // this.$store.dispatch('LoginByThirdparty', codeName).then(() => { - // this.$router.push({ path: '/' }); - // }); - // } - } }, init() { From 5587669898b09e5a3d4d1632d7e11cadd6e2554f Mon Sep 17 00:00:00 2001 From: zhouhero Date: Mon, 12 Mar 2018 20:53:52 +0800 Subject: [PATCH 6/9] Delete useless code --- src/views/login/index.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 31bddf8..99e858d 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -132,12 +132,6 @@ animate(); }); }, }, - init() { - - }, - destroyed() { - // window.removeEventListener('hashchange', this.afterQRScan); - } } var SEPARATION = 100, AMOUNTX = 50, AMOUNTY = 50; From 7a1027a7b8b8711d5485587d190f3bba4c626992 Mon Sep 17 00:00:00 2001 From: herozhou Date: Fri, 27 Mar 2020 01:01:31 +0800 Subject: [PATCH 7/9] fix(fix run bug): fix run bug , remove tinymce fix #84 --- package.json | 13 ++-- src/router/index.js | 2 +- src/views/Tinymce.vue | 152 +++++++++++++++++++++--------------------- 3 files changed, 86 insertions(+), 81 deletions(-) diff --git a/package.json b/package.json index d71b6db..5ec82de 100644 --- a/package.json +++ b/package.json @@ -28,12 +28,9 @@ "vue-echarts": "^2.4.0", "vue-json-tree-view": "^2.0.7", "vue-router": "2.5.3", - "vue-tinymce": "github:lpreterite/vue-tinymce", "vuex": "2.3.1" }, "devDependencies": { - "commander": "^2.11.0", - "fs.extra": "^1.3.2", "autoprefixer": "7.1.1", "babel-core": "6.25.0", "babel-eslint": "7.2.3", @@ -43,10 +40,12 @@ "babel-preset-stage-2": "6.24.1", "babel-register": "6.24.1", "chalk": "1.1.3", + "commander": "^2.11.0", "connect-history-api-fallback": "1.3.0", "copy-webpack-plugin": "4.0.1", "cross-env": "5.0.1", "css-loader": "0.28.4", + "cz-conventional-changelog": "^3.1.0", "eslint": "3.19.0", "eslint-friendly-formatter": "3.0.0", "eslint-import-resolver-webpack": "0.8.1", @@ -58,6 +57,7 @@ "extract-text-webpack-plugin": "2.1.2", "file-loader": "0.11.2", "friendly-errors-webpack-plugin": "1.6.1", + "fs.extra": "^1.3.2", "function-bind": "1.1.0", "html-webpack-plugin": "2.28.0", "http-proxy-middleware": "0.17.4", @@ -89,5 +89,10 @@ "> 1%", "last 2 versions", "not ie <= 8" - ] + ], + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + } } diff --git a/src/router/index.js b/src/router/index.js index 36e3e85..c8ca61d 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -76,7 +76,7 @@ export const asyncRouterMap = [ {path: '/table', name: '表格综合实例',icon:'ios-paper',component: _import('Table'),meta: { role: ['admin'] }}, {path: '/jsontree', name: 'JSON视图',icon:'merge',component: _import('JsonTree')}, {path: '/tabledetail/:id',name: 'TableDetail', hidden:true, component: _import('TableDetail')}, - {path: '/tinymce',name: 'Tinymce编辑器',icon:"android-document",component: _import('Tinymce')}, + // {path: '/tinymce',name: 'Tinymce编辑器',icon:"android-document",component: _import('Tinymce')}, {path: '/markdown',name: 'Markdown',icon:"android-list",component: _import('Markdown')}, ] diff --git a/src/views/Tinymce.vue b/src/views/Tinymce.vue index 9d39f64..3869552 100755 --- a/src/views/Tinymce.vue +++ b/src/views/Tinymce.vue @@ -39,89 +39,89 @@