1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| // 主页接口
| import request from "./request";
| import { METHODS } from '@/config'
| import { API_PREFIX } from '@/config'
|
| // 获取币种
| export const _getCoins = (params) => {
| return request({
| url: `${API_PREFIX}/item!list.action`,
| method: "GET",
| params
| // isLoading: true
| })
| };
|
| // 获取行情
| export const _getHomeList = (symbol = 'btc') => {
| return request({
| url: `${API_PREFIX}/hobi!getRealtime.action`,
| method: "GET",
| params: {
| symbol
| }
| // isLoading: true
| })
| };
|
|
|
| // 查询是否加入自选
| export const _checkIsInCollect = symbol => {
| return request({
| url: `${API_PREFIX}/itemUserOptional!getItemOptionalStatus.action`,
| method: 'GET',
| params: {
| symbol
| }
| })
| }
|
| // 自选
| export const _collect = (symbol) => {
| return request({
| url: `${API_PREFIX}/itemUserOptional!add.action`,
| method: 'GET',
| loading: true,
| params: {
| symbol
| }
| })
| }
|
| // 删除自选
| export const _deleteCollect = symbol => {
| return request({
| url: `${API_PREFIX}/itemUserOptional!delete.action`,
| method: 'GET',
| loading: true,
| params: {
| symbol
| }
| })
| }
|
| // 我的自选
| export const _myCoins = () => {
| return request({
| url: `${API_PREFIX}/itemUserOptional!list.action`,
| method: 'GET'
| })
| }
|
|