类型|正则|备注
---|---|
手机号| ^1\d{10}$
座机号| 0\d{2,3}-\d{7,8}(-\d{1,6})?
身份证号| ^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}(\d|x|X)$
两位小数 | ^\d+(\.\d{1,2})?$
| 可以为整数
两位小数 | (^(\d{2,}|[1-9])+(\.\d{1,2})?$)|(^0\.((\d[1-9])|([1-9]0?))$)
| 可以为整数,最小0.01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.9.6 | |
RUN set -xe \ | |
&& apk add --no-cache --virtual .build-deps \ | |
git \ | |
&& apk add --no-cache \ | |
tzdata \ | |
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | |
&& echo "Asia/Shanghai" > /etc/timezone \ | |
&& apk del .build-deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 分个字符串 | |
function splitStr() | |
{ | |
OLD_IFS=${IFS} | |
IFS=$2, | |
arr=($1) | |
IFS=${OLD_IFS} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Invoice; | |
use App\Exports\MerchantInvoiceReviewExport; | |
use App\Http\Controllers\RestController; | |
use Illuminate\Http\Request; | |
use App\Models\MerchantInvoiceReview; | |
use Maatwebsite\Excel\Facades\Excel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="btn-primary btn" data-toggle="modal" data-contract_no="{{ $contract->contract_no }}" type="button" data-target="#refund"><i class="fa"></i> 退款处理</button> | |
<div class="modal fade" id="refund" tabindex="-1" role="dialog"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span | |
aria-hidden="true">×</span></button> | |
<h4 class="modal-title">退款处理</h4> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Libs\Auth; | |
use App\Libs\Auth\Jwt; | |
use App\Libs\RedisLib; | |
class Auth | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.extend({ | |
/** | |
* select2 ajax封装 | |
* @param string url | |
* @param obj transfer 转换响应数据 {id:'',text''} | |
* @param obj addQuery 增加的查询条件 | |
* @param obj params select2配置,可覆盖默认配置 | |
* @param string searchField 查询字段名 | |
* @param int limit 每页显示数量 | |
*/ |
类型|正则|备注
---|---|
手机号| ^1[3456789]\d{9}$
身份证号| ^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}(\d|x|X)$
两位小数 | ^\d+(\.\d{1,2})?$
| 可以为整数
两位小数 | (^(\d{2,}|[1-9])+(\.\d{1,2})?$)|(^0\.((\d[1-9])|([1-9]0?))$)
| 可以为整数,最小0.01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$za = new ZipArchive(); | |
$res = $za->open('test.zip'); | |
if (!$res) { | |
return $this->respApiRequestFail('解压失败'); | |
} | |
$path = storage_path('/path/to'); | |
for ($i = 0; $i < $za->numFiles; $i++) { | |
$fileInfo = $za->statIndex($i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 生成流水号 | |
if (! function_exists('generateSN')) { | |
function generateSN($prefix = '', int $length = 30) { | |
if (empty($prefix)) { | |
$prefix = 'PF'; | |
} | |
$length = max(20, $length); | |
return str_pad($prefix . uniqid(date('YmdHis')), $length, mt_rand(0, 10000)); |
NewerOlder