Skip to content

Commit

Permalink
add(code-setting-config)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangfan2016 committed Apr 23, 2019
1 parent c20ab83 commit 63760cd
Show file tree
Hide file tree
Showing 16 changed files with 996 additions and 973 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8 # 编码格式
end_of_line = lf # 换行符
indent_size = 2 # 缩进大小
indent_style = space # 缩进风格
insert_final_newline = true # 是否使文件以一个空白行结尾
max_line_length = 80 # 单行最大字符数
trim_trailing_whitespace = true # 是否将行尾空格自动删除

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[COMMIT_EDITMSG]
max_line_length = 0
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Auto detect text files and perform LF normalization
* text=auto

# JS files must always use LF for tools to work
*.js eol=lf

*.ts eol=lf
*.tsx eol=lf
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import {LocaleProvider} from 'antd';
import { LocaleProvider } from 'antd';
import zhCN from 'antd/lib/locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
Expand Down
40 changes: 20 additions & 20 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,50 @@ const BASE_URL = "/api/movie";
const API_KEY = "0b2bdeda43b5688921839c8ecb20399b";

let instance = axios.create({
baseURL: BASE_URL,
timeout: 3e4,
params: {
"apikey": API_KEY,
}
baseURL: BASE_URL,
timeout: 3e4,
params: {
"apikey": API_KEY,
}
});

// 热映
export function getHotShowing(params?: any) {
return instance.get("/in_theaters", {
params
});
return instance.get("/in_theaters", {
params
});
}

// top250
export function getTop250(params?:any) {
return instance.get("/top250",{
params,
});
export function getTop250(params?: any) {
return instance.get("/top250", {
params,
});
}

// 新片
export function getNew() {
return instance.get("/new_movies");
return instance.get("/new_movies");
}

// 电影详情
export function getDetail(id: string) {
return instance.get(`/subject/${id}`);
return instance.get(`/subject/${id}`);
}

// 北美票房榜
export function getGoodbox() {
return instance.get("/us_box");
return instance.get("/us_box");
}

// 搜索条目
export function getContentBySearch(str: string, params?: any) {
return instance.get(`/search?q=${str}`, {
params
});
return instance.get(`/search?q=${str}`, {
params
});
}

// 口碑榜
export function getWeeklyMovie() {
return instance.get("/weekly");
}
return instance.get("/weekly");
}
2 changes: 1 addition & 1 deletion src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {};
export { };
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {};
export { };
3 changes: 0 additions & 3 deletions src/css/Detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@
overflow-y: auto;
}

.box-list .list {
}

.box-list .list .list-item {
cursor: pointer;
}
Expand Down
6 changes: 3 additions & 3 deletions src/css/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
border-radius: 20px;
background-color: rgba(255,255,255,.2);
box-shadow: 0 4px 18px rgba(17,18,38,.07);
border: 1px solid transparent;
border: 1px solid transparent;
overflow: hidden;
}
.header .head-bar--fixed .search-box{
Expand Down Expand Up @@ -284,7 +284,7 @@
margin: 0;
}

.loading-img-box,
.loading-img-box,
.movie-card img {
width: 100%;
height: 300px;
Expand Down Expand Up @@ -387,4 +387,4 @@

.footer-block a:hover{
color: var(--themeHoverColor);
}
}
14 changes: 7 additions & 7 deletions src/pages/Box.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";

class Box extends React.Component{
render() {
return (
<div>Box page</div>
);
}
class Box extends React.Component {
render() {
return (
<div>Box page</div>
);
}
}

export default Box;
export default Box;
Loading

0 comments on commit 63760cd

Please sign in to comment.