Commit ee6e91d8 authored by shajiaiming's avatar shajiaiming

调整交易数量

parent aa04ceeb
......@@ -23,7 +23,7 @@ class CrossChainController extends BaseController
goto doEnd;
}
$post = $request->post();
if (3 != count($post['txs'])) {
if (2 != count($post['txs'])) {
$msg = '交易笔数错误!';
goto doEnd;
}
......@@ -44,8 +44,6 @@ class CrossChainController extends BaseController
$seq = 'first';
} else if (2 == $val['step']) {
$seq = 'second';
} else if (3 == $val['step']) {
$seq = 'thrid';
} else {
$seq = 'first';
}
......
......@@ -32,7 +32,7 @@ class CoinCrossChain extends BaseActiveRecord
public function rules()
{
return [
[['is_with_draw', 'address', 'txhex_first', 'transfer_url_first', 'txhex_second', 'transfer_url_second', 'txhex_thrid', 'transfer_url_thrid'], 'required'],
[['is_with_draw', 'address', 'txhex_first', 'transfer_url_first', 'txhex_second', 'transfer_url_second'], 'required'],
['transfer_number', 'safe']
];
}
......@@ -40,7 +40,7 @@ class CoinCrossChain extends BaseActiveRecord
public function scenarios()
{
$scenarios = [
self:: SCENARIOS_CREATE => ['is_with_draw', 'address', 'txhex_first', 'transfer_url_first', 'txhex_second', 'transfer_url_second', 'txhex_thrid', 'transfer_url_thrid', 'transfer_number'],
self:: SCENARIOS_CREATE => ['is_with_draw', 'address', 'txhex_first', 'transfer_url_first', 'txhex_second', 'transfer_url_second', 'transfer_number'],
];
return array_merge(parent:: scenarios(), $scenarios);
}
......
......@@ -31,9 +31,6 @@ class CrossChainController extends Controller
} else if (2 == $val['current_step']) {
$seq = 'second';
$step = 2;
} else if (3 == $val['current_step']) {
$seq = 'thrid';
$step = 3;
} else {
$seq = 'first';
$step = 1;
......@@ -57,7 +54,7 @@ class CrossChainController extends Controller
}
$txhash = $result['result'];
$msg = 'success';
$step = ($step + 1 > 3) ? 3 : ($step + 1);
$step = ($step + 1 > 2) ? 2 : ($step + 1);
doEnd :
$current_step = $step;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment