Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
stock_new
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
stock_new
Commits
43ac9dc6
Commit
43ac9dc6
authored
Jun 18, 2024
by
wuxiaoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取腾讯证券网行情信息
parent
68c5ae79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
application/function.php
application/function.php
+1
-1
application/market/home/Index.php
application/market/home/Index.php
+2
-2
No files found.
application/function.php
View file @
43ac9dc6
...
@@ -1224,7 +1224,7 @@ if (!function_exists('getEndDay')) {
...
@@ -1224,7 +1224,7 @@ if (!function_exists('getEndDay')) {
$time
=
date
(
'H:i:s'
,
time
());
$time
=
date
(
'H:i:s'
,
time
());
}
}
return
array
(
'code'
=>
$res
[
2
],
'name'
=>
$res
[
1
],
'yesterday_price'
=>
$res
[
4
],
'open_price'
=>
$res
[
5
],
'national_debt'
=>
'0.00'
,
'current_price'
=>
$res
[
3
],
'buy_one_price'
=>
$res
[
9
],
'buy_two_price'
=>
$res
[
11
],
'buy_three_price'
=>
$res
[
13
],
'buy_one_amount'
=>
$res
[
10
],
'buy_two_amount'
=>
$res
[
12
],
'buy_three_amount'
=>
$res
[
14
],
'sell_one_price'
=>
$res
[
19
],
'sell_two_price'
=>
$res
[
21
],
'sell_three_price'
=>
$res
[
23
],
'sell_one_amount'
=>
$res
[
20
],
'sell_two_amount'
=>
$res
[
22
],
'sell_three_amount'
=>
$res
[
24
],
'buy_four_price'
=>
$res
[
15
],
'buy_five_price'
=>
$res
[
17
],
'buy_four_amount'
=>
$res
[
16
],
'buy_five_amount'
=>
$res
[
18
],
'sell_four_price'
=>
$res
[
25
],
'sell_five_price'
=>
$res
[
27
],
'sell_four_amount'
=>
$res
[
26
],
'sell_five_amount'
=>
$res
[
28
],
'exchange_code'
=>
$res
[
40
],
'mini_trans'
=>
100
,
'buy_chang_price'
=>
'0.01'
,
'sell_chang_price'
=>
'0.01'
,
'type'
=>
1
,
'currency'
=>
0
,
'debt_sign'
=>
255
,
'info'
=>
''
,
'highest'
=>
$res
[
41
],
'lowest'
=>
$res
[
42
],
'volume'
=>
$res
[
36
],
'turnover'
=>
$res
[
37
],
'time'
=>
$time
,
'turnover_rate'
=>
$res
[
38
],
'pe_ratio'
=>
$res
[
39
],
'circulation_market_value'
=>
$res
[
44
],
'total_market_value'
=>
$res
[
45
],
'pb_ratio'
=>
$res
[
46
]);
return
array
(
'code'
=>
$res
[
2
],
'name'
=>
$res
[
1
],
'yesterday_price'
=>
$res
[
4
],
'open_price'
=>
$res
[
5
],
'national_debt'
=>
'0.00'
,
'current_price'
=>
$res
[
3
],
'buy_one_price'
=>
$res
[
9
],
'buy_two_price'
=>
$res
[
11
],
'buy_three_price'
=>
$res
[
13
],
'buy_one_amount'
=>
$res
[
10
],
'buy_two_amount'
=>
$res
[
12
],
'buy_three_amount'
=>
$res
[
14
],
'sell_one_price'
=>
$res
[
19
],
'sell_two_price'
=>
$res
[
21
],
'sell_three_price'
=>
$res
[
23
],
'sell_one_amount'
=>
$res
[
20
],
'sell_two_amount'
=>
$res
[
22
],
'sell_three_amount'
=>
$res
[
24
],
'buy_four_price'
=>
$res
[
15
],
'buy_five_price'
=>
$res
[
17
],
'buy_four_amount'
=>
$res
[
16
],
'buy_five_amount'
=>
$res
[
18
],
'sell_four_price'
=>
$res
[
25
],
'sell_five_price'
=>
$res
[
27
],
'sell_four_amount'
=>
$res
[
26
],
'sell_five_amount'
=>
$res
[
28
],
'mini_trans'
=>
100
,
'buy_chang_price'
=>
'0.01'
,
'sell_chang_price'
=>
'0.01'
,
'type'
=>
1
,
'currency'
=>
0
,
'debt_sign'
=>
255
,
'info'
=>
''
,
'last_date_time'
=>
$res
[
30
],
'price_range'
=>
$res
[
31
],
'price_rate'
=>
$res
[
32
],
'highest'
=>
$res
[
33
],
'lowest'
=>
$res
[
34
],
'volume'
=>
$res
[
36
],
'turnover'
=>
$res
[
37
],
'time'
=>
$time
,
'pe_ratio'
=>
$res
[
39
],
'exchange_code'
=>
$res
[
40
],
'amplitude'
=>
$res
[
43
],
'circulation_market_value'
=>
$res
[
44
],
'total_market_value'
=>
$res
[
45
],
'pb_ratio'
=>
$res
[
58
],
'turnover_rate'
=>
$res
[
59
]);
}
}
}
}
...
...
application/market/home/Index.php
View file @
43ac9dc6
...
@@ -91,9 +91,9 @@ class Index extends Common
...
@@ -91,9 +91,9 @@ class Index extends Common
if
(
!
$data
)
{
if
(
!
$data
)
{
return
json
([
'data'
=>
$data
,
'status'
=>
0
,
'message'
=>
'操作失败'
]);
return
json
([
'data'
=>
$data
,
'status'
=>
0
,
'message'
=>
'操作失败'
]);
}
}
$p_range
=
$data
[
'currency'
]
-
$data
[
'yesterday_price'
];
/*
$p_range = $data['currency'] - $data['yesterday_price'];
$data['price_range'] = round($p_range,2);
$data['price_range'] = round($p_range,2);
$data
[
'price_rate'
]
=
round
((
$p_range
/
$data
[
'yesterday_price'
]
*
100
),
2
);
$data['price_rate'] = round(($p_range/$data['yesterday_price']*100),2);
*/
$self
=
new
StockSubAccountSelf
();
$self
=
new
StockSubAccountSelf
();
$ret
=
$self
->
myadd
(
$uid
,
$market
,
$code
);
//查找是否存在
$ret
=
$self
->
myadd
(
$uid
,
$market
,
$code
);
//查找是否存在
if
(
$ret
)
{
if
(
$ret
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment