Przeglądaj źródła

语言包扩展完成

BF-202210271038\Administrator 3 lat temu
rodzic
commit
5882ba5467

+ 5 - 5
app/Exceptions/Handler.php

@@ -50,35 +50,35 @@ class Handler extends ExceptionHandler
         if (!env('APP_DEBUG')) {
             if ($exception instanceof FrequencyException) {
                 $result = [
-                    "msg" => $exception->getMessage(),
+                    "msg" => __($exception->getMessage()),
                     "data" => [],
                     "code" => $exception->getCode()
                 ];
                 return response()->json($result);
             }elseif ($exception instanceof EndException){
                 $result = [
-                    "msg" => $exception->getMessage(),
+                    "msg" => __($exception->getMessage()),
                     "data" => [],
                     "code" => $exception->getCode()
                 ];
                 return response()->json($result);
             }elseif ($exception instanceof MemberAuthException){
                 $result = [
-                    "msg" => '登陆失效',
+                    "msg" => __('auth.no_login'),
                     "data" => [],
                     "code" => 401
                 ];
                 return response()->json($result);
             }elseif ($exception instanceof ShopAuthException){
                 $result = [
-                    "msg" => '登陆失效',
+                    "msg" =>__('auth.no_login'),
                     "data" => [],
                     "code" => 401
                 ];
                 return response()->json($result);
             }  else {
                 $result = [
-                    "msg" => '系统错误',
+                    "msg" => __('sys.error'),
                     "data" => [],
                     "code" => 0
                 ];

+ 71 - 45
app/Http/Controllers/Api/ContractController.php

@@ -6,6 +6,7 @@ namespace App\Http\Controllers\Api;
 
 use App\Http\Controllers\FrontController;
 use App\Models\Contract;
+use App\Models\ContractDistribution;
 use App\Models\Invest;
 use App\Servers\CommonServer;
 use App\Servers\ContractServer;
@@ -28,69 +29,94 @@ class ContractController extends FrontController
      * 获取基本投资信息
      * @return \Illuminate\Http\JsonResponse
      */
-    function getInvestData(){
-        $sysAddress=CommonServer::creatServer()->getConfigValue('sys_address');
-        $investData=Invest::where('id',1)->select(['id','invest_money'])->first();
-        if(empty($investData)){
-            return $this->apiResponseError('信息异常');
+    function getInvestData()
+    {
+        $sysAddress = CommonServer::creatServer()->getConfigValue('sys_address');
+        $investData = Invest::where('id', 1)->select(['id', 'invest_money'])->first();
+        if (empty($investData)) {
+            return $this->apiResponseError('sys.key_error');
         }
-        $investData->{'sysAddress'}=$sysAddress;
-        return $this->apiResponseSuccess('获取信息成功',$investData);
+        $investData->{'sysAddress'} = $sysAddress;
+        return $this->apiResponseSuccess('', $investData);
     }
 
     /**
      * 执行报单
      * @return \Illuminate\Http\JsonResponse
      */
-    function setInvest(){
-        $mId=MemberServer::creatServer()->getMemberId();
+    function setInvest()
+    {
+        $mId = MemberServer::creatServer()->getMemberId();
         $redis_on_name = 'setInvest' . $mId;
         $redis_time = RedisDataServer::creatServer()->getData($redis_on_name);
-        $time=time();
-        if(!empty($redis_time) && $redis_time >$time-2){
-            return $this->apiResponseError( '请不要频繁执行');
+        $time = time();
+        if (!empty($redis_time) && $redis_time > $time - 2) {
+            return $this->apiResponseError('sys.key_num');
         }
-        RedisDataServer::creatServer()->setData($redis_on_name,$time,'str',2,false);
-        $investId=request()->input('id');
-        $txid=request()->input('txid');
-        if(empty($investId)){
-            return $this->apiResponseError('缺少必要参数');
+        RedisDataServer::creatServer()->setData($redis_on_name, $time, 'str', 2, false);
+        $investId = request()->input('id');
+        $txid = request()->input('txid');
+        if (empty($investId)) {
+            return $this->apiResponseError('sys.key_error');
         }
-        if(empty($txid)){
-            return $this->apiResponseError('缺少必要参数');
+        if (empty($txid)) {
+            return $this->apiResponseError('sys.key_error');
         }
 
-        $num=Contract::where('hash',$txid)->count();
-        if($num>0){
-            return $this->apiResponseError('当前交易已执行');
+        $num = Contract::where('hash', $txid)->count();
+        if ($num > 0) {
+            return $this->apiResponseError('contract.no_hash');
         }
-        $investData=Invest::where('id',$investId)->first();
-        $contractData=Contract::create([
-            'm_id'=>$mId,
-            'type'=>$investId,
-            'status'=>1,
-            'hash'=>$txid,
-            'broadcast_data'=>'',
-            'is_out'=>'0',
-            'error_msg'=>'',
-            'money'=>$investData->{'invest_money'},
-            'platform_money'=>$investData->{'platform_money'},
-            'direct_proportion'=>$investData->{'direct_proportion'},
-            'indirect_proportion'=>$investData->{'indirect_proportion'},
-            'team_proportion'=>$investData->{'team_proportion'},
-            'common_proportion'=>$investData->{'common_proportion'},
-            'sediment_proportion'=>$investData->{'sediment_proportion'},
-            'agency_proportion'=>$investData->{'agency_proportion'},
-            'contract_sn'=>IndentNumServer::creatServer()->getIndentNum(1),
+        $investData = Invest::where('id', $investId)->first();
+        $contractData = Contract::create([
+            'm_id' => $mId,
+            'type' => $investId,
+            'status' => 1,
+            'hash' => $txid,
+            'broadcast_data' => '',
+            'is_out' => '0',
+            'error_msg' => '',
+            'money' => $investData->{'invest_money'},
+            'platform_money' => $investData->{'platform_money'},
+            'direct_proportion' => $investData->{'direct_proportion'},
+            'indirect_proportion' => $investData->{'indirect_proportion'},
+            'team_proportion' => $investData->{'team_proportion'},
+            'common_proportion' => $investData->{'common_proportion'},
+            'sediment_proportion' => $investData->{'sediment_proportion'},
+            'agency_proportion' => $investData->{'agency_proportion'},
+            'contract_sn' => IndentNumServer::creatServer()->getIndentNum(1),
         ]);
-        if(empty($contractData)){
-            return  $this->apiResponseError('执行失败');
-        }else{
-            ContractServer::creatServer()->addContractLog($contractData,'合约创建成功');
-            return  $this->apiResponseSuccess('执行成功');
+        if (empty($contractData)) {
+            return $this->apiResponseError('contract.no');
+        } else {
+            ContractServer::creatServer()->addContractLog($contractData, '合约创建成功');
+            return $this->apiResponseSuccess('contract.ok');
         }
     }
 
+    /**
+     * 获取收益明细
+     * @return \Illuminate\Http\JsonResponse
+     */
+    function getEarnings()
+    {
+        $mId = MemberServer::creatServer()->getMemberId();
+        $list = ContractDistribution::from('contract_distributions as cd')
+            ->leftJoin('broadcasts as b', 'b.id', '=', 'cd.broadcast_id')
+            ->where('to_m_id', $mId)
+            ->whereIn('cd.status',[1,3])
+            ->select(['cd.id', 'db_money', 'nbn_money', 'cd.created_at', 'cd.type', 'cd.status', 'b.hash'])->paginate(15);
+        return $this->apiResponseSuccess('', ['total' => $list->total(), 'items' => $list->items()]);
+    }
 
+    /**
+     * 获取我的合约列表
+     * @return \Illuminate\Http\JsonResponse
+     */
+    function getContractList(){
+        $mId = MemberServer::creatServer()->getMemberId();
+        $list=Contract::where('m_id',$mId)->select(['id','status','hash','money','created_at','is_out'])->paginate(15);
+        return $this->apiResponseSuccess('', ['total' => $list->total(), 'items' => $list->items()]);
+    }
 
 }

+ 1 - 1
app/Http/Controllers/Traits/ApiResponseTrait.php

@@ -57,6 +57,6 @@ trait ApiResponseTrait
      */
     protected function lang()
     {
-        app()->setLocale(request()->input('lang', 'zh'));
+        app()->setLocale(request()->input('lang', 'zh-Hans'));
     }
 }

+ 2 - 2
app/Http/Middleware/MemberAuthMiddleware.php

@@ -42,14 +42,14 @@ class MemberAuthMiddleware
         }
         if (!in_array($clientRoute, $this->noAuth)) {
             if ( empty($token) ) {
-                throw new MemberAuthException('缺少认证信息', 401);
+                throw new MemberAuthException('auth.no_key', 401);
             }
             $member = RedisDataServer::creatServer()->getData( 'login_' . $token, 'json');
             if (empty($member)) {
                 $member = Member::where('token_str', $token)->select(['id', 'address', 'status', 'token_str', 'level_id'])->first();
 
                 if(empty($member)){
-                    throw new MemberAuthException('认证信息已过期', 401);
+                    throw new MemberAuthException('auth.login_error', 401);
                 }
             }
             //用户信息缓存30秒

+ 1 - 0
composer.json

@@ -14,6 +14,7 @@
         "barryvdh/laravel-debugbar": "3.2.3",
         "barryvdh/laravel-ide-helper": "2.8",
         "baum/baum": "^1.1",
+        "caouecs/laravel-lang": "~3.0",
         "cartalyst/sentry": "^2.1",
         "cblink/region": "^1.0",
         "doctrine/dbal": " ~2.3",

+ 55 - 2
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "535e0d46b0b3e7da85f788d8d30db784",
+    "content-hash": "562b3621d82c00175386f8ef5d18b5f3",
     "packages": [
         {
             "name": "adbario/php-dot-notation",
@@ -984,6 +984,59 @@
             },
             "time": "2015-03-04T12:07:54+00:00"
         },
+        {
+            "name": "caouecs/laravel-lang",
+            "version": "3.0.62",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/caouecs/lang.git",
+                "reference": "fcb8cec051b175278e0a9efa440f0b1033d12dd7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/caouecs/lang/zipball/fcb8cec051b175278e0a9efa440f0b1033d12dd7",
+                "reference": "fcb8cec051b175278e0a9efa440f0b1033d12dd7",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^2.10"
+            },
+            "suggest": {
+                "ablunier/laravel-lang-installer": "Command for easily add languages to a Laravel project",
+                "andrey-helldar/laravel-lang-publisher": "Easy installation and update of translation files for your project",
+                "arcanedev/laravel-lang": "Translations manager and checker for Laravel 5",
+                "overtrue/laravel-lang": "Command to add languages in your project"
+            },
+            "type": "library",
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "caouecs",
+                    "email": "caouecs@caouecs.net"
+                }
+            ],
+            "description": "Languages for Laravel",
+            "keywords": [
+                "lang",
+                "languages",
+                "laravel",
+                "lpm"
+            ],
+            "support": {
+                "source": "https://github.com/caouecs/lang/tree/3.0.62"
+            },
+            "abandoned": "https://github.com/Laravel-Lang/lang",
+            "time": "2019-03-17T10:36:46+00:00"
+        },
         {
             "name": "cartalyst/sentry",
             "version": "v2.1.7",
@@ -12261,5 +12314,5 @@
         "php": "^7.2"
     },
     "platform-dev": [],
-    "plugin-api-version": "2.1.0"
+    "plugin-api-version": "2.3.0"
 }

+ 1 - 1
config/app.php

@@ -80,7 +80,7 @@ return [
     |
     */
 
-    'locale' => 'en',
+    'locale' => 'zh-CN',
 
     /*
     |--------------------------------------------------------------------------

+ 5 - 3
resources/lang/en/auth.php

@@ -13,7 +13,9 @@ return [
     |
     */
 
-    'failed' => 'These credentials do not match our records.',
-    'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
+    'no_key' => '缺少认证信息',
+    'no_login' => '登录失效',
+    'login_error' => '认证信息已过期',
+    'throttle' => '尝试次数过太多.:seconds秒',
 
-];
+];

+ 15 - 18
resources/lang/en/contract.php

@@ -1,23 +1,20 @@
 <?php
 
 return [
-    'no_lndo_num'=>'Please enter the number of contracts',
-    'no_coin_type'=>'Please select a contract type',
-    'lndo_num_legal_no'=>'LNDO quantity is illegal',
-    'no_contract_rule'=>'No such contract',
-    'lndo_num_no'=>'Insufficient LNDO',
-    'no_add_contract'=>'Contract addition failed',
-    'yes_add_contract'=>'Contract added successfully',
-    'no_contract'=>'The purchase contract is not yet open',
-    'max_lndo_num'=>'A maximum of 10 contracts should be held',
-    'max_lndo_num_legal_no'=>'The maximum quantity of the purchase contract is 10000 LNDO',
-    'a_lndo_num_legal_no'=>'Buy in multiples of 100',
-    'no_reserve_price'=>'Reservation price error',
-    'contract_id'=>'Lack of contract information',
-    'no_contract_info'=>'Contract information error',
-    'yes_revocation_contract'=>'Successful contract cancellation',
-    'contract_yy'=>'Contract Appointment Successful',
-    'no_y_add_contract'=>'Contract Appointment Successful',
 
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used during authentication for various
+    | messages that we need to display to the user. You are free to modify
+    | these language lines according to your application's requirements.
+    |
+    */
 
-];
+    'no_hash' => '当前交易已执行',
+    'ok' => '执行成功',
+    'no' => '执行失败',
+
+];

+ 0 - 9
resources/lang/en/fast.php

@@ -1,9 +0,0 @@
-<?php
-
-return [
-    'lndo_num_no'=>'Illegal number of LNDO',
-    'pay_no'=>'Failed purchase',
-    'pay_yes'=>'Successful purchase',
-
-
-];

+ 0 - 47
resources/lang/en/member.php

@@ -1,47 +0,0 @@
-<?php
-
-return [
-
-    'no_invite_code' => 'Please enter a recommendation code',
-    'no_p_member' => 'The current recommendation code is invalid',
-    'no_password' => 'Please enter your password',
-    'no_pay_pass' => 'Please enter your pay password',
-    'no_new_password' => 'Please enter your password',
-    'no_mobile' => 'Please enter the phone number',
-    'no_mobile_num' => 'Please enter the phone number',
-    'no_rz' => 'Temporarily not opened',
-    'mobile_register' => 'The current mobile number is registered',
-    'no_register' => 'registration failed',
-    'yes_register' => 'registration success',
-    'no_member' => 'The current user does not exist',
-    'password_error' => 'Incorrect login password',
-    'old_password_error' => 'Incorrect login password',
-    'yes_login' => 'login successful',
-    'yes_pass' => 'Login modified successfully',
-    'yes_pay_pass' => 'Payment password set successfully',
-    'login_no' => 'The current login has expired',
-    'yes' => 'Get data successfully',
-    'set_yes' => 'Set up successfully',
-    'no' => '缺少必要参数',
-    'pay_pass_error' => 'Incorrect payment password',
-    'no_old_pass' => 'Please enter the old password',
-    'no_acc' => 'Please fill in your id number',
-    'no_realname' => 'Please fill in your id number',
-    'no_img' => 'Please upload your id card',
-    'yes_authentication' => 'Current id card has been authenticated',
-    'authentication' => 'The authentication information was submitted successfully',
-    'code_num' => 'Captcha required',
-    'code_no' => 'Verification code error',
-    'code_no_time' => 'The SMS verification code has expired',
-    'no_member_idcard' => 'The current id card number has been authenticated',
-    'is_attestation' => 'The current user has not completed real-name authentication',
-    'is_idcard' => 'The id number is illegal',
-    'redis_num' => 'You are accessing too fast, please try again later',
-    'no_send_code_num' => 'Please select a mobile phone country',
-    'no_nations' => 'Country information error',
-    'verify_old_ok_mobile' => 'Verified',
-    'no_mobile_time' => 'Verification time has expired',
-    'mobile_update_ok' => 'Mobile phone number modified successfully',
-    'err_msg' => 'Member information is abnormal, please try again later',
-
-];

+ 0 - 23
resources/lang/en/order.php

@@ -1,23 +0,0 @@
-<?php
-
-return [
-
-    'no_order_type'=>'Please select transaction type',
-    'no_pay_type'=>'Please select a transaction type',
-    'no_pay_num'=>'Please select the number of transactions',
-    'pay_num_illegality'=>'Illegal number of transactions',
-    'no_pay_money'=>'Please set transaction price',
-    'pay_money_illegality'=>'Illegal transaction price',
-    'yes_order'=>'Pending order successfully',
-    'no_yes_order'=>'Entrust the failure',
-    'order_num'=>'There are outstanding orders',
-    'no_order_id'=>'Please select a cancelled order',
-    'no_order'=>'Order information does not exist',
-    'no_order_status'=>'Order status error',
-    'yes_cancel_order'=>'Success',
-    'no_cancel_order'=>'Revocation of failure',
-    'no_vote_num'=>'No votes available',
-    'no_lndo_order'=>'LNDO pay cannot be cancelled for the time being',
-    'no_order_time'=>'Trading hours are 2020-05-18 15:18',
-
-];

+ 0 - 19
resources/lang/en/pagination.php

@@ -1,19 +0,0 @@
-<?php
-
-return [
-
-    /*
-    |--------------------------------------------------------------------------
-    | Pagination Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines are used by the paginator library to build
-    | the simple pagination links. You are free to change them to anything
-    | you want to customize your views to better match your application.
-    |
-    */
-
-    'previous' => '&laquo; Previous',
-    'next' => 'Next &raquo;',
-
-];

+ 0 - 22
resources/lang/en/passwords.php

@@ -1,22 +0,0 @@
-<?php
-
-return [
-
-    /*
-    |--------------------------------------------------------------------------
-    | Password Reset Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines are the default lines which match reasons
-    | that are given by the password broker for a password update attempt
-    | has failed, such as for an invalid token or invalid new password.
-    |
-    */
-
-    'password' => 'Passwords must be at least eight characters and match the confirmation.',
-    'reset' => 'Your password has been reset!',
-    'sent' => 'We have e-mailed your password reset link!',
-    'token' => 'This password reset token is invalid.',
-    'user' => "We can't find a user with that e-mail address.",
-
-];

+ 3 - 2
resources/lang/zh/auth.php → resources/lang/en/sys.php

@@ -13,7 +13,8 @@ return [
     |
     */
 
-    'failed' => '账号或密码不匹配',
-    'throttle' => '尝试次数过太多.:seconds秒',
+    'error' => '系统错误',
+    'key_error' => '参数错误',
+    'key_num' => '操作频繁',
 
 ];

+ 0 - 150
resources/lang/en/validation.php

@@ -1,150 +0,0 @@
-<?php
-
-return [
-
-    /*
-    |--------------------------------------------------------------------------
-    | Validation Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines contain the default error messages used by
-    | the validator class. Some of these rules have multiple versions such
-    | as the size rules. Feel free to tweak each of these messages here.
-    |
-    */
-
-    'accepted' => 'The :attribute must be accepted.',
-    'active_url' => 'The :attribute is not a valid URL.',
-    'after' => 'The :attribute must be a date after :date.',
-    'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
-    'alpha' => 'The :attribute may only contain letters.',
-    'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
-    'alpha_num' => 'The :attribute may only contain letters and numbers.',
-    'array' => 'The :attribute must be an array.',
-    'before' => 'The :attribute must be a date before :date.',
-    'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
-    'between' => [
-        'numeric' => 'The :attribute must be between :min and :max.',
-        'file' => 'The :attribute must be between :min and :max kilobytes.',
-        'string' => 'The :attribute must be between :min and :max characters.',
-        'array' => 'The :attribute must have between :min and :max items.',
-    ],
-    'boolean' => 'The :attribute field must be true or false.',
-    'confirmed' => 'The :attribute confirmation does not match.',
-    'date' => 'The :attribute is not a valid date.',
-    'date_equals' => 'The :attribute must be a date equal to :date.',
-    'date_format' => 'The :attribute does not match the format :format.',
-    'different' => 'The :attribute and :other must be different.',
-    'digits' => 'The :attribute must be :digits digits.',
-    'digits_between' => 'The :attribute must be between :min and :max digits.',
-    'dimensions' => 'The :attribute has invalid image dimensions.',
-    'distinct' => 'The :attribute field has a duplicate value.',
-    'email' => 'The :attribute must be a valid email address.',
-    'ends_with' => 'The :attribute must end with one of the following: :values',
-    'exists' => 'The selected :attribute is invalid.',
-    'file' => 'The :attribute must be a file.',
-    'filled' => 'The :attribute field must have a value.',
-    'gt' => [
-        'numeric' => 'The :attribute must be greater than :value.',
-        'file' => 'The :attribute must be greater than :value kilobytes.',
-        'string' => 'The :attribute must be greater than :value characters.',
-        'array' => 'The :attribute must have more than :value items.',
-    ],
-    'gte' => [
-        'numeric' => 'The :attribute must be greater than or equal :value.',
-        'file' => 'The :attribute must be greater than or equal :value kilobytes.',
-        'string' => 'The :attribute must be greater than or equal :value characters.',
-        'array' => 'The :attribute must have :value items or more.',
-    ],
-    'image' => 'The :attribute must be an image.',
-    'in' => 'The selected :attribute is invalid.',
-    'in_array' => 'The :attribute field does not exist in :other.',
-    'integer' => 'The :attribute must be an integer.',
-    'ip' => 'The :attribute must be a valid IP address.',
-    'ipv4' => 'The :attribute must be a valid IPv4 address.',
-    'ipv6' => 'The :attribute must be a valid IPv6 address.',
-    'json' => 'The :attribute must be a valid JSON string.',
-    'lt' => [
-        'numeric' => 'The :attribute must be less than :value.',
-        'file' => 'The :attribute must be less than :value kilobytes.',
-        'string' => 'The :attribute must be less than :value characters.',
-        'array' => 'The :attribute must have less than :value items.',
-    ],
-    'lte' => [
-        'numeric' => 'The :attribute must be less than or equal :value.',
-        'file' => 'The :attribute must be less than or equal :value kilobytes.',
-        'string' => 'The :attribute must be less than or equal :value characters.',
-        'array' => 'The :attribute must not have more than :value items.',
-    ],
-    'max' => [
-        'numeric' => 'The :attribute may not be greater than :max.',
-        'file' => 'The :attribute may not be greater than :max kilobytes.',
-        'string' => 'The :attribute may not be greater than :max characters.',
-        'array' => 'The :attribute may not have more than :max items.',
-    ],
-    'mimes' => 'The :attribute must be a file of type: :values.',
-    'mimetypes' => 'The :attribute must be a file of type: :values.',
-    'min' => [
-        'numeric' => 'The :attribute must be at least :min.',
-        'file' => 'The :attribute must be at least :min kilobytes.',
-        'string' => 'The :attribute must be at least :min characters.',
-        'array' => 'The :attribute must have at least :min items.',
-    ],
-    'not_in' => 'The selected :attribute is invalid.',
-    'not_regex' => 'The :attribute format is invalid.',
-    'numeric' => 'The :attribute must be a number.',
-    'present' => 'The :attribute field must be present.',
-    'regex' => 'The :attribute format is invalid.',
-    'required' => 'The :attribute field is required.',
-    'required_if' => 'The :attribute field is required when :other is :value.',
-    'required_unless' => 'The :attribute field is required unless :other is in :values.',
-    'required_with' => 'The :attribute field is required when :values is present.',
-    'required_with_all' => 'The :attribute field is required when :values are present.',
-    'required_without' => 'The :attribute field is required when :values is not present.',
-    'required_without_all' => 'The :attribute field is required when none of :values are present.',
-    'same' => 'The :attribute and :other must match.',
-    'size' => [
-        'numeric' => 'The :attribute must be :size.',
-        'file' => 'The :attribute must be :size kilobytes.',
-        'string' => 'The :attribute must be :size characters.',
-        'array' => 'The :attribute must contain :size items.',
-    ],
-    'starts_with' => 'The :attribute must start with one of the following: :values',
-    'string' => 'The :attribute must be a string.',
-    'timezone' => 'The :attribute must be a valid zone.',
-    'unique' => 'The :attribute has already been taken.',
-    'uploaded' => 'The :attribute failed to upload.',
-    'url' => 'The :attribute format is invalid.',
-    'uuid' => 'The :attribute must be a valid UUID.',
-
-    /*
-    |--------------------------------------------------------------------------
-    | Custom Validation Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | Here you may specify custom validation messages for attributes using the
-    | convention "attribute.rule" to name the lines. This makes it quick to
-    | specify a specific custom language line for a given attribute rule.
-    |
-    */
-
-    'custom' => [
-        'attribute-name' => [
-            'rule-name' => 'custom-message',
-        ],
-    ],
-
-    /*
-    |--------------------------------------------------------------------------
-    | Custom Validation Attributes
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines are used to swap our attribute placeholder
-    | with something more reader friendly such as "E-Mail Address" instead
-    | of "email". This simply helps us make our message more expressive.
-    |
-    */
-
-    'attributes' => [],
-
-];

+ 0 - 15
resources/lang/en/vote.php

@@ -1,15 +0,0 @@
-<?php
-
-return [
-    'contract_num'=>'You must be holding a contract to vote',
-    'no_vote_m_id'=>'Please select',
-    'no_vote_num'=>'No votes available',
-    'num_ranking'=>'The investee must hold the top 100 coins for LNDO',
-    'yes_vote'=>'Voted successfully',
-    'no_vote_id'=>'Please choose to cancel your vote',
-    'no_vote'=>'Voting information error',
-    'no_vote_status'=>'Voting status error',
-    'yes_cancel'=>'Voting canceled successfully',
-
-
-];

+ 0 - 13
resources/lang/en/withdraw.php

@@ -1,13 +0,0 @@
-<?php
-
-return [
-    'no_address'=>'Please enter the withdrawal address',
-    'no_pay_pass'=>'Please enter the payment password',
-    'no_money'=>'Please enter the withdrawal amount',
-    'max_money'=>'The withdrawal amount is illegal',
-    'max_num'=>'You have an outstanding withdrawal order',
-    'withdraw_yes'=>'Successful withdrawal application',
-    'address'=>'Illegal withdrawal address',
-    'no_sys'=>'LNDO currently does not support external address withdrawal',
-
-];

+ 4 - 3
resources/lang/en/notice.php → resources/lang/ko/auth.php

@@ -11,10 +11,11 @@ return [
     | messages that we need to display to the user. You are free to modify
     | these language lines according to your application's requirements.
     |
-    | 前端登录接口英文版
     */
 
-    'index_title_lists' => 'success',
-    'detail_success'    => 'success',
+    'no_key' => '缺少认证信息',
+    'no_login' => '登录失效',
+    'login_error' => '认证信息已过期',
+    'throttle' => '尝试次数过太多.:seconds秒',
 
 ];

+ 3 - 2
resources/lang/en/banner.php → resources/lang/ko/contract.php

@@ -11,9 +11,10 @@ return [
     | messages that we need to display to the user. You are free to modify
     | these language lines according to your application's requirements.
     |
-    | 前端登录接口英文版
     */
 
-    'success' => 'success',
+    'no_hash' => '当前交易已执行',
+    'ok' => '执行成功',
+    'no' => '执行失败',
 
 ];

+ 4 - 3
resources/lang/zh/notice.php → resources/lang/ko/sys.php

@@ -11,9 +11,10 @@ return [
     | messages that we need to display to the user. You are free to modify
     | these language lines according to your application's requirements.
     |
-    | 前端登录接口英文版
     */
 
-    'index_title_lists' => '成功',
-    'detail_success'    => '成功',
+    'error' => '系统错误',
+    'key_error' => '参数错误',
+    'key_num' => '操作频繁',
+
 ];

+ 21 - 0
resources/lang/zh-Hans/auth.php

@@ -0,0 +1,21 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used during authentication for various
+    | messages that we need to display to the user. You are free to modify
+    | these language lines according to your application's requirements.
+    |
+    */
+
+    'no_key' => '缺少认证信息',
+    'no_login' => '登录失效',
+    'login_error' => '认证信息已过期',
+    'throttle' => '尝试次数过太多.:seconds秒',
+
+];

+ 3 - 2
resources/lang/zh/banner.php → resources/lang/zh-Hans/contract.php

@@ -11,9 +11,10 @@ return [
     | messages that we need to display to the user. You are free to modify
     | these language lines according to your application's requirements.
     |
-    | 前端登录接口英文版
     */
 
-    'success' => '成功',
+    'no_hash' => '当前交易已执行',
+    'ok' => '执行成功',
+    'no' => '执行失败',
 
 ];

+ 20 - 0
resources/lang/zh-Hans/sys.php

@@ -0,0 +1,20 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used during authentication for various
+    | messages that we need to display to the user. You are free to modify
+    | these language lines according to your application's requirements.
+    |
+    */
+
+    'error' => '系统错误',
+    'key_error' => '参数错误',
+    'key_num' => '操作频繁',
+
+];

+ 0 - 23
resources/lang/zh/contract.php

@@ -1,23 +0,0 @@
-<?php
-
-return [
-    'no_lndo_num'=>'请输入合约数量',
-    'no_coin_type'=>'请选择合约类型',
-    'lndo_num_legal_no'=>'购买合约LNDO数量不低于100',
-    'no_contract_rule'=>'暂无此合约规则',
-    'lndo_num_no'=>'LNDO数量不足',
-    'no_add_contract'=>'合约购买失败',
-    'yes_add_contract'=>'合约购买成功',
-    'no_contract'=>'购买合约暂未开放',
-    'max_lndo_num'=>'在持合约最大10份',
-    'max_lndo_num_legal_no'=>'购买合约LNDO数量最大10000',
-    'a_lndo_num_legal_no'=>'100的整数倍购买',
-    'no_reserve_price'=>'预约价格错误',
-    'contract_id'=>'缺少合约信息',
-    'contract_yy'=>'合约预约成功',
-    'no_contract_info'=>'合约信息错误',
-    'yes_revocation_contract'=>'合约撤销成功',
-    'no_y_add_contract'=>'暂不能预约合约',
-
-
-];

+ 0 - 9
resources/lang/zh/fast.php

@@ -1,9 +0,0 @@
-<?php
-
-return [
-    'lndo_num_no'=>'LNDO数量不合法',
-    'pay_no'=>'购买失败',
-    'pay_yes'=>'购买成功',
-
-
-];

+ 0 - 6
resources/lang/zh/front/auth/login.php

@@ -1,6 +0,0 @@
-<?php
-
-return [
-    'title' => 'VEC-登录',
-
-];

+ 0 - 46
resources/lang/zh/member.php

@@ -1,46 +0,0 @@
-<?php
-
-return [
-
-    'no_invite_code' => '请输入邀请码',
-    'no_p_member' => '当前邀请码无效',
-    'no_password' => '请设置登录密码',
-    'no_pay_pass' => '请设置交易密码',
-    'no_new_password' => '请设置新登录密码',
-    'no_mobile' => '请输入手机号码',
-    'no_mobile_num' => '手机号码格式错误',
-    'no_rz' => '暂未开放',
-    'mobile_register' => '当前手机号码已注册',
-    'no_register' => '注册失败',
-    'yes_register' => '注册成功',
-    'no_member' => '当前用户不存在',
-    'password_error' => '登录密码错误',
-    'old_password_error' => '原登录密码错误',
-    'yes_login' => '登录成功',
-    'yes_pass' => '设置登录密码成功',
-    'yes_pay_pass' => '设置交易密码成功',
-    'login_no' => '当前登录已失效',
-    'yes' => '获取数据成功',
-    'set_yes' => '设置成功',
-    'no' => '缺少必要参数',
-    'pay_pass_error' => '交易密码错误',
-    'no_old_pass' => '请输入原密码',
-    'no_acc' => '请填写身份证号码',
-    'no_realname' => '请填写真实姓名',
-    'no_img' => '请上传手持身份证照',
-    'yes_authentication' => '当前身份证已认证',
-    'authentication' => '实名认证已提交,等待审核!',
-    'code_num' => '验证码必填',
-    'code_no' => '验证码错误',
-    'code_no_time' => '短信验证码已过期',
-    'no_member_idcard' => '身份证号码已存在',
-    'is_attestation' => '当前用户未完成实名认证',
-    'is_idcard' => '身份证号码不合法',
-    'redis_num' => '您访问速度过快,请稍后再试',
-    'no_send_code_num' => '请选择手机号码国别',
-    'no_nations' => '国别信息错误',
-    'verify_old_ok_mobile' => '验证通过',
-    'no_mobile_time' => '验证时间已过期',
-    'mobile_update_ok' => '手机号码修改成功',
-    'err_msg' => '会员信息异常,请稍后再试',
-];

+ 0 - 23
resources/lang/zh/order.php

@@ -1,23 +0,0 @@
-<?php
-
-return [
-
-    'no_order_type'=>'请选择交易种类',
-    'no_pay_type'=>'请选择交易类型',
-    'no_pay_num'=>'请选择交易数量',
-    'pay_num_illegality'=>'交易数量不合法',
-    'no_pay_money'=>'请设置交易价格',
-    'pay_money_illegality'=>'交易价格不合法',
-    'yes_order'=>'委托成功',
-    'no_yes_order'=>'委托失败',
-    'order_num'=>'已有未完成订单',
-    'no_order_id'=>'请选择取消的订单',
-    'no_order'=>'订单信息不存在',
-    'no_order_status'=>'订单状态错误',
-    'yes_cancel_order'=>'撤销成功',
-    'no_cancel_order'=>'撤销失败',
-    'no_vote_num'=>'暂无可投票数',
-    'no_lndo_order'=>'LNDO买单暂不能撤销',
-    'no_order_time'=>'交易开放时间为2020-05-18 15:18',
-
-];

+ 0 - 19
resources/lang/zh/pagination.php

@@ -1,19 +0,0 @@
-<?php
-
-return [
-
-    /*
-    |--------------------------------------------------------------------------
-    | Pagination Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines are used by the paginator library to build
-    | the simple pagination links. You are free to change them to anything
-    | you want to customize your views to better match your application.
-    |
-    */
-
-    'previous' => '&laquo; 上一页',
-    'next' => '下一页 &raquo;',
-
-];

+ 0 - 22
resources/lang/zh/passwords.php

@@ -1,22 +0,0 @@
-<?php
-
-return [
-
-    /*
-    |--------------------------------------------------------------------------
-    | Password Reset Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines are the default lines which match reasons
-    | that are given by the password broker for a password update attempt
-    | has failed, such as for an invalid token or invalid new password.
-    |
-    */
-
-    'password' => '密码必须至少有六个字符,并与确认相符。',
-    'reset' => '您的密码已经重置!',
-    'sent' => '我们已经通过电子邮件发送了你的密码重置链接!',
-    'token' => '此密码重置令牌无效。',
-    'user' => "我们找不到那个电子邮件地址的用户。",
-
-];

+ 0 - 119
resources/lang/zh/validation.php

@@ -1,119 +0,0 @@
-<?php
-
-return [
-
-    /*
-    |--------------------------------------------------------------------------
-    | Validation Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines contain the default error messages used by
-    | the validator class. Some of these rules have multiple versions such
-    | as the size rules. Feel free to tweak each of these messages here.
-    |
-    */
-
-    'accepted'             => 'The :attribute must be accepted.',
-    'active_url'           => 'The :attribute is not a valid URL.',
-    'after'                => 'The :attribute must be a date after :date.',
-    'after_or_equal'       => 'The :attribute must be a date after or equal to :date.',
-    'alpha'                => 'The :attribute may only contain letters.',
-    'alpha_dash'           => 'The :attribute may only contain letters, numbers, and dashes.',
-    'alpha_num'            => 'The :attribute may only contain letters and numbers.',
-    'array'                => 'The :attribute must be an array.',
-    'before'               => 'The :attribute must be a date before :date.',
-    'before_or_equal'      => 'The :attribute must be a date before or equal to :date.',
-    'between'              => [
-        'numeric' => 'The :attribute must be between :min and :max.',
-        'file'    => 'The :attribute must be between :min and :max kilobytes.',
-        'string'  => 'The :attribute must be between :min and :max characters.',
-        'array'   => 'The :attribute must have between :min and :max items.',
-    ],
-    'boolean'              => 'The :attribute field must be true or false.',
-    'confirmed'            => 'The :attribute confirmation does not match.',
-    'date'                 => 'The :attribute is not a valid date.',
-    'date_format'          => 'The :attribute does not match the format :format.',
-    'different'            => 'The :attribute and :other must be different.',
-    'digits'               => 'The :attribute must be :digits digits.',
-    'digits_between'       => 'The :attribute must be between :min and :max digits.',
-    'dimensions'           => 'The :attribute has invalid image dimensions.',
-    'distinct'             => 'The :attribute field has a duplicate value.',
-    'email'                => 'The :attribute must be a valid email address.',
-    'exists'               => 'The selected :attribute is invalid.',
-    'file'                 => 'The :attribute must be a file.',
-    'filled'               => 'The :attribute field must have a value.',
-    'image'                => 'The :attribute must be an image.',
-    'in'                   => 'The selected :attribute is invalid.',
-    'in_array'             => 'The :attribute field does not exist in :other.',
-    'integer'              => 'The :attribute must be an integer.',
-    'ip'                   => 'The :attribute must be a valid IP address.',
-    'json'                 => 'The :attribute must be a valid JSON string.',
-    'max'                  => [
-        'numeric' => 'The :attribute may not be greater than :max.',
-        'file'    => 'The :attribute may not be greater than :max kilobytes.',
-        'string'  => 'The :attribute may not be greater than :max characters.',
-        'array'   => 'The :attribute may not have more than :max items.',
-    ],
-    'mimes'                => 'The :attribute must be a file of type: :values.',
-    'mimetypes'            => 'The :attribute must be a file of type: :values.',
-    'min'                  => [
-        'numeric' => 'The :attribute must be at least :min.',
-        'file'    => 'The :attribute must be at least :min kilobytes.',
-        'string'  => 'The :attribute must be at least :min characters.',
-        'array'   => 'The :attribute must have at least :min items.',
-    ],
-    'not_in'               => 'The selected :attribute is invalid.',
-    'numeric'              => 'The :attribute must be a number.',
-    'present'              => 'The :attribute field must be present.',
-    'regex'                => 'The :attribute format is invalid.',
-    'required'             => 'required.',
-    'required_if'          => 'The :attribute field is required when :other is :value.',
-    'required_unless'      => 'The :attribute field is required unless :other is in :values.',
-    'required_with'        => 'The :attribute field is required when :values is present.',
-    'required_with_all'    => 'The :attribute field is required when :values is present.',
-    'required_without'     => 'The :attribute field is required when :values is not present.',
-    'required_without_all' => 'The :attribute field is required when none of :values are present.',
-    'same'                 => 'The :attribute and :other must match.',
-    'size'                 => [
-        'numeric' => 'The :attribute must be :size.',
-        'file'    => 'The :attribute must be :size kilobytes.',
-        'string'  => 'The :attribute must be :size characters.',
-        'array'   => 'The :attribute must contain :size items.',
-    ],
-    'string'               => 'The :attribute must be a string.',
-    'timezone'             => 'The :attribute must be a valid zone.',
-    'unique'               => '账号已被注册.',
-    'uploaded'             => 'The :attribute failed to upload.',
-    'url'                  => 'The :attribute format is invalid.',
-
-    /*
-    |--------------------------------------------------------------------------
-    | Custom Validation Language Lines
-    |--------------------------------------------------------------------------
-    |
-    | Here you may specify custom validation messages for attributes using the
-    | convention "attribute.rule" to name the lines. This makes it quick to
-    | specify a specific custom language line for a given attribute rule.
-    |
-    */
-
-    'custom' => [
-        'attribute-name' => [
-            'rule-name' => 'custom-message',
-        ],
-    ],
-
-    /*
-    |--------------------------------------------------------------------------
-    | Custom Validation Attributes
-    |--------------------------------------------------------------------------
-    |
-    | The following language lines are used to swap attribute place-holders
-    | with something more reader friendly such as E-Mail Address instead
-    | of "email". This simply helps us make messages a little cleaner.
-    |
-    */
-
-    'attributes' => [],
-
-];

+ 0 - 15
resources/lang/zh/vote.php

@@ -1,15 +0,0 @@
-<?php
-
-return [
-    'contract_num'=>'必须有在持合约才能投票',
-    'no_vote_m_id'=>'请选择被投人',
-    'no_vote_num'=>'暂无可投票数',
-    'num_ranking'=>'被投人需为LNDO持币前100名',
-    'yes_vote'=>'投票成功',
-    'no_vote_id'=>'请选择取消投票信息',
-    'no_vote'=>'投票信息错误',
-    'no_vote_status'=>'投票状态错误',
-    'yes_cancel'=>'投票取消成功',
-
-
-];

+ 0 - 14
resources/lang/zh/withdraw.php

@@ -1,14 +0,0 @@
-<?php
-
-return [
-    'no_address'=>'请输入提币地址',
-    'no_pay_pass'=>'请输入支付密码',
-    'no_money'=>'请输入提币数量',
-    'max_money'=>'提币数量不合法',
-    'max_num'=>'您有未完成的提币订单',
-    'withdraw_yes'=>'提币申请成功',
-    'address'=>'提现地址不合法',
-    'no_sys'=>'LNDO暂不支持外部地址提币',
-
-
-];

+ 1 - 0
routes/api/contract.php

@@ -7,4 +7,5 @@ use Illuminate\Support\Facades\Route;
 Route::group(['domain' => env('APP_HOST_WEB'), 'prefix' => 'contract'],function (){
     Route::match(['get','post'],'invest', 'ContractController@getInvestData')->name('contract.invest');
     Route::match(['get','post'],'add-invest', 'ContractController@setInvest')->name('contract.add-invest');
+    Route::match(['get','post'],'earnings', 'ContractController@getEarnings')->name('contract.earnings');
 });