chore: 添加静态资源文件和版本配置文件

添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材
添加系统版本配置文件(.version)和常量定义文件(.constant)
更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件
添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
2026-03-06 20:14:23 +08:00
commit c9a98f342c
4485 changed files with 490986 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\controller\api\v2\order;
use app\services\order\StoreCartServices;
use app\Request;
use think\annotation\Inject;
class StoreCart
{
/**
* @var StoreCartServices
*/
#[Inject]
protected StoreCartServices $services;
/**
* 购物车重选
* @param Request $request
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function resetCart(Request $request)
{
[$id, $unique, $num, $product_id] = $request->postMore([
['id', 0],
['unique', ''],
['num', 1],
['product_id', 0]
], true);
$this->services->resetCart((int)$id, (int)$request->uid(), (int)$product_id, $unique, (int)$num);
return app('json')->successful('修改成功');
}
/**
* 获取用户购物车
* @param Request $request
* @return mixed
*/
public function getCartList(Request $request)
{
$uid = (int)$request->uid();
[$store_id] = $request->postMore([
['store_id', 0]
], true);
$data = $this->services->getCartList(['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0, 'type' => 0, 'is_channel' => 0, 'is_send_gift' => 0], 0, 0, ['productInfo', 'attrInfo']);
if ($store_id) $this->services->setItem('store_id', (int)$store_id);
[$data, $valid, $invalid] = $this->services->handleCartList($uid, $data, [], -1);
return app('json')->successful($valid);
}
/**
* 首页加入购物车
* @param Request $request
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function setCartNum(Request $request)
{
[$product_id, $num, $unique, $type, $is_channel, $is_send_gift] = $request->postMore([
['product_id', 0],
['num', 0],
['unique', ''],
['type', -1],
['is_channel', 0],
['is_send_gift', 0],
], true);
/** @var StoreCartServices $cartService */
$cartService = app()->make(StoreCartServices::class);
if (!$product_id || !is_numeric($product_id)) return app('json')->fail('参数错误');
if (!(int)$num) return app('json')->fail('请提交加入购物车商品数量');
$res = $cartService->setCartNum((int)$request->uid(), (int)$product_id, (int)$num, $unique, (int)$type, $is_channel, $is_send_gift);
$str = $type == 1 ? '添加' : '删除';
if ($res) return app('json')->successful($str . '成功');
return app('json')->fail($str . '失败');
}
}

View File

@@ -0,0 +1,121 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\controller\api\v2\order;
use app\services\order\StoreOrderInvoiceServices;
use app\services\order\StoreOrderServices;
use app\services\system\attachment\SystemAttachmentServices;
use app\services\store\SystemStoreServices;
use crmeb\services\UtilService;
use think\annotation\Inject;
use think\Request;
/**
* Class StoreOrderInvoice
* @package app\api\controller\v2\order
*/
class StoreOrderInvoice
{
/**
* @var StoreOrderInvoiceServices
*/
#[Inject]
protected StoreOrderInvoiceServices $services;
/**
* 订单开票
* @param Request $request
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function makeUp(Request $request)
{
[$order_id, $invoice_id] = $request->postMore([
['order_id', 0],
['invoice_id', 0]
], true);
if (!$order_id) return app('json')->fail('请选择要开票订单');
if (!$invoice_id) return app('json')->fail('请选择发票');
$uid = (int)$request->uid;
return app('json')->successful($this->services->makeUp($uid, $order_id, (int)$invoice_id));
}
/**
* 开票记录
* @param Request $request
* @return mixed
*/
public function list(Request $request)
{
$uid = (int)$request->uid();
return app('json')->successful($this->services->getOrderInvoiceList(['uid' => $uid]));
}
/**
* 订单详情
* @param \app\Request $request
* @param $uni
* @return mixed
*/
public function detail(StoreOrderServices $services, Request $request, $uni, $id)
{
if (!strlen(trim($uni))) return app('json')->fail('参数错误');
$order = $services->getUserOrderDetail($uni, (int)$request->uid());
if (!$order) return app('json')->fail('订单不存在');
$order = $order->toArray();
$orderInvoice = $this->services->get($id);
$orderInvoice['invoice_time'] = $orderInvoice['invoice_time'] ? date('Y-m-d H:i:s', $orderInvoice['invoice_time']) : '';
$order['invoice'] = $orderInvoice;
//门店是否开启 || 门店自提是否开启
if (!sys_config('store_func_status', 1) || !sys_config('store_self_mention')) {
//关闭门店自提后 订单隐藏门店信息
$order['shipping_type'] = 1;
}
if ($order['verify_code']) {
$verify_code = $order['verify_code'];
$verify[] = substr($verify_code, 0, 4);
$verify[] = substr($verify_code, 4, 4);
$verify[] = substr($verify_code, 8);
$order['_verify_code'] = implode(' ', $verify);
}
$order['add_time_y'] = date('Y-m-d', $order['add_time']);
$order['add_time_h'] = date('H:i:s', $order['add_time']);
/** @var SystemStoreServices $storeServices */
$storeServices = app()->make(SystemStoreServices::class);
$order['system_store'] = $storeServices->getStoreDispose($order['store_id']);
if (($order['shipping_type'] === 2 || $order['delivery_uid'] != 0) && $order['verify_code']) {
$name = $order['verify_code'] . '.jpg';
/** @var SystemAttachmentServices $attachmentServices */
$attachmentServices = app()->make(SystemAttachmentServices::class);
$imageInfo = $attachmentServices->getInfo(['name' => $name]);
$siteUrl = sys_config('site_url');
if (!$imageInfo) {
$imageInfo = UtilService::getQRCodePath($order['verify_code'], $name);
if (is_array($imageInfo)) {
$attachmentServices->attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
$url = $imageInfo['dir'];
} else
$url = '';
} else $url = $imageInfo['att_dir'];
if (isset($imageInfo['image_type']) && $imageInfo['image_type'] == 1) $url = $siteUrl . $url;
$order['code'] = $url;
}
$order['mapKey'] = sys_config('tengxun_map_key');
$order['yue_pay_status'] = (int)sys_config('balance_func_status') ? (int)1 : (int)2;//余额支付 1 开启 2 关闭
$order['pay_weixin_open'] = (int)sys_config('pay_weixin_open') ?? 0;//微信支付 1 开启 0 关闭
$order['ali_pay_status'] = (bool)sys_config('ali_pay_status');//支付包支付 1 开启 0 关闭
return app('json')->successful('ok', $services->tidyOrder($order, true, true));
}
}