|
@@ -660,4 +660,12 @@ function moneyFormat($amount,$unit='y'){
|
|
|
function makeQrcode($text){
|
|
|
$qrCode = Service::qrcode(['text' => $text]);
|
|
|
return sprintf('data:image/png;base64,%s',base64_encode($qrCode->writeString()));
|
|
|
+}
|
|
|
+
|
|
|
+function seconds2Time($seconds){
|
|
|
+ $minute=bcdiv($seconds,60,0);
|
|
|
+ $hour=bcdiv($minute,60,0);
|
|
|
+ $sec=$seconds-$minute*60;
|
|
|
+ $minute=$minute-$hour*60;
|
|
|
+ return sprintf('%02d:%02d:%02d',$hour,$minute,$sec);
|
|
|
}
|