no message
This commit is contained in:
parent
4ff5e5a028
commit
fa0049d36c
@ -5,7 +5,7 @@
|
|||||||
namespace App\Services\Tg\Hook\Mod;
|
namespace App\Services\Tg\Hook\Mod;
|
||||||
|
|
||||||
use App\Models\Huodong as ModelHuodong;
|
use App\Models\Huodong as ModelHuodong;
|
||||||
//use App\Utils\Tools;
|
use App\Services\TomTool\TgFormat;
|
||||||
|
|
||||||
final class Huodong extends Base
|
final class Huodong extends Base
|
||||||
{
|
{
|
||||||
@ -75,6 +75,7 @@ final class Huodong extends Base
|
|||||||
$iId = $aParam['aOption'][1];
|
$iId = $aParam['aOption'][1];
|
||||||
$sField = $aParam['aOption'][2];
|
$sField = $aParam['aOption'][2];
|
||||||
$sValue = $aParam['aArg'][1];
|
$sValue = $aParam['aArg'][1];
|
||||||
|
$sValue = TgFormat::ValueType($sValue);
|
||||||
|
|
||||||
if (!$iId || !$sField || !$sValue) {
|
if (!$iId || !$sField || !$sValue) {
|
||||||
return "参数不齐";
|
return "参数不齐";
|
||||||
|
|||||||
25
src/Services/TomTool/TgFormat.php
Normal file
25
src/Services/TomTool/TgFormat.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services\TomTool;
|
||||||
|
use App\Utils\Tools;
|
||||||
|
|
||||||
|
class TgFormat {
|
||||||
|
|
||||||
|
|
||||||
|
//case 11#gb
|
||||||
|
public static function ValueType($sValue)
|
||||||
|
{
|
||||||
|
list($sValue, $sValueType) = explode("#", $sValue);
|
||||||
|
|
||||||
|
if ($sValueType) {
|
||||||
|
if ($sValueType == "gb") {
|
||||||
|
$sValue = Tools::tomGbToB($sValue);
|
||||||
|
} else if ($sValueType == "date") {
|
||||||
|
$sValue = strtotime($sValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user