Skip to content
This repository was archived by the owner on Mar 13, 2020. It is now read-only.

Commit 7f7f398

Browse files
author
eteplus
committed
目录重构-2
1 parent bb6767b commit 7f7f398

File tree

13 files changed

+85
-43
lines changed

13 files changed

+85
-43
lines changed

.editorconfig

-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,3 @@ trim_trailing_whitespace = true
99
[*.{js, json}]
1010
indent_style = space
1111
indent_size = 2
12-
13-
[*.php]
14-
indent_style = tab
15-
indent_size = 4

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
src/assets/js/
22
build/*.js
33
config/*.js
4+
static/**/*.js

CHANGELOG.md

+22-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
## 更新记录
22
-------
3+
#### v0.1.5 ( 2016-7-30 ) ####
4+
- 目录重构
5+
- 修改README.md
6+
- 添加线上访问地址[vue-sui-demo](https://eteplus.github.io/vue-sui-demo)
7+
-
8+
9+
------
10+
11+
#### v0.1.4 ( 2016-7-11 ) ####
12+
- 修改README.md
13+
- 升级node版本 - v5.12.0 (推荐使用cnpm)
14+
- .gitignore 添加 .idea
15+
- 修复BrowserSync代理端口问题
16+
17+
------
18+
19+
#### v0.1.3 ( 2016-3-28 ) ####
20+
- 修改静态资源目录
21+
- 修改vue-resource的root设置
22+
- 修复代码发布后, 无法运行服务的问题
23+
24+
------
325

426
#### v0.1.2 ( 2016-3-22 ) ####
527
- 更新依赖文件
@@ -15,18 +37,3 @@
1537
- 按需加载组件
1638

1739
-------
18-
19-
#### v0.1.3 ( 2016-3-28 ) ####
20-
- 修改静态资源目录
21-
- 修改vue-resource的root设置
22-
- 修复代码发布后, 无法运行服务的问题
23-
24-
------
25-
26-
#### v0.1.4 ( 2016-7-11 ) ####
27-
- 修改README.md
28-
- 升级node版本 - v5.12.0 (推荐使用cnpm)
29-
- .gitignore 添加 .idea
30-
- 修复BrowserSync代理端口问题
31-
32-
------

README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ npm run dev
5959
# 发布代码
6060
npm run build
6161

62-
# 发布后启动服务
63-
npm run main
64-
6562
```
6663

6764
### 开发
@@ -76,7 +73,6 @@ npm run main
7673
│ ├── webpack-dev-conf.js // 开发的Webpack 配置文件
7774
│ ├── webpack-prod-conf.js // 生产的Webpack 配置文件
7875
│ ├── webpack-base-conf.js // 基本的Webpack 配置文件
79-
├── index.js // 项目发布后的启动文件
8076
├── package.json // 项目配置文件
8177
├── src // 生产目录
8278
│ ├── assets // css js 和图片资源
@@ -87,8 +83,8 @@ npm run main
8783
│ ├── filters.js // 各种过滤器
8884
│ ├── router.js // 路由配置
8985
│ └── main.vue // 根组件
90-
│ └── app.js // Webpack 预编译入口
91-
│ └── index.html // 项目入口文件
86+
│ └── app.js // Webpack 预编译入口
87+
── index.html // 项目入口文件
9288
.
9389
</pre>
9490

config/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
assetsRoot: path.resolve(__dirname, '../dist'),
99
assetsSubDirectory: 'static',
1010
assetsPublicPath: '/',
11-
productionSourceMap: true,
11+
productionSourceMap: false,
1212
// Gzip off by default as many popular static hosts such as
1313
// Surge or Netlify already gzip all static assets for you.
1414
// Before setting to `true`, make sure to:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue-sui-demo",
33
"description": "vue combine with sui-mobile",
44
"author": "eteplus <[email protected]>",
5-
"version": "0.1.4",
5+
"version": "0.1.5",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/eteplus/vue-sui-demo.git"

src/app.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import infiniteScroll from './directives/infiniteScroll'
77
import * as filters from './filters'
88
import app from './main'
99

10+
1011
// Router
1112
Vue.use(VueRouter)
1213

@@ -22,7 +23,7 @@ routerConfig(router)
2223
// Resource
2324
Vue.use(VueResource)
2425

25-
Vue.http.options.root = '/data/'
26+
Vue.http.options.root = process.env.NODE_ENV === 'development' ? 'src/assets/data' : '/static/data'
2627
Vue.http.options.emulateJSON = true
2728

2829
// Directive

src/assets/data/banner.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"code": 200,
3+
"message": "获取成功",
4+
"data": [
5+
{
6+
"content": "/static/img/1.jpg"
7+
},
8+
{
9+
"content": "/static/img/1.jpg"
10+
},
11+
{
12+
"content": "/static/img/1.jpg"
13+
}
14+
]
15+
}
File renamed without changes.

src/data/banner.json

-15
This file was deleted.

static/data/banner.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"code": 200,
3+
"message": "获取成功",
4+
"data": [
5+
{
6+
"content": "/static/img/1.jpg"
7+
},
8+
{
9+
"content": "/static/img/1.jpg"
10+
},
11+
{
12+
"content": "/static/img/1.jpg"
13+
}
14+
]
15+
}

static/data/tasks.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"code": 200,
3+
"message": "获取成功",
4+
"data": [
5+
{
6+
"tid": "1",
7+
"title": "哈哈哈?你傻逼吗?",
8+
"thumbnail": "adv.jpg",
9+
"advertiser": "abc1",
10+
"read_profit": "8",
11+
"type": "0",
12+
"status": "1",
13+
"created": "1452139945"
14+
},
15+
{
16+
"tid": "2",
17+
"title": "看看你到底有多污?",
18+
"thumbnail": "adv.jpg",
19+
"advertiser": "abc2",
20+
"status": "0",
21+
"type": "1",
22+
"read_profit": "5",
23+
"created": "1452094126"
24+
}
25+
]
26+
}

static/img/1.jpg

217 KB
Loading

0 commit comments

Comments
 (0)