Commit 7badbbc0 by lizhilin

更新

parent 960cbdbe
......@@ -4,18 +4,52 @@
use App\Admin\Metrics\Examples;
use App\Http\Controllers\Controller;
use App\Models\Good;
use App\Models\OrderInfo;
use Dcat\Admin\Http\Controllers\Dashboard;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Grid;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;
use Dcat\Admin\Widgets\Card;
use Dcat\Admin\Widgets\Dropdown;
use Dcat\Admin\Widgets\Box;
use Dcat\Admin\Admin;
use Dcat\Admin\Form;
class HomeController extends Controller
{
public function index(Content $content)
{
// 创建表单构建器
$form = Form::make()->action(admin_url('orderInfo'));
// 添加日期范围搜索
$form->dateRange('date', '日期范围')->default(function () {
return [
date('Y-m-d 00:00:00', strtotime('-1 day')),
date('Y-m-d 23:59:59', strtotime('-1 day'))
];
});
// 添加搜索按钮
//$form->disableResetBtn();
//$form->submit('搜索');
// 使用卡片视图展示统计数据
$card123 = Card::make('统计数据')
->content(function () use ($form) {
// 获取表单提交的日期参数
$dates = $form->getFieldValue('date');
// // 查询数据库,这里以AdminLog为例
//$logs = OrderInfo::whereBetween('created_at', $dates)->get();
// // 统计数据
// $count = $logs->count();
return "共有记录 100 条";
});
//-----
// 构建下拉菜单,当点击菜单时发起请求获取数据重新渲染图表
$menu = [
......@@ -44,18 +78,36 @@ public function index(Content $content)
->id('my-box') // 设置盒子的ID
->tool($dropdown); // 设置下拉菜单按钮
//------
//商品列表
$goodsQuery = Good::where('is_show', 0)->orderBy('created_at', 'desc');
return $content
->header('Dashboard')
->description('Description...')
->body(function (Row $row) use ($box) {
$row->column(12, function (Column $column) use ($box) {
$column->row(function (Row $row) use ($box) {
->body(function (Row $row) use ($box, $goodsQuery, $card123) {
//$row->column(12, $card123);
$row->column(12, function (Column $column) use ($box, $goodsQuery) {
$column->row(function (Row $row) use ($box, $goodsQuery) {
$row->column(6, new Examples\OrderWaitCount());
$row->column(6, new Examples\OrderPickCount());
//$row->column(12, new Examples\StoreOrderChats());
//$row->column(12, Card::make('订单信息', Examples\MyBar::make()));
$row->column(12, Card::make('订单信息', $box));
$row->column(12, new Examples\Product());
// $row->column(12, function (Column $column) use ($goodsQuery) {
// $column->row(
// Grid::make($goodsQuery, function (Grid $grid) {
// $grid->disableRefreshButton();
// $grid->disableCreateButton();
// $grid->disableActions();
// $grid->disableRowSelector();
// $grid->addTableClass(['table-text-left']);
// //$grid->simplePaginate();
// $grid->column('cover_img', '商品图片')->image('', 100, 100)->width(280);
// $grid->column('goods_name', '商品名称');
// $grid->column('sale', '销量')->width(250);
// })
// );
// });
});
});
......
......@@ -7,11 +7,14 @@
use Dcat\Admin\Grid\RowAction;
use App\Models\User;
use App\Models\UserPermission;
use Dcat\Admin\Admin;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Illuminate\Http\Request;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Widgets\Select;
class ShareController extends AdminController
{
......@@ -22,11 +25,47 @@ class ShareController extends AdminController
*/
protected function grid()
{
$uid = request()->get('id');
return Grid::make(User::with(['shuser']), function (Grid $grid) use ($uid) {
$phone = request()->get('phone') ?? ''; //->orwhere('second_spuid', $uid)
$name = request()->get('name') ?? '';
$sp_type = request()->get('sp_type') ?? '';
return Grid::make(User::with(['shuser']), function (Grid $grid) use ($uid, $phone, $name, $sp_type) {
$grid->addTableClass(['table-text-center']);
$grid->model()->where('spuid', $uid)->orwhere('second_spuid', $uid)->orderBy('created_at', 'DESC');
if ($phone && $name && $sp_type) {
if ($sp_type == 1) {
$grid->model()->where('spuid', $uid)
->where('phone', $phone)
->where('name', $name)
->orderBy('created_at', 'DESC');
} else {
$grid->model()->where('second_spuid', $uid)
->where('phone', $phone)
->where('name', $name)
->orderBy('created_at', 'DESC');
}
} else {
if ($phone) {
$grid->model()->where('spuid', $uid)
->where('phone', $phone)
->orderBy('created_at', 'DESC');
} elseif ($name) {
$grid->model()->where('spuid', $uid)
->where('name', $name)
->orderBy('created_at', 'DESC');
} elseif ($sp_type) {
if ($sp_type == 1) {
$grid->model()->where('spuid', $uid)
->orderBy('created_at', 'DESC');
} else {
$grid->model()->where('second_spuid', $uid)
->orderBy('created_at', 'DESC');
}
} else {
$grid->model()->where('spuid', $uid)->orWhere('second_spuid', $uid)
->orderBy('created_at', 'DESC');
}
}
//$grid->column('id')->sortable();
$grid->column('name', '昵称');
$grid->column('phone', '手机号');
......@@ -43,24 +82,29 @@ protected function grid()
$grid->disableRowSelector();
//$grid->simplePaginate();
$grid->filter(function (Grid\Filter $filter) {
$grid->filter(function (Grid\Filter $filter) use ($uid) {
// 更改为 panel 布局
$filter->panel();
$filter->like('name', '昵称')->width(3);
$filter->like('phone', '用户手机号')->width(3);
$filter->equal('custom_field', '自定义字段')->select(['1' => '直推', '2' => '间推'])->where(function ($query) {
// 自定义查询逻辑
$sp_type = request('sp_type');
if ($sp_type == 1) {
$query->where('spuid', $sp_type);
} else {
$query->where('second_spuid', $sp_type);
}
});
$filter->where('sp_type', function ($query) use ($uid) {}, '选项')->select(['1' => '直推', '2' => '间推'])->width(3);
//$filter->between('created_at', '注册时间')->datetime()->width(4);
});
});
}
protected function getCustomFilterScript()
{
return <<<JS
$('select[name="status"]').change(function() {
var value = $(this).val();
console.log('asdfadf'+value);
Dcat.getData().filter('#your_custom_filter_field', 'value');
});
JS;
}
/**
* Make a show builder.
......
......@@ -37,6 +37,13 @@ public function handle(array $input)
$aftercode = trim($input['buycode']); //修改后直购码
$uid = trim($input['userid']);
$uObj = User::find($uid);
if (!is_numeric($aftercode)) {
throw new Exception('该直购码不是数字!');
}
$isExist = Merchant::where('buycode', $aftercode)->count();
if (!$isExist) {
throw new Exception('该直购码错误!');
}
if ($uObj) {
if (!$uObj->buycode) {
throw new Exception('该用户还没绑定直购码!');
......@@ -62,7 +69,7 @@ public function handle(array $input)
public function form()
{
$this->display('current', '当前直购码');
$this->text('buycode', '修改直购码')->help('输入4位随机数字');
$this->text('buycode', '修改直购码')->help('输入商家直购码');
$this->hidden('userid');
}
......
......@@ -39,6 +39,7 @@ public function handle(array $input)
//商品库存信息
$msgObj = MerchantGoodsStore::find($mgs_id);
$merchant_id = $msgObj->merchant_id;
$goods_id = $msgObj->goods_id;
$logData = [];
foreach ($attr_ids as $kk => $vv) {
......
......@@ -52,7 +52,7 @@ public function handle(array $input)
//记录操作日志
$logData[$kk]['mgs_id'] = $mgs_id;
$logData[$kk]['attr_id'] = $skuObj->attr_id;
$logData[$kk]['goods_id'] = $goods_id;
$logData[$kk]['goods_id'] = $skuObj->goods_id;
$logData[$kk]['change'] = -$store_num;
$logData[$kk]['created_at'] = date('Y-m-d H:i:s');
}
......
......@@ -81,7 +81,7 @@ public function handle(Request $request)
$this->withChart($data['list']);
break;
default:
$data = OrderInfo::getNumDayData(7, [3, 4]);
$data = OrderInfo::getNumDayData(1, [3, 4]);
// 卡片内容
$this->withContent($data['total']);
// 图表数据
......
......@@ -2,10 +2,13 @@
namespace App\Admin\Metrics\Examples;
use App\Models\User;
use Dcat\Admin\Widgets\Metrics\Round;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Dcat\Admin\Widgets\Metrics\Line;
use Dcat\Admin\Widgets\Card;
use Dcat\Admin\Widgets\Table;
class Product extends Line
{
......@@ -41,7 +44,7 @@ public function handle(Request $request)
case '28':
case '7':
default:
$list = DB::table('li_goods')->where('is_show', 1)->orderBy('sale', 'desc')->limit(10)->get();
$list = DB::table('li_goods')->where('is_show', 1)->where('sale', '>', 0)->orderBy('sale', 'desc')->limit(10)->get();
$html = '';
foreach ($list as $kk => $vv) {
$html .= '<tr>';
......@@ -87,6 +90,14 @@ public function withChart(array $data)
*/
public function withContent($finished, $dataList)
{
// $card2 = Card::make('自定义数据列表2')
// ->content(Table::make(User::query(), function ($table) {
// // 自定义列表字段
// $table->columns('id', 'email', 'created_at');
// // 启用分页
// $table->paginate(10);
// }));
return $this->content(
<<<HTML
<div class="col-sm-12 d-flex flex-column flex-wrap text-center">
......
......@@ -8,7 +8,7 @@
class ArticleController extends BaseController
{
public function getList()
public function getList(Request $request)
{
$page = $request->page ?? 1;
$limit = $request->limit ?? 10;
......
......@@ -81,6 +81,7 @@ public function login(Request $request)
$res = $this->decryptData($session_key, $encryptedData, $iv, $data);
if ($res != 0) {
Log::add('登录截取结果', $res);
return $this->JsonResponse('', '参数异常', 201);
}
$user = User::where(['phone' => $data->phoneNumber])->first();
......
......@@ -98,6 +98,10 @@ public function CreateBuyOrder(Request $request)
$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 && $merchant_id) ? $arrObj->cg_price : $arrObj->market_price;
......@@ -198,6 +202,10 @@ public function CreateOrder(Request $request)
if (!$goodsObj || !$skuObj) {
unset($shoppingCart[$key]);
continue;
} else {
if ($skuObj->stock < $cartRow['num']) {
return $this->JsonResponse('', '该商品库存不足!', 500);
}
}
$goods_price = $merchant_id ? $skuObj->cg_price : $skuObj->market_price;
$goods_img = isset($goodsObj->cover_img) ? $goodsObj->cover_img : '';
......@@ -378,12 +386,41 @@ public function canceOrder(Request $request)
}
DB::beginTransaction();
try {
//代发货订单--退款
if ($model->order_status == 1 && $model->order_amount > 0) {
// $order_sn = $model->order_sn;
// $refundMoney = $model->order_amount;
// $refund_no = date("YmdHis"); //退单号
// $result = AliPay::refund($order_sn, $refundMoney, $refund_no);
//代到货订单--退库存
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();
......@@ -446,41 +483,7 @@ public function scanCodeVerifi(Request $request)
$orderObj->verifier_id = $verObj->id;
$orderObj->verifier = $verObj->name;
$orderObj->verification_at = date("Y-m-d H:i:s");
if ($orderObj->save()) {
//更新商品销量、库存
$goodsList = OrderGoods::where("order_id", $orderObj->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) > 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();
}
}
}
$orderObj->save();
} else {
return $this->JsonResponse('', '该码已核销,无需多次重复扫码', 500);
}
......@@ -501,13 +504,12 @@ public function scanCodeDetail(Request $request)
$order_goods = $this->getOrderGoods($order_id);
//快递待收点、收货地址
$delivery = [];
if ($orderObj->address_id) {
$addressObj = UserAddress::find($orderObj->address_id);
$delivery['contacts'] = $addressObj->consignee;
$delivery['phone'] = $addressObj->phone;
$delivery['area'] = $addressObj->area;
$delivery['lat'] = $addressObj->lat;
$delivery['lng'] = $addressObj->lng;
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);
......@@ -599,11 +601,13 @@ private function getOrderGoods($oid)
$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 ? env('IMAGE_URL') . $valObj->goods_img : '';
array_push($order_goods, $tmp);
}
......@@ -652,9 +656,9 @@ public function orderCollect(Request $request)
$lastDayOfMonth = date("Y-m-t 23:59:59", time());
//本月数据统计
$currentMonth = [];
$currentMonth['buyCount'] = OrderInfoModel::where($where)->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->count();
$currentMonth['pickedCount'] = OrderInfoModel::where($where)->whereIn('order_status', [3, 4])->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->count();
$currentMonth['waitCount'] = OrderInfoModel::where($where)->where("order_status", 2)->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->count();
$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;
......@@ -663,9 +667,9 @@ public function orderCollect(Request $request)
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)->whereBetween('created_at', [$firstDayOfLastMonth, $ninthDayOfLastMonth])->count();
$lastMonth['pickedCount'] = OrderInfoModel::where($where)->whereIn('order_status', [3, 4])->whereBetween('created_at', [$firstDayOfLastMonth, $ninthDayOfLastMonth])->count();
$lastMonth['waitCount'] = OrderInfoModel::where($where)->where("order_status", 2)->whereBetween('created_at', [$firstDayOfLastMonth, $ninthDayOfLastMonth])->count();
$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)->whereBetween('created_at', [$firstDayOfMonth, $lastDayOfMonth])->sum('goods_number');
$lastMonth['stockCount'] = $goods_number + $currentStock;
......
......@@ -18,7 +18,9 @@ public function getList(Request $request)
if (!in_array($type, [1, 2, 3])) {
return $this->JsonResponse('', '参数错误', 201);
}
$sql = OrderDivideRecord::where(['um_id' => $request->user()->id, 'sh_type' => $type, 'deleted_at' => null]);
$userObj = $request->user();
$um_id = ($type == 3) ? $userObj->merchant_id : $userObj->id;
$sql = OrderDivideRecord::where(['um_id' => $um_id, 'sh_type' => $type, 'deleted_at' => null]);
$total = $sql->count();
$data = [
......
......@@ -23,13 +23,16 @@ public function getDeliveryList(Request $request)
$mid = $request->user()->merchant_id;
$lat1 = $request->lat ?? '';
$lng1 = $request->lng ?? '';
$list = Store::where(['merchant_id' => $mid])
->select(['id', 'title', 'lat_lng', 'address', 'contacts', 'phone'])->get();
foreach ($list as $key => $val) {
$atng = $val->lat_lng ? explode(',', $val->lat_lng) : [];
$lat2 = $atng[1];
$lng2 = $atng[0];
$list[$key]['distance'] = ($lat1 && $lat2) ? $this->haversineDistance($lat1, $lng1, $lat2, $lng2) : '';
$list = [];
if ($mid) {
$list = Store::where(['merchant_id' => $mid])
->select(['id', 'title', 'lat_lng', 'address', 'contacts', 'phone'])->get();
foreach ($list as $key => $val) {
$atng = $val->lat_lng ? explode(',', $val->lat_lng) : [];
$lat2 = $atng[1];
$lng2 = $atng[0];
$list[$key]['distance'] = ($lat1 && $lat2) ? $this->haversineDistance($lat1, $lng1, $lat2, $lng2) : '';
}
}
return $this->JsonResponse($list);
......
......@@ -5,6 +5,8 @@
use App\Command\Log;
use EasyWeChat\Factory;
use Illuminate\Support\Facades\DB;
use App\Models\Good as GoodModel;
use App\Models\GoodSku;
class Pay
{
......@@ -74,7 +76,41 @@ public static function payNotify($fields = [])
if ($orderObj->pay_status == 0) {
$orderObj->order_status = 1;
$orderObj->pay_status = 1;
$orderObj->save();
if ($orderObj->save()) {
//更新商品销量、库存
$goodsList = OrderGoods::where("order_id", $orderObj->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) >= 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();
......
<?php
namespace App\Models;
use WeChatPay\Builder;
......@@ -31,14 +32,14 @@ public function __construct()
// v3api秘钥
$this->v3_key = env('WX_XCX_MCH_KEY_V3');
// 「商户API证书」的「证书序列号」 商户平台【API安全】->【API证书】->【查看证书】,可查看商户API证书序列号
$this->merchantCertificateSerial = '45A5D415AAB9AAAF37E7336CE582B4D980CF6B9B';
$this->merchantCertificateSerial = '75BFCD14831525581A301D0CD190330606153F0E';
// 商户API私钥
//$this->merchantPrivateKeyFilePath = $pay_config['apiclient_key']; //"file://"
$this->merchantPrivateKeyFilePath = "file://" .public_path().'/cert/apiclient_key.pem'; //
$this->merchantPrivateKeyFilePath = "file://" . public_path() . '/cert/apiclient_key.pem'; //
;
// 微信支付平台证书 首次通过命令行生成 https://github.com/wechatpay-apiv3/wechatpay-php/tree/main/bin
//$this->platformCertificateFilePath = $pay_config['apiclient_cert'];
$this->platformCertificateFilePath ="file:///www/wwwroot/pz/public/cert//wechatpay_4F2000519B652DAF957614D1D6E7879E40DA6EC3.pem" ;
$this->platformCertificateFilePath = "file://" . public_path() . "/cert//wechatpay_38D2255A4177BE40747CE1ECAF6ED0812E7D00C8.pem";
// 构建客户端实例
$this->instance = $this->buildInstance();
......@@ -61,7 +62,7 @@ public function transfer(string $batch_sn, string $out_detail_no, float $money,
{
$trans_detail = [
'out_detail_no' => $out_detail_no,
'transfer_amount' => intval($money*100) ,
'transfer_amount' => intval($money * 100),
'transfer_remark' => $remark,
'openid' => $openid,
];
......@@ -77,7 +78,7 @@ public function transfer(string $batch_sn, string $out_detail_no, float $money,
'out_batch_no' => $batch_sn,
'batch_name' => '提现转账',
'batch_remark' => '提现转账',
'total_amount' => intval($money*100),
'total_amount' => intval($money * 100),
'total_num' => 1,
'transfer_detail_list' => [
$trans_detail
......
......@@ -73,4 +73,15 @@ public static function getYearData()
}
return $data;
}
public function getCustomFieldOptionsAttribute()
{
// 这里你可以自定义查询来获取你想要的option值
// 例如从关联表或者缓存中获取
return [
'option1' => '显示值1',
'option2' => '显示值2',
// 更多选项...
];
}
}
......@@ -23,13 +23,14 @@
"league/flysystem": "^3.15",
"lty5240/dcat-easy-sku": "^1.1",
"maatwebsite/excel": "~3.1.0",
"overtrue/wechat": "~5.0",
"phpoffice/phpspreadsheet": "^1.29",
"predis/predis": "^2.1",
"qcloud/cos-sdk-v5": "^2.6",
"qcloudsms/qcloudsms_php": "^0.1.4",
"simplesoftwareio/simple-qrcode": "^4.2",
"slowlyo/dcat-diy-form": "^2.2",
"overtrue/wechat": "~5.0",
"wechatpay/wechatpay": "^1.4",
"zhy/dcat-admin-sku": "dev-master"
},
"require-dev": {
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1a269a05eaffae2ee47ca06c03c04682",
"content-hash": "2de385384bfeb7aaa53fa17945063127",
"packages": [
{
"name": "abbotton/dcat-sku-plus",
......@@ -213,16 +213,16 @@
},
{
"name": "alibabacloud/darabonba-openapi",
"version": "0.2.12",
"version": "0.2.13",
"source": {
"type": "git",
"url": "https://github.com/alibabacloud-sdk-php/darabonba-openapi.git",
"reference": "11617627ba6cf012732e7d9e165328ebaef2bc74"
"reference": "0213396384e2c064eefd614f3dd53636a63f987f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/alibabacloud-sdk-php/darabonba-openapi/zipball/11617627ba6cf012732e7d9e165328ebaef2bc74",
"reference": "11617627ba6cf012732e7d9e165328ebaef2bc74",
"url": "https://api.github.com/repos/alibabacloud-sdk-php/darabonba-openapi/zipball/0213396384e2c064eefd614f3dd53636a63f987f",
"reference": "0213396384e2c064eefd614f3dd53636a63f987f",
"shasum": "",
"mirrors": [
{
......@@ -235,7 +235,7 @@
"alibabacloud/credentials": "^1.1",
"alibabacloud/gateway-spi": "^1",
"alibabacloud/openapi-util": "^0.1.10|^0.2.1",
"alibabacloud/tea-utils": "^0.2.20",
"alibabacloud/tea-utils": "^0.2.21",
"alibabacloud/tea-xml": "^0.2",
"php": ">5.5"
},
......@@ -258,9 +258,9 @@
"description": "Alibaba Cloud OpenApi Client",
"support": {
"issues": "https://github.com/alibabacloud-sdk-php/darabonba-openapi/issues",
"source": "https://github.com/alibabacloud-sdk-php/darabonba-openapi/tree/0.2.12"
"source": "https://github.com/alibabacloud-sdk-php/darabonba-openapi/tree/0.2.13"
},
"time": "2024-06-21T09:46:09+00:00"
"time": "2024-07-15T13:11:36+00:00"
},
{
"name": "alibabacloud/dysmsapi-20170525",
......@@ -3247,16 +3247,16 @@
},
{
"name": "laravel/serializable-closure",
"version": "v1.3.3",
"version": "v1.3.4",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
"reference": "3dbf8a8e914634c48d389c1234552666b3d43754"
"reference": "61b87392d986dc49ad5ef64e75b1ff5fee24ef81"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754",
"reference": "3dbf8a8e914634c48d389c1234552666b3d43754",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/61b87392d986dc49ad5ef64e75b1ff5fee24ef81",
"reference": "61b87392d986dc49ad5ef64e75b1ff5fee24ef81",
"shasum": "",
"mirrors": [
{
......@@ -3269,10 +3269,11 @@
"php": "^7.3|^8.0"
},
"require-dev": {
"nesbot/carbon": "^2.61",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
"nesbot/carbon": "^2.61|^3.0",
"pestphp/pest": "^1.21.3",
"phpstan/phpstan": "^1.8.2",
"symfony/var-dumper": "^5.4.11"
"symfony/var-dumper": "^5.4.11|^6.2.0|^7.0.0"
},
"type": "library",
"extra": {
......@@ -3309,7 +3310,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
"time": "2023-11-08T14:08:06+00:00"
"time": "2024-08-02T07:48:17+00:00"
},
{
"name": "laravel/tinker",
......@@ -3585,16 +3586,16 @@
},
{
"name": "league/flysystem",
"version": "3.28.0",
"version": "3.29.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c"
"reference": "0adc0d9a51852e170e0028a60bd271726626d3f0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c",
"reference": "e611adab2b1ae2e3072fa72d62c62f52c2bf1f0c",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0adc0d9a51852e170e0028a60bd271726626d3f0",
"reference": "0adc0d9a51852e170e0028a60bd271726626d3f0",
"shasum": "",
"mirrors": [
{
......@@ -3668,22 +3669,22 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/3.28.0"
"source": "https://github.com/thephpleague/flysystem/tree/3.29.0"
},
"time": "2024-05-22T10:09:12+00:00"
"time": "2024-09-29T11:59:11+00:00"
},
{
"name": "league/flysystem-local",
"version": "3.28.0",
"version": "3.29.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem-local.git",
"reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40"
"reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/13f22ea8be526ea58c2ddff9e158ef7c296e4f40",
"reference": "13f22ea8be526ea58c2ddff9e158ef7c296e4f40",
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e0e8d52ce4b2ed154148453d321e97c8e931bd27",
"reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27",
"shasum": "",
"mirrors": [
{
......@@ -3723,9 +3724,9 @@
"local"
],
"support": {
"source": "https://github.com/thephpleague/flysystem-local/tree/3.28.0"
"source": "https://github.com/thephpleague/flysystem-local/tree/3.29.0"
},
"time": "2024-05-06T20:05:52+00:00"
"time": "2024-08-09T21:24:39+00:00"
},
{
"name": "league/mime-type-detection",
......@@ -4585,16 +4586,16 @@
},
{
"name": "nikic/php-parser",
"version": "v5.1.0",
"version": "v5.3.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1"
"reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1",
"reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3abf7425cd284141dc5d8d14a9ee444de3345d1a",
"reference": "3abf7425cd284141dc5d8d14a9ee444de3345d1a",
"shasum": "",
"mirrors": [
{
......@@ -4643,9 +4644,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0"
"source": "https://github.com/nikic/PHP-Parser/tree/v5.3.0"
},
"time": "2024-07-01T20:03:41+00:00"
"time": "2024-09-29T13:56:26+00:00"
},
{
"name": "nunomaduro/termwind",
......@@ -4918,16 +4919,16 @@
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.29.0",
"version": "1.29.2",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0"
"reference": "3a5a818d7d3e4b5bd2e56fb9de44dbded6eae07f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/3a5a818d7d3e4b5bd2e56fb9de44dbded6eae07f",
"reference": "3a5a818d7d3e4b5bd2e56fb9de44dbded6eae07f",
"shasum": "",
"mirrors": [
{
......@@ -4968,7 +4969,7 @@
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.0 || ^10.0",
"phpunit/phpunit": "^8.5 || ^9.0",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
......@@ -5023,9 +5024,9 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0"
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.2"
},
"time": "2023-06-14T22:48:31+00:00"
"time": "2024-09-29T07:04:47+00:00"
},
{
"name": "phpoption/phpoption",
......@@ -7227,16 +7228,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.4.8",
"version": "v6.4.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "27de8cc95e11db7a50b027e71caaab9024545947"
"reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/27de8cc95e11db7a50b027e71caaab9024545947",
"reference": "27de8cc95e11db7a50b027e71caaab9024545947",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/117f1f20a7ade7bcea28b861fb79160a21a1e37b",
"reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b",
"shasum": "",
"mirrors": [
{
......@@ -7290,7 +7291,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.4.8"
"source": "https://github.com/symfony/http-foundation/tree/v6.4.10"
},
"funding": [
{
......@@ -7306,20 +7307,20 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:49:08+00:00"
"time": "2024-07-26T12:36:27+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v6.4.8",
"version": "v6.4.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1"
"reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1",
"reference": "6c519aa3f32adcfd1d1f18d923f6b227d9acf3c1",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/1ba6b89d781cb47448155cc70dd2e0f1b0584c79",
"reference": "1ba6b89d781cb47448155cc70dd2e0f1b0584c79",
"shasum": "",
"mirrors": [
{
......@@ -7410,7 +7411,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.4.8"
"source": "https://github.com/symfony/http-kernel/tree/v6.4.11"
},
"funding": [
{
......@@ -7426,7 +7427,7 @@
"type": "tidelift"
}
],
"time": "2024-06-02T16:06:25+00:00"
"time": "2024-08-30T16:57:20+00:00"
},
{
"name": "symfony/mailer",
......@@ -8453,16 +8454,16 @@
},
{
"name": "symfony/routing",
"version": "v6.4.8",
"version": "v6.4.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58"
"reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58",
"reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58",
"url": "https://api.github.com/repos/symfony/routing/zipball/8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a",
"reference": "8ee0c24c1bf61c263a26f1b9b6d19e83b1121f2a",
"shasum": "",
"mirrors": [
{
......@@ -8522,7 +8523,7 @@
"url"
],
"support": {
"source": "https://github.com/symfony/routing/tree/v6.4.8"
"source": "https://github.com/symfony/routing/tree/v6.4.11"
},
"funding": [
{
......@@ -8538,7 +8539,7 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:49:08+00:00"
"time": "2024-08-29T08:15:38+00:00"
},
{
"name": "symfony/service-contracts",
......@@ -8630,16 +8631,16 @@
},
{
"name": "symfony/string",
"version": "v7.1.2",
"version": "v7.1.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8"
"reference": "6cd670a6d968eaeb1c77c2e76091c45c56bc367b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/14221089ac66cf82e3cf3d1c1da65de305587ff8",
"reference": "14221089ac66cf82e3cf3d1c1da65de305587ff8",
"url": "https://api.github.com/repos/symfony/string/zipball/6cd670a6d968eaeb1c77c2e76091c45c56bc367b",
"reference": "6cd670a6d968eaeb1c77c2e76091c45c56bc367b",
"shasum": "",
"mirrors": [
{
......@@ -8703,7 +8704,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v7.1.2"
"source": "https://github.com/symfony/string/tree/v7.1.4"
},
"funding": [
{
......@@ -8719,7 +8720,7 @@
"type": "tidelift"
}
],
"time": "2024-06-28T09:27:18+00:00"
"time": "2024-08-12T09:59:40+00:00"
},
{
"name": "symfony/translation",
......@@ -8908,16 +8909,16 @@
},
{
"name": "symfony/uid",
"version": "v6.4.8",
"version": "v6.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/uid.git",
"reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf"
"reference": "2f16054e0a9b194b8ca581d4a64eee3f7d4a9d4d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/uid/zipball/35904eca37a84bb764c560cbfcac9f0ac2bcdbdf",
"reference": "35904eca37a84bb764c560cbfcac9f0ac2bcdbdf",
"url": "https://api.github.com/repos/symfony/uid/zipball/2f16054e0a9b194b8ca581d4a64eee3f7d4a9d4d",
"reference": "2f16054e0a9b194b8ca581d4a64eee3f7d4a9d4d",
"shasum": "",
"mirrors": [
{
......@@ -8968,7 +8969,7 @@
"uuid"
],
"support": {
"source": "https://github.com/symfony/uid/tree/v6.4.8"
"source": "https://github.com/symfony/uid/tree/v6.4.12"
},
"funding": [
{
......@@ -8984,7 +8985,7 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:49:08+00:00"
"time": "2024-09-20T08:32:26+00:00"
},
{
"name": "symfony/var-dumper",
......@@ -9453,6 +9454,79 @@
"time": "2022-06-03T18:03:27+00:00"
},
{
"name": "wechatpay/wechatpay",
"version": "1.4.10",
"source": {
"type": "git",
"url": "https://github.com/wechatpay-apiv3/wechatpay-php.git",
"reference": "9c364872bd2063bf3f10efc3765e96e3e1b20e2e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wechatpay-apiv3/wechatpay-php/zipball/9c364872bd2063bf3f10efc3765e96e3e1b20e2e",
"reference": "9c364872bd2063bf3f10efc3765e96e3e1b20e2e",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-curl": "*",
"ext-libxml": "*",
"ext-openssl": "*",
"ext-simplexml": "*",
"guzzlehttp/guzzle": "^6.5 || ^7.0",
"guzzlehttp/uri-template": "^0.2 || ^1.0",
"php": ">=7.1.2"
},
"require-dev": {
"phpstan/phpstan": "^0.12.89 || ^1.0",
"phpunit/phpunit": "^7.5 || ^8.5.16 || ^9.3.5"
},
"bin": [
"bin/CertificateDownloader.php"
],
"type": "library",
"autoload": {
"psr-4": {
"WeChatPay\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "James ZHANG",
"homepage": "https://github.com/TheNorthMemory"
},
{
"name": "WeChatPay Community",
"homepage": "https://developers.weixin.qq.com/community/pay"
}
],
"description": "[A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP",
"homepage": "https://pay.weixin.qq.com/",
"keywords": [
"AES-GCM",
"aes-ecb",
"openapi-chainable",
"rsa-oaep",
"wechatpay",
"xml-builder",
"xml-parser"
],
"support": {
"issues": "https://github.com/wechatpay-apiv3/wechatpay-php/issues",
"source": "https://github.com/wechatpay-apiv3/wechatpay-php/tree/v1.4.10"
},
"time": "2024-09-19T04:22:06+00:00"
},
{
"name": "zhy/dcat-admin-sku",
"version": "dev-master",
"source": {
......@@ -9663,16 +9737,16 @@
},
{
"name": "filp/whoops",
"version": "2.15.4",
"version": "2.16.0",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546"
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546",
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546",
"url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2",
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2",
"shasum": "",
"mirrors": [
{
......@@ -9682,13 +9756,13 @@
]
},
"require": {
"php": "^5.5.9 || ^7.0 || ^8.0",
"php": "^7.1 || ^8.0",
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
},
"require-dev": {
"mockery/mockery": "^0.9 || ^1.0",
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3",
"symfony/var-dumper": "^4.0 || ^5.0"
},
"suggest": {
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
......@@ -9728,7 +9802,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.15.4"
"source": "https://github.com/filp/whoops/tree/2.16.0"
},
"funding": [
{
......@@ -9736,7 +9810,7 @@
"type": "github"
}
],
"time": "2023-11-03T12:00:00+00:00"
"time": "2024-09-25T12:00:00+00:00"
},
{
"name": "hamcrest/hamcrest-php",
......@@ -9797,16 +9871,16 @@
},
{
"name": "laravel/pint",
"version": "v1.17.1",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "b5b6f716db298671c1dfea5b1082ec2c0ae7064f"
"reference": "35c00c05ec43e6b46d295efc0f4386ceb30d50d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/b5b6f716db298671c1dfea5b1082ec2c0ae7064f",
"reference": "b5b6f716db298671c1dfea5b1082ec2c0ae7064f",
"url": "https://api.github.com/repos/laravel/pint/zipball/35c00c05ec43e6b46d295efc0f4386ceb30d50d9",
"reference": "35c00c05ec43e6b46d295efc0f4386ceb30d50d9",
"shasum": "",
"mirrors": [
{
......@@ -9823,13 +9897,13 @@
"php": "^8.1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.59.3",
"illuminate/view": "^10.48.12",
"larastan/larastan": "^2.9.7",
"friendsofphp/php-cs-fixer": "^3.64.0",
"illuminate/view": "^10.48.20",
"larastan/larastan": "^2.9.8",
"laravel-zero/framework": "^10.4.0",
"mockery/mockery": "^1.6.12",
"nunomaduro/termwind": "^1.15.1",
"pestphp/pest": "^2.34.8"
"pestphp/pest": "^2.35.1"
},
"bin": [
"builds/pint"
......@@ -9865,20 +9939,20 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2024-08-01T09:06:33+00:00"
"time": "2024-09-24T17:22:50+00:00"
},
{
"name": "laravel/sail",
"version": "v1.30.1",
"version": "v1.33.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
"reference": "8ba049b6c06e0330b6aa1fb7af2746fb4da445e4"
"reference": "d54af9d5745e3680d8a6463ffd9f314aa53eb2d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/8ba049b6c06e0330b6aa1fb7af2746fb4da445e4",
"reference": "8ba049b6c06e0330b6aa1fb7af2746fb4da445e4",
"url": "https://api.github.com/repos/laravel/sail/zipball/d54af9d5745e3680d8a6463ffd9f314aa53eb2d1",
"reference": "d54af9d5745e3680d8a6463ffd9f314aa53eb2d1",
"shasum": "",
"mirrors": [
{
......@@ -9934,7 +10008,7 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
"time": "2024-07-01T20:55:03+00:00"
"time": "2024-09-22T19:04:21+00:00"
},
{
"name": "mockery/mockery",
......
<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>
<form id="form-table" action="" method="get" class="form-horizontal" accept-charset="UTF-8" pjax-container="1">
<div class="row">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th width="20%" style="text-align:center;">商品名称</th>
<th width="20%" style="text-align:center;">商品规格</th>
<th width="20%" style="text-align:center;">增加库存</th>
<th width="20%" style="text-align:center;">剩余库存</th>
</tr>
</thead>
<tbody>
<!-- 表格数据 -->
<tr>
<td style="text-align:center;vertical-align: middle;">数据1</td>
<td style="text-align:center;vertical-align: middle;">蓝色、大号</td>
<td><input type="text" name="remark" value="" class="form-control field_remark _normal_" placeholder=""></td>
<td style="text-align:center;vertical-align: middle;">123</td>
</tr>
<!-- 更多行数据 -->
</tbody>
</table>
</div>
<div class="col-md-8"><button type="button" id="submit-form" class="btn btn-primary pull-right"><i class="feather icon-save"></i> 提交</button></div>
</div>
</form>
<!--<form id="login-form" method="POST" action="{{ admin_url('auth/login') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<fieldset class="form-label-group form-group position-relative has-icon-left">
<input
type="text"
class="form-control {{ $errors->has('username') ? 'is-invalid' : '' }}"
name="username"
placeholder="{{ trans('admin.username') }}"
value=""
required
autofocus>
<div class="form-control-position">
<i class="feather icon-user"></i>
</div>
<label for="email">{{ trans('admin.username') }}</label>
<div class="help-block with-errors"></div>
@if($errors->has('username'))
<span class="invalid-feedback text-danger" role="alert">
@foreach($errors->get('username') as $message)
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> {{$message}}</span><br>
@endforeach
</span>
@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 {{ $errors->has('password') ? 'is-invalid' : '' }}"
name="password"
placeholder="{{ trans('admin.password') }}"
required
value=""
autocomplete="current-password">
<div class="form-control-position">
<i class="feather icon-lock"></i>
</div>
<label for="password">{{ trans('admin.password') }}</label>
<div class="help-block with-errors"></div>
@if($errors->has('password'))
<span class="invalid-feedback text-danger" role="alert">
@foreach($errors->get('password') as $message)
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> {{$message}}</span><br>
@endforeach
</span>
@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" {{ old('remember') ? 'checked' : '' }}>
<span class="vs-checkbox">
<span class="vs-checkbox--check">
<i class="vs-icon feather icon-check"></i>
</span>
</span>
<span> {{ trans('admin.remember_me') }}</span>
</div>
</fieldset>
</div>
</div>
<button type="submit" class="btn btn-primary float-right login-btn">
{{ __('admin.login') }}
&nbsp;
<i class="feather icon-arrow-right"></i>
</button>
</form>-->
<script>
Dcat.ready(function() {
// ajax表单提交
$('#login-form').form({
validate: true,
});
// 前端 JS 代码处理异步提交
});
</script>
<script data-exec-on-popstate="">
(function() {
try {
Dcat.wait()
} catch (e) {
console.error(e)
}
})();
Dcat.ready(function() {
try {
Dcat.token = "GQ11udjNxjua45vZwdgc5AlhnAGg0NQ7RKkEE1bx";;
$("#form-41c1e3EN").form({
validate: true,
confirm: [],
validationErrorToastr: true,
success: function(data) {
},
error: function(response) {
}
});
} catch (e) {
console.error(e)
}
})
</script>
\ No newline at end of file
......@@ -43,7 +43,7 @@
Route::get('get-cate-list', 'CategoryController@getList'); //一级分类列表
Route::get('article-list', 'ArticleController@getList'); //文章列表
Route::post('article-list', 'ArticleController@getList'); //文章列表
Route::get('article-detail', 'ArticleController@getDetail'); //文章详情
// Route::get('get-seccate-list', 'CategoryController@getSecList'); //二级分类列表
......
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