Commit 172ca9a1 by yink

历史提交

parent 7e1daeaf
...@@ -17,3 +17,4 @@ yarn-error.log ...@@ -17,3 +17,4 @@ yarn-error.log
/.fleet /.fleet
/.idea /.idea
/.vscode /.vscode
*.log
\ No newline at end of file
<?php
namespace App\Admin\Actions;
use Dcat\Admin\Actions\Response;
use App\Admin\Forms\EditShareUserForm;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Traits\HasPermissions;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Http\Request;
use Dcat\Admin\Widgets\Modal;
class EditShareUserAct extends RowAction
{
protected $uid = 0;
/**
* 接收参数
*/
public function __construct($title = '', $uid = 0)
{
$this->uid = $uid;
parent::__construct($title);
$this->title = $title;
}
/**
* @return string
*/
//protected $title = '<i class="feather icon-stop-circle"> </i>';
/**
* 按钮文本
*
* @return string|void
*/
public function title()
{
return '<i class="feather icon-edit-1"></i> ' . $this->title . '';
}
/**
* Handle the action request.
*
* @param Request $request
*
* @return Response
*/
public function handle(Request $request)
{
$id = $this->getKey() ?? 0;
return $this->response()->success('成功')->refresh();
}
/**
* 渲染模态框.
* @return Modal
*/
public function render()
{
// 这里直接创建一个modal框 model的内容由工具表单提供,这里也需要创建一个工具表单才行
return Modal::make()
->lg()
->title($this->title)
->button($this->title())
->body(EditShareUserForm::make()->payload(['uid' => $this->uid]));
//->button("<button class='btn btn-sm btn-primary'>$this->title</button>"); // 这个button就是对应上面的按钮
}
/**
* @return string|array|void
*/
public function confirm()
{
// return ['Confirm?', 'contents'];
}
/**
* @param Model|Authenticatable|HasPermissions|null $user
*
* @return bool
*/
protected function authorize($user): bool
{
return true;
}
/**
* @return array
*/
protected function parameters()
{
return [];
}
}
<?php
namespace App\Admin\Actions;
use Dcat\Admin\Actions\Response;
use App\Admin\Forms\TransferBillsPlatForm;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Traits\HasPermissions;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Http\Request;
use Dcat\Admin\Widgets\Modal;
class TransferToPlatForm extends RowAction
{
protected $id = 0;
/**
* 接收参数
*/
public function __construct($title = '', $id = 0)
{
$this->id = $id;
parent::__construct($title);
$this->title = $title;
}
/**
* 按钮文本
*
* @return string|void
*/
public function title()
{
return '<i class="feather icon-edit"></i> ' . $this->title;
}
/**
* Handle the action request.
*
* @param Request $request
*
* @return Response
*/
public function handle(Request $request)
{
$id = $this->getKey() ?? 0;
return $this->response()->success('成功')->refresh();
}
/**
* 渲染模态框.
* @return Modal
*/
public function render()
{
// 这里直接创建一个modal框 model的内容由工具表单提供,这里也需要创建一个工具表单才行
return Modal::make()
->lg()
->title($this->title)
->button($this->title())
->body(TransferBillsPlatForm::make()->payload(['id' => $this->id]));
}
/**
* @return string|array|void
*/
public function confirm()
{
//return ['Confirm?', 'contents'];
}
/**
* @param Model|Authenticatable|HasPermissions|null $user
*
* @return bool
*/
protected function authorize($user): bool
{
return true;
}
/**
* @return array
*/
protected function parameters()
{
return [];
}
}
...@@ -25,7 +25,7 @@ class UserBuyCode extends RowAction ...@@ -25,7 +25,7 @@ class UserBuyCode extends RowAction
*/ */
public function title() public function title()
{ {
return '<i class="feather icon-stop-circle"></i> ' . $this->title . ''; return '<i class="feather icon-edit"></i> ' . '直购码';
} }
/** /**
* Handle the action request. * Handle the action request.
...@@ -55,7 +55,7 @@ public function render() ...@@ -55,7 +55,7 @@ public function render()
return Modal::make() return Modal::make()
->lg() ->lg()
->title('直购码') ->title('直购码')
->button("直购码") ->button($this->title())
->body(BuyCodeForm::make()) ->body(BuyCodeForm::make())
->onShown( ->onShown(
<<<js <<<js
......
<?php
namespace App\Admin\Controllers;
use App\Models\Category;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;
use Dcat\Admin\Tree;
use Dcat\Admin\Http\Controllers\AdminController;
use NwVVVS\AdapaySdk\AdapayTools;
class CategoryControllerTest extends AdminController
{
public function index(Content $content)
{
return $content->header('对账单下载')
->description('csv')
->body(function (Row $row) {
// 移除表单创建逻辑
// 这里可以添加你想要展示的内容,例如文本信息
//$row->column(12, '<p>这是对账单下载页面,请选择合适的操作。</p>');
// 添加时间选择控件和按钮
$row->column(12, '<input type="date" id="download-date" />');
$row->column(12, '<button id="download-button">下载</button>');
// 添加 JavaScript 代码绑定点击事件
$row->column(
12,
<<<HTML
<script>
document.getElementById('download-button').addEventListener('click', function() {
var date = document.getElementById('download-date').value;
if (date) {
fetch('/category-download?date=' + date, {
method: 'GET'
})
.then(response => response.json())
.then(data => {
console.log(data);
// 这里可以添加更多处理逻辑,例如显示提示信息
});
} else {
alert('请选择日期');
}
});
</script>
HTML
);
});
}
/**
* 处理下载请求
*/
public function download()
{
$date = request()->input('date');
# 初始化对账单下载对象类
$bill = new AdapayTools;
# 对账单日期
# 对账单下载
$bill->download(["bill_date" => "20250303"]);
# 对账单下载结果进行处理
if ($bill->isError()) {
//失败处理
//var_dump($bill->result);
} else {
//成功处理
//var_dump($bill->result);
}
return response()->json(['message' => '下载请求已接收', 'date' => $bill]);
}
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new Category(), function (Grid $grid) {
$grid->column('id')->sortable();
$grid->column('parent_id');
$grid->column('title');
$grid->column('icon');
$grid->column('order');
$grid->column('show');
$grid->column('created_at');
$grid->column('updated_at')->sortable();
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('id');
});
// 隐藏列表操作按钮
$grid->disableActions();
// 隐藏列表顶部的按钮
$grid->disableCreateButton();
$grid->disableBatchDelete();
$grid->disableExport();
$grid->disableFilterButton();
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new Category(), function (Show $show) {
$show->field('id');
$show->field('parent_id');
$show->field('title');
$show->field('icon');
$show->field('order');
$show->field('show');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new Category(), function (Form $form) {
$form->display('id');
$form->select('parent_id')
->options(Category::selectOptions())
->saving(function ($v) {
return $v ?? 0;
});
$form->text('title');
// $form->image('icon', '分类图标')
// ->accept('jpg,jpeg,png')
// ->maxSize(4096)
// ->url('upload/category')
// ->help('仅支持jpg、jpeg、png格式图片上传(750px * 420px)')
// ->autoUpload();
$form->text('order')->help('越小越靠前');
$form->switch('show', '状态')->default(1);
// $form->display('created_at');
// $form->display('updated_at');
// 隐藏表单底部的按钮
$form->disableResetButton();
$form->disableViewCheck();
$form->disableEditingCheck();
$form->disableCreatingCheck();
// 如果你想隐藏提交按钮,可以使用以下代码
// $form->disableSubmit();
});
}
}
...@@ -64,6 +64,9 @@ protected function grid() ...@@ -64,6 +64,9 @@ protected function grid()
$grid->column('is_hot', '是否推荐')->display(function ($val) { $grid->column('is_hot', '是否推荐')->display(function ($val) {
return ($val == 1) ? '是' : '否'; return ($val == 1) ? '是' : '否';
}); });
$grid->column('goods_type', '是否代购')->display(function ($val) {
return ($val == 1) ? '是' : '否';
});
$grid->column('is_show', '状态')->switch('', true); $grid->column('is_show', '状态')->switch('', true);
//$grid->column('updated_at')->sortable(); //$grid->column('updated_at')->sortable();
...@@ -149,7 +152,7 @@ protected function form() ...@@ -149,7 +152,7 @@ protected function form()
$form->image('cover_img') $form->image('cover_img')
->url('upload/goods') ->url('upload/goods')
->deleteUrl('upload/delete-public-oss-file') ->deleteUrl('upload/delete-public-oss-file')
->autoUpload(); ->autoUpload()->help("仅支持jpg、jpeg、png格式图片上传,尺寸大小 280px * 280px");
// $form->image('cover_img') // $form->image('cover_img')
// ->accept('jpg,jpeg,png') // ->accept('jpg,jpeg,png')
// ->maxSize(4096) // ->maxSize(4096)
...@@ -163,14 +166,15 @@ protected function form() ...@@ -163,14 +166,15 @@ protected function form()
// ->help('仅支持jpg、jpeg、png格式图片上传(尺寸 750px*750px)') // ->help('仅支持jpg、jpeg、png格式图片上传(尺寸 750px*750px)')
// ->limit(5) // ->limit(5)
// ->autoUpload()->saveAsJson(); // ->autoUpload()->saveAsJson();
$form->multipleImage('carousel', '产品图') $form->multipleImage('carousel', '轮播图')
->accept('jpg,jpeg,png') ->accept('jpg,jpeg,png')
->maxSize(51200) ->maxSize(51200)
->url('upload/goods') ->url('upload/goods')
->help('仅支持jpg、jpeg、png格式图片上传') ->help('仅支持jpg、jpeg、png格式图片上传,尺寸大小 750px * 600px')
->limit(9) ->limit(9)
->autoUpload()->saveAsJson(); ->autoUpload()->saveAsJson();
$form->switch('is_show', '上架状态')->default(1); $form->switch('is_show', '上架状态')->default(1);
$form->switch('goods_type', '是否代购产品')->default(0);
$form->switch('is_hot', '是否推荐')->default(0); $form->switch('is_hot', '是否推荐')->default(0);
$form->text('sort', '排序')->default(0)->help('越大越靠前'); $form->text('sort', '排序')->default(0)->help('越大越靠前');
$form->disableCreatingCheck(); $form->disableCreatingCheck();
......
<?php
namespace App\Admin\Controllers;
use App\Command\Log;
use App\Models\HfCompanyMember;
use App\Models\HfProvAreaCode;
use App\Models\Adapay;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Widgets\Card;
use App\Models\Merchant;
use Illuminate\Support\Facades\DB;
class HfCompanyMemberController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new HfCompanyMember(), function (Grid $grid) {
$grid->column('id')->sortable();
$grid->model()->orderBy('created_at', 'DESC');
//$grid->column('order_no');
$grid->column('cont_name', '联系人姓名');
$grid->column('cont_phone', '手机号');
//$grid->column('email');
$grid->column('entry_mer_type')->display(function ($val) {
return $val == 1 ? '企业' : '个体工商户';
});
$grid->column('social_credit_code');
$grid->column('name');
$grid->column('social_credit_code_begin');
$grid->column('social_credit_code_expires');
$grid->column('address');
$grid->column('business_scope')->display('点击查看')->modal(function ($modal) {
//设置弹窗标题
$modal->title('经营范围');
$content = $this->business_scope . "<br/>";
$card = new Card(null, $content);
return "<div style='padding:10px 10px 0;width:100%;'>$card</div>";
});
$grid->column('legal_person', '法人信息')->display('点击查看')->modal(function ($modal) {
//设置弹窗标题
$modal->title('法人信息');
$content = '法人姓名:' . $this->legal_person . "<br/>";
$content .= '法人身份证号:' . $this->legal_cert_id . "<br/>";
$content .= '法人证件有效期起始日期:' . $this->legal_cert_id_begin . "<br/>";
$content .= '法人证件有效期截止日期:' . $this->legal_cert_id_expires . "<br/>";
$content .= '法人手机号:' . $this->legal_mp . "<br/>";
$card = new Card(null, $content);
return "<div style='padding:10px 10px 0;width:100%;'>$card</div>";
});
$grid->column('status', '审核状态')->display(function ($val) {
$str = '等待审核';
if ($val == 'failed') {
$str = '拒绝';
} elseif ($val == 'succeeded') {
$str = '通过';
}
return $str;
});
$grid->column('audit_desc', '审核原因')->display('点击查看')->modal(function ($modal) {
//设置弹窗标题
$modal->title('审核原因');
$content = $this->audit_desc . "<br/>";
$card = new Card(null, $content);
return "<div style='padding:10px 10px 0;width:100%;'>$card</div>";
});
$grid->disableViewButton();
$grid->disableDeleteButton();
$grid->disableRowSelector();
$grid->actions(function (Grid\Displayers\Actions $actions) {
$rowData = $actions->row;
if ($rowData['status'] != 'failed') {
$actions->disableEdit();
}
});
$grid->filter(function (Grid\Filter $filter) {
// 更改为 panel 布局
$filter->panel();
$filter->like('cont_name', '联系人姓名')->width(3);
$filter->like('cont_phone')->width(3);
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new HfCompanyMember(), function (Show $show) {
$show->field('id');
$show->field('order_no');
$show->field('cont_name');
$show->field('cont_phone');
$show->field('email');
$show->field('entry_mer_type');
$show->field('social_credit_code');
$show->field('name');
$show->field('social_credit_code_begin');
$show->field('social_credit_code_expires');
$show->field('address');
$show->field('business_scope');
$show->field('legal_cert_type');
$show->field('legal_cert_id');
$show->field('legal_person');
$show->field('legal_cert_id_begin');
$show->field('legal_cert_id_expires');
$show->field('legal_mp');
$show->field('attach_file');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
$form = Form::make(new HfCompanyMember(), function (Form $form) {
$form->display('id');
//$form->text('order_no');
$form->select('merchant_id', '商家名称')
->options(Merchant::whereNull('deleted_at')->get()->pluck('name', 'id'))->required();
// $order_no = 'cm' . date("YmdHis") . mt_rand(10000, 99999);
// $form->text('order_no')->default($order_no); //请求订单号
$form->text('cont_name')->required();
$form->text('cont_phone')->required();
$form->text('email')->required();
$form->radio('entry_mer_type')->options(['0' => '个体工商户', '1' => '企业'])->default(1);
$form->text('social_credit_code')->required()->help('示例值:91310104660736427E');
$form->text('name')->required()->help('示例值:上海汇付支付有限公司');
$form->select('prov_code', '省份')->options(HfProvAreaCode::where('parent_id', 0)->pluck('title', 'area_code'))->rules('required')->load('area_code', '/hf-area-code');
// 城市
$form->select('area_code', '城市')->required();
$form->text('social_credit_code_begin')->required()->help('示例值:20220427');
$form->text('social_credit_code_expires')->required()->help('示例值:20270427');
$form->text('address')->required();
$form->text('business_scope')->required();
$form->hidden('legal_cert_type')->default('00');
$form->text('legal_cert_id', '法人身份证号码')->required();
$form->text('legal_person')->required();
$form->text('legal_cert_id_begin')->required()->help('示例值:20170428');
$form->text('legal_cert_id_expires')->required()->help('示例值:20370428');
$form->text('legal_mp')->required();
$form->file('attach_file', '附件')
->url('upload/huifu')
->deleteUrl('upload/delete-public-oss-file')
->autoUpload()
->required()
->help('内容须包含三证合一证件照、法人身份证正面照、法人身份证反面照、开户银行许可证照。 压缩 zip包后上传,最大限制为 9 M'); //hf
$form->text('bank_code', '开户银行编码')->required()->help('示例值:01020000 <a href="https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/Adapay/prod/common/documents/Adapay%E6%94%AF%E6%8C%81%E9%93%B6%E8%A1%8C%E5%88%97%E8%A1%A8.xlsx" target="_blank">银行代码表</a>');
$form->text('card_no', '银行卡号(对公)')->required();
$form->text('card_name', '银行卡对应的户名')->required();
$form->hidden('audit_state');
$form->hidden('audit_desc');
$form->disableCreatingCheck();
$form->disableEditingCheck();
$form->disableViewCheck();
$form->disableDeleteButton();
$form->disableViewButton();
// $form->display('created_at');
// $form->display('updated_at');
});
//汇付注册企业用户
$form->saved(
function (Form $form, $result) {
$hf_id = $form->getKey();
$params = $_POST ?? [];
$member_params = array(
# app_id
"app_id" => env('HUIFU_APPID'),
# 商户用户id
"member_id" => "cm_id" . $params['merchant_id'],
# 订单号
"order_no" => 'corp_member' . date("YmdHis") . mt_rand(10000, 99999),
# 企业名称
"name" => $params['name'],
'prod_mode' => false,
# 省份
"prov_code" => $params['prov_code'],
# 地区
"area_code" => $params['area_code'],
# 统一社会信用码
"social_credit_code" => $params['social_credit_code'],
"social_credit_code_expires" => $params['social_credit_code_expires'],
# 经营范围
"business_scope" => $params['business_scope'],
# 证件类型
"legal_cert_type" => '00',
# 法人姓名
"legal_person" => $params['legal_person'],
# 法人身份证号码
"legal_cert_id" => $params['legal_cert_id'],
# 法人身份证有效期
"legal_cert_id_expires" => $params['legal_cert_id_expires'],
# 法人手机号
"legal_mp" => $params['legal_mp'],
# 企业地址
"address" => $params['address'],
# 邮编
"zip_code" => "",
# 异步通知
"notify_url" => env('API_URL') . '/hf-company-member-notify',
# 企业邮箱
"email" => $params['email'],
# 上传附件
"attach_file" => new \CURLFile($params['attach_file']),
"bank_acct_type" => 1, //结算账户类型 1 对公
# 银行卡号
"card_no" => $params['card_no'], //如果需要自动开结算账户,本字段必填
# 银行卡对应的户名
"card_name" => $params['card_name'], //如果需要自动开结算账户,本字段必填
#结算账户开户银行编码
"bank_code" => $params['bank_code'], //如果需要自动开结算账户,本字段必填
);
$result = (new Adapay())->createCompany($member_params);
Log::add('创建企业用户响应结果', $result);
if ($result['status'] == 'failed') {
DB::table('hf_company_member')->where('id', $hf_id)->delete();
return $form->response()->error($result['error_msg']);
} else {
DB::table('hf_company_member')->where('id', $hf_id)->update(['member_id' => $result['member_id'], 'order_no' => $result['order_no'], 'status' => $result['status']]);
}
}
);
return $form;
}
}
<?php
namespace App\Admin\Controllers;
use App\Models\City;
use App\Models\HfProvAreaCode;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;
use Illuminate\Http\Request;
class HfProvAreaCodeController extends AdminController
{
public function getList(Request $request)
{
$code = $request->get('q');
$id = HfProvAreaCode::where('area_code', $code)->value('id');
return HfProvAreaCode::where('parent_id', $id)->select(['area_code as id', 'title as text'])->get();
}
}
<?php
namespace App\Admin\Controllers;
use App\Models\Merchant;
use App\Models\OrderDivideRecord;
use App\Models\User;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;
use App\Admin\Actions\TransferToPlatForm;
class OrderDivideRecordController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(OrderDivideRecord::with(['order', 'users']), function (Grid $grid) {
$grid->model()->orderBy('id', 'DESC');
$grid->column('id')->sortable();
$grid->column('order.order_sn', '订单号');
$grid->column('users.phone', '下单会员手机号');
//$grid->column('og_id', '订单商品ID');
$grid->column('order_price', '订单商品价格');
$grid->column('divide_price', '佣金');
//$grid->column('proportion', '分佣比例%');
$grid->column('sh_type', '推荐类型')->display(function ($val) {
$arr = ['平台', '直推', '间推', '商家'];
return $arr[$val];
});
$grid->column('is_div', '是否分账')->display(function ($val) {
return $val == 1 ? '是' : '否';
});
$grid->column('um_id', '推荐公司/分享人')->display(function ($val) {
$stype = $this->sh_type;
$name = '';
if ($stype == 3) {
$name = Merchant::where('id', $val)->value('name');
} else {
$name = $stype ? User::where('id', $val)->value('phone') : '';
}
return $name;
});
$grid->column('remark', '备注')->width(80);
$grid->column('created_at');
//$grid->column('updated_at')->sortable();
$grid->disableCreateButton();
$grid->disableViewButton();
$grid->disableEditButton();
$grid->disableDeleteButton();
$grid->disableRowSelector();
$grid->filter(function (Grid\Filter $filter) {
// 更改为 panel 布局
$filter->panel();
$filter->like('order.order_sn', '订单号')->width(3);
});
$grid->actions(function (Grid\Displayers\Actions $actions) {
//分账给平台
if ($actions->row->is_div == 0 && in_array($actions->row->sh_type, [1, 2])) {
$actions->append(new TransferToPlatForm('分账给平台', $actions->row->id));
}
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new OrderDivideRecord(), function (Show $show) {
$show->field('id');
$show->field('order_id');
$show->field('user_id');
$show->field('og_id');
$show->field('order_price');
$show->field('divide_price');
$show->field('proportion');
$show->field('sh_type');
$show->field('is_div');
$show->field('remark');
$show->field('um_id');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new OrderDivideRecord(), function (Form $form) {
$form->display('id');
$form->text('order_id');
$form->text('user_id');
$form->text('og_id');
$form->text('order_price');
$form->text('divide_price');
$form->text('proportion');
$form->text('sh_type');
$form->text('is_div');
$form->text('remark');
$form->text('um_id');
$form->display('created_at');
$form->display('updated_at');
});
}
}
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
use Dcat\Admin\Widgets\Card; use Dcat\Admin\Widgets\Card;
use Dcat\Admin\Http\Controllers\AdminController; use Dcat\Admin\Http\Controllers\AdminController;
use App\Admin\Forms\VerifierCodeForm; use App\Admin\Forms\VerifierCodeForm;
use App\Admin\Forms\ShippingForm;
use Dcat\Admin\Admin; use Dcat\Admin\Admin;
...@@ -28,7 +29,7 @@ class OrderInfoController extends AdminController ...@@ -28,7 +29,7 @@ class OrderInfoController extends AdminController
protected function grid() protected function grid()
{ {
return Grid::make(OrderInfo::with(['user', 'merchant']), function (Grid $grid) { return Grid::make(OrderInfo::with(['user', 'merchant']), function (Grid $grid) {
$grid->model()->orderBy('created_at', 'DESC'); $grid->model()->orderBy('id', 'DESC');
$grid->column('id')->sortable(); $grid->column('id')->sortable();
$grid->column('order_sn', '订单号')->width(80); $grid->column('order_sn', '订单号')->width(80);
$grid->column('mobile', '手机号'); $grid->column('mobile', '手机号');
...@@ -116,6 +117,17 @@ protected function grid() ...@@ -116,6 +117,17 @@ protected function grid()
// 传递当前行字段值 // 传递当前行字段值
return VerifierCodeForm::make()->payload(['id' => $this->id]); return VerifierCodeForm::make()->payload(['id' => $this->id]);
}); });
//下单送货上门、门店自提均需要核销码用户确认,无需后台接入发货管理(放在核销员端)
// ->if(function ($column) {
// return ($column->getValue() == 3 && $this->shipping_type == 0);
// })->display('点击发货')->modal(function (Grid\Displayers\Modal $modal) {
// // 标题
// $modal->title('发货');
// // 自定义图标
// $modal->icon('feather icon-edit');
// // 传递当前行字段值
// return ShippingForm::make()->payload(['id' => $this->id]);
// })
$grid->column('verification_code', '核销码')->limit(10); $grid->column('verification_code', '核销码')->limit(10);
$grid->column('verifier', '核销信息')->if(function ($column) { $grid->column('verifier', '核销信息')->if(function ($column) {
return $column->getValue(); return $column->getValue();
...@@ -136,11 +148,13 @@ protected function grid() ...@@ -136,11 +148,13 @@ protected function grid()
})->else(function ($column) { })->else(function ($column) {
return ''; return '';
}); });
//$grid->column('updated_at')->sortable(); //$grid->column('updated_at')->sortable();
//$grid->disableActions(); //$grid->disableActions();
$grid->disableCreateButton(); $grid->disableCreateButton();
$grid->disableViewButton(); $grid->disableViewButton();
$grid->filter(function (Grid\Filter $filter) { $grid->filter(function (Grid\Filter $filter) {
// 更改为 panel 布局 // 更改为 panel 布局
$filter->panel(); $filter->panel();
......
...@@ -72,7 +72,7 @@ protected function form() ...@@ -72,7 +72,7 @@ protected function form()
$form->display('id'); $form->display('id');
//$form->ignore(['pwd']); // 忽略password字段 //$form->ignore(['pwd']); // 忽略password字段
$form->text('name')->required(); $form->text('name')->required();
$form->text('username'); $form->text(column: 'username');
if ($form->isCreating()) { if ($form->isCreating()) {
$form->password('password', '密码')->saving(function ($password) { $form->password('password', '密码')->saving(function ($password) {
return bcrypt($password); return bcrypt($password);
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
namespace App\Admin\Controllers; namespace App\Admin\Controllers;
use App\Handlers\AilOss; use App\Handlers\AliOss;
use OSS\Core\OssException; use OSS\Core\OssException;
use Dcat\Admin\Traits\HasUploadedFile; use Dcat\Admin\Traits\HasUploadedFile;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Intervention\Image\Facades\Image; use Intervention\Image\Facades\Image;
use App\Models\Adapay;
class UploadController class UploadController
{ {
...@@ -20,7 +21,7 @@ class UploadController ...@@ -20,7 +21,7 @@ class UploadController
public function deleteOssFile() public function deleteOssFile()
{ {
$ossPath = request()->post('key') ?? ''; $ossPath = request()->post('key') ?? '';
$aliOss = new AilOss(); $aliOss = new AliOss();
$res = $aliOss->delete($ossPath); $res = $aliOss->delete($ossPath);
return $res ? $this->responseDeleted() : $this->responseDeleteFailed('文件删除失败'); return $res ? $this->responseDeleted() : $this->responseDeleteFailed('文件删除失败');
} }
...@@ -31,7 +32,7 @@ public function deleteOssFile() ...@@ -31,7 +32,7 @@ public function deleteOssFile()
public function deletePublicOssFile() public function deletePublicOssFile()
{ {
$ossPath = request()->post('key') ?? ''; $ossPath = request()->post('key') ?? '';
$aliOss = new AilOss(); $aliOss = new AliOss();
if (strstr($ossPath, 'aliyuncs') !== false) { if (strstr($ossPath, 'aliyuncs') !== false) {
$res = $aliOss->delete($ossPath); //, 'OSS_BUCKET' $res = $aliOss->delete($ossPath); //, 'OSS_BUCKET'
return $res ? $this->responseDeleted() : $this->responseDeleteFailed('文件删除失败'); return $res ? $this->responseDeleted() : $this->responseDeleteFailed('文件删除失败');
...@@ -110,7 +111,7 @@ public function userUpload() ...@@ -110,7 +111,7 @@ public function userUpload()
*/ */
public function goodsUpload() public function goodsUpload()
{ {
$aliOss = new AilOss(); $aliOss = new AliOss();
// 获取上传的文件 // 获取上传的文件
$file = $this->file(); $file = $this->file();
...@@ -135,43 +136,10 @@ public function goodsUpload() ...@@ -135,43 +136,10 @@ public function goodsUpload()
} }
public function goodsUpload2()
{
$disk = $this->disk();
// 判断是否是删除文件请求
if ($this->isDeleteRequest()) {
// 删除文件并响应
return $this->deleteFileAndResponse();
}
// 获取上传的文件
$file = $this->file();
//获取文件扩展名
$ext = $file->getClientOriginalExtension();
$img = Image::make($file->getRealPath())
->resize(640, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->encode($ext, 90);
$dir = '/goods/' . date("Ymd");
$newName = md5(uniqid()) . '.' . $ext;
$path = "{$dir}/$newName";
$result = $disk->put($path, $img);
return $result
? $this->responseUploaded($path, $disk->url($path))
: $this->responseErrorMessage('文件上传失败');
}
//商品规格图 //商品规格图
public function uploadSkuImage(Request $request) public function uploadSkuImage(Request $request)
{ {
$aliOss = new AilOss(); $aliOss = new AliOss();
if ($request->hasFile('file')) { if ($request->hasFile('file')) {
$file = $request->file('file'); $file = $request->file('file');
$disk = $this->disk(); $disk = $this->disk();
...@@ -187,43 +155,14 @@ public function uploadSkuImage(Request $request) ...@@ -187,43 +155,14 @@ public function uploadSkuImage(Request $request)
return ['url' => env('OSS_PUBLIC_IMAGE_URL') . $ossFilePath]; return ['url' => env('OSS_PUBLIC_IMAGE_URL') . $ossFilePath];
} }
} }
public function uploadSkuImage2(Request $request)
{
if ($request->hasFile('file')) {
$file = $request->file('file');
//$disk = Storage::disk('cosv5');
// $ext = $file->getClientOriginalExtension();
$disk = $this->disk();
// $url = 'sku';
// $res = $disk->put($url, $file);
//获取文件扩展名
$ext = $file->getClientOriginalExtension();
$img = Image::make($file->getRealPath())
->resize(640, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->encode($ext, 90);
$dir = '/goods/' . date("Ymd");
$newName = md5(uniqid()) . '.' . $ext;
$path = "{$dir}/$newName";
$result = $disk->put($path, $img);
$url = $result ? $path : '';
// 返回格式
return ['url' => env('IMAGE_URL') . $url];
}
return [];
}
//轮播图
public function carouselUpload() public function carouselUpload()
{ {
$aliOss = new AilOss(); $aliOss = new AliOss();
// 获取上传的文件 // 获取上传的文件
$file = $this->file();; $file = $this->file();
Image::make($file->getRealPath()) Image::make($file->getRealPath())
->resize(640, null, function ($constraint) { ->resize(640, null, function ($constraint) {
$constraint->aspectRatio(); $constraint->aspectRatio();
...@@ -241,6 +180,41 @@ public function carouselUpload() ...@@ -241,6 +180,41 @@ public function carouselUpload()
? $this->responseUploaded(env('OSS_PUBLIC_IMAGE_URL') . $ossFilePath, '') ? $this->responseUploaded(env('OSS_PUBLIC_IMAGE_URL') . $ossFilePath, '')
: $this->responseErrorMessage('文件上传失败'); : $this->responseErrorMessage('文件上传失败');
} }
//汇付图片(先调用汇付,再调用alioss)
public function huifuUpload()
{
//汇付类型
// $file_type = [
// 'social_credit_code_id' => '01',
// 'legal_cert_id_front_id' => '02',
// 'legal_cert_id_back_id' => '03',
// ];
// $upload_column = $_POST['upload_column'] ?? '';
$aliOss = new AliOss();
// 获取上传的文件
$file = $this->file();
$ext = $file->getClientOriginalExtension();
// Image::make($file->getRealPath())
// ->resize(640, null, function ($constraint) {
// $constraint->aspectRatio();
// $constraint->upsize();
// })->encode('jpg', 90);
$fileName = uniqid() . '.' . $ext;
$date = date('Ymd');
$ossFilePath = 'huifu/' . $date . '/' . $fileName;
//获取文件的绝对路径
$path = $file->getRealPath();
$res = $aliOss->upload($ossFilePath, $path, 'OSS_PUBLIC_BUCKET');
return $res
? $this->responseUploaded(env('OSS_PUBLIC_IMAGE_URL') . $ossFilePath, '')
: $this->responseErrorMessage('文件上传失败');
}
public function carouselUpload2() public function carouselUpload2()
{ {
$disk = $this->disk(); $disk = $this->disk();
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
use App\Admin\Forms\EditPermission; use App\Admin\Forms\EditPermission;
use App\Admin\Forms\updatePassword; use App\Admin\Forms\updatePassword;
use App\Admin\Actions\UserBuyCode; use App\Admin\Actions\UserBuyCode;
use App\Admin\Actions\EditShareUserAct;
use Dcat\Admin\Grid\RowAction; use Dcat\Admin\Grid\RowAction;
use App\Models\User; use App\Models\User;
use App\Models\UserPermission; use App\Models\UserPermission;
...@@ -46,9 +47,10 @@ protected function grid() ...@@ -46,9 +47,10 @@ protected function grid()
//$grid->simplePaginate(); //$grid->simplePaginate();
$grid->actions(function (Grid\Displayers\Actions $actions) { $grid->actions(function (Grid\Displayers\Actions $actions) {
$actions->append(new EditShareUserAct('更改所属上级', $actions->row->id));
$actions->append(new UserBuyCode($actions->row->id)); $actions->append(new UserBuyCode($actions->row->id));
// 添加一个按钮,并设置其属性 // 添加一个按钮,并设置其属性
$actions->append('<a href="/user-share?id=' . $this->id . '" alt="查看下级" target="_blank">查看下级</a>'); $actions->append('<a href="/user-share?id=' . $this->id . '" alt="查看下级" target="_blank"><i class="feather icon-list"> 查看下级 </i></a>');
// 或者使用 RowAction 来添加按钮 // 或者使用 RowAction 来添加按钮
//$actions->append(RowAction::make('自定义按钮')->route('custom.route')); //$actions->append(RowAction::make('自定义按钮')->route('custom.route'));
......
<?php
namespace App\Admin\Forms;
use App\Admin\Actions\UserBuyCode;
use App\Command\Log;
use App\Models\Company;
use App\Models\Employee;
use App\Models\Income;
use App\Models\Merchant;
use App\Models\Pay;
use App\Models\User;
use App\Models\UserBuycodeCheck;
use Dcat\Admin\Widgets\Form;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Exception;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Request;
class EditShareUserForm extends Form implements LazyRenderable
{
use LazyWidget;
/**
* Handle the form request.
*
* @param array $input
*
* @return mixed
*/
public function handle(array $input)
{
DB::beginTransaction();
try {
$user_id = $this->payload['uid'];
$phone = trim($input['phone']); //推荐人手机号
$spObj = User::where('phone', $phone)->first();
if (!$spObj) {
throw new Exception('该推荐人信息不存在!');
}
$uObj = User::find($user_id);
Log::add('更改推荐人前信息uid:' . $user_id, ['spuid' => $uObj->spuid, 'second_spuid' => $uObj->second_spuid]);
if ($uObj) {
$uObj->spuid = $spObj->id; //直推
$uObj->second_spuid = $spObj->spuid ?? 0; //间推
$uObj->save();
Log::add('更改推荐人后信息uid:' . $user_id, ['spuid' => $uObj->spuid, 'second_spuid' => $uObj->second_spuid]);
}
DB::commit();
} catch (\Exception $exception) {
DB::rollBack();
return $this->response()->error($exception->getMessage())->refresh();
}
return $this->response()->success('提交成功')->refresh();
}
/**
* Build a form here.
*/
public function form()
{
$this->text('phone', '推荐手机号');
}
/**
* The data of the form.
*
* @return array
*/
public function default()
{
// 获取外部传递参数
return [];
}
}
<?php
namespace App\Admin\Forms;
use App\Command\Log;
use App\Models\OrderInfo;
use Dcat\Admin\Widgets\Form;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use App\Handlers\MpAaccessToken;
use App\Models\PaymentRecord;
use App\Models\User;
use Illuminate\Support\Facades\DB;
use DateTime;
use DateTimeZone;
use Exception;
//发货
class ShippingForm extends Form implements LazyRenderable
{
use LazyWidget;
/**
* Handle the form request.
*
* @param array $input
*
* @return mixed
*/
public function handle(array $input)
{
$mpTokenObj = new MpAaccessToken();
$dateTime = new DateTime();
$dateTime->setTimezone(new DateTimeZone('Asia/Shanghai'));
$upload_time = $dateTime->format('Y-m-d\TH:i:s.vP');
$shipping_type = intval($input['shipping_type']);
$shipping_name = trim($input['shipping_name']);
$shipping_code = trim($input['shipping_code']);
$shipping_goods = trim($input['shipping_goods']);
$order_id = $this->payload['id'];
$order = OrderInfo::find($order_id);
$order->shipping_type = $shipping_type;
$order->shipping_code = $shipping_code;
$order->shipping_name = $shipping_name;
$order->shipping_goods = $shipping_goods;
$order->shipping_at = date("Y-m-d H:i:s");
try {
//接入微信小程序发货管理
if (1) {
//付款记录
$recordObj = PaymentRecord::where('order_sn', $order->order_sn)->first();
$transaction_id = $recordObj->other_order;
$payerOpenid = User::where('id', $recordObj->uid)->value('openid');
$access_token = $mpTokenObj->getAccessToken();
$url = "https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?access_token=" . $access_token;
$data = [
"order_key" => [
"order_number_type" => 2,
"transaction_id" => $transaction_id,
],
"logistics_type" => 4,
"delivery_mode" => 1,
"shipping_list" => [
["item_desc" => $order->shipping_goods]
],
"upload_time" => $upload_time,
"payer" => [
"openid" => $payerOpenid,
]
];
$headers = array("Content-type: application/json;charset=UTF-8");
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
// 设置HTTP头部
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data, JSON_UNESCAPED_UNICODE));
$response = curl_exec($curl);
$result = json_decode($response, true);
// 关闭cURL会话
curl_close($curl);
Log::add('发货录入', $result);
if ($result['errcode'] != 0) {
throw new Exception($result['errmsg']);
}
}
DB::commit();
} catch (\Exception $exception) {
DB::rollBack();
return $this->response()->error($exception->getMessage())->refresh();
}
return $this->response()->success('确认成功')->refresh();
}
/**
* Build a form here.
*/
public function form()
{
$this->radio('shipping_type', '发货方式')
->when([1, 2], function (Form $form) {
$form->text('shipping_name', '快递公司');
$form->text('shipping_code', '快递单号');
})
->options([
1 => '物流快递',
2 => '同城配送',
3 => '用户自提',
4 => '虚拟发货',
])
->default(1);
$this->text('shipping_goods', '商品信息')->required();
}
/**
* The data of the form.
*
* @return array
*/
public function default()
{
// 获取外部传递参数
return [];
}
}
<?php
namespace App\Admin\Forms;
use App\Models\OrderDivideRecord;
use App\Command\Log;
use App\Models\OrderInfo;
use App\Models\Adapay;
use App\Models\User;
use App\Models\PaymentRecord;
use Dcat\Admin\Widgets\Form;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use App\Models\HfPayconfirm;
use Exception;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Request;
class TransferBillsPlatForm extends Form implements LazyRenderable
{
use LazyWidget;
/**
* Handle the form request.
*
* @param array $input
*
* @return mixed
*/
public function handle(array $input)
{
$payment_confirm = new \NwVVVS\AdapaySdk\PaymentConfirm(); //支付确认
$id = $this->payload['id'];
DB::beginTransaction();
try {
$remark = trim($input['remark']);
$recordObj = OrderDivideRecord::find($id);
if (!$recordObj && $recordObj->is_div == 1) {
throw new Exception('数据不存在或该用户已分账!');
}
$divide_price = $recordObj->divide_price; //分账佣金
$um_id = $recordObj->um_id; //推荐分享人
$userObj = User::find($um_id);
Log::add('推荐人信息', $userObj->toArray());
//交易记录
$order_no = OrderInfo::where('id', $recordObj->order_id)->value('order_sn');
$prObj = PaymentRecord::where('order_sn', $order_no)->first();
# 支付确认参数设置
$payment_params = array(
"payment_id" => $prObj->payment_id,
"order_no" => 'payconfirm_' . date("YmdHis") . rand(100000, 999999),
"confirm_amt" => $divide_price,
"description" => "",
"div_members" => "" //分账参数列表 默认是数组List
);
$userObj->total_revenue -= $divide_price;
$userObj->save();
Log::add('推荐人账户更新信息', $userObj->toArray());
# 发起支付确认创建
$payment_params['div_members'] = ['member_id' => 0, 'amount' => sprintf("%.2f", $divide_price), 'fee_flag' => 'Y'];
$result = (new Adapay())->createPaymentConfirm($payment_params);
# 对支付确认创建结果进行处理
if ($result['status'] == 'succeeded') {
//成功处理
Log::add('分账给平台成功', ['recond_id' => $recordObj->id]);
$recordObj->remark = $remark;
$recordObj->payconfirm_no = $result['order_no'];
$recordObj->is_div = 1;
$recordObj->um_id = 0;
$recordObj->sh_type = 0;
$recordObj->save();
//写入支付确认信息
(new HfPayconfirm())->add($payment_params, $result['fee_amt']);
}
DB::commit();
} catch (\Exception $exception) {
DB::rollBack();
return $this->response()->error($exception->getMessage())->refresh();
}
return $this->response()->success('提交成功')->refresh();
}
/**
* Build a form here.
*/
public function form()
{
$this->text('remark', '备注')->required();
}
/**
* The data of the form.
*
* @return array
*/
public function default()
{
// 获取外部传递参数
return [];
}
}
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
$router->match(['put', 'post'], 'upload/carousel', 'UploadController@carouselUpload'); //上传轮播图 $router->match(['put', 'post'], 'upload/carousel', 'UploadController@carouselUpload'); //上传轮播图
$router->match(['put', 'post'], 'upload/huifu', 'UploadController@huifuUpload'); //上传汇付平台图片
$router->match(['put', 'post'], 'upload/article', 'UploadController@articleUpload'); //上传文章图 $router->match(['put', 'post'], 'upload/article', 'UploadController@articleUpload'); //上传文章图
$router->match(['put', 'post'], 'upload/skuImage', 'UploadController@uploadSkuImage'); //上传商品规格图 $router->match(['put', 'post'], 'upload/skuImage', 'UploadController@uploadSkuImage'); //上传商品规格图
...@@ -42,6 +44,9 @@ ...@@ -42,6 +44,9 @@
$router->resource('category', 'CategoryController'); //分类管理 $router->resource('category', 'CategoryController'); //分类管理
$router->resource('category-test', 'CategoryControllerTest'); //对账单下载-页面
$router->get('category-download','CategoryControllerTest@download'); //对账单下载-下载
$router->resource('article', 'ArticleController'); //文章管理 $router->resource('article', 'ArticleController'); //文章管理
$router->resource('goods', 'GoodController'); //商品管理 $router->resource('goods', 'GoodController'); //商品管理
...@@ -52,6 +57,8 @@ ...@@ -52,6 +57,8 @@
$router->resource('orderInfo', 'OrderInfoController'); //订单管理 $router->resource('orderInfo', 'OrderInfoController'); //订单管理
$router->resource('order-divide-record', 'OrderDivideRecordController'); //订单分佣记录
$router->resource('user', 'UserController'); //用户管理 $router->resource('user', 'UserController'); //用户管理
$router->resource('user-share', 'ShareController'); //查看下级 $router->resource('user-share', 'ShareController'); //查看下级
...@@ -76,5 +83,10 @@ ...@@ -76,5 +83,10 @@
$router->get('city', 'CityController@getList'); //城市选择-联动 $router->get('city', 'CityController@getList'); //城市选择-联动
$router->get('hf-area-code', 'HfProvAreaCodeController@getList'); //汇付城市编码-联动
$router->get('get-store-list', 'MerchantGoodsStoreController@getList'); //门店选择-联动 $router->get('get-store-list', 'MerchantGoodsStoreController@getList'); //门店选择-联动
$router->resource('hf-company-member', 'HfCompanyMemberController'); //汇付天下-企业用户
}); });
<?php <?php
namespace App\Command; namespace App\Command;
use Illuminate\Http\Request;
class Log{ class Log{
static public function add(string $logKey, mixed $logInfo) :void{ static public function add(string $logKey, mixed $logInfo, ?Request $request = null) :void{
//判断当天的日志文件是否存在 try {
// 判断当天的日志文件是否存在
$day = date('Y-m-d'); $day = date('Y-m-d');
$logFileName = 'runLog_'.$day.'.log'; $logFileName = 'runLog_'.$day.'.log';
$logPath = storage_path("logs/".$logFileName); $logPath = storage_path("logs/".$logFileName);
file_put_contents($logPath,date('【 H:i:s 】'.$logKey.': ').print_r($logInfo,true),FILE_APPEND);
// 检查日志目录是否存在,如果不存在则创建
if (!is_dir(dirname($logPath))) {
mkdir(dirname($logPath), 0777, true);
} }
// 拼接用户信息
if ($request && $request->user()) {
$userObj = $request->user();
$userInfo = "【-----------用户信息----------】".PHP_EOL;
$userInfo .= "【用户ID】: ".$userObj->id.";".PHP_EOL;
$userInfo .= "【用户名称】: ".$userObj->name.";".PHP_EOL;
// 添加请求参数到日志信息
$requestParams = $request->all();
$paramInfo = "【请求参数】: ".print_r($requestParams, true).PHP_EOL;
$userInfo .= $paramInfo;
} else {
$userInfo = "【-----------用户信息----------】".PHP_EOL;
$userInfo .= "【未获取到用户信息】".PHP_EOL;
}
// 获取请求路径
$requestPath = $request ? $request->getPathInfo() : 'N/A';
// 添加请求路径到日志信息
$logMessage = "--------------------".str_repeat("-", 20).PHP_EOL;
$logMessage .= "【".date('Y-m-d H:i:s')."】".PHP_EOL."【返回值:】".$userInfo."【请求路径】: $requestPath 【".$logKey."】: ".print_r($logInfo, true).PHP_EOL;
$logMessage .= "--------------------".str_repeat("-", 20).PHP_EOL.PHP_EOL;
// 添加换行符
file_put_contents($logPath, $logMessage, FILE_APPEND);
} catch (\Exception $e) {
// 记录异常信息到另一个日志文件
$errorLogPath = storage_path("logs/error_log.log");
file_put_contents($errorLogPath, "【".date('Y-m-d H:i:s')."】【add日志 方法出错】: ". $e->getMessage(). PHP_EOL, FILE_APPEND);
}
}
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
class Tools{ class Tools{
//计算俩地距离 // 计算俩地距离
function get_two_point_distance($lat1,$lng1,$lat2,$lng2) function get_two_point_distance($lat1,$lng1,$lat2,$lng2)
{ {
$radLat1 = deg2rad($lat1);//deg2rad()函数将角度转换为弧度 $radLat1 = deg2rad($lat1);//deg2rad()函数将角度转换为弧度
...@@ -16,5 +16,28 @@ function get_two_point_distance($lat1,$lng1,$lat2,$lng2) ...@@ -16,5 +16,28 @@ function get_two_point_distance($lat1,$lng1,$lat2,$lng2)
return round($s,2);//返回公里数 return round($s,2);//返回公里数
} }
// 新增结算日期计算方法
public static function calculateSettlementDate(\Carbon\Carbon $date)
{
// 在原有的 T + 1 基础上额外加 5 小时
$settlementDate = $date->copy()->addDay()->addHours(5);
// 跳过周末(需补充节假日判断)
while ($settlementDate->isWeekend()) {
$settlementDate->addDay();
}
return $settlementDate;
}
// 计算 T+1 未到账金额
public static function calculatePendingCashout($merchant_id)
{
return \App\Models\OrderDivideRecord::where('um_id', $merchant_id)
->get()
->filter(function ($record) {
$createdAt = $record->created_at;
$settlementDate = self::calculateSettlementDate($createdAt);
// 修改为通过秒来判断
return now()->timestamp <= $settlementDate->timestamp;
})->sum('divide_price');
}
} }
<?php
namespace App\Handlers;
use Exception;
use OSS\OssClient;
use OSS\Core\OssException;
require_once '../vendor/aliyuncs/oss-sdk-php/autoload.php';
class AliOss
{
public static $oss;
/**
* @throws \OSS\Core\OssException
*/
public function __construct()
{
$accessKeyId = env('OSS_ACCESS_KEY_ID'); //获取阿里云oss的accessKeyId
$accessKeySecret = env('OSS_ACCESS_KEY_SECRET'); //获取阿里云oss的accessKeySecret
$endpoint = env('OSS_ENDPOINT'); //获取阿里云oss的endPoint
self::$oss = new OssClient($accessKeyId, $accessKeySecret, $endpoint); //实例化OssClient对象
}
/**
*
* 使用阿里云oss上传文件
* @param $object 保存到阿里云oss的文件名
* @param $filepath 文件在本地的绝对路径
* @return bool 上传是否成功
* @throws \OSS\Core\OssException
*/
public function upload($object, $filepath, $bucket = 'OSS_BUCKET')
{
$res = false;
$bucket = env($bucket); //获取阿里云oss的bucket
try {
self::$oss->uploadFile($bucket, $object, $filepath);
} catch (OssException $e) {
print_r($e->getMessage());
die;
}
if (self::$oss->uploadFile($bucket, $object, $filepath)) { //调用uploadFile方法把服务器文件上传到阿里云oss
$res = true;
}
return $res;
}
/**
* 删除指定文件
* @param $object string 被删除的文件名
* @return bool 删除是否成功
*/
public function delete(string $object, $bucket = 'OSS_BUCKET')
{
$res = false;
$bucket = env($bucket);
if (self::$oss->deleteObject($bucket, $object)) { //调用deleteObject方法把服务器文件上传到阿里云oss
$res = true;
}
return $res;
}
/**
* 删除指定文件
* @param $object 被删除的文件名
* @return bool 删除是否成功
*/
public function delete_array($objects, $bucket = 'OSS_BUCKET')
{
$res = false;
$bucket = env($bucket);
if (self::$oss->deleteObjects($bucket, $objects)) { //调用deleteObject方法把服务器文件上传到阿里云oss
$res = true;
}
return $res;
}
/*获取文件的临时访问URL*/
public function getUrl($OssFilePath, $time = 1800, $bucket = 'OSS_BUCKET')
{
// 生成一个带签名的URL,有效期是3600秒,可以直接使用浏览器访问。
$timeout = $time;
$bucket = env($bucket);
return self::$oss->signUrl($bucket, $OssFilePath, $timeout, "GET");
}
/**
* 在OSS中创建虚拟“文件夹”。名称不应以“/”结尾,因为该方法无论如何都会用“/”追加名称。
*
* Internal use only.
*
* @param string $dirName 文件夹名称
* @return bool
*/
public function createDir($dirName, $bucket = 'OSS_BUCKET')
{
$res = false;
$bucket = env($bucket);
if (self::$oss->createObjectDir($bucket, $dirName)) {
$res = true;
}
return $res;
}
/*获取指定目录下的目录与文件*/
public function fileList($dir, $maxKey = 1000, $delimiter = '/', $nextMarker = '')
{
$fileList = []; // 获取的文件列表, 数组的一阶表示分页结果
$dirList = []; // 获取的目录列表, 数组的一阶表示分页结果
$storageList = [
'file' => [], // 真正的文件数组
'dir' => [], // 真正的目录数组
];
while (true) {
$options = [
'delimiter' => $delimiter,
'prefix' => $dir,
'max-keys' => $maxKey,
'marker' => $nextMarker,
];
$bucket = env('OSS_BUCKET');
try {
$fileListInfo = self::$oss->listObjects($bucket, $options);
// 得到nextMarker, 从上一次 listObjects 读到的最后一个文件的下一个文件开始继续获取文件列表, 类似分页
} catch (\Exception $e) {
return $e->getMessage(); // 发送错误信息
}
$nextMarker = $fileListInfo->getNextMarker();
$fileItem = $fileListInfo->getObjectList();
$dirItem = $fileListInfo->getPrefixList();
$fileList[] = $fileItem;
$dirList[] = $dirItem;
if ($nextMarker === '') break;
}
foreach ($fileList[0] as $item) {
$storageList['file'][] = $this->objectInfoParse($item);
}
foreach ($dirList[0] as $item) {
$storageList['dir'][] = $this->prefixInfoParse($item);
}
return $storageList; // 发送正确信息
}
/* 解析 prefixInfo 类 */
private function prefixInfoParse($prefixInfo)
{
return [
'dir' => $prefixInfo->getPrefix(),
];
}
/* 解析 objectInfo 类 */
public function objectInfoParse($objectInfo)
{
return [
'name' => $objectInfo->getKey(),
'size' => $objectInfo->getSize(),
'update_at' => $objectInfo->getLastModified(),
];
}
}
<?php
namespace App\Handlers;
use Illuminate\Support\Facades\Cache;
//小程序accesstoken
class MpAaccessToken
{
private $appId;
private $appSecret;
public function __construct()
{
$this->appId = env('WX_XCX_APPID');
$this->appSecret = env('WX_XCX_KEY');
}
public function getAccessToken()
{
// access_token 应该全局存储与更新,以下代码以写入到文件中做示例
//$data = json_decode(file_get_contents("access_token.json"));
$token = Cache::get('access_token_expire_time');
$data = $token ? $token : ['expire_time' => 0];
if ($data['expire_time'] < time()) {
// 如果是企业号用以下URL获取access_token
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$this->appId&secret=$this->appSecret";
$res = json_decode($this->httpGet($url));
$access_token = $res->access_token;
if ($access_token) {
$data['expire_time'] = time() + 7000;
$data['access_token'] = $access_token;
Cache::set('access_token_expire_time', $data);
}
} else {
$access_token = $data['access_token'];
}
return $access_token;
}
private function httpGet($url)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);
return $res;
}
}
...@@ -42,3 +42,25 @@ function togetherFilePath($path = '') ...@@ -42,3 +42,25 @@ function togetherFilePath($path = '')
} }
return $path; return $path;
} }
function curl_post_request($url, $data)
{
$headers = array("Content-type: application/json;charset=UTF-8");
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
// 设置HTTP头部
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data, JSON_UNESCAPED_UNICODE));
$response = curl_exec($curl);
$result = json_decode($response, true);
// 关闭cURL会话
curl_close($curl);
return $result;
}
...@@ -75,4 +75,1746 @@ public function flush($mobile, $event = 'default') ...@@ -75,4 +75,1746 @@ public function flush($mobile, $event = 'default')
return true; return true;
} }
//录入城市编码
public function addCityCode()
{
$str = '[
{
"value": "0011",
"title": "北京市",
"cities": [
{
"value": "1100",
"title": "北京市"
}
]
},
{
"value": "0012",
"title": "天津市",
"cities": [
{
"value": "1200",
"title": "天津市"
}
]
},
{
"value": "0013",
"title": "河北省",
"cities": [
{
"value": "1301",
"title": "石家庄"
},
{
"value": "1302",
"title": "保定"
},
{
"value": "1303",
"title": "沧州"
},
{
"value": "1304",
"title": "承德"
},
{
"value": "1305",
"title": "邯郸"
},
{
"value": "1306",
"title": "衡水"
},
{
"value": "1307",
"title": "廊坊"
},
{
"value": "1308",
"title": "秦皇岛"
},
{
"value": "1309",
"title": "唐山"
},
{
"value": "1310",
"title": "邢台"
},
{
"value": "1311",
"title": "张家口"
}
]
},
{
"value": "0014",
"title": "山西省",
"cities": [
{
"value": "1401",
"title": "太原"
},
{
"value": "1402",
"title": "长治"
},
{
"value": "1403",
"title": "大同"
},
{
"value": "1404",
"title": "晋城"
},
{
"value": "1405",
"title": "离石"
},
{
"value": "1406",
"title": "临汾"
},
{
"value": "1407",
"title": "朔州"
},
{
"value": "1408",
"title": "忻州"
},
{
"value": "1409",
"title": "阳泉"
},
{
"value": "1410",
"title": "榆次"
},
{
"value": "1411",
"title": "运城"
},
{
"value": "1412",
"title": "晋中"
},
{
"value": "1413",
"title": "吕梁"
}
]
},
{
"value": "0015",
"title": "内蒙古自治区",
"cities": [
{
"value": "1501",
"title": "呼和浩特"
},
{
"value": "1502",
"title": "包头"
},
{
"value": "1503",
"title": "阿拉善"
},
{
"value": "1504",
"title": "巴彦淖尔"
},
{
"value": "1505",
"title": "赤峰"
},
{
"value": "1506",
"title": "呼伦贝尔"
},
{
"value": "1507",
"title": "乌海"
},
{
"value": "1508",
"title": "乌兰察布"
},
{
"value": "1509",
"title": "锡林郭勒"
},
{
"value": "1510",
"title": "兴安"
},
{
"value": "1511",
"title": "鄂尔多斯"
},
{
"value": "1512",
"title": "通辽"
},
{
"value": "1513",
"title": "满洲里"
}
]
},
{
"value": "0021",
"title": "辽宁省",
"cities": [
{
"value": "2101",
"title": "沈阳"
},
{
"value": "2102",
"title": "大连"
},
{
"value": "2103",
"title": "鞍山"
},
{
"value": "2104",
"title": "本溪"
},
{
"value": "2105",
"title": "朝阳"
},
{
"value": "2106",
"title": "丹东"
},
{
"value": "2107",
"title": "抚顺"
},
{
"value": "2108",
"title": "阜新"
},
{
"value": "2109",
"title": "葫芦岛"
},
{
"value": "2110",
"title": "锦州"
},
{
"value": "2111",
"title": "辽阳"
},
{
"value": "2112",
"title": "盘锦"
},
{
"value": "2113",
"title": "铁岭"
},
{
"value": "2114",
"title": "营口"
}
]
},
{
"value": "0022",
"title": "吉林省",
"cities": [
{
"value": "2201",
"title": "长春"
},
{
"value": "2202",
"title": "白城"
},
{
"value": "2203",
"title": "白山"
},
{
"value": "2204",
"title": "吉林"
},
{
"value": "2205",
"title": "辽源"
},
{
"value": "2206",
"title": "四平"
},
{
"value": "2207",
"title": "松原"
},
{
"value": "2208",
"title": "通化"
},
{
"value": "2209",
"title": "延边"
}
]
},
{
"value": "0023",
"title": "黑龙江省",
"cities": [
{
"value": "2301",
"title": "哈尔滨"
},
{
"value": "2302",
"title": "大庆"
},
{
"value": "2303",
"title": "大兴安岭"
},
{
"value": "2304",
"title": "鹤岗"
},
{
"value": "2305",
"title": "黑河"
},
{
"value": "2306",
"title": "鸡西"
},
{
"value": "2307",
"title": "佳木斯"
},
{
"value": "2308",
"title": "牡丹江"
},
{
"value": "2309",
"title": "七台河"
},
{
"value": "2310",
"title": "齐齐哈尔"
},
{
"value": "2311",
"title": "双鸭山"
},
{
"value": "2312",
"title": "绥化"
},
{
"value": "2313",
"title": "伊春"
}
]
},
{
"value": "0031",
"title": "上海市",
"cities": [
{
"value": "3100",
"title": "上海市"
}
]
},
{
"value": "0032",
"title": "江苏省",
"cities": [
{
"value": "3201",
"title": "南京"
},
{
"value": "3202",
"title": "常州"
},
{
"value": "3203",
"title": "淮安"
},
{
"value": "3204",
"title": "连云港"
},
{
"value": "3205",
"title": "南通"
},
{
"value": "3206",
"title": "苏州"
},
{
"value": "3207",
"title": "宿迁"
},
{
"value": "3208",
"title": "泰州"
},
{
"value": "3209",
"title": "无锡"
},
{
"value": "3210",
"title": "徐州"
},
{
"value": "3211",
"title": "盐城"
},
{
"value": "3212",
"title": "扬州"
},
{
"value": "3213",
"title": "镇江"
},
{
"value": "3214",
"title": "胥浦"
},
{
"value": "3215",
"title": "昆山"
}
]
},
{
"value": "0033",
"title": "浙江省",
"cities": [
{
"value": "3301",
"title": "杭州"
},
{
"value": "3302",
"title": "宁波"
},
{
"value": "3303",
"title": "湖州"
},
{
"value": "3304",
"title": "嘉兴"
},
{
"value": "3305",
"title": "金华"
},
{
"value": "3306",
"title": "绍兴"
},
{
"value": "3307",
"title": "台州"
},
{
"value": "3308",
"title": "温州"
},
{
"value": "3309",
"title": "舟山"
},
{
"value": "3310",
"title": "衢州"
},
{
"value": "3311",
"title": "丽水"
}
]
},
{
"value": "0034",
"title": "安徽省",
"cities": [
{
"value": "3401",
"title": "合肥"
},
{
"value": "3402",
"title": "安庆"
},
{
"value": "3403",
"title": "蚌埠"
},
{
"value": "3404",
"title": "巢湖"
},
{
"value": "3405",
"title": "池州"
},
{
"value": "3406",
"title": "滁州"
},
{
"value": "3407",
"title": "阜阳"
},
{
"value": "3408",
"title": "淮北"
},
{
"value": "3409",
"title": "淮南"
},
{
"value": "3410",
"title": "黄山"
},
{
"value": "3411",
"title": "六安"
},
{
"value": "3412",
"title": "马鞍山"
},
{
"value": "3414",
"title": "铜陵"
},
{
"value": "3415",
"title": "芜湖"
},
{
"value": "3416",
"title": "宣城"
},
{
"value": "3417",
"title": "亳州"
},
{
"value": "3418",
"title": "宿州"
}
]
},
{
"value": "0035",
"title": "福建省",
"cities": [
{
"value": "3501",
"title": "福州"
},
{
"value": "3502",
"title": "厦门"
},
{
"value": "3503",
"title": "龙岩"
},
{
"value": "3504",
"title": "南平"
},
{
"value": "3505",
"title": "宁德"
},
{
"value": "3506",
"title": "莆田"
},
{
"value": "3507",
"title": "泉州"
},
{
"value": "3508",
"title": "三明"
},
{
"value": "3509",
"title": "漳州"
}
]
},
{
"value": "0036",
"title": "江西省",
"cities": [
{
"value": "3601",
"title": "南昌"
},
{
"value": "3602",
"title": "抚州"
},
{
"value": "3603",
"title": "赣州"
},
{
"value": "3604",
"title": "吉安"
},
{
"value": "3605",
"title": "景德镇"
},
{
"value": "3606",
"title": "九江"
},
{
"value": "3607",
"title": "萍乡"
},
{
"value": "3608",
"title": "上饶"
},
{
"value": "3609",
"title": "新余"
},
{
"value": "3610",
"title": "宜春"
},
{
"value": "3611",
"title": "鹰潭"
}
]
},
{
"value": "0037",
"title": "山东省",
"cities": [
{
"value": "3701",
"title": "济南"
},
{
"value": "3702",
"title": "青岛"
},
{
"value": "3703",
"title": "滨州"
},
{
"value": "3704",
"title": "德州"
},
{
"value": "3705",
"title": "东营"
},
{
"value": "3706",
"title": "菏泽"
},
{
"value": "3707",
"title": "济宁"
},
{
"value": "3708",
"title": "莱芜"
},
{
"value": "3709",
"title": "聊城"
},
{
"value": "3710",
"title": "临沂"
},
{
"value": "3711",
"title": "日照"
},
{
"value": "3712",
"title": "泰安"
},
{
"value": "3713",
"title": "威海"
},
{
"value": "3714",
"title": "潍坊"
},
{
"value": "3715",
"title": "烟台"
},
{
"value": "3716",
"title": "枣庄"
},
{
"value": "3717",
"title": "淄博"
}
]
},
{
"value": "0041",
"title": "河南省",
"cities": [
{
"value": "4101",
"title": "郑州"
},
{
"value": "4102",
"title": "安阳"
},
{
"value": "4103",
"title": "焦作"
},
{
"value": "4104",
"title": "鹤壁"
},
{
"value": "4105",
"title": "开封"
},
{
"value": "4106",
"title": "洛阳"
},
{
"value": "4107",
"title": "南阳"
},
{
"value": "4108",
"title": "平顶山"
},
{
"value": "4109",
"title": "三门峡"
},
{
"value": "4110",
"title": "商丘"
},
{
"value": "4111",
"title": "新乡"
},
{
"value": "4112",
"title": "信阳"
},
{
"value": "4113",
"title": "许昌"
},
{
"value": "4114",
"title": "周口"
},
{
"value": "4115",
"title": "驻马店"
},
{
"value": "4116",
"title": "漯河"
},
{
"value": "4117",
"title": "濮阳"
},
{
"value": "4118",
"title": "济源"
}
]
},
{
"value": "0042",
"title": "湖北省",
"cities": [
{
"value": "4201",
"title": "武汉"
},
{
"value": "4202",
"title": "鄂州"
},
{
"value": "4203",
"title": "恩施"
},
{
"value": "4204",
"title": "黄冈"
},
{
"value": "4205",
"title": "黄石"
},
{
"value": "4206",
"title": "荆门"
},
{
"value": "4207",
"title": "荆州"
},
{
"value": "4208",
"title": "十堰"
},
{
"value": "4209",
"title": "随州"
},
{
"value": "4210",
"title": "咸宁"
},
{
"value": "4211",
"title": "襄樊"
},
{
"value": "4212",
"title": "孝感"
},
{
"value": "4213",
"title": "神农架"
},
{
"value": "4214",
"title": "天门"
},
{
"value": "4215",
"title": "宜昌"
},
{
"value": "4216",
"title": "三峡"
},
{
"value": "4217",
"title": "潜江"
},
{
"value": "4218",
"title": "仙桃"
}
]
},
{
"value": "0043",
"title": "湖南省",
"cities": [
{
"value": "4301",
"title": "长沙"
},
{
"value": "4302",
"title": "常德"
},
{
"value": "4303",
"title": "郴州"
},
{
"value": "4304",
"title": "衡阳"
},
{
"value": "4305",
"title": "怀化"
},
{
"value": "4306",
"title": "娄底"
},
{
"value": "4307",
"title": "邵阳"
},
{
"value": "4308",
"title": "湘潭"
},
{
"value": "4309",
"title": "湘西"
},
{
"value": "4310",
"title": "益阳"
},
{
"value": "4311",
"title": "永州"
},
{
"value": "4312",
"title": "岳阳"
},
{
"value": "4313",
"title": "张家界"
},
{
"value": "4314",
"title": "株洲"
},
{
"value": "4331",
"title": "吉首"
}
]
},
{
"value": "0044",
"title": "广东省",
"cities": [
{
"value": "4401",
"title": "广州"
},
{
"value": "4402",
"title": "深圳"
},
{
"value": "4403",
"title": "潮州"
},
{
"value": "4404",
"title": "东莞"
},
{
"value": "4405",
"title": "佛山"
},
{
"value": "4406",
"title": "惠州"
},
{
"value": "4407",
"title": "江门"
},
{
"value": "4408",
"title": "揭阳"
},
{
"value": "4409",
"title": "茂名"
},
{
"value": "4410",
"title": "梅州"
},
{
"value": "4411",
"title": "清远"
},
{
"value": "4412",
"title": "汕头"
},
{
"value": "4413",
"title": "汕尾"
},
{
"value": "4414",
"title": "韶关"
},
{
"value": "4415",
"title": "阳江"
},
{
"value": "4416",
"title": "云浮"
},
{
"value": "4417",
"title": "湛江"
},
{
"value": "4418",
"title": "肇庆"
},
{
"value": "4419",
"title": "中山"
},
{
"value": "4420",
"title": "河源"
},
{
"value": "4421",
"title": "珠海"
}
]
},
{
"value": "0045",
"title": "广西壮族自治区",
"cities": [
{
"value": "4501",
"title": "南宁"
},
{
"value": "4502",
"title": "百色"
},
{
"value": "4503",
"title": "北海"
},
{
"value": "4504",
"title": "桂林"
},
{
"value": "4505",
"title": "河池"
},
{
"value": "4506",
"title": "柳州"
},
{
"value": "4507",
"title": "梧州"
},
{
"value": "4508",
"title": "玉林"
},
{
"value": "4509",
"title": "崇左"
},
{
"value": "4510",
"title": "防城港"
},
{
"value": "4511",
"title": "贵港"
},
{
"value": "4512",
"title": "贺州"
},
{
"value": "4513",
"title": "来宾"
},
{
"value": "4514",
"title": "钦州"
}
]
},
{
"value": "0046",
"title": "海南省",
"cities": [
{
"value": "4601",
"title": "海口"
},
{
"value": "4602",
"title": "三亚"
},
{
"value": "4603",
"title": "白沙"
},
{
"value": "4604",
"title": "保亭"
},
{
"value": "4605",
"title": "昌江"
},
{
"value": "4606",
"title": "澄迈"
},
{
"value": "4607",
"title": "儋州"
},
{
"value": "4608",
"title": "定安"
},
{
"value": "4609",
"title": "东方"
},
{
"value": "4610",
"title": "乐东"
},
{
"value": "4611",
"title": "临高"
},
{
"value": "4612",
"title": "陵水"
},
{
"value": "4613",
"title": "琼海"
},
{
"value": "4614",
"title": "琼中"
},
{
"value": "4615",
"title": "屯昌"
},
{
"value": "4616",
"title": "万宁"
},
{
"value": "4617",
"title": "文昌"
},
{
"value": "4618",
"title": "五指山"
},
{
"value": "4619",
"title": "洋浦"
}
]
},
{
"value": "0050",
"title": "重庆市",
"cities": [
{
"value": "5000",
"title": "重庆市"
}
]
},
{
"value": "0051",
"title": "四川省",
"cities": [
{
"value": "5101",
"title": "成都"
},
{
"value": "5102",
"title": "巴中"
},
{
"value": "5103",
"title": "达州"
},
{
"value": "5104",
"title": "德阳"
},
{
"value": "5105",
"title": "广安"
},
{
"value": "5106",
"title": "广元"
},
{
"value": "5107",
"title": "乐山"
},
{
"value": "5108",
"title": "凉山"
},
{
"value": "5109",
"title": "眉山"
},
{
"value": "5110",
"title": "绵阳"
},
{
"value": "5111",
"title": "南充"
},
{
"value": "5112",
"title": "内江"
},
{
"value": "5113",
"title": "攀枝花"
},
{
"value": "5114",
"title": "遂宁"
},
{
"value": "5115",
"title": "雅安"
},
{
"value": "5116",
"title": "宜宾"
},
{
"value": "5117",
"title": "自贡"
},
{
"value": "5118",
"title": "泸州"
},
{
"value": "5119",
"title": "阿坝"
},
{
"value": "5120",
"title": "甘孜"
},
{
"value": "5121",
"title": "资阳"
}
]
},
{
"value": "0052",
"title": "贵州省",
"cities": [
{
"value": "5201",
"title": "贵阳"
},
{
"value": "5202",
"title": "安顺"
},
{
"value": "5203",
"title": "毕节"
},
{
"value": "5204",
"title": "六盘水"
},
{
"value": "5205",
"title": "铜仁"
},
{
"value": "5206",
"title": "遵义"
},
{
"value": "5207",
"title": "黔东南"
},
{
"value": "5208",
"title": "黔南"
},
{
"value": "5209",
"title": "黔西南"
}
]
},
{
"value": "0053",
"title": "云南省",
"cities": [
{
"value": "5301",
"title": "昆明"
},
{
"value": "5302",
"title": "西双版纳"
},
{
"value": "5303",
"title": "保山"
},
{
"value": "5304",
"title": "楚雄"
},
{
"value": "5305",
"title": "大理"
},
{
"value": "5306",
"title": "德宏"
},
{
"value": "5307",
"title": "红河"
},
{
"value": "5308",
"title": "丽江"
},
{
"value": "5309",
"title": "临沧"
},
{
"value": "5310",
"title": "怒江"
},
{
"value": "5311",
"title": "曲靖"
},
{
"value": "5312",
"title": "思茅"
},
{
"value": "5313",
"title": "文山"
},
{
"value": "5314",
"title": "玉溪"
},
{
"value": "5315",
"title": "昭通"
},
{
"value": "5316",
"title": "中甸"
},
{
"value": "5317",
"title": "迪庆州"
}
]
},
{
"value": "0054",
"title": "西藏自治区",
"cities": [
{
"value": "5401",
"title": "拉萨"
},
{
"value": "5402",
"title": "阿里"
},
{
"value": "5403",
"title": "昌都"
},
{
"value": "5404",
"title": "林芝"
},
{
"value": "5405",
"title": "那曲"
},
{
"value": "5406",
"title": "日喀则"
},
{
"value": "5407",
"title": "山南"
},
{
"value": "5424",
"title": "樟木口岸"
}
]
},
{
"value": "0061",
"title": "陕西省",
"cities": [
{
"value": "6101",
"title": "西安"
},
{
"value": "6102",
"title": "安康"
},
{
"value": "6103",
"title": "宝鸡"
},
{
"value": "6104",
"title": "汉中"
},
{
"value": "6105",
"title": "商洛"
},
{
"value": "6106",
"title": "铜川"
},
{
"value": "6107",
"title": "渭南"
},
{
"value": "6108",
"title": "咸阳"
},
{
"value": "6109",
"title": "延安"
},
{
"value": "6110",
"title": "榆林"
}
]
},
{
"value": "0062",
"title": "甘肃省",
"cities": [
{
"value": "6201",
"title": "兰州"
},
{
"value": "6202",
"title": "白银"
},
{
"value": "6203",
"title": "定西"
},
{
"value": "6204",
"title": "东风"
},
{
"value": "6205",
"title": "合作"
},
{
"value": "6206",
"title": "嘉峪关"
},
{
"value": "6207",
"title": "金昌"
},
{
"value": "6208",
"title": "酒泉"
},
{
"value": "6209",
"title": "矿区"
},
{
"value": "6210",
"title": "临夏"
},
{
"value": "6211",
"title": "陇南"
},
{
"value": "6212",
"title": "平凉"
},
{
"value": "6213",
"title": "庆阳"
},
{
"value": "6214",
"title": "天水"
},
{
"value": "6215",
"title": "武威"
},
{
"value": "6216",
"title": "张掖"
},
{
"value": "6217",
"title": "甘南州"
}
]
},
{
"value": "0063",
"title": "青海省",
"cities": [
{
"value": "6301",
"title": "西宁"
},
{
"value": "6302",
"title": "海东"
},
{
"value": "6322",
"title": "海北"
},
{
"value": "6323",
"title": "黄南"
},
{
"value": "6325",
"title": "海南"
},
{
"value": "6326",
"title": "果洛"
},
{
"value": "6327",
"title": "玉树"
},
{
"value": "6328",
"title": "海西"
}
]
},
{
"value": "0064",
"title": "宁夏回族自治区",
"cities": [
{
"value": "6401",
"title": "银川"
},
{
"value": "6402",
"title": "中卫"
},
{
"value": "6403",
"title": "固原"
},
{
"value": "6404",
"title": "石嘴山"
},
{
"value": "6405",
"title": "吴忠"
}
]
},
{
"value": "0065",
"title": "新疆维吾尔自治区",
"cities": [
{
"value": "6501",
"title": "乌鲁木齐"
},
{
"value": "6502",
"title": "阿克苏"
},
{
"value": "6503",
"title": "阿勒泰"
},
{
"value": "6504",
"title": "巴州"
},
{
"value": "6505",
"title": "博州"
},
{
"value": "6506",
"title": "昌吉"
},
{
"value": "6507",
"title": "哈密"
},
{
"value": "6508",
"title": "和田"
},
{
"value": "6509",
"title": "喀什"
},
{
"value": "6510",
"title": "克拉玛依"
},
{
"value": "6511",
"title": "马兰"
},
{
"value": "6512",
"title": "石河子"
},
{
"value": "6513",
"title": "塔城"
},
{
"value": "6514",
"title": "吐鲁番"
},
{
"value": "6515",
"title": "伊犁"
},
{
"value": "6516",
"title": "克州"
},
{
"value": "6517",
"title": "阿拉尔"
},
{
"value": "6518",
"title": "五家渠"
}
]
},
{
"value": "2003",
"title": "台湾省",
"cities": [
{
"value": "9903",
"title": "台湾省"
}
]
},
{
"value": "2001",
"title": "香港特别行政区",
"cities": [
{
"value": "9901",
"title": "香港特别行政区"
}
]
},
{
"value": "2002",
"title": "澳门特别行政区",
"cities": [
{
"value": "9902",
"title": "澳门特别行政区"
}
]
}
]';
$arr = json_decode($str, true);
foreach ($arr as $item) {
$data = [
'parent_id' => 0,
'area_code' => $item['value'],
'title' => $item['title'],
];
$inserrId = DB::table('hf_prov_area_code')->insertGetId($data);
foreach ($item['cities'] as $row) {
$tmp = [
'parent_id' => $inserrId,
'area_code' => $row['value'],
'title' => $row['title'],
];
DB::table('hf_prov_area_code')->insert($tmp);
}
}
echo '---ok---';
}
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Models\OrderDivideRecord;
use App\Command\Log; use App\Command\Log;
use App\Handlers\QqCos; use App\Handlers\QqCos;
use App\Handlers\FileUploadHandler; use App\Handlers\FileUploadHandler;
...@@ -24,6 +25,22 @@ public function getList() ...@@ -24,6 +25,22 @@ public function getList()
$list[$key]['imgUrl'] = ($val->imgUrl ? $val->imgUrl : ""); $list[$key]['imgUrl'] = ($val->imgUrl ? $val->imgUrl : "");
} }
return $this->JsonResponse($list); // 从.env文件中获取is_examine的值,如果不存在则默认为0
$is_examine = env('IS_EXAMINE', 0);
$data['info'] = $list;
$data['is_examine'] = $is_examine;
return $this->JsonResponse($data);
}
//测试订单分佣
public function orderDiv(Request $request)
{
$order_id = $request->order_id ?? 0;
//分账列表
$payment_params = OrderDivideRecord::divide($order_id); //返回分账参数列表
echo "<pre>";
print_r($payment_params);
} }
} }
...@@ -190,9 +190,9 @@ public function getIndexGoods(Request $request) ...@@ -190,9 +190,9 @@ public function getIndexGoods(Request $request)
'id' => $datum->id, 'id' => $datum->id,
'goods_name' => $datum->goods_name, 'goods_name' => $datum->goods_name,
'is_hot' => $datum->is_hot, 'is_hot' => $datum->is_hot,
'dg_price' => floor($dg_price), 'dg_price' => sprintf('%.1f', $dg_price),
'market_price' => floor($market_price), 'market_price' => sprintf('%.1f', $market_price),
'goods_price' => $mer_id ? floor($dg_price) : floor($market_price), 'goods_price' => $mer_id ? sprintf('%.1f', $dg_price) : sprintf('%.1f', $market_price),
'tags' => $tags, 'tags' => $tags,
'cover_img' => togetherFilePath($datum->cover_img), 'cover_img' => togetherFilePath($datum->cover_img),
]; ];
...@@ -263,9 +263,9 @@ public function getDetail(Request $request) ...@@ -263,9 +263,9 @@ public function getDetail(Request $request)
$data = [ $data = [
'id' => $goods->id, 'id' => $goods->id,
'goods_img' => $cover, 'goods_img' => $cover,
'dg_price' => floor($dg_price), 'dg_price' => sprintf('%.2f', $dg_price),
'goods_price' => $mer_id ? floor($dg_price) : floor($market_price), 'goods_price' => $mer_id ? sprintf('%.2f', $dg_price) : sprintf('%.2f', $market_price),
'market_price' => floor($market_price), 'market_price' => sprintf('%.2f', $market_price),
'stock' => $stock, 'stock' => $stock,
'goods_name' => $goods->goods_name, 'goods_name' => $goods->goods_name,
'sale' => $goods->sale ?? 0, 'sale' => $goods->sale ?? 0,
......
<?php
namespace App\Http\Controllers\Api;
use App\Command\Log;
use App\Models\Merchant;
use App\Models\User as UserModel;
use App\Models\OrderDivideRecord;
use Illuminate\Http\Request;
use App\Models\Adapay;
use App\Models\HfCompanyMember;
class HfCompanyMemberController extends BaseController
{
//已废弃
//创建企业用户
public function create(Request $request)
{
// $mer_id = $request->user()->merchant_id;
// $merObj = Merchant::where('id', $mer_id)->first();
$member = new \NwVVVS\AdapaySdk\CorpMember();
//$file_real_path = realpath('123.zip');
$url = 'https://amy8888.oss-cn-shanghai.aliyuncs.com/carousel/20241227/612f0eac39fbace6f8333e8e0c212e30.jpg';
$member_params = array(
# app_id
"app_id" => "app_c383f483-3c2a-41b6-8d21-7f597dde4c50",
# 商户用户id
"member_id" => "hf_test_member_id3",
# 订单号
"order_no" => date("YmdHis") . rand(100000, 999999),
# 企业名称
"name" => "测试企业",
# 省份
"prov_code" => "0031",
# 地区
"area_code" => "3100",
# 统一社会信用码
"social_credit_code" => "social_credit_code",
"social_credit_code_expires" => "20301109",
# 经营范围
"business_scope" => "123123",
# 法人姓名
"legal_person" => "frname",
# 法人身份证号码
"legal_cert_id" => "1234567890",
# 法人身份证有效期
"legal_cert_id_expires" => "20301010",
# 法人手机号
"legal_mp" => "13333333333",
# 企业地址
"address" => "1234567890",
# 邮编
"zip_code" => "企业地址测试",
# 企业电话
"telphone" => "1234567890",
# 企业邮箱
"email" => "1234567890@126.com",
# 上传附件
"attach_file" => $url,
# 银行代码
"bank_code" => "1001",
# 银行账户类型
"bank_acct_type" => "1",
);
$res = (new Adapay())->createCompany();
# 创建企业用户
// $member->create($member_params);
// # 对创建企业用户结果进行处理
// if ($member->isError()) {
// //失败处理
// var_dump($member->result);
// } else {
// //成功处理
// var_dump($member->result);
// }
return $this->JsonResponse([]);
}
//异步通知
public function notify()
{
Log::add('--创建企业用户回调结果--', $_POST);
$params = $_POST ?? [];
$adapay_tools = new \NwVVVS\AdapaySdk\AdapayTools();
$post_data = json_decode($params['data'], 1);
$post_data_str = json_encode($post_data, JSON_UNESCAPED_UNICODE);
$post_sign_str = isset($params['sign']) ? $params['sign'] : '';
# 先校验签名和返回的数据的签名的数据是否一致
$sign_flag = $adapay_tools->verifySign($post_data_str, $post_sign_str);
if (!$sign_flag) {
Log::add('创建企业用户回调签名验证失败', []);
return false;
}
$member_id = $post_data['member_id'];
$order_no = $post_data['order_no'];
$hfcObj = HfCompanyMember::where(['member_id' => $member_id, 'order_no' => $order_no])->first();
if ($post_data['audit_state'] == 'D') {
$hfcObj->status = 'succeeded';
$hfcObj->audit_state = 'D';
$hfcObj->audit_desc = $post_data['audit_desc'] ?? '';
} else {
$hfcObj->status = 'failed';
$hfcObj->audit_state = $post_data['audit_state'];
$hfcObj->audit_desc = $post_data['audit_desc'] ?? '';
}
$hfcObj->save();
return true;
}
}
<?php
namespace App\Http\Controllers\Api;
use App\Command\Log;
use App\Models\Adapay;
use App\Models\OrderDivideRecord;
use App\Models\Good as GoodModel;
use App\Models\OrderInfo;
use App\Models\OrderGoods;
use App\Models\OrderInfo as OrderInfoModel;
use App\Models\MerchantGoodSku;
use App\Models\PaymentRecord;
use App\Models\HfPayconfirm;
use Dcat\Admin\Grid\Displayers\Orderable;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use League\CommonMark\Node\Query\OrExpr;
class HfOrderController extends BaseController
{
//退款回调
public function refundNotify()
{
Log::add('--撤销回调结果--', $_POST);
$fields = $_POST ?? [];
$res = (new Adapay())->refundNotify($fields);
return $res;
}
//手动创建支付确认对象
public function paymentConfirm(Request $request)
{
$order_id = $request->order_id ?? 0;
$orderObj = OrderInfo::where(['id' => $order_id])->first();
if (!$orderObj) {
return $this->JsonResponse('', '订单不存在', 201);
}
//解冻通知
$order_no = $orderObj->order_sn;
$freeze_stat = $message['freeze_stat'] ?? '';
if ($orderObj->freeze_stat == 'FREEZE') {
//交易记录
$prObj = PaymentRecord::where('order_sn', $order_no)->first();
# 支付确认参数设置
$payment_params = array(
"payment_id" => $prObj->payment_id,
"order_no" => 'payconfirm_' . date("YmdHis") . rand(100000, 999999),
"confirm_amt" => 0,
"description" => "",
"div_members" => "" //分账参数列表 默认是数组List
);
DB::beginTransaction();
try {
//分账列表
$divResult = OrderDivideRecord::divide($orderObj->id, $payment_params['order_no']); //返回分账参数列表
$payment_params['div_members'] = $divResult['div_members'];
$payment_params['confirm_amt'] = $divResult['confirm_amt'];
Log::add('发起支付确认', $payment_params);
$orderObj->freeze_stat = 'UNFREEZE';
if ($orderObj->save()) {
$result = (new Adapay())->createPaymentConfirm($payment_params);
if ($result['status'] == 'succeeded') {
(new HfPayconfirm())->add($payment_params, $result['fee_amt']);
}
}
DB::commit();
} catch (\Exception $e) {
Log::add('解冻,支付确认对象失败', $e->getMessage());
DB::rollBack();
return $this->JsonResponse('', $e->getMessage(), 201);
}
return $this->JsonResponse($result);
}
}
//定时任务--查询支付对象列表
public function autoQueryList()
{
$payment_params = array(
"app_id" => env('HUIFU_APPID'),
//"payment_id" => "10000000000000001",
//"order_no" => "20190919071231283468359213",
"page_index" => "",
"page_size" => "",
"created_gte" => "",
"created_lte" => ""
);
$chunkSize = 10; // 每次处理的订单数量
$orders = OrderInfoModel::where(["freeze_stat" => 'FREEZE'])->orderBy('id', 'desc')->take($chunkSize);
while ($orders->count() > 0) {
$orders->chunk($chunkSize, function ($batch) use ($payment_params) {
foreach ($batch as $order) {
$nowtime = time();
$pyObj = PaymentRecord::where('order_sn', $order->order_sn)->first();
$payment_params['payment_id'] = $pyObj->payment_id;
$payment_params['order_no'] = $pyObj->order_sn;
$result = (new Adapay())->queryList($payment_params);
// if ($order->created_at) {
// $created_at = strtotime($order->created_at);
// $diff_time = $nowtime - $created_at;
// if ($diff_time > 900) {
// $order->save();
// }
// }
}
});
// 移动游标到下一批
$orders->skip($chunkSize);
$orders = $orders->getQuery();
sleep(2);
}
return '--ok--';
}
}
<?php
namespace App\Http\Controllers\Api;
use App\Command\Log;
use Illuminate\Http\Request;
use Exception;
use Illuminate\Support\Facades\DB;
class HfProvAreaCodeController extends BaseController
{
public function getList(Request $request)
{
$parent_id = $request->parent_id ?? 0;
$where = [
'parent_id' => $parent_id
];
$data = DB::table('hf_prov_area_code')->select("id", "parent_id", "area_code", "title")
->where($where)
->limit(100)
->get()->toArray();
return $this->JsonResponse($data);
}
}
<?php
namespace App\Http\Controllers\Api;
use App\Command\Log;
use Illuminate\Http\Request;
use App\Models\Adapay;
use App\Models\HfCompanyMember;
use App\Models\HfSettleAccount;
use App\Jobs\AutoOrderDivide;
use Exception;
use Illuminate\Support\Facades\DB;
class HfSettleAccountController extends BaseController
{
//创建普通用户结算账户
public function createMemberAccount(Request $request)
{
$card_id = $request->card_id ?? '';
$card_name = $request->card_name ?? '';
$tel_no = $request->tel_no ?? '';
$cert_id = $request->cert_id ?? '';
if (!$card_id || !$card_name || !$tel_no || !$cert_id) {
return $this->JsonResponse('', '必填项不为空', 500);
}
$userObj = $request->user();
$user_id = $userObj->id;
$member_id = $userObj->member_id;
if (!$member_id) {
return $this->JsonResponse('', '账户异常,请联系管理员', 500);
}
$account_params = array(
"app_id" => env('HUIFU_APPID'),
"member_id" => $member_id,
"channel" => "bank_account",
"account_info" => [
"card_id" => $card_id,
"card_name" => $card_name,
"cert_id" => $cert_id,
"cert_type" => "00",
"tel_no" => $tel_no,
"bank_acct_type" => "2",
]
);
$local_params = [
'member_type' => 0,
'mid' => $user_id,
'card_id' => $card_id,
'card_name' => $card_name,
'cert_id' => $cert_id,
'cert_type' => '00',
'tel_no' => $tel_no,
'bank_acct_type' => 2
];
DB::beginTransaction();
try {
# 创建
$result = (new Adapay())->createMemberSettleAccount($account_params);
if (isset($result['status']) && $result['status'] == 'succeeded') {
$local_params['account_id'] = $result['id'];
$local_params['created_at'] = date("Y-m-d H:i:s", $result['create_time']);
DB::table('hf_settle_account')->insert($local_params);
//发起分账
$this->dispatch(new AutoOrderDivide($user_id, 10));
} else {
throw new Exception($result['error_msg']);
}
DB::commit();
return $this->JsonResponse('');
} catch (\Exception $exception) {
Log::add('添加用户结算账户失败', $exception->getMessage());
DB::rollBack();
return $this->JsonResponse('', $exception->getMessage(), 500);
}
}
//创建企业用户结算账户
public function createCompanyAccount(Request $request)
{
$card_id = $request->card_id ?? '';
$card_name = $request->card_name ?? '';
$tel_no = $request->tel_no ?? '';
$bank_code = $request->bank_code ?? '';
$bank_name = $request->bank_name ?? '';
$prov_code = $request->prov_code ?? '';
$area_code = $request->area_code ?? '';
if (!$card_id || !$card_name || !$tel_no || !$bank_code || !$prov_code || !$area_code) {
return $this->JsonResponse('', '必填项不为空', 500);
}
$userObj = $request->user();
$merchant_id = 3; //$userObj->merchant_id;
$exist = HfCompanyMember::where(['merchant_id' => $merchant_id, 'member_id' => 'cm_id' . $merchant_id])->count();
if (!$exist) {
return $this->JsonResponse('', '账户异常,请联系管理员', 500);
}
$member_id = 'cm_id' . $merchant_id;
$account_params = array(
"app_id" => env('HUIFU_APPID'),
"member_id" => $member_id,
"channel" => "bank_account",
"account_info" => [
"card_id" => $card_id,
"card_name" => $card_name,
"tel_no" => $tel_no,
"bank_code" => $bank_code,
"bank_name" => $bank_name,
"bank_acct_type" => "1",
"prov_code" => $prov_code,
"area_code" => $area_code,
]
);
$local_params = [
'member_type' => 1,
'mid' => $merchant_id,
'card_id' => $card_id,
'card_name' => $card_name,
"bank_code" => $bank_code,
"bank_name" => $bank_name,
'tel_no' => $tel_no,
'bank_acct_type' => 1,
"prov_code" => $prov_code,
"area_code" => $area_code,
];
DB::beginTransaction();
try {
# 创建
$result = (new Adapay())->createMemberSettleAccount($account_params);
if (isset($result['status']) && $result['status'] == 'succeeded') {
$local_params['account_id'] = $result['id'];
$local_params['created_at'] = date("Y-m-d H:i:s", $result['create_time']);
DB::table('hf_settle_account')->insert($local_params);
} else {
throw new Exception($result['error_msg']);
}
DB::commit();
return $this->JsonResponse('');
} catch (\Exception $exception) {
Log::add('添加用户结算账户失败' . $member_id, $exception->getMessage());
DB::rollBack();
return $this->JsonResponse('', $exception->getMessage(), 500);
}
}
//查询已绑定结算账户
public function myCard(Request $request)
{
$userObj = $request->user();
$member_type = $request->member_type ?? 0;
$role_id = $useObj->role_id ?? '';
if ($role_id == 1) { //商家
$mid = $userObj->merchant_id;
$member_id = HfCompanyMember::where(['merchant_id' => $mid, 'status' => 'succeeded'])->value('member_id');
} else {
$mid = $userObj->id;
$member_id = $userObj->member_id;
}
if (!$member_id) {
return $this->JsonResponse('', '参数错误', 201);
}
$account_params = [];
$accountObj = HfSettleAccount::where(['member_type' => $member_type, 'mid' => $mid])->first();
if ($accountObj) {
$account_params = array(
'card_id' => $accountObj->card_id ?? '',
'card_name' => $accountObj->card_name ?? '',
'tel_no' => $accountObj->tel_no ?? '',
'bank_code' => $accountObj->bank_code ?? '',
'bank_name' => $accountObj->bank_name ?? '',
);
}
return $this->JsonResponse($account_params);
}
//查询账户余额
public function queryBalance(Request $request)
{
$userObj = $request->user();
//$member_type = $request->member_type ?? 0;
$role_id = $useObj->role_id ?? '';
if ($role_id == 1) { //商家
$mid = $userObj->merchant_id;
$member_id = HfCompanyMember::where(['merchant_id' => $mid, 'status' => 'succeeded'])->value('member_id');
} else {
$mid = $userObj->id;
$member_id = $userObj->member_id;
}
if (!$member_id) {
return $this->JsonResponse('', '账户异常,请联系管理员', 500);
}
$account_params = [
'app_id' => env('HUIFU_APPID'),
'member_id' => $member_id,
];
$result = (new Adapay())->queryBalance($account_params);
if (isset($result['status']) && $result['status'] == 'succeeded') {
return $this->JsonResponse($result);
} else {
return $this->JsonResponse('', '查询失败', 201);
}
}
//银行代码
public function getBankCode()
{
$data = [
['code' => '01020000', 'title' => '工商银行'],
['code' => '01030000', 'title' => '农业银行'],
['code' => '01040000', 'title' => '中国银行'],
['code' => '01050000', 'title' => '建设银行'],
['code' => '03010000', 'title' => '交通银行'],
['code' => '03134402', 'title' => '平安银行'],
['code' => '03020000', 'title' => '中信银行'],
['code' => '03030000', 'title' => '光大银行'],
['code' => '03040000', 'title' => '华夏银行'],
['code' => '03050000', 'title' => '民生银行'],
['code' => '03060000', 'title' => '广发银行'],
['code' => '03080000', 'title' => '招商银行'],
['code' => '03090000', 'title' => '兴业银行'],
['code' => '03100000', 'title' => '浦发银行'],
['code' => '03130011', 'title' => '北京银行'],
['code' => '03130012', 'title' => '天津银行'],
['code' => '03130031', 'title' => '上海银行'],
['code' => '03130032', 'title' => '江苏银行'],
['code' => '03130050', 'title' => '重庆银行'],
['code' => '03132102', 'title' => '大连银行'],
['code' => '03132301', 'title' => '哈尔滨银行'],
['code' => '03133201', 'title' => '南京银行'],
['code' => '03133301', 'title' => '杭州银行'],
['code' => '03133302', 'title' => '宁波银行'],
['code' => '03133308', 'title' => '温州银行'],
['code' => '03150000', 'title' => '恒丰银行'],
['code' => '03160000', 'title' => '浙商银行'],
];
return $this->JsonResponse($data);
}
//删除结算账户
public function deleteAccount(Request $request)
{
$userObj = $request->user();
$member_type = $request->member_type ?? 0;
$role_id = $useObj->role_id ?? '';
if ($role_id == 1) { //商家
$mid = $userObj->merchant_id;
$member_id = HfCompanyMember::where(['merchant_id' => $mid, 'status' => 'succeeded'])->value('member_id');
} else {
$mid = $userObj->id;
$member_id = $userObj->member_id;
}
if (!$member_id) {
return $this->JsonResponse('', '参数错误', 201);
}
$accountObj = HfSettleAccount::where(['member_type' => $member_type, 'mid' => $mid])->first();
$account_params = array(
'app_id' => env('HUIFU_APPID'),
'member_id' => $member_id,
'settle_account_id' => $accountObj->account_id
);
# 删除
$result = (new Adapay())->deleteSettleAccount($account_params);
if (isset($result['status']) && $result['status'] == 'succeeded') {
//删除本地
$accountObj->delete();
return $this->JsonResponse('');
} else {
return $this->JsonResponse('', '删除失败', 201);
}
}
}
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use App\Models\Adapay;
class LoginController extends BaseController class LoginController extends BaseController
{ {
...@@ -61,7 +62,7 @@ public function getOpenid(Request $request) ...@@ -61,7 +62,7 @@ public function getOpenid(Request $request)
$url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $appid . '&secret=' . $secret . '&js_code=' . $jsCode . '&grant_type=authorization_code'; $url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $appid . '&secret=' . $secret . '&js_code=' . $jsCode . '&grant_type=authorization_code';
$wx_data = json_decode(file_get_contents($url), true); $wx_data = json_decode(file_get_contents($url), true);
if (isset($wx_data['errcode'])) { if (isset($wx_data['errcode'])) {
Log::add('请求微信接口异常', $wx_data); Log::add('getOpenid请求微信接口异常', $wx_data,$request);
return $this->JsonResponse('', '请求微信接口异常', 201); return $this->JsonResponse('', '请求微信接口异常', 201);
} }
return $this->JsonResponse([ return $this->JsonResponse([
...@@ -101,17 +102,22 @@ public function login(Request $request) ...@@ -101,17 +102,22 @@ public function login(Request $request)
$user->total_revenue = 0; $user->total_revenue = 0;
$user->save(); $user->save();
} }
if ($user->openid != $openId) { //对接汇付-创建个人对象
$user->openid = $openId; if (!$user->member_id) {
$user->save(); $result = (new Adapay())->createMember($user->id, $user->phone);
if (isset($result['status']) && $result['status'] == 'succeeded') {
DB::table('users')->where('id', $user->id)->update(['member_id' => $result['member_id']]);
}
} }
//生成token //生成token
$accessToken = 'Bearer ' . $user->createToken('Access-token')->plainTextToken; $accessToken = 'Bearer ' . $user->createToken('Access-token')->plainTextToken;
Log::add('用户--' . $user->id . '登录', ['token' => $accessToken]); $return = $this->JsonResponse([
return $this->JsonResponse([
'Authorization' => $accessToken, 'Authorization' => $accessToken,
]); ]);
Log::add('用户--' . $user->id . '登录', '返回值:'.$return,$request);
return $return;
} }
//商户端授权绑定账号密码(提现时) //商户端授权绑定账号密码(提现时)
...@@ -165,7 +171,7 @@ private function codeToSession($code) ...@@ -165,7 +171,7 @@ private function codeToSession($code)
$url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $appid . '&secret=' . $secret . '&js_code=' . $code . '&grant_type=authorization_code'; $url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $appid . '&secret=' . $secret . '&js_code=' . $code . '&grant_type=authorization_code';
$wx_data = json_decode(file_get_contents($url), true); $wx_data = json_decode(file_get_contents($url), true);
if (isset($wx_data['errcode'])) { if (isset($wx_data['errcode'])) {
Log::add('请求微信接口异常', $wx_data); Log::add('codeToSession请求微信接口异常', $wx_data);
//return $this->JsonResponse('', '请求微信接口异常', 201); //return $this->JsonResponse('', '请求微信接口异常', 201);
} }
return $wx_data; return $wx_data;
...@@ -173,9 +179,42 @@ private function codeToSession($code) ...@@ -173,9 +179,42 @@ private function codeToSession($code)
public function testLogin(Request $request) public function testLogin(Request $request)
{ {
$uid = $request->uid ?? 31; $uid = $request->uid ?? 7;
$user = User::find($uid); $user = User::find($uid);
$accessToken = 'Bearer ' . $user->createToken('Access-token')->plainTextToken; $accessToken = 'Bearer ' . $user->createToken('Access-token')->plainTextToken;
//对接汇付-创建个人对象
if (!$user->member_id) {
(new Adapay())->createMember($user->id, $user->phone);
}
return $this->JsonResponse(['Authorization' => $accessToken,]); return $this->JsonResponse(['Authorization' => $accessToken,]);
} }
// 模拟登陆
public function simulateLogin(Request $request)
{
// 从请求中获取用户 ID
$userId = $request->input('user_id');
// 根据用户 ID 查找用户
$user = User::find($userId);
// 检查用户是否存在
if (!$user) {
return $this->JsonResponse('', '用户不存在', 201);
}
// 生成访问令牌
$accessToken = 'Bearer ' . $user->createToken('Access-token')->plainTextToken;
// 记录日志
Log::add('用户--' . $user->id . '模拟登录', ['token' => $accessToken]);
// 返回包含 Authorization 信息的响应
return $this->JsonResponse([
'Authorization' => $accessToken
]);
}
} }
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
use App\Models\Merchant; use App\Models\Merchant;
use App\Models\User as UserModel; use App\Models\User as UserModel;
use App\Models\OrderDivideRecord; use App\Models\OrderDivideRecord;
use App\Models\OrderGoods;
use App\Models\OrderInfo;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class MerchantController extends BaseController class MerchantController extends BaseController
{ {
...@@ -53,4 +56,44 @@ public function getUserList(Request $request) ...@@ -53,4 +56,44 @@ public function getUserList(Request $request)
return $this->JsonResponse($data); return $this->JsonResponse($data);
} }
//我的用户-订单列表(展示近10天)
public function getOrderList(Request $request)
{
$mer_id = 4; //$request->user()->merchant_id;
$user_id = $request->user_id ?? 0;
if (!$user_id) {
return $this->JsonResponse('', '参数错误', 201);
}
$daysAgo = date('Y-m-d H:i:s', strtotime("-10 days"));
$list = DB::table("order_divide_record as odr")
->select(DB::raw('odr.order_id, o.order_status,o.created_at'))
->leftJoin('li_order_info as o', 'odr.order_id', '=', 'o.id')
//->whereDate('odr.created_at', '>', $daysAgo)
->where(['odr.sh_type' => 3, 'odr.um_id' => $mer_id, 'odr.user_id' => $user_id])
->limit(100)
->get()
->toArray();
foreach ($list as $key => $item) {
$ogRows = DB::table('li_order_goods')->where('order_id', $item->order_id)
->select(DB::raw('goods_name,goods_number,goods_price,goods_img,goods_attr'))
->get()
->toArray();
$order_goods = [];
foreach ($ogRows as $key => $valObj) {
$tmp = [];
$tmp['goods_name'] = $valObj->goods_name;
$tmp['goods_number'] = $valObj->goods_number;
$tmp['goods_attr'] = $valObj->goods_attr;
$tmp['goods_price'] = $valObj->goods_price;
$tmp['goods_img'] = $valObj->goods_img ? togetherFilePath($valObj->goods_img) : '';
array_push($order_goods, $tmp);
}
$list[$key]->status_txt = OrderInfo::STATUS_OPTIONS[$list[$key]->order_status];
$list[$key]->og = $order_goods;
}
return $this->JsonResponse($list);
}
} }
<?php
namespace App\Http\Controllers\Api;
use App\Command\Log;
use App\Models\Pay;
use App\Models\UserAddress;
use App\Models\Store;
use App\Models\Good as GoodModel;
use App\Models\GoodSku;
use App\Models\OrderGoods;
use App\Models\OrderInfo as OrderInfoModel;
use App\Models\MerchantGoodSku;
use Dcat\Admin\Grid\Displayers\Orderable;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use League\CommonMark\Node\Query\OrExpr;
class OrderController extends BaseController
{
//立即购买-确认订单
public function CheckoutBuyOrder(Request $request)
{
$userObj = $request->user();
$merchant_id = $userObj->merchant_id ?? 0;
$goods_id = $request->goods_id;
$num = $request->num ?? 1;
$attr_name = $request->attr_name ?? '';
$goodsObj = GoodModel::find($goods_id);
if (!$goodsObj) {
return $this->JsonResponse('', '参数错误', 201);
}
$attr_val = '';
$goods_price = 0;
if ($attr_name) {
$attrArr = explode(",", $attr_name);
utf8_array_asort($attrArr);
$attrStr = join("、", $attrArr);
$attr_sn = md5($attrStr);
$arrObj = GoodSku::where('goods_id', $goods_id)->where('attr_sn', $attr_sn)->first();
$attr_val = $arrObj ? $arrObj->attr_val : '';
$attr_id = $arrObj ? $arrObj->id : 0;
$goods_price = ($arrObj && $goodsObj->goods_type && $merchant_id) ? $arrObj->cg_price : $arrObj->market_price;
}
$data = [];
$data['goods_id'] = $goods_id;
$data['goods_name'] = $goodsObj->goods_name;
$data['goods_img'] = $goodsObj->cover_img ? togetherFilePath($goodsObj->cover_img) : '';
$data['num'] = $num;
$data['attr_id'] = $attr_id;
$data['goods_price'] = $goods_price;
$data['attr_name'] = $attr_val;
return $this->JsonResponse($data);
}
//创建订单--立即购买
public function CreateBuyOrder(Request $request)
{
$orderObj = new OrderInfoModel();
$userObj = $request->user();
$user_id = $userObj->id;
$merchant_id = (int)$userObj->merchant_id;
$goods_id = $request->goods_id;
$num = $request->num ?? 1;
$attr_id = $request->attr_id ?? 0;
$delivery_type = $request->delivery_type; // 收货方式 1:代收点 2:送货上门
$store_id = $request->store_id ?? 0; //代收点 门店ID
//----收货地址----
$address = $request->address ?? ''; //详情地址
$area = $request->area ?? '';
$phone = $request->phone ? $request->phone : $userObj->phone;
$consignee = $request->consignee ?? '';
//$address_id = $request->address_id ?? 0; //地址ID
$goodsObj = GoodModel::find($goods_id);
if (!$goodsObj) {
return $this->JsonResponse('', '参数错误', 201);
}
// $userAddress = '';
// if ($address_id) {
// $userAddress = UserAddress::where("id", $address_id)->first();
// }
$order_sn = $this->getOrderSn();
DB::beginTransaction();
try {
$total_price = 0;
$orderGoods = [];
//商品信息
$goodObj = GoodModel::find($goods_id);
$good_price = 0; //商品单价
//判断是否有规格
$attr_val = '';
if ($attr_id) {
$arrObj = GoodSku::where(['id' => $attr_id, 'goods_id' => $goods_id])->first();
if (!$arrObj) {
return $this->JsonResponse('', '参数错误', 201);
} else {
if ($arrObj->stock < $num) {
return $this->JsonResponse('', '该商品库存不足', 500);
}
}
$attr_val = $arrObj ? $arrObj->attr_val : '';
$good_price = ($arrObj && $goodsObj->goods_type && $merchant_id) ? $arrObj->cg_price : $arrObj->market_price;
}
//商品总价
$total_price = ($good_price * $num);
$tmp = [];
$tmp['goods_id'] = $goods_id;
$tmp['goods_number'] = $num;
$tmp['goods_price'] = $good_price;
$tmp['goods_attr'] = $attr_val;
$tmp['attr_id'] = $attr_id;
$tmp['goods_name'] = $goodObj->goods_name;
$tmp['goods_img'] = $goodObj->cover_img;
$tmp['merchant_id'] = $merchant_id;
$tmp['created_at'] = date("Y-m-d H:i:s");
array_push($orderGoods, $tmp);
//订单信息
$orderObj->order_sn = $order_sn;
$orderObj->user_id = $user_id;
$orderObj->area = $area;
$orderObj->address = $address;
$orderObj->consignee = $consignee;
$orderObj->mobile = $phone;
$orderObj->goods_amount = $total_price;
$orderObj->order_amount = $total_price;
$orderObj->goods_sn = $goodObj->goods_sn;
$orderObj->delivery_type = $delivery_type;
$orderObj->merchant_id = $merchant_id;
$orderObj->store_id = $store_id;
if ($orderObj->save()) {
$order_id = $orderObj->id;
foreach ($orderGoods as $key => $item) {
$orderGoods[$key]['order_id'] = $order_id;
}
DB::table("li_order_goods")->insert($orderGoods);
}
DB::commit();
//15分钟取消订单
//$this->dispatch(new CancelOrder($orderObj, 900));
return $this->JsonResponse(['order_id' => $orderObj->id]);
} catch (\Exception $exception) {
Log::add('创建预支付订单失败', $exception->getMessage());
DB::rollBack();
return $this->JsonResponse('', '创建预支付订单失败', 201);
}
}
//创建订单
public function CreateOrder(Request $request)
{
$orderObj = new OrderInfoModel();
$userObj = $request->user();
$user_id = $userObj->id;
$merchant_id = $userObj->merchant_id;
$catKey = $request->catKey ?? ''; //购物车KeyID拼接 5_1,6_2
$delivery_type = $request->delivery_type; // 收货方式 1:代收点 2:送货上门
$store_id = $request->store_id ?? 0; //代收点 门店ID
//----收货地址----
$address = $request->address ?? ''; //详情地址
$area = $request->area ?? '';
$phone = $request->phone ? $request->phone : $userObj->phone;
$consignee = $request->consignee ?? '';
if (!$catKey) {
return $this->JsonResponse('', '参数错误', 201);
}
$shoppingCart = $userObj->shopping_cart ? json_decode($userObj->shopping_cart, true) : [];
if (empty($shoppingCart)) {
return $this->JsonResponse('', '购物车无资源', 500);
}
$userAddress = '';
// if ($address_id) {
// $userAddress = UserAddress::where(['uid' => $user_id, 'id' => $address_id])->first();
// if (!$userAddress) {
// return $this->JsonResponse('', '请选择收货地址', 500);
// }
// }
$order_sn = $this->getOrderSn();
DB::beginTransaction();
try {
$total_price = 0;
$idsArr = explode(",", $catKey);
$orderGoods = [];
$goods_name = '';
foreach ($idsArr as $key) {
$cartRow = isset($shoppingCart[$key]) ? $shoppingCart[$key] : [];
if (!$cartRow) {
continue;
}
//商品信息
$goods_id = $cartRow['goods_id'];
$attr_id = $cartRow['attr_id'];
$goodsObj = GoodModel::find($goods_id);
$skuObj = GoodSku::find($attr_id);
if (!$goodsObj || !$skuObj) {
unset($shoppingCart[$key]);
continue;
} else {
if ($skuObj->stock < $cartRow['num']) {
return $this->JsonResponse('', '该商品库存不足!', 500);
}
}
$goods_price = ($merchant_id && $goodsObj->goods_type) ? $skuObj->cg_price : $skuObj->market_price;
$goods_img = isset($goodsObj->cover_img) ? $goodsObj->cover_img : '';
$goods_name .= $goodsObj->goods_name . "、";
$tmp = [];
$tmp['goods_id'] = $goods_id;
$tmp['goods_number'] = $cartRow['num'];
$tmp['goods_price'] = $goods_price;
$tmp['goods_attr'] = $cartRow['attr_txt'];
$tmp['attr_id'] = $attr_id;
$tmp['goods_name'] = $goodsObj->goods_name;
$tmp['goods_img'] = $goods_img;
$tmp['merchant_id'] = $merchant_id;
$tmp['created_at'] = date("Y-m-d H:i:s");
array_push($orderGoods, $tmp);
//总价
$total_price += ((float)$goods_price * (int)$cartRow['num']);
//删除购物车商品
unset($shoppingCart[$key]);
}
if ($total_price == 0) {
return $this->JsonResponse('', '参数错误', 201);
}
$orderObj->order_sn = $order_sn;
$orderObj->user_id = $user_id;
$orderObj->address = $address;
$orderObj->area = $area;
$orderObj->consignee = $consignee;
$orderObj->mobile = $phone;
$orderObj->goods_amount = $total_price;
$orderObj->order_amount = $total_price;
//$orderObj->goods_sn = $goodObj->goods_sn;
$orderObj->delivery_type = $delivery_type;
$orderObj->merchant_id = $merchant_id;
$orderObj->store_id = $store_id;
if ($orderObj->save()) {
$order_id = $orderObj->id;
foreach ($orderGoods as $key => $item) {
$orderGoods[$key]['order_id'] = $order_id;
}
DB::table("li_order_goods")->insert($orderGoods);
} else {
return $this->JsonResponse('', '创建购物车订单失败', 201);
}
$userObj->shopping_cart = empty($shoppingCart) ? null : json_encode($shoppingCart, JSON_UNESCAPED_UNICODE);
$userObj->save();
DB::commit();
return $this->JsonResponse(['order_id' => $orderObj->id]);
} catch (\Exception $exception) {
Log::add('创建购物车订单失败', $exception->getMessage());
DB::rollBack();
return $this->JsonResponse('', '创建购物车订单失败', 201);
}
}
private function getOrderSn()
{
$order_sn = '';
$flag = 0;
do {
//'20231229875256';
$order_sn = date('Ymd') . mt_rand(1000, 9999) . substr(implode("", array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8);
$rowObj = OrderInfoModel::where('order_sn', $order_sn)->first();
$flag = $rowObj ? 0 : 1;
} while ($flag < 1);
return $order_sn;
}
//订单支付
public function pay(Request $request)
{
$order_id = $request->order_id ?? 0;
$openid = $request->user()->openid;
DB::beginTransaction();
try {
$res = '';
$order = OrderInfoModel::find($order_id);
if ($order->pay_cs > 0) {
// $order_record = $order->order_record ?? $order->order_sn;
// $order->order_sn = $this->getOrderSn();
// $order->order_record = $order_record . "|" . $order->order_sn;
// $order->save();
}
$orderGoodsObj = OrderGoods::where("order_id", $order_id)->first();
$order_title = $orderGoodsObj ? $orderGoodsObj->goods_name : '';
$res = Pay::pay($order_title, $order->order_sn, $order->order_amount, $openid);
$order->pay_cs += 1;
$order->save();
DB::commit();
return $this->JsonResponse($res);
} catch (\Exception $exception) {
Log::add('拉起微信支付失败', $exception->getMessage());
return $this->JsonResponse('', '拉起微信支付失败', 201);
}
}
//付款回调
public function payNotify(Request $request)
{
$fields = $request->query->all();
return $this->JsonResponse(Pay::payNotify($fields));
}
// 已完成:用户点击确认收货或发货后3天,自动变更为已完成状态
// 售后:已完成状态下48小时内展示申请售后按钮,可申请售后,如超过48小时,则不展示申请售后按钮
public function orderList(Request $request)
{
$status = $request->order_status ?? -1;
$page = $request->page ?? 1;
$limit = $request->limit ?? 10;
$sql = OrderInfoModel::where(['user_id' => $request->user()->id, 'deleted_at' => null]);
if ($status >= 0) {
$sql = $sql->where(['order_status' => $status]);
}
$total = $sql->count();
$data = [
'total' => $total,
'total_page' => ceil($total / $limit),
'list' => []
];
$listData = $sql->offset(($page - 1) * $limit)->limit($limit)->orderBy('created_at', 'DESC')->get();
if ($listData->toArray()) {
foreach ($listData as $item) {
//订单商品
$order_goods = [];
$ogoods = OrderGoods::where(["order_id" => $item->id])->limit(1)->get();
foreach ($ogoods as $key => $valObj) {
$tmp = [];
$tmp['og_id'] = $valObj->id;
$tmp['goods_id'] = $valObj->goods_id;
$tmp['goods_name'] = $valObj->goods_name;
$tmp['goods_number'] = $valObj->goods_number;
$tmp['goods_attr'] = $valObj->goods_attr;
$tmp['goods_price'] = $valObj->goods_price;
$tmp['goods_img'] = $valObj->goods_img ? togetherFilePath($valObj->goods_img) : '';
$tmp['is_comment'] = $valObj->is_comment;
array_push($order_goods, $tmp);
}
$data['list'][] = [
'order_id' => $item->id,
'order_sn' => $item->order_sn,
'order_status' => $item->order_status,
'status_txt' => OrderInfoModel::STATUS_OPTIONS[$item->order_status],
//'is_apply' => $is_apply,
//'service_status' => $item->service_status,
'order_amount' => $item->order_amount,
'verification_code' => $item->verification_code ?? '',
'created_at' => date("Y-m-d H:i", strtotime($item->created_at)),
'order_goods' => $order_goods
];
}
}
return $this->JsonResponse($data);
}
public function canceOrder(Request $request)
{
$order_id = $request->order_id ?? null;
$model = OrderInfoModel::find($order_id);
if (!$model) {
return $this->JsonResponse('', '参数错误', 201);
}
if ($model->user_id != $request->user()->id) {
return $this->JsonResponse('', '非本人订单', 201);
}
if (!in_array($model->order_status, [0, 1])) {
return $this->JsonResponse('', '不满足取消条件' . $model->order_status, 500);
}
DB::beginTransaction();
try {
//代到货订单--退库存
if ($model->order_status == 1) {
//更新商品库存
$goodsList = OrderGoods::where("order_id", $order_id)->get();
foreach ($goodsList as $item) {
$gid = $item->goods_id;
$attr_id = $item->attr_id;
$mer_id = $item->merchant_id;
$goods_number = $item->goods_number;
$goodsObj = GoodModel::find($gid);
//更新商品规格库存
$attrObj = GoodSku::find($attr_id);
$attr_stock = $attrObj->stock + $goods_number;
$attrObj->stock = $attr_stock;
$attrObj->save();
//更新商品sku
$skuArr = json_decode($goodsObj->sku, true);
if ($skuArr['sku']) {
foreach ($skuArr['sku'] as $kk => $vv) {
if (isset($vv['attr_sn']) && $vv['attr_sn'] == $attrObj->attr_sn) {
$skuArr['sku'][$kk]['stock'] = $attr_stock;
}
}
$goodsObj->sku = json_encode($skuArr, JSON_UNESCAPED_UNICODE);
$goodsObj->save();
}
//商户规格库存
$mgsObj = MerchantGoodSku::where(['goods_id' => $gid, 'attr_id' => $attr_id, 'merchant_id' => $mer_id])->first();
if ($mer_id && $mgsObj) {
$changeStock = $mgsObj->stock + $goods_number;
$mgsObj->stock = $changeStock;
$mgsObj->save();
}
}
}
$model->order_status = 7;
$model->save();
DB::commit();
} catch (\Exception $exception) {
DB::rollBack();
Log::add('取消订单失败', $exception->getMessage());
return $this->JsonResponse('', '取消订单失败', 201);
}
return $this->JsonResponse('');
}
public function delOrder(Request $request)
{
$order_id = $request->order_id ?? null;
$model = OrderInfoModel::find($order_id);
if (!$model) {
return $this->JsonResponse('', '参数错误', 201);
}
if ($model->user_id != $request->user()->id) {
return $this->JsonResponse('', '非本人订单', 201);
}
$model->delete();
return $this->JsonResponse('');
}
//确认收货(订单完成)
// public function completeOrder(Request $request)
// {
// $order_id = $request->order_id ?? null;
// if (!$order_id) {
// return $this->JsonResponse('', '参数错误', 201);
// }
// $model = OrderInfoModel::find($order_id);
// if ($model->user_id != $request->user()->id) {
// return $this->JsonResponse('', '非本人订单', 201);
// }
// $model->shipping_status = 2;
// $model->order_status = 2;
// $model->received_at = date("Y-m-d H:i:s");
// $model->save();
// return $this->JsonResponse('');
// }
//扫码核销
public function scanCodeVerifi(Request $request)
{
$verObj = $request->user();
$code = $request->code ?? '';
$orderObj = OrderInfoModel::where('verification_code', $code)->first();
if (!$orderObj) {
return $this->JsonResponse('', '参数错误', 201);
}
Log::add('核销操作5', [$orderObj->verification_at]);
if (!$orderObj->verification_at) {
$orderObj->order_status = 3;
$orderObj->verifier_id = $verObj->id;
$orderObj->verifier = $verObj->name;
$orderObj->verification_at = date("Y-m-d H:i:s");
$orderObj->save();
} else {
return $this->JsonResponse('', '该码已核销,无需多次重复扫码', 500);
}
Log::add('核销操作', $orderObj->toArray());
return $this->JsonResponse('');
}
//扫码核销展示详情
public function scanCodeDetail(Request $request)
{
$code = $request->code ?? '';
$orderObj = OrderInfoModel::where('verification_code', $code)->first();
if (!$orderObj) {
Log::add('核销码', $code);
return $this->JsonResponse('', '参数错误', 201);
}
$order_id = $orderObj->id;
//商品信息
$order_goods = $this->getOrderGoods($order_id);
//快递待收点、收货地址
$delivery = [];
if ($orderObj->address) {
$delivery['contacts'] = $orderObj->consignee;
$delivery['phone'] = $orderObj->mobile;
$delivery['area'] = $orderObj->area . "(" . $orderObj->address . ")";
$delivery['lat'] = '';
$delivery['lng'] = '';
}
if ($orderObj->store_id) {
$sObj = Store::find($orderObj->store_id);
$lat_lng = $sObj->lat_lng; //121.47,31.23
$latlngArr = $lat_lng ? explode(",", $lat_lng) : [];
$delivery['contacts'] = $sObj->contacts;
$delivery['phone'] = $sObj->phone;
$delivery['address'] = $sObj->address;
$delivery['lat'] = isset($latlngArr[0]) ? $latlngArr[0] : '';
$delivery['lng'] = isset($latlngArr[1]) ? $latlngArr[1] : '';
}
$data = [
'id' => $order_id,
'order_sn' => $orderObj->order_sn,
'user_id' => $orderObj->user_id,
'order_amount' => $orderObj->order_amount,
//'mobile' => $orderObj->mobile,
'delivery' => $delivery,
'delivery_type' => $orderObj->delivery_type,
'delivery_typename' => ($orderObj->delivery_type == 1) ? '快递代收点' : '送货上门',
'created_at' => date("Y-m-d H:i:s", strtotime($orderObj->created_at)),
'order_goods' => $order_goods
];
return $this->JsonResponse($data);
}
//订单详情
public function OrderInfo(Request $request)
{
$order_id = $request->order_id ?? 0;
$orderObj = OrderInfoModel::find($order_id);
if (!$orderObj) {
return $this->JsonResponse('', '参数错误', 201);
}
$user_id = $request->user()->id;
if ($orderObj->user_id != $user_id) {
return $this->JsonResponse('', '非本人订单', 201);
}
//商品信息
$order_goods = $this->getOrderGoods($order_id);
//快递待收点、收货地址
$delivery = [];
if ($orderObj->consignee) {
//$addressObj = UserAddress::find($orderObj->address_id);
$delivery['contacts'] = $orderObj->consignee;
$delivery['phone'] = $orderObj->mobile;
$delivery['address'] = $orderObj->address;
$delivery['area'] = $orderObj->area;
// $delivery['lat'] = $addressObj->lat;
// $delivery['lng'] = $addressObj->lng;
}
if ($orderObj->store_id) {
$sObj = Store::find($orderObj->store_id);
$lat_lng = $sObj->lat_lng; //121.47,31.23
$latlngArr = $lat_lng ? explode(",", $lat_lng) : [];
$delivery['contacts'] = $sObj->contacts;
$delivery['phone'] = $sObj->phone;
$delivery['address'] = $sObj->address;
$delivery['lat'] = isset($latlngArr[0]) ? $latlngArr[0] : '';
$delivery['lng'] = isset($latlngArr[1]) ? $latlngArr[1] : '';
}
//订单状态
$order_status = $orderObj->order_status;
$status_txt = OrderInfoModel::STATUS_OPTIONS[$order_status];
$data = [
'id' => $orderObj->id,
'order_sn' => $orderObj->order_sn,
'user_id' => $orderObj->user_id,
'order_amount' => $orderObj->order_amount,
'mobile' => $orderObj->mobile,
'order_status' => $order_status,
'status_txt' => $status_txt,
'verification_code' => $orderObj->verification_code ?? '',
'delivery' => $delivery,
'delivery_type' => $orderObj->delivery_type,
'delivery_typename' => ($orderObj->delivery_type == 1) ? '快递代收点' : '送货上门',
'created_at' => date("Y-m-d H:i:s", strtotime($orderObj->created_at)),
'order_goods' => $order_goods
];
return $this->JsonResponse($data);
}
//订单商品信息
private function getOrderGoods($oid)
{
$order_goods = [];
$ogoods = OrderGoods::where(["order_id" => $oid])->get();
foreach ($ogoods as $key => $valObj) {
$tmp = [];
$tmp['og_id'] = $valObj->id;
$tmp['goods_id'] = $valObj->goods_id;
$tmp['goods_name'] = $valObj->goods_name;
$tmp['goods_number'] = $valObj->goods_number;
$tmp['goods_attr'] = $valObj->goods_attr;
$tmp['goods_price'] = $valObj->goods_price;
$tmp['is_comment'] = $valObj->is_comment;
$tmp['goods_img'] = $valObj->goods_img ? togetherFilePath($valObj->goods_img) : '';
array_push($order_goods, $tmp);
}
return $order_goods;
}
//购物车确认订单
public function CheckoutCartOrder(Request $request)
{
$cartKey = $request->cartKey ?? ''; //商品ID拼接 5_1,6_1
if (!$cartKey) {
return $this->JsonResponse('', '请选择购物车商品', 500);
}
$gidArr = explode(",", $cartKey);
$user = $request->user();
$shoppingCart = $user->shopping_cart ? json_decode($user->shopping_cart, true) : [];
$data = [];
foreach ($shoppingCart as $kk => $item) {
$tmp = [];
if (!in_array($kk, $gidArr)) {
continue;
}
$goodsObj = GoodModel::find($item['goods_id']);
$tmp['catKey'] = $kk;
$tmp['goods_id'] = $item['goods_id'];
$tmp['goods_name'] = $goodsObj->goods_name;
$tmp['num'] = $item['num'];
$tmp['goods_price'] = sprintf('%.2f', $item['goods_price']);
$tmp['attr_name'] = $item['attr_txt'];
$tmp['goods_img'] = $goodsObj->cover_img ? togetherFilePath($goodsObj->cover_img) : '';
$tmp['attr_id'] = $item['attr_id'];
array_push($data, $tmp);
}
return $this->JsonResponse($data);
}
//商户端首页统计
public function orderCollect(Request $request)
{
$muser = $request->user();
$merchant_id = $muser->merchant_id;
//订单状态 0:待付款 1:待到货 2:待领取 3: 待评价 4:已完成 7:已取消 8:已退款
$where = ['merchant_id' => $merchant_id];
$firstDayOfMonth = date('Y-m-01 00:00:00'); // 00:00:00
$lastDayOfMonth = date("Y-m-t 23:59:59", time());
//本月数据统计
$currentMonth = [];
$currentMonth['buyCount'] = OrderInfoModel::where($where)->where('pay_status', 1)->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->count();
$currentMonth['pickedCount'] = OrderInfoModel::where($where)->where('pay_status', 1)->whereIn('order_status', [3, 4])->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->count();
$currentMonth['waitCount'] = OrderInfoModel::where($where)->where('pay_status', 1)->where("order_status", 2)->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->count();
$currentStock = MerchantGoodSku::where($where)->sum('stock');
$currentMonth['stockCount'] = $currentStock;
//上月数据统计
$lastMonth = [];
if (date('d') < 10) {
}
$firstDayOfLastMonth = date('Y-m-01 00:00:00', strtotime('-1 month', time()));
$ninthDayOfLastMonth = date('Y-m-t 23:59:59', strtotime('-1 month', time()));
$lastMonth['buyCount'] = OrderInfoModel::where($where)->where('pay_status', 1)->whereBetween('created_at', [$firstDayOfLastMonth, $ninthDayOfLastMonth])->count();
$lastMonth['pickedCount'] = OrderInfoModel::where($where)->where('pay_status', 1)->whereIn('order_status', [3, 4])->whereBetween('created_at', [$firstDayOfLastMonth, $ninthDayOfLastMonth])->count();
$lastMonth['waitCount'] = OrderInfoModel::where($where)->where('pay_status', 1)->where("order_status", 2)->whereBetween('created_at', [$firstDayOfLastMonth, $ninthDayOfLastMonth])->count();
//本月订单商品销量
$goods_number = OrderGoods::where(['merchant_id' => $merchant_id, 'is_pay' => 1])
->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->sum('goods_number');
$lastMonth['stockCount'] = $goods_number + $currentStock;
return $this->JsonResponse(['current' => $currentMonth ? $currentMonth : new \stdClass(), 'last' => $lastMonth ? $lastMonth : new \stdClass()]);
}
}
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Command\Log; use App\Command\Log;
use App\Models\Pay; use App\Models\Adapay;
use App\Models\UserAddress; use App\Models\UserAddress;
use App\Models\Store; use App\Models\Store;
use App\Models\Good as GoodModel; use App\Models\Good as GoodModel;
use App\Models\User as UserModel;
use App\Models\PaymentRecord;
use App\Models\GoodSku; use App\Models\GoodSku;
use App\Models\OrderGoods; use App\Models\OrderGoods;
use App\Models\OrderInfo as OrderInfoModel; use App\Models\OrderInfo as OrderInfoModel;
...@@ -15,6 +17,10 @@ ...@@ -15,6 +17,10 @@
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use League\CommonMark\Node\Query\OrExpr; use League\CommonMark\Node\Query\OrExpr;
use App\Handlers\MpAaccessToken;
use DateTime;
use DateTimeZone;
use Exception;
class OrderController extends BaseController class OrderController extends BaseController
{ {
...@@ -41,7 +47,7 @@ public function CheckoutBuyOrder(Request $request) ...@@ -41,7 +47,7 @@ public function CheckoutBuyOrder(Request $request)
$arrObj = GoodSku::where('goods_id', $goods_id)->where('attr_sn', $attr_sn)->first(); $arrObj = GoodSku::where('goods_id', $goods_id)->where('attr_sn', $attr_sn)->first();
$attr_val = $arrObj ? $arrObj->attr_val : ''; $attr_val = $arrObj ? $arrObj->attr_val : '';
$attr_id = $arrObj ? $arrObj->id : 0; $attr_id = $arrObj ? $arrObj->id : 0;
$goods_price = ($arrObj && $merchant_id) ? $arrObj->cg_price : $arrObj->market_price; $goods_price = ($arrObj && $goodsObj->goods_type && $merchant_id) ? $arrObj->cg_price : $arrObj->market_price;
} }
$data = []; $data = [];
...@@ -62,7 +68,8 @@ public function CreateBuyOrder(Request $request) ...@@ -62,7 +68,8 @@ public function CreateBuyOrder(Request $request)
$orderObj = new OrderInfoModel(); $orderObj = new OrderInfoModel();
$userObj = $request->user(); $userObj = $request->user();
$user_id = $userObj->id; $user_id = $userObj->id;
$merchant_id = (int)$userObj->merchant_id; $merchant_id = (int)$userObj->merchant_id; //绑定企业
$spuid = $userObj->spuid; //直推
$goods_id = $request->goods_id; $goods_id = $request->goods_id;
$num = $request->num ?? 1; $num = $request->num ?? 1;
$attr_id = $request->attr_id ?? 0; $attr_id = $request->attr_id ?? 0;
...@@ -104,7 +111,7 @@ public function CreateBuyOrder(Request $request) ...@@ -104,7 +111,7 @@ public function CreateBuyOrder(Request $request)
} }
} }
$attr_val = $arrObj ? $arrObj->attr_val : ''; $attr_val = $arrObj ? $arrObj->attr_val : '';
$good_price = ($arrObj && $merchant_id) ? $arrObj->cg_price : $arrObj->market_price; $good_price = ($arrObj && $goodsObj->goods_type && $merchant_id) ? $arrObj->cg_price : $arrObj->market_price;
} }
//商品总价 //商品总价
$total_price = ($good_price * $num); $total_price = ($good_price * $num);
...@@ -133,6 +140,7 @@ public function CreateBuyOrder(Request $request) ...@@ -133,6 +140,7 @@ public function CreateBuyOrder(Request $request)
$orderObj->delivery_type = $delivery_type; $orderObj->delivery_type = $delivery_type;
$orderObj->merchant_id = $merchant_id; $orderObj->merchant_id = $merchant_id;
$orderObj->store_id = $store_id; $orderObj->store_id = $store_id;
$orderObj->is_commission = ($spuid || $merchant_id) ? 1 : 0;
if ($orderObj->save()) { if ($orderObj->save()) {
$order_id = $orderObj->id; $order_id = $orderObj->id;
foreach ($orderGoods as $key => $item) { foreach ($orderGoods as $key => $item) {
...@@ -158,6 +166,7 @@ public function CreateOrder(Request $request) ...@@ -158,6 +166,7 @@ public function CreateOrder(Request $request)
$userObj = $request->user(); $userObj = $request->user();
$user_id = $userObj->id; $user_id = $userObj->id;
$merchant_id = $userObj->merchant_id; $merchant_id = $userObj->merchant_id;
$spuid = $userObj->spuid; //直推
$catKey = $request->catKey ?? ''; //购物车KeyID拼接 5_1,6_2 $catKey = $request->catKey ?? ''; //购物车KeyID拼接 5_1,6_2
$delivery_type = $request->delivery_type; // 收货方式 1:代收点 2:送货上门 $delivery_type = $request->delivery_type; // 收货方式 1:代收点 2:送货上门
$store_id = $request->store_id ?? 0; //代收点 门店ID $store_id = $request->store_id ?? 0; //代收点 门店ID
...@@ -207,7 +216,7 @@ public function CreateOrder(Request $request) ...@@ -207,7 +216,7 @@ public function CreateOrder(Request $request)
return $this->JsonResponse('', '该商品库存不足!', 500); return $this->JsonResponse('', '该商品库存不足!', 500);
} }
} }
$goods_price = $merchant_id ? $skuObj->cg_price : $skuObj->market_price; $goods_price = ($merchant_id && $goodsObj->goods_type) ? $skuObj->cg_price : $skuObj->market_price;
$goods_img = isset($goodsObj->cover_img) ? $goodsObj->cover_img : ''; $goods_img = isset($goodsObj->cover_img) ? $goodsObj->cover_img : '';
$goods_name .= $goodsObj->goods_name . "、"; $goods_name .= $goodsObj->goods_name . "、";
...@@ -238,10 +247,10 @@ public function CreateOrder(Request $request) ...@@ -238,10 +247,10 @@ public function CreateOrder(Request $request)
$orderObj->mobile = $phone; $orderObj->mobile = $phone;
$orderObj->goods_amount = $total_price; $orderObj->goods_amount = $total_price;
$orderObj->order_amount = $total_price; $orderObj->order_amount = $total_price;
//$orderObj->goods_sn = $goodObj->goods_sn;
$orderObj->delivery_type = $delivery_type; $orderObj->delivery_type = $delivery_type;
$orderObj->merchant_id = $merchant_id; $orderObj->merchant_id = $merchant_id;
$orderObj->store_id = $store_id; $orderObj->store_id = $store_id;
$orderObj->is_commission = ($spuid || $merchant_id) ? 1 : 0;
if ($orderObj->save()) { if ($orderObj->save()) {
$order_id = $orderObj->id; $order_id = $orderObj->id;
...@@ -289,15 +298,16 @@ public function pay(Request $request) ...@@ -289,15 +298,16 @@ public function pay(Request $request)
try { try {
$res = ''; $res = '';
$order = OrderInfoModel::find($order_id); $order = OrderInfoModel::find($order_id);
if ($order->pay_cs > 0) { if ($order->pay_cs > 0 && $order->pay_cs < 20) {
// $order_record = $order->order_record ?? $order->order_sn; $order_record = $order->order_record ?? $order->order_sn;
// $order->order_sn = $this->getOrderSn(); $order->order_sn = $this->getOrderSn();
// $order->order_record = $order_record . "|" . $order->order_sn; $order->order_record = $order_record . "|" . $order->order_sn;
// $order->save(); $order->save();
} }
$orderGoodsObj = OrderGoods::where("order_id", $order_id)->first(); $orderGoodsObj = OrderGoods::where("order_id", $order_id)->first();
$order_title = $orderGoodsObj ? $orderGoodsObj->goods_name : ''; $order_title = $orderGoodsObj ? $orderGoodsObj->goods_name : '';
$res = Pay::pay($order_title, $order->order_sn, $order->order_amount, $openid); Log::add('--支付订单号ID--', ['order_id' => $order_id, 'order_sn' => $order->order_sn]);
$res = (new Adapay())->pay($order_title, $order->order_sn, $order->order_amount, $openid);
$order->pay_cs += 1; $order->pay_cs += 1;
$order->save(); $order->save();
...@@ -305,15 +315,17 @@ public function pay(Request $request) ...@@ -305,15 +315,17 @@ public function pay(Request $request)
return $this->JsonResponse($res); return $this->JsonResponse($res);
} catch (\Exception $exception) { } catch (\Exception $exception) {
Log::add('拉起微信支付失败', $exception->getMessage()); Log::add('拉起微信支付失败', $exception->getMessage());
return $this->JsonResponse('', '拉起微信支付失败', 201); return $this->JsonResponse('', $exception->getMessage(), 500);
} }
} }
//付款回调 //付款回调
public function payNotify(Request $request) public function payNotify(Request $request)
{ {
$fields = $request->query->all(); Log::add('--支付回调结果--', $_POST);
return $this->JsonResponse(Pay::payNotify($fields)); $fields = $_POST ?? [];
//$result = file_get_contents('php://input');
return $this->JsonResponse((new Adapay())->payNotify($fields));
} }
...@@ -422,6 +434,12 @@ public function canceOrder(Request $request) ...@@ -422,6 +434,12 @@ public function canceOrder(Request $request)
} }
} }
} }
//待发货订单--退款
if ($model->order_status == 1 && $model->order_amount > 0) {
$order_sn = $model->order_sn;
$refund_no = "R" . date("YmdHis") . rand(100000, 999999); //退单号
$result = (new Adapay())->refund($order_sn, $refund_no);
}
$model->order_status = 7; $model->order_status = 7;
$model->save(); $model->save();
...@@ -471,19 +489,80 @@ public function delOrder(Request $request) ...@@ -471,19 +489,80 @@ public function delOrder(Request $request)
//扫码核销 //扫码核销
public function scanCodeVerifi(Request $request) public function scanCodeVerifi(Request $request)
{ {
$mpTokenObj = new MpAaccessToken();
$dateTime = new DateTime();
$dateTime->setTimezone(new DateTimeZone('Asia/Shanghai'));
$upload_time = $dateTime->format('Y-m-d\TH:i:s.vP');
$verObj = $request->user(); $verObj = $request->user();
$code = $request->code ?? ''; $code = $request->code ?? '';
$orderObj = OrderInfoModel::where('verification_code', $code)->first(); $orderObj = OrderInfoModel::where('verification_code', $code)->first();
if (!$orderObj) { if (!$orderObj) {
return $this->JsonResponse('', '参数错误', 201); return $this->JsonResponse('', '参数错误', 201);
} }
Log::add('核销操作5', [$orderObj->verification_at]); //核销员所属门店
$hx_store = $useObj->store_id ?? 0;
if ($verObj->role_id != 2 || $orderObj->store_id != $hx_store) {
//return $this->JsonResponse('', '核销码不匹配门店', 500);
}
Log::add('核销操作', [$orderObj->verification_at]);
if (!$orderObj->verification_at) { if (!$orderObj->verification_at) {
$orderObj->order_status = 3; $orderObj->order_status = 3;
$orderObj->verifier_id = $verObj->id; $orderObj->verifier_id = $verObj->id;
$orderObj->verifier = $verObj->name; $orderObj->verifier = $verObj->name;
$orderObj->verification_at = date("Y-m-d H:i:s"); $orderObj->verification_at = date("Y-m-d H:i:s");
//$orderObj->save();
try {
//接入微信小程序发货管理
Log::add('是否核销126', []);
//付款记录
$recordObj = PaymentRecord::where('order_sn', $orderObj->order_sn)->first();
if (!$recordObj) {
throw new Exception('该订单尚未支付');
}
$transaction_id = $recordObj->other_order;
$payerOpenid = UserModel::where('id', $recordObj->uid)->value('openid');
//商品信息
$ogItem = DB::table('li_order_goods')
->select(DB::raw('GROUP_CONCAT(goods_name) as shipping_goods'))
->where('order_id', $orderObj->id)
->first();
$access_token = $mpTokenObj->getAccessToken();
$url = "https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?access_token=" . $access_token;
$data = [
"order_key" => [
"order_number_type" => 2,
"transaction_id" => $transaction_id,
],
"logistics_type" => 4, //4、用户自提
"delivery_mode" => 1, //1、(统一发货)
"shipping_list" => [
["item_desc" => $ogItem->shipping_goods]
],
"upload_time" => $upload_time,
"payer" => [
"openid" => $payerOpenid,
]
];
$result = curl_post_request($url, $data);
Log::add('发货录入', $result);
if ($result['errcode'] != 0) {
throw new Exception($result['errmsg']);
} else {
$orderObj->shipping_type = 4;
$orderObj->shipping_goods = $ogItem->shipping_goods;
$orderObj->shipping_at = date("Y-m-d H:i:s");
$orderObj->save(); $orderObj->save();
}
DB::commit();
} catch (Exception $e) {
DB::rollBack();
return $this->JsonResponse('', $e->getMessage(), 500);
}
} else { } else {
return $this->JsonResponse('', '该码已核销,无需多次重复扫码', 500); return $this->JsonResponse('', '该码已核销,无需多次重复扫码', 500);
} }
...@@ -494,12 +573,18 @@ public function scanCodeVerifi(Request $request) ...@@ -494,12 +573,18 @@ public function scanCodeVerifi(Request $request)
//扫码核销展示详情 //扫码核销展示详情
public function scanCodeDetail(Request $request) public function scanCodeDetail(Request $request)
{ {
$useObj = $request->user();
$code = $request->code ?? ''; $code = $request->code ?? '';
$orderObj = OrderInfoModel::where('verification_code', $code)->first(); $orderObj = OrderInfoModel::where('verification_code', $code)->first();
if (!$orderObj) { if (!$orderObj) {
Log::add('核销码', $code); Log::add('核销码', $code);
return $this->JsonResponse('', '参数错误', 201); return $this->JsonResponse('', '参数错误', 201);
} }
//核销员所属门店
$hx_store = $useObj->store_id ?? 0;
if ($useObj->role_id != 2 || $orderObj->store_id != $hx_store) {
//return $this->JsonResponse('', '核销码不匹配门店', 500);
}
$order_id = $orderObj->id; $order_id = $orderObj->id;
//商品信息 //商品信息
$order_goods = $this->getOrderGoods($order_id); $order_goods = $this->getOrderGoods($order_id);
......
<?php <?php
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Command\Log; use App\Command\Log;
use App\Models\Carousel; use App\Models\Carousel;
use App\Models\User; use App\Models\User;
use App\Models\OrderDivideRecord; use App\Models\OrderDivideRecord;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class OrderDivideRecordController extends BaseController class OrderDivideRecordController extends BaseController
{ {
public function getList(Request $request) public function getList(Request $request)
{ {
$type = $request->type ?? 0; $type = $request->type ?? 0;
$page = $request->page ?? 1; $page = $request->page ?? 1;
$limit = $request->limit ?? 10; $limit = $request->limit ?? 10;
if (!in_array($type, [1, 2, 3])) { if (!in_array($type, [1, 2, 3])) {
return $this->JsonResponse('', '参数错误', 201); return $this->JsonResponse('', '参数错误', 201);
} }
$userObj = $request->user(); $userObj = $request->user();
$um_id = ($type == 3) ? $userObj->merchant_id : $userObj->id; $um_id = ($type == 3) ? $userObj->merchant_id : $userObj->id;
$sql = OrderDivideRecord::where(['um_id' => $um_id, 'sh_type' => $type, 'deleted_at' => null]); $sql = OrderDivideRecord::where(['um_id' => $um_id, 'sh_type' => $type, 'deleted_at' => null]);
$total = $sql->count(); $total = $sql->count();
$data = [ $data = [
'total' => $total, 'total' => $total,
'total_page' => ceil($total / $limit), 'total_page' => ceil($total / $limit),
'list' => [] 'list' => []
]; ];
$listData = $sql->offset(($page - 1) * $limit)->limit($limit)->orderBy('created_at', 'DESC')->get(); $listData = $sql->offset(($page - 1) * $limit)->limit($limit)->orderBy('created_at', 'DESC')->get();
if ($listData->toArray()) { if ($listData->toArray()) {
foreach ($listData as $kk => $vv) { foreach ($listData as $kk => $vv) {
$data['list'][] = [ $data['list'][] = [
'title' => isset(OrderDivideRecord::COMMISSION_TYPE[$vv->sh_type]) ? OrderDivideRecord::COMMISSION_TYPE[$vv->sh_type] : '', 'title' => isset(OrderDivideRecord::COMMISSION_TYPE[$vv->sh_type]) ? OrderDivideRecord::COMMISSION_TYPE[$vv->sh_type] : '',
'created_at' => date("Y-m-d H:i:s", strtotime($vv->created_at)), 'created_at' => date("Y-m-d H:i:s", strtotime($vv->created_at)),
'divide_price' => $vv->divide_price 'divide_price' => $vv->divide_price
]; ];
} }
} }
return $this->JsonResponse($data); return $this->JsonResponse($data);
} }
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Command\Tools;
use App\Command\Log; use App\Command\Log;
use App\Handlers\FileUploadHandler; use App\Handlers\FileUploadHandler;
use App\Models\Merchant; use App\Models\Merchant;
...@@ -14,21 +15,14 @@ ...@@ -14,21 +15,14 @@
class StoreAdminUsersController extends BaseController class StoreAdminUsersController extends BaseController
{ {
/**
* 用户登录方法
*
* @param Request $request HTTP请求对象
* @return \Illuminate\Http\JsonResponse JSON响应
*/
public function login(Request $request) public function login(Request $request)
{ {
// $user = User::find(1);
// $accessToken = 'Bearer '.$user->createToken('Access-token')->plainTextToken;
// return $this->JsonResponse([ 'Authorization'=>$accessToken,]);
// $encryptedData = $request->encryptedData ?? '';
// $iv = $request->iv ?? '';
// $session_key = $request->session_key ?? '';
// $openId = $request->openid ??'';
// $res = $this->decryptData($session_key,$encryptedData,$iv,$data);
// if($res != 0 ){
// return $this->JsonResponse('','参数异常',201);
// }
$username = $request->username ?? ''; $username = $request->username ?? '';
$password = $request->password ?? ''; $password = $request->password ?? '';
...@@ -41,8 +35,11 @@ public function login(Request $request) ...@@ -41,8 +35,11 @@ public function login(Request $request)
if (!Hash::check($password, $user->password)) { if (!Hash::check($password, $user->password)) {
return $this->JsonResponse('', '账号或密码错误', 500); return $this->JsonResponse('', '账号或密码错误', 500);
} }
//生成token
// 生成token
$accessToken = 'Bearer ' . $user->createToken('Access-token')->plainTextToken; $accessToken = 'Bearer ' . $user->createToken('Access-token')->plainTextToken;
// 记录登录日志
Log::add('商家端用户--' . $user->id . '登录', ['token' => $accessToken]); Log::add('商家端用户--' . $user->id . '登录', ['token' => $accessToken]);
return $this->JsonResponse([ return $this->JsonResponse([
...@@ -50,13 +47,26 @@ public function login(Request $request) ...@@ -50,13 +47,26 @@ public function login(Request $request)
]); ]);
} }
/**
* 用户注销方法
*
* @param Request $request HTTP请求对象
* @return \Illuminate\Http\JsonResponse JSON响应
*/
public function logout(Request $request) public function logout(Request $request)
{ {
$request->user()->tokens()->delete(); $request->user()->tokens()->delete();
PersonalAccessToken::where(['tokenable_id' => $request->user()->id])->delete(); PersonalAccessToken::where(['tokenable_id' => $request->user()->id])->delete();
return $this->JsonResponse(''); return $this->JsonResponse('');
} }
/**
* 获取用户信息方法
*
* @param Request $request HTTP请求对象
* @return \Illuminate\Http\JsonResponse JSON响应
*/
public function info(Request $request) public function info(Request $request)
{ {
$muser = $request->user(); $muser = $request->user();
...@@ -65,20 +75,35 @@ public function info(Request $request) ...@@ -65,20 +75,35 @@ public function info(Request $request)
$store_id = $muser->store_id; $store_id = $muser->store_id;
$total_revenue = $balance = $cashout = 0; $total_revenue = $balance = $cashout = 0;
$store_name = $merchant_name = ''; $store_name = $merchant_name = '';
if ($merchant_id) { if ($merchant_id) {
$merObj = Merchant::where('id', $merchant_id)->first(); $merObj = Merchant::where('id', $merchant_id)->first();
$buycode = $merObj->buycode; $buycode = $merObj->buycode;
$phone = $merObj->phone; $phone = $merObj->phone;
$merchant_name = $merObj->name; $merchant_name = $merObj->name;
$total_revenue = $merObj->total_revenue ?? 0; $total_revenue = $merObj->total_revenue ?? 0;
$balance = $merObj->balance ?? 0; $balanceValue = $merObj->balance ?? 0;
$cashout = $total_revenue - $balance;
// 使用 Tools 类计算 T+1 未到账金额
$pendingCashout = Tools::calculatePendingCashout($merchant_id);
// 调整金额计算公式
$displayBalance = $balanceValue + $pendingCashout;
$displayCashout = $total_revenue - $displayBalance;
$balance = number_format($displayBalance, 2, '.', '');
$cashout = number_format($displayCashout, 2, '.', '');
Log::add('balance金额', $balance);
Log::add('cashout金额', $cashout);
} }
if ($store_id) { if ($store_id) {
$storeObj = Store::where('id', $store_id)->first(); $storeObj = Store::where('id', $store_id)->first();
$store_name = $storeObj->title; $store_name = $storeObj->title;
$phone = $storeObj->phone; $phone = $storeObj->phone;
} }
return $this->JsonResponse([ return $this->JsonResponse([
'user_id' => $muser->id, 'user_id' => $muser->id,
'username' => $muser->username, 'username' => $muser->username,
......
...@@ -54,30 +54,4 @@ public function autoChangeReceiveStatus() ...@@ -54,30 +54,4 @@ public function autoChangeReceiveStatus()
return '--ok--'; return '--ok--';
} }
//定时任务--订单分佣
public function autoOrderCommission()
{
$chunkSize = 50; // 每次处理的订单数量
$orders = OrderInfoModel::where(["order_status" => 4, 'is_commission' => 1])->orderBy('id')->take($chunkSize);
while ($orders->count() > 0) {
$orders->chunk($chunkSize, function ($batch) {
foreach ($batch as $order) {
//佣金分配
$res = OrderDivideRecord::divide($order->id);
if ($res) {
$order->is_commission = 2;
$order->save();
}
}
});
// 移动游标到下一批
$orders->skip($chunkSize);
$orders = $orders->getQuery();
sleep(3);
}
return '--ok--';
}
} }
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Api; namespace App\Http\Controllers\Api;
use App\Command\Log; use App\Command\Log;
use App\Command\Tools; // 引入 Tools 类
use App\Handlers\FileUploadHandler; use App\Handlers\FileUploadHandler;
use App\Models\Carousel; use App\Models\Carousel;
use App\Models\GoodSku; use App\Models\GoodSku;
...@@ -50,7 +51,7 @@ public function addShoppingCart(Request $request) ...@@ -50,7 +51,7 @@ public function addShoppingCart(Request $request)
Log::add('添加购物车商品规格', $goodsAttrObj->toArray()); Log::add('添加购物车商品规格', $goodsAttrObj->toArray());
$attr_id = $goodsAttrObj->id; $attr_id = $goodsAttrObj->id;
$attr_txt = $goodsAttrObj->attr_val; $attr_txt = $goodsAttrObj->attr_val;
$goods_price = $merchant_id ? $goodsAttrObj->cg_price : $goodsAttrObj->market_price; $goods_price = ($merchant_id && $goodsObj->goods_type) ? $goodsAttrObj->cg_price : $goodsAttrObj->market_price;
} }
$shoppingCart = isset($userObj->shopping_cart) ? json_decode($userObj->shopping_cart, true) : []; $shoppingCart = isset($userObj->shopping_cart) ? json_decode($userObj->shopping_cart, true) : [];
...@@ -166,9 +167,24 @@ public function numberShoppingCart(Request $request) ...@@ -166,9 +167,24 @@ public function numberShoppingCart(Request $request)
public function info(Request $request) public function info(Request $request)
{ {
$user = $request->user(); $user = $request->user();
$balance = $user->balance ?? 0; //余额 $merchant_id = $user->merchant_id ?? 0;
$total_revenue = $user->total_revenue ?? 0; //总金额 $total_revenue = $user->total_revenue ?? 0; // 总金额
$cashout = $total_revenue - $balance; //已提现
$merObj = Merchant::where('id', $merchant_id)->first();
$balanceValue = $merObj->balance ?? 0;
$user_id = $user->id ?? 0;
// 使用 Tools 类计算 T+1 未到账金额
$pendingCashout = Tools::calculatePendingCashout($user_id);
// 调整金额计算公式
$displayBalance = $balanceValue + $pendingCashout;
$displayCashout = $total_revenue - $displayBalance;
$balance = number_format($displayBalance, 2, '.', '');// 余额
$cashout = number_format($displayCashout, 2, '.', '');// 已提现
return $this->JsonResponse([ return $this->JsonResponse([
'user_id' => $user->id, 'user_id' => $user->id,
'nickname' => $user->name, 'nickname' => $user->name,
...@@ -176,11 +192,11 @@ public function info(Request $request) ...@@ -176,11 +192,11 @@ public function info(Request $request)
'phone' => $user->phone, 'phone' => $user->phone,
'phone_sec' => $user->phone ? substr($user->phone, 0, 3) . "****" . substr($user->phone, 7) : '', 'phone_sec' => $user->phone ? substr($user->phone, 0, 3) . "****" . substr($user->phone, 7) : '',
//'status' => $user->status, //'status' => $user->status,
'merchant_id' => $user->merchant_id ?? 0, 'merchant_id' => $merchant_id,
'buycode' => $user->buycode ?? '', 'buycode' => $user->buycode ?? '',
'balance' => $balance ?? 0, 'balance' => $balance ?? 0,
'total_revenue' => $total_revenue ?? 0, 'total_revenue' => $total_revenue ?? 0,
'cashout' => $cashout ?? 0, 'cashout' => $cashout ?? 0
]); ]);
} }
...@@ -374,6 +390,9 @@ public function share(Request $request) ...@@ -374,6 +390,9 @@ public function share(Request $request)
$userObj = $request->user(); $userObj = $request->user();
$user_time = strtotime($userObj->created_at); $user_time = strtotime($userObj->created_at);
//用户注册时间大于分享人注册时间 才可以分享
Log::add('share','分享人注册时间:'. $sp_time .';当前用户注册时间:'. $user_time,$request);
if ($user_time > $sp_time) { if ($user_time > $sp_time) {
$user_id = $userObj->id; $user_id = $userObj->id;
$spuid = $userObj->spuid; //是否已有推荐人 $spuid = $userObj->spuid; //是否已有推荐人
......
...@@ -21,6 +21,7 @@ class Kernel extends HttpKernel ...@@ -21,6 +21,7 @@ class Kernel extends HttpKernel
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class, \App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\RequestLoggingMiddleware::class, // 添加这一行
]; ];
/** /**
......
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use App\Command\Log; // 引入自定义日志类
class RequestLoggingMiddleware
{
/**
* 定义需要过滤的接口路径数组
* @var array
*/
private $filteredRoutes = [
'auto-to-commentstatus',
'simulate-login'
];
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
// 检查请求的路径是否在过滤列表中
foreach ($this->filteredRoutes as $route) {
if ($request->is($route)) {
return $next($request);
}
}
if (env('LOG_REQUESTS', false)) {
// 记录请求信息
$requestData = [
'method' => $request->method(),
'url' => $request->fullUrl(),
'headers' => $request->headers->all(),
'body' => $request->all(),
];
// 截取请求参数值,每个最多 5000 字符
$requestData = $this->truncateData($requestData);
Log::add('请求参数', $requestData, $request); // 使用自定义日志类记录请求日志
// 继续处理请求
$response = $next($request);
// 记录响应信息
$responseData = [
'status' => $response->getStatusCode(),
'headers' => $response->headers->all(),
'body' => $response->getContent(),
];
// 截取响应参数值,每个最多 5000 字符
$responseData = $this->truncateData($responseData);
Log::add('响应', $responseData, $request); // 使用自定义日志类记录响应日志
return $response;
}
return $next($request);
}
/**
* 截取数据中的字符串值,每个最多 5000 字符
*
* @param array $data
* @return array
*/
private function truncateData(array $data)
{
foreach ($data as $key => $value) {
if (is_string($value)) {
$data[$key] = mb_substr($value, 0, 5000);
} elseif (is_array($value)) {
$data[$key] = $this->truncateData($value);
}
}
return $data;
}
}
...@@ -47,8 +47,7 @@ public function handle() ...@@ -47,8 +47,7 @@ public function handle()
$this->order->order_status = 4; //已完成 $this->order->order_status = 4; //已完成
$this->order->save(); $this->order->save();
//佣金分配
OrderDivideRecord::divide($this->order->id);
DB::commit(); DB::commit();
Log::add('订单自动完成', $this->order->toArray()); Log::add('订单自动完成', $this->order->toArray());
......
<?php
namespace App\Jobs;
use App\Command\Log;
use App\Models\OrderDivideRecord;
use App\Models\OrderInfo;
use App\Models\PaymentRecord;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\DB;
use Exception;
class AutoOrderDivide implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $um_id; //推广人员ID
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($um_id, $delay)
{
$this->um_id = $um_id;
// 设置延迟的时间,delay() 方法的参数代表多少秒之后执行
$this->delay($delay);
}
/**
* * 定义这个任务类具体的执行逻辑
* 当队列处理器从队列中取出任务时,会调用 handle() 方法
* Execute the job.
*
* @return void
*/
public function handle()
{
$payment_confirm = new \NwVVVS\AdapaySdk\PaymentConfirm(); //支付确认
$spObj = User::find($this->um_id);
$member_id = $spObj->member_id;
$chunkSize = 10; // 每次处理数量
$orders = OrderDivideRecord::where(['um_id' => $this->um_id, 'is_div' => 0])->whereIn('sh_type', [1, 2])->orderBy('id')->take($chunkSize);
while ($orders->count() > 0) {
$orders->chunk($chunkSize, function ($batch) use ($member_id, $payment_confirm) {
foreach ($batch as $item) {
//交易记录
$order_sn = OrderInfo::where('id', $item->order_id)->value('order_sn');
$prObj = PaymentRecord::where('order_sn', $order_sn)->first();
# 支付确认参数设置
$payment_params = array(
"payment_id" => $prObj->payment_id,
"order_no" => 'payconfirm_' . date("YmdHis") . rand(100000, 999999),
"confirm_amt" => $item->divide_price,
"description" => "",
"div_members" => "" //分账参数列表 默认是数组List
);
// 分账列表
$payment_params['div_members'] = [
'member_id' => $member_id,
'amount' => $item->divide_price,
'fee_flag' => 'N'
];
# 发起支付确认创建
$payment_confirm->create($payment_params);
# 对支付确认创建结果进行处理
if ($payment_confirm->isError()) {
//失败处理
Log::add('用户绑卡,支付确认失败', $payment_confirm->result);
$result = $payment_confirm->result;
//throw new Exception($result['error_msg']);
} else {
//成功处理
Log::add('支付确认成功', $payment_confirm->result);
$result = $payment_confirm->result;
if ($result['status'] == 'succeeded') {
$item->is_div = 1;
$item->payconfirm_no = $result['order_no'];
$item->save();
Log::add('分账成功', ['order_sn' => $order_sn, 'member_id' => $member_id]);
}
}
}
});
// 移动游标到下一批
$orders->skip($chunkSize);
$orders = $orders->getQuery();
sleep(2);
}
}
}
<?php
namespace App\Models;
use App\Command\Log;
use EasyWeChat\Factory;
use Illuminate\Support\Facades\DB;
use App\Models\Good as GoodModel;
use App\Models\GoodSku;
use Exception;
use NwVVVS\AdapayCore\AdaPay\Payment;
class Adapay
{
public const APP_ID = 'app_c383f483-3c2a-41b6-8d21-7f597dde4c50';
public function __construct()
{
/**
* 商户接入AdaPay SDK时需要设置的初始化参数
* 设置配置从配置文件读取
*/
\NwVVVS\AdapayCore\AdaPay::init(dirname(__FILE__) . "/../../config/merchantConfig.json", "test");
}
public function pay($order_title, $order_sn, $order_amount, $openid)
{
$payment = new \NwVVVS\AdapaySdk\Payment();
# 支付设置
$payment_params = [
"app_id" => Adapay::APP_ID,
"order_no" => $order_sn,
"pay_channel" => "wx_lite",
"pay_mode" => "delay",
"time_expire" => date('YmdHis', time() + 300),
"pay_amt" => $order_amount,
"goods_title" => $order_title,
"goods_desc" => $order_title,
"description" => "",
"notify_url" => env('API_URL') . '/pay-notify',
"expend" => [
"open_id" => $openid
]
];
# 发起支付
$payment->create($payment_params);
# 对支付结果进行处理
Log::add('--调起支付--', $payment->result);
if ($payment->isError()) {
//失败处理
throw new \Exception($payment->result['error_msg']);
} else {
//成功处理
Log::add('--支付参数--', json_decode($payment->result['expend']['pay_info'], true));
$item = json_decode($payment->result['expend']['pay_info'], true);
$item['timestamp'] = $item['timeStamp'];
return $item;
}
}
public function payNotify($params = [])
{
$payment_confirm = new \NwVVVS\AdapaySdk\PaymentConfirm(); //支付确认
$adapay_tools = new \NwVVVS\AdapaySdk\AdapayTools(); //验证签名
$post_data = json_decode($params['data'], 1);
$post_data_str = json_encode($post_data, JSON_UNESCAPED_UNICODE);
$post_sign_str = isset($params['sign']) ? $params['sign'] : '';
# 先校验签名和返回的数据的签名的数据是否一致
$sign_flag = $adapay_tools->verifySign($post_data_str, $post_sign_str);
if (!$sign_flag) {
Log::add('支付签名验证失败', []);
return false;
}
$message = $post_data;
$order_no = $message['order_no'];
$orderObj = OrderInfo::where(['order_sn' => $order_no])->first();
if (!$orderObj) {
Log::add('订单不存在', [$order_no]);
return false;
}
//支付完成后通知
if ($message['status'] == "succeeded" && $orderObj->pay_status == 0) {
DB::beginTransaction();
try {
//更新订单
if ($orderObj->pay_status == 0) {
$orderObj->order_status = 1;
$orderObj->pay_status = 1;
$orderObj->freeze_stat = $message['freeze_stat'];
if ($orderObj->save()) {
//更新商品销量、库存
$goodsList = OrderGoods::where("order_id", $orderObj->id)->get();
foreach ($goodsList as $item) {
//Log::add('--订单商品对象--', $item);
$gid = $item->goods_id;
$attr_id = $item->attr_id;
$mer_id = $item->merchant_id;
$goods_number = $item->goods_number;
//更新此商品支付状态
$item->is_pay = 1;
$item->save();
$goodsObj = GoodModel::find($gid);
//更新商品规格库存
$attrObj = GoodSku::find($attr_id);
$attr_stock = ($attrObj->stock - $goods_number) >= 0 ? $attrObj->stock - $goods_number : 0;
$attrObj->stock = $attr_stock;
$attrObj->save();
//更新商品sku
$skuArr = json_decode($goodsObj->sku, true);
if ($skuArr['sku']) {
foreach ($skuArr['sku'] as $kk => $vv) {
if (isset($vv['attr_sn']) && $vv['attr_sn'] == $attrObj->attr_sn) {
$skuArr['sku'][$kk]['stock'] = $attr_stock;
}
}
$goodsObj->sku = json_encode($skuArr, JSON_UNESCAPED_UNICODE);
$goodsObj->save();
}
//商户规格库存
$mgsObj = MerchantGoodSku::where(['goods_id' => $gid, 'attr_id' => $attr_id, 'merchant_id' => $mer_id])->first();
if ($mer_id && $mgsObj) {
$changeStock = ($mgsObj->stock >= $goods_number) ? $mgsObj->stock - $goods_number : 0;
$mgsObj->stock = $changeStock;
$mgsObj->save();
}
}
}
}
//支付记录
$pay_cord = new PaymentRecord();
$cordLog = $pay_cord->where(['order_sn' => $message['order_no']])->first();
if (!$cordLog) {
$pay_cord->order_sn = $message['order_no'];
$pay_cord->other_order = $message['out_trans_id'];
$pay_cord->payment_id = $message['id'];
$pay_cord->party_order_id = $message['party_order_id'];
$pay_cord->money = $message['real_amt'];
$pay_cord->uid = $orderObj->user_id;
$pay_cord->save();
}
DB::commit();
} catch (\Exception $e) {
Log::add('付款回调失败', $e);
DB::rollBack();
return false;
}
}
//解冻通知
$freeze_stat = $message['freeze_stat'] ?? '';
if ($message['status'] == "succeeded" && $orderObj->freeze_stat == 'FREEZE') {
if ($freeze_stat != 'UNFREEZE') {
return false;
}
$orderObj->freeze_stat = 'UNFREEZE';
$orderObj->save();
//交易记录
$prObj = PaymentRecord::where('order_sn', $order_no)->first();
# 支付确认参数设置
$payment_params = array(
"payment_id" => $prObj->payment_id,
"order_no" => 'payconfirm_' . date("YmdHis") . rand(100000, 999999),
"confirm_amt" => $prObj->money,
"description" => "",
"div_members" => "" //分账参数列表 默认是数组List
);
DB::beginTransaction();
try {
//分账列表
$divResult = OrderDivideRecord::divide($orderObj->id, $payment_params['order_no']); //返回分账参数列表
$payment_params['div_members'] = $divResult['div_members'];
$payment_params['confirm_amt'] = $divResult['confirm_amt'];
Log::add('发起支付确认' . $order_no, $payment_params);
# 发起支付确认创建
$payment_confirm->create($payment_params);
# 对支付确认创建结果进行处理
if ($payment_confirm->isError()) {
//失败处理
Log::add('支付确认失败', $payment_confirm->result);
$result = $payment_confirm->result;
throw new Exception($result['error_msg']);
} else {
//成功处理
Log::add('支付确认成功', $payment_confirm->result);
$result = $payment_confirm->result;
if ($result['status'] == 'succeeded') {
Log::add('分账成功', ['order_sn' => $order_no]);
//写入支付确认信息
(new HfPayconfirm())->add($payment_params, $result['fee_amt']);
}
}
DB::commit();
} catch (\Exception $e) {
Log::add('支付确认对象失败', $e->getMessage());
DB::rollBack();
return false;
}
}
return true;
}
//创建支付确认
public function createPaymentConfirm($payment_params)
{
$payment = new \NwVVVS\AdapaySdk\PaymentConfirm();
# 发起支付确认创建
$payment->create($payment_params);
# 对支付确认创建结果进行处理
if ($payment->isError()) {
//失败处理
Log::add('支付确认返回结果,失败', $payment->result);
throw new Exception($payment->result['error_msg']);
} else {
//成功处理
Log::add('支付确认返回结果,成功', $payment->result);
return $payment->result;
}
}
//查询支付对象列表
public function queryList($payment_params)
{
$payment = new \NwVVVS\AdapaySdk\Payment();
$payment->queryList($payment_params);
# 对支付结果进行处理
if ($payment->isError()) {
//失败处理
echo "<pre>";
print_r($payment->result);
} else {
//成功处理
echo "<pre>";
print_r($payment->result);
die;
}
}
//退款
public function refund($order_sn, $refund_no)
{
#初始化退款对象
$payment = new \NwVVVS\AdapaySdk\PaymentReverse();
$payLog = PaymentRecord::where('order_sn', $order_sn)->first();
$payment_params = array(
# 支付对象ID
"payment_id" => $payLog->payment_id,
# 商户app_id
"app_id" => Adapay::APP_ID,
# 撤销订单号
"order_no" => $refund_no,
# 撤销金额
"reverse_amt" => $payLog->money,
# 通知地址
"notify_url" => env('API_URL') . '/refund-notify',
# 撤销原因
"reason" => "取消订单",
# 扩展域
"expand" => "",
# 设备信息
"device_info" => "",
);
# 发起支付撤销
$payment->create($payment_params);
# 对支付撤销结果进行处理
if ($payment->isError()) {
//失败处理
Log::add('撤销失败', $payment->result);
$msg = isset($payment->result['error_msg']) ? $payment->result['error_msg'] : '撤销失败';
throw new \Exception($msg);
}
$result = $payment->result;
Log::add('撤销成功', $result);
//系统订单信息
$orderObj = OrderInfo::where("order_sn", $order_sn)->first();
//退款记录
$refund_cord = new RefundRecord();
$cordLog = $refund_cord->where(['refund_no' => $result['order_no']])->first();
if (!$cordLog) {
$refund_cord->order_sn = $order_sn;
$refund_cord->refund_no = $result['order_no'];
$refund_cord->payment_id = $result['id'];
$refund_cord->money = $result['reverse_amt'];
$refund_cord->uid = $orderObj->user_id;
$refund_cord->save();
}
return true;
}
//退款回调
public function refundNotify($params)
{
$adapay_tools = new \NwVVVS\AdapaySdk\AdapayTools();
$post_data = json_decode($params['data'], 1);
$post_data_str = json_encode($post_data, JSON_UNESCAPED_UNICODE);
$post_sign_str = isset($params['sign']) ? $params['sign'] : '';
# 先校验签名和返回的数据的签名的数据是否一致
$sign_flag = $adapay_tools->verifySign($post_data_str, $post_sign_str);
if (!$sign_flag) {
//Log::add('退款签名验证失败', []);
//return false;
}
$message = $post_data;
$recordObj = RefundRecord::where(['refund_no' => $message['order_no'], 'payment_id' => $message['id']])->first();
if (!$recordObj) {
Log::add('退单记录不存在', [$message['order_no']]);
return false;
}
if ($message['status'] == 'succeeded') {
$recordObj->status = 1;
$recordObj->save();
return true;
}
return false;
}
//创建个人用户
public function createMember($uid, $phone)
{
$member = new \NwVVVS\AdapaySdk\Member();
$member_params = array(
# app_id
"app_id" => Adapay::APP_ID,
# 用户id
"member_id" => "mm_" . $uid,
# 用户手机号
"tel_no" => $phone,
);
# 创建
$member->create($member_params);
# 对创建用户对象结果进行处理
if ($member->isError()) {
//失败处理
Log::add('创建用户失败-' . $uid, $member->result);
return $member->result;
} else {
//成功处理
Log::add('创建用户成功', $member->result);
return $member->result;
}
}
//创建企业用户
public function createCompany($member_params)
{
$member = new \NwVVVS\AdapaySdk\CorpMember();
# 创建企业用户
$member->create($member_params);
# 对创建企业用户结果进行处理
if ($member->isError()) {
//失败处理
return $member->result;
} else {
//成功处理
return $member->result;
}
}
//创建结算对象
public function createMemberSettleAccount($account_params)
{
$account = new \NwVVVS\AdapaySdk\SettleAccount();
# 创建结算账户
$account->create($account_params);
# 对创建结算账户结果进行处理
if ($account->isError()) {
//失败处理
Log::add('创建用户结算账户失败', $account->result);
return $account->result;
} else {
//成功处理
Log::add('创建用户结算账户成功', $account->result);
return $account->result;
}
}
//删除结算账户
public function deleteSettleAccount($account_params)
{
$account = new \NwVVVS\AdapaySdk\SettleAccount();
# 结算账户
$account->delete($account_params);
# 对删除结算账户结果进行处理
if ($account->isError()) {
//失败处理
return $account->result;
} else {
//成功处理
return $account->result;
}
}
//查询账户余额
public function queryBalance($account_params)
{
$account = new \NwVVVS\AdapaySdk\SettleAccount();
# 查询账户余额
$account->balance($account_params);
# 对查询账户余额结果进行处理
if ($account->isError()) {
//失败处理
return $account->result;
} else {
//成功处理
return $account->result;
}
}
}
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
class HfCompanyMember extends Model
{
use HasDateTimeFormatter;
use SoftDeletes;
protected $table = 'hf_company_member';
//添加企业用户
public function addCompanyMember($member_params)
{
$member = new \NwVVVS\AdapaySdk\CorpMember();
# 创建企业用户
$member->create($member_params);
# 对创建企业用户结果进行处理
if ($member->isError()) {
//失败处理
echo "<pre>";
print_r($member->result);
} else {
//成功处理
echo "<pre>";
print_r($member->result);
}
}
}
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
class HfPayconfirm extends Model
{
use HasDateTimeFormatter;
use SoftDeletes;
protected $table = 'hf_payconfirm';
public function add($params, $fee_amt)
{
$confirmObj = new self();
$confirmObj->payment_id = $params['payment_id'];
$confirmObj->order_no = $params['order_no'];
$confirmObj->confirm_amt = $params['confirm_amt'];
$confirmObj->fee_amt = $fee_amt;
$confirmObj->save();
return true;
}
}
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
class HfProvAreaCode extends Model
{
use HasDateTimeFormatter;
protected $table = 'hf_prov_area_code';
}
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;
class HfSettleAccount extends Model
{
use HasDateTimeFormatter;
use SoftDeletes;
protected $table = 'hf_settle_account';
}
...@@ -20,70 +20,165 @@ class OrderDivideRecord extends Model ...@@ -20,70 +20,165 @@ class OrderDivideRecord extends Model
]; ];
//收益分配 /**
public static function divide($order_id) * 收益分配
* order_id 订单ID
* payconfirm_no 发起确认支付,订单流水号
*/
public static function divide($order_id, $payconfirm_no = '')
{ {
$div_members = []; //汇付 分账对象
$orderObj = OrderInfo::find($order_id); $orderObj = OrderInfo::find($order_id);
$merchant_id = $orderObj->merchant_id; //绑定的商户 $merchant_id = $orderObj->merchant_id; //绑定的商户
$user_id = $orderObj->user_id; //下单用户ID $buyer_id = $orderObj->user_id; //下单用户ID
$userObj = User::find($user_id); $userObj = User::find($buyer_id);
$spuid = $userObj->spuid; //直推分享人 $spuid = $userObj->spuid; //直推分享人
$second_spuid = $userObj->second_spuid; //间推分享人 $second_spuid = $userObj->second_spuid; //间推分享人
$total_amount = 0; //订单商品总价
$first_proportion = $second_proportion = $merchant_proportion = ''; //佣金比例
$sp_ogid = ''; //参与分佣商品ID
$commissionPreData = [
'first_member_id' => '',
'first_amount' => 0,
'second_member_id' => '',
'second_amount' => 0,
'merchant_member_id' => '',
'merchant_amount' => 0,
];
//直推是否实名
$isFirstRealName = 0;
if ($spuid) {
$isFirstRealName = HfSettleAccount::where(['member_type' => 0, 'mid' => $spuid])->count();
}
//间推是否实名
$isSecondRealName = 0;
if ($second_spuid) {
$isSecondRealName = HfSettleAccount::where(['member_type' => 0, 'mid' => $second_spuid])->count();
}
//商户是否实名
$isMerchantRealName = 0;
if ($merchant_id) {
$hfCompanyMObj = HfCompanyMember::where('merchant_id', $merchant_id)->first();
$isMerchantRealName = ($hfCompanyMObj->status == 'succeeded') ? 1 : 0;
}
$ogList = OrderGoods::where("order_id", $order_id)->get(); //订单商品 $ogList = OrderGoods::where("order_id", $order_id)->get(); //订单商品
foreach ($ogList as $kk => $item) { foreach ($ogList as $kk => $item) {
$goods_amount = $item->goods_price * $item->goods_number; $goods_amount = $item->goods_price * $item->goods_number;
$total_amount += $goods_amount;
//商品信息 //商品信息
$goodObj = Good::find($item->goods_id); $goodObj = Good::find($item->goods_id);
$merchant_commission = $goodObj->merchant_commission; $merchant_commission = $goodObj->merchant_commission;
$first_commission = $goodObj->first_commission; $first_commission = $goodObj->first_commission;
$second_commission = $goodObj->second_commission; $second_commission = $goodObj->second_commission;
$first_proportion .= $goodObj->first_commission . ",";
$second_proportion .= $goodObj->second_commission . ",";
$merchant_proportion .= $goodObj->merchant_commission . ",";
$sp_ogid = $item->id . ",";
//直推佣金 //直推佣金
if ($spuid && $first_commission >= 1 && $first_commission < 100) { if ($spuid && $first_commission >= 1 && $first_commission < 100) {
$divide_price = number_format($goods_amount * ($first_commission / 100), 2); $divide_price = number_format($goods_amount * ($first_commission / 100), 2);
//收益直接到直推账户
$spObj = User::find($spuid); $spObj = User::find($spuid);
$spObj->total_revenue += $divide_price; //汇付参数
$spObj->balance += $divide_price; if ($spObj->member_id) {
$spObj->total_revenue += $divide_price; //总余额记录
$spObj->save(); $spObj->save();
self::addRecord($item->id, $order_id, $goods_amount, $divide_price, $first_commission, $spuid, $user_id, 1); //self::addRecord($item->id, $order_id, $goods_amount, $divide_price, $first_commission, $spuid, $user_id, 1, $isExistAccount);
$commissionPreData['first_member_id'] = $spObj->member_id;
$commissionPreData['first_amount'] += $divide_price;
}
} }
//间推佣金 //间推佣金
if ($second_spuid && $second_commission >= 1 && $second_commission < 100) { if ($second_spuid && $second_commission >= 1 && $second_commission < 100) {
$divide_price = number_format($goods_amount * ($second_commission / 100), 2); $divide_price = number_format($goods_amount * ($second_commission / 100), 2);
//收益直接到直推账户
$spObj = User::find($second_spuid); $spObj = User::find($second_spuid);
//汇付参数
if ($spObj->member_id) {
$spObj->total_revenue += $divide_price; $spObj->total_revenue += $divide_price;
$spObj->balance += $divide_price;
$spObj->save(); $spObj->save();
self::addRecord($item->id, $order_id, $goods_amount, $divide_price, $second_commission, $second_spuid, $user_id, 2);
$commissionPreData['second_member_id'] = $spObj->member_id;
$commissionPreData['second_amount'] += $divide_price;
}
} }
//商户分佣记录 //商户分佣记录
if ($merchant_id && $merchant_commission >= 1 && $merchant_commission < 100) { if ($merchant_id && $merchant_commission >= 1 && $merchant_commission < 100) {
$divide_price = number_format($goods_amount * ($merchant_commission / 100), 2); $divide_price = number_format($goods_amount * ($merchant_commission / 100), 2);
//收益直接到商户账户 //收益直接到商户账户
$merObj = Merchant::find($merchant_id); $merObj = Merchant::find($merchant_id);
//汇付参数
$member_id = $hfCompanyMObj->member_id;
if ($member_id) {
$merObj->total_revenue += $divide_price; $merObj->total_revenue += $divide_price;
$merObj->balance += $divide_price;
$merObj->save(); $merObj->save();
//记录 $commissionPreData['merchant_member_id'] = $member_id;
self::addRecord($item->id, $order_id, $goods_amount, $divide_price, $merchant_commission, $merchant_id, $user_id, 3); $commissionPreData['merchant_amount'] += $divide_price;
}
}
}
//组合分账参数
if ($spuid && $first_commission >= 1 && $first_commission < 100 && $commissionPreData['first_amount'] > 0) {
self::addRecord($sp_ogid, $order_id, $orderObj->goods_amount, $commissionPreData['first_amount'], $first_proportion, $spuid, $buyer_id, 1, $isFirstRealName, $payconfirm_no);
if ($isFirstRealName) {
array_push($div_members, ['member_id' => $commissionPreData['first_member_id'], 'amount' => sprintf("%.2f", $commissionPreData['first_amount']), 'fee_flag' => 'N']);
}
} }
if ($second_spuid && $second_commission >= 1 && $second_commission < 100 && $commissionPreData['second_amount'] > 0) {
self::addRecord($sp_ogid, $order_id, $orderObj->goods_amount, $commissionPreData['second_amount'], $second_proportion, $second_spuid, $buyer_id, 2, $isSecondRealName, $payconfirm_no);
if ($isSecondRealName) {
array_push($div_members, ['member_id' => $commissionPreData['second_member_id'], 'amount' => sprintf("%.2f", $commissionPreData['second_amount']), 'fee_flag' => 'N']);
} }
return true; }
if ($merchant_id && $merchant_commission >= 1 && $merchant_commission < 100 && $commissionPreData['merchant_amount'] > 0) {
self::addRecord($sp_ogid, $order_id, $orderObj->goods_amount, $commissionPreData['merchant_amount'], $merchant_proportion, $merchant_id, $buyer_id, 3, $isMerchantRealName, $payconfirm_no);
if ($isMerchantRealName) {
array_push($div_members, ['member_id' => $commissionPreData['merchant_member_id'], 'amount' => sprintf("%.2f", $commissionPreData['merchant_amount']), 'fee_flag' => 'N']);
}
}
//商户本身
$aimeiyuePrice = $total_amount - $commissionPreData['first_amount'] - $commissionPreData['second_amount'] - $commissionPreData['merchant_amount'];
self::addRecord($sp_ogid, $order_id, $orderObj->goods_amount, $aimeiyuePrice, '', 0, $buyer_id, 0, 1, $payconfirm_no);
array_push($div_members, ['member_id' => 0, 'amount' => sprintf("%.2f", $aimeiyuePrice), 'fee_flag' => 'Y']);
//确认分佣金额
if (!$isFirstRealName) {
$commissionPreData['first_amount'] = 0;
}
if (!$isSecondRealName) {
$commissionPreData['second_amount'] = 0;
}
if (!$isMerchantRealName) {
$commissionPreData['merchant_amount'] = 0;
}
$confirm_amt = $aimeiyuePrice + $commissionPreData['first_amount'] + $commissionPreData['second_amount'] + $commissionPreData['merchant_amount'];
return ['div_members' => $div_members, 'confirm_amt' => sprintf("%.2f", $confirm_amt)];
} }
public static function addRecord($og_id, $order_id, $goods_amount, $divide_price, $commission, $um_id, $user_id, $sh_type) public static function addRecord($og_id, $order_id, $goods_amount, $divide_price, $commission = '', $um_id = 0, $buyer_id, $sh_type = 0, $isExistAccount, $payconfirm_no)
{ {
$recordObj = new self(); $recordObj = new self();
$recordObj->order_id = $order_id; $recordObj->order_id = $order_id;
$recordObj->user_id = $user_id; //下单userId $recordObj->user_id = $buyer_id;
$recordObj->og_id = $og_id; $recordObj->og_id = trim($og_id, ',');
$recordObj->order_price = $goods_amount; $recordObj->order_price = $goods_amount;
$recordObj->divide_price = $divide_price; $recordObj->divide_price = $divide_price;
$recordObj->proportion = $commission; $recordObj->proportion = trim($commission, ',');
$recordObj->um_id = $um_id; $recordObj->um_id = $um_id;
$recordObj->sh_type = $sh_type; $recordObj->sh_type = $sh_type;
$recordObj->is_div = $isExistAccount ? 1 : 0; //是否分账
$recordObj->payconfirm_no = $isExistAccount ? $payconfirm_no : '';
$recordObj->save(); $recordObj->save();
Log::add('订单分佣记录', $recordObj->toArray()); Log::add('订单分佣记录', $recordObj->toArray());
} }
public function order()
{
return $this->belongsTo(OrderInfo::class, 'order_id', 'id');
}
public function users()
{
return $this->belongsTo(User::class, 'user_id', 'id');
}
} }
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
class RefundRecord extends Model
{
use HasDateTimeFormatter;
protected $table = 'refund_record';
public function user()
{
return $this->belongsTo(User::class, 'uid');
}
}
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
namespace App\Store\Controllers; namespace App\Store\Controllers;
use App\Command\Log;
use App\Command\Tools; // 引入 Tools 类
use App\Models\Merchant; use App\Models\Merchant;
use App\Models\OrderDivideRecord; use App\Models\OrderDivideRecord;
use Dcat\Admin\Admin; use Dcat\Admin\Admin;
...@@ -15,11 +17,6 @@ ...@@ -15,11 +17,6 @@
class OrderDivideRecordController extends AdminController class OrderDivideRecordController extends AdminController
{ {
// public function index(Content $content)
// {
// return $content->header('自定义表单')->body($this->grid());
// }
/** /**
* Make a grid builder. * Make a grid builder.
* *
...@@ -33,8 +30,20 @@ protected function grid() ...@@ -33,8 +30,20 @@ protected function grid()
if ($merchant_id) { if ($merchant_id) {
$merObj = Merchant::where('id', $merchant_id)->first(); $merObj = Merchant::where('id', $merchant_id)->first();
$total_revenue = $merObj->total_revenue ?? 0; $total_revenue = $merObj->total_revenue ?? 0;
$balance = $merObj->balance ?? 0; $balanceValue = $merObj->balance ?? 0;
$cashout = $total_revenue - $balance;
// 使用 Tools 类计算 T+1 未到账金额
$pendingCashout = Tools::calculatePendingCashout($merchant_id);
// 调整金额计算公式
$displayBalance = $balanceValue + $pendingCashout;
$displayCashout = $total_revenue - $displayBalance;
$balance = number_format($displayBalance, 2, '.', '');
$cashout = number_format($displayCashout, 2, '.', '');
Log::add('balance金额', $balance);
Log::add('cashout金额', $cashout);
} }
$grid->header(function () use ($total_revenue, $balance, $cashout) { $grid->header(function () use ($total_revenue, $balance, $cashout) {
$box = new Box('统计信息', '这里可以放置统计数据'); $box = new Box('统计信息', '这里可以放置统计数据');
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"league/flysystem": "^3.29", "league/flysystem": "^3.29",
"lty5240/dcat-easy-sku": "^1.1", "lty5240/dcat-easy-sku": "^1.1",
"maatwebsite/excel": "~3.1.0", "maatwebsite/excel": "~3.1.0",
"nwvvvs/adapay": "^1.4",
"overtrue/wechat": "~5.0", "overtrue/wechat": "~5.0",
"phpoffice/phpspreadsheet": "^1.29", "phpoffice/phpspreadsheet": "^1.29",
"predis/predis": "^2.1", "predis/predis": "^2.1",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "1b40207476190f175adf99e702616055", "content-hash": "85cce16723f4d5d65761cb74fb48b74e",
"packages": [ "packages": [
{ {
"name": "abbotton/dcat-sku-plus", "name": "abbotton/dcat-sku-plus",
...@@ -4741,6 +4741,58 @@ ...@@ -4741,6 +4741,58 @@
"time": "2023-02-08T01:06:31+00:00" "time": "2023-02-08T01:06:31+00:00"
}, },
{ {
"name": "nwvvvs/adapay",
"version": "1.4.4",
"source": {
"type": "git",
"url": "https://github.com/NmVVVS/adapay.git",
"reference": "e6aee8fb1c2b4efdc2113834d02e740d614eaf12"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/NmVVVS/adapay/zipball/e6aee8fb1c2b4efdc2113834d02e740d614eaf12",
"reference": "e6aee8fb1c2b4efdc2113834d02e740d614eaf12",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-curl": "*",
"ext-mbstring": "*",
"php": ">=8.0.0"
},
"type": "libaray",
"autoload": {
"psr-4": {
"NwVVVS\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "NwVVVS",
"email": "xevckq@proton.me"
}
],
"description": "基于AdaPay官方PHP v1.4.4的composer包",
"keywords": [
"adapay",
"pay"
],
"support": {
"issues": "https://github.com/NmVVVS/adapay/issues",
"source": "https://github.com/NmVVVS/adapay/tree/1.4.4"
},
"time": "2024-06-17T11:26:49+00:00"
},
{
"name": "overtrue/socialite", "name": "overtrue/socialite",
"version": "4.11.0", "version": "4.11.0",
"source": { "source": {
......
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
*/ */
'helpers' => [ 'helpers' => [
'enable' => true, 'enable' => false,
], ],
/* /*
......
{
"*************DO NOT CHANGE CONTENT*************":"",
"api_key_live":"api_live_2d28000f-7207-4e48-a4a7-bb7f3605e6a2",
"api_key_test":"api_test_ecfac4aa-d54c-4551-88fc-8655bbf6cfe2",
"rsa_public_key":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwN6xgd6Ad8v2hIIsQVnbt8a3JituR8o4Tc3B5WlcFR55bz4OMqrG/356Ur3cPbc2Fe8ArNd/0gZbC9q56Eb16JTkVNA/fye4SXznWxdyBPR7+guuJZHc/VW2fKH2lfZ2P3Tt0QkKZZoawYOGSMdIvO+WqK44updyax0ikK6JlNQIDAQAB",
"*************DO NOT CHANGE CONTENT*************":"",
"rsa_private_key":"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALESBPCpBbsMAgcLaonh7Tj3br/5MkH7Re7r5CsZueuu4V98NZYY9aBu98kOWNcBbiiVoqb39JPnaKd+WElQNOWSqyN3VqAzOqXSw76kCfDgIGUkBIzmbC6A0v/85qdxXRIThnIc0adCjDxVmp8HNiK3Bwxm1mbES+x93D2b7XkbAgMBAAECgYEApyhHmZk2W7meQGA6lye89kY/OuNY2okHH+F4aGfE6AUTpTxwqd2uI2IecKMmovIquA1qmw0Ayo9ucJAJcExTYcAprcAMMbDTtj/damatyYzxg+Sm2LlJz7h9RLvMk+juhhEeiDXoo/be3mx2i14jW1PCAt61Ylo/40lZwya8jKECQQD0OJbCMtQhDJjdlsW4P4FEVhkh9uHpVgm0Xnw9PktW5Vi+iiYdOIAqsTgS4F+053LcIaN0jwAYzsMG1mL1bP0fAkEAuZxRP3fWekQAZaCGTW0vQxhmO6QMRulieeBTP61Tjn/OHzlmJdQRXP7UFRdmLmmo24UBADbP6+oDkt/d2/sIhQJASStHJ8m4umoexozskgYcwY+WGhHwn0sSv0JrsKGgStmN3BBh2PFbnO7ZoPYuVnHdfMxrP3m0irovvjWvEl7j+wJALomzFWbGsAE82D5XbjJiF0CW4X1QVrdNqaFFPkIHIUOKOun5YqK5d8etBVzIkfqMC/5dMeCMYWpbWwgmaHGYwQJBAJDjug5UxO2mBKZ0++TWYPRY74jnN9sEDeFvS/xgTgvmzWcg1q0huuZq+kbYJaKWUZQEhw+EBnd8PCvzmLdR4pY="
}
\ No newline at end of file
<?php
return [
'labels' => [
'HfCompanyMember' => '企业用户',
'hf-company-member' => '企业用户',
],
'fields' => [
'order_no' => '请求订单号',
'cont_name' => '联系人姓名',
'cont_phone' => '联系人手机号',
'email' => 'Email',
'entry_mer_type' => '商户类型',
'social_credit_code' => '统一社会信用代码',
'name' => '企业名称',
'social_credit_code_begin' => '营业执照有效期起始日期',
'social_credit_code_expires' => '营业执照有效期截止日期',
'address' => '注册地址',
'business_scope' => '经营范围',
'legal_cert_type' => '法人证件类型',
'legal_cert_id' => '法人证件号码',
'legal_person' => '法人姓名',
'legal_cert_id_begin' => '法人证件有效期起始日期',
'legal_cert_id_expires' => '法人证件有效期截止日期',
'legal_mp' => '法人手机号',
'attach_file' => '附件',
],
'options' => [],
];
<?php <?php
return [ return [
'labels' => [ 'labels' => [
'OrderDivideRecord' => '余额明细', 'OrderDivideRecord' => '分佣记录',
'OrderDivideRecord' => '余额明细', 'OrderDivideRecord' => '分佣记录',
], ],
'fields' => [ 'fields' => [
'user_id' => '用户ID', 'user_id' => '用户ID',
......
...@@ -21,12 +21,26 @@ ...@@ -21,12 +21,26 @@
Route::namespace('App\Http\Controllers\Api')->middleware('acceptJson')->group(function () { Route::namespace('App\Http\Controllers\Api')->middleware('acceptJson')->group(function () {
Route::post('simulate-login','LoginController@simulateLogin'); //模拟登陆
Route::post('get-openid', 'LoginController@getOpenid'); //获取openid Route::post('get-openid', 'LoginController@getOpenid'); //获取openid
Route::post('login', 'LoginController@login')->name('login'); //用户端授权登录 Route::post('login', 'LoginController@login')->name('login'); //用户端授权登录
Route::get('test-login', 'LoginController@testLogin'); //测试登录 Route::get('test-login', 'LoginController@testLogin'); //测试登录
Route::get('city-code', 'BaseController@addCityCode'); //导入城市编码(汇付)
Route::post('hf-company-member-notify', 'HfCompanyMemberController@notify'); //汇付 创建企业用户异步通知
Route::get('hf-bank-code', 'HfSettleAccountController@getBankCode'); //汇付 银行代码
Route::get('hf-provarea-code', 'HfProvAreaCodeController@getList'); //汇付 省市编码
Route::get('hf-query-list', 'HfOrderController@autoQueryList'); //汇付 定时查询支付对象列表
Route::post('hf-payment-confirm', 'HfOrderController@paymentConfirm'); //汇付 手动创建支付确认
//Route::post('mobile-login', 'LoginController@mobilelogin'); //验证码登录 //Route::post('mobile-login', 'LoginController@mobilelogin'); //验证码登录
Route::post('account-login', 'StoreAdminUsersController@login'); //账号密码登录 Route::post('account-login', 'StoreAdminUsersController@login'); //账号密码登录
...@@ -43,7 +57,7 @@ ...@@ -43,7 +57,7 @@
Route::get('get-cate-list', 'CategoryController@getList'); //一级分类列表 Route::get('get-cate-list', 'CategoryController@getList'); //一级分类列表
Route::post('article-list', 'ArticleController@getList'); //文章列表 Route::get('article-list', 'ArticleController@getList'); //文章列表
Route::get('article-detail', 'ArticleController@getDetail'); //文章详情 Route::get('article-detail', 'ArticleController@getDetail'); //文章详情
// Route::get('get-seccate-list', 'CategoryController@getSecList'); //二级分类列表 // Route::get('get-seccate-list', 'CategoryController@getSecList'); //二级分类列表
...@@ -72,6 +86,8 @@ ...@@ -72,6 +86,8 @@
Route::any('pay-notify', 'OrderController@payNotify'); //付款回调 Route::any('pay-notify', 'OrderController@payNotify'); //付款回调
Route::any('refund-notify', 'HfOrderController@refundNotify'); //退款回调
Route::get('send/config/update', 'SystemController@update'); Route::get('send/config/update', 'SystemController@update');
Route::get('auto-to-commentstatus', 'SystemController@autoChangeReceiveStatus'); //定时任务--待领取状态下七天未领取,自动到待评价状态 Route::get('auto-to-commentstatus', 'SystemController@autoChangeReceiveStatus'); //定时任务--待领取状态下七天未领取,自动到待评价状态
...@@ -160,6 +176,8 @@ ...@@ -160,6 +176,8 @@
Route::post('add-comment', 'CommentController@add'); //去评价 Route::post('add-comment', 'CommentController@add'); //去评价
/*------------------------------商户端------------------------------------*/
Route::get('commission-list', 'OrderDivideRecordController@getList'); //直推、间推明细 Route::get('commission-list', 'OrderDivideRecordController@getList'); //直推、间推明细
Route::get('income-list', 'IncomeController@getList'); //用户提现明细 Route::get('income-list', 'IncomeController@getList'); //用户提现明细
...@@ -168,10 +186,27 @@ ...@@ -168,10 +186,27 @@
Route::get('my-member', 'MerchantController@getUserList'); //商户端-我的用户 Route::get('my-member', 'MerchantController@getUserList'); //商户端-我的用户
Route::post('my-member-orderlist', 'MerchantController@getOrderList'); //商户端-我的用户(查看订单)
Route::post('scan-code-detail', 'OrderController@scanCodeDetail'); //扫码核销展示详情 Route::post('scan-code-detail', 'OrderController@scanCodeDetail'); //扫码核销展示详情
Route::post('scan-code-verifi', 'OrderController@scanCodeVerifi'); //扫码核销确认 Route::post('scan-code-verifi', 'OrderController@scanCodeVerifi'); //扫码核销确认
Route::get('merchant-order-collect', 'OrderController@orderCollect'); //商户端首页统计 Route::get('merchant-order-collect', 'OrderController@orderCollect'); //商户端首页统计
/*------------------------------汇付天下------------------------------------*/
Route::post('hf-settle-account-delete', 'HfSettleAccountController@deleteAccount'); //汇付 删除结算账户
Route::post('hf-settle-account-member', 'HfSettleAccountController@createMemberAccount'); //汇付 创建普通用户结算账户
Route::post('hf-settle-account-company', 'HfSettleAccountController@createCompanyAccount'); //汇付 创建企业用户结算账户
Route::get('hf-mycard', 'HfSettleAccountController@myCard'); //查询已绑定结算账户
Route::post('hf-settle-account-query', 'HfSettleAccountController@queryAccount'); //汇付 查询用户结算账户
Route::get('hf-account-balance', 'HfSettleAccountController@queryBalance'); //汇付 查询账户余额
}); });
}); });
*
!public/
!.gitignore
compiled.php
config.php
down
events.scanned.php
maintenance.php
routes.php
routes.scanned.php
schedule-*
services.json
a:5:{s:6:"_token";s:40:"HlN5DetQedvaf6nRkif0iUWRmUn4j4pTeIzIYhaL";s:9:"_previous";a:1:{s:3:"url";s:83:"http://aimeiyue.demo.cn/category-download?date=2025-03-22&s=%2F%2Fcategory-download";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}s:52:"login_admin_59ba36addc2b2f9401580f014c7f58ea4e30989d";i:1;s:5:"admin";a:1:{s:4:"prev";a:0:{}}}
\ No newline at end of file
<style>::-ms-clear,::-ms-reveal{display: none;}</style>
<form pjax-container action="<?php echo $action; ?>" class="input-no-border quick-search-form d-md-inline-block" style="display:none;margin-right: 16px">
<div class="table-filter">
<label style="width: <?php echo e($width, false); ?>rem">
<input
type="search"
class="form-control form-control-sm quick-search-input"
placeholder="<?php echo e($placeholder, false); ?>"
name="<?php echo e($key, false); ?>"
value="<?php echo e($value, false); ?>"
auto="<?php echo e($auto ? '1' : '0', false); ?>"
>
</label>
</div>
</form>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/quick-search.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="input-group input-group-sm quick-form-field">
<select class="form-control <?php echo e($class, false); ?>" style="width: 100%;" name="<?php echo e($name, false); ?>" <?php echo $attributes; ?> >
<option value=""></option>
<?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $select => $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($select, false); ?>" <?php echo e(Dcat\Admin\Support\Helper::equal($select, old($column, $value)) ?'selected':'', false); ?>><?php echo e($option, false); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<?php echo $__env->make('admin::form.select-script', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/quick-create/select.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if(isset($errors) && $errors->hasBag('exception')): ?>
<?php $error = $errors->getBag('exception'); ?>
<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4>
<i class="icon fa fa-warning"></i>
<i style="border-bottom: 1px dotted #fff;cursor: pointer;" title="<?php echo e($error->get('type')[0], false); ?>" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;"><?php echo e(class_basename($error->get('type')[0]), false); ?></i>
In <i title="<?php echo e($error->get('file')[0], false); ?> line <?php echo e($error->get('line')[0], false); ?>" style="border-bottom: 1px dotted #fff;cursor: pointer;" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;"><?php echo e(basename($error->get('file')[0]), false); ?> line <?php echo e($error->get('line')[0], false); ?></i> :
</h4>
<p><a style="cursor: pointer;" onclick="$('#dcat-admin-exception-trace').toggleClass('hidden');$('i', this).toggleClass('fa-angle-double-down fa-angle-double-up');"><i class="fa fa-angle-double-down"></i>&nbsp;&nbsp;<?php echo $error->first('message'); ?></a></p>
<p class="hidden" id="dcat-admin-exception-trace"><br><?php echo nl2br($error->first('trace')); ?></p>
</div>
<?php endif; ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/exception.blade.php ENDPATH**/ ?>
\ No newline at end of file
<span class="dropdown column-selector" >
<button class="btn btn-primary btn-outline dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-table"></i>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" style="min-width: 155px">
<li class="dropdown-item">
<ul class="selectors">
<?php echo $selectAll; ?>
</ul>
</li>
<li class="dropdown-divider"></li>
<li class="dropdown-item">
<ul class="selectors">
<?php echo $checkbox; ?>
</ul>
</li>
</ul>
</span>
<script once>
$('.column-selector input[name="_all_"]').on('change', function () {
$(this).parents('.column-selector').find('.column-select-item').prop('checked', this.checked).change()
});
var submit = Dcat.helpers.debounce(function ($this) {
var defaults = <?php echo json_encode($defaults); ?>;
var selected = [];
var $parent = $this.parents('.column-selector');
var column = '<?php echo e($columnName, false); ?>'
$parent.find('.column-select-item:checked').each(function () {
selected.push($(this).val());
});
if (selected.length == 0) {
return;
}
var url = new URL(location);
if (selected.sort().toString() == defaults.sort().toString()) {
url.searchParams.set(column, '');
} else {
url.searchParams.set(column, selected.join());
}
Dcat.reload(url.toString());
}, 200);
$('.column-selector .column-select-item').on('change', function () {
submit($(this));
});
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/column-selector.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="d-flex">
<?php if($row->logo): ?>
<img data-action='preview-img' src='<?php echo $row->logo; ?>' style='max-width:40px;max-height:40px;cursor:pointer' class='img img-thumbnail' />&nbsp;&nbsp;
<?php endif; ?>
<span class="ext-name">
<?php if($row->homepage): ?>
<a href='<?php echo $row->homepage; ?>' target='_blank' class="feather <?php echo e($linkIcon, false); ?>"></a>
<?php endif; ?>
<?php if($row->alias): ?>
<?php echo e($row->alias, false); ?> <br><small class="text-80"><?php echo e($value, false); ?></small>
<?php else: ?>
<?php echo e($value, false); ?>
<?php endif; ?>
</span>
<?php if($row->new_version || ! $row->version): ?>
&nbsp;
<span class="badge bg-primary">New</span>
<?php endif; ?>
</div>
<div style="height: 10px"></div>
<?php if($row->type === Dcat\Admin\Extend\ServiceProvider::TYPE_THEME): ?>
<span><?php echo e(trans('admin.theme'), false); ?></span>
<?php endif; ?>
<?php if($row->version): ?>
<?php if($row->type === Dcat\Admin\Extend\ServiceProvider::TYPE_THEME): ?>
&nbsp;|&nbsp;
<?php endif; ?>
<?php if($row->enabled): ?>
<?php echo $disableAction; ?>
<?php else: ?>
<?php echo $enableAction; ?>
<?php endif; ?>
<span class="hover-display" onclick="$(this).css({display: 'inline'})">
| <?php echo $uninstallAction; ?>
</span>
<?php endif; ?>
<style>
.badge {
max-height: 22px
}
.hover-display {
display:none;
}
table tbody tr:hover .hover-display {
display: inline;
}
.ext-name {
font-size: 1.15rem;
}
</style>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/displayer/extensions/name.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($inline): ?>
<div class="d-flex flex-wrap">
<?php endif; ?>
<?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="vs-checkbox-con vs-checkbox-<?php echo e($style, false); ?>" style="margin-right: <?php echo e($right, false); ?>">
<input <?php echo in_array($k, $disabled) ? 'disabled' : ''; ?> value="<?php echo e($k, false); ?>" <?php echo $attributes; ?> <?php echo (in_array($k, $checked)) ? 'checked' : ''; ?>>
<span class="vs-checkbox vs-checkbox-<?php echo e($size, false); ?>">
<span class="vs-checkbox--check">
<i class="vs-icon feather icon-check"></i>
</span>
</span>
<?php if($label !== null && $label !== ''): ?>
<span><?php echo $label; ?></span>
<?php endif; ?>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php if($inline): ?>
</div>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/widgets/checkbox.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($showHeader): ?>
<div class="box-header with-border mb-1" style="padding: .65rem 1rem">
<h3 class="box-title" style="line-height:30px"><?php echo $form->title(); ?></h3>
<div class="pull-right"><?php echo $form->renderTools(); ?></div>
</div>
<?php endif; ?>
<div class="box-body" <?php echo $tabObj->isEmpty() && !$form->hasRows() ? 'style="margin-top: 6px"' : ''; ?> >
<?php if(!$tabObj->isEmpty()): ?>
<?php echo $__env->make('admin::form.tab', compact('tabObj', 'form'), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php else: ?>
<div class="fields-group">
<?php echo $__env->make('admin::form.fields', ['rows' => $form->rows(), 'fields' => $form->fields(), 'layout' => $form->layout()], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<?php endif; ?>
</div>
<?php echo $form->renderFooter(); ?>
<?php echo $form->renderHiddenFields(); ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/container.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div <?php echo $attributes; ?>>
<div class="card-header d-flex justify-content-between align-items-start pb-0">
<div>
<?php if($icon): ?>
<div class="avatar bg-rgba-<?php echo e($style, false); ?> p-50 m-0">
<div class="avatar-content">
<i class="<?php echo e($icon, false); ?> text-<?php echo e($style, false); ?> font-medium-5"></i>
</div>
</div>
<?php endif; ?>
<?php if($title): ?>
<h4 class="card-title mb-1"><?php echo $title; ?></h4>
<?php endif; ?>
<div class="metric-header"><?php echo $header; ?></div>
</div>
<?php if(! empty($subTitle)): ?>
<span class="btn btn-sm bg-light shadow-0 p-0">
<?php echo e($subTitle, false); ?>
</span>
<?php endif; ?>
<?php if(! empty($dropdown)): ?>
<div class="dropdown chart-dropdown">
<button class="btn btn-sm btn-light shadow-0 dropdown-toggle p-0 waves-effect" data-toggle="dropdown">
<?php echo e(current($dropdown), false); ?>
</button>
<div class="dropdown-menu dropdown-menu-right">
<?php $__currentLoopData = $dropdown; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="dropdown-item"><a href="javascript:void(0)" class="select-option" data-option="<?php echo e($key, false); ?>"><?php echo e($value, false); ?></a></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
<?php if(! empty($datepicker)): ?>
<div class="col-md-9 datepicker">
<div class="row">
<div class="col-lg-5 pl-0">
<div class="input-group">
<span class="input-group-prepend">
<span class="input-group-text bg-white"><i class="feather icon-calendar"></i></span>
</span>
<input autocomplete="off" type="text" name="started" value="<?php echo e($datepicker['start'], false); ?>" class="form-control field_started" required="1" id="asdsss">
</div>
</div>
<div class="col-lg-5 pl-0">
<div class="input-group">
<span class="input-group-prepend">
<span class="input-group-text bg-white"><i class="feather icon-calendar"></i></span>
</span>
<input autocomplete="off" type="text" name="ended" value="<?php echo e($datepicker['end'], false); ?>" class="form-control field_ended" required="1" id="_35455a066a22a942">
</div>
</div>
<div class="col-lg-2 pl-0 pr-0">
<button class="btn btn-primary btn-outline-info" data-started="<?php echo e($datepicker['start'], false); ?>" data-ended="<?php echo e($datepicker['end'], false); ?>">
<span class="d-none d-sm-inline">查询</span>
</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
<div class="metric-content"><?php echo $content; ?></div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\resources\views/widgets/metrics/card.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="input-group input-group-sm quick-form-field">
<input <?php echo $attributes; ?> placeholder="<?php echo e($label, false); ?>"/>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/quick-create/text.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($configData['horizontal_menu'] ? 'header-navbar navbar-expand-sm navbar navbar-horizontal' : 'main-menu', false); ?>">
<div class="main-menu-content">
<aside class="<?php echo e($configData['horizontal_menu'] ? 'main-horizontal-sidebar' : 'main-sidebar shadow', false); ?> <?php echo e($configData['sidebar_style'], false); ?>">
<?php if(! $configData['horizontal_menu']): ?>
<div class="navbar-header">
<ul class="nav navbar-nav flex-row">
<li class="nav-item mr-auto">
<a href="<?php echo e(admin_url('/'), false); ?>" class="navbar-brand waves-effect waves-light">
<span class="logo-mini"><?php echo config('admin.logo-mini'); ?></span>
<span class="logo-lg"><?php echo config('admin.logo'); ?></span>
</a>
</li>
</ul>
</div>
<?php endif; ?>
<div class="p-0 <?php echo e($configData['horizontal_menu'] ? 'pl-1 pr-1' : 'sidebar pb-3', false); ?>">
<ul class="nav nav-pills nav-sidebar <?php echo e($configData['horizontal_menu'] ? '' : 'flex-column', false); ?>"
<?php echo $configData['horizontal_menu'] ? '' : 'data-widget="treeview"'; ?>
style="padding-top: 10px">
<?php echo admin_section(Dcat\Admin\Admin::SECTION['LEFT_SIDEBAR_MENU_TOP']); ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['LEFT_SIDEBAR_MENU']); ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['LEFT_SIDEBAR_MENU_BOTTOM']); ?>
</ul>
</div>
</aside>
</div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/sidebar.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($rows): ?>
<div class="ml-2 mb-2 mr-2" style="margin-top: -0.5rem">
<?php $__currentLoopData = $rows; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $row->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($field instanceof Dcat\Admin\Form\Field\Hidden): ?>
<?php echo $field->render(); ?>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php elseif($layout->hasColumns()): ?>
<?php echo $layout->build(); ?>
<?php else: ?>
<?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $field->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/fields.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($grid->allowToolbar()): ?>
<div class="custom-data-table-header">
<div class="table-responsive">
<div class="top d-block clearfix p-0">
<?php if(!empty($title)): ?>
<h4 class="pull-left" style="margin:5px 10px 0;">
<?php echo $title; ?>&nbsp;
<?php if(!empty($description)): ?>
<small><?php echo $description; ?></small>
<?php endif; ?>
</h4>
<div class="pull-right" data-responsive-table-toolbar="<?php echo e($tableId, false); ?>">
<?php echo $grid->renderTools(); ?>
<?php echo $grid->renderColumnSelector(); ?>
<?php echo $grid->renderCreateButton(); ?>
<?php echo $grid->renderExportButton(); ?>
<?php echo $grid->renderQuickSearch(); ?>
</div>
<?php else: ?>
<?php echo $grid->renderTools(); ?> <?php echo $grid->renderQuickSearch(); ?>
<div class="pull-right" data-responsive-table-toolbar="<?php echo e($tableId, false); ?>">
<?php echo $grid->renderColumnSelector(); ?>
<?php echo $grid->renderCreateButton(); ?>
<?php echo $grid->renderExportButton(); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/table-toolbar.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="filter-input col-sm-<?php echo e($width, false); ?> " style="<?php echo $style; ?>">
<div class="form-group"><?php echo $presenter(); ?></div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/filter/where.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if(! $isHoldSelectAllCheckbox): ?>
<div class="btn-group dropdown <?php echo e($selectAllName, false); ?>-btn" style="display:none;margin-right: 3px;z-index: 100">
<button type="button" class="btn btn-white dropdown-toggle btn-mini" data-toggle="dropdown">
<span class="d-none d-sm-inline selected"></span>
<span class="caret"></span>
<span class="sr-only"></span>
</button>
<ul class="dropdown-menu" role="menu">
<?php $__currentLoopData = $actions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $action): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($action instanceof Dcat\Admin\Grid\Tools\ActionDivider): ?>
<li class="dropdown-divider"></li>
<?php else: ?>
<li class="dropdown-item">
<?php echo $action->render(); ?>
</li>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
</div>
<?php endif; ?>
<script>
Dcat.init('.<?php echo e($parent->getRowName(), false); ?>-checkbox', function ($this) {
$this.on('change', function () {
var btn = $('.<?php echo e($selectAllName, false); ?>-btn'), selected = Dcat.grid.selectedRows('<?php echo e($parent->getName(), false); ?>').length;
if (selected) {
btn.show()
} else {
btn.hide()
}
setTimeout(function () {
btn.find('.selected').html("<?php echo trans('admin.grid_items_selected'); ?>".replace('{n}', selected));
}, 50)
})
})
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/batch-actions.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php echo admin_section(Dcat\Admin\Admin::SECTION['NAVBAR_BEFORE']); ?>
<nav class="header-navbar navbar-expand-lg navbar
navbar-with-menu <?php echo e($configData['navbar_class'], false); ?>
<?php echo e($configData['navbar_color'], false); ?>
navbar-light navbar-shadow " style="top: 0;">
<div class="navbar-wrapper">
<div class="navbar-container content">
<?php if(! $configData['horizontal_menu']): ?>
<div class="mr-auto float-left bookmark-wrapper d-flex align-items-center">
<ul class="nav navbar-nav">
<li class="nav-item mr-auto">
<a class="nav-link menu-toggle" data-widget="pushmenu" style="cursor: pointer;">
<i class="fa fa-bars font-md-2"></i>
</a>
</li>
</ul>
</div>
<?php endif; ?>
<div class="navbar-collapse d-flex justify-content-between">
<div class="navbar-left d-flex align-items-center">
<?php echo Dcat\Admin\Admin::navbar()->render('left'); ?>
</div>
<?php if($configData['horizontal_menu']): ?>
<div class="d-md-block horizontal-navbar-brand justify-content-center text-center">
<ul class="nav navbar-nav flex-row">
<li class="nav-item mr-auto">
<a href="<?php echo e(admin_url('/'), false); ?>" class="waves-effect waves-light">
<span class="logo-lg"><?php echo config('admin.logo'); ?></span>
</a>
</li>
</ul>
</div>
<?php endif; ?>
<div class="navbar-right d-flex align-items-center">
<?php echo Dcat\Admin\Admin::navbar()->render(); ?>
<ul class="nav navbar-nav">
<?php echo admin_section(Dcat\Admin\Admin::SECTION['NAVBAR_USER_PANEL']); ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['NAVBAR_AFTER_USER_PANEL']); ?>
</ul>
</div>
</div>
</div>
</div>
</nav>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['NAVBAR_AFTER']); ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/navbar.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if(Session::has('dcat-admin-toastr')): ?>
<?php
$toastr = Session::get('dcat-admin-toastr');
$type = $toastr->get('type')[0] ?? 'success';
$message = $toastr->get('message')[0] ?? '';
$options = admin_javascript_json($toastr->get('options', []));
?>
<script>$(function () { toastr.<?php echo e($type, false); ?>('<?php echo $message; ?>', null, <?php echo $options; ?>); })</script>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/toastr.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>" style="margin-top: .3rem">
<label class="<?php echo e($viewClass['label'], false); ?> control-label"><?php echo $label; ?></label>
<div class="<?php echo e($viewClass['field'], false); ?>">
<div class="box box-solid box-default no-margin">
<div class="box-body">
<div class="<?php echo e($class, false); ?>"><?php echo $value; ?>&nbsp;</div>
</div>
</div>
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/display.blade.php ENDPATH**/ ?>
\ No newline at end of file
<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale()), false); ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title><?php if(! empty($header)): ?><?php echo e($header, false); ?> | <?php endif; ?> <?php echo e(Dcat\Admin\Admin::title(), false); ?></title>
<?php if(! config('admin.disable_no_referrer_meta')): ?>
<meta name="referrer" content="no-referrer"/>
<?php endif; ?>
<?php if(! empty($favicon = Dcat\Admin\Admin::favicon())): ?>
<link rel="shortcut icon" href="<?php echo e($favicon, false); ?>">
<?php endif; ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['HEAD']); ?>
<?php echo Dcat\Admin\Admin::asset()->headerJsToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->cssToHtml(); ?>
</head>
<?php echo $__env->make('admin::layouts.container', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/layouts/page.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="btn-group filter-button-group dropdown" style="margin-right:3px">
<button
class="btn btn-primary <?php echo e($btn_class, false); ?>"
<?php if($only_scopes): ?>data-toggle="dropdown"<?php endif; ?>
<?php if($scopes->isNotEmpty()): ?> style="border-right: 0" <?php endif; ?>
>
<i class="feather icon-filter"></i><?php if($filter_text): ?><span class="d-none d-sm-inline">&nbsp;&nbsp;<?php echo e(trans('admin.filter'), false); ?></span><?php endif; ?>
<span class="filter-count"><?php if($valueCount): ?> &nbsp;(<?php echo $valueCount; ?>) <?php endif; ?></span>
</button>
<?php if($scopes->isNotEmpty()): ?>
<ul class="dropdown-menu" role="menu">
<?php $__currentLoopData = $scopes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $scope): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $scope->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<li role="separator" class="dropdown-divider"></li>
<li class="dropdown-item"><a href="<?php echo e($url_no_scopes, false); ?>"><?php echo e(trans('admin.cancel'), false); ?></a></li>
</ul>
<button type="button" class="btn btn-primary" data-toggle="dropdown" style="border-left: 0">
<?php if($current_label): ?> <span><?php echo e($current_label, false); ?>&nbsp;</span><?php endif; ?> <i class="feather icon-chevron-down"></i>
</button>
<?php endif; ?>
</div>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/filter/button.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($help): ?>
<span class="help-block">
<i class="fa <?php echo e(\Illuminate\Support\Arr::get($help, 'icon'), false); ?>"></i>&nbsp;<?php echo \Illuminate\Support\Arr::get($help, 'text'); ?>
</span>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/help-block.blade.php ENDPATH**/ ?>
\ No newline at end of file
<style>
.webuploader-pick {
background-color: <?php echo admin_color()->primary(); ?>;
}
.web-uploader .placeholder .flashTip a {
color: <?php echo admin_color()->primary(-10); ?>;
}
.web-uploader .statusBar .upload-progress span.percentage,
.web-uploader .filelist li p.upload-progress span {
background: <?php echo admin_color()->primary(-8); ?>;
}
.web-uploader .dnd-area.webuploader-dnd-over {
border: 3px dashed #999 !important;
}
.web-uploader .dnd-area.webuploader-dnd-over .placeholder {
border: none;
}
</style>
<div class="<?php echo e($viewClass['form-group'], false); ?> <?php echo e($class, false); ?>">
<label for="<?php echo e($column, false); ?>" class="<?php echo e($viewClass['label'], false); ?> control-label"><?php echo $label; ?></label>
<div class="<?php echo e($viewClass['field'], false); ?>">
<?php echo $__env->make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<input name="<?php echo e($name, false); ?>" class="file-input" type="hidden" <?php echo $attributes; ?>/>
<div class="web-uploader <?php echo e($fileType, false); ?>">
<div class="queueList dnd-area">
<div class="placeholder">
<div class="file-picker"></div>
<p><?php echo e(trans('admin.uploader.drag_file'), false); ?></p>
</div>
</div>
<div class="statusBar" style="display:none;">
<div class="upload-progress progress progress-bar-primary pull-left">
<div class="progress-bar progress-bar-striped active" style="line-height:18px">0%</div>
</div>
<div class="info"></div>
<div class="btns">
<div class="add-file-button"></div>
<?php if($showUploadBtn): ?>
&nbsp;
<div class="upload-btn btn btn-primary"><i class="feather icon-upload"></i> &nbsp;<?php echo e(trans('admin.upload'), false); ?></div>
<?php endif; ?>
</div>
</div>
</div>
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<script require="@webuploader" init="<?php echo $selector; ?>">
var uploader,
newPage,
options = <?php echo $options; ?>,
events = options.events;
init();
function init() {
var opts = $.extend({
selector: $this,
addFileButton: $this.find('.add-file-button'),
inputSelector: $this.find('.file-input'),
}, options);
opts.upload = $.extend({
pick: {
id: $this.find('.file-picker'),
name: '_file_',
label: '<i class="feather icon-folder"><\/i>&nbsp; <?php echo trans('admin.uploader.add_new_media'); ?>'
},
dnd: $this.find('.dnd-area'),
paste: $this.find('.web-uploader')
}, opts);
uploader = Dcat.Uploader(opts);
uploader.build();
uploader.preview();
for (var i = 0; i < events.length; i++) {
var evt = events[i];
if (evt.event && evt.script) {
if (evt.once) {
uploader.uploader.once(evt.event, evt.script.bind(uploader))
} else {
uploader.uploader.on(evt.event, evt.script.bind(uploader))
}
}
}
function resize() {
setTimeout(function () {
if (! uploader) return;
uploader.refreshButton();
resize();
if (! newPage) {
newPage = 1;
$(document).one('pjax:complete', function () {
uploader = null;
});
}
}, 250);
}
resize();
}
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/file.blade.php ENDPATH**/ ?>
\ No newline at end of file
<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale()), false); ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title><?php if(! empty($header)): ?><?php echo e($header, false); ?> | <?php endif; ?> <?php echo e(Dcat\Admin\Admin::title(), false); ?></title>
<?php if(! config('admin.disable_no_referrer_meta')): ?>
<meta name="referrer" content="no-referrer"/>
<?php endif; ?>
<?php if(! empty($favicon = Dcat\Admin\Admin::favicon())): ?>
<link rel="shortcut icon" href="<?php echo e($favicon, false); ?>">
<?php endif; ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['HEAD']); ?>
<?php echo Dcat\Admin\Admin::asset()->headerJsToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->cssToHtml(); ?>
</head>
<body class="dcat-admin-body full-page <?php echo e($configData['body_class'], false); ?>">
<script>
var Dcat = CreateDcat(<?php echo Dcat\Admin\Admin::jsVariables(); ?>);
</script>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_BEFORE']); ?>
<div class="app-content content">
<div class="wrapper" id="<?php echo e($pjaxContainerId, false); ?>">
<?php echo $__env->yieldContent('app'); ?>
</div>
</div>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_AFTER']); ?>
<?php echo Dcat\Admin\Admin::asset()->jsToHtml(); ?>
<script>Dcat.boot();</script>
</body>
</html><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/layouts/full-page.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($grid->allowPagination()): ?>
<div class="box-footer d-block clearfix ">
<?php echo $grid->paginator()->render(); ?>
</div>
<?php endif; ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/table-pagination.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>">
<div class="<?php echo e($viewClass['label'], false); ?> control-label">
<span><?php echo $label; ?></span>
</div>
<div class="<?php echo e($viewClass['field'], false); ?>">
<?php echo $__env->make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<select class="form-control <?php echo e($class, false); ?>" style="width: 100%!important;" name="<?php echo e($name, false); ?>[]" multiple="multiple" data-placeholder="<?php echo e($placeholder, false); ?>" <?php echo $attributes; ?> >
<?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $select => $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($select, false); ?>" <?php echo e(in_array($select, (array) $value) ?'selected':'', false); ?>><?php echo e($option, false); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<input type="hidden" name="<?php echo e($name, false); ?>[]" />
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<?php echo $__env->make('admin::form.select-script', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/multipleselect.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>">
<label class="<?php echo e($viewClass['label'], false); ?> control-label"><?php echo $label; ?></label>
<div class="<?php echo e($viewClass['field'], false); ?>">
<?php echo $__env->make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<input name="<?php echo e($name, false); ?>" type="hidden" value="0" />
<input type="checkbox" name="<?php echo e($name, false); ?>" class="<?php echo e($class, false); ?>" <?php echo e($value == 1 ? 'checked' : '', false); ?> <?php echo $attributes; ?> />
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<script require="@switchery" init="<?php echo $selector; ?>">
$this.parent().find('.switchery').remove();
$this.each(function() {
new Switchery($(this)[0], $(this).data())
})
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/switchfield.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php echo $start; ?>
<div class="box-body fields-group pl-0 pr-0 pt-1" style="padding: 0 0 .5rem">
<?php if(! $tabObj->isEmpty()): ?>
<?php echo $__env->make('admin::form.tab', compact('tabObj'), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($field instanceof \Dcat\Admin\Form\Field\Hidden): ?>
<?php echo $field->render(); ?>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<?php echo $__env->make('admin::form.fields', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endif; ?>
</div>
<?php echo $footer; ?>
<?php echo $end; ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/widgets/form.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>">
<div class="<?php echo e($viewClass['label'], false); ?> control-label">
<span><?php echo $label; ?></span>
</div>
<div class="<?php echo e($viewClass['field'], false); ?>">
<?php echo $__env->make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="input-group">
<?php if($prepend): ?>
<span class="input-group-prepend"><span class="input-group-text bg-white"><?php echo $prepend; ?></span></span>
<?php endif; ?>
<input <?php echo $attributes; ?> />
<?php if($append): ?>
<span class="input-group-append"><?php echo $append; ?></span>
<?php endif; ?>
</div>
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/input.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php $__env->startSection('content'); ?>
<section class="content">
<?php echo $__env->make('admin::partials.alerts', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin::partials.exception', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $content; ?>
<?php echo $__env->make('admin::partials.toastr', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('app'); ?>
<?php echo Dcat\Admin\Admin::asset()->styleToHtml(); ?>
<div class="content-body" id="app">
<?php echo admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_BEFORE']); ?>
<?php echo $__env->yieldContent('content'); ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_AFTER']); ?>
</div>
<?php echo Dcat\Admin\Admin::asset()->scriptToHtml(); ?>
<div class="extra-html"><?php echo Dcat\Admin\Admin::html(); ?></div>
<?php $__env->stopSection(); ?>
<?php if(!request()->pjax()): ?>
<?php echo $__env->make('admin::layouts.full-page', ['header' => $header], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php else: ?>
<title><?php echo e(Dcat\Admin\Admin::title(), false); ?> <?php if($header): ?> | <?php echo e($header, false); ?><?php endif; ?></title>
<script>Dcat.wait();</script>
<?php echo Dcat\Admin\Admin::asset()->cssToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->jsToHtml(); ?>
<?php echo $__env->yieldContent('app'); ?>
<?php endif; ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/layouts/full-content.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div <?php echo $attributes; ?>>
<div class="card-header d-flex justify-content-between align-items-start pb-0">
<div>
<?php if($icon): ?>
<div class="avatar bg-rgba-<?php echo e($style, false); ?> p-50 m-0">
<div class="avatar-content">
<i class="<?php echo e($icon, false); ?> text-<?php echo e($style, false); ?> font-medium-5"></i>
</div>
</div>
<?php endif; ?>
<?php if($title): ?>
<h4 class="card-title mb-1"><?php echo $title; ?></h4>
<?php endif; ?>
<div class="metric-header"><?php echo $header; ?></div>
</div>
<?php if(! empty($subTitle)): ?>
<span class="btn btn-sm bg-light shadow-0 p-0">
<?php echo e($subTitle, false); ?>
</span>
<?php endif; ?>
<?php if(! empty($dropdown)): ?>
<div class="dropdown chart-dropdown">
<button class="btn btn-sm btn-light shadow-0 dropdown-toggle p-0 waves-effect" data-toggle="dropdown">
<?php echo e(current($dropdown), false); ?>
</button>
<div class="dropdown-menu dropdown-menu-right">
<?php $__currentLoopData = $dropdown; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="dropdown-item"><a href="javascript:void(0)" class="select-option" data-option="<?php echo e($key, false); ?>"><?php echo e($value, false); ?></a></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="metric-content"><?php echo $content; ?></div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/widgets/metrics/card.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if(!empty($default) || !empty($custom)): ?>
<div class="grid-dropdown-actions dropdown">
<a href="#" style="padding:0 10px;" data-toggle="dropdown">
<i class="feather icon-more-vertical"></i>
</a>
<ul class="dropdown-menu" style="left: -65px;">
<?php $__currentLoopData = $default; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $action): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="dropdown-item"><?php echo Dcat\Admin\Support\Helper::render($action); ?></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php if(!empty($custom)): ?>
<?php if(!empty($default)): ?>
<li class="dropdown-divider"></li>
<?php endif; ?>
<?php $__currentLoopData = $custom; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $action): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="dropdown-item"><?php echo $action; ?></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</ul>
</div>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/dropdown-actions.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="input-group input-group-sm">
<?php if($group): ?>
<div class="input-group-prepend dropdown">
<a class="filter-group input-group-text bg-white dropdown-toggle" data-toggle="dropdown">
<span class="<?php echo e($group_name, false); ?>-label"><?php echo e($default['label'], false); ?>&nbsp; </span>
</a>
<input type="hidden" name="<?php echo e($id, false); ?>_group" class="<?php echo e($group_name, false); ?>-operation" value="<?php echo e(request($id.'_group', 0), false); ?>"/>
<ul class="dropdown-menu <?php echo e($group_name, false); ?>">
<?php $__currentLoopData = $group; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="dropdown-item"><a data-index="<?php echo e($index, false); ?>"> <?php echo e($item['label'], false); ?> </a></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
</div>
<?php endif; ?>
<div class="input-group-prepend">
<span class="input-group-text bg-white text-capitalize"><b><?php echo $label; ?></b></span>
</div>
<input type="<?php echo e($type, false); ?>" class="form-control <?php echo e($id, false); ?>" placeholder="<?php echo e($placeholder, false); ?>" name="<?php echo e($name, false); ?>" value="<?php echo e(request($name, $value), false); ?>">
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/filter/text.blade.php ENDPATH**/ ?>
\ No newline at end of file
<script>
<?php $__env->startSection('admin.select-ajax'); ?>
<?php if(isset($ajax)): ?>
configs = $.extend(configs, {
ajax: {
url: "<?php echo e($ajax['url'], false); ?>",
dataType: 'json',
delay: 250,
data: function (params) {
return {
q: params.term,
page: params.page
};
},
processResults: function (data, params) {
params.page = params.page || 1;
return {
results: $.map(data.data, function (d) {
d.id = d.<?php echo e($ajax['idField'], false); ?>;
d.text = d.<?php echo e($ajax['textField'], false); ?>;
return d;
}),
pagination: {
more: data.next_page_url
}
};
},
cache: true
},
escapeMarkup: function (markup) {
return markup;
}
});
<?php endif; ?>
<?php $__env->stopSection(true); ?>
</script>
<?php if(isset($loads)): ?>
<script once>
var selector = '<?php echo $selector; ?>';
var fields = '<?php echo $loads['fields']; ?>'.split('^');
var urls = '<?php echo $loads['urls']; ?>'.split('^');
$(document).off('change', selector);
$(document).on('change', selector, function () {
Dcat.helpers.loadFields(this, {
group: '<?php echo e($loads['group'] ?? '.fields-group', false); ?>',
urls: urls,
fields: fields,
textField: "<?php echo e($loads['textField'], false); ?>",
idField: "<?php echo e($loads['idField'], false); ?>",
});
});
$(selector).trigger('change');
</script>
<?php endif; ?>
<script once>
// on first focus (bubbles up to document), open the menu
$(document).off('focus', '.select2-selection.select2-selection--single')
.on('focus', '.select2-selection.select2-selection--single', function (e) {
$(this).closest(".select2-container").siblings('select:enabled').select2('open');
});
// steal focus during close - only capture once and stop propogation
$(document).off('select2:closing', 'select.select2')
.on('select2:closing', 'select.select2', function (e) {
$(e.target).data("select2").$selection.one('focus focusin', function (e) {
e.stopPropagation();
});
});
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/scripts/select.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php $__env->startSection('content-header'); ?>
<section class="content-header breadcrumbs-top">
<?php if($header || $description): ?>
<h1 class=" float-left">
<span class="text-capitalize"><?php echo $header; ?></span>
<small><?php echo $description; ?></small>
</h1>
<?php elseif($breadcrumb || config('admin.enable_default_breadcrumb')): ?>
<div>&nbsp;</div>
<?php endif; ?>
<?php echo $__env->make('admin::partials.breadcrumb', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php echo $__env->make('admin::partials.alerts', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin::partials.exception', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $content; ?>
<?php echo $__env->make('admin::partials.toastr', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('app'); ?>
<?php echo Dcat\Admin\Admin::asset()->styleToHtml(); ?>
<div class="content-header">
<?php echo $__env->yieldContent('content-header'); ?>
</div>
<div class="content-body" id="app">
<?php echo admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_BEFORE']); ?>
<?php echo $__env->yieldContent('content'); ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_AFTER']); ?>
</div>
<?php echo Dcat\Admin\Admin::asset()->scriptToHtml(); ?>
<div class="extra-html"><?php echo Dcat\Admin\Admin::html(); ?></div>
<?php $__env->stopSection(); ?>
<?php if(! request()->pjax()): ?>
<?php echo $__env->make('admin::layouts.page', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php else: ?>
<title><?php echo e(Dcat\Admin\Admin::title(), false); ?> <?php if($header): ?> | <?php echo e($header, false); ?><?php endif; ?></title>
<script>Dcat.wait()</script>
<?php echo Dcat\Admin\Admin::asset()->cssToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->jsToHtml(); ?>
<?php echo $__env->yieldContent('app'); ?>
<?php endif; ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/layouts/content.blade.php ENDPATH**/ ?>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $__env->yieldContent('title'); ?></title>
<style>
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}a{background-color:transparent}code{font-family:monospace,monospace;font-size:1em}[hidden]{display:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}a{color:inherit;text-decoration:inherit}code{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}svg,video{display:block;vertical-align:middle}video{max-width:100%;height:auto}.bg-white{--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f7fafc;background-color:rgba(247,250,252,var(--bg-opacity))}.border-gray-200{--border-opacity:1;border-color:#edf2f7;border-color:rgba(237,242,247,var(--border-opacity))}.border-gray-400{--border-opacity:1;border-color:#cbd5e0;border-color:rgba(203,213,224,var(--border-opacity))}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.flex{display:flex}.grid{display:grid}.hidden{display:none}.items-center{align-items:center}.justify-center{justify-content:center}.font-semibold{font-weight:600}.h-5{height:1.25rem}.h-8{height:2rem}.h-16{height:4rem}.text-sm{font-size:.875rem}.text-lg{font-size:1.125rem}.leading-7{line-height:1.75rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.ml-2{margin-left:.5rem}.mt-4{margin-top:1rem}.ml-4{margin-left:1rem}.mt-8{margin-top:2rem}.ml-12{margin-left:3rem}.-mt-px{margin-top:-1px}.max-w-xl{max-width:36rem}.max-w-6xl{max-width:72rem}.min-h-screen{min-height:100vh}.overflow-hidden{overflow:hidden}.p-6{padding:1.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.pt-8{padding-top:2rem}.fixed{position:fixed}.relative{position:relative}.top-0{top:0}.right-0{right:0}.shadow{box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.text-center{text-align:center}.text-gray-200{--text-opacity:1;color:#edf2f7;color:rgba(237,242,247,var(--text-opacity))}.text-gray-300{--text-opacity:1;color:#e2e8f0;color:rgba(226,232,240,var(--text-opacity))}.text-gray-400{--text-opacity:1;color:#cbd5e0;color:rgba(203,213,224,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#a0aec0;color:rgba(160,174,192,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.text-gray-900{--text-opacity:1;color:#1a202c;color:rgba(26,32,44,var(--text-opacity))}.uppercase{text-transform:uppercase}.underline{text-decoration:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tracking-wider{letter-spacing:.05em}.w-5{width:1.25rem}.w-8{width:2rem}.w-auto{width:auto}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}@-webkit-keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@-webkit-keyframes ping{0%{transform:scale(1);opacity:1}75%,to{transform:scale(2);opacity:0}}@keyframes ping{0%{transform:scale(1);opacity:1}75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(0);-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(0);-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@media (min-width:640px){.sm\:rounded-lg{border-radius:.5rem}.sm\:block{display:block}.sm\:items-center{align-items:center}.sm\:justify-start{justify-content:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:h-20{height:5rem}.sm\:ml-0{margin-left:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}}@media (min-width:768px){.md\:border-t-0{border-top-width:0}.md\:border-l{border-left-width:1px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1024px){.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (prefers-color-scheme:dark){.dark\:bg-gray-800{--bg-opacity:1;background-color:#2d3748;background-color:rgba(45,55,72,var(--bg-opacity))}.dark\:bg-gray-900{--bg-opacity:1;background-color:#1a202c;background-color:rgba(26,32,44,var(--bg-opacity))}.dark\:border-gray-700{--border-opacity:1;border-color:#4a5568;border-color:rgba(74,85,104,var(--border-opacity))}.dark\:text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.dark\:text-gray-400{--text-opacity:1;color:#cbd5e0;color:rgba(203,213,224,var(--text-opacity))}}
</style>
<style>
body {
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
</style>
</head>
<body class="antialiased">
<div class="relative flex items-top justify-center min-h-screen bg-gray-100 dark:bg-gray-900 sm:items-center sm:pt-0">
<div class="max-w-xl mx-auto sm:px-6 lg:px-8">
<div class="flex items-center pt-8 sm:justify-start sm:pt-0">
<div class="px-4 text-lg text-gray-500 border-r border-gray-400 tracking-wider">
<?php echo $__env->yieldContent('code'); ?>
</div>
<div class="ml-4 text-lg text-gray-500 uppercase tracking-wider">
<?php echo $__env->yieldContent('message'); ?>
</div>
</div>
</div>
</div>
</body>
</html>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions/views/minimal.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if(! empty($button['text']) || $click): ?>
<span class="drop<?php echo e($direction, false); ?>" style="display:inline-block">
<a id="<?php echo e($buttonId, false); ?>" class="dropdown-toggle <?php echo e($button['class'], false); ?>" style="<?php echo e($button['style'], false); ?>" data-toggle="dropdown" href="javascript:void(0)">
<stub><?php echo $button['text']; ?></stub>
<span class="caret"></span>
</a>
<ul class="dropdown-menu"><?php echo $options; ?></ul>
</span>
<?php else: ?>
<ul class="dropdown-menu"><?php echo $options; ?></ul>
<?php endif; ?>
<?php if($click): ?>
<script>
var $btn = $('#<?php echo e($buttonId, false); ?>'),
$a = $btn.parent().find('ul li a'),
text = String($btn.text());
$a.on('click', function () {
$btn.find('stub').html($(this).html() + ' &nbsp;');
});
if (text.replace(/(^\s*)|(\s*$)/g,"")) {
$btn.find('stub').html(text + ' &nbsp;');
} else {
(!$a.length) || $btn.find('stub').html($($a[0]).html() + ' &nbsp;');
}
</script>
<?php endif; ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/widgets/dropdown.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="box-footer">
<div class="col-md-<?php echo e($width['label'], false); ?> d-md-block" style="display: none"></div>
<div class="col-md-<?php echo e($width['field'], false); ?>">
<?php if(! empty($buttons['submit'])): ?>
<div class="btn-group pull-right">
<button class="btn btn-primary submit"><i class="feather icon-save"></i> <?php echo e(trans('admin.submit'), false); ?></button>
</div>
<?php if($checkboxes): ?>
<div class="pull-right d-md-flex" style="margin:10px 15px 0 0;display: none"><?php echo $checkboxes; ?></div>
<?php endif; ?>
<?php endif; ?>
<?php if(! empty($buttons['reset'])): ?>
<div class="btn-group pull-left">
<button type="reset" class="btn btn-white"><i class="feather icon-rotate-ccw"></i> <?php echo e(trans('admin.reset'), false); ?></button>
</div>
<?php endif; ?>
</div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/footer.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>">
<label class="<?php echo e($viewClass['label'], false); ?> control-label"></label>
<div class="<?php echo e($viewClass['field'], false); ?>">
<span class="btn <?php echo e($class, false); ?> <?php echo e($buttonClass, false); ?>" <?php echo $attributes; ?>><?php echo $label; ?></span>
</div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/button.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php echo $__env->make('admin::scripts.select', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<script require="@select2?lang=<?php echo e(config('app.locale') === 'en' ? '' : str_replace('_', '-', config('app.locale')), false); ?>" init="<?php echo $selector; ?>">
var configs = <?php echo admin_javascript_json($configs); ?>;
<?php echo $__env->yieldContent('admin.select-ajax'); ?>
<?php if(isset($remoteOptions)): ?>
$.ajax(<?php echo admin_javascript_json($remoteOptions); ?>).done(function(data) {
configs.data = data;
$this.each(function (_, select) {
select = $(select);
select.select2(configs);
var value = select.data('value') + '';
if (value) {
select.val(value.split(',')).trigger("change")
}
});
});
<?php else: ?>
$this.select2(configs);
<?php endif; ?>
<?php echo $cascadeScript; ?>
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/select-script.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div <?php echo $attributes; ?>>
<?php if($title || $tools): ?>
<div class="card-header <?php echo e($divider ? 'with-border' : '', false); ?>">
<span class="card-box-title"><?php echo $title; ?></span>
<div class="box-tools pull-right">
<?php $__currentLoopData = $tools; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tool): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $tool; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
<div class="card-body" style="<?php echo $padding; ?>">
<?php echo $content; ?>
</div>
<?php if($footer): ?>
<div class="card-footer">
<?php echo $footer; ?>
</div>
<?php endif; ?>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/widgets/card.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php
$depth = $item['depth'] ?? 0;
$horizontal = config('admin.layout.horizontal_menu');
$defaultIcon = config('admin.menu.default_icon', 'feather icon-circle');
?>
<?php if($builder->visible($item)): ?>
<?php if(empty($item['children'])): ?>
<li class="nav-item">
<a data-id="<?php echo e($item['id'] ?? '', false); ?>" <?php if(mb_strpos($item['uri'], '://') !== false): ?> target="_blank" <?php endif; ?>
href="<?php echo e($builder->getUrl($item['uri']), false); ?>"
class="nav-link <?php echo $builder->isActive($item) ? 'active' : ''; ?>">
<?php echo str_repeat('&nbsp;', $depth); ?><i class="fa fa-fw <?php echo e($item['icon'] ?: $defaultIcon, false); ?>"></i>
<p>
<?php echo $builder->translate($item['title']); ?>
</p>
</a>
</li>
<?php else: ?>
<li class="<?php echo e($horizontal ? 'dropdown' : 'has-treeview', false); ?> <?php echo e($depth > 0 ? 'dropdown-submenu' : '', false); ?> nav-item <?php echo e($builder->isActive($item) ? 'menu-open' : '', false); ?>">
<a href="#" data-id="<?php echo e($item['id'] ?? '', false); ?>"
class="nav-link <?php echo e($builder->isActive($item) ? ($horizontal ? 'active' : '') : '', false); ?>
<?php echo e($horizontal ? 'dropdown-toggle' : '', false); ?>">
<?php echo str_repeat('&nbsp;', $depth); ?><i class="fa fa-fw <?php echo e($item['icon'] ?: $defaultIcon, false); ?>"></i>
<p>
<?php echo $builder->translate($item['title']); ?>
<?php if(! $horizontal): ?>
<i class="right fa fa-angle-left"></i>
<?php endif; ?>
</p>
</a>
<ul class="nav <?php echo e($horizontal ? 'dropdown-menu' : 'nav-treeview', false); ?>">
<?php $__currentLoopData = $item['children']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$item['depth'] = $depth + 1;
?>
<?php echo $__env->make('admin::partials.menu', ['item' => $item], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
</li>
<?php endif; ?>
<?php endif; ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/menu.blade.php ENDPATH**/ ?>
\ No newline at end of file
<input type="hidden" name="<?php echo e($name, false); ?>" value="<?php echo e($value, false); ?>" class="<?php echo e($class, false); ?>" <?php echo $attributes; ?> />
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/hidden.blade.php ENDPATH**/ ?>
\ No newline at end of file
<thead>
<tr class="<?php echo e($elementClass, false); ?> quick-create" style="cursor: pointer">
<td colspan="<?php echo e($columnCount, false); ?>" style="background: <?php echo e(Dcat\Admin\Admin::color()->darken('#ededed', 1), false); ?>">
<span class="create cursor-pointer" style="display: block;">
<i class="feather icon-plus"></i>&nbsp;<?php echo e(__('admin.quick_create'), false); ?>
</span>
<form class="form-inline create-form" style="display: none;" method="post">
<?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
&nbsp;<?php echo $field->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
&nbsp;
&nbsp;
<button type="submit" class="btn btn-primary btn-sm"><?php echo e(__('admin.submit'), false); ?></button>&nbsp;
&nbsp;
<a href="javascript:void(0);" class="cancel"><?php echo e(__('admin.cancel'), false); ?></a>
</form>
</td>
</tr>
</thead>
<script>
var ctr = $('.<?php echo $elementClass; ?>'),
btn = $('.quick-create-button-<?php echo $uniqueName; ?>');
btn.on('click', function () {
ctr.toggle().click();
});
ctr.on('click', function () {
ctr.find('.create-form').show();
ctr.find('.create').hide();
});
ctr.find('.cancel').on('click', function () {
if (btn.length) {
ctr.hide();
return;
}
ctr.find('.create-form').hide();
ctr.find('.create').show();
return false;
});
ctr.find('.create-form').submit(function (e) {
e.preventDefault();
if (ctr.attr('submitting')) {
return;
}
var btn = $(this).find(':submit').buttonLoading();
ctr.attr('submitting', 1);
$.ajax({
url: '<?php echo $url; ?>',
type: '<?php echo $method; ?>',
data: $(this).serialize(),
success: function(data) {
ctr.attr('submitting', '');
btn.buttonLoading(false);
Dcat.handleJsonResponse(data);
},
error:function(xhq){
btn.buttonLoading(false);
ctr.attr('submitting', '');
var json = xhq.responseJSON;
if (typeof json === 'object') {
if (json.message) {
Dcat.error(json.message);
} else if (json.errors) {
var i, errors = [];
for (i in json.errors) {
errors.push(json.errors[i].join("<br>"));
}
Dcat.error(errors.join("<br>"));
}
}
}
});
return false;
});
</script><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/quick-create/form.blade.php ENDPATH**/ ?>
\ No newline at end of file
<a href="javascript:void(0)" class="grid-dialog-tree"
data-url="<?php echo e($url, false); ?>"
data-title="<?php echo e($title, false); ?>"
data-checked="<?php echo e($checkAll, false); ?>"
data-val="<?php echo e($value, false); ?>">
<i class='feather icon-align-right'></i> <?php echo e(trans('admin.view'), false); ?>
</a>
<template>
<template id="dialog-tree-tpl">
<div class="jstree-wrapper p-1" style="border:0"><div class="da-tree" style="margin-top:10px"></div></div>
</template>
</template>
<script require="@jstree" once>
window.resolveDialogTree = function (options) {
var tpl = $('#dialog-tree-tpl').html(),
t = $(this),
val = t.data('val'),
url = t.data('url'),
title = t.data('title'),
ckall = t.data('checked'),
idx,
loading;
val = val ? String(val).split(',') : [];
if (url) {
if (loading) return;
loading = 1;
t.buttonLoading();
$.ajax(url, {data: {value: val}}).then(function (resp) {
loading = 0;
t.buttonLoading(false);
if (!resp.status) {
return Dcat.error(resp.message || '系统繁忙,请稍后再试');
}
open(resp.value);
});
} else {
open(val);
}
function open(val) {
options.config.core.data = formatNodes(val, options.nodes);
idx = layer.open({
type: 1,
area: options.area,
content: tpl,
title: title,
success: function (a, idx) {
var tree = $('#layui-layer'+idx).find('.da-tree');
tree.on("loaded.jstree", function () {
tree.jstree('open_all');
}).jstree(options.config);
}
});
$(document).one('pjax:complete', function () {
layer.close(idx);
});
}
function formatNodes(value, all) {
var idColumn = options.columns.id,
textColumn = options.columns.text,
parentColumn = options.columns.parent,
nodes = [], i, v, parentId;
for (i in all) {
v = all[i];
if (!v[idColumn]) continue;
parentId = v[parentColumn] || '#';
if (!parentId || parentId == options.rootParentId || parentId == '0') {
parentId = '#';
}
v['state'] = {'disabled': true};
if (ckall || (value && Dcat.helpers.inObject(value, v[idColumn]))) {
v['state']['selected'] = true;
}
nodes.push({
'id' : v[idColumn],
'text' : v[textColumn] || null,
'parent' : parentId,
'state' : v['state'],
});
}
return nodes;
}
}
</script>
<script require="@jstree">
var nodes = <?php echo json_encode($nodes); ?>;
var options = <?php echo admin_javascript_json($options); ?>;
var area = <?php echo json_encode($area); ?>;
$('.grid-dialog-tree').off('click').on('click', function () {
resolveDialogTree.call(this, {config: options, nodes: nodes, area: area, rootParentId: '<?php echo $rootParentId; ?>', columns: <?php echo json_encode($columnNames); ?>});
});
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/displayer/dialogtree.blade.php ENDPATH**/ ?>
\ No newline at end of file
<style>
.row {
margin: 0;
}
.col-md-12,
.col-md-3 {
padding: 0;
}
@media screen and (min-width: 1000px) and (max-width: 1150px) {
.col-lg-3,
.col-lg-9 {
flex: 0 0 50%;
max-width: 50%;
}
}
@media screen and (min-width: 1151px) and (max-width: 1300px) {
.col-lg-3 {
flex: 0 0 40%;
max-width: 40%;
}
.col-lg-9 {
flex: 0 0 60%;
max-width: 60%;
}
}
@media screen and (min-width: 1301px) and (max-width: 1700px) {
.col-lg-3 {
flex: 0 0 35%;
max-width: 35%;
}
.col-lg-9 {
flex: 0 0 65%;
max-width: 65%;
}
}
.login-page {
height: auto;
}
.login-main {
position: relative;
display: flex;
min-height: 100vh;
flex-direction: row;
align-items: stretch;
margin: 0;
}
.login-main .login-page {
background-color: #fff;
}
.login-main .card {
box-shadow: none;
}
.login-main .auth-brand {
margin: 4rem 0 4rem;
font-size: 26px;
width: 325px;
}
@media (max-width: 576px) {
.login-main .auth-brand {
width: 90%;
margin-left: 24px
}
}
.login-main .login-logo {
font-size: 2.1rem;
font-weight: 300;
margin-bottom: 0.9rem;
text-align: left;
margin-left: 20px;
}
.login-main .login-box-msg {
margin: 0;
padding: 0 0 20px;
font-size: 0.9rem;
font-weight: 400;
text-align: left;
}
.login-main .btn {
width: 100%;
}
.login-page-right {
padding: 6rem 3rem;
flex: 1;
position: relative;
color: #fff;
background-color: rgba(0, 0, 0, 0.3);
text-align: center !important;
background: url(/vendor/dcat-admin/images/bg.jpg) center;
background-size: cover;
}
.login-description {
position: absolute;
margin: 0 auto;
padding: 0 1.75rem;
bottom: 3rem;
left: 0;
right: 0;
}
.content-front {
position: absolute;
left: 0;
right: 0;
height: 100vh;
background: rgba(0,0,0,.1);
margin-top: -6rem;
}
body.dark-mode .content-front {
background: rgba(0,0,0,.3);
}
body.dark-mode .auth-brand {
color: #cacbd6
}
</style>
<div class="row login-main">
<div class="col-lg-3 col-12 bg-white">
<div class="login-page">
<div class="auth-brand text-lg-left">
<?php echo config('admin.logo'); ?>
</div>
<div class="login-box">
<div class="login-logo mb-2">
<h4 class="mt-0"></h4>
<p class="login-box-msg mt-1 mb-1"><?php echo e(__('admin.welcome_back'), false); ?></p>
</div>
<div class="card">
<div class="card-body login-card-body">
<form id="login-form" method="POST" action="<?php echo e(admin_url('auth/login'), false); ?>">
<input type="hidden" name="_token" value="<?php echo e(csrf_token(), false); ?>"/>
<fieldset class="form-label-group form-group position-relative has-icon-left">
<input
type="text"
class="form-control <?php echo e($errors->has('username') ? 'is-invalid' : '', false); ?>"
name="username"
placeholder="<?php echo e(trans('admin.username'), false); ?>"
value=""
required
autofocus
>
<div class="form-control-position">
<i class="feather icon-user"></i>
</div>
<label for="email"><?php echo e(trans('admin.username'), false); ?></label>
<div class="help-block with-errors"></div>
<?php if($errors->has('username')): ?>
<span class="invalid-feedback text-danger" role="alert">
<?php $__currentLoopData = $errors->get('username'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> <?php echo e($message, false); ?></span><br>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</span>
<?php endif; ?>
</fieldset>
<fieldset class="form-label-group form-group position-relative has-icon-left">
<input
minlength="5"
maxlength="20"
id="password"
type="password"
class="form-control <?php echo e($errors->has('password') ? 'is-invalid' : '', false); ?>"
name="password"
placeholder="<?php echo e(trans('admin.password'), false); ?>"
required
value=""
autocomplete="current-password"
>
<div class="form-control-position">
<i class="feather icon-lock"></i>
</div>
<label for="password"><?php echo e(trans('admin.password'), false); ?></label>
<div class="help-block with-errors"></div>
<?php if($errors->has('password')): ?>
<span class="invalid-feedback text-danger" role="alert">
<?php $__currentLoopData = $errors->get('password'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> <?php echo e($message, false); ?></span><br>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</span>
<?php endif; ?>
</fieldset>
<div class="form-group d-flex justify-content-between align-items-center">
<div class="text-left">
<fieldset class="checkbox">
<div class="vs-checkbox-con vs-checkbox-primary">
<input id="remember" name="remember" value="1" type="checkbox" <?php echo e(old('remember') ? 'checked' : '', false); ?>>
<span class="vs-checkbox">
<span class="vs-checkbox--check">
<i class="vs-icon feather icon-check"></i>
</span>
</span>
<span> <?php echo e(trans('admin.remember_me'), false); ?></span>
</div>
</fieldset>
</div>
</div>
<button type="submit" class="btn btn-primary float-right login-btn">
<?php echo e(__('admin.login'), false); ?>
&nbsp;
<i class="feather icon-arrow-right"></i>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-9 col-12 login-page-right">
<div class="content-front"></div>
<div class="login-description">
<p class="lead">
</p>
<p>
</p>
</div>
</div>
</div>
<script>
Dcat.ready(function () {
// ajax表单提交
$('#login-form').form({
validate: true,
});
});
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\resources\views/admin/login.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="dcat-box">
<div class="d-block pb-0">
<?php echo $__env->make('admin::grid.table-toolbar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<?php echo $grid->renderFilter(); ?>
<?php echo $grid->renderHeader(); ?>
<div class="<?php echo $grid->formatTableParentClass(); ?>">
<table class="<?php echo e($grid->formatTableClass(), false); ?>" id="<?php echo e($tableId, false); ?>" >
<thead>
<?php if($headers = $grid->getVisibleComplexHeaders()): ?>
<tr>
<?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $header->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
<?php endif; ?>
<tr>
<?php $__currentLoopData = $grid->getVisibleColumns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<th <?php echo $column->formatTitleAttributes(); ?>><?php echo $column->getLabel(); ?><?php echo $column->renderHeader(); ?></th>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
</thead>
<?php if($grid->hasQuickCreate()): ?>
<?php echo $grid->renderQuickCreate(); ?>
<?php endif; ?>
<tbody>
<?php $__currentLoopData = $grid->rows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr <?php echo $row->rowAttributes(); ?>>
<?php $__currentLoopData = $grid->getVisibleColumnNames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<td <?php echo $row->columnAttributes($name); ?>><?php echo $row->column($name); ?></td>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php if($grid->rows()->isEmpty()): ?>
<tr>
<td colspan="<?php echo count($grid->getVisibleColumnNames()); ?>">
<div style="margin:5px 0 0 10px;"><span class="help-block" style="margin-bottom:0"><i class="feather icon-alert-circle"></i>&nbsp;<?php echo e(trans('admin.no_data'), false); ?></span></div>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<?php echo $grid->renderFooter(); ?>
<?php echo $grid->renderPagination(); ?>
</div>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/table.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($error = session()->get('error')): ?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> &nbsp;<?php echo e(\Illuminate\Support\Arr::get($error->get('title'), 0), false); ?></h4>
<p><?php echo \Illuminate\Support\Arr::get($error->get('message'), 0); ?></p>
</div>
<?php elseif($errors = session()->get('errors')): ?>
<?php if($errors->hasBag('error')): ?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php $__currentLoopData = $errors->getBag("error")->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<p><?php echo \Illuminate\Support\Arr::get($message, 0); ?></p>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if($success = session()->get('success')): ?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-check"></i> &nbsp;<?php echo e(\Illuminate\Support\Arr::get($success->get('title'), 0), false); ?></h4>
<p><?php echo \Illuminate\Support\Arr::get($success->get('message'), 0); ?></p>
</div>
<?php endif; ?>
<?php if($info = session()->get('info')): ?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-info"></i> &nbsp;<?php echo e(\Illuminate\Support\Arr::get($info->get('title'), 0), false); ?></h4>
<p><?php echo \Illuminate\Support\Arr::get($info->get('message'), 0); ?></p>
</div>
<?php endif; ?>
<?php if($warning = session()->get('warning')): ?>
<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-warning"></i> &nbsp;<?php echo e(\Illuminate\Support\Arr::get($warning->get('title'), 0), false); ?></h4>
<p><?php echo \Illuminate\Support\Arr::get($warning->get('message'), 0); ?></p>
</div>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/alerts.blade.php ENDPATH**/ ?>
\ No newline at end of file
<body
class="dcat-admin-body sidebar-mini layout-fixed <?php echo e($configData['body_class'], false); ?> <?php echo e($configData['sidebar_class'], false); ?>
<?php echo e($configData['navbar_class'] === 'fixed-top' ? 'navbar-fixed-top' : '', false); ?> " >
<script>
var Dcat = CreateDcat(<?php echo Dcat\Admin\Admin::jsVariables(); ?>);
</script>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_BEFORE']); ?>
<div class="wrapper">
<?php echo $__env->make('admin::partials.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin::partials.navbar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="app-content content">
<div class="content-wrapper" id="<?php echo e($pjaxContainerId, false); ?>" style="top: 0;min-height: 900px;">
<?php echo $__env->yieldContent('app'); ?>
</div>
</div>
</div>
<footer class="main-footer pt-1">
<p class="clearfix blue-grey lighten-2 mb-0 text-center">
<span class="text-center d-block d-md-inline-block mt-25">
Powered by
<a target="_blank" href="https://github.com/jqhph/dcat-admin">Dcat Admin</a>
<span>&nbsp;·&nbsp;</span>
v<?php echo e(Dcat\Admin\Admin::VERSION, false); ?>
</span>
<button class="btn btn-primary btn-icon scroll-top pull-right" style="position: fixed;bottom: 2%; right: 10px;display: none">
<i class="feather icon-arrow-up"></i>
</button>
</p>
</footer>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_AFTER']); ?>
<?php echo Dcat\Admin\Admin::asset()->jsToHtml(); ?>
<script>Dcat.boot();</script>
</body>
</html><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/layouts/container.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div>
<span class="grid-expand" data-url="<?php echo e($url, false); ?>" data-inserted="0" data-id="<?php echo e($key, false); ?>" data-key="<?php echo e($dataKey, false); ?>" data-toggle="collapse" data-target="#grid-collapse-<?php echo e($dataKey, false); ?>">
<a href="javascript:void(0)"><i class="feather icon-chevrons-right"></i> <?php echo $button; ?></a>
</span>
<template class="grid-expand-<?php echo e($dataKey, false); ?>">
<div id="grid-collapse-<?php echo e($dataKey, false); ?>"><?php echo $html; ?></div>
</template>
</div>
<script once>
$('.grid-expand').off('click').on('click', function () {
var _th = $(this), url = _th.data('url');
if ($(this).data('inserted') == '0') {
var key = _th.data('key');
var row = _th.closest('tr');
var html = $('template.grid-expand-'+key).html();
var id = 'expand-'+key+Dcat.helpers.random(10);
var rowKey = _th.data('id');
$(this).attr('data-expand', '#'+id);
row.after("<tr id="+id+"><td colspan='"+(row.find('td').length)+"' style='padding:0 !important; border:0;height:0;'>"+html+"</td></tr>");
if (url) {
var collapse = $('#grid-collapse-'+key);
collapse.find('div').loading();
$('.dcat-loading').css({position: 'inherit', 'padding-top': '70px'});
Dcat.helpers.asyncRender(url+'&key='+rowKey, function (html) {
collapse.html(html);
})
}
$(this).data('inserted', 1);
} else {
if ($("i", this).hasClass('icon-chevrons-right')) {
$(_th.data('expand')).show();
} else {
setTimeout(function() {
$(_th.data('expand')).hide();
}, 250);
}
}
$("i", this).toggleClass("icon-chevrons-right icon-chevrons-down");
});
</script><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/displayer/expand.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text bg-white text-capitalize"><b><?php echo $label; ?></b></span>
</div>
<select class="form-control <?php echo e($class, false); ?>" name="<?php echo e($name, false); ?>" data-value="<?php echo e($value, false); ?>" style="width: 100%;">
<option value=""></option>
<?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $select => $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($select, false); ?>" <?php echo e(Dcat\Admin\Support\Helper::equal($select, $value) ?'selected':'', false); ?>><?php echo e($option, false); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<?php echo $__env->make('admin::scripts.select', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<script require="@select2?lang=<?php echo e(config('app.locale') === 'en' ? '' : str_replace('_', '-', config('app.locale')), false); ?>">
var configs = <?php echo admin_javascript_json($configs); ?>;
<?php echo $__env->yieldContent('admin.select-ajax'); ?>
<?php if(isset($remote)): ?>
$.ajax(<?php echo admin_javascript_json($remote['ajaxOptions']); ?>).done(function(data) {
$("<?php echo e($selector, false); ?>").select2($.extend(<?php echo admin_javascript_json($configs); ?>, {
data: data,
})).val(<?php echo json_encode($remote['values']); ?>).trigger("change");
});
<?php else: ?>
$("<?php echo $selector; ?>").select2(configs);
<?php endif; ?>
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/filter/select.blade.php ENDPATH**/ ?>
\ No newline at end of file
<li class="dd-item <?php echo $expand ? '' : 'dd-collapsed'; ?>" data-id="<?php echo e($branch[$keyName], false); ?>">
<div class="dd-handle">
<?php echo $branchCallback($branch); ?>
<span class="pull-right dd-nodrag">
<?php echo $resolveAction($branch); ?>
</span>
</div>
<?php if(isset($branch['children'])): ?>
<ol class="dd-list">
<?php $__currentLoopData = $branch['children']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $branch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $__env->make($branchView, $branch, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ol>
<?php endif; ?>
</li>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/tree/branch.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="filter-input col-sm-<?php echo e($width, false); ?>" style="<?php echo $style; ?>">
<div class="form-group">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text bg-white text-capitalize"><b><?php echo $label; ?></b>&nbsp;<i class="feather icon-calendar"></i></span>
</div>
<input autocomplete="off" type="text" class="form-control" id="<?php echo e($id['start'], false); ?>" placeholder="<?php echo e($label, false); ?>" name="<?php echo e($name['start'], false); ?>" value="<?php echo e(request($name['start'], \Illuminate\Support\Arr::get($value, 'start')), false); ?>">
<span class="input-group-addon" style="border-left: 0; border-right: 0;">To</span>
<input autocomplete="off" type="text" class="form-control" id="<?php echo e($id['end'], false); ?>" placeholder="<?php echo e($label, false); ?>" name="<?php echo e($name['end'], false); ?>" value="<?php echo e(request($name['end'], \Illuminate\Support\Arr::get($value, 'end')), false); ?>">
</div>
</div>
</div>
<script require="@moment,@bootstrap-datetimepicker">
var options = <?php echo admin_javascript_json($dateOptions); ?>;
$('#<?php echo e($id['start'], false); ?>').datetimepicker(options);
$('#<?php echo e($id['end'], false); ?>').datetimepicker($.extend(options, {useCurrent: false}));
$("#<?php echo e($id['start'], false); ?>").on("dp.change", function (e) {
$('#<?php echo e($id['end'], false); ?>').data("DateTimePicker").minDate(e.date);
});
$("#<?php echo e($id['end'], false); ?>").on("dp.change", function (e) {
$('#<?php echo e($id['start'], false); ?>').data("DateTimePicker").maxDate(e.date);
});
</script><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/filter/between-datetime.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div <?php echo $attributes; ?>>
<div class="box-header with-border">
<h3 class="box-title"><?php echo $title; ?></h3>
<div class="box-tools pull-right">
<?php $__currentLoopData = $tools; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tool): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $tool; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<div class="box-body collapse show" style="<?php echo $padding; ?>">
<?php echo $content; ?>
</div>
</div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/widgets/box.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($user): ?>
<li class="dropdown dropdown-user nav-item">
<a class="dropdown-toggle nav-link dropdown-user-link" href="#" data-toggle="dropdown">
<div class="user-nav d-sm-flex d-none">
<span class="user-name text-bold-600"><?php echo e($user->name, false); ?></span>
<span class="user-status"><i class="fa fa-circle text-success"></i> <?php echo e(trans('admin.online'), false); ?></span>
</div>
<span>
<img class="round" src="<?php echo e($user->getAvatar(), false); ?>" alt="avatar" height="40" width="40" />
</span>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a href="<?php echo e(admin_url('auth/setting'), false); ?>" class="dropdown-item">
<i class="feather icon-user"></i> <?php echo e(trans('admin.setting'), false); ?>
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<?php echo e(admin_url('auth/logout'), false); ?>">
<i class="feather icon-power"></i> <?php echo e(trans('admin.logout'), false); ?>
</a>
</div>
</li>
<?php endif; ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/navbar-user-panel.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>">
<div class="<?php echo e($viewClass['label'], false); ?> control-label">
<span><?php echo $label; ?></span>
</div>
<div class="<?php echo e($viewClass['field'], false); ?>">
<?php echo $__env->make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<input type="hidden" name="<?php echo e($name, false); ?>"/>
<select class="form-control <?php echo e($class, false); ?>" style="width: 100%;" name="<?php echo e($name, false); ?>" <?php echo $attributes; ?> >
<option value=""></option>
<?php if($groups): ?>
<?php $__currentLoopData = $groups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<optgroup label="<?php echo e($group['label'], false); ?>">
<?php $__currentLoopData = $group['options']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $select => $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($select, false); ?>" <?php echo e($select == $value ?'selected':'', false); ?>><?php echo e($option, false); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</optgroup>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $select => $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($select, false); ?>" <?php echo e(Dcat\Admin\Support\Helper::equal($select, $value) ?'selected':'', false); ?>><?php echo e($option, false); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</select>
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<?php echo $__env->make('admin::form.select-script', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/select.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div style="margin-bottom: 10px"><?php echo e($value, false); ?></div>
<?php if($row->version && empty($row->new_version)): ?>
<?php echo e(trans('admin.version').' '.$row->version, false); ?>
<?php if($settingAction): ?>
&nbsp;|&nbsp;
<?php echo $settingAction; ?>
<?php endif; ?>
<?php else: ?>
<?php echo $updateAction; ?>
<?php if($settingAction && $row->new_version): ?>
&nbsp;|&nbsp;
<?php echo $settingAction; ?>
<?php endif; ?>
<?php endif; ?>
&nbsp;|&nbsp;
<a href="javascript:void(0)"><?php echo e(trans('admin.view'), false); ?></a><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/displayer/extensions/description.blade.php ENDPATH**/ ?>
\ No newline at end of file
<style>
.filter-box {
border-top: 1px solid #eee;
margin-top: 10px;
margin-bottom: -.5rem!important;
padding: 1.8rem;
}
</style>
<div class="filter-box shadow-0 card mb-0 <?php echo e($expand ? '' : 'd-none', false); ?> <?php echo e($containerClass, false); ?>">
<div class="card-body" style="<?php echo $style; ?>" id="<?php echo e($filterID, false); ?>">
<form action="<?php echo $action; ?>" class="form-horizontal grid-filter-form" pjax-container method="get">
<div class="row mb-0">
<?php $__currentLoopData = $layout->columns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $__currentLoopData = $column->filters(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $filter): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $filter->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<button class="btn btn-primary btn-sm btn-mini submit" style="margin-left: 12px">
<i class="feather icon-search"></i><span class="d-none d-sm-inline">&nbsp;&nbsp;<?php echo e(trans('admin.search'), false); ?></span>
</button>
<?php if(!$disableResetButton): ?>
<a style="margin-left: 6px" href="<?php echo $action; ?>" class="reset btn btn-white btn-sm ">
<i class="feather icon-rotate-ccw"></i><span class="d-none d-sm-inline">&nbsp;&nbsp;<?php echo e(trans('admin.reset'), false); ?></span>
</a>
<?php endif; ?>
</div>
</form>
</div>
</div>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/filter/container.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="help-block with-errors"></div><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/error.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php $__env->startSection('title', __('Not Found')); ?>
<?php $__env->startSection('code', '404'); ?>
<?php $__env->startSection('message', __('Not Found')); ?>
<?php echo $__env->make('errors::minimal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions/views/404.blade.php ENDPATH**/ ?>
\ No newline at end of file
<script>Dcat.wait();</script>
<style>
.form-content .row {
margin-right: 0;
margin-left: 0;
}
</style>
<?php $__env->startSection('content'); ?>
<section class="form-content"><?php echo $content; ?></section>
<?php $__env->stopSection(); ?>
<?php echo Dcat\Admin\Admin::asset()->cssToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->jsToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->styleToHtml(); ?>
<?php echo $__env->yieldContent('content'); ?>
<?php echo Dcat\Admin\Admin::asset()->scriptToHtml(); ?>
<div class="extra-html"><?php echo Dcat\Admin\Admin::html(); ?></div>
<style>.select2-dropdown {z-index: 99999999999}</style>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/layouts/form-content.blade.php ENDPATH**/ ?>
\ No newline at end of file
<ul class="pagination pagination-sm no-margin pull-right shadow-100" style="border-radius: 1.5rem">
<!-- Previous Page Link -->
<?php if($paginator->onFirstPage()): ?>
<li class="page-item previous disabled"><span class="page-link"></span></li>
<?php else: ?>
<li class="page-item previous"><a class="page-link" href="<?php echo e($paginator->previousPageUrl(), false); ?>" rel="prev"></a></li>
<?php endif; ?>
<?php if(! empty($elements)): ?>
<?php $__currentLoopData = $elements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<!-- "Three Dots" Separator -->
<?php if(is_string($element)): ?>
<li class="page-item disabled"><span class="page-link"><?php echo e($element, false); ?></span></li>
<?php endif; ?>
<!-- Array Of Links -->
<?php if(is_array($element)): ?>
<?php $__currentLoopData = $element; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($page == $paginator->currentPage()): ?>
<li class="page-item active"><span class="page-link"><?php echo e($page, false); ?></span></li>
<?php else: ?>
<li class="page-item"><a class="page-link" href="<?php echo e($url, false); ?>"><?php echo e($page, false); ?></a></li>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<!-- Next Page Link -->
<?php if($paginator->hasMorePages()): ?>
<li class="page-item next"><a class="page-link" href="<?php echo e($paginator->nextPageUrl(), false); ?>" rel="next"></a></li>
<?php else: ?>
<li class="page-item next disabled"><span class="page-link"></span></li>
<?php endif; ?>
</ul>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/pagination.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php if($breadcrumb): ?>
<div class="breadcrumb-wrapper col-12">
<ol class="breadcrumb float-right text-capitalize">
<li class="breadcrumb-item"><a href="<?php echo e(admin_url('/'), false); ?>"><i class="fa fa-dashboard"></i> <?php echo e(admin_trans('admin.home'), false); ?></a></li>
<?php $__currentLoopData = $breadcrumb; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($loop->last): ?>
<li class="active breadcrumb-item">
<?php if(\Illuminate\Support\Arr::has($item, 'icon')): ?>
<i class="fa <?php echo e($item['icon'], false); ?>"></i>
<?php endif; ?>
<?php echo e($item['text'], false); ?>
</li>
<?php else: ?>
<li class="breadcrumb-item">
<a href="<?php echo e(admin_url(\Illuminate\Support\Arr::get($item, 'url')), false); ?>">
<?php if(\Illuminate\Support\Arr::has($item, 'icon')): ?>
<i class="fa <?php echo e($item['icon'], false); ?>"></i>
<?php endif; ?>
<?php echo e($item['text'], false); ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ol>
</div>
<?php elseif(config('admin.enable_default_breadcrumb')): ?>
<div class="breadcrumb-wrapper col-12">
<ol class="breadcrumb float-right text-capitalize">
<li class="breadcrumb-item"><a href="<?php echo e(admin_url('/'), false); ?>"><i class="fa fa-dashboard"></i> <?php echo e(admin_trans('admin.home'), false); ?></a></li>
<?php for($i = 2; $i <= ($len = count(Request::segments())); $i++): ?>
<li class="breadcrumb-item">
<?php if($i == $len): ?> <a href=""> <?php endif; ?>
<?php echo e(admin_trans_label(Request::segment($i)), false); ?>
<?php if($i == $len): ?> </a> <?php endif; ?>
</li>
<?php endfor; ?>
</ol>
</div>
<?php endif; ?>
<div class="clearfix"></div>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/partials/breadcrumb.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>">
<label class="<?php echo e($viewClass['label'], false); ?> control-label"><?php echo $label; ?></label>
<div class="<?php echo e($viewClass['field'], false); ?> <?php echo e($class, false); ?>">
<?php echo $__env->make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="input-group" style="width:100%">
<input <?php echo e($disabled, false); ?> type="hidden" class="hidden-input" name="<?php echo e($name, false); ?>" />
<div class="jstree-wrapper">
<div class="d-flex">
<?php echo $checkboxes; ?>
</div>
<div class="da-tree" style="margin-top:10px"></div>
</div>
</div>
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<script require="@jstree" init="<?php echo $selector; ?>">
var $tree = $this.find('.jstree-wrapper .da-tree'),
$input = $this.find('.hidden-input'),
opts = <?php echo admin_javascript_json($options); ?>,
parents = <?php echo json_encode($parents); ?>;
opts.core = opts.core || {};
opts.core.data = <?php echo json_encode($nodes); ?>;
$this.find('input[value=1]').on("click", function () {
$(this).parents('.jstree-wrapper').find('.da-tree').jstree($(this).prop("checked") ? "check_all" : "uncheck_all");
});
$this.find('input[value=2]').on("click", function () {
$(this).parents('.jstree-wrapper').find('.da-tree').jstree($(this).prop("checked") ? "open_all" : "close_all");
});
$tree.on("changed.jstree", function (e, data) {
var i, selected = [];
$input.val('');
for (i in data.selected) {
if (Dcat.helpers.inObject(parents, data.selected[i])) { // 过滤父节点
continue;
}
selected.push(data.selected[i]);
}
selected.length && $input.val(selected.join(','));
}).on("loaded.jstree", function () {
<?php if($expand): ?> $(this).jstree('open_all'); <?php endif; ?>
}).jstree(opts);
</script><?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/tree.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="card-header pb-1 with-border" style="padding:.9rem 1rem">
<div>
<div class="btn-group" style="margin-right:3px">
<button class="btn btn-primary btn-sm <?php echo e($id, false); ?>-tree-tools" data-action="expand">
<i class="feather icon-plus-square"></i>&nbsp;<span class="d-none d-sm-inline"><?php echo e(trans('admin.expand'), false); ?></span>
</button>
<button class="btn btn-primary btn-sm <?php echo e($id, false); ?>-tree-tools" data-action="collapse">
<i class="feather icon-minus-square"></i><span class="d-none d-sm-inline">&nbsp;<?php echo e(trans('admin.collapse'), false); ?></span>
</button>
</div>
<?php if($useSave): ?>
&nbsp;<div class="btn-group" style="margin-right:3px">
<button class="btn btn-primary btn-sm <?php echo e($id, false); ?>-save" ><i class="feather icon-save"></i><span class="d-none d-sm-inline">&nbsp;<?php echo e(trans('admin.save'), false); ?></span></button>
</div>
<?php endif; ?>
<?php if($useRefresh): ?>
&nbsp;<div class="btn-group" style="margin-right:3px">
<button class="btn btn-outline-primary btn-sm" data-action="refresh" ><i class="feather icon-refresh-cw"></i><span class="d-none d-sm-inline">&nbsp;<?php echo e(trans('admin.refresh'), false); ?></span></button>
</div>
<?php endif; ?>
<?php if($tools): ?>
&nbsp;<div class="btn-group" style="margin-right:3px">
<?php echo $tools; ?>
</div>
<?php endif; ?>
</div>
<div>
<?php echo $createButton; ?>
</div>
</div>
<div class="card-body table-responsive">
<div class="dd" id="<?php echo e($id, false); ?>">
<ol class="dd-list">
<?php if($items): ?>
<?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $branch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $__env->make($branchView, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<span class="help-block" style="margin-bottom:0"><i class="feather icon-alert-circle"></i>&nbsp;<?php echo e(trans('admin.no_data'), false); ?></span>
<?php endif; ?>
</ol>
</div>
</div>
<script require="@jquery.nestable">
var id = '<?php echo e($id, false); ?>';
var tree = $('#'+id);
tree.nestable(<?php echo admin_javascript_json($nestableOptions); ?>);
$('.'+id+'-save').on('click', function () {
var serialize = tree.nestable('serialize'), _this = $(this);
_this.buttonLoading();
$.post({
url: '<?php echo e($url, false); ?>',
data: {
'<?php echo e(\Dcat\Admin\Tree::SAVE_ORDER_NAME, false); ?>': JSON.stringify(serialize)
},
success: function (data) {
_this.buttonLoading(false);
Dcat.handleJsonResponse(data)
}
});
});
$('.'+id+'-tree-tools').on('click', function(e){
var action = $(this).data('action');
if (action === 'expand') {
tree.nestable('expandAll');
}
if (action === 'collapse') {
tree.nestable('collapseAll');
}
});
<?php if(! $expand): ?>
tree.nestable('collapseAll')
<?php endif; ?>
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/tree/container.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div class="<?php echo e($viewClass['form-group'], false); ?>">
<label class="<?php echo e($viewClass['label'], false); ?> control-label"><?php echo $label; ?></label>
<div class="<?php echo e($viewClass['field'], false); ?>">
<?php echo $__env->make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<textarea class="form-control <?php echo e($class, false); ?>" name="<?php echo e($name, false); ?>" placeholder="<?php echo e($placeholder, false); ?>" <?php echo $attributes; ?> ><?php echo e($value, false); ?></textarea>
<?php echo $__env->make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<script require="@tinymce" init="<?php echo $selector; ?>">
var opts = <?php echo admin_javascript_json($options); ?>;
opts.selector = '#'+id;
if (! opts.init_instance_callback) {
opts.init_instance_callback = function (editor) {
editor.on('Change', function(e) {
$this.val(String(e.target.getContent()).replace('<p><br data-mce-bogus="1"></p>', '').replace('<p><br></p>', ''));
});
}
}
tinymce.init(opts)
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/form/editor.blade.php ENDPATH**/ ?>
\ No newline at end of file
<input class="grid-column-switch" data-url="<?php echo e($url, false); ?>" data-reload="<?php echo e($refresh, false); ?>" data-size="small" name="<?php echo e($column, false); ?>" <?php echo e($checked, false); ?> type="checkbox" data-color="<?php echo e($color, false); ?>"/>
<script require="@switchery">
var swt = $('.grid-column-switch'),
that;
function initSwitchery() {
swt.parent().find('.switchery').remove();
swt.each(function () {
that = $(this);
new Switchery(that[0], that.data())
})
}
initSwitchery();
swt.off('change').on('change', function(e) {
var that = $(this),
url = that.data('url'),
reload = that.data('reload'),
checked = that.is(':checked'),
name = that.attr('name'),
data = {},
value = checked ? 1 : 0;
if (name.indexOf('.') === -1) {
data[name] = value;
} else {
name = name.split('.');
data[name[0]] = {};
data[name[0]][name[1]] = value;
}
Dcat.NP.start();
$.put({
url: url,
data: data,
success: function (d) {
Dcat.NP.done();
var msg = d.data.message || d.message;
if (d.status) {
Dcat.success(msg);
reload && Dcat.reload();
} else {
Dcat.error(msg);
}
}
});
});
</script>
<?php /**PATH D:\work\PHP\aimeiyue\all\service\vendor\dcat\laravel-admin\src/../resources/views/grid/displayer/switch.blade.php ENDPATH**/ ?>
\ No newline at end of file
【 15:37:53 】balance金额: 0.00【 15:37:53 】cashout金额: 15.75【 15:39:26 】balance金额: 0.00
【 15:39:26 】cashout金额: 15.75
【 15:41:26 】结算日期: 2025-02-25
【 15:41:26 】结算日期: 2025-02-25
【 15:41:26 】结算日期: 2025-02-27
【 15:41:26 】结算日期: 2025-02-27
【 15:41:26 】结算日期: 2025-02-27
【 15:41:26 】结算日期: 2025-02-27
【 15:41:26 】结算日期: 2025-03-11
【 15:41:26 】pendingCashout金额: 0
【 15:41:26 】balance金额: 0.00
【 15:41:26 】cashout金额: 15.75
【 15:44:08 】结算日期: 2025-02-25 09:45:31
【 15:44:08 】结算日期: 2025-02-25 13:27:54
【 15:44:08 】结算日期: 2025-02-27 14:06:37
【 15:44:08 】结算日期: 2025-02-27 17:30:04
【 15:44:08 】结算日期: 2025-02-27 17:34:31
【 15:44:08 】结算日期: 2025-02-27 17:36:51
【 15:44:08 】结算日期: 2025-03-11 17:38:32
【 15:44:08 】pendingCashout金额: 0.35
【 15:44:08 】balance金额: 0.35
【 15:44:08 】cashout金额: 15.40
【 16:00:56 】balance金额: 0.35
【 16:00:56 】cashout金额: 15.40
【 16:08:59 】用户--62模拟登录: Array
(
[token] => Bearer 702|dNQAWzFMAsgQtwMnEsJLmzBbq2XWHt0yMdkvYMT9ddcccac4
)
----------------------------------------
【2025-03-12 15:09:02】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /auto-to-commentstatus 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/auto-to-commentstatus?s=%2F%2Fauto-to-commentstatus
[headers] => Array
(
[accept] => Array
(
[0] => */*
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //auto-to-commentstatus
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:04】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /auto-to-commentstatus 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[content-type] => Array
(
[0] => text/html; charset=UTF-8
)
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:04 GMT
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9999
)
)
[body] => --ok--
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:25】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /get-invite-bj 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/get-invite-bj?s=%2F%2Fget-invite-bj
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //get-invite-bj
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:25】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /user-info 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/user-info?s=%2F%2Fuser-info
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //user-info
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:25】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /get-invite-bj 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:25 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9999
)
)
[body] => {"code":200,"message":"Success","data":{"bj":"https:\/\/amy.yyinhong.cn\/uploads\/carousel\/5dd90037b93b5e0831fed42f80b73c5a.png"}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:25】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /user-info 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:25 GMT
)
[content-type] => Array
(
[0] => application/json
)
)
[body] => {"code":403,"message":"\u672a\u901a\u8fc7\u8eab\u4efd\u9a8c\u8bc1","data":""}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:25】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /qrCode 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/qrCode?s=%2F%2FqrCode
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //qrCode
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:25】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /qrCode 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:25 GMT
)
[content-type] => Array
(
[0] => application/json
)
)
[body] => {"code":403,"message":"\u672a\u901a\u8fc7\u8eab\u4efd\u9a8c\u8bc1","data":""}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:34】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /login 【请求参数】: Array
(
[method] => POST
[url] => https://amyapi.yyinhong.cn/login?s=%2F%2Flogin
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[content-length] => Array
(
[0] => 310
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[encryptedData] => eUWZ3qP0hafHlj8RPbiqY7E/OuR0psRbuaZA0yTV7wHcFU1thGike/I9FN+0J33p5o9WLBNMNxLv0q/4E4ZOZRDL6hpgcl+LoSvrgqgshuOmpXtThRBffSw7rIgzt7pQHCdGCL4v/X1wAp0PAIessxx7/a+Do2K+2UB6UqSpB+mGpkN5zGN7E6fwQkRZvk9UtRaEsGnHLxl67zoBKj0aqA==
[iv] => xYOIosAu1/lJNjs/mIYiXg==
[code] => 0e1CiOkl20QZcf4PiTml2r8TwT2CiOk0
[s] => //login
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /login 【用户--18登录】: 返回值:HTTP/1.0 200 OK
Cache-Control: no-cache, private
Content-Type: application/json
Date: Wed, 12 Mar 2025 07:09:35 GMT
{"code":200,"message":"Success","data":{"Authorization":"Bearer 837|OAhz3Gr2aJ92sIIdwePyY8vYOJt6jF0G4wXn7Rcnbe1ade19"}}
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /login 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:35 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9998
)
)
[body] => {"code":200,"message":"Success","data":{"Authorization":"Bearer 837|OAhz3Gr2aJ92sIIdwePyY8vYOJt6jF0G4wXn7Rcnbe1ade19"}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /get-invite-bj 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/get-invite-bj?s=%2F%2Fget-invite-bj
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] => Bearer 837|OAhz3Gr2aJ92sIIdwePyY8vYOJt6jF0G4wXn7Rcnbe1ade19
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //get-invite-bj
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /user-info 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/user-info?s=%2F%2Fuser-info
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] => Bearer 837|OAhz3Gr2aJ92sIIdwePyY8vYOJt6jF0G4wXn7Rcnbe1ade19
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //user-info
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /get-invite-bj 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:35 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9997
)
)
[body] => {"code":200,"message":"Success","data":{"bj":"https:\/\/amy.yyinhong.cn\/uploads\/carousel\/5dd90037b93b5e0831fed42f80b73c5a.png"}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户ID】: 18;
【用户名称】: 小妮子;
【请求参数】: Array
(
[s] => //user-info
)
【请求路径】: /user-info 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:35 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9999
)
)
[body] => {"code":200,"message":"Success","data":{"user_id":18,"nickname":"\u5c0f\u59ae\u5b50","avatar":"https:\/\/amy.yyinhong.cn\/uploads\/20240927\/1727401855_qNNCwudWGj.jpg","phone":"15221170209","phone_sec":"152****0209","merchant_id":4,"buycode":"7095","balance":"280.23","total_revenue":"320.41","cashout":"40.18"}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /qrCode 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/qrCode?s=%2F%2FqrCode
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] => Bearer 837|OAhz3Gr2aJ92sIIdwePyY8vYOJt6jF0G4wXn7Rcnbe1ade19
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //qrCode
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:35】
【返回值:】【-----------用户信息----------】
【用户ID】: 18;
【用户名称】: 小妮子;
【请求参数】: Array
(
[s] => //qrCode
)
【请求路径】: /qrCode 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:35 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9998
)
)
[body] => {"code":200,"message":"Success","data":{"qrcode":"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAFACAIAAABC8jL9AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAIyklEQVR4nO3dTZLbVhKFUVdHj7STGks71nagNbGnboadEiqRfO+C50ztIvHDrxsRzkh8PB6Pv4BM\/1l9AMDXCRiCCRiCCRiCCRiCCRiCCRiCCRiCCRiCCRiCCRiCCRiCCRiCCRiSPc5YfbDXO47jy+frb\/9c\/clzx5zo1IX1\/8AQTMAQTMAQTMAQTMAQTMAQTMAQTMAQTMAQ7L8XftbPnz8\/Pz8v\/MBL\/Pjx48t\/exzH0CfP\/W19Fzp\/W9\/cj4+P4p+ucr\/f5JMrA\/78\/Pz+\/fuFH7hc4ul07sL97uD9zuiJR2gIJmAIJmAIJmAIJmAIJmAIJmAIJmAIduUgR21uUuc4jqH\/WD93zJ0JoQvneE6pr8b9zqhj7jf55HUB83f3mxC63xlF8AgNwQQMwQQMwQQMwQQMwQQMwQQMwQQMwQxy7Kgz87RqU1dHvXtsw6VW+xBwnvvNPN3sdF7JIzQEEzAEEzAEEzAEEzAEEzAEEzAEEzAEM8jxdYlboGpzM161evLsZfulEgn46+43EXW\/M7o9j9AQTMAQTMAQTMAQTMAQTMAQTMAQTMAQ7HWDHPXeo465nUmdXU2dN9\/VE1Gd8121T6ueplq1EyvxN\/nkdQEnjvisOua5iag9Z61WHdKGl+Isj9AQTMAQTMAQTMAQTMAQTMAQTMAQTMAQ7MpBjj33PHXM7WrqTESt2hE1N8U1d53v95t8YifWGntORNUSj\/n2PEJDMAFDMAFDMAFDMAFDMAFDMAFDMAFDsHODHHM7hFapdxet2tU0Z27rVWdOq7MD7H6\/yVPOBfxugzjvdr4dnTmtzt+++T3yCA3BBAzBBAzBBAzBBAzBBAzBBAzBBAzBPh6Px4l\/u\/HGvY7OVqTOvqW5v12lnnmqze2XmrsLtbl71DmjU0naifVe7LW6GY\/QEEzAEEzAEEzAEEzAEEzAEEzAEEzAECxjJ1bnbX31Ma96e93cBqm5twTOTXHNbcyqdX4bc3fwnEeC+hSO4xj65M73vtvf1upPnvvejj2v5BOP0BBMwBBMwBBMwBBMwBBMwBBMwBBMwBDs3CTWnnueOrNHq3ZEJf7tKp05vNqev+dT3n0nlh1RRPMIDcEEDMEEDMEEDMEEDMEEDMEEDMEEDMF2GeRYtWHostVEJ125Fen\/zc1ardpM1tmJNbfla9Uv58kuAXcmohKnqRKPuaNzsnPX6gZ3wSM0BBMwBBMwBBMwBBMwBBMwBBMwBBMwBNvl7YT1XMuebxicU88PdbZAJZrbiTX3yfUv9sIprnMBr\/rdvNXvlRt42S\/WIzQEEzAEEzAEEzAEEzAEEzAEEzAEEzAEu\/LthPXkyqrpolXbtmpz02Odabn7zbR1Zvg6V+Nl03K77MSa827btuIOeNTtr4ZHaAgmYAgmYAgmYAgmYAgmYAgmYAgmYAj28Xg8\/vzf\/vXrV\/FPO1NNne1E9YzXnLmj+u37+L59+\/blDy\/MXcn6WnV+V53v7by7cG6f1imv24mVONW0yrtdqz1PNuIueISGYAKGYAKGYAKGYAKGYAKGYAKGYAKGYFfuxJrTmcXp7LVqzgANfXJtbvdYZzJp7g7OfW9t7v6eGo60E2vK\/kM8Z626kntORG1ySB6hIZiAIZiAIZiAIZiAIZiAIZiAIZiAIdjrBjkSZ3F+u5vqy5\/cmeOZ27dUH1V9vp23Itb2\/N65nWfnPM645ivPO45jyVHV3ztn7mqsOqP72eR35REaggkYggkYggkYggkYggkYggkYggkYgl35dsJa592F9fv4OkdVq793bvvU3Nv6Oubexti5VnN3oTbXwqkkX\/d2wlpn79Em24kudL8zup9N7pFHaAgmYAgmYAgmYAgmYAgmYAgmYAgmYAh2bhKrM\/VST67MzTztOS81N3vU2R\/WMfe9c7+r2qp3cQ5OYnVsMrlyoT3P6N3eIbjnXXgZj9AQTMAQTMAQTMAQTMAQTMAQTMAQTMAQ7NwgR+ftdXMTUZ1tW3MTQrVV7x\/smHtXY+eT535XnTdIvmwebpedWHNWTQjdz9yV3PMedQ7pZWfkERqCCRiCCRiCCRiCCRiCCRiCCRiCCRiCXblSp7NDaG6upfPJtc48zdxUU62eLqrN7dPa85P3nId78rqdWB33mwGyQYpLeISGYAKGYAKGYAKGYAKGYAKGYAKGYAKGYFcOcnSmfGr1ZFLnezv7lmpzs1arNpN1dkR1dKblas05rS9\/8pVn9ODfdS7scRyrD\/8fzB1z51qtupKrrsaFZ+QRGoIJGIIJGIIJGIIJGIIJGIIJGIIJGIKdm8TqTCbtaW72aNX7B+t7tGo+rNaZiFr11stNNmZl7MRaZYc7dK25XVz3u1YRPEJDMAFDMAFDMAFDMAFDMAFDMAFDMAFDsCsHOeZ2F3XM7Wqqdd6ouOp76+mizszT3AxfZ0NYR2fr1YVHdWXAq964t6d3e+\/hKnue7MvugkdoCCZgCCZgCCZgCCZgCCZgCCZgCCZgCPa6lTqjszhL\/mv+3Nv6OjNtGw7DNSXO0nWO+bfvRvs7O7G+bu5\/Nd5tmmpPEXfBIzQEEzAEEzAEEzAEEzAEEzAEEzAEEzAEM8hRmXvzXUdnpm1uV9OqybPObqo9Z7xOEfB72XO6aO6obn++HqEhmIAhmIAhmIAhmIAhmIAhmIAhmIAhmEGONToTQqt2NXV0JsA6k2ed852bLas\/2U6sAJ1ZnD2ni2qJx9zh7YTA7wkYggkYggkYggkYggkYggkYggkYgr1ukKN+l1\/Hnu\/jq893bvvUqv1StblZqwv3Sz1ZNbV2yusCfqtBnL\/Wna\/9Um\/FIzQEEzAEEzAEEzAEEzAEEzAEEzAEEzAEu3KQI2Jy5UJz5zs387RKPWs1Nz1W67xfcm6r2Sl2Yu3o3aaLEs93k61mHqEhmIAhmIAhmIAhmIAhmIAhmIAhmIAh2MepV6EBW\/H\/wBBMwBBMwBBMwBBMwBBMwBBMwBBMwBBMwBBMwBBMwBBMwBBMwBBMwBDsfyYzhwlkhcuSAAAAAElFTkSuQmCC","filepath":"https:\/\/amyapi.yyinhong.cn\/uploads\/qrcode\/20250312\/qrcode_18.png"}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:36】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /user-share 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/user-share?s=%2F%2Fuser-share&spuid=62
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] => Bearer 837|OAhz3Gr2aJ92sIIdwePyY8vYOJt6jF0G4wXn7Rcnbe1ade19
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //user-share
[spuid] => 62
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:36】
【返回值:】【-----------用户信息----------】
【用户ID】: 18;
【用户名称】: 小妮子;
【请求参数】: Array
(
[s] => //user-share
[spuid] => 62
)
【请求路径】: /user-share 【share】: 分享人注册时间:1740636995;当前用户注册时间:1741327062
----------------------------------------
----------------------------------------
【2025-03-12 15:09:36】
【返回值:】【-----------用户信息----------】
【用户ID】: 18;
【用户名称】: 小妮子;
【请求参数】: Array
(
[s] => //user-share
[spuid] => 62
)
【请求路径】: /user-share 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:36 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9997
)
)
[body] => {"code":200,"message":"Success","data":""}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:42】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /recommend-good 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/recommend-good?s=%2F%2Frecommend-good
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //recommend-good
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:42】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /carousel 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/carousel?s=%2F%2Fcarousel
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //carousel
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:42】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /recommend-good 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:42 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9996
)
)
[body] => {"code":200,"message":"Success","data":{"total":7,"total_page":1,"list":[{"id":66,"goods_name":"\u7fbd\u8863\u58eb\u5987\u79d1\u690d\u7269\u8349\u672c\u6297\u83cc\u51dd\u80f6","is_hot":1,"dg_price":"3980.0","market_price":"3980.0","goods_price":"3980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u89c4\u683c5\u652f\/\u76d2","field3":"\u597d\u8bc410000+","field11":"\u5168\u7f51\u63a8\u4e3e","field12":"\u503c\u5f97\u62e5\u6709","field13":"\u706b\u7206\u63a8\u4e3e"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/416e10f77545f0af482b3a202fd770c1.png"},{"id":61,"goods_name":"FUYUJUN \u5973\u6027\u6291\u83cc\u7247","is_hot":1,"dg_price":"1980.0","market_price":"3980.0","goods_price":"3980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u6d4b\u8bd5\u7cbe\u51c6","field3":"\u65b9\u4fbf\u5feb\u6377"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/c462d901f2e8691275d5345d15d3c328.png"},{"id":68,"goods_name":"\u91cd\u7ec4\u2162\u578b\u4eba\u6e90\u80f6\u539f\u86cb\u767d\u51dd\u80f6","is_hot":1,"dg_price":"9800.0","market_price":"9800.0","goods_price":"9800.0","tags":{"field1":"\u6b63\u54c1","field2":"\u597d\u8bc41000+","field3":"\u8d85\u7ea7\u8d5e"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/1e747aaa1548a839065958db6ede15f3.png"},{"id":65,"goods_name":"\u9634\u9053\u586b\u585e","is_hot":1,"dg_price":"6980.0","market_price":"6980.0","goods_price":"6980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u597d\u8bc41000+"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/b300f6bb326d481a8ce886ea63a7d30c.png"},{"id":67,"goods_name":"\u518d\u9752\u6625\u5c0a\u4eab\u5957","is_hot":1,"dg_price":"4980.0","market_price":"4980.0","goods_price":"4980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u597d\u8bc41000+"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/f2301fb9823d65e1d1f23a7388a37815.png"},{"id":60,"goods_name":"HPV\u81ea\u68c0\u6d4b\u5242","is_hot":1,"dg_price":"380.0","market_price":"380.0","goods_price":"380.0","tags":{"field1":"\u6b63\u54c1","field2":"166\u4eba\u8bc4\u4ef7","field3":"\u68c0\u6d4b\u7cbe\u51c6","field4":"100\u4eba\u8d2d\u4e70","field5":"\u5206\u671f\u514d\u606f","field6":"3\u671f","field7":"\u5305\u90ae","field11":"\u5065\u5eb7\u4e13\u4eab\u4ef7\u5238\u540e","field12":"\u4f18\u60e0\u524d","field8":"\u8d60\u9001\u8d39\u9669","field9":"\u901b\u8fc7\u7684\u5e97","field13":"\u5168\u7f51\u6700\u4f4e\u6b63\u5728\u75af\u62a2","field14":"\u5e97\u94fa\u65b0\u5ba2\u51cf30","field15":"24\u5c0f\u65f6\u5185100+\u4eba\u5df2\u4e70","field16":"7\u5929\u65e0\u7406\u7531\u9000\u6362","field17":"15\u5929\u4ef7\u4fdd","field18":"\u76f4\u964d100","field19":"\u5de8\u5212\u7b97","field20":"\u76f4\u8425","field21":"\u53cc11\u72c2\u6b22\u8282","field22":"\u4e13\u5229\u6280\u672f","field23":"\u4fdd\u5bc6\u53d1\u8d27","field24":"\u5047\u4e00\u8d54\u56db","field25":"\u5c45\u5bb6\u68c0\u6d4b","field26":"\u64cd\u4f5c\u7b80\u5355","field27":"\u7ed3\u679c\u7cbe\u51c6","field28":"\u54c1\u724c\u63a8\u8350","field29":"\u660e\u661f\u63a8\u8350","field30":"\u4eba\u4fdd\u627f\u9669"},"cover_img":"https:\/\/amy.yyinhong.cn\/uploads\/goods\/20241029\/45afd74574818b4b0ae8724df5d3bb1d.png"},{"id":70,"goods_name":"0.1\u6d4b\u8bd5\u4e13\u7528","is_hot":1,"dg_price":"0.1","market_price":"0.1","goods_price":"0.1","tags":{"field1":"\u6b63\u54c1","field2":"\u89c4\u683c2\u652f\/\u76d2","field3":"\u597d\u8bc410000+","field13":"\u706b\u7206\u63a8\u4e3e"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20250311\/e909edcd9543c6cd8d5319215d83a043.png"}]}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:42】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /carousel 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:42 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9995
)
)
[body] => {"code":200,"message":"Success","data":{"info":[{"id":22,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/327b4f78cf5783dc198f783eece69099.jpg","title":"5","status":1},{"id":21,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/f0649ebdf117b1f0fc5aec4d7bf88941.jpg","title":"4","status":1},{"id":20,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/64b2dc9f26a58211c6dc2b57778786fe.jpg","title":"3","status":1},{"id":19,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/05aaedf2621d46831b629ae8e481d78c.jpg","title":"2","status":1},{"id":18,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/9a84b0f8c26883bde3dbd313412213ea.jpg","title":"1","status":1}],"is_examine":0}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:46】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /user-info 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/user-info?s=%2F%2Fuser-info
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //user-info
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:46】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /user-info 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:46 GMT
)
[content-type] => Array
(
[0] => application/json
)
)
[body] => {"code":403,"message":"\u672a\u901a\u8fc7\u8eab\u4efd\u9a8c\u8bc1","data":""}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:51】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /login 【请求参数】: Array
(
[method] => POST
[url] => https://amyapi.yyinhong.cn/login?s=%2F%2Flogin
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[content-length] => Array
(
[0] => 310
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[encryptedData] => Mo2e7kw78tnBjyF8b+n5p5cdEr+lxGFC9mfZJMF9VsaUJo3/UmR+aX0ymuawIGIgefEgIo1PuU2NJLdl6rPT7mqscBT9TTj+RISTu0KDs+zPHYgyCxlM9nVnyq40cSsDXFwrAJAyepifrdV20yqbhuYG5V9qv/CN4lZb3eOj91uZkMs24S+q170uf9w9Tq9pTJoFT0jxlxEuViBecJoGGA==
[iv] => gyXi0FbiBfYT0E32Tfe6qQ==
[code] => 0a1rFo0w3xNnx43fKw3w3e1mat4rFo0k
[s] => //login
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:51】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /login 【用户--18登录】: 返回值:HTTP/1.0 200 OK
Cache-Control: no-cache, private
Content-Type: application/json
Date: Wed, 12 Mar 2025 07:09:51 GMT
{"code":200,"message":"Success","data":{"Authorization":"Bearer 838|4kTD2hdXfUKuO2xHqMx8Gc5jPH0MQxPZLW4ZDXew96517609"}}
----------------------------------------
----------------------------------------
【2025-03-12 15:09:51】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /login 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:51 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9994
)
)
[body] => {"code":200,"message":"Success","data":{"Authorization":"Bearer 838|4kTD2hdXfUKuO2xHqMx8Gc5jPH0MQxPZLW4ZDXew96517609"}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:52】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /user-info 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/user-info?s=%2F%2Fuser-info
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] => Bearer 838|4kTD2hdXfUKuO2xHqMx8Gc5jPH0MQxPZLW4ZDXew96517609
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //user-info
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:52】
【返回值:】【-----------用户信息----------】
【用户ID】: 18;
【用户名称】: 小妮子;
【请求参数】: Array
(
[s] => //user-info
)
【请求路径】: /user-info 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:52 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9996
)
)
[body] => {"code":200,"message":"Success","data":{"user_id":18,"nickname":"\u5c0f\u59ae\u5b50","avatar":"https:\/\/amy.yyinhong.cn\/uploads\/20240927\/1727401855_qNNCwudWGj.jpg","phone":"15221170209","phone_sec":"152****0209","merchant_id":4,"buycode":"7095","balance":"280.23","total_revenue":"320.41","cashout":"40.18"}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:55】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /logout 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/logout?s=%2F%2Flogout
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] => Bearer 838|4kTD2hdXfUKuO2xHqMx8Gc5jPH0MQxPZLW4ZDXew96517609
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //logout
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:56】
【返回值:】【-----------用户信息----------】
【用户ID】: 18;
【用户名称】: 小妮子;
【请求参数】: Array
(
[s] => //logout
)
【请求路径】: /logout 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:56 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9995
)
)
[body] => {"code":200,"message":"Success","data":""}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:58】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /carousel 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/carousel?s=%2F%2Fcarousel
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //carousel
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:58】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /recommend-good 【请求参数】: Array
(
[method] => GET
[url] => https://amyapi.yyinhong.cn/recommend-good?s=%2F%2Frecommend-good
[headers] => Array
(
[accept-encoding] => Array
(
[0] => gzip, deflate, br
)
[user-agent] => Array
(
[0] => Mozilla/5.0 (Linux; Android 14; 2312DRA50C Build/UKQ1.231003.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.103 Mobile Safari/537.36 XWEB/1300409 MMWEBSDK/20241202 MMWEBID/4328 MicroMessenger/8.0.56.2800(0x2800385B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
)
[referer] => Array
(
[0] => https://servicewechat.com/wx1e817ce0a1b89375/0/page-frame.html
)
[charset] => Array
(
[0] => utf-8
)
[content-type] => Array
(
[0] => application/json
)
[authorization] => Array
(
[0] =>
)
[connection] => Array
(
[0] => keep-alive
)
[host] => Array
(
[0] => amyapi.yyinhong.cn
)
)
[body] => Array
(
[s] => //recommend-good
)
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:58】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /carousel 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:58 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9993
)
)
[body] => {"code":200,"message":"Success","data":{"info":[{"id":22,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/327b4f78cf5783dc198f783eece69099.jpg","title":"5","status":1},{"id":21,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/f0649ebdf117b1f0fc5aec4d7bf88941.jpg","title":"4","status":1},{"id":20,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/64b2dc9f26a58211c6dc2b57778786fe.jpg","title":"3","status":1},{"id":19,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/05aaedf2621d46831b629ae8e481d78c.jpg","title":"2","status":1},{"id":18,"imgUrl":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/carousel\/20241104\/9a84b0f8c26883bde3dbd313412213ea.jpg","title":"1","status":1}],"is_examine":0}}
)
----------------------------------------
----------------------------------------
【2025-03-12 15:09:58】
【返回值:】【-----------用户信息----------】
【用户信息】: 未获取到用户信息
【请求路径】: /recommend-good 【Outgoing Response】: Array
(
[status] => 200
[headers] => Array
(
[cache-control] => Array
(
[0] => no-cache, private
)
[date] => Array
(
[0] => Wed, 12 Mar 2025 07:09:58 GMT
)
[content-type] => Array
(
[0] => application/json
)
[x-ratelimit-limit] => Array
(
[0] => 10000
)
[x-ratelimit-remaining] => Array
(
[0] => 9992
)
)
[body] => {"code":200,"message":"Success","data":{"total":7,"total_page":1,"list":[{"id":66,"goods_name":"\u7fbd\u8863\u58eb\u5987\u79d1\u690d\u7269\u8349\u672c\u6297\u83cc\u51dd\u80f6","is_hot":1,"dg_price":"3980.0","market_price":"3980.0","goods_price":"3980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u89c4\u683c5\u652f\/\u76d2","field3":"\u597d\u8bc410000+","field11":"\u5168\u7f51\u63a8\u4e3e","field12":"\u503c\u5f97\u62e5\u6709","field13":"\u706b\u7206\u63a8\u4e3e"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/416e10f77545f0af482b3a202fd770c1.png"},{"id":61,"goods_name":"FUYUJUN \u5973\u6027\u6291\u83cc\u7247","is_hot":1,"dg_price":"1980.0","market_price":"3980.0","goods_price":"3980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u6d4b\u8bd5\u7cbe\u51c6","field3":"\u65b9\u4fbf\u5feb\u6377"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/c462d901f2e8691275d5345d15d3c328.png"},{"id":68,"goods_name":"\u91cd\u7ec4\u2162\u578b\u4eba\u6e90\u80f6\u539f\u86cb\u767d\u51dd\u80f6","is_hot":1,"dg_price":"9800.0","market_price":"9800.0","goods_price":"9800.0","tags":{"field1":"\u6b63\u54c1","field2":"\u597d\u8bc41000+","field3":"\u8d85\u7ea7\u8d5e"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/1e747aaa1548a839065958db6ede15f3.png"},{"id":65,"goods_name":"\u9634\u9053\u586b\u585e","is_hot":1,"dg_price":"6980.0","market_price":"6980.0","goods_price":"6980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u597d\u8bc41000+"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/b300f6bb326d481a8ce886ea63a7d30c.png"},{"id":67,"goods_name":"\u518d\u9752\u6625\u5c0a\u4eab\u5957","is_hot":1,"dg_price":"4980.0","market_price":"4980.0","goods_price":"4980.0","tags":{"field1":"\u6b63\u54c1","field2":"\u597d\u8bc41000+"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20241111\/f2301fb9823d65e1d1f23a7388a37815.png"},{"id":60,"goods_name":"HPV\u81ea\u68c0\u6d4b\u5242","is_hot":1,"dg_price":"380.0","market_price":"380.0","goods_price":"380.0","tags":{"field1":"\u6b63\u54c1","field2":"166\u4eba\u8bc4\u4ef7","field3":"\u68c0\u6d4b\u7cbe\u51c6","field4":"100\u4eba\u8d2d\u4e70","field5":"\u5206\u671f\u514d\u606f","field6":"3\u671f","field7":"\u5305\u90ae","field11":"\u5065\u5eb7\u4e13\u4eab\u4ef7\u5238\u540e","field12":"\u4f18\u60e0\u524d","field8":"\u8d60\u9001\u8d39\u9669","field9":"\u901b\u8fc7\u7684\u5e97","field13":"\u5168\u7f51\u6700\u4f4e\u6b63\u5728\u75af\u62a2","field14":"\u5e97\u94fa\u65b0\u5ba2\u51cf30","field15":"24\u5c0f\u65f6\u5185100+\u4eba\u5df2\u4e70","field16":"7\u5929\u65e0\u7406\u7531\u9000\u6362","field17":"15\u5929\u4ef7\u4fdd","field18":"\u76f4\u964d100","field19":"\u5de8\u5212\u7b97","field20":"\u76f4\u8425","field21":"\u53cc11\u72c2\u6b22\u8282","field22":"\u4e13\u5229\u6280\u672f","field23":"\u4fdd\u5bc6\u53d1\u8d27","field24":"\u5047\u4e00\u8d54\u56db","field25":"\u5c45\u5bb6\u68c0\u6d4b","field26":"\u64cd\u4f5c\u7b80\u5355","field27":"\u7ed3\u679c\u7cbe\u51c6","field28":"\u54c1\u724c\u63a8\u8350","field29":"\u660e\u661f\u63a8\u8350","field30":"\u4eba\u4fdd\u627f\u9669"},"cover_img":"https:\/\/amy.yyinhong.cn\/uploads\/goods\/20241029\/45afd74574818b4b0ae8724df5d3bb1d.png"},{"id":70,"goods_name":"0.1\u6d4b\u8bd5\u4e13\u7528","is_hot":1,"dg_price":"0.1","market_price":"0.1","goods_price":"0.1","tags":{"field1":"\u6b63\u54c1","field2":"\u89c4\u683c2\u652f\/\u76d2","field3":"\u597d\u8bc410000+","field13":"\u706b\u7206\u63a8\u4e3e"},"cover_img":"https:\/\/amy8888.oss-cn-shanghai.aliyuncs.com\/goods\/20250311\/e909edcd9543c6cd8d5319215d83a043.png"}]}}
)
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 to comment