Commit c896bae0 by 杨树贤

供应商入驻字段

parent 8239706f
......@@ -8,6 +8,7 @@ use App\Http\Services\ChainService;
use App\Http\Services\SupplierExaminationService;
use App\Http\Transformers\SupplierLogTransformer;
use App\Http\Validators\SupplierExaminationValidator;
use App\Model\ChainModel;
use App\Model\LogModel;
use App\Model\SupplierAccountModel;
use App\Model\SupplierApplyModel;
......@@ -30,4 +31,12 @@ class ChainApiController extends Controller
$list = $service->getChainList($request->all());
$this->response(0, 'ok', $list['data'], $list['total']);
}
//获取芯链账号
public function GetChain($request)
{
$chainId = $request->input('chain_id');
$chain = ChainModel::where('chain_id', $chainId)->first()->toArray();
$this->response(0, 'ok', $chain);
}
}
......@@ -115,7 +115,7 @@ class SupplierStatisticsService
return $value;
}, $result);
$redis->set($statisticsKey, json_encode($result));
$redis->expire($statisticsKey, 600);
$redis->expire($statisticsKey, 60);
return $result;
}
......
......@@ -17,6 +17,22 @@ class ChainTransformer
$item['create_time'] = $item['create_time'] ? date('Y-m-d H:i:s', $item['create_time']) : '';
$item['supplier_type_name'] = array_get(config('field.ChainSupplierType'), $item['supplier_type'], '无');
$item['data_type_name'] = array_get(config('field.ChainDataType'), $item['data_type'], '无');
$item['company_nature'] = array_get(config('field.ChainCompanyNature'), $item['company_nature'], '无');
$item['region'] = array_get(config('field.ChainRegion'), $item['region'], '无');
if (!empty($item['mobile'])) {
$item['mobile'] = substr($item['mobile'], 0, 3) . '****' . substr($item['mobile'], 7);
}
if (!empty($item['email'])) {
$emailTemp = explode('@', $item['email'])[0];
$replace = str_pad('*', strlen($emailTemp), '*');
$emailTemp = str_replace($emailTemp, $replace, $emailTemp);
if (count(explode('@', $item['email'])) > 1) {
$item['email'] = $emailTemp . '@' . explode('@', $item['email'])[1];
} else {
$item['email'] = $emailTemp;
}
}
}
unset($item);
......
......@@ -290,4 +290,19 @@ return [
2 => '联营供应商',
3 => '国产推荐'
],
'ChainCompanyNature' => [
7 => '原厂',
1 => '代理商',
2 => '现货商',
3 => '其它',
],
'ChainRegion' => [
1 => '欧美',
2 => '大陆',
3 => '日韩',
4 => '港台',
5 => '其它',
]
];
......@@ -54,4 +54,3 @@
</div>
<table class="layui-table" id="chainList" lay-filter="chainList"></table>
</div>
@include('script.ChainListScript')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment