├── .DS_Store
├── .gitignore
├── .thinkjsrc
├── README.md
├── nginx.conf
├── package.json
├── pm2.json
├── source
├── _iconfont.scss
├── _reset.scss
├── _variables.scss
├── admin.html
├── admin.js
├── admin.router.js
├── common
│ ├── 404.vue
│ ├── admin
│ │ ├── aside.vue
│ │ └── header.vue
│ ├── home.vue
│ └── kodo.vue
├── components
│ └── index
│ │ ├── articleList.vue
│ │ ├── header.vue
│ │ ├── indexAside.vue
│ │ └── indexDetail.vue
├── index.html
├── index.scss
├── main.js
├── router.js
├── static
│ ├── css
│ │ ├── fonts
│ │ │ ├── icomoon.eot
│ │ │ ├── icomoon.svg
│ │ │ ├── icomoon.ttf
│ │ │ └── icomoon.woff
│ │ ├── github-markdown.css
│ │ ├── wangEditor.css
│ │ ├── wangEditor.less
│ │ └── wangEditor.min.css
│ └── js
│ │ └── wangEditor.min.js
├── unitTest
│ └── test.js
└── views
│ ├── index
│ ├── article.vue
│ └── index.vue
│ ├── kodo
│ ├── admin.vue
│ ├── articleList.vue
│ └── postNew.vue
│ └── profile.vue
├── src
├── common
│ ├── bootstrap
│ │ ├── global.js
│ │ └── middleware.js
│ ├── config
│ │ ├── config.js
│ │ ├── db.js
│ │ ├── env
│ │ │ ├── development.js
│ │ │ ├── production.js
│ │ │ └── testing.js
│ │ ├── error.js
│ │ ├── hook.js
│ │ ├── locale
│ │ │ └── en.js
│ │ ├── session.js
│ │ └── view.js
│ └── controller
│ │ └── error.js
├── home
│ ├── config
│ │ └── config.js
│ ├── controller
│ │ ├── base.js
│ │ └── index.js
│ ├── logic
│ │ └── index.js
│ └── model
│ │ ├── index.js
│ │ └── user.js
└── kodo
│ ├── config
│ └── config.js
│ ├── controller
│ ├── article.js
│ ├── base.js
│ ├── index.js
│ └── login.js
│ ├── logic
│ ├── article.js
│ ├── index.js
│ └── login.js
│ └── model
│ ├── article.js
│ └── index.js
├── view
├── common
│ ├── error_400.html
│ ├── error_403.html
│ ├── error_404.html
│ ├── error_500.html
│ └── error_503.html
├── home
│ ├── admin
│ │ └── index.html
│ └── index
│ │ └── index.html
└── kodo
│ └── index
│ └── index.html
├── webpack.config.js
└── www
├── README.md
├── development.js
├── production.js
├── static
├── admin.build.js
├── admin.build.js.map
├── css
│ ├── admin.css
│ ├── admin.css.map
│ ├── fonts
│ │ ├── icomoon.eot
│ │ ├── icomoon.svg
│ │ ├── icomoon.ttf
│ │ └── icomoon.woff
│ ├── index.css
│ ├── index.css.map
│ ├── wangEditor.css
│ ├── wangEditor.less
│ └── wangEditor.min.css
├── index.build.js
├── index.build.js.map
└── js
│ ├── 0.js
│ ├── 0.js.map
│ ├── 1.js
│ ├── 1.js.map
│ ├── 10.js
│ ├── 10.js.map
│ ├── 11.js
│ ├── 11.js.map
│ ├── 12.js
│ ├── 12.js.map
│ ├── 13.js
│ ├── 13.js.map
│ ├── 14.js
│ ├── 14.js.map
│ ├── 15.js
│ ├── 15.js.map
│ ├── 16.js
│ ├── 16.js.map
│ ├── 17.js
│ ├── 17.js.map
│ ├── 18.js
│ ├── 18.js.map
│ ├── 19.js
│ ├── 19.js.map
│ ├── 2.js
│ ├── 2.js.map
│ ├── 3.js
│ ├── 3.js.map
│ ├── 4.js
│ ├── 4.js.map
│ ├── 5.js
│ ├── 5.js.map
│ ├── 6.js
│ ├── 6.js.map
│ ├── 7.js
│ ├── 7.js.map
│ ├── 8.js
│ ├── 8.js.map
│ ├── 9.js
│ ├── 9.js.map
│ └── wangEditor.min.js
└── testing.js
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage/
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # node-waf configuration
20 | .lock-wscript
21 |
22 | # Dependency directory
23 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
24 | node_modules/
25 |
26 | # IDE config
27 | .idea
28 |
29 | # output
30 | output/
31 | output.tar.gz
32 |
33 | app/
--------------------------------------------------------------------------------
/.thinkjsrc:
--------------------------------------------------------------------------------
1 | {
2 | "createAt": "2016-03-13 11:11:29",
3 | "mode": "module",
4 | "es": true
5 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | ### 前言
3 |
4 | 尝试用thinkjs搭建一套blog
5 |
6 | > thinkjs + mongodb + vue + vueRouter + webpack
7 |
8 | ### dev
9 |
10 | > npm run dev
11 |
12 | 主站 http://localhost:8200/source/index.html
13 | 后台 http://localhost:8200/source/admin.html
14 |
15 | ### build
16 |
17 | > npm run build
18 |
19 | ### 结合后台测试
20 |
21 | > npm run start
22 |
23 | 主站 http://localhost:8360
24 | 后台 http://localhost:8360/admin
25 |
26 |
27 | #### 目录介绍
28 |
29 | 由于后台使用了 `thinkjs` 框架的ES6模式
30 |
31 | `src` 为后台编写文件, `app` 则为后台编译后的文件
32 |
33 | 线上的页面需要放在 `view/home` 下
34 |
35 | 静态资源文件全放在 `www/static` 下
36 |
37 | 前端开发目录为 `source`
38 |
39 | #### 前端开发约定(目录)
40 |
41 | ```javascript
42 | - source
43 | - common // 公用.vue
44 | - components // 对应controller下的组件
45 | - static // 第三方静态资源
46 | - unitTest // 数据测试json
47 | - views // 页面
48 | index.html // 主站入口html
49 | index.sass // 主站全局sass
50 | main.js // 主站入口js
51 | router.js // 主站路由
52 | admin.html // 后台入口html
53 | admin.js // 后台入口js
54 | admin.router.js // 后台路由
55 |
56 | ```
57 |
58 |
59 |
60 |
61 |
62 | #### 更新
63 |
64 | > 4月22号
65 |
66 | 主站首页完成 新增article.vue header.vue _variable.scss _reset.scssaa
--------------------------------------------------------------------------------
/nginx.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name example.com www.example.com;
4 | root /Users/kodo/HBuilderProjects/vjmu/test/vueclitest/myProject//Users/kodo/HBuilderProjects/vjmu/test/vueclitest/myProject/thinkjs-vue/www;
5 | set $node_port 8360;
6 |
7 | index index.js index.html index.htm;
8 | if ( -f $request_filename/index.html ){
9 | rewrite (.*) $1/index.html break;
10 | }
11 | if ( !-f $request_filename ){
12 | rewrite (.*) /index.js;
13 | }
14 | location = /index.js {
15 | proxy_http_version 1.1;
16 | proxy_set_header X-Real-IP $remote_addr;
17 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
18 | proxy_set_header Host $http_host;
19 | proxy_set_header X-NginX-Proxy true;
20 | proxy_set_header Upgrade $http_upgrade;
21 | proxy_set_header Connection "upgrade";
22 | proxy_pass http://127.0.0.1:$node_port$request_uri;
23 | proxy_redirect off;
24 | }
25 |
26 | location = /development.js {
27 | deny all;
28 | }
29 |
30 | location = /testing.js {
31 | deny all;
32 | }
33 |
34 | location = /production.js {
35 | deny all;
36 | }
37 |
38 | location ~ /static/ {
39 | etag on;
40 | expires max;
41 | }
42 | }
43 |
44 |
45 |
46 |
47 | ## http/2 nginx conf
48 |
49 | # server {
50 | # listen 80;
51 | # server_name example.com www.example.com;
52 | # rewrite ^(.*) https://example.com$1 permanent;
53 | # }
54 | #
55 | # server {
56 | # listen 443 ssl http2 fastopen=3 reuseport;
57 | # server_name www.thinkjs.org thinkjs.org;
58 | # set $node_port 8360;
59 | #
60 | # root /Users/kodo/HBuilderProjects/vjmu/test/vueclitest/myProject//Users/kodo/HBuilderProjects/vjmu/test/vueclitest/myProject/thinkjs-vue/www;
61 | #
62 | # keepalive_timeout 70;
63 | #
64 | # ssl_certificate /path/to/certificate;
65 | # ssl_certificate_key /path/to/certificate.key;
66 | # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
67 | # ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA";
68 | # ssl_prefer_server_ciphers on;
69 |
70 | # # openssl dhparam -out dhparams.pem 2048
71 | # ssl_dhparam /path/to/dhparams.pem;
72 | #
73 | # ssl_session_cache shared:SSL:10m;
74 | # ssl_session_timeout 10m;
75 | #
76 | # ssl_session_ticket_key /path/to/tls_session_ticket.key;
77 | # ssl_session_tickets on;
78 | #
79 | # ssl_stapling on;
80 | # ssl_stapling_verify on;
81 | # ssl_trusted_certificate /path/to/startssl_trust_chain.crt;
82 | #
83 | #
84 | # add_header x-Content-Type-Options nosniff;
85 | # add_header X-Frame-Options deny;
86 | # add_header Strict-Transport-Security "max-age=16070400";
87 | #
88 | # index index.js index.html index.htm;
89 | # if ( -f $request_filename/index.html ){
90 | # rewrite (.*) $1/index.html break;
91 | # }
92 | # if ( !-f $request_filename ){
93 | # rewrite (.*) /index.js;
94 | # }
95 | # location = /index.js {
96 | # proxy_http_version 1.1;
97 | # proxy_set_header X-Real-IP $remote_addr;
98 | # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
99 | # proxy_set_header Host $http_host;
100 | # proxy_set_header X-NginX-Proxy true;
101 | # proxy_set_header Upgrade $http_upgrade;
102 | # proxy_set_header Connection "upgrade";
103 | # proxy_pass http://127.0.0.1:$node_port$request_uri;
104 | # proxy_redirect off;
105 | # }
106 | #
107 | # location = /production.js {
108 | # deny all;
109 | # }
110 | #
111 | # location = /testing.js {
112 | # deny all;
113 | # }
114 | #
115 | # location ~ /static/ {
116 | # etag on;
117 | # expires max;
118 | # }
119 | #}
120 |
121 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "thinkjs-application",
3 | "description": "application created by thinkjs",
4 | "version": "1.0.0",
5 | "scripts": {
6 | "start": "node www/development.js",
7 | "compile": "babel --presets es2015-loose,stage-1 --plugins transform-runtime src/ --out-dir app/ --retain-lines",
8 | "watch": "npm run watch-compile",
9 | "dev": "webpack-dev-server --inline --hot",
10 | "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
11 | },
12 | "dependencies": {
13 | "babel-runtime": "6.x.x",
14 | "jquery": "^2.2.3",
15 | "moment": "^2.13.0",
16 | "thinkjs": "2.1.x",
17 | "vue": "^1.0.0",
18 | "vue-router": "^0.7.13"
19 | },
20 | "devDependencies": {
21 | "autoprefixer": "^6.2.3",
22 | "autoprefixer-loader": "^3.2.0",
23 | "babel-cli": "6.x.x",
24 | "babel-core": "6.x.x",
25 | "babel-loader": "^6.0.0",
26 | "babel-plugin-transform-runtime": "6.x.x",
27 | "babel-preset-es2015": "^6.0.0",
28 | "babel-preset-es2015-loose": "6.x.x",
29 | "babel-preset-stage-1": "6.x.x",
30 | "babel-preset-stage-2": "^6.0.0",
31 | "cross-env": "^1.0.6",
32 | "css-loader": "^0.23.0",
33 | "extract-text-webpack-plugin": "^1.0.1",
34 | "file-loader": "^0.8.4",
35 | "gulp": "^3.9.0",
36 | "gulp-html-replace": "^1.5.5",
37 | "html-webpack-plugin": "^2.15.0",
38 | "json-loader": "^0.5.4",
39 | "marked": "^0.3.5",
40 | "node-sass": "^3.4.2",
41 | "prism": "^1.0.0",
42 | "sass-loader": "^3.1.2",
43 | "style-loader": "^0.13.0",
44 | "url-loader": "^0.5.7",
45 | "vue-hot-reload-api": "^1.2.0",
46 | "vue-html-loader": "^1.0.0",
47 | "vue-loader": "^8.2.1",
48 | "vue-resource": "^0.7.0",
49 | "vue-style-loader": "^1.0.0",
50 | "webpack": "^1.12.2",
51 | "webpack-dev-server": "^1.12.0"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/pm2.json:
--------------------------------------------------------------------------------
1 | {
2 | "apps": [{
3 | "name": "thinkjs-vue",
4 | "script": "www/production.js",
5 | "cwd": "/Users/kodo/HBuilderProjects/vjmu/test/vueclitest/myProject//Users/kodo/HBuilderProjects/vjmu/test/vueclitest/myProject/thinkjs-vue",
6 | "exec_mode": "cluster",
7 | "instances": 0,
8 | "max_memory_restart": "1G",
9 | "autorestart": true,
10 | "node_args": [],
11 | "args": [],
12 | "env": {
13 |
14 | }
15 | }]
16 | }
--------------------------------------------------------------------------------
/source/_iconfont.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'iconfont';
3 | src: url('//at.alicdn.com/t/font_1461486875_8846307.eot'); /* IE9*/
4 | src: url('//at.alicdn.com/t/font_1461486875_8846307.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('//at.alicdn.com/t/font_1461486875_8846307.woff') format('woff'), /* chrome、firefox */
6 | url('//at.alicdn.com/t/font_1461486875_8846307.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
7 | url('//at.alicdn.com/t/font_1461486875_8846307.svg#iconfont') format('svg'); /* iOS 4.1- */
8 | }
9 |
10 | .iconfont {
11 | font-family: 'iconfont';
12 | font-size: 18px;
13 | -webkit-font-smoothing: antialiased;
14 | font-weight: normal;
15 | font-style: normal;
16 | }
--------------------------------------------------------------------------------
/source/_reset.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | body, ul, li, ol, p, span, i, input, img, textarea, button, iframe, h1, h2, h3, h4, h5, h6 {
3 | padding: 0;
4 | margin: 0;
5 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
6 | }
7 |
8 | i, address {
9 | font-style: normal;
10 | }
11 |
12 | ol, ul {
13 | list-style: none;
14 | }
15 |
16 | a {
17 | text-decoration: none;
18 | }
19 |
20 | html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6, b {
21 | -webkit-text-size-adjust: none;
22 | font-weight: 100;
23 | }
24 |
25 | article, aside, details, figcaption, figure, footer, header, menu, nav, section, summary, time, mark, audio, video, svg, path, select, option {
26 | display: block;
27 | margin: 0;
28 | padding: 0;
29 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
30 | }
31 |
32 | body {
33 | font: 14px/1.5 aileron, 微软雅黑, "arial", "sans-serif";
34 | }
35 |
36 | input, select, textarea {
37 | -webkit-appearance: none;
38 | -moz-appearance: none;
39 | appearance: none;
40 | }
41 |
42 | input:focus, textarea:focus, button {
43 | outline: none;
44 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
45 | }
46 |
47 | a {
48 | color: #333;
49 | }
50 |
51 | img {
52 | display: block;
53 | width: 100%;
54 | }
55 |
56 | .clearfix:before, .clearfix:after {
57 | content: " ";
58 | display: table;
59 | }
60 |
61 | .clearfix:after {
62 | clear: both;
63 | overflow: hidden;
64 | }
65 |
66 | .clearfix {
67 | zoom: 1;
68 | }
--------------------------------------------------------------------------------
/source/_variables.scss:
--------------------------------------------------------------------------------
1 | $color : #18BC9C;
2 |
3 | @mixin transition($type : all,$value : .5s) {
4 | transition: $type $value;
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/source/admin.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | myProject
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/source/admin.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import VueRouter from "vue-router";
3 | import VueResource from 'vue-resource'
4 | import routerMap from "./admin.router";
5 | import 'static/css/github-markdown.css';
6 |
7 | Vue.use(VueResource)
8 | Vue.use(VueRouter);
9 | const router = new VueRouter();
10 | routerMap(router);
11 | const app = Vue.extend({
12 | el: function () {
13 | return "html"
14 | },
15 | data () {
16 | return {}
17 | },
18 | ready () {
19 | }
20 | });
21 |
22 | router.start(app, "#app");
23 |
--------------------------------------------------------------------------------
/source/admin.router.js:
--------------------------------------------------------------------------------
1 | import $ from 'jquery';
2 | export default function (router) {
3 | router.map({
4 | '*': {
5 | name: "404",
6 | component (resolve) {
7 | require(['./common/404.vue'], resolve);
8 | }
9 | },
10 | '/': {
11 | component (resolve) {
12 | require(['./common/kodo.vue'], resolve);
13 | }
14 | },
15 | '/login': {
16 | name: "login",
17 | component(resolve){
18 | require(['./common/kodo.vue'], resolve);
19 | }
20 | },
21 | '/admin': {
22 | name: 'admin',
23 | auth: true,
24 | component(resolve) {
25 | require(['./views/kodo/admin.vue'], resolve);
26 | },
27 | subRoutes: {
28 | '/': {
29 | component (resolve) {
30 | require(['./views/profile.vue'], resolve);
31 | }
32 | },
33 | '/post-new/': {
34 | component (resolve) {
35 | require(['./views/kodo/postNew.vue'], resolve);
36 | }
37 | },
38 | 'update/:id' : {
39 | component (resolve) {
40 | require(['./views/kodo/postNew.vue'], resolve);
41 | }
42 | },
43 | '/article-list': {
44 | component(resolve) {
45 | require(['./views/kodo/articleList.vue'], resolve)
46 | }
47 | }
48 | }
49 | }
50 | });
51 | router.beforeEach(({to, next}) => {
52 | if (to.auth) {
53 | // 对身份进行验证...
54 | $.ajax({
55 | url : "/kodo/login/status",
56 | success(ret) {
57 | if(ret.errcode === -1) {
58 | alert('身份验证已过期,请登入');
59 | let redirect = encodeURIComponent(to.path);
60 | console.log(redirect);
61 |
62 | router.go({name: 'login'});
63 | } else {
64 | next();
65 | }
66 | // next();
67 |
68 | },
69 | error() {
70 |
71 | }
72 | });
73 |
74 | } else {
75 | next();
76 | }
77 | // transition.next();
78 | });
79 | }
80 |
--------------------------------------------------------------------------------
/source/common/404.vue:
--------------------------------------------------------------------------------
1 |
2 | 404啦啦啦
3 |
4 |
7 |
--------------------------------------------------------------------------------
/source/common/admin/aside.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
36 |
--------------------------------------------------------------------------------
/source/common/admin/header.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/source/common/home.vue:
--------------------------------------------------------------------------------
1 |
2 | 欢迎回家!!!
3 |
4 |
11 |
--------------------------------------------------------------------------------
/source/common/kodo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
30 |
31 |
© 2014 AllMobilize, Inc. Licensed under MIT license.
32 |
33 |
34 |
35 |
36 |
37 |
42 |
--------------------------------------------------------------------------------
/source/components/index/articleList.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
12 |
13 |
14 |
15 |
16 |
19 |
--------------------------------------------------------------------------------
/source/components/index/header.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |

15 |
16 |
17 |
--------------------------------------------------------------------------------
/source/components/index/indexAside.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/source/components/index/indexDetail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
--------------------------------------------------------------------------------
/source/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 二哲|风变科技
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/source/index.scss:
--------------------------------------------------------------------------------
1 | @import "_reset";
2 | @import "_variables";
3 | @import "_iconfont";
4 | body {
5 | background: url("http://www.meckodo.com/wp-content/themes/kodo/images/background.png");
6 | overflow-x: hidden;
7 | }
8 |
9 | .view {
10 | transition: all .2s ease;
11 | }
12 |
13 | .page-enter {
14 | opacity: 0;
15 | transform: translate3d(30px, 0, 0);
16 | }
17 |
18 | .page-leave {
19 | opacity: 0;
20 | transform: translate3d(30px, 0, 0);
21 | }
22 |
23 | .v-link-active {
24 | color: rgb(68, 68, 68);
25 | }
26 |
27 | /*顶部导航开始*/
28 | .scroll {
29 | background: rgba(255, 255, 255, .96);
30 | a {
31 | color: #999 !important;
32 | }
33 | span {
34 | color: #999 !important;
35 | }
36 | }
37 |
38 | #header {
39 | position: fixed;
40 | top: 0;
41 | left: 0;
42 | width: 100%;
43 | height: 50px;
44 | color: #fff;
45 | z-index: 9999;
46 | @include transition(background);
47 | nav {
48 | position: relative;
49 | width: 80%;
50 | margin: 0 auto;
51 | li {
52 | border: 0;
53 | display: inline-block;
54 | height: 48px;
55 | line-height: 48px;
56 | position: relative;
57 | cursor: pointer;
58 | a {
59 | display: inline-block;
60 | padding: 0 12px;
61 | white-space: nowrap;
62 | color: #fff;
63 | &:hover {
64 | color: $color;
65 | }
66 | }
67 | }
68 |
69 | figure {
70 | position: absolute;
71 | top: 5px;
72 | right: 0;
73 | height: 40px;
74 | line-height: 40px;
75 | img {
76 | width: 40px;
77 | height: 40px;
78 | border-radius: 50%;
79 | display: inline-block;
80 | }
81 | span {
82 | display: inline-block;
83 | vertical-align: top;
84 | font-size: 18px;
85 | margin: 0 10px;
86 | }
87 | }
88 |
89 | }
90 | }
91 |
92 | #bg {
93 | max-height: 568px;
94 | }
95 |
96 | /*顶部导航结束*/
97 |
98 | /*文章样式开始*/
99 |
100 | #container {
101 | position: relative;
102 | max-width: 95%;
103 | margin: 0 auto;
104 | }
105 |
106 | .article {
107 | position: relative;
108 | padding: 0 20px;
109 | margin: 40px auto;
110 | max-width: 950px;
111 | background: #fff;
112 | text-align: center;
113 |
114 | }
115 |
116 | .article > time {
117 | position: absolute;
118 | top: 0;
119 | left: 0;
120 | border-bottom: 1px solid #ccc;
121 | font-size: 14px;
122 | padding: 4px 5px 0;
123 | color: #999;
124 | }
125 |
126 | .article > h2 {
127 | padding: 35px 0 25px;
128 | font-size: 22px;
129 | font-weight: bold;
130 | cursor: pointer;
131 | }
132 |
133 | .article > span {
134 | position: absolute;
135 | top: 0;
136 | right: 0;
137 | color: #999;
138 | padding: 3px 10px;
139 | background: #f1f1f1;
140 | font-size: 14px;
141 | }
142 |
143 | .article section {
144 | text-align: left;
145 | padding: 10px;
146 | font-size: 16px;
147 | }
148 |
149 | .article footer {
150 | padding: 25px 0 20px;
151 | }
152 |
153 | .article footer a {
154 | display: inline-block;
155 | color: $color;
156 | cursor: pointer;
157 | padding: 4px 20px;
158 | border-radius: 5px;
159 | @include transition();
160 | border: 1px solid $color;
161 |
162 | &:hover {
163 | text-shadow: 4px 5px 9px rgba(25, 181, 150, 0.3)
164 | }
165 |
166 | }
167 |
168 | /*文章样式结束*/
169 |
170 | //markdown
171 | .article {
172 |
173 | h1 {
174 | padding-bottom: 0.3em;
175 | margin: 0 0 1em;
176 | font-size: 1.6em;
177 | line-height: 1.2;
178 | border-bottom: 1px solid #eee;
179 | }
180 | h2 {
181 | padding-bottom: 0.3em;
182 | font-size: 1.75em;
183 | line-height: 1.225;
184 | }
185 | h3 {
186 | font-size: 1.5em;
187 | line-height: 1.43;
188 | }
189 | p {
190 | font-size:1em;
191 | margin-bottom: 12px;
192 | }
193 | blockquote {
194 | padding: 0 15px;
195 | color: #777;
196 | border-left: 4px solid #ddd;
197 | }
198 | code {
199 | padding: 2px 4px;
200 | color: #c7254e;
201 | background-color: #f8f8f8;
202 | white-space: nowrap;
203 | border-radius: 0;
204 | }
205 | }
206 |
207 | //代码高亮
208 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
209 | /**
210 | * prism.js default theme for JavaScript, CSS and HTML
211 | * Based on dabblet (http://dabblet.com)
212 | * @author Lea Verou
213 | */
214 |
215 | code[class*="language-"],
216 | pre[class*="language-"] {
217 | color: black;
218 | background: none;
219 | text-shadow: 0 1px white;
220 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
221 | text-align: left;
222 | white-space: pre;
223 | word-spacing: normal;
224 | word-break: normal;
225 | word-wrap: normal;
226 | line-height: 1.5;
227 |
228 | -moz-tab-size: 4;
229 | -o-tab-size: 4;
230 | tab-size: 4;
231 |
232 | -webkit-hyphens: none;
233 | -moz-hyphens: none;
234 | -ms-hyphens: none;
235 | hyphens: none;
236 | }
237 |
238 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
239 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
240 | text-shadow: none;
241 | background: #b3d4fc;
242 | }
243 |
244 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
245 | code[class*="language-"]::selection, code[class*="language-"] ::selection {
246 | text-shadow: none;
247 | background: #b3d4fc;
248 | }
249 |
250 | @media print {
251 | code[class*="language-"],
252 | pre[class*="language-"] {
253 | text-shadow: none;
254 | }
255 | }
256 |
257 | /* Code blocks */
258 | pre[class*="language-"] {
259 | padding: 1em;
260 | margin: .5em 0;
261 | overflow: auto;
262 | }
263 |
264 | :not(pre) > code[class*="language-"],
265 | pre[class*="language-"] {
266 | background: #f5f2f0;
267 | }
268 |
269 | /* Inline code */
270 | :not(pre) > code[class*="language-"] {
271 | padding: .1em;
272 | border-radius: .3em;
273 | white-space: normal;
274 | }
275 |
276 | .token.comment,
277 | .token.prolog,
278 | .token.doctype,
279 | .token.cdata {
280 | color: slategray;
281 | word-break: break-all;
282 | white-space: normal;
283 | }
284 |
285 | .token.punctuation {
286 | color: #999;
287 | }
288 |
289 | .namespace {
290 | opacity: .7;
291 | }
292 |
293 | .token.property,
294 | .token.tag,
295 | .token.boolean,
296 | .token.number,
297 | .token.constant,
298 | .token.symbol,
299 | .token.deleted {
300 | color: #905;
301 | }
302 |
303 | .token.selector,
304 | .token.attr-name,
305 | .token.string,
306 | .token.char,
307 | .token.builtin,
308 | .token.inserted {
309 | color: #690;
310 | }
311 |
312 | .token.operator,
313 | .token.entity,
314 | .token.url,
315 | .language-css .token.string,
316 | .style .token.string {
317 | color: #a67f59;
318 | background: hsla(0, 0%, 100%, .5);
319 | }
320 |
321 | .token.atrule,
322 | .token.attr-value,
323 | .token.keyword {
324 | color: #07a;
325 | }
326 |
327 | .token.function {
328 | color: #DD4A68;
329 | }
330 |
331 | .token.regex,
332 | .token.important,
333 | .token.variable {
334 | color: #e90;
335 | }
336 |
337 | .token.important,
338 | .token.bold {
339 | font-weight: bold;
340 | }
341 | .token.italic {
342 | font-style: italic;
343 | }
344 |
345 | .token.entity {
346 | cursor: help;
347 | }
--------------------------------------------------------------------------------
/source/main.js:
--------------------------------------------------------------------------------
1 | import './index.scss';
2 | import Vue from 'vue';
3 | import $ from 'jquery';
4 | import myHeader from 'components/index/header.vue';
5 | import VueRouter from "vue-router";
6 | import VueResource from 'vue-resource'
7 | import routerMap from "./router";
8 | Vue.use(VueResource);
9 | Vue.use(VueRouter);
10 | const router = new VueRouter({});
11 | routerMap(router);
12 | console.log($);
13 | const app = Vue.extend({
14 | el: function () {
15 | return "html"
16 | },
17 | data () {
18 | return {
19 | isScroll : false
20 | }
21 | },
22 | components : {
23 | myHeader
24 | }
25 | });
26 |
27 | router.start(app, "#app");
28 |
--------------------------------------------------------------------------------
/source/router.js:
--------------------------------------------------------------------------------
1 | export default function (router){
2 | router.map({
3 | '*' : {
4 | name : "404",
5 | component (resolve) {
6 | require(['./common/404.vue'], resolve);
7 | }
8 | },
9 | '/' : {
10 | name : "home",
11 | component (resolve) {
12 | require(['./views/index/index.vue'], resolve);
13 | }
14 | },
15 | '/profile' : {
16 | name : "profile",
17 | component (resolve) {
18 | require(['./views/profile.vue'], resolve);
19 | }
20 | },
21 | '/article/:id' : {
22 | name : "article",
23 | component (resolve) {
24 | require(['./views/index/article.vue'], resolve);
25 | }
26 | }
27 | });
28 | router.beforeEach(({to,next}) => {
29 | if (to.auth) {
30 | // 对身份进行验证...
31 | if(localStorage.getItem('kodo')) {
32 | next();
33 | } else {
34 | alert('身份验证已过期,请登入');
35 | let redirect = encodeURIComponent(to.path);
36 | console.log(redirect);
37 |
38 | router.go({name: 'login'});
39 | }
40 | } else {
41 | next();
42 | }
43 | // transition.next();
44 | });
45 | }
46 |
--------------------------------------------------------------------------------
/source/static/css/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/source/static/css/fonts/icomoon.eot
--------------------------------------------------------------------------------
/source/static/css/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/source/static/css/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/source/static/css/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/source/static/css/fonts/icomoon.woff
--------------------------------------------------------------------------------
/source/unitTest/test.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/source/unitTest/test.js
--------------------------------------------------------------------------------
/source/views/index/article.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{{decodeURIComponent(article.content)}}}
11 | 转载请注明来源:二哲
12 |
13 |
14 |
15 |
16 |
17 |
29 |
--------------------------------------------------------------------------------
/source/views/index/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/source/views/kodo/admin.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/source/views/kodo/articleList.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 | {{{decodeURIComponent(content)}}}
12 |
13 |
14 |
15 |
45 |
--------------------------------------------------------------------------------
/source/views/kodo/postNew.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
13 |
14 |
21 |
22 |
23 |
24 |
25 | {{{editorContent | marked}}}
26 |
27 |
28 |
29 |
63 |
--------------------------------------------------------------------------------
/source/views/profile.vue:
--------------------------------------------------------------------------------
1 |
2 | 我是profile页面
3 |
4 |
7 |
--------------------------------------------------------------------------------
/src/common/bootstrap/global.js:
--------------------------------------------------------------------------------
1 | /**
2 | * this file will be loaded before server started
3 | * you can define global functions used in controllers, models, templates
4 | */
5 |
6 | /**
7 | * use global.xxx to define global functions
8 | *
9 | * global.fn1 = function(){
10 | *
11 | * }
12 | */
--------------------------------------------------------------------------------
/src/common/bootstrap/middleware.js:
--------------------------------------------------------------------------------
1 | /**
2 | * this file will be loaded before server started
3 | * you can register middleware
4 | * https://thinkjs.org/doc/middleware.html
5 | */
6 |
7 | /**
8 | *
9 | * think.middleware('xxx', http => {
10 | *
11 | * })
12 | *
13 | */
14 |
--------------------------------------------------------------------------------
/src/common/config/config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * config
4 | */
5 | export default {
6 | //key: value
7 | };
--------------------------------------------------------------------------------
/src/common/config/db.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * db config
4 | * @type {Object}
5 | */
6 | export default {
7 | type: 'mongo',
8 | log_sql: true,
9 | log_connect: true,
10 | adapter: {
11 | mongo: {
12 | host: 'localhost',
13 | port: '27017',
14 | database: 'kodo_test',
15 | user: 'kodo_blog',
16 | password: '123123',
17 | prefix: 'think_',
18 | encoding: 'utf8'
19 | }
20 | }
21 | };
--------------------------------------------------------------------------------
/src/common/config/env/development.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export default {
4 |
5 | };
--------------------------------------------------------------------------------
/src/common/config/env/production.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export default {
4 |
5 | };
--------------------------------------------------------------------------------
/src/common/config/env/testing.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export default {
4 |
5 | };
--------------------------------------------------------------------------------
/src/common/config/error.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * err config
4 | */
5 | export default {
6 | //key: value
7 | key: "errno", //error number
8 | msg: "errmsg" //error message
9 | };
--------------------------------------------------------------------------------
/src/common/config/hook.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * hook config
5 | * https://thinkjs.org/doc/middleware.html#toc-df6
6 | */
7 | export default {
8 |
9 | }
--------------------------------------------------------------------------------
/src/common/config/locale/en.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export default {
4 |
5 | };
--------------------------------------------------------------------------------
/src/common/config/session.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /**
4 | * session configs
5 | */
6 | export default {
7 | name: 'thinkjs',
8 | type: 'file',
9 | secret: '4CO^(@3~',
10 | timeout: 24 * 3600,
11 | cookie: { // cookie options
12 | length: 32,
13 | httponly: true
14 | },
15 | adapter: {
16 | file: {
17 | path: think.getPath('common', 'runtime') + '/session',
18 | }
19 | }
20 | };
--------------------------------------------------------------------------------
/src/common/config/view.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * template config
4 | */
5 | export default {
6 | type: 'ejs',
7 | content_type: 'text/html',
8 | file_ext: '.html',
9 | file_depr: '/',
10 | root_path: think.ROOT_PATH + '/view',
11 | adapter: {
12 | ejs: {}
13 | }
14 | };
--------------------------------------------------------------------------------
/src/common/controller/error.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * error controller
4 | */
5 | export default class extends think.controller.base {
6 | /**
7 | * display error page
8 | * @param {Number} status []
9 | * @return {Promise} []
10 | */
11 | displayError(status){
12 |
13 | //hide error message on production env
14 | if(think.env === 'production'){
15 | this.http.error = null;
16 | }
17 |
18 | let errorConfig = this.config('error');
19 | let message = this.http.error && this.http.error.message || '';
20 | if(this.isJsonp()){
21 | return this.jsonp({
22 | [errorConfig.key]: status,
23 | [errorConfig.msg]: message
24 | })
25 | }else if(this.isAjax()){
26 | return this.fail(status, message);
27 | }
28 |
29 | let module = 'common';
30 | if(think.mode !== think.mode_module){
31 | module = this.config('default_module');
32 | }
33 | let file = `${module}/error/${status}.html`;
34 | let options = this.config('tpl');
35 | options = think.extend({}, options, {type: 'base', file_depr: '_'});
36 | this.fetch(file, {}, options).then(content => {
37 | content = content.replace('ERROR_MESSAGE', message);
38 | this.type(options.content_type);
39 | this.end(content);
40 | });
41 | }
42 | /**
43 | * Bad Request
44 | * @return {Promise} []
45 | */
46 | _400Action(){
47 | return this.displayError(400);
48 | }
49 | /**
50 | * Forbidden
51 | * @return {Promise} []
52 | */
53 | _403Action(){
54 | return this.displayError(403);
55 | }
56 | /**
57 | * Not Found
58 | * @return {Promise} []
59 | */
60 | _404Action(){
61 | return this.displayError(404);
62 | }
63 | /**
64 | * Internal Server Error
65 | * @return {Promise} []
66 | */
67 | _500Action(){
68 | return this.displayError(500);
69 | }
70 | /**
71 | * Service Unavailable
72 | * @return {Promise} []
73 | */
74 | _503Action(){
75 | return this.displayError(503);
76 | }
77 | }
--------------------------------------------------------------------------------
/src/home/config/config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * config
4 | */
5 | export default {
6 | //key: value
7 | };
--------------------------------------------------------------------------------
/src/home/controller/base.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export default class extends think.controller.base {
4 | /**
5 | * some base method in here
6 | */
7 | }
--------------------------------------------------------------------------------
/src/home/controller/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | import Base from './base.js';
4 | import marked from 'marked';
5 | export default class extends Base {
6 | /**
7 | * index action
8 | * @return {Promise} []
9 | */
10 | async indexAction() { //首页文章列表
11 | let article = await this.model('article').select();
12 | // await this.session(); 测试清除登入session
13 | article.map(x => {
14 | x.content = encodeURIComponent(marked(decodeURIComponent(x.content)));
15 | if(think.isArray(x.badges)) {
16 | x.badges = JSON.parse(x.badges);
17 | }
18 | });
19 | this.assign({article: JSON.stringify(article)});
20 | return this.display();
21 | }
22 |
23 | async articleAction() { //文章详情
24 | let id = this.get('id');
25 | let detail = await this.model('article').where({_id: id}).find();
26 | detail.content = encodeURIComponent(marked(decodeURIComponent(detail.content)));
27 | if(think.isArray(detail.badges)) {
28 | detail.badges = JSON.parse(detail.badges);
29 | }
30 | return this.json(detail);
31 | }
32 |
33 |
34 | }
--------------------------------------------------------------------------------
/src/home/logic/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * logic
4 | * @param {} []
5 | * @return {} []
6 | */
7 | export default class extends think.logic.base {
8 | /**
9 | * index action logic
10 | * @return {} []
11 | */
12 | indexAction(){
13 |
14 | }
15 | }
--------------------------------------------------------------------------------
/src/home/model/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * model
4 | */
5 | export default class extends think.model.base {
6 |
7 | }
--------------------------------------------------------------------------------
/src/home/model/user.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * model
4 | */
5 | export default class extends think.model.mongo {
6 | addUser () {
7 |
8 | var ret = this.add({
9 | name: Date()
10 | });
11 |
12 | console.log(this.getModelName(),this.db());
13 |
14 | return ret;
15 | }
16 | findUser() {
17 | return this.select({content:"sdf"});
18 | }
19 | }
--------------------------------------------------------------------------------
/src/kodo/config/config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * config
4 | */
5 | export default {
6 | //key: value
7 | };
--------------------------------------------------------------------------------
/src/kodo/controller/article.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | import Base from './base.js';
4 | import marked from 'marked';
5 |
6 | export default class extends Base {
7 | /**
8 | * index action
9 | * @return {Promise} []
10 | */
11 | indexAction(){
12 | }
13 | addAction() {
14 | let content = this.post('content');
15 | let title = this.post('title');
16 | let bg = this.post('bg');
17 | let article = this.model('article').addArticle(title,content,bg);
18 | return this.success(0);
19 | }
20 | async listAction() {//文章列表
21 |
22 | let arts = await this.model('article').findArticle();
23 | arts.map(x => {
24 | x.content = encodeURIComponent(marked(decodeURIComponent(x.content)));
25 | });
26 | return this.json({
27 | arts : arts
28 | })
29 |
30 | }
31 | async detailAction() { //文章详情
32 |
33 | let id = this.get('id');
34 | console.log(id);
35 | let detail = await this.model('article').where({_id:id}).find();
36 | if(think.isArray(detail.badges)) {
37 | detail.badges = JSON.parse(detail.badges);
38 | }
39 | return this.json(detail);
40 | }
41 | async updateAction() { //更新文章
42 | let content = this.post('content');
43 | let title = this.post('title');
44 | console.log(title);
45 | let id = this.post('id');
46 | let detail = await this.model('article').where({_id:id}).update({content:content,title:title});
47 | return this.json({errcode:0,errmsg:'ok'});
48 | }
49 | async deleteAction() { //删除文章
50 | let id = this.post('id');
51 | let detail = await this.model('article').where({_id:id}).delete();
52 | return this.json({errcode:0,errmsg:'ok'});
53 | }
54 |
55 |
56 | }
--------------------------------------------------------------------------------
/src/kodo/controller/base.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | export default class extends think.controller.base {
4 | /**
5 | * some base method in here
6 | */
7 |
8 | async __before() {
9 | let userInfo = await this.session("userInfo");
10 | console.log(userInfo);
11 | //如果没有登录,则跳转到登录页面
12 | if(think.isEmpty(userInfo)) {
13 | if(this.isAjax()) {
14 | return this.json({
15 | errcode : -1,
16 | msg : "未登录"
17 | })
18 | } else {
19 | return this.display()
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/kodo/controller/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | import Base from './base.js';
4 |
5 | export default class extends Base {
6 | /**
7 | * index action
8 | * @return {Promise} []
9 | */
10 | indexAction(){
11 | //auto render template file index_index.html
12 | return this.display();
13 | }
14 | articleAction() {
15 |
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/src/kodo/controller/login.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | import Base from './base.js';
4 |
5 | export default class extends think.controller.base {
6 | /**
7 | * index action
8 | * @return {Promise} []
9 | */
10 | async indexAction(){ // 登录按钮
11 | let username = this.post('username');
12 | let pwd = this.post('pwd');
13 |
14 | var userInfo = await this.model('user').where({username : username,pwd:pwd}).find();
15 |
16 | if(think.isEmpty(userInfo)) {
17 | return this.json({
18 | errcode : -1001,
19 | msg : "账号或密码错误"
20 | })
21 | }
22 |
23 | this.session('userInfo',userInfo);
24 | return this.json({
25 | errcode : 0,
26 | msg : "ok",
27 | userInfo : userInfo
28 | })
29 | }
30 | async statusAction() { // router.before 每次的判断
31 | let userInfo = await this.session('userInfo');
32 | console.log(userInfo);
33 | if(userInfo) {
34 | return this.json({
35 | errcode : 0,
36 | msg : '登录成功'
37 | })
38 | } else {
39 | return this.json({
40 | errcode : -1,
41 | msg : '没有权限'
42 | })
43 | }
44 |
45 | }
46 | }
--------------------------------------------------------------------------------
/src/kodo/logic/article.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * logic
4 | * @param {} []
5 | * @return {} []
6 | */
7 | export default class extends think.logic.base {
8 | /**
9 | * index action logic
10 | * @return {} []
11 | */
12 | indexAction(){
13 |
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/src/kodo/logic/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * logic
4 | * @param {} []
5 | * @return {} []
6 | */
7 | export default class extends think.logic.base {
8 | /**
9 | * index action logic
10 | * @return {} []
11 | */
12 | indexAction(){
13 |
14 | }
15 | }
--------------------------------------------------------------------------------
/src/kodo/logic/login.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * logic
4 | * @param {} []
5 | * @return {} []
6 | */
7 | export default class extends think.logic.base {
8 | /**
9 | * index action logic
10 | * @return {} []
11 | */
12 | indexAction(){
13 |
14 | }
15 | }
--------------------------------------------------------------------------------
/src/kodo/model/article.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * model
4 | */
5 | import moment from 'moment';
6 |
7 | export default class extends think.model.mongo {
8 | addArticle(title,content,badges) {
9 | this.add({
10 | title : title,
11 | content: encodeURIComponent(content),
12 | badges : badges,
13 | ctime: moment().format('YY年MM月DD日')
14 | });
15 | }
16 |
17 |
18 | findArticle() {
19 | return this.select();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/kodo/model/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * model
4 | */
5 | export default class extends think.model.base {
6 |
7 | }
--------------------------------------------------------------------------------
/view/home/admin/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | myProject
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/view/home/index/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 二哲|风变科技
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/view/kodo/index/index.html:
--------------------------------------------------------------------------------
1 | myProject
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var webpack = require('webpack');
3 | var HtmlWebpackPlugin = require('html-webpack-plugin');
4 | var ExtractTextPlugin = require("extract-text-webpack-plugin");
5 |
6 |
7 | module.exports = {
8 | entry: {
9 | index : './source/main.js',
10 | admin : './source/admin.js'
11 | },
12 | output: {
13 | path: path.resolve(__dirname, './www/static'),
14 | publicPath: '/static/',
15 | chunkFilename: 'js/[id].js',
16 | filename: '[name].build.js'
17 | },
18 | resolve: {
19 | root: [path.join(__dirname, 'node_modules'),path.join(__dirname, 'source')],
20 | alias: {
21 | 'jquery': 'jquery/dist/jquery.min.js',
22 | 'Vue': 'vue/dist/vue.js'
23 | },
24 | extensions: ['', '.js', '.vue', '.scss', '.css'] //设置require或import的时候可以不需要带后缀
25 | },
26 | resolveLoader: {
27 | root: path.join(__dirname, 'node_modules'),
28 | },
29 | module: {
30 | loaders: [
31 | {
32 | test: /\.vue$/,
33 | loader: 'vue'
34 | },
35 | {
36 | test: /\.css$/,
37 | loader: ExtractTextPlugin.extract("css")
38 | },
39 | {
40 | test: /\.scss$/,
41 | loader: ExtractTextPlugin.extract("style-loader", "css!sass")
42 | },
43 | {
44 | test: /\.js$/,
45 | loader: 'babel',
46 | exclude: /node_modules/
47 | },
48 | {
49 | test: /\.json$/,
50 | loader: 'json'
51 | },
52 | {
53 | test: /\.html$/,
54 | loader: 'vue-html'
55 | },
56 | {
57 | test: /\.(png|jpg|gif|svg)$/,
58 | loader: 'url',
59 | query: {
60 | limit: 10000,
61 | name: '[name].[ext]?[hash]'
62 | }
63 | },
64 | {
65 | test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
66 | loader: "url-loader?limit=10000&minetype=application/font-woff"
67 | },
68 | {
69 | test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
70 | loader: "url",
71 | query: {
72 | name: '[name].[ext]?mimetype=application/font-woff2'
73 | }
74 | },
75 | {
76 | test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
77 | loader: "url",
78 | query: {
79 | name: '[name].[ext]?mimetype=application/font-woff2'
80 | }
81 | }
82 | ]
83 | },
84 | babel: { //配置babel
85 | "presets": ["es2015"],
86 | "plugins": ["transform-runtime"]
87 | },
88 | plugins: [
89 | new ExtractTextPlugin("css/[name].css"),
90 | new HtmlWebpackPlugin({ //为了配合thinkjs的目录定义 需要输出在view/home/[controller]/index.html 下
91 | filename : "../../view/home/index/index.html",
92 | template : "./source/index.html",
93 | inject:false
94 | }),
95 | new HtmlWebpackPlugin({
96 | filename : "../../view/home/admin/index.html",
97 | template : "./source/admin.html",
98 | inject:false
99 | })
100 | ],
101 | devServer: {
102 | historyApiFallback: true,
103 | // host: '0.0.0.0', // 统一localhost,为了可以内网手机调试
104 | port: 8200,
105 | // noInfo: true
106 | },
107 | vue: { //vue的配置,需要单独出来配置
108 | loaders: {
109 | js: 'babel'
110 | }
111 | },
112 | devtool: '#source-map'
113 | };
114 | var vueLoader = {
115 | js: 'babel',
116 | css: ExtractTextPlugin.extract('vue-style-loader',"css-loader"),
117 | scss: ExtractTextPlugin.extract('vue-style-loader', 'css-loader!sass-loader')
118 | };
119 | if (process.env.NODE_ENV === 'production') {
120 | module.exports.devtool = '#source-map';
121 | module.exports.vue.loaders = vueLoader;
122 |
123 | // http://vuejs.github.io/vue-loader/workflow/production.html
124 | module.exports.plugins = (module.exports.plugins || []).concat([
125 | new webpack.DefinePlugin({
126 | 'process.env': {
127 | NODE_ENV: '"production"'
128 | }
129 | }),
130 | new webpack.optimize.UglifyJsPlugin({
131 | compress: {
132 | warnings: false
133 | }
134 | }),
135 | new webpack.optimize.OccurenceOrderPlugin()
136 | ])
137 | }
138 |
--------------------------------------------------------------------------------
/www/README.md:
--------------------------------------------------------------------------------
1 | ## application
2 |
3 | ### start server
4 |
5 | *development*
6 |
7 | ```js
8 | node www/index.js
9 | ```
10 |
11 | *testing*
12 |
13 | ```js
14 | node www/testing.js
15 | ```
16 |
17 | *production*
18 |
19 | ```js
20 | node www/production.js
21 | ```
22 |
23 | or use pm2 to manage node:
24 |
25 | ```
26 | pm2 start www/production.js
27 | ```
28 |
29 | ### compile es6 code
30 |
31 | ```
32 | npm run compile
33 | ```
34 |
35 | ### how to link resource
36 |
37 | *in template file*
38 |
39 | ```html
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | ```
48 |
49 | *link image in css*
50 |
51 | ```css
52 | .a{
53 | background: url(../img/a.png) no-repeat;
54 | }
55 | ```
--------------------------------------------------------------------------------
/www/development.js:
--------------------------------------------------------------------------------
1 | var thinkjs = require('thinkjs');
2 | var path = require('path');
3 |
4 | var rootPath = path.dirname(__dirname);
5 |
6 | var instance = new thinkjs({
7 | APP_PATH: rootPath + path.sep + 'app',
8 | ROOT_PATH: rootPath,
9 | RESOURCE_PATH: __dirname,
10 | env: 'development'
11 | });
12 |
13 | //compile src/ to app/
14 | instance.compile({
15 | retainLines: true,
16 | log: true
17 | });
18 |
19 | instance.run();
--------------------------------------------------------------------------------
/www/production.js:
--------------------------------------------------------------------------------
1 | var thinkjs = require('thinkjs');
2 | var path = require('path');
3 |
4 | var rootPath = path.dirname(__dirname);
5 |
6 | var instance = new thinkjs({
7 | APP_PATH: rootPath + path.sep + 'app',
8 | ROOT_PATH: rootPath,
9 | RESOURCE_PATH: __dirname,
10 | env: 'production'
11 | });
12 |
13 | instance.run();
--------------------------------------------------------------------------------
/www/static/css/admin.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":[],"names":[],"mappings":"","file":"css/admin.css","sourceRoot":""}
--------------------------------------------------------------------------------
/www/static/css/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/www/static/css/fonts/icomoon.eot
--------------------------------------------------------------------------------
/www/static/css/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/www/static/css/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/www/static/css/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MeCKodo/thinkjs-vue-blog/07781d4a53cb21b8631b5b5c31cc1fedb6d6fe27/www/static/css/fonts/icomoon.woff
--------------------------------------------------------------------------------
/www/static/css/index.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | body, ul, li, ol, p, span, i, input, img, textarea, button, iframe, h1, h2, h3, h4, h5, h6 {
3 | padding: 0;
4 | margin: 0;
5 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
6 |
7 | i, address {
8 | font-style: normal; }
9 |
10 | ol, ul {
11 | list-style: none; }
12 |
13 | a {
14 | text-decoration: none; }
15 |
16 | html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6, b {
17 | -webkit-text-size-adjust: none;
18 | font-weight: 100; }
19 |
20 | article, aside, details, figcaption, figure, footer, header, menu, nav, section, summary, time, mark, audio, video, svg, path, select, option {
21 | display: block;
22 | margin: 0;
23 | padding: 0;
24 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
25 |
26 | body {
27 | font: 14px/1.5 aileron, 微软雅黑, "arial", "sans-serif"; }
28 |
29 | input, select, textarea {
30 | -webkit-appearance: none;
31 | -moz-appearance: none;
32 | appearance: none; }
33 |
34 | input:focus, textarea:focus, button {
35 | outline: none;
36 | -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
37 |
38 | a {
39 | color: #333; }
40 |
41 | img {
42 | display: block;
43 | width: 100%; }
44 |
45 | .clearfix:before, .clearfix:after {
46 | content: " ";
47 | display: table; }
48 |
49 | .clearfix:after {
50 | clear: both;
51 | overflow: hidden; }
52 |
53 | .clearfix {
54 | zoom: 1; }
55 |
56 | @font-face {
57 | font-family: 'iconfont';
58 | src: url("//at.alicdn.com/t/font_1461486875_8846307.eot");
59 | /* IE9*/
60 | src: url("//at.alicdn.com/t/font_1461486875_8846307.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_1461486875_8846307.woff") format("woff"), url("//at.alicdn.com/t/font_1461486875_8846307.ttf") format("truetype"), url("//at.alicdn.com/t/font_1461486875_8846307.svg#iconfont") format("svg");
61 | /* iOS 4.1- */ }
62 |
63 | .iconfont {
64 | font-family: 'iconfont';
65 | font-size: 18px;
66 | -webkit-font-smoothing: antialiased;
67 | font-weight: normal;
68 | font-style: normal; }
69 |
70 | body {
71 | background: url("http://www.meckodo.com/wp-content/themes/kodo/images/background.png");
72 | overflow-x: hidden; }
73 |
74 | .view {
75 | transition: all .2s ease; }
76 |
77 | .page-enter {
78 | opacity: 0;
79 | transform: translate3d(30px, 0, 0); }
80 |
81 | .page-leave {
82 | opacity: 0;
83 | transform: translate3d(30px, 0, 0); }
84 |
85 | .v-link-active {
86 | color: #444444; }
87 |
88 | /*顶部导航开始*/
89 | .scroll {
90 | background: rgba(255, 255, 255, 0.96); }
91 | .scroll a {
92 | color: #999 !important; }
93 | .scroll span {
94 | color: #999 !important; }
95 |
96 | #header {
97 | position: fixed;
98 | top: 0;
99 | left: 0;
100 | width: 100%;
101 | height: 50px;
102 | color: #fff;
103 | z-index: 9999;
104 | transition: background 0.5s; }
105 | #header nav {
106 | position: relative;
107 | width: 80%;
108 | margin: 0 auto; }
109 | #header nav li {
110 | border: 0;
111 | display: inline-block;
112 | height: 48px;
113 | line-height: 48px;
114 | position: relative;
115 | cursor: pointer; }
116 | #header nav li a {
117 | display: inline-block;
118 | padding: 0 12px;
119 | white-space: nowrap;
120 | color: #fff; }
121 | #header nav li a:hover {
122 | color: #18BC9C; }
123 | #header nav figure {
124 | position: absolute;
125 | top: 5px;
126 | right: 0;
127 | height: 40px;
128 | line-height: 40px; }
129 | #header nav figure img {
130 | width: 40px;
131 | height: 40px;
132 | border-radius: 50%;
133 | display: inline-block; }
134 | #header nav figure span {
135 | display: inline-block;
136 | vertical-align: top;
137 | font-size: 18px;
138 | margin: 0 10px; }
139 |
140 | #bg {
141 | max-height: 568px; }
142 |
143 | /*顶部导航结束*/
144 | /*文章样式开始*/
145 | #container {
146 | position: relative;
147 | max-width: 95%;
148 | margin: 0 auto; }
149 |
150 | .article {
151 | position: relative;
152 | padding: 0 20px;
153 | margin: 40px auto;
154 | max-width: 950px;
155 | background: #fff;
156 | text-align: center; }
157 |
158 | .article > time {
159 | position: absolute;
160 | top: 0;
161 | left: 0;
162 | border-bottom: 1px solid #ccc;
163 | font-size: 14px;
164 | padding: 4px 5px 0;
165 | color: #999; }
166 |
167 | .article > h2 {
168 | padding: 35px 0 25px;
169 | font-size: 22px;
170 | font-weight: bold;
171 | cursor: pointer; }
172 |
173 | .article > span {
174 | position: absolute;
175 | top: 0;
176 | right: 0;
177 | color: #999;
178 | padding: 3px 10px;
179 | background: #f1f1f1;
180 | font-size: 14px; }
181 |
182 | .article section {
183 | text-align: left;
184 | padding: 10px;
185 | font-size: 16px; }
186 |
187 | .article footer {
188 | padding: 25px 0 20px; }
189 |
190 | .article footer a {
191 | display: inline-block;
192 | color: #18BC9C;
193 | cursor: pointer;
194 | padding: 4px 20px;
195 | border-radius: 5px;
196 | transition: all 0.5s;
197 | border: 1px solid #18BC9C; }
198 | .article footer a:hover {
199 | text-shadow: 4px 5px 9px rgba(25, 181, 150, 0.3); }
200 |
201 | /*文章样式结束*/
202 | .article h1 {
203 | padding-bottom: 0.3em;
204 | margin: 0 0 1em;
205 | font-size: 1.6em;
206 | line-height: 1.2;
207 | border-bottom: 1px solid #eee; }
208 |
209 | .article h2 {
210 | padding-bottom: 0.3em;
211 | font-size: 1.75em;
212 | line-height: 1.225; }
213 |
214 | .article h3 {
215 | font-size: 1.5em;
216 | line-height: 1.43; }
217 |
218 | .article p {
219 | font-size: 1em;
220 | margin-bottom: 12px; }
221 |
222 | .article blockquote {
223 | padding: 0 15px;
224 | color: #777;
225 | border-left: 4px solid #ddd; }
226 |
227 | .article code {
228 | padding: 2px 4px;
229 | color: #c7254e;
230 | background-color: #f8f8f8;
231 | white-space: nowrap;
232 | border-radius: 0; }
233 |
234 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
235 | /**
236 | * prism.js default theme for JavaScript, CSS and HTML
237 | * Based on dabblet (http://dabblet.com)
238 | * @author Lea Verou
239 | */
240 | code[class*="language-"],
241 | pre[class*="language-"] {
242 | color: black;
243 | background: none;
244 | text-shadow: 0 1px white;
245 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
246 | text-align: left;
247 | white-space: pre;
248 | word-spacing: normal;
249 | word-break: normal;
250 | word-wrap: normal;
251 | line-height: 1.5;
252 | -moz-tab-size: 4;
253 | -o-tab-size: 4;
254 | tab-size: 4;
255 | -webkit-hyphens: none;
256 | -moz-hyphens: none;
257 | -ms-hyphens: none;
258 | hyphens: none; }
259 |
260 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
261 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
262 | text-shadow: none;
263 | background: #b3d4fc; }
264 |
265 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
266 | code[class*="language-"]::selection, code[class*="language-"] ::selection {
267 | text-shadow: none;
268 | background: #b3d4fc; }
269 |
270 | @media print {
271 | code[class*="language-"],
272 | pre[class*="language-"] {
273 | text-shadow: none; } }
274 |
275 | /* Code blocks */
276 | pre[class*="language-"] {
277 | padding: 1em;
278 | margin: .5em 0;
279 | overflow: auto; }
280 |
281 | :not(pre) > code[class*="language-"],
282 | pre[class*="language-"] {
283 | background: #f5f2f0; }
284 |
285 | /* Inline code */
286 | :not(pre) > code[class*="language-"] {
287 | padding: .1em;
288 | border-radius: .3em;
289 | white-space: normal; }
290 |
291 | .token.comment,
292 | .token.prolog,
293 | .token.doctype,
294 | .token.cdata {
295 | color: slategray;
296 | word-break: break-all;
297 | white-space: normal; }
298 |
299 | .token.punctuation {
300 | color: #999; }
301 |
302 | .namespace {
303 | opacity: .7; }
304 |
305 | .token.property,
306 | .token.tag,
307 | .token.boolean,
308 | .token.number,
309 | .token.constant,
310 | .token.symbol,
311 | .token.deleted {
312 | color: #905; }
313 |
314 | .token.selector,
315 | .token.attr-name,
316 | .token.string,
317 | .token.char,
318 | .token.builtin,
319 | .token.inserted {
320 | color: #690; }
321 |
322 | .token.operator,
323 | .token.entity,
324 | .token.url,
325 | .language-css .token.string,
326 | .style .token.string {
327 | color: #a67f59;
328 | background: rgba(255, 255, 255, 0.5); }
329 |
330 | .token.atrule,
331 | .token.attr-value,
332 | .token.keyword {
333 | color: #07a; }
334 |
335 | .token.function {
336 | color: #DD4A68; }
337 |
338 | .token.regex,
339 | .token.important,
340 | .token.variable {
341 | color: #e90; }
342 |
343 | .token.important,
344 | .token.bold {
345 | font-weight: bold; }
346 |
347 | .token.italic {
348 | font-style: italic; }
349 |
350 | .token.entity {
351 | cursor: help; }
352 |
353 | /*# sourceMappingURL=index.css.map*/
--------------------------------------------------------------------------------
/www/static/css/index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":[],"names":[],"mappings":"","file":"css/index.css","sourceRoot":""}
--------------------------------------------------------------------------------
/www/static/js/0.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([0],{2:function(e,t,n){function r(e,t){for(var n=0;n=0&&g.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",s(e,t),t}function u(e,t){var n,r,o;if(t.singleton){var s=m++;n=v||(v=a(t)),r=f.bind(null,n,s,!1),o=f.bind(null,n,s,!0)}else n=a(t),r=p.bind(null,n),o=function(){i(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function f(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var s=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(s,i[t]):e.appendChild(s)}}function p(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var l={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},c=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=d(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,m=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=c()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var s=[],i=0;i我是profile页面"}});
2 | //# sourceMappingURL=0.js.map
--------------------------------------------------------------------------------
/www/static/js/10.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([10],{
2 |
3 | /***/ 31:
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | var __vue_script__, __vue_template__
7 | __webpack_require__(32)
8 | __vue_script__ = __webpack_require__(36)
9 | if (__vue_script__ &&
10 | __vue_script__.__esModule &&
11 | Object.keys(__vue_script__).length > 1) {
12 | console.warn("[vue-loader] source/common/404.vue: named exports in *.vue files are ignored.")}
13 | __vue_template__ = __webpack_require__(37)
14 | module.exports = __vue_script__ || {}
15 | if (module.exports.__esModule) module.exports = module.exports.default
16 | if (__vue_template__) {
17 | (typeof module.exports === "function" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__
18 | }
19 | if (false) {(function () { module.hot.accept()
20 | var hotAPI = require("vue-hot-reload-api")
21 | hotAPI.install(require("vue"), true)
22 | if (!hotAPI.compatible) return
23 | var id = "/Users/kodo/WebstormProjects/thinkJsProject/blog/source/common/404.vue"
24 | if (!module.hot.data) {
25 | hotAPI.createRecord(id, module.exports)
26 | } else {
27 | hotAPI.update(id, module.exports, __vue_template__)
28 | }
29 | })()}
30 |
31 | /***/ },
32 |
33 | /***/ 32:
34 | /***/ function(module, exports, __webpack_require__) {
35 |
36 | // style-loader: Adds some css to the DOM by adding a
312 | //
322 | /* generated by vue-loader */
323 |
324 | /***/ },
325 |
326 | /***/ 37:
327 | /***/ function(module, exports) {
328 |
329 | module.exports = "\n404啦啦啦
\n";
330 |
331 | /***/ }
332 |
333 | });
334 | //# sourceMappingURL=10.js.map
--------------------------------------------------------------------------------
/www/static/js/10.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./source/common/404.vue?85ea","webpack:///./source/common/404.vue?607f*","webpack:///./source/common/404.vue?906f*","webpack:///./~/vue-style-loader/addStyles.js?c2fc****","webpack:///404.vue?e325","webpack:///./source/common/404.vue?242b*"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAA+F;AAC/F;AACA,aAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC,I;;;;;;;ACvBD;;AAEA;AACA;AACA;AACA;AACA,iDAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;;ACpBA;AACA;;;AAGA;AACA,uCAAsC,6FAA6F;;AAEnI;;;;;;;;ACPA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAuD;AACvD;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;gBCzMA,GAJA;MADA;;iBAQA;;;;;;;;;;ACjBA,wC","file":"js/10.js","sourcesContent":["var __vue_script__, __vue_template__\nrequire(\"!!vue-style-loader!css-loader?sourceMap!./../../node_modules/vue-loader/lib/style-rewriter.js!./../../node_modules/vue-loader/lib/selector.js?type=style&index=0!./404.vue\")\n__vue_script__ = require(\"!!babel!./../../node_modules/vue-loader/lib/selector.js?type=script&index=0!./404.vue\")\nif (__vue_script__ &&\n __vue_script__.__esModule &&\n Object.keys(__vue_script__).length > 1) {\n console.warn(\"[vue-loader] source/common/404.vue: named exports in *.vue files are ignored.\")}\n__vue_template__ = require(\"!!vue-html-loader!./../../node_modules/vue-loader/lib/selector.js?type=template&index=0!./404.vue\")\nmodule.exports = __vue_script__ || {}\nif (module.exports.__esModule) module.exports = module.exports.default\nif (__vue_template__) {\n(typeof module.exports === \"function\" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__\n}\nif (module.hot) {(function () { module.hot.accept()\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), true)\n if (!hotAPI.compatible) return\n var id = \"/Users/kodo/WebstormProjects/thinkJsProject/blog/source/common/404.vue\"\n if (!module.hot.data) {\n hotAPI.createRecord(id, module.exports)\n } else {\n hotAPI.update(id, module.exports, __vue_template__)\n }\n})()}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./source/common/404.vue\n ** module id = 31\n ** module chunks = 1 10\n **/","// style-loader: Adds some css to the DOM by adding a \n\n\n\n/** WEBPACK FOOTER **\n ** 404.vue?7c8c4be6\n **/","module.exports = \"\\n404啦啦啦
\\n\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./source/common/404.vue\n ** module id = 37\n ** module chunks = 1 10\n **/"],"sourceRoot":""}
--------------------------------------------------------------------------------
/www/static/js/11.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([11],{
2 |
3 | /***/ 35:
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | /*
7 | MIT License http://www.opensource.org/licenses/mit-license.php
8 | Author Tobias Koppers @sokra
9 | */
10 | var stylesInDom = {},
11 | memoize = function(fn) {
12 | var memo;
13 | return function () {
14 | if (typeof memo === "undefined") memo = fn.apply(this, arguments);
15 | return memo;
16 | };
17 | },
18 | isOldIE = memoize(function() {
19 | return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
20 | }),
21 | getHeadElement = memoize(function () {
22 | return document.head || document.getElementsByTagName("head")[0];
23 | }),
24 | singletonElement = null,
25 | singletonCounter = 0,
26 | styleElementsInsertedAtTop = [];
27 |
28 | module.exports = function(list, options) {
29 | if(false) {
30 | if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
31 | }
32 |
33 | options = options || {};
34 | // Force single-tag solution on IE6-9, which has a hard limit on the # of
312 | //
322 | /* generated by vue-loader */
323 |
324 | /***/ },
325 |
326 | /***/ 61:
327 | /***/ function(module, exports) {
328 |
329 | module.exports = "\n我是profile页面
\n";
330 |
331 | /***/ }
332 |
333 | });
334 | //# sourceMappingURL=11.js.map
--------------------------------------------------------------------------------
/www/static/js/11.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./~/vue-style-loader/addStyles.js?c2fc*****","webpack:///./source/views/profile.vue?6657","webpack:///./source/views/profile.vue?18b6*","webpack:///./source/views/profile.vue?8f8d*","webpack:///profile.vue?b168","webpack:///./source/views/profile.vue?ebc5*"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAuD;AACvD;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAA+F;AAC/F;AACA,aAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC,I;;;;;;;ACvBD;;AAEA;AACA;AACA;AACA;AACA,iDAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;;ACpBA;AACA;;;AAGA;AACA,uCAAsC,iGAAiG;;AAEvI;;;;;;;;;;;;;;;;;;;;;;;gBCOA,GAJA;MADA;;iBAQA;;;;;;;;;;ACjBA,6C","file":"js/11.js","sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nvar stylesInDom = {},\n\tmemoize = function(fn) {\n\t\tvar memo;\n\t\treturn function () {\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\t\treturn memo;\n\t\t};\n\t},\n\tisOldIE = memoize(function() {\n\t\treturn /msie [6-9]\\b/.test(window.navigator.userAgent.toLowerCase());\n\t}),\n\tgetHeadElement = memoize(function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}),\n\tsingletonElement = null,\n\tsingletonCounter = 0,\n\tstyleElementsInsertedAtTop = [];\n\nmodule.exports = function(list, options) {\n\tif(typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif(typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of \n\n\n\n/** WEBPACK FOOTER **\n ** profile.vue?48ce726d\n **/","module.exports = \"\\n我是profile页面
\\n\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./source/views/profile.vue\n ** module id = 61\n ** module chunks = 4 11\n **/"],"sourceRoot":""}
--------------------------------------------------------------------------------
/www/static/js/12.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([12],{
2 |
3 | /***/ 31:
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | var __vue_script__, __vue_template__
7 | __webpack_require__(32)
8 | __vue_script__ = __webpack_require__(36)
9 | if (__vue_script__ &&
10 | __vue_script__.__esModule &&
11 | Object.keys(__vue_script__).length > 1) {
12 | console.warn("[vue-loader] source/common/404.vue: named exports in *.vue files are ignored.")}
13 | __vue_template__ = __webpack_require__(37)
14 | module.exports = __vue_script__ || {}
15 | if (module.exports.__esModule) module.exports = module.exports.default
16 | if (__vue_template__) {
17 | (typeof module.exports === "function" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__
18 | }
19 | if (false) {(function () { module.hot.accept()
20 | var hotAPI = require("vue-hot-reload-api")
21 | hotAPI.install(require("vue"), true)
22 | if (!hotAPI.compatible) return
23 | var id = "/Users/kodo/WebstormProjects/thinkJsProject/blog/source/common/404.vue"
24 | if (!module.hot.data) {
25 | hotAPI.createRecord(id, module.exports)
26 | } else {
27 | hotAPI.update(id, module.exports, __vue_template__)
28 | }
29 | })()}
30 |
31 | /***/ },
32 |
33 | /***/ 32:
34 | /***/ function(module, exports, __webpack_require__) {
35 |
36 | // style-loader: Adds some css to the DOM by adding a
312 | //
322 | /* generated by vue-loader */
323 |
324 | /***/ },
325 |
326 | /***/ 37:
327 | /***/ function(module, exports) {
328 |
329 | module.exports = "\n404啦啦啦
\n";
330 |
331 | /***/ }
332 |
333 | });
334 | //# sourceMappingURL=12.js.map
--------------------------------------------------------------------------------
/www/static/js/12.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./source/common/404.vue?85ea","webpack:///./source/common/404.vue?607f*","webpack:///./source/common/404.vue?906f*","webpack:///./~/vue-style-loader/addStyles.js?c2fc****","webpack:///404.vue?e325","webpack:///./source/common/404.vue?242b*"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAA+F;AAC/F;AACA,aAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC,I;;;;;;;ACvBD;;AAEA;AACA;AACA;AACA;AACA,iDAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;;ACpBA;AACA;;;AAGA;AACA,uCAAsC,6FAA6F;;AAEnI;;;;;;;;ACPA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAuD;AACvD;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;gBCzMA,GAJA;MADA;;iBAQA;;;;;;;;;;ACjBA,wC","file":"js/12.js","sourcesContent":["var __vue_script__, __vue_template__\nrequire(\"!!vue-style-loader!css-loader?sourceMap!./../../node_modules/vue-loader/lib/style-rewriter.js!./../../node_modules/vue-loader/lib/selector.js?type=style&index=0!./404.vue\")\n__vue_script__ = require(\"!!babel!./../../node_modules/vue-loader/lib/selector.js?type=script&index=0!./404.vue\")\nif (__vue_script__ &&\n __vue_script__.__esModule &&\n Object.keys(__vue_script__).length > 1) {\n console.warn(\"[vue-loader] source/common/404.vue: named exports in *.vue files are ignored.\")}\n__vue_template__ = require(\"!!vue-html-loader!./../../node_modules/vue-loader/lib/selector.js?type=template&index=0!./404.vue\")\nmodule.exports = __vue_script__ || {}\nif (module.exports.__esModule) module.exports = module.exports.default\nif (__vue_template__) {\n(typeof module.exports === \"function\" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__\n}\nif (module.hot) {(function () { module.hot.accept()\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), true)\n if (!hotAPI.compatible) return\n var id = \"/Users/kodo/WebstormProjects/thinkJsProject/blog/source/common/404.vue\"\n if (!module.hot.data) {\n hotAPI.createRecord(id, module.exports)\n } else {\n hotAPI.update(id, module.exports, __vue_template__)\n }\n})()}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./source/common/404.vue\n ** module id = 31\n ** module chunks = 1 12\n **/","// style-loader: Adds some css to the DOM by adding a \n\n\n\n/** WEBPACK FOOTER **\n ** 404.vue?7c8c4be6\n **/","module.exports = \"\\n404啦啦啦
\\n\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./source/common/404.vue\n ** module id = 37\n ** module chunks = 1 12\n **/"],"sourceRoot":""}
--------------------------------------------------------------------------------
/www/static/js/13.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([13],{
2 |
3 | /***/ 35:
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | /*
7 | MIT License http://www.opensource.org/licenses/mit-license.php
8 | Author Tobias Koppers @sokra
9 | */
10 | var stylesInDom = {},
11 | memoize = function(fn) {
12 | var memo;
13 | return function () {
14 | if (typeof memo === "undefined") memo = fn.apply(this, arguments);
15 | return memo;
16 | };
17 | },
18 | isOldIE = memoize(function() {
19 | return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
20 | }),
21 | getHeadElement = memoize(function () {
22 | return document.head || document.getElementsByTagName("head")[0];
23 | }),
24 | singletonElement = null,
25 | singletonCounter = 0,
26 | styleElementsInsertedAtTop = [];
27 |
28 | module.exports = function(list, options) {
29 | if(false) {
30 | if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
31 | }
32 |
33 | options = options || {};
34 | // Force single-tag solution on IE6-9, which has a hard limit on the # of
312 | //
322 | /* generated by vue-loader */
323 |
324 | /***/ },
325 |
326 | /***/ 61:
327 | /***/ function(module, exports) {
328 |
329 | module.exports = "\n我是profile页面
\n";
330 |
331 | /***/ }
332 |
333 | });
334 | //# sourceMappingURL=13.js.map
--------------------------------------------------------------------------------
/www/static/js/13.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./~/vue-style-loader/addStyles.js?c2fc*****","webpack:///./source/views/profile.vue?6657","webpack:///./source/views/profile.vue?18b6*","webpack:///./source/views/profile.vue?8f8d*","webpack:///profile.vue?b168","webpack:///./source/views/profile.vue?ebc5*"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAuD;AACvD;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAA+F;AAC/F;AACA,aAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC,I;;;;;;;ACvBD;;AAEA;AACA;AACA;AACA;AACA,iDAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;;ACpBA;AACA;;;AAGA;AACA,uCAAsC,iGAAiG;;AAEvI;;;;;;;;;;;;;;;;;;;;;;;gBCOA,GAJA;MADA;;iBAQA;;;;;;;;;;ACjBA,6C","file":"js/13.js","sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nvar stylesInDom = {},\n\tmemoize = function(fn) {\n\t\tvar memo;\n\t\treturn function () {\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\t\treturn memo;\n\t\t};\n\t},\n\tisOldIE = memoize(function() {\n\t\treturn /msie [6-9]\\b/.test(window.navigator.userAgent.toLowerCase());\n\t}),\n\tgetHeadElement = memoize(function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}),\n\tsingletonElement = null,\n\tsingletonCounter = 0,\n\tstyleElementsInsertedAtTop = [];\n\nmodule.exports = function(list, options) {\n\tif(typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif(typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of \n\n\n\n/** WEBPACK FOOTER **\n ** profile.vue?48ce726d\n **/","module.exports = \"\\n我是profile页面
\\n\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./source/views/profile.vue\n ** module id = 61\n ** module chunks = 4 13\n **/"],"sourceRoot":""}
--------------------------------------------------------------------------------
/www/static/js/14.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([14],{
2 |
3 | /***/ 31:
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | var __vue_script__, __vue_template__
7 | __webpack_require__(32)
8 | __vue_script__ = __webpack_require__(36)
9 | if (__vue_script__ &&
10 | __vue_script__.__esModule &&
11 | Object.keys(__vue_script__).length > 1) {
12 | console.warn("[vue-loader] source/common/404.vue: named exports in *.vue files are ignored.")}
13 | __vue_template__ = __webpack_require__(37)
14 | module.exports = __vue_script__ || {}
15 | if (module.exports.__esModule) module.exports = module.exports.default
16 | if (__vue_template__) {
17 | (typeof module.exports === "function" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__
18 | }
19 | if (false) {(function () { module.hot.accept()
20 | var hotAPI = require("vue-hot-reload-api")
21 | hotAPI.install(require("vue"), true)
22 | if (!hotAPI.compatible) return
23 | var id = "/Users/kodo/WebstormProjects/thinkJsProject/blog/source/common/404.vue"
24 | if (!module.hot.data) {
25 | hotAPI.createRecord(id, module.exports)
26 | } else {
27 | hotAPI.update(id, module.exports, __vue_template__)
28 | }
29 | })()}
30 |
31 | /***/ },
32 |
33 | /***/ 32:
34 | /***/ function(module, exports, __webpack_require__) {
35 |
36 | // style-loader: Adds some css to the DOM by adding a
312 | //
322 | /* generated by vue-loader */
323 |
324 | /***/ },
325 |
326 | /***/ 37:
327 | /***/ function(module, exports) {
328 |
329 | module.exports = "\n404啦啦啦
\n";
330 |
331 | /***/ }
332 |
333 | });
334 | //# sourceMappingURL=14.js.map
--------------------------------------------------------------------------------
/www/static/js/14.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./source/common/404.vue?85ea","webpack:///./source/common/404.vue?607f*","webpack:///./source/common/404.vue?906f*","webpack:///./~/vue-style-loader/addStyles.js?c2fc****","webpack:///404.vue?e325","webpack:///./source/common/404.vue?242b*"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAA+F;AAC/F;AACA,aAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC,I;;;;;;;ACvBD;;AAEA;AACA;AACA;AACA;AACA,iDAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;;ACpBA;AACA;;;AAGA;AACA,uCAAsC,6FAA6F;;AAEnI;;;;;;;;ACPA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAuD;AACvD;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;gBCzMA,GAJA;MADA;;iBAQA;;;;;;;;;;ACjBA,wC","file":"js/14.js","sourcesContent":["var __vue_script__, __vue_template__\nrequire(\"!!vue-style-loader!css-loader?sourceMap!./../../node_modules/vue-loader/lib/style-rewriter.js!./../../node_modules/vue-loader/lib/selector.js?type=style&index=0!./404.vue\")\n__vue_script__ = require(\"!!babel!./../../node_modules/vue-loader/lib/selector.js?type=script&index=0!./404.vue\")\nif (__vue_script__ &&\n __vue_script__.__esModule &&\n Object.keys(__vue_script__).length > 1) {\n console.warn(\"[vue-loader] source/common/404.vue: named exports in *.vue files are ignored.\")}\n__vue_template__ = require(\"!!vue-html-loader!./../../node_modules/vue-loader/lib/selector.js?type=template&index=0!./404.vue\")\nmodule.exports = __vue_script__ || {}\nif (module.exports.__esModule) module.exports = module.exports.default\nif (__vue_template__) {\n(typeof module.exports === \"function\" ? (module.exports.options || (module.exports.options = {})) : module.exports).template = __vue_template__\n}\nif (module.hot) {(function () { module.hot.accept()\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), true)\n if (!hotAPI.compatible) return\n var id = \"/Users/kodo/WebstormProjects/thinkJsProject/blog/source/common/404.vue\"\n if (!module.hot.data) {\n hotAPI.createRecord(id, module.exports)\n } else {\n hotAPI.update(id, module.exports, __vue_template__)\n }\n})()}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./source/common/404.vue\n ** module id = 31\n ** module chunks = 1 14\n **/","// style-loader: Adds some css to the DOM by adding a \n\n\n\n/** WEBPACK FOOTER **\n ** 404.vue?7c8c4be6\n **/","module.exports = \"\\n404啦啦啦
\\n\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./source/common/404.vue\n ** module id = 37\n ** module chunks = 1 14\n **/"],"sourceRoot":""}
--------------------------------------------------------------------------------
/www/static/js/15.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([15],{
2 |
3 | /***/ 35:
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | /*
7 | MIT License http://www.opensource.org/licenses/mit-license.php
8 | Author Tobias Koppers @sokra
9 | */
10 | var stylesInDom = {},
11 | memoize = function(fn) {
12 | var memo;
13 | return function () {
14 | if (typeof memo === "undefined") memo = fn.apply(this, arguments);
15 | return memo;
16 | };
17 | },
18 | isOldIE = memoize(function() {
19 | return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
20 | }),
21 | getHeadElement = memoize(function () {
22 | return document.head || document.getElementsByTagName("head")[0];
23 | }),
24 | singletonElement = null,
25 | singletonCounter = 0,
26 | styleElementsInsertedAtTop = [];
27 |
28 | module.exports = function(list, options) {
29 | if(false) {
30 | if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
31 | }
32 |
33 | options = options || {};
34 | // Force single-tag solution on IE6-9, which has a hard limit on the # of
312 | //
322 | /* generated by vue-loader */
323 |
324 | /***/ },
325 |
326 | /***/ 61:
327 | /***/ function(module, exports) {
328 |
329 | module.exports = "\n我是profile页面
\n";
330 |
331 | /***/ }
332 |
333 | });
334 | //# sourceMappingURL=15.js.map
--------------------------------------------------------------------------------
/www/static/js/15.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///./~/vue-style-loader/addStyles.js?c2fc*****","webpack:///./source/views/profile.vue?6657","webpack:///./source/views/profile.vue?18b6*","webpack:///./source/views/profile.vue?8f8d*","webpack:///profile.vue?b168","webpack:///./source/views/profile.vue?ebc5*"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,sBAAsB;AACtC;AACA;AACA,mBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,kBAAiB,2BAA2B;AAC5C;AACA;AACA,SAAQ,uBAAuB;AAC/B;AACA;AACA,IAAG;AACH;AACA,kBAAiB,uBAAuB;AACxC;AACA;AACA,4BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA,iCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAuD;AACvD;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAA+F;AAC/F;AACA,aAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC,I;;;;;;;ACvBD;;AAEA;AACA;AACA;AACA;AACA,iDAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;;ACpBA;AACA;;;AAGA;AACA,uCAAsC,iGAAiG;;AAEvI;;;;;;;;;;;;;;;;;;;;;;;gBCOA,GAJA;MADA;;iBAQA;;;;;;;;;;ACjBA,6C","file":"js/15.js","sourcesContent":["/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nvar stylesInDom = {},\n\tmemoize = function(fn) {\n\t\tvar memo;\n\t\treturn function () {\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\t\treturn memo;\n\t\t};\n\t},\n\tisOldIE = memoize(function() {\n\t\treturn /msie [6-9]\\b/.test(window.navigator.userAgent.toLowerCase());\n\t}),\n\tgetHeadElement = memoize(function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}),\n\tsingletonElement = null,\n\tsingletonCounter = 0,\n\tstyleElementsInsertedAtTop = [];\n\nmodule.exports = function(list, options) {\n\tif(typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif(typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of \n\n\n\n/** WEBPACK FOOTER **\n ** profile.vue?48ce726d\n **/","module.exports = \"\\n我是profile页面
\\n\";\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/vue-html-loader!./~/vue-loader/lib/selector.js?type=template&index=0!./source/views/profile.vue\n ** module id = 61\n ** module chunks = 4 15\n **/"],"sourceRoot":""}
--------------------------------------------------------------------------------
/www/testing.js:
--------------------------------------------------------------------------------
1 | var thinkjs = require('thinkjs');
2 | var path = require('path');
3 |
4 | var rootPath = path.dirname(__dirname);
5 |
6 | var instance = new thinkjs({
7 | APP_PATH: rootPath + path.sep + 'app',
8 | ROOT_PATH: rootPath,
9 | RESOURCE_PATH: __dirname,
10 | env: 'testing'
11 | });
12 |
13 | instance.run();
--------------------------------------------------------------------------------