Commit 297a9286 by 杨树贤

初始化项目

parents
Showing with 4038 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:nOavyGKkyw4fi+Xv2hK7PrfYw9bapQzqlqMXDIobp9I=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
domain=icsales.cc
DB_CONNECTION=mysql
DB_HOST=192.168.2.232
DB_PORT=3306
DB_DATABASE=ic_data
DB_USERNAME=ic_data
DB_PASSWORD=ic_data#zsyM
DB_PREFIX=ic_
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=192.168.1.235
REDIS_PASSWORD=icDb29mLy2s
REDIS_PORT=6379
REDIS_READ_HOST=192.168.1.237
REDIS_READ_PASSWORD=icDb29mLy2s
REDIS_READ_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
PERM_URL=http://perm.icsales.cc/api/check
PERM_ID=7
PERM_GOURL=http://perm.icsales.cc
ADMIN_GROUP=10000,20000
NOT_AUTH=
MENU_ID=7
MENU_URL=http://data.icsales.cc/api/config/
MENU_SIGN=/web/
LOGIN_DOMAIN=user.icsales.cc
ES_URL = http://soapi.icsales.com:8001
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
/node_modules
/public/hot
/public/storage
/storage/*.key
/.idea
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ApiController extends Controller
{
public function Entrance(Request $request, $id ){
return $this->$id($request, $id);
}
//访问时长趋势接口
private function ApiVisitTrend($request){
$collert=TrimX(['info']);
if(empty($collert['info']) || $collert['info']=='今日'){
$today=strtotime(date('Y-m-d'));
$field=[
'0:00-09:00'=>[$today,$today+(60*60*7)],
'09:00-11:00'=>[$today+(60*60*7),$today+(60*60*9)],
'11:00-13:00'=>[$today+(60*60*9),$today+(60*60*11)],
'13:00-15:00'=>[$today+(60*60*11),$today+(60*60*13)],
'15:00-17:00'=>[$today+(60*60*13),$today+(60*60*15)],
'17:00-19:00'=>[$today+(60*60*15),$today+(60*60*17)],
'19:00-22:00'=>[$today+(60*60*17),$today+(60*60*19)],
'22:00-24:00'=>[$today+(60*60*19),$today+(60*60*21)],
];
foreach ($field as $k=>$v){
$data['y']['a'][]=rand(0,30);
$data['y']['b'][]=rand(0,30);
$data['y']['c'][]=rand(0,30);
$data['x'][]=$k;
}
}elseif ($collert['info']=='本周'){
$today=strtotime(date('Y-m-d', strtotime('this week')));
$field=[
'周一'=>[$today,$today+(60*60*24)],
'周二'=>[$today+(60*60*24),$today+(60*60*48)],
'周三'=>[$today+(60*60*48),$today+(60*60*72)],
'周四'=>[$today+(60*60*72),$today+(60*60*96)],
'周五'=>[$today+(60*60*96),$today+(60*60*120)],
'周六'=>[$today+(60*60*120),$today+(60*60*144)],
'周日'=>[$today+(60*60*144),$today+(60*60*168)]
];
foreach ($field as $k=>$v){
$data['y']['a'][]=rand(0,30);
$data['y']['b'][]=rand(0,30);
$data['y']['c'][]=rand(0,30);
$data['x'][]=$k;
}
}elseif ($collert['info']=='本月'){
$today=strtotime(date('Y-m-d', strtotime('this month')));
$field=[
'第一周'=>[$today,$today+(60*60*24)],
'第二周'=>[$today+(60*60*24),$today+(60*60*48)],
'第三周'=>[$today+(60*60*48),$today+(60*60*72)],
'第四周'=>[$today+(60*60*72),$today+(60*60*96)]
];
foreach ($field as $k=>$v){
$data['y']['a'][]=rand(0,30);
$data['y']['b'][]=rand(0,30);
$data['y']['c'][]=rand(0,30);
$data['x'][]=$k;
}
}
return $this->apiReturn(0,'ok',['data'=>$data]);
}
//询价指标
private function ApiInquiryIndex(){
$today=strtotime(date('Y-m-d'));
$field=[
'0:00-07:00'=>[$today,$today+(60*60*7)],
'07:00-09:00'=>[$today+(60*60*7),$today+(60*60*9)],
'09:00-10:00'=>[$today+(60*60*9),$today+(60*60*11)],
'10:00-11:00'=>[$today+(60*60*11),$today+(60*60*13)],
'11:00-12:00'=>[$today+(60*60*13),$today+(60*60*15)],
'12:00-14:00'=>[$today+(60*60*15),$today+(60*60*17)],
'14:00-15:00'=>[$today+(60*60*15),$today+(60*60*17)],
'15:00-16:00'=>[$today+(60*60*15),$today+(60*60*17)],
'16:00-17:00'=>[$today+(60*60*15),$today+(60*60*17)],
'17:00-18:00'=>[$today+(60*60*15),$today+(60*60*17)],
'18:00-20:00'=>[$today+(60*60*15),$today+(60*60*17)],
'20:00-24:00'=>[$today+(60*60*15),$today+(60*60*17)],
];
foreach ($field as $k=>$v){
$data['y'][]=rand(0,30);
$data['x'][]=$k;
}
return $this->apiReturn(0,'ok',['data'=>$data]);
}
//首页相关数据统计
private function ApiIndexOne(){
//今日询价单
$data=[
'today'=>568,
'yesterday'=>129,
'today_offer'=>608,
'yesterday_offer'=>1210,
'reg_count'=>2321,
'yesterday_reg'=>88
];
return $this->apiReturn(0,'ok',['data'=>$data]);
}
//首页相关数据统计
private function ApiIndextwo(){
//今日询价单
$data=[
'wait_auth'=>1,
'goods_auth'=>129,
'inquiry_auth'=>5,
'offer_auth'=>1210,
'integral_extract'=>2321
];
return $this->apiReturn(0,'ok',['data'=>$data]);
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Where to redirect users after registration.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Where to redirect users after resetting their password.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
protected $data;
protected function errhtml($errcode,$errinfo,$goUrl='')
{
$data = [
'errcode' => $errcode,
'errinfo' => $errinfo,
'url' => $goUrl
];
return view('errors.error', $data);
}
protected function view($view = 'web')
{
return view($view,$this->data);
}
protected function apiReturn( $errcode = 0,$errmsg = 'OK',$data = ''){
return apiReturn($errcode,$errmsg,$data);
}
protected function DataMachining($data){
$Field = [
'status' => [
'config' => config('config.goods_status'),'field'=>'_s'
],
'audit_status' => [
'config'=>config('config.audit_status'),'field'=>'_s'
],
'source' => [
'config'=>config('config.source'),'field'=>'_s'
],
'currency' => [
'config'=>config('config.currency'),'field'=>'_s'
]
];
foreach($data as $k=>&$v){
if(is_array($v))
$v = $this->DataMachining($v);
else{
if(!empty($Field[$k]))
$data[$k.$Field[$k]['field']] = !empty($Field[$k]['config'][$v]) ? $Field[$k]['config'][$v] : '';
if($k == 'add_time' || $k == 'update_time')
$data[$k.'_s'] = date('Y-m-d H:i',$v);
if($k == 'price' && !empty($data['currency']))
$data[$k.'_s'] = config('config.currency.'.$data['currency']).' '.$v;
}
}
return $data;
}
}
<?php
namespace App\Http\Controllers;
use App\Model\GoodsModel;
use App\Model\RedisModel;
use App\Model\SkuViolation;
use Illuminate\Http\Request;
use PHPUnit\Framework\MockObject\Stub\Exception;
class GoodsApiController extends Controller
{
public function Entrance(Request $request, $id )
{
return $this->$id($request, $id);
}
private function ApiGoodsList($request)
{
$Redis = new RedisModel();
$Field = ['mobile','source/eq','start_time','end_time','status/eq','p','limit','goods_name/like'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$UserId = $Redis->hget('ic_user_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$collert['update_time/gt'] = $collert['start_time'];
unset($collert['start_time']);
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$collert['update_time/lt'] = $collert['end_time'];
unset($collert['end_time']);
}
$GoodsModel = new GoodsModel();
$data = $GoodsModel->GoodsList($collert);
if(!$data) return $this->apiReturn(20001,'没有数据');
return $this->apiReturn(0,'ok',$data);
}
private function ApiLowerGoods($request)
{
$collert = TrimX(['goods_id']);
if(empty($collert['goods_id']))
return $this->apiReturn(10001,' 请选择要下架的商品');
$Url = config('website.GoodsInfoServer').'/goods/SaveGoods';
foreach ($collert['goods_id'] as $k=>$v){
}
$result = json_decode(curl($Url,$collert,true),true);
if(!$result || !isset($result['errcode']))
return $this->apiReturn(10001,'网络异常,请稍后重试');
if($result['errcode'] !==0 )
return $this->apiReturn(10002,'没有数据');
return $this->apiReturn(0,'ok',$result['data']);
}
private function ApiProhibitGoods($request){
$collert = TrimX(['goods_id','prohibit_remark']);
if(empty($collert['goods_id']))
return $this->apiReturn(10001,'缺少参数GoodsID');
if(empty($collert['prohibit_remark']))
return $this->apiReturn(10002,'未选择禁用原因');
$Url = config('website.GoodsInfoServer').'/goods/audit/prohibit/status';
$collert['audit_status'] = 2;
$collert['admin_id'] = $request->user->userId;
$collert['admin_name'] = $request->user->email;
$result = curl($Url,http_build_query($collert),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'禁用成功');
return $this->apiReturn(10003,'禁用失败');
}
private function ApiViolationGoodsList(Request $request)
{
$Field = ['mobile','start_time','end_time','audit_status','limit'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$Redis = new RedisModel();
$UserId = $Redis->hget('ic_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
$map = [];
if(!empty($collert['audit_status']))
$map[] = ['audit_status','=',$collert['audit_status']];
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$map[] = ['update_time','>=',$collert['start_time']];
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$map[] = ['update_time','<=',$collert['end_time']];
}
if(empty($collert['limit']))
$collert['limit'] = 10;
$Model = new SkuViolation();
$result= $Model->SkuViolationList($map,$collert['limit']);
return $this->apiReturn(0,'ok',$result);
}
private function ApiEnableGoods($request){
$collert = TrimX(['id','enable_remark']);
if(empty($collert['id']))
return $this->apiReturn(10001,'没有可以操作的记录');
if(empty($collert['id']))
return $this->apiReturn(10002,'没有可以恢复的商品');
$collert['id'] = array_unique($collert['id']);
foreach ($collert['id'] as $k=>$v){
if(!empty($v))
$map['id'][] = $k;
}
$map['enable_remark'] = '默认';
$Url = config('website.GoodsInfoServer').'/goods/audit/enable/status';
$collert['audit_status'] = 1;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'恢复成功');
return $this->apiReturn(10003,'恢复失败');
}
}
<?php
namespace App\Http\Controllers;
use App\Model\GoodsModel;
use App\Model\UUIDModel;
use Illuminate\Http\Request;
class GoodsWebController extends Controller
{
public function Entrance(Request $request,$id='index')
{
if($request->path() == '/') $path = 'web/index';
else $path = $request->path();
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'useremail' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('NotFind','没有这个页面');
}
public function index($request)
{
$this->data['title']='首页';
return $this->view();
}
public function GoodsList()
{
$this->data['title']='商品列表';
return $this->view();
}
private function GoodsDetails()
{
$this->data['title'] = '商品详情';
$collert = TrimX(['goods_id']);
if(empty($collert['goods_id'])) return back();
$GoodsModel = new GoodsModel();
$GoodsInfo = $GoodsModel->HDGoodsInfo($collert['goods_id']);
if(empty($GoodsInfo)) return back();
$UserInfo = $GoodsModel -> HDGoodsUser($GoodsInfo['user_id']);
$this->data['GoodsProhibit'] = config('config.goods_prohibit');
$this->data['info'] = $UserInfo;
$this->data['GoodsInfo'] = $GoodsInfo;
return $this->view();
}
public function ViolationGoodsList(){
$this->data['title']='违规商品列表';
$this->data['audit_status'] = config('config.audit_status');
return $this->view();
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use App\Model\SkuViolation;
use Illuminate\Http\Request;
class InquiryApiController extends Controller
{
public function Entrance(Request $request, $id )
{
return $this->$id($request, $id);
}
private function ApiInquiryList($request)
{
$Redis = new RedisModel();
$Field = ['mobile','source/eq','start_time','end_time','status/eq','p','limit','goods_name/like','audit_status/eq'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$UserId = $Redis->hget('ic_user_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$collert['add_time/gt'] = $collert['start_time'];
unset($collert['start_time']);
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$collert['add_time/lt'] = $collert['end_time'];
unset($collert['end_time']);
}
$collert['update_time/order'] = 'desc';
$ESUrl = config('website.ES_URL').'/search/get_inquiry';
$result = curl($ESUrl,$collert,true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$total = $result['data']['total'];
$OfferUrl = config('website.OfferServer').'/inquiry/info';
$OfferMap = ['inquiry_items_id'=>$result['data']['inquiry_items_id']];
$result = curl($OfferUrl,http_build_query($OfferMap),true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$Redis = new RedisModel();
foreach ($result['data'] as $k=>&$v){
$UserInfo = json_decode($Redis->hget('ic_user',$v['user_id']),true);
$v['company_name'] = !empty($UserInfo['company_name']) ? $UserInfo['company_name'] : '';
$v['mobile'] = !empty($UserInfo['mobile']) ? $UserInfo['mobile'] : '';
$v = $this->DataMachining($v);
}
$result['data'] = array_values($result['data']);
return $this->apiReturn(0,'ok',['data'=>$result['data'],'count'=>(int)$total]);
}
private function ApiLowerGoods($request)
{
$collert = TrimX(['goods_id']);
if(empty($collert['goods_id']))
return $this->apiReturn(10001,' 请选择要下架的商品');
$Url = config('website.GoodsInfoServer').'/goods/SaveGoods';
foreach ($collert['goods_id'] as $k=>$v){
}
$result = json_decode(curl($Url,$collert,true),true);
if(!$result || !isset($result['errcode']))
return $this->apiReturn(10001,'网络异常,请稍后重试');
if($result['errcode'] !==0 )
return $this->apiReturn(10002,'没有数据');
return $this->apiReturn(0,'ok',$result['data']);
}
private function ApiProhibitInquiry($request){
$collert = TrimX(['inquiry_items_id','audit_remark']);
if(empty($collert['inquiry_items_id']))
return $this->apiReturn(10001,'缺少参数inquiry_items_id');
if(empty($collert['audit_remark']))
return $this->apiReturn(10002,'未填写禁用原因');
$Url = config('website.OfferServer').'/inquiry/prohibit';
$collert['audit_status'] = 2;
$collert['admin_id'] = $request->user->userId;
$collert['admin_name'] = $request->user->email;
$result = curl($Url,http_build_query($collert),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'禁用成功');
return $this->apiReturn(10003,'禁用失败');
}
private function ApiViolationGoodsList(Request $request)
{
$Field = ['mobile','start_time','end_time','audit_status','limit'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$Redis = new RedisModel();
$UserId = $Redis->hget('ic_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
$map = [];
if(!empty($collert['audit_status']))
$map[] = ['audit_status','=',$collert['audit_status']];
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$map[] = ['update_time','>=',$collert['start_time']];
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$map[] = ['update_time','<=',$collert['end_time']];
}
if(empty($collert['limit']))
$collert['limit'] = 10;
$Model = new SkuViolation();
$result= $Model->SkuViolationList($map,$collert['limit']);
return $this->apiReturn(0,'ok',$result);
}
private function ApiEnableGoods($request){
$collert = TrimX(['id','enable_remark']);
if(empty($collert['id']))
return $this->apiReturn(10001,'没有可以操作的记录');
if(empty($collert['id']))
return $this->apiReturn(10002,'没有可以恢复的商品');
$collert['id'] = array_unique($collert['id']);
foreach ($collert['id'] as $k=>$v){
if(!empty($v))
$map['id'][] = $k;
}
$map['enable_remark'] = '默认';
$Url = config('website.GoodsInfoServer').'/goods/audit/enable/status';
$collert['audit_status'] = 1;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'恢复成功');
return $this->apiReturn(10003,'恢复失败');
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use Illuminate\Http\Request;
class InquiryWebController extends Controller
{
public function Entrance(Request $request,$id='index')
{
if($request->path() == '/') $path = 'web/index';
else $path = $request->path();
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'useremail' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('NotFind','没有这个页面');
}
private function inquiryList()
{
$this->data['title'] = '询价列表';
$this->data['Source'] = config('config.source');
$this->data['Status'] = config('config.goods_status');
$this->data['audit_status'] = config('config.audit_status');
return $this->view();
}
private function inquiryDetails(Request $request){
$this->data['title']='询价详情';
$inquiry_id = $request->input('inquiry_items_id');
if(empty($inquiry_id)) return back();
$Url = config('website.OfferServer').'/inquiry/info';
$result = curl($Url,['inquiry_items_id'=>$inquiry_id],true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !== 0 || empty($result['data'][$inquiry_id]))
return back();
$Redis = new RedisModel();
$this->data['info'] = json_decode($Redis->hget('ic_user',$result['data'][$inquiry_id]['user_id']),true);
$this->data['inquiry_info'] = $this->DataMachining($result['data'][$inquiry_id]);
return $this->view();
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use Illuminate\Http\Request;
class OfferApiController extends Controller
{
public function Entrance(Request $request, $id )
{
return $this->$id($request, $id);
}
private function ApiOfferList($request){
$Redis = new RedisModel();
$Field = ['mobile','source/eq','start_time','end_time','status/eq','p','limit','goods_name/like', 'inquiry_items_id/eq'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$UserId = $Redis->hget('ic_user_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$collert['add_time/gt'] = $collert['start_time'];
unset($collert['start_time']);
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$collert['add_time/lt'] = $collert['end_time'];
unset($collert['end_time']);
}
$collert['add_time/order'] = 'desc';
$ESUrl = config('website.ES_URL').'/search/get_offer';
$result = json_decode(curl($ESUrl,$collert,true),true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$total = $result['data']['total'];
$OfferUrl = config('website.OfferServer').'/offer/info';
$OfferMap = ['offer_id'=>$result['data']['offer_id']];
$result = json_decode(curl($OfferUrl,http_build_query($OfferMap),true),true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$Redis = new RedisModel();
foreach ($result['data'] as $k=>&$v){
$UserInfo = json_decode($Redis->hget('ic_user',$v['user_id']),true);
$v['company_name'] = !empty($UserInfo['company_name']) ? $UserInfo['company_name'] : '';
$v['mobile'] = !empty($UserInfo['mobile']) ? $UserInfo['mobile'] : '';
//查找详情
unset($v['goods_name']);
$v['items_num'] = '未报价';
if(!empty($v['items'])){
$Items = end($v['items']);
$v = array_merge($v,$Items);
if($v['price'] >0 ) $v['items_num'] = count($v['items']);
}
$v = $this->DataMachining($v);
}
$result['data'] = array_values($result['data']);
return $this->apiReturn(0,'ok',['data'=>$result['data'],'count'=>(int)$total]);
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use Illuminate\Http\Request;
class OfferWebController extends Controller
{
public function Entrance(Request $request,$id='index')
{
if($request->path() == '/') $path = 'web/index';
else $path = $request->path();
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'useremail' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('NotFind','没有这个页面');
}
public function OfferList($request){
$this->data['title'] = '报价列表';
return $this->view();
}
public function OfferDetails($request){
$this->data['title'] = '报价详情';
$offer_id = $request->input('offer_id');
if(empty($offer_id)) return back();
$Url = config('website.OfferServer').'/offer/info';
$result = curl($Url,['offer_id'=>$offer_id],true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !== 0 || empty($result['data'][$offer_id]))
return back();
$Redis = new RedisModel();
$this->data['info'] = json_decode($Redis->hget('ic_user',$result['data'][$offer_id]['user_id']),true);
$this->data['offer_info'] = $this->DataMachining($result['data'][$offer_id]);
$this->data['offer_info'] = $this->DataMachining($this->data['offer_info']);
if(!empty($this->data['offer_info']['items']))
$this->data['offer_info']['items'] = array_values($this->data['offer_info']['items']);
$Url = config('website.OfferServer').'/inquiry/info';
$result = curl($Url,['inquiry_items_id'=>$this->data['offer_info']['inquiry_items_id']],true);
$result = json_decode($result,true);
$this->data['inquiry_info'] = [];
if(!empty($result['data'][$this->data['offer_info']['inquiry_items_id']]))
$this->data['inquiry_info'] = $result['data'][$this->data['offer_info']['inquiry_items_id']];
$this->data['inquiry_info'] = $this->DataMachining($this->data['inquiry_info']);
return $this->view();
}
}
<?php
namespace App\Http\Controllers;
use App\Model\UUIDModel;
use Illuminate\Http\Request;
class WebController extends Controller
{
public function Entrance(Request $request,$id='index')
{
if($request->path() == '/') $path = 'web/index';
else $path = $request->path();
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'useremail' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('NotFind','没有这个页面');
}
private function index()
{
$this->data['title'] = '首页';
return $this->view();
}
}
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\CheckLogin::class
],
'api' => [
'throttle:60,1',
'bindings',
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
];
}
<?php
namespace App\Http\Middleware;
use Closure;
use App\Http\Output;
use App\Http\Error;
use Config;
use DB;
use GuzzleHttp\Psr7\Request;
class CheckLogin
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$userId = $request->cookie('oa_user_id');
$skey = $request->cookie('oa_skey');
$isApi = $request->ajax();
$login = config('website.login');
if (!$userId || !$skey || (string)((int)$userId) != $userId || !preg_match('/^[a-zA-Z0-9]+$/', $skey)) {
if ($isApi)
return ["errcode" => 1000, "errmsg" => "没有登录"];
return redirect($login['login'] . '?redirect=' . urlencode($request->url()));
}
$cookie = 'oa_user_id=' . $userId . '; oa_skey=' . $skey;
$rsp = curl($login['check'],'',false,$cookie);
if (!$rsp) {
if ($isApi)
return ['errcode' =>10001, 'errmsg' => '鉴权失败'];
abort(500);
}
$ret = json_decode($rsp);
if ($ret->retcode != 0) {
if ($isApi)
return ["errcode" => $ret->retcode, "errmsg" => $ret->errMsg];
return redirect($login['login'] . '?redirect=' . urlencode($request->url()));
}
$user = $ret->data;
$user->header = $request->cookie('oa_header');
$request->user = $user;
//处理权限和菜单
$permArr = config('website.perm');
$action = $request->route('key');
empty($action) && $action = 'Dashboard';
//获取菜单
if(!$isApi){
$menuconfig = json_decode(curl($permArr['menuUrl'].$permArr['menuId']));
if(empty($menuconfig->data)){
return $this->view('error','菜单生成错误,请联系技术');
}else $menuconfig = $menuconfig->data;
$menus = !in_array($request->user->userId,$permArr['adminGroup']) ?
menu($menuconfig,$request->user->userId) : $menuconfig;
if(empty($menus))
return $this->view('Auth','没有访问权限',$permArr['goUrl']);
$request->menus = $menus;
}
if(!in_array($user->userId,$permArr['adminGroup']) && $action!='Dashboard'){//不是超级管理员
$perm=perm($request->user->userId,$action);
if($perm!==true){
if($isApi)
return apiReturn(10001,'没有权限');
return $this->view('Auth','没有访问权限',$permArr['goUrl']);
}
}
return $next($request,$action);
}
private function view($errcode,$errinfo,$goUrl=''){
$data=[
'errcode'=>$errcode,
'errinfo'=>$errinfo,
'url'=>$goUrl
];
return view('errors.error', $data);
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array
*/
protected $except = [
//
];
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
}
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
*/
protected $proxies;
/**
* The current proxy header mappings.
*
* @var array
*/
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
}
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
];
}
<?php
namespace App\Model;
use App\User;
use Illuminate\Database\Eloquent\Model;
class GoodsModel extends Model
{
protected $connection=false;
protected $table=false;
public $timestamps = false;
//生成数据库连接(要根据规则修改)
private function ConnectDB($SkuId){
$dt = resolve($SkuId);
$this->connection = $dt['db'];
$this->table = $dt['table'];
$this->id = $dt['id'];
return true;
}
public function GoodsList($map=''){
$Url = config('website.ES_URL').'/search/get_data';
$result = curl($Url,$map,true);
$result = json_decode($result,true);
if(!$result || !isset($result['errcode']) || $result['errcode']!==0 || empty($result['data']['goods_id'])) return false;
$data['count'] = (int)$result['data']['total'];
$Url = config('website.GoodsInfoServer').'/goods/info';
$map['goods_id'] = $result['data']['goods_id'];
$map['update_time/order'] = 'desc';
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(!$result || !isset($result['errcode']) || $result['errcode'] !==0 || empty($result['goods_list']))
return false;
$UserModel = new UserModel();
foreach ($result['goods_list'] as $k=>&$v){
if(empty($v)){
unset($result['goods_list'][$k]);
$data['count']--;
}
if(!empty($v['user_id'])){
$UserInfo = $UserModel->getUserInfo($v['user_id']);
$v = array_merge($UserInfo,$v);
}
}
$result['goods_list'] = array_values($result['goods_list']);
$data['data'] = $result['goods_list'];
return $data;
}
public function HDGoodsInfo($SkuID){
$Url = config('website.GoodsInfoServer').'/goods/info';
$map['goods_id'] = $SkuID;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(empty($result['goods_list'][$SkuID]))
return false;
$info = $result['goods_list'][$SkuID];
$Source = config('config.source');
$info['source_name'] = $Source[$info['source']];
$info['update_time_s'] = date('Y-m-d H:i',$info['update_time']);
return $info;
}
public function HDGoodsUser($UserID){
$Redis = new RedisModel();
return json_decode($Redis->hget('ic_user',$UserID),true);
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Redis;
class RedisModel extends Model
{
const WRITE_CONNECT_METHOD = ['set', 'del', 'rpush','lpush', 'expire', 'hset', 'hmset', 'hdel','hsetnx'];
private $read = [];
private $write = [];
public function __construct($ConnectWrite = 'default', $ConnectRead = 'read')
{
parent::__construct();
$this->read = Redis::connection($ConnectRead);
$this->write = Redis::connection($ConnectWrite);
}
public function __call($method, $args)
{
if (in_array($method, self::WRITE_CONNECT_METHOD)) {
return $this->write->$method(...$args);
} else {
try {
return $this->read->$method(...$args);
} catch (ConnectionException $e) {
return $this->write->$method(...$args);
}
}
}
//管道
public function pipeline_to_hset($data){
return $this->write->pipeline(function ($pipe) use ($data) {
foreach ($data['data'] as $k => $v) {
$pipe->hset($data['key'],$k,$v);
}
});
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SkuViolation extends Model
{
protected $table='sku_violation';
public $timestamps = false;
public function HdSkuViolation(){
}
public function SkuViolationList($map,$limit=10){
$list = $this->where($map)->orderBy('add_time','desc')->paginate($limit)->toArray();
if(!$list || empty($list['data'])) return false;
//提取SkuID
foreach ($list['data'] as $k=>$v)
$SkuIDArr[] = $v['goods_id'];
$Url = config('website.GoodsInfoServer').'/goods/info';
$map['goods_id'] = $SkuIDArr;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(empty($result['goods_list']))
return false;
$UserModel = new UserModel();
foreach ($list['data'] as $k=>&$v){
if(empty($result['goods_list'][$v['goods_id']]))
continue;
$v = array_merge($result['goods_list'][$v['goods_id']],$v);
if(!empty($v['user_id'])){
$UserInfo = $UserModel->getUserInfo($v['user_id']);
$v = array_merge($UserInfo,$v);
}
}
return $list;
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class UUIDModel extends Model
{
const EPOCH = 1479533469598;
const max12bit = 4095;
const max41bit = 1099511627775;
static $machineId = null;
protected $connection=false;
protected $table=false;
public $timestamps = false;
/*
* $type str ic_goods=商品 ic_offer=报价 ic_inquiry=询价
*/
public function generateParticle($type='ic_goods')
{
/*
* Time - 42 bits
*/
$time = floor(microtime(true) * 1000);
/*
* Substract custom epoch from current time
*/
$time -= self::EPOCH;
/*
* Create a base and add time to it
*/
return self::max41bit + $time;
$base = decbin(self::max41bit + $time);
/*
* Configured machine id - 10 bits - up to 1024 machines
*/
if(!self::$machineId) {
$machineid = self::$machineId;
} else {
$machineid = str_pad(decbin(self::$machineId), 10, "0", STR_PAD_LEFT);
}
/*
* sequence number - 12 bits - up to 4096 random numbers per machine
*/
$random = str_pad(decbin(mt_rand(0, self::max12bit)), 12, "0", STR_PAD_LEFT);
/*
* Pack
*/
return $base;
$base = $base.$machineid.$random;
return $base;
/*
* Return unique time id no
*/
$UUID = (string)bindec($base);
return $this->Occupy($type,$UUID);
}
private function Occupy($type,$UUID)
{
$Redis = new RedisModel();
if($Redis->hsetnx($type,$UUID,1))
return $UUID;
return $this->generateParticle($type);
}
}
<?php
namespace App\model;
use Illuminate\Database\Eloquent\Model;
class UserModel extends Model
{
protected $connection=false;
protected $table=false;
public $timestamps = false;
private $pre='ic_user';
public function getUserInfo($UserId){
if(empty($UserId)) return false;
$Redis = new RedisModel();
$Cache = json_decode($Redis->hget($this->pre,$UserId),true);
if(!$Cache) return false;
return $Cache;
}
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'App\Events\Event' => [
'App\Listeners\EventListener',
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
parent::boot();
//
}
}
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @return void
*/
public function boot()
{
//
parent::boot();
}
/**
* Define the routes for the application.
*
* @return void
*/
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
#!/usr/bin/env php
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
);
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
require __DIR__ . '/../app/Http/function.php';
return $app;
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"predis/predis": "^1.1",
"illuminate/redis": "^5.5"
},
"require-dev": {
"filp/whoops": "~2.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~6.0",
"symfony/thanks": "^1.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
This diff could not be displayed because it is too large.
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'PRC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,//广播服务注册
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
*/
'default' => env('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => env(
'CACHE_PREFIX',
str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
),
];
<?php
/**
* Created by PhpStorm.
* User: ICHUNT
* Date: 2019-06-21
* Time: 14:42
*/
return [
'source'=>[
1=>'小程序',
2=>'PC',
3=>'安卓APP',
4=>'苹果APP',
5=>'微信公众号',
6=>'H5'
],
'goods_status'=>[
1=>'上架',
2=>'下架',
3=>'删除'
],
'goods_prohibit'=>[
'违规商品消息',
'重复提交数据',
'广告、虚假信息发布'
],
'audit_status'=>[
1=>'正常',
2=>'禁用'
],
'currency'=>[
1=>'¥',
2=>'$'
]
];
\ No newline at end of file
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => env('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8',
'collation' => 'utf8_general_ci',
'prefix' => env('DB_PREFIX', ''),
'strict' => true,
'engine' => null,
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
// 'redis' => [
//
// 'client' => 'predis',
//
// 'default' => [
// 'host' => env('REDIS_HOST', '127.0.0.1'),
// 'password' => env('REDIS_PASSWORD', null),
// 'port' => env('REDIS_PORT', 6379),
// 'database' => 0,
// ],
//
// ],
'redis' => [
'cluster' => false,
'default' => [
'host' => env('REDIS_HOST',''),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 0,//new
],
'read' =>[
'host' => env('REDIS_READ_HOST', ''),
'password' => env('REDIS_READ_PASSWORD', null),
'port' => env('REDIS_READ_PORT', 6379),
'database' => 0,
'read_write_timeout' => 0,//new
]
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 'local'),
/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "log", "array"
|
*/
'driver' => env('MAIL_DRIVER', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587),
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'default' => env('QUEUE_DRIVER', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('SQS_KEY', 'your-public-key'),
'secret' => env('SQS_SECRET', 'your-secret-key'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'your-queue-name'),
'region' => env('SQS_REGION', 'us-east-1'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'retry_after' => 90,
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => null,
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using the "apc" or "memcached" session drivers, you may specify a
| cache store that should be used for these sessions. This value must
| correspond with one of the application's configured cache stores.
|
*/
'store' => null,
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'cookie' => env(
'SESSION_COOKIE',
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application but you are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'domain' => env('SESSION_DOMAIN', null),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you if it can not be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE', false),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
'http_only' => true,
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place.
|
| Supported: "lax", "strict"
|
*/
'same_site' => null,
];
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
resource_path('views'),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => realpath(storage_path('framework/views')),
];
<?php
return [
'admin' => ['ymx@ichunt.com'],
'webTitle' => 'IC助手后台',
'domain' => env('domain'),
'login' => [
'login' => 'http://' . env('LOGIN_DOMAIN', '') . '/login',
'logout'=> 'http://' . env('LOGIN_DOMAIN', '') . '/logout',
'check' => 'http://' . env('LOGIN_DOMAIN', '') . '/api/checklogin',
'search'=> 'http://' . env('LOGIN_DOMAIN', '') . '/api/search',
'dashboard'=>'http://'.env('LOGIN_DOMAIN', '') . '/dashboard',
],
'perm' => [
'id' => env('PERM_ID'),
'url' => env('PERM_URL'),
'goUrl' => env('PERM_GOURL'),
'adminGroup'=> explode(',',env('ADMIN_GROUP')),//管理员权限组,有所有权限
'menuId' => env('MENU_ID'),
'menuUrl' => env('MENU_URL'),
'menuSign' => env('MENU_SIGN'),
'notAuth' => explode(',',env('NOT_AUTH'))//不用验证权限的方法
],
'data' => env('DATA_DOMAIN', 'news.liexin.com'),
'upload' => [
'url' => 'http://api.ichunt.com/oss/upload',
'key' => 'fh6y5t4rr351d2c3bryi'
],
'ES_URL' => env('ES_URL',''),
'GoodsInfoServer' => 'http://192.168.2.232:61002',
'OfferServer' => 'http://192.168.2.232:61004'
];
<?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
});
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}
<?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// $this->call(UsersTableSeeder::class);
}
}
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.17",
"bootstrap-sass": "^3.3.7",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^1.0",
"lodash": "^4.17.4",
"vue": "^2.5.7"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
<?php
abstract class Particle {
const EPOCH = 1479533469598;
const max12bit = 4095;
const max41bit = 1099511627775;
static $machineId = null;
public static function machineId($mId = 0) {
self::$machineId = $mId;
}
public static function generateParticle() {
/*
* Time - 42 bits
*/
$time = floor(microtime(true) * 1000);
/*
* Substract custom epoch from current time
*/
$time -= self::EPOCH;
/*
* Create a base and add time to it
*/
$base = decbin(self::max41bit + $time);
var_dump($base);
/*
* Configured machine id - 10 bits - up to 1024 machines
*/
var_dump(self::$machineId);
if(!self::$machineId) {
$machineid = self::$machineId;
} else {
$machineid = str_pad(decbin(self::$machineId), 10, "0", STR_PAD_LEFT);
}
var_dump($machineid);
/*
* sequence number - 12 bits - up to 4096 random numbers per machine
*/
$random = str_pad(decbin(mt_rand(0, self::max12bit)), 12, "0", STR_PAD_LEFT);
var_dump($random);
/*
* Pack
*/
$base = $base.$machineid.$random;
/*
* Return unique time id no
*/
return bindec($base);
}
public static function timeFromParticle($particle) {
/*
* Return time
*/
return bindec(substr(decbin($particle),0,41)) - self::max41bit + self::EPOCH;
}
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTa-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTZX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTaaRobkAwv3vxw3jMhVENGA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTf8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTT0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTegdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSq-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSpX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNShWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSqaRobkAwv3vxw3jMhVENGA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSv8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSj0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSugdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzBWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzKaRobkAwv3vxw3jMhVENGA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzP8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/0eC6fl06luXEYWpBSJvXCBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/Fl4y0QdOxyyTHEGMXX8kcRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/-L14Jk06m6pUHB-5mXQQnRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/I3S1wsgSg9YCurV6PUkTORJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/NYDWBdD4gIq26G5XYbHsFBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/Pru33qjShpZSmG3z6VYwnRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/Hgo13k-tfSpn0qi1SFdUfVtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/-2n2p-_Y08sg57CNWQfKNvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/u0TOpm082MNkS5K0Q4rhqvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/NdF9MtnOpLzo-noMoG0miPesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/Fcx7Wwv8OzT71A3E1XOAjvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/CWB0XYA8bzo0kSThX0UTuA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/ZLqKeelYbATG60EpZBSDyxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/oHi30kwQWvpCWqAhzHcCSBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/rGvHdJnr2l75qb0YND9NyBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/mx9Uck6uB63VIKFYnEMXrRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/mbmhprMH69Zi6eEPBYVFhRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/oOeFwZNlrTefzLYmlVV1UBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/RxZJdnzeo3R5zSexge8UUVtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/77FXFjRbGzN4aCrSFhlh3hJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/isZ-wbCXNKAbnjo6_TwHThJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/UX6i4JxQDm3fVTc1CPuwqhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/jSN2CGVDbcVyCnfJfjSdfBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/PwZc-YbIL414wB9rB1IAPRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/97uahxiqZRoncBaCEI3aWxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
.btn{
color: #fff;
background-color: #337ab7;
border-color: #2e6da4;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
text-decoration: none;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
a.btn:hover{
background-color: #3366b7;
}
.progress{
margin-top:2px;
width: 200px;
height: 14px;
margin-bottom: 10px;
overflow: hidden;
background-color: #f5f5f5;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.progress-bar{
background-color: rgb(92, 184, 92);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.14902) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.14902) 50%, rgba(255, 255, 255, 0.14902) 75%, transparent 75%, transparent);
background-size: 40px 40px;
box-shadow: rgba(0, 0, 0, 0.14902) 0px -1px 0px 0px inset;
box-sizing: border-box;
color: rgb(255, 255, 255);
display: block;
float: left;
font-size: 12px;
height: 20px;
line-height: 20px;
text-align: center;
transition-delay: 0s;
transition-duration: 0.6s;
transition-property: width;
transition-timing-function: ease;
width: 266.188px;
}
\ No newline at end of file
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
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