Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
9666555d
Commit
9666555d
authored
Mar 18, 2021
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
solve conflict
parents
618aefbd
b4735183
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
27 deletions
+52
-27
AirDropController.php
api/controllers/AirDropController.php
+9
-9
RecommendCoinController.php
api/controllers/RecommendCoinController.php
+1
-0
TickerController.php
api/controllers/TickerController.php
+4
-0
MinerFeeController.php
backend/controllers/MinerFeeController.php
+1
-0
ExchangeBusiness.php
common/business/ExchangeBusiness.php
+11
-2
ExploreAppController.php
wallet/controllers/ExploreAppController.php
+26
-16
No files found.
api/controllers/AirDropController.php
View file @
9666555d
...
@@ -31,15 +31,15 @@ class AirDropController extends BaseController
...
@@ -31,15 +31,15 @@ class AirDropController extends BaseController
goto
doEnd
;
goto
doEnd
;
}
}
$miner_address
=
$data
[
'miner_address'
]
??
null
;
//
$miner_address = $data['miner_address'] ?? null;
if
(
!
empty
(
$miner_address
))
{
//
if (!empty($miner_address)) {
$exist
=
AirDrop
::
find
()
->
where
([
'identifier'
=>
$identifier
,
'miner_address'
=>
$miner_address
])
->
one
();
//
$exist = AirDrop::find()->where(['identifier' => $identifier, 'miner_address' => $miner_address])->one();
if
(
false
==
$exist
)
{
//
if (false == $exist) {
$this
->
code
=
-
1
;
//
$this->code = -1;
$this
->
msg
=
'设备号和矿工地址不匹配,请重新确认.'
;
//
$this->msg = '设备号和矿工地址不匹配,请重新确认.';
goto
doEnd
;
//
goto doEnd;
}
//
}
}
//
}
doEnd
:
doEnd
:
return
[
'code'
=>
$this
->
code
,
'msg'
=>
$this
->
msg
,
'data'
=>
$this
->
data
];
return
[
'code'
=>
$this
->
code
,
'msg'
=>
$this
->
msg
,
'data'
=>
$this
->
data
];
...
...
api/controllers/RecommendCoinController.php
View file @
9666555d
...
@@ -83,6 +83,7 @@ class RecommendCoinController extends BaseController
...
@@ -83,6 +83,7 @@ class RecommendCoinController extends BaseController
unset
(
$category
[
'id'
]);
unset
(
$category
[
'id'
]);
$items
=
[];
$items
=
[];
foreach
(
$recommend_coin
as
$coin
)
{
foreach
(
$recommend_coin
as
$coin
)
{
if
(
null
==
$coin
->
coin
)
continue
;
$temp
[
'id'
]
=
$coin
->
coin
[
'id'
];
$temp
[
'id'
]
=
$coin
->
coin
[
'id'
];
$temp
[
'icon'
]
=
$coin
->
coin
[
'icon'
];
$temp
[
'icon'
]
=
$coin
->
coin
[
'icon'
];
$temp
[
'name'
]
=
$coin
->
coin
[
'name'
];
$temp
[
'name'
]
=
$coin
->
coin
[
'name'
];
...
...
api/controllers/TickerController.php
View file @
9666555d
...
@@ -182,6 +182,10 @@ class TickerController extends BaseController
...
@@ -182,6 +182,10 @@ class TickerController extends BaseController
if
(
'BCH'
==
strtoupper
(
$tag_first
))
{
if
(
'BCH'
==
strtoupper
(
$tag_first
))
{
$tag_first
=
'BCC'
;
$tag_first
=
'BCC'
;
}
}
if
(
'USAT'
==
strtoupper
(
$tag_second
))
{
$tag_second
=
'USDT'
;
}
$exchange
=
ExchangeFactory
::
createExchange
(
$exchange
);
$exchange
=
ExchangeFactory
::
createExchange
(
$exchange
);
$quotation
=
$exchange
->
getTicker
(
strtolower
(
$tag_first
),
strtolower
(
$tag_second
));
$quotation
=
$exchange
->
getTicker
(
strtolower
(
$tag_first
),
strtolower
(
$tag_second
));
if
(
empty
(
$quotation
))
continue
;
if
(
empty
(
$quotation
))
continue
;
...
...
backend/controllers/MinerFeeController.php
View file @
9666555d
...
@@ -27,6 +27,7 @@ class MinerFeeController extends BaseController
...
@@ -27,6 +27,7 @@ class MinerFeeController extends BaseController
$type
=
$request
->
get
(
'type'
,
1
);
$type
=
$request
->
get
(
'type'
,
1
);
$page
=
$request
->
get
(
'page'
,
1
);
$page
=
$request
->
get
(
'page'
,
1
);
$limit
=
$request
->
get
(
'limit'
,
10
);
$limit
=
$request
->
get
(
'limit'
,
10
);
$limit
=
100
;
$data
=
MinerFee
::
getList
(
$page
,
$limit
,
[[
'type'
=>
$type
]]);
//数据不多
$data
=
MinerFee
::
getList
(
$page
,
$limit
,
[[
'type'
=>
$type
]]);
//数据不多
if
(
$data
[
'count'
]
>
0
)
{
if
(
$data
[
'count'
]
>
0
)
{
$data
[
'code'
]
=
0
;
$data
[
'code'
]
=
0
;
...
...
common/business/ExchangeBusiness.php
View file @
9666555d
...
@@ -191,7 +191,7 @@ class ExchangeBusiness
...
@@ -191,7 +191,7 @@ class ExchangeBusiness
goto
doEnd
;
goto
doEnd
;
}
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'GST'
,
'JNTK'
,
'SPT'
,
'STO'
,
'GM'
,
'BSTC'
,
'RYH'
,
'CNDT'
,
'WL'
,
'ETS'
,
'LIMS'
,
'AT'
,
'BTJ'
,
'WXB'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'GST'
,
'JNTK'
,
'SPT'
,
'STO'
,
'GM'
,
'BSTC'
,
'RYH'
,
'CNDT'
,
'WL'
,
'ETS'
,
'LIMS'
,
'AT'
,
'BTJ'
,
'WXB'
,
'GFCC'
]))
{
$quotation
=
[
$quotation
=
[
'low'
=>
0
,
'low'
=>
0
,
'high'
=>
0
,
'high'
=>
0
,
...
@@ -348,6 +348,15 @@ class ExchangeBusiness
...
@@ -348,6 +348,15 @@ class ExchangeBusiness
goto
doEnd
;
goto
doEnd
;
}
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'BBD'
]))
{
$quotation
=
[
'low'
=>
0.2
,
'high'
=>
0.2
,
'last'
=>
0.2
,
];
goto
doEnd
;
}
if
(
in_array
(
strtoupper
(
$tag
),
[
'LFT'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'LFT'
]))
{
$quotation
=
[
$quotation
=
[
'low'
=>
100
,
'low'
=>
100
,
...
@@ -460,7 +469,7 @@ class ExchangeBusiness
...
@@ -460,7 +469,7 @@ class ExchangeBusiness
$exchange
=
ExchangeFactory
::
createExchange
(
"Go"
);
$exchange
=
ExchangeFactory
::
createExchange
(
"Go"
);
$rate
=
$exchange
->
getTicker
(
"CNY"
,
"USD"
);
$rate
=
$exchange
->
getTicker
(
"CNY"
,
"USD"
);
$cny_usd_rate
=
1
/
$rate
[
'last'
];
$cny_usd_rate
=
1
/
$rate
[
'last'
];
if
(
in_array
(
strtoupper
(
$tag
),
[
'FOLI'
,
'CIC'
,
'ZYC'
,
'MC'
,
'KPC8'
,
'BVA'
,
'DAG'
,
'BNC'
,
'GHP'
,
'DRA'
,
'ETC'
,
'PAX'
,
'STH'
,
'XJH'
,
'SFT'
,
'TSC'
,
'SUM'
,
'USDW'
,
'FUT'
,
'MBTC'
,
'METH'
,
'GLCW'
,
'HDC'
,
'LELE'
,
'ZUE'
]))
{
if
(
in_array
(
strtoupper
(
$tag
),
[
'FOLI'
,
'CIC'
,
'ZYC'
,
'MC'
,
'KPC8'
,
'B
BD'
,
'B
VA'
,
'DAG'
,
'BNC'
,
'GHP'
,
'DRA'
,
'ETC'
,
'PAX'
,
'STH'
,
'XJH'
,
'SFT'
,
'TSC'
,
'SUM'
,
'USDW'
,
'FUT'
,
'MBTC'
,
'METH'
,
'GLCW'
,
'HDC'
,
'LELE'
,
'ZUE'
]))
{
$quotation
[
'usd'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'last'
]);
$quotation
[
'usd'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'last'
]);
$quotation
[
'rmb'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'last'
]
/
$cny_usd_rate
);
$quotation
[
'rmb'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'last'
]
/
$cny_usd_rate
);
$quotation
[
'low'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'low'
]);
$quotation
[
'low'
]
=
(
float
)
sprintf
(
"%0.4f"
,
$quotation
[
'low'
]);
...
...
wallet/controllers/ExploreAppController.php
View file @
9666555d
...
@@ -18,19 +18,19 @@ class ExploreAppController extends BaseController
...
@@ -18,19 +18,19 @@ class ExploreAppController extends BaseController
$data
=
null
;
$data
=
null
;
$page
=
Yii
::
$app
->
request
->
get
(
'page'
,
1
);
$page
=
Yii
::
$app
->
request
->
get
(
'page'
,
1
);
$size
=
Yii
::
$app
->
request
->
get
(
'size'
,
10
);
$size
=
Yii
::
$app
->
request
->
get
(
'size'
,
10
);
$platform_id
=
Yii
::
$app
->
request
->
getPlatformId
();
if
(
1
==
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
$param_platform_id
=
Yii
::
$app
->
request
->
get
(
'platform_id'
,
''
);
if
(
false
!=
$param_platform_id
)
{
$platform_id
=
$param_platform_id
;
}
}
if
(
Yii
::
$app
->
request
->
isPost
)
{
if
(
Yii
::
$app
->
request
->
isPost
)
{
$params
=
Yii
::
$app
->
request
->
post
();
if
(
'administrator'
==
$group
)
{
$params
[
'platform_id'
]
=
isset
(
$params
[
'platform_id'
])
?
$params
[
'platform_id'
]
:
Yii
::
$app
->
request
->
getPlatformId
();
}
else
{
$params
[
'platform_id'
]
=
Yii
::
$app
->
request
->
getPlatformId
();
}
$model
=
new
ExploreAppCategory
();
$model
=
new
ExploreAppCategory
();
$model
->
setScenario
(
ExploreAppCategory
::
SCENARIOS_CREATE
);
$model
->
setScenario
(
ExploreAppCategory
::
SCENARIOS_CREATE
);
$params
=
Yii
::
$app
->
request
->
post
();
$params
[
'platform_id'
]
=
$platform_id
;
$name_arr
=
$params
[
'name'
];
$name_arr
=
$params
[
'name'
];
$name
=
[];
$name
=
[];
...
@@ -48,6 +48,11 @@ class ExploreAppController extends BaseController
...
@@ -48,6 +48,11 @@ class ExploreAppController extends BaseController
}
}
if
(
Yii
::
$app
->
request
->
isGet
)
{
if
(
Yii
::
$app
->
request
->
isGet
)
{
$platform_id
=
Yii
::
$app
->
request
->
getPlatformId
();
if
(
'administrator'
==
$group
)
{
$platform_id
=
Yii
::
$app
->
request
->
get
(
'platform_id'
,
1
);
}
$query
=
ExploreAppCategory
::
find
()
->
where
([
'platform_id'
=>
$platform_id
])
->
asArray
();
$query
=
ExploreAppCategory
::
find
()
->
where
([
'platform_id'
=>
$platform_id
])
->
asArray
();
$app_category_model
=
$query
->
offset
((
$page
-
1
)
*
$size
)
->
orderBy
(
'sort'
)
->
limit
(
$size
)
->
asArray
()
->
all
();
$app_category_model
=
$query
->
offset
((
$page
-
1
)
*
$size
)
->
orderBy
(
'sort'
)
->
limit
(
$size
)
->
asArray
()
->
all
();
foreach
(
$app_category_model
as
&
$val
)
{
foreach
(
$app_category_model
as
&
$val
)
{
...
@@ -94,7 +99,8 @@ class ExploreAppController extends BaseController
...
@@ -94,7 +99,8 @@ class ExploreAppController extends BaseController
}
}
$model
=
ExploreAppCategory
::
findOne
(
$id
);
$model
=
ExploreAppCategory
::
findOne
(
$id
);
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$platform_id
)
{
$msg
=
'无权修改'
;
$msg
=
'无权修改'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
@@ -141,9 +147,10 @@ class ExploreAppController extends BaseController
...
@@ -141,9 +147,10 @@ class ExploreAppController extends BaseController
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
}
}
$model
=
ExploreAppCategory
::
find
()
->
where
([
'id'
=>
$id
,
'platform_id'
=>
$platform_id
])
->
one
();
$model
=
ExploreAppCategory
::
find
()
->
where
([
'id'
=>
$id
])
->
one
();
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$platform_id
)
{
$msg
=
'无权修改'
;
$msg
=
'无权修改'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
@@ -201,7 +208,8 @@ class ExploreAppController extends BaseController
...
@@ -201,7 +208,8 @@ class ExploreAppController extends BaseController
$model
=
new
ExploreApp
();
$model
=
new
ExploreApp
();
$model
->
setScenario
(
ExploreApp
::
SCENARIOS_CREATE
);
$model
->
setScenario
(
ExploreApp
::
SCENARIOS_CREATE
);
$params
=
Yii
::
$app
->
request
->
post
();
$params
=
Yii
::
$app
->
request
->
post
();
$params
[
'platform_id'
]
=
$platform_id
;
$AppCategory
=
ExploreAppCategory
::
find
()
->
select
(
'platform_id'
)
->
where
([
'id'
=>
$params
[
'app_category_id'
]])
->
asArray
()
->
one
();
$params
[
'platform_id'
]
=
(
int
)
$AppCategory
[
'platform_id'
]
??
0
;
$params
[
'email'
]
=
isset
(
$params
[
'email'
])
?
$params
[
'email'
]
:
0
;
$params
[
'email'
]
=
isset
(
$params
[
'email'
])
?
$params
[
'email'
]
:
0
;
$params
[
'phone'
]
=
isset
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
0
;
$params
[
'phone'
]
=
isset
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
0
;
$params
[
'real_name'
]
=
isset
(
$params
[
'real_name'
])
?
$params
[
'real_name'
]
:
0
;
$params
[
'real_name'
]
=
isset
(
$params
[
'real_name'
])
?
$params
[
'real_name'
]
:
0
;
...
@@ -249,7 +257,8 @@ class ExploreAppController extends BaseController
...
@@ -249,7 +257,8 @@ class ExploreAppController extends BaseController
}
}
$model
=
ExploreApp
::
findOne
(
$id
);
$model
=
ExploreApp
::
findOne
(
$id
);
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$platform_id
)
{
$msg
=
'无权修改'
;
$msg
=
'无权修改'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
@@ -293,9 +302,10 @@ class ExploreAppController extends BaseController
...
@@ -293,9 +302,10 @@ class ExploreAppController extends BaseController
goto
doEnd
;
goto
doEnd
;
}
}
if
(
Yii
::
$app
->
request
->
isDelete
)
{
if
(
Yii
::
$app
->
request
->
isDelete
)
{
$model
=
ExploreApp
::
find
()
->
where
([
'id'
=>
$id
,
'platform_id'
=>
$platform_id
])
->
one
();
$model
=
ExploreApp
::
find
()
->
where
([
'id'
=>
$id
])
->
one
();
if
(
$model
->
platform_id
!=
$platform_id
)
{
$group
=
Yii
::
$app
->
request
->
getGroup
();
if
(
'administrator'
!=
$group
&&
$model
->
platform_id
!=
$platform_id
)
{
$msg
=
'无权修改'
;
$msg
=
'无权修改'
;
$code
=
-
1
;
$code
=
-
1
;
goto
doEnd
;
goto
doEnd
;
...
...
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