浏览代码

Merge branch 'master' into release

xielin 5 年之前
父节点
当前提交
810fd5c031
共有 3 个文件被更改,包括 8 次插入13 次删除
  1. 2 11
      .rocketeer/config.php
  2. 4 1
      app/Console/Commands/Trace.php
  3. 2 1
      app/Transformers/MetaTransformer.php

+ 2 - 11
.rocketeer/config.php

@@ -36,24 +36,15 @@ return [
     // You can leave all of this empty or remove it entirely if you don't want
     // to track files with credentials : Rocketeer will prompt you for your credentials
     // and store them locally
+
     'connections'      => [
-        'beta'  => [
-            'host'      => '47.92.174.125:2345',
-            'username'  => 'root',
-            'password'  => '',
-            'key'       => '/root/.ssh/id_rsa',
-            'keyphrase' => '',
-            'agent'     => '',
-            'db_role'   => true,
-        ],
         'production' => [
-            'host'      => '47.92.121.231:2345',
+            'host'      => '47.92.131.85:2345',
             'username'  => 'root',
             'password'  => '',
             'key'       => '/root/.ssh/id_rsa',
             'keyphrase' => '',
             'agent'     => '',
-            'db_role'   => true,
         ],
     ],
 

+ 4 - 1
app/Console/Commands/Trace.php

@@ -90,13 +90,14 @@ class Trace extends Command
             $zip->add($this->save_dir, true);
             $zip->close();
             $md5 = md5_file($zipPath);
-            $this->line('------ZIP包MD5码:' . $md5 . ',地址:' . $zipPath);
+            $this->line('------ZIP包MD5码:' . $md5);
 
             $zipUrl = Storage::put('/trace/' . date('Ym'), file_get_contents($zipPath));
             $data = [
                 'md5' => $md5,
                 'zip' => $zipUrl
             ];
+            $this->line('zip地址:' . $zipUrl);
             $this->line('------开始上链:' . $md5);
             $row = $this->transcation($md5);
             $this->line('------上链结果:' . var_export($row, true));
@@ -147,6 +148,8 @@ class Trace extends Command
             $eos->setWalletInfo($walletName, $walletPassword);
             $aliceBalance = $api->getCurrencyBalance('eosio.token', $accountA, $coinCode);
             $bobBalance = $api->getCurrencyBalance('eosio.token', $accountB, $coinCode);
+            $this->line('balance-a:'.json_encode($aliceBalance,true));
+            $this->line('balance-b:'.json_encode($bobBalance,true));
             $balaceA = 0;
             $balaceB = 0;
             if (isset($aliceBalance[$accountA])) {

+ 2 - 1
app/Transformers/MetaTransformer.php

@@ -10,6 +10,7 @@ namespace App\Transformers;
 
 use App\Models\Category;
 use App\Models\Meta;
+use http\Env;
 use League\Fractal\TransformerAbstract;
 use Illuminate\Support\Carbon;
 use SimpleSoftwareIO\QrCode\Facades\QrCode;
@@ -38,7 +39,7 @@ class MetaTransformer extends TransformerAbstract
             "trans_id" => $meta['trans_id'],
             "block_height" => $meta['block_height'],
             "block_time" => $meta['block_time'],
-            "qrcode" => QrCode::size(200)->generate($meta['patch_num']),
+            "qrcode" => QrCode::size(200)->generate(getenv('TRACE_SERVICE_URL'.'/egg/').$meta['patch_num']),
             "created_at" => Carbon::parse($meta['created_at'])->toDateTimeString(),
             "updated_at" => Carbon::parse($meta['updated_at'])->toDateTimeString(),
         ];