mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-11 18:32:50 +00:00
新增海报生成类
This commit is contained in:
parent
0901239f87
commit
78e79175a3
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace app\api\controller\user;
|
namespace app\api\controller\user;
|
||||||
|
|
||||||
use app\admin\model\system\SystemAttachment;
|
use app\admin\model\system\SystemAttachment;
|
||||||
@ -26,28 +27,28 @@ class UserBillController
|
|||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function commission(Request $request)
|
public function commission(Request $request)
|
||||||
{
|
{
|
||||||
$uid = $request->uid();
|
$uid = $request->uid();
|
||||||
$lastDayCount = UserBill::yesterdayCommissionSum($uid);//昨天的佣金
|
$lastDayCount = UserBill::yesterdayCommissionSum($uid);//昨天的佣金
|
||||||
$extractCount = UserExtract::extractSum($uid);//累计提现金额
|
$extractCount = UserExtract::extractSum($uid);//累计提现金额
|
||||||
$commissionCount = UserBill::getBrokerage($uid);//获取总佣金
|
$commissionCount = UserBill::getBrokerage($uid);//获取总佣金
|
||||||
if($commissionCount > 0){
|
if ($commissionCount > 0) {
|
||||||
$rechargeCount = UserBill::getRecharge($uid);//累计充值
|
$rechargeCount = UserBill::getRecharge($uid);//累计充值
|
||||||
$orderYuePrice = StoreOrder::getOrderStatusYueSum($uid);//余额累计消费
|
$orderYuePrice = StoreOrder::getOrderStatusYueSum($uid);//余额累计消费
|
||||||
$systemAdd = UserBill::getSystemAdd($uid);//后台添加余额
|
$systemAdd = UserBill::getSystemAdd($uid);//后台添加余额
|
||||||
$yueCount = bcadd($rechargeCount,$systemAdd,2);// 后台添加余额 + 累计充值 = 非佣金的总金额
|
$yueCount = bcadd($rechargeCount, $systemAdd, 2);// 后台添加余额 + 累计充值 = 非佣金的总金额
|
||||||
$orderYuePrice = $yueCount > $orderYuePrice ? 0 : bcsub($orderYuePrice,$yueCount,2);// 余额累计消费(使用佣金消费的金额)
|
$orderYuePrice = $yueCount > $orderYuePrice ? 0 : bcsub($orderYuePrice, $yueCount, 2);// 余额累计消费(使用佣金消费的金额)
|
||||||
$commissionCount = bcsub($commissionCount, $extractCount,2);//减去已提现金额
|
$commissionCount = bcsub($commissionCount, $extractCount, 2);//减去已提现金额
|
||||||
$extractPriceCount = UserExtract::userExtractTotalPrice($uid,0);
|
$extractPriceCount = UserExtract::userExtractTotalPrice($uid, 0);
|
||||||
$commissionCount = $extractPriceCount < $commissionCount ? bcsub($commissionCount, $extractPriceCount,2) : 0;//减去审核中的提现金额
|
$commissionCount = $extractPriceCount < $commissionCount ? bcsub($commissionCount, $extractPriceCount, 2) : 0;//减去审核中的提现金额
|
||||||
$commissionCount = $commissionCount > $orderYuePrice ? bcsub($commissionCount, $orderYuePrice,2) : 0;//减掉余额支付
|
$commissionCount = $commissionCount > $orderYuePrice ? bcsub($commissionCount, $orderYuePrice, 2) : 0;//减掉余额支付
|
||||||
}
|
}
|
||||||
$data['lastDayCount'] = $lastDayCount;
|
$data['lastDayCount'] = $lastDayCount;
|
||||||
$data['extractCount'] = $extractCount;
|
$data['extractCount'] = $extractCount;
|
||||||
$data['commissionCount'] = $commissionCount;
|
$data['commissionCount'] = $commissionCount;
|
||||||
return app('json')->successful($data);
|
return app('json')->successful($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,12 +66,12 @@ class UserBillController
|
|||||||
public function spread_people(Request $request)
|
public function spread_people(Request $request)
|
||||||
{
|
{
|
||||||
$spreadInfo = UtilService::postMore([
|
$spreadInfo = UtilService::postMore([
|
||||||
['page',1],
|
['page', 1],
|
||||||
['limit',20],
|
['limit', 20],
|
||||||
['grade',0],
|
['grade', 0],
|
||||||
['keyword',''],
|
['keyword', ''],
|
||||||
['sort',''],
|
['sort', ''],
|
||||||
],$request);
|
], $request);
|
||||||
$uid = $request->uid();
|
$uid = $request->uid();
|
||||||
$data['list'] = User::getUserSpreadGrade($uid, $spreadInfo['grade'], $spreadInfo['sort'], $spreadInfo['keyword'], $spreadInfo['page'], $spreadInfo['limit']);
|
$data['list'] = User::getUserSpreadGrade($uid, $spreadInfo['grade'], $spreadInfo['sort'], $spreadInfo['keyword'], $spreadInfo['page'], $spreadInfo['limit']);
|
||||||
$data['total'] = User::getSpreadCount($uid);
|
$data['total'] = User::getSpreadCount($uid);
|
||||||
@ -86,19 +87,19 @@ class UserBillController
|
|||||||
public function spread_order(Request $request)
|
public function spread_order(Request $request)
|
||||||
{
|
{
|
||||||
$orderInfo = UtilService::postMore([
|
$orderInfo = UtilService::postMore([
|
||||||
['page',1],
|
['page', 1],
|
||||||
['limit',20],
|
['limit', 20],
|
||||||
['category','now_money'],
|
['category', 'now_money'],
|
||||||
['type','brokerage'],
|
['type', 'brokerage'],
|
||||||
],$request);
|
], $request);
|
||||||
$data['list'] = [];
|
$data['list'] = [];
|
||||||
$data['count'] = 0;
|
$data['count'] = 0;
|
||||||
$uid = $request->uid();
|
$uid = $request->uid();
|
||||||
$data['list'] = UserBill::getRecordList($uid, $orderInfo['page'], $orderInfo['limit'], $orderInfo['category'], $orderInfo['type']);
|
$data['list'] = UserBill::getRecordList($uid, $orderInfo['page'], $orderInfo['limit'], $orderInfo['category'], $orderInfo['type']);
|
||||||
$count = UserBill::getRecordOrderCount($uid, $orderInfo['category'], $orderInfo['type']);
|
$count = UserBill::getRecordOrderCount($uid, $orderInfo['category'], $orderInfo['type']);
|
||||||
$data['count'] = $count ? $count : 0;
|
$data['count'] = $count ? $count : 0;
|
||||||
if(!count($data['list'])) return app('json')->successful($data);
|
if (!count($data['list'])) return app('json')->successful($data);
|
||||||
foreach ($data['list'] as $key=>&$value){
|
foreach ($data['list'] as $key => &$value) {
|
||||||
$value['child'] = UserBill::getRecordOrderListDraw($uid, $value['time'], $orderInfo['category'], $orderInfo['type']);
|
$value['child'] = UserBill::getRecordOrderListDraw($uid, $value['time'], $orderInfo['category'], $orderInfo['type']);
|
||||||
$value['count'] = count($value['child']);
|
$value['count'] = count($value['child']);
|
||||||
}
|
}
|
||||||
@ -108,31 +109,31 @@ class UserBillController
|
|||||||
/**
|
/**
|
||||||
* 推广佣金明细
|
* 推广佣金明细
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param $type 0 全部 1 消费 2 充值 3 返佣 4 提现
|
* @param $type 0 全部 1 消费 2 充值 3 返佣 4 提现
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function spread_commission(Request $request, $type)
|
public function spread_commission(Request $request, $type)
|
||||||
{
|
{
|
||||||
list($page, $limit) = UtilService::getMore([
|
list($page, $limit) = UtilService::getMore([
|
||||||
['page',0],
|
['page', 0],
|
||||||
['limit',0],
|
['limit', 0],
|
||||||
],$request, true);
|
], $request, true);
|
||||||
return app('json')->successful(UserBill::getUserBillList($request->uid(),$page,$limit,$type));
|
return app('json')->successful(UserBill::getUserBillList($request->uid(), $page, $limit, $type));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推广 佣金/提现 总和
|
* 推广 佣金/提现 总和
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param $type 3 佣金 4 提现
|
* @param $type 3 佣金 4 提现
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function spread_count(Request $request, $type)
|
public function spread_count(Request $request, $type)
|
||||||
{
|
{
|
||||||
$count = 0;
|
$count = 0;
|
||||||
if($type == 3) $count = UserBill::getRecordCount($request->uid(), 'now_money', 'brokerage');
|
if ($type == 3) $count = UserBill::getRecordCount($request->uid(), 'now_money', 'brokerage');
|
||||||
else if($type == 4) $count = UserExtract::userExtractTotalPrice($request->uid());//累计提现
|
else if ($type == 4) $count = UserExtract::userExtractTotalPrice($request->uid());//累计提现
|
||||||
$count = $count ? $count : 0;
|
$count = $count ? $count : 0;
|
||||||
return app('json')->successful(['count'=>$count]);
|
return app('json')->successful(['count' => $count]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -144,168 +145,168 @@ class UserBillController
|
|||||||
public function spread_banner(Request $request)
|
public function spread_banner(Request $request)
|
||||||
{
|
{
|
||||||
list($type) = UtilService::getMore([
|
list($type) = UtilService::getMore([
|
||||||
['type',2],
|
['type', 2],
|
||||||
],$request, true);
|
], $request, true);
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
$rootPath = app()->getRootPath();
|
$rootPath = app()->getRootPath();
|
||||||
try{
|
try {
|
||||||
$resRoutine = true;//小程序
|
$resRoutine = true;//小程序
|
||||||
$resWap = true;//公众号
|
$resWap = true;//公众号
|
||||||
$siteUrl = sysConfig('site_url');
|
$siteUrl = sysConfig('site_url');
|
||||||
$routineSpreadBanner = GroupDataService::getData('routine_spread_banner');
|
$routineSpreadBanner = GroupDataService::getData('routine_spread_banner');
|
||||||
if(!count($routineSpreadBanner)) return app('json')->fail('暂无海报');
|
if (!count($routineSpreadBanner)) return app('json')->fail('暂无海报');
|
||||||
if($type == 1){
|
if ($type == 1) {
|
||||||
//小程序
|
//小程序
|
||||||
$name = $user['uid'].'_'.$user['is_promoter'].'_user_routine.jpg';
|
$name = $user['uid'] . '_' . $user['is_promoter'] . '_user_routine.jpg';
|
||||||
$imageInfo = SystemAttachment::getInfo($name,'name');
|
$imageInfo = SystemAttachment::getInfo($name, 'name');
|
||||||
//检测远程文件是否存在
|
//检测远程文件是否存在
|
||||||
if(isset($imageInfo['att_dir']) && strstr($imageInfo['att_dir'],'http')!==false && UtilService::CurlFileExist($imageInfo['att_dir']) === false){
|
if (isset($imageInfo['att_dir']) && strstr($imageInfo['att_dir'], 'http') !== false && UtilService::CurlFileExist($imageInfo['att_dir']) === false) {
|
||||||
$imageInfo = null;
|
$imageInfo = null;
|
||||||
SystemAttachment::where(['name'=>$name])->delete();
|
SystemAttachment::where(['name' => $name])->delete();
|
||||||
}
|
}
|
||||||
if(!$imageInfo){
|
if (!$imageInfo) {
|
||||||
$res = RoutineCode::getShareCode($user['uid'], 'spread', '', '');
|
$res = RoutineCode::getShareCode($user['uid'], 'spread', '', '');
|
||||||
if(!$res) return app('json')->fail('二维码生成失败');
|
if (!$res) return app('json')->fail('二维码生成失败');
|
||||||
$imageInfo = UploadService::instance()->setUploadPath('routine/spread/code')->imageStream($name,$res['res']);
|
$imageInfo = UploadService::instance()->setUploadPath('routine/spread/code')->imageStream($name, $res['res']);
|
||||||
if(!is_array($imageInfo)) return app('json')->fail($imageInfo);
|
if (!is_array($imageInfo)) return app('json')->fail($imageInfo);
|
||||||
SystemAttachment::attachmentAdd($imageInfo['name'],$imageInfo['size'],$imageInfo['type'],$imageInfo['dir'],$imageInfo['thumb_path'],1,$imageInfo['image_type'],$imageInfo['time'],2);
|
SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
|
||||||
RoutineQrcode::setRoutineQrcodeFind($res['id'],['status'=>1,'time'=>time(),'qrcode_url'=>$imageInfo['dir']]);
|
RoutineQrcode::setRoutineQrcodeFind($res['id'], ['status' => 1, 'time' => time(), 'qrcode_url' => $imageInfo['dir']]);
|
||||||
$urlCode = $imageInfo['dir'];
|
$urlCode = $imageInfo['dir'];
|
||||||
}else $urlCode = $imageInfo['att_dir'];
|
} else $urlCode = $imageInfo['att_dir'];
|
||||||
if($imageInfo['image_type'] == 1) $urlCode = $siteUrl.$urlCode;
|
if ($imageInfo['image_type'] == 1) $urlCode = $siteUrl . $urlCode;
|
||||||
$siteUrlHttps = UtilService::setHttpType($siteUrl, 0);
|
$siteUrlHttps = UtilService::setHttpType($siteUrl, 0);
|
||||||
$filelink=[
|
$filelink = [
|
||||||
'Bold'=>'static'. DS .'font'. DS .'Alibaba-PuHuiTi-Regular.otf',
|
'Bold' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
||||||
'Normal'=>'static'. DS .'font'. DS .'Alibaba-PuHuiTi-Regular.otf',
|
'Normal' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
||||||
];
|
];
|
||||||
if(!file_exists($filelink['Bold'])) return app('json')->fail('缺少字体文件Bold');
|
if (!file_exists($filelink['Bold'])) return app('json')->fail('缺少字体文件Bold');
|
||||||
if(!file_exists($filelink['Normal'])) return app('json')->fail('缺少字体文件Normal');
|
if (!file_exists($filelink['Normal'])) return app('json')->fail('缺少字体文件Normal');
|
||||||
foreach ($routineSpreadBanner as $key=>&$item){
|
foreach ($routineSpreadBanner as $key => &$item) {
|
||||||
$posterInfo = '海报生成失败:(';
|
$posterInfo = '海报生成失败:(';
|
||||||
$config = array(
|
$config = array(
|
||||||
'image'=>array(
|
'image' => array(
|
||||||
array(
|
array(
|
||||||
'url'=>$urlCode, //二维码资源
|
'url' => $urlCode, //二维码资源
|
||||||
'stream'=>0,
|
'stream' => 0,
|
||||||
'left'=>114,
|
'left' => 114,
|
||||||
'top'=>790,
|
'top' => 790,
|
||||||
'right'=>0,
|
'right' => 0,
|
||||||
'bottom'=>0,
|
'bottom' => 0,
|
||||||
'width'=>120,
|
'width' => 120,
|
||||||
'height'=>120,
|
'height' => 120,
|
||||||
'opacity'=>100
|
'opacity' => 100
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'text'=>array(
|
'text' => array(
|
||||||
array(
|
array(
|
||||||
'text'=>$user['nickname'],
|
'text' => $user['nickname'],
|
||||||
'left'=>250,
|
'left' => 250,
|
||||||
'top'=>840,
|
'top' => 840,
|
||||||
'fontPath'=>$rootPath.'public'. DS .$filelink['Bold'], //字体文件
|
'fontPath' => $rootPath . 'public' . DS . $filelink['Bold'], //字体文件
|
||||||
'fontSize'=>16, //字号
|
'fontSize' => 16, //字号
|
||||||
'fontColor'=>'40,40,40', //字体颜色
|
'fontColor' => '40,40,40', //字体颜色
|
||||||
'angle'=>0,
|
'angle' => 0,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'text'=>'邀请您加入'.sysConfig('site_name'),
|
'text' => '邀请您加入' . sysConfig('site_name'),
|
||||||
'left'=>250,
|
'left' => 250,
|
||||||
'top'=>880,
|
'top' => 880,
|
||||||
'fontPath'=>$rootPath.'public'. DS .$filelink['Normal'], //字体文件
|
'fontPath' => $rootPath . 'public' . DS . $filelink['Normal'], //字体文件
|
||||||
'fontSize'=>16, //字号
|
'fontSize' => 16, //字号
|
||||||
'fontColor'=>'40,40,40', //字体颜色
|
'fontColor' => '40,40,40', //字体颜色
|
||||||
'angle'=>0,
|
'angle' => 0,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'background'=>$item['pic']
|
'background' => $item['pic']
|
||||||
);
|
);
|
||||||
$resRoutine = $resRoutine && $posterInfo = UtilService::setSharePoster($config,'routine/spread/poster');
|
$resRoutine = $resRoutine && $posterInfo = UtilService::setSharePoster($config, 'routine/spread/poster');
|
||||||
if(!is_array($posterInfo)) return app('json')->fail($posterInfo);
|
if (!is_array($posterInfo)) return app('json')->fail($posterInfo);
|
||||||
SystemAttachment::attachmentAdd($posterInfo['name'],$posterInfo['size'],$posterInfo['type'],$posterInfo['dir'],$posterInfo['thumb_path'],1,$posterInfo['image_type'],$posterInfo['time'],2);
|
SystemAttachment::attachmentAdd($posterInfo['name'], $posterInfo['size'], $posterInfo['type'], $posterInfo['dir'], $posterInfo['thumb_path'], 1, $posterInfo['image_type'], $posterInfo['time'], 2);
|
||||||
if($resRoutine){
|
if ($resRoutine) {
|
||||||
if($posterInfo['image_type'] == 1)
|
if ($posterInfo['image_type'] == 1)
|
||||||
$item['poster'] = $siteUrlHttps.$posterInfo['dir'];
|
$item['poster'] = $siteUrlHttps . $posterInfo['dir'];
|
||||||
else
|
else
|
||||||
$item['poster'] = UtilService::setHttpType($posterInfo['dir'], 0);
|
$item['poster'] = UtilService::setHttpType($posterInfo['dir'], 0);
|
||||||
$item['poster'] = str_replace('\\','/',$item['poster']);
|
$item['poster'] = str_replace('\\', '/', $item['poster']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if($type == 2){
|
} else if ($type == 2) {
|
||||||
//公众号
|
//公众号
|
||||||
$name = $user['uid'].'_'.$user['is_promoter'].'_user_wap.jpg';
|
$name = $user['uid'] . '_' . $user['is_promoter'] . '_user_wap.jpg';
|
||||||
$imageInfo = SystemAttachment::getInfo($name,'name');
|
$imageInfo = SystemAttachment::getInfo($name, 'name');
|
||||||
//检测远程文件是否存在
|
//检测远程文件是否存在
|
||||||
if(isset($imageInfo['att_dir']) && strstr($imageInfo['att_dir'],'http')!==false && UtilService::CurlFileExist($imageInfo['att_dir']) === false){
|
if (isset($imageInfo['att_dir']) && strstr($imageInfo['att_dir'], 'http') !== false && UtilService::CurlFileExist($imageInfo['att_dir']) === false) {
|
||||||
$imageInfo = null;
|
$imageInfo = null;
|
||||||
SystemAttachment::where(['name'=>$name])->delete();
|
SystemAttachment::where(['name' => $name])->delete();
|
||||||
}
|
}
|
||||||
if(!$imageInfo){
|
if (!$imageInfo) {
|
||||||
$codeUrl = UtilService::setHttpType($siteUrl.'?spread='.$user['uid'], 1);//二维码链接
|
$codeUrl = UtilService::setHttpType($siteUrl . '?spread=' . $user['uid'], 1);//二维码链接
|
||||||
$imageInfo = UtilService::getQRCodePath($codeUrl, $name);
|
$imageInfo = UtilService::getQRCodePath($codeUrl, $name);
|
||||||
if(!$imageInfo) return app('json')->fail('二维码生成失败');
|
if (!$imageInfo) return app('json')->fail('二维码生成失败');
|
||||||
SystemAttachment::attachmentAdd($imageInfo['name'],$imageInfo['size'],$imageInfo['type'],$imageInfo['dir'],$imageInfo['thumb_path'],1,$imageInfo['image_type'],$imageInfo['time'],2);
|
SystemAttachment::attachmentAdd($imageInfo['name'], $imageInfo['size'], $imageInfo['type'], $imageInfo['dir'], $imageInfo['thumb_path'], 1, $imageInfo['image_type'], $imageInfo['time'], 2);
|
||||||
$urlCode = $imageInfo['dir'];
|
$urlCode = $imageInfo['dir'];
|
||||||
}else $urlCode = $imageInfo['att_dir'];
|
} else $urlCode = $imageInfo['att_dir'];
|
||||||
if($imageInfo['image_type'] == 1) $urlCode = $siteUrl.$urlCode;
|
if ($imageInfo['image_type'] == 1) $urlCode = $siteUrl . $urlCode;
|
||||||
$siteUrl = UtilService::setHttpType($siteUrl, 1);
|
$siteUrl = UtilService::setHttpType($siteUrl, 1);
|
||||||
$filelink=[
|
$filelink = [
|
||||||
'Bold'=>'static'. DS .'font'. DS .'Alibaba-PuHuiTi-Regular.otf',
|
'Bold' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
||||||
'Normal'=>'static'. DS .'font'. DS .'Alibaba-PuHuiTi-Regular.otf',
|
'Normal' => 'static' . DS . 'font' . DS . 'Alibaba-PuHuiTi-Regular.otf',
|
||||||
];
|
];
|
||||||
if(!file_exists($filelink['Bold'])) return app('json')->fail('缺少字体文件Bold');
|
if (!file_exists($filelink['Bold'])) return app('json')->fail('缺少字体文件Bold');
|
||||||
if(!file_exists($filelink['Normal'])) return app('json')->fail('缺少字体文件Normal');
|
if (!file_exists($filelink['Normal'])) return app('json')->fail('缺少字体文件Normal');
|
||||||
foreach ($routineSpreadBanner as $key=>&$item){
|
foreach ($routineSpreadBanner as $key => &$item) {
|
||||||
$posterInfo = '海报生成失败:(';
|
$posterInfo = '海报生成失败:(';
|
||||||
$config = array(
|
$config = array(
|
||||||
'image'=>array(
|
'image' => array(
|
||||||
array(
|
array(
|
||||||
'url'=>$urlCode, //二维码资源
|
'url' => $urlCode, //二维码资源
|
||||||
'stream'=>0,
|
'stream' => 0,
|
||||||
'left'=>114,
|
'left' => 114,
|
||||||
'top'=>790,
|
'top' => 790,
|
||||||
'right'=>0,
|
'right' => 0,
|
||||||
'bottom'=>0,
|
'bottom' => 0,
|
||||||
'width'=>120,
|
'width' => 120,
|
||||||
'height'=>120,
|
'height' => 120,
|
||||||
'opacity'=>100
|
'opacity' => 100
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'text'=>array(
|
'text' => array(
|
||||||
array(
|
array(
|
||||||
'text'=>$user['nickname'],
|
'text' => $user['nickname'],
|
||||||
'left'=>250,
|
'left' => 250,
|
||||||
'top'=>840,
|
'top' => 840,
|
||||||
'fontPath'=>$rootPath.'public'. DS .$filelink['Bold'], //字体文件
|
'fontPath' => $rootPath . 'public' . DS . $filelink['Bold'], //字体文件
|
||||||
'fontSize'=>16, //字号
|
'fontSize' => 16, //字号
|
||||||
'fontColor'=>'40,40,40', //字体颜色
|
'fontColor' => '40,40,40', //字体颜色
|
||||||
'angle'=>0,
|
'angle' => 0,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'text'=>'邀请您加入'.sysConfig('site_name'),
|
'text' => '邀请您加入' . sysConfig('site_name'),
|
||||||
'left'=>250,
|
'left' => 250,
|
||||||
'top'=>880,
|
'top' => 880,
|
||||||
'fontPath'=>$rootPath.'public'. DS .$filelink['Normal'], //字体文件
|
'fontPath' => $rootPath . 'public' . DS . $filelink['Normal'], //字体文件
|
||||||
'fontSize'=>16, //字号
|
'fontSize' => 16, //字号
|
||||||
'fontColor'=>'40,40,40', //字体颜色
|
'fontColor' => '40,40,40', //字体颜色
|
||||||
'angle'=>0,
|
'angle' => 0,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'background'=>$item['pic']
|
'background' => $item['pic']
|
||||||
);
|
);
|
||||||
$resWap = $resWap && $posterInfo = UtilService::setSharePoster($config,'wap/spread/poster');
|
$resWap = $resWap && $posterInfo = UtilService::setSharePoster($config, 'wap/spread/poster');
|
||||||
if(!is_array($posterInfo)) return app('json')->fail($posterInfo);
|
if (!is_array($posterInfo)) return app('json')->fail($posterInfo);
|
||||||
SystemAttachment::attachmentAdd($posterInfo['name'],$posterInfo['size'],$posterInfo['type'],$posterInfo['dir'],$posterInfo['thumb_path'],1,$posterInfo['image_type'],$posterInfo['time'],2);
|
SystemAttachment::attachmentAdd($posterInfo['name'], $posterInfo['size'], $posterInfo['type'], $posterInfo['dir'], $posterInfo['thumb_path'], 1, $posterInfo['image_type'], $posterInfo['time'], 2);
|
||||||
if($resWap){
|
if ($resWap) {
|
||||||
if($posterInfo['image_type'] == 1)
|
if ($posterInfo['image_type'] == 1)
|
||||||
$item['wap_poster'] = $siteUrl.$posterInfo['dir'];
|
$item['wap_poster'] = $siteUrl . $posterInfo['dir'];
|
||||||
else
|
else
|
||||||
$item['wap_poster'] = UtilService::setHttpType($posterInfo['dir'], 1);
|
$item['wap_poster'] = UtilService::setHttpType($posterInfo['dir'], 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($resRoutine && $resWap) return app('json')->successful($routineSpreadBanner);
|
if ($resRoutine && $resWap) return app('json')->successful($routineSpreadBanner);
|
||||||
else return app('json')->fail('生成图片失败');
|
else return app('json')->fail('生成图片失败');
|
||||||
}catch (\Exception $e){
|
} catch (\Exception $e) {
|
||||||
return app('json')->fail('生成图片时,系统错误',['line'=>$e->getLine(),'message'=>$e->getMessage()]);
|
return app('json')->fail('生成图片时,系统错误', ['line' => $e->getLine(), 'message' => $e->getMessage()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,9 +322,9 @@ class UserBillController
|
|||||||
public function integral_list(Request $request)
|
public function integral_list(Request $request)
|
||||||
{
|
{
|
||||||
list($page, $limit) = UtilService::getMore([
|
list($page, $limit) = UtilService::getMore([
|
||||||
['page',0],['limit',0]
|
['page', 0], ['limit', 0]
|
||||||
], $request, true);
|
], $request, true);
|
||||||
return app('json')->successful(UserBill::userBillList($request->uid(),$page,$limit));
|
return app('json')->successful(UserBill::userBillList($request->uid(), $page, $limit));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8,6 +8,7 @@ use app\models\user\User;
|
|||||||
use app\models\user\UserToken;
|
use app\models\user\UserToken;
|
||||||
use app\models\user\WechatUser;
|
use app\models\user\WechatUser;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
|
use crmeb\services\CanvasService;
|
||||||
use crmeb\services\WechatService;
|
use crmeb\services\WechatService;
|
||||||
use think\facade\Cookie;
|
use think\facade\Cookie;
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ class WechatController
|
|||||||
public function auth(Request $request)
|
public function auth(Request $request)
|
||||||
{
|
{
|
||||||
$spreadId = intval($request->param('spread'));
|
$spreadId = intval($request->param('spread'));
|
||||||
$login_type = $request->param('login_type','');
|
$login_type = $request->param('login_type', '');
|
||||||
try {
|
try {
|
||||||
$wechatInfo = WechatService::oauthService()->user()->getOriginal();
|
$wechatInfo = WechatService::oauthService()->user()->getOriginal();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@ -79,7 +80,7 @@ class WechatController
|
|||||||
$user = User::where('uid', WechatUser::openidToUid($openid, 'openid'))->find();
|
$user = User::where('uid', WechatUser::openidToUid($openid, 'openid'))->find();
|
||||||
if (!$user)
|
if (!$user)
|
||||||
return app('json')->fail('获取用户信息失败');
|
return app('json')->fail('获取用户信息失败');
|
||||||
if($user->login_type == 'h5' && ($h5UserInfo = User::where(['account'=>$user->phone,'phone'=>$user->phone,'user_type'=>'h5'])->find()))
|
if ($user->login_type == 'h5' && ($h5UserInfo = User::where(['account' => $user->phone, 'phone' => $user->phone, 'user_type' => 'h5'])->find()))
|
||||||
$token = UserToken::createToken($h5UserInfo, 'wechat');
|
$token = UserToken::createToken($h5UserInfo, 'wechat');
|
||||||
else
|
else
|
||||||
$token = UserToken::createToken($user, 'wechat');
|
$token = UserToken::createToken($user, 'wechat');
|
||||||
@ -91,4 +92,25 @@ class WechatController
|
|||||||
} else
|
} else
|
||||||
return app('json')->fail('登录失败');
|
return app('json')->fail('登录失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function follow()
|
||||||
|
{
|
||||||
|
$canvas = CanvasService::instance();
|
||||||
|
$path = 'uploads/follow/';
|
||||||
|
$imageType = 'jpg';
|
||||||
|
$name = 'follow';
|
||||||
|
$siteUrl = sysConfig('site_url');
|
||||||
|
if (file_exists($path . $name . '.' . $imageType)) {
|
||||||
|
return app('json')->success('ok', ['path' => $siteUrl . '/' . $path . $name . '.' . $imageType]);
|
||||||
|
}
|
||||||
|
$canvas->setImageUrl('static/qrcode/follow.png')->setImageHeight(720)->setImageWidth(500)->pushImageValue();
|
||||||
|
$wechatQrcode = sysConfig('wechat_qrcode');
|
||||||
|
if (($strlen = stripos($wechatQrcode, 'uploads')) !== false) {
|
||||||
|
$wechatQrcode = substr($wechatQrcode, $strlen);
|
||||||
|
}
|
||||||
|
$canvas->setImageUrl($wechatQrcode)->setImageHeight(344)->setImageWidth(344)->setImageLeft(76)->setImageTop(76)->pushImageValue();
|
||||||
|
$image = $canvas->setFileName($name)->setImageType($imageType)->setPath($path)->setBackgroundWidth(500)->setBackgroundHeight(720)->starDrawChart();
|
||||||
|
return app('json')->success('ok', ['path' => $image ? $siteUrl . '/' . $image : '']);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
301
crmeb/crmeb/services/CanvasService.php
Normal file
301
crmeb/crmeb/services/CanvasService.php
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace crmeb\services;
|
||||||
|
|
||||||
|
use crmeb\traits\LogicTrait;
|
||||||
|
use EasyWeChat\Core\Exceptions\RuntimeException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class CanvasService
|
||||||
|
* @package crmeb\services
|
||||||
|
* @method $this setFileName(string $fileName) 设置文件名
|
||||||
|
* @method $this setPath(string $path) 设置存放路径
|
||||||
|
* @method $this setImageType(string $imageType) 设置图片类型
|
||||||
|
* @method $this setBackgroundHeight(int $backgroundHeight) 设置背景高
|
||||||
|
* @method $this setBackgroundWidth(int $backgroundWidth) 设置背景宽
|
||||||
|
* @method $this setFontSize(int $fontSize) 设置字体大小
|
||||||
|
* @method $this setFontColor($fontColor) 设置字体颜色
|
||||||
|
* @method $this setFontLeft(int $fontLeft) 设置字体距离左侧位置
|
||||||
|
* @method $this setFontTop(int $fontTop) 设置字体距离顶部位置
|
||||||
|
* @method $this setFontText(string $fontText) 设置文字
|
||||||
|
* @method $this setFontPath(string $fontPath) 设置字体文件路径
|
||||||
|
* @method $this setFontAngle(int $fontAngle) 设置字体角度
|
||||||
|
* @method $this setImageUrl(string $imageUrl) 设置图片路径
|
||||||
|
* @method $this setImageLeft(int $imageLeft) 设置图片距离左侧位置
|
||||||
|
* @method $this setImageTop(int $imageTop) 设置图片距离顶部位置
|
||||||
|
* @method $this setImageRight(int $imageRight) 设置图片距离左侧位置
|
||||||
|
* @method $this setImageStream(bool $imageStream) 设置图片是否未流文件
|
||||||
|
* @method $this setImageBottom(int $imageBottom) 设置图片距离底部位置
|
||||||
|
* @method $this setImageWidth(int $imageWidth) 设置图片宽
|
||||||
|
* @method $this setImageHeight(int $imageHeight) 设置图片高
|
||||||
|
* @method $this setImageOpacity(int $imageOpacity) 设置图片透明度
|
||||||
|
*/
|
||||||
|
class CanvasService
|
||||||
|
{
|
||||||
|
use LogicTrait;
|
||||||
|
|
||||||
|
const FONT = 'static/font/Alibaba-PuHuiTi-Regular.otf';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 背景宽
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $backgroundWidth = 600;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 背景高
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $backgroundHeight = 1000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片类型
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $imageType = 'jpeg';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存地址
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $path = 'uploads/routine/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件名
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $fileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规则
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $propsRule = ['fileName', 'path', 'imageType', 'backgroundHeight', 'backgroundWidth'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字体数据集
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fontValue = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字体默认可设置vlaue
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $defaultFontValue = [
|
||||||
|
'fontSize' => 0,
|
||||||
|
'fontColor' => '231,180,52',
|
||||||
|
'fontLeft' => 0,
|
||||||
|
'fontTop' => 0,
|
||||||
|
'fontText' => '',
|
||||||
|
'fontPath' => self::FONT,
|
||||||
|
'fontAngle' => 0,
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $defaultFont;
|
||||||
|
/**
|
||||||
|
* 图片数据集
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $imageValue = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片可设置属性
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $defaultImageValue = [
|
||||||
|
'imageUrl' => '',
|
||||||
|
'imageLeft' => 0,
|
||||||
|
'imageTop' => 0,
|
||||||
|
'imageRight' => 0,
|
||||||
|
'imageBottom' => 0,
|
||||||
|
'imageWidth' => 0,
|
||||||
|
'imageHeight' => 0,
|
||||||
|
'imageOpacity' => 0,
|
||||||
|
'imageStream' => false,
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $defaultImage;
|
||||||
|
|
||||||
|
protected function __construct()
|
||||||
|
{
|
||||||
|
$this->defaultImage = $this->defaultImageValue;
|
||||||
|
$this->defaultFont = $this->defaultFontValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建一个新图象
|
||||||
|
* @param string $file
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function createFrom(string $file): array
|
||||||
|
{
|
||||||
|
$imagesize = getimagesize($file);
|
||||||
|
$type = image_type_to_extension($imagesize[2], true);
|
||||||
|
switch ($type) {
|
||||||
|
case '.png':
|
||||||
|
$canvas = imagecreatefrompng($file);
|
||||||
|
break;
|
||||||
|
case '.jpeg':
|
||||||
|
$canvas = imagecreatefromjpeg($file);
|
||||||
|
break;
|
||||||
|
case '.jpg':
|
||||||
|
$canvas = imagecreatefromjpeg($file);
|
||||||
|
break;
|
||||||
|
case '.gif':
|
||||||
|
$canvas = imagecreatefromgif($file);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return [$canvas, $imagesize];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 放入字体
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function pushFontValue()
|
||||||
|
{
|
||||||
|
array_push($this->fontValue, $this->defaultFontValue);
|
||||||
|
$this->defaultFontValue = $this->defaultFont;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 放入图片
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function pushImageValue()
|
||||||
|
{
|
||||||
|
array_push($this->imageValue, $this->defaultImageValue);
|
||||||
|
$this->defaultImageValue = $this->defaultImage;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建背景
|
||||||
|
* @param int $w
|
||||||
|
* @param int $h
|
||||||
|
* @return false|resource
|
||||||
|
*/
|
||||||
|
public function createTrueColor(int $w = 0, int $h = 0)
|
||||||
|
{
|
||||||
|
return imagecreatetruecolor($w ? $w : $this->backgroundWidth, $h ? $h : $this->backgroundHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始画图
|
||||||
|
* @param bool $force 生成错误时是否抛出异常
|
||||||
|
* @return string
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function starDrawChart(bool $force = false): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$image = $this->createTrueColor();
|
||||||
|
|
||||||
|
foreach ($this->imageValue as $item) {
|
||||||
|
if ($item['imageUrl']) {
|
||||||
|
if ($item['imageStream']) {
|
||||||
|
$res = getimagesizefromstring($item['imageUrl']);
|
||||||
|
$mer = imagecreatefromstring($item['imageUrl']);
|
||||||
|
} else {
|
||||||
|
[$mer, $res] = $this->createFrom($item['imageUrl']);
|
||||||
|
}
|
||||||
|
if ($mer && $res) {
|
||||||
|
$scrW = $res[0] ?? 0;
|
||||||
|
$scrH = $res[1] ?? 0;
|
||||||
|
$imageWidth = $item['imageWidth'] ?: $scrW;
|
||||||
|
$imageHeight = $item['imageHeight'] ?: $scrH;
|
||||||
|
imagecopyresampled($image, $mer, $item['imageLeft'], $item['imageTop'], $item['imageRight'], $item['imageBottom'], $imageWidth, $imageHeight, $scrW, $scrH);
|
||||||
|
unset($scrW, $scrH, $imageWidth, $imageHeight, $res, $mer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->fontValue as $val) {
|
||||||
|
if (!is_array($val['fontColor']))
|
||||||
|
$fontColor = explode(',', $val['fontColor']);
|
||||||
|
else
|
||||||
|
$fontColor = $val['fontColor'];
|
||||||
|
if (count($fontColor) < 3)
|
||||||
|
throw new RuntimeException('fontColor 必须为三原色');
|
||||||
|
[$r, $g, $b] = $fontColor;
|
||||||
|
$fontColor = imagecolorallocate($image, $r, $g, $b);
|
||||||
|
$val['fontLeft'] = $val['fontLeft'] < 0 ? $this->backgroundWidth - abs($val['fontLeft']) : $val['fontLeft'];
|
||||||
|
$val['fontTop'] = $val['fontTop'] < 0 ? $this->backgroundHeight - abs($val['fontTop']) : $val['fontTop'];
|
||||||
|
imagettftext($image, $val['fontSize'], $val['fontAngle'], $val['fontLeft'], $val['fontTop'], $fontColor, $val['fontPath'], $val['fontText']);
|
||||||
|
unset($r, $g, $b, $fontColor);
|
||||||
|
}
|
||||||
|
if (is_null($this->fileName)) {
|
||||||
|
$this->fileName = md5(time());
|
||||||
|
}
|
||||||
|
|
||||||
|
$strlen = stripos($this->path, 'uploads');
|
||||||
|
$path = $this->path;
|
||||||
|
if ($strlen !== false) {
|
||||||
|
$path = substr($this->path, 8);
|
||||||
|
}
|
||||||
|
make_path($path, 4, true);
|
||||||
|
|
||||||
|
$save_file = $this->path . $this->fileName . '.' . $this->imageType;
|
||||||
|
switch ($this->imageType) {
|
||||||
|
case 'jpeg':
|
||||||
|
case 'jpg':
|
||||||
|
imagejpeg($image, $save_file, 70);
|
||||||
|
break;
|
||||||
|
case 'png':
|
||||||
|
imagepng($image, $save_file, 70);
|
||||||
|
break;
|
||||||
|
case 'gif':
|
||||||
|
imagegif($image, $save_file, 70);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new \RuntimeException('Incorrect type set:' . $this->imageType);
|
||||||
|
}
|
||||||
|
imagedestroy($image);
|
||||||
|
|
||||||
|
return $save_file;
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
if ($force || $e instanceof \RuntimeException)
|
||||||
|
throw new \Exception($e->getMessage());
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Magic access..
|
||||||
|
*
|
||||||
|
* @param $method
|
||||||
|
* @param $args
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function __call($method, $args): self
|
||||||
|
{
|
||||||
|
|
||||||
|
if (0 === stripos($method, 'set') && strlen($method) > 3) {
|
||||||
|
$method = lcfirst(substr($method, 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
$imageValueKes = array_keys($this->defaultImageValue);
|
||||||
|
$fontValueKes = array_keys($this->defaultFontValue);
|
||||||
|
|
||||||
|
if (in_array($method, $imageValueKes)) {
|
||||||
|
$this->defaultImageValue[$method] = array_shift($args);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($method, $fontValueKes)) {
|
||||||
|
$this->defaultFontValue[$method] = array_shift($args);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($method, $this->propsRule)) {
|
||||||
|
$this->{$method} = array_shift($args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -154,7 +154,10 @@ class UploadService
|
|||||||
try {
|
try {
|
||||||
$uploadType = $this->uploadType ?: sysConfig('upload_type');
|
$uploadType = $this->uploadType ?: sysConfig('upload_type');
|
||||||
//TODO 没有选择默认使用本地上传
|
//TODO 没有选择默认使用本地上传
|
||||||
if (!$uploadType) $uploadType = 1;
|
if (!$uploadType)
|
||||||
|
$uploadType = 1;
|
||||||
|
if (!is_int($uploadType))
|
||||||
|
$uploadType = (int)$uploadType;
|
||||||
switch ($uploadType) {
|
switch ($uploadType) {
|
||||||
case 1 :
|
case 1 :
|
||||||
$info = $this->uploadLocaFile($fileName);
|
$info = $this->uploadLocaFile($fileName);
|
||||||
@ -186,8 +189,6 @@ class UploadService
|
|||||||
if (is_string($info)) return $info;
|
if (is_string($info)) return $info;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->uploadPath = '';
|
|
||||||
$this->autoValidate = true;
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return $e->getMessage();
|
return $e->getMessage();
|
||||||
}
|
}
|
||||||
@ -244,6 +245,8 @@ class UploadService
|
|||||||
$filePath = Filesystem::path($fileName);
|
$filePath = Filesystem::path($fileName);
|
||||||
$fileInfo = new File($filePath);
|
$fileInfo = new File($filePath);
|
||||||
$url = '/uploads/' . $fileName;
|
$url = '/uploads/' . $fileName;
|
||||||
|
$this->uploadPath = '';
|
||||||
|
$this->autoValidate = false;
|
||||||
return $this->setUploadInfo($url, 1, $fileInfo->getFilename(), self::thumb('.' . $url), [
|
return $this->setUploadInfo($url, 1, $fileInfo->getFilename(), self::thumb('.' . $url), [
|
||||||
'Content-Length' => $fileInfo->getSize(),
|
'Content-Length' => $fileInfo->getSize(),
|
||||||
'Content-Type' => $fileInfo->getMime()
|
'Content-Type' => $fileInfo->getMime()
|
||||||
|
|||||||
@ -206,7 +206,8 @@ Route::group(function () {
|
|||||||
//短信购买异步通知
|
//短信购买异步通知
|
||||||
Route::post('sms/pay/notify', 'PublicController/sms_pay_notify')->name('smsPayNotify'); //短信购买异步通知
|
Route::post('sms/pay/notify', 'PublicController/sms_pay_notify')->name('smsPayNotify'); //短信购买异步通知
|
||||||
|
|
||||||
|
//获取关注微信公众号海报
|
||||||
|
Route::get('wechat/follow','wechat.WechatController/follow')->name('Follow');
|
||||||
|
|
||||||
})->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, false);
|
})->middleware(\app\http\middleware\AllowOriginMiddleware::class)->middleware(\app\http\middleware\AuthTokenMiddleware::class, false);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user