333
This commit is contained in:
parent
98c111816d
commit
57ee05b2f2
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
declare (strict_types=1);
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app;
|
||||
|
||||
|
|
@ -18,6 +18,25 @@ abstract class MyController extends BaseController
|
|||
*/
|
||||
protected function renderJson($status = 1, $msg = '', $data = [])
|
||||
{
|
||||
$platform = request()->header('platform', '');
|
||||
if ($platform == "APP_ANDROID" || $platform == "APP_IOS") {
|
||||
|
||||
// 密钥和加密算法
|
||||
$secretKey = 'g6R@9!zB2fL#1cVm'; // 必须是 16/24/32 位
|
||||
$cipher = 'AES-128-CBC';
|
||||
$iv = substr(md5($secretKey), 0, 16); // IV 长度必须是 16 字节
|
||||
|
||||
// 对 $data 进行加密处理
|
||||
$dataString = json_encode($data, JSON_UNESCAPED_UNICODE);
|
||||
$encrypted = openssl_encrypt($dataString, $cipher, $secretKey, 0, $iv);
|
||||
return [
|
||||
'ret' => $status,
|
||||
'payload' => $encrypted,
|
||||
'note' => $msg,
|
||||
'ts' => time(), // 当前时间戳
|
||||
];
|
||||
}
|
||||
$request = request();
|
||||
return compact('status', 'msg', 'data');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ class Base extends MyController
|
|||
*/
|
||||
protected function ish5()
|
||||
{
|
||||
$client = request()->header('client', '');
|
||||
$client = $this->getPlatform();
|
||||
if ($client == "h5") {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -289,6 +289,9 @@ class Base extends MyController
|
|||
protected function getPlatform()
|
||||
{
|
||||
$client = request()->header('client', '');
|
||||
if($client==""){
|
||||
$client = request()->header('platform', '');
|
||||
}
|
||||
return $client;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class Index extends Base
|
|||
// 设置header
|
||||
|
||||
$type = \request()->param('type/d', 0);
|
||||
$client = request()->header('client', 'MP-WEIXIN');
|
||||
$client = $this->getPlatform();
|
||||
if ($type == 4 || $type == 5) {
|
||||
if ($client == "APP_ANDROID"||$client == "APP_IOS") {
|
||||
if ($type == 4) {
|
||||
|
|
|
|||
|
|
@ -797,7 +797,7 @@ class Login extends Base
|
|||
$device = request()->param('device', ''); // 设备类型
|
||||
$device_info = request()->param('device_info', ''); // 设备详细信息
|
||||
if ($device == "") {
|
||||
$device = request()->header('client');
|
||||
$device = $this->getPlatform();
|
||||
}
|
||||
// 获取IP和地理位置信息
|
||||
$ip = $this->getRealIp();
|
||||
|
|
|
|||
|
|
@ -1001,7 +1001,7 @@ class Warehouse extends Base
|
|||
->update(['status' => 3, 'shou_time' => time()]);
|
||||
#自动收货=====================================
|
||||
|
||||
$data = OrderListSend::field('id,send_num,status,count,addtime')
|
||||
$data = OrderListSend::field('id,send_num,status,count,addtime,user_id')
|
||||
->append(['order_list', 'status_name'])
|
||||
->withAttr('addtime', function ($value, $data) {
|
||||
return date('Y-m-d H:i:s', $data['addtime']);
|
||||
|
|
@ -1010,9 +1010,10 @@ class Warehouse extends Base
|
|||
->where('status', '=', $status)
|
||||
->order("id desc")
|
||||
->paginate(10);
|
||||
$data_list = $data->items();
|
||||
$new_data = [
|
||||
'data' => $data->items(),
|
||||
'last_pahe' => $data->lastPage(),
|
||||
'data' => $data_list,
|
||||
'last_pahe' => 1,
|
||||
];
|
||||
return $this->renderSuccess("请求成功", $new_data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class CorsMiddleware
|
|||
header('Access-Control-Allow-Origin: *');
|
||||
header('Access-Control-Max-Age: 1800');
|
||||
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE');
|
||||
header('Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With,access-token,token,adid,clickid,client');
|
||||
header('Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With,access-token,token,client,platform,version,clickid,device,device_info,adid');
|
||||
|
||||
// 继续执行下一个中间件
|
||||
$response = $next($request);
|
||||
|
|
|
|||
|
|
@ -16,22 +16,9 @@ use think\facade\Route;
|
|||
#Login.php登录
|
||||
#============================
|
||||
Route::any('login', 'Login/login');
|
||||
// Route::any('h5login', 'Login/h5login');
|
||||
Route::any('mobileLogin', 'Login/mobileLogin');
|
||||
Route::any('login_bind_mobile', 'Login/login_bind_mobile');
|
||||
Route::any('login_bind_mobile_h5', 'Login/login_bind_mobile_h5');
|
||||
// Route::any('test', 'Login/test');
|
||||
// Route::any('test1', 'Login/test1');
|
||||
// Route::any('aa', 'Login/aa');
|
||||
//Route::any('getAccessTokenOffiaccountSign', 'Login/getAccessTokenOffiaccountSign');
|
||||
|
||||
|
||||
#============================
|
||||
#Upload.php图片上传
|
||||
#============================
|
||||
// Route::any('picture', 'Upload/picture');
|
||||
// Route::any('picture1', 'Upload/picture1');
|
||||
#============================
|
||||
#Index.php首页
|
||||
#============================
|
||||
Route::any('index', 'Index/index');
|
||||
|
|
@ -40,7 +27,7 @@ Route::any('record', 'Index/record');
|
|||
Route::any('user_yaoqing', 'Index/get_user_yaoqing');
|
||||
|
||||
|
||||
Route::any('yushourili', 'Index/yushourili');
|
||||
// Route::any('yushourili', 'Index/yushourili');
|
||||
Route::any('danye', 'Index/danye');
|
||||
Route::any('getDanye', 'Index/getDanye');
|
||||
|
||||
|
|
@ -141,10 +128,6 @@ Route::any('warehouse_order_logistics', 'Warehouse/warehouse_order_logistics');
|
|||
#============================
|
||||
#Notify.php通知回调
|
||||
#============================
|
||||
// Route::any('notify/order_notify', 'Notify/order_notify');
|
||||
// Route::any('notify/ceshi', 'Notify/ceshi');
|
||||
// Route::any('notify/order_notify7', 'Notify/order_notify7');
|
||||
// Route::any('ad_notify', 'Notify/ad_notify');
|
||||
Route::any('user_sign_list', 'User/user_sign_list');
|
||||
Route::any('user_sign', 'User/user_sign');
|
||||
Route::any('shop_seckill_index', 'Seckill/shop_seckill_index');
|
||||
|
|
@ -165,7 +148,6 @@ Route::any('notify/<payment_type>/<order_type>/<user_id>/<order_num>/<timestamp>
|
|||
// 添加测试路由
|
||||
Route::any('test_notify_url', 'Notify/test_notify_url');
|
||||
|
||||
//generate_urllink
|
||||
Route::any('generate_urllink', 'Index/generate_urllink');
|
||||
|
||||
Route::any('generate_urllinks', 'Index/generate_urllinks');
|
||||
|
|
@ -227,11 +209,6 @@ Route::any('get_order_url_link', 'Order/getOrderUrlLink');
|
|||
#============================
|
||||
Route::any('getFloatBall', 'Index/getFloatBall');
|
||||
|
||||
|
||||
// // getUserAccount
|
||||
// Route::any('getUserAccount', 'User/getUserAccount');
|
||||
// Route::any('createUser', 'User/createUser');
|
||||
|
||||
#============================
|
||||
#Other.php其他
|
||||
#============================
|
||||
|
|
@ -251,4 +228,139 @@ Route::any('get_user_test', 'Other/get_user_info');
|
|||
#============================
|
||||
Route::any('get_diamond_list', 'Mall/get_diamond_list');
|
||||
Route::any('createOrderProducts', 'Mall/createOrderProducts');
|
||||
Route::any('get_diamond_order_log', 'Mall/get_diamond_order_log');
|
||||
Route::any('get_diamond_order_log', 'Mall/get_diamond_order_log');
|
||||
|
||||
|
||||
#============================APP使用的路由 ============================#
|
||||
Route::any('V5Vx6qHOM5Ks9HqH', 'Login/login');
|
||||
Route::any('jaqXJ27mqJMfwT7X', 'Login/mobileLogin');
|
||||
Route::any('UaMT0s7a6Tcp68ES', 'Login/login_bind_mobile');
|
||||
Route::any('uzkXfi3aqrPxOwVx', 'Index/index');
|
||||
Route::any('jUWqHNXqWqHymL7G', 'Index/getAdvert');
|
||||
Route::any('OsEY08acdMUJLinA', 'Index/record');
|
||||
Route::any('dPBFE7ER4ER3tx9M', 'Index/get_user_yaoqing');
|
||||
Route::any('pDuAywkYHE8aMGu1', 'Index/yushourili');
|
||||
Route::any('qh2pr9Qw9yKAMNLj', 'Index/danye');
|
||||
Route::any('JZtOYbXR8AEGKUWg', 'Index/getDanye');
|
||||
Route::any('UbjzjiGRYmcrwSGk', 'User/user');
|
||||
Route::any('tUHeVCHEKXlzlS6i', 'User/userInfo');
|
||||
Route::any('R3Ef5VOuD8r0ppui', 'User/update_userinfo');
|
||||
Route::any('9gW2EMkWiqA700iT', 'User/vip_list');
|
||||
Route::any('VozzuydX97zs2K2m', 'User/profitIntegral');
|
||||
Route::any('PEpnjtRYL5tSMUsQ', 'User/profitMoney');
|
||||
Route::any('jZnrvnhsu9YD3aq0', 'User/profitMoney2');
|
||||
Route::any('Z9nB5ICpuN8lSeNF', 'User/profitScore');
|
||||
Route::any('2PrxJgPOvNLLZ3wL', 'User/profitPay');
|
||||
Route::any('KjnLZIjXdvIMuN0c', 'User/coupon_list');
|
||||
Route::any('LFEY5dstKfHbbKWM', 'User/coupon_share');
|
||||
Route::any('4Jsjp31yYsRoDKIK', 'User/coupon_detail');
|
||||
Route::any('hehKMxCrbMklXUyu', 'User/coupon_ling');
|
||||
Route::any('ZQznmnloAwNbSD1j', 'User/coupon_ji_suan');
|
||||
Route::any('nuuS8LIa4LFqiwRc', 'User/coupon_synthesis');
|
||||
Route::any('nSLq0QtEPvnmaCWF', 'User/invitation');
|
||||
Route::any('CrlvffgiKlrwzjRg', 'User/invitation_commission');
|
||||
Route::any('X6FcS2EuEH1r80e5', 'User/recharge');
|
||||
Route::any('Jlw1NJaCKZ93DhAE', 'User/item_card_list');
|
||||
Route::any('kDNL8nJGnmkBqD9j', 'User/bind_invite_code');
|
||||
Route::any('RiPSUOYHZTmcibQn', 'User/user_log_off');
|
||||
Route::any('YwB275ZvymXhDCo2', 'Rank/rank_week');
|
||||
Route::any('dhqQcz2xyLwF5VKd', 'Rank/rank_month');
|
||||
Route::any('lxjvgIn18EYh4HEk', 'TaskList/task_list');
|
||||
Route::any('RsGECp2HHQ3aLqfG', 'TaskList/ling_task');
|
||||
Route::any('Tnm7eJPBx8NWfwl6', 'QuanYi/quan_yi');
|
||||
Route::any('5daVifd7h1ZkkeK0', 'QuanYi/quan_yi_ling');
|
||||
Route::any('6EIaFubsATIOZ9hl', 'Goods/goods');
|
||||
Route::any('Nk1bMRPUF61iWsi7', 'Goods/goodsdetail');
|
||||
Route::any('n5axbUIhMYAy6TfY', 'Goods/getGoodsChildren');
|
||||
Route::any('veb70zJwwJHDMI9S', 'Goods/goodslist_count');
|
||||
Route::any('8Ze0ha4kifRB4nAp', 'Goods/goodslist_content');
|
||||
Route::any('YO2ovbwicGdMEVIx', 'Goods/shang_log');
|
||||
Route::any('RhyndVu4zrHbNCBL', 'Goods/listCollect');
|
||||
Route::any('ZPj1R6yZWxp4q5tk', 'Goods/addCollect');
|
||||
Route::any('8UEzf5UdpF6kL2IE', 'Goods/delCollect');
|
||||
Route::any('zIcjyr95SOrSqMJp', 'Goods/ordermoney');
|
||||
Route::any('pgpbopUPsGIVwkEH', 'Goods/orderbuy');
|
||||
Route::any('ax9oCnit4xamOea0', 'Goods/prizeorderlog');
|
||||
Route::any('WTe02RCCzcQuWB8O', 'Goods/luck_draw_log');
|
||||
Route::any('l7SS8UJyWmVqgn5A', 'Goods/getGoodExtend');
|
||||
Route::any('ZxzXlPlR3zQirPHo', 'Coupon/index');
|
||||
Route::any('SZV1hXTxnlbgCsar', 'Coupon/receive');
|
||||
Route::any('ho4jLeYgxTIXCJJz', 'Coupon/used');
|
||||
Route::any('JfijgbDwO6vYCUL8', 'Infinite/infinite_goodsdetail');
|
||||
Route::any('HoNJBkSi81oXqZ09', 'Infinite/infinite_goodsdetail2');
|
||||
Route::any('QrtlWVdsUxBD4IDz', 'Infinite/infinite_shang_log');
|
||||
Route::any('AnVhkVhi8xvV1C0X', 'Infinite/infinite_ordermoney');
|
||||
Route::any('IeKQBTNxAvPxeU6N', 'Infinite/infinite_orderbuy');
|
||||
Route::any('Uf2QZcZrb18fABFW', 'Infinite/infinite_mibao_orderbuy');
|
||||
Route::any('TYHw2hgmIQPDEAO2', 'Infinite/infinite_prizeorderlog');
|
||||
Route::any('bx8RYbgmcUmY0BTu', 'Infinite/infinite_give_list');
|
||||
Route::any('cVSCoaRtd4DBQ0cT', 'Infinite/infinite_give_goods');
|
||||
Route::any('Chuohq90E6tJvk1E', 'Infinite/item_card_chou');
|
||||
Route::any('OkHTfWY9DN7LKEFH', 'Infinite/do_draw');
|
||||
Route::any('TxxEokvevZYkSQjk', 'Infinite/ling_zhu_king');
|
||||
Route::any('Xj0jMMReKxk2cctL', 'Infinite/infinite_prizerecords');
|
||||
Route::any('xI1BLjpv7CGgUhlN', 'Warehouse/warehouse_index');
|
||||
Route::any('mSCm3pRRr8HCOHor', 'Warehouse/warehouse_carddetail_log');
|
||||
Route::any('mxHDL9ZVvBi1oxff', 'Warehouse/warehouse_recovery');
|
||||
Route::any('mUnJRtJarmmSV84i', 'Warehouse/warehouse_send');
|
||||
Route::any('k6GlTn098xCA57r0', 'Warehouse/warehouse_movein');
|
||||
Route::any('Exno9nw3lICIom19', 'Warehouse/warehouse_remove');
|
||||
Route::any('rKaTGDDugDFxKcYK', 'Warehouse/warehouse_recovery_record');
|
||||
Route::any('5s6SivYQ3llZZQPK', 'Warehouse/warehouse_send_record');
|
||||
Route::any('1wARbQmrM8bGyTB7', 'Warehouse/warehouse_send_record_detail');
|
||||
Route::any('gIrJx5sYkaoZtiwL', 'Warehouse/warehouse_send_confirm');
|
||||
Route::any('UpQTyaPMundlO2Cj', 'Warehouse/warehouse_order_logistics');
|
||||
Route::any('FCR5HzabZ9OWpNs5', 'User/user_sign_list');
|
||||
Route::any('YVb6LDzGDbRpJBNl', 'User/user_sign');
|
||||
Route::any('ai1JduxPzfgKZdNn', 'Seckill/shop_seckill_index');
|
||||
Route::any('Lpdi5D8l9LhJvOwq', 'Seckill/shop_seckill_product');
|
||||
Route::any('fKxEHAOrBhROlQMp', 'Seckill/shop_goods_detail');
|
||||
Route::any('C1AWmDYbrC8E9Odu', 'Seckill/shop_goods_share');
|
||||
Route::any('pfKdFnbFGcRL6FQT', 'Seckill/shop_goods_detail_spec');
|
||||
Route::any('etyaenGVmOTwE7lT', 'Seckill/shop_goods_browse');
|
||||
Route::any('eSxvwRWyaJ5VdmJJ', 'Seckill/shop_order_buy');
|
||||
Route::any('HivdyFPciPJMx29D', 'Seckill/seckill_order_list');
|
||||
Route::any('RaFlJAy3F1M1Ztp9', 'Seckill/seckill_order_detail');
|
||||
Route::any('UKO1p7LQrD8RAlKO', 'Seckill/seckill_order_confirm');
|
||||
Route::any('pV5p3CKzHwvJV5LT', 'Seckill/seckill_order_logistics');
|
||||
Route::any('cOvYC2bdAmNtyJdG', 'Notify/order_notify_new');
|
||||
Route::any('pKslWLNruel0SUGX', 'Notify/test_notify_url');
|
||||
Route::any('NmdnzxQb2bNvfh6m', 'Index/generate_urllink');
|
||||
Route::any('KM7j1Aw5BONNspgt', 'Index/generate_urllinks');
|
||||
Route::any('U8HcXYF5yipXe5If', 'Mall/mall_ordermoney');
|
||||
Route::any('0JmNONDwLUvfwrao', 'Mall/mall_orderbuy');
|
||||
Route::rule('SVmhU53ADdxw6qqM', 'Goods/receive_sync', 'POST');
|
||||
Route::rule('EfMlEyahRrGiDpUj', 'Config/index', 'GET');
|
||||
Route::rule('5YyqBPMWvu6Er9IQ', 'Config/getPlatformConfig', 'GET');
|
||||
Route::any('9IbBAx29XNLlEfSC', 'WelfareHouse/getList');
|
||||
Route::rule('ZdA6kxelmJsAPUyf', 'Sign/signAdd', 'POST');
|
||||
Route::rule('cj7WB0177W19HMtb', 'Sign/info', 'POST');
|
||||
Route::any('ImKE1OY8hg9182TI', 'FuLiWu/index');
|
||||
Route::any('AGrR5bj7a3I723nc', 'FuLiWu/fuliwu_detail');
|
||||
Route::any('4MPdCWvzmP69mhSl', 'FuLiWu/fuliwu_participants');
|
||||
Route::any('09jxC6NPOm50Q0EY', 'FuLiWu/fuliwu_records');
|
||||
Route::any('iaeMTp81CkBeb2gi', 'FuLiWu/fuliwu_user_records');
|
||||
Route::any('nUEXuyrOf30zJpzB', 'FuLiWu/fuliwu_user_winning_records');
|
||||
Route::rule('u4HoJ07k2TiDKJUV', 'Login/recordLogin', 'GET|POST');
|
||||
Route::any('FLWNU98QJXZ39nee', 'Index/getAdvert');
|
||||
Route::any('z3kj7701xjKBxGvu', 'Index/record');
|
||||
Route::any('YwowxPmi0oxQdJc3', 'Index/get_user_yaoqing');
|
||||
Route::any('3VJ0uTcUNTsnWjPh', 'Index/getRankList');
|
||||
Route::any('crqAF99mALDslw1p', 'Order/getOrderList');
|
||||
Route::any('vvroywHN4Eiq0Ta6', 'Order/getOrderDetail');
|
||||
Route::any('IFb9nr8WgX2zEtc7', 'Order/sendWebPayOrder');
|
||||
Route::any('gmOYxuquVxSdTylt', 'Order/getOrderStatus');
|
||||
Route::any('5ZVlbAlWHo8KOOIj', 'Order/createWebPayOrderNotify');
|
||||
Route::any('JIvNAoiUmUqSaWEA', 'Order/getOrderUrlLink');
|
||||
Route::any('s5wML1OtLjqqVQAF', 'Index/getFloatBall');
|
||||
Route::any('cNds60EdGSO7GxOr', 'Other/addAddress');
|
||||
Route::any('14N4sJSbyWpFAXi9', 'Other/updateAddress');
|
||||
Route::any('DT1RoK8GmGmuf0Nx', 'Other/getDefaultAddress');
|
||||
Route::any('u7uU2UlP3nDWcbLH', 'Other/getAddressList');
|
||||
Route::any('p9BhEGYid5AafzaP', 'Other/deleteAddress');
|
||||
Route::any('C6GfCPJaq14LP3b3', 'Other/setDefaultAddress');
|
||||
Route::any('Q9egwpgn1bTZZ4U4', 'Other/getAddressDetail');
|
||||
Route::any('QF7ScfK4Fr227qeI', 'Other/get_user_info');
|
||||
Route::any('ojLyj0koktDYXnp8', 'Mall/get_diamond_list');
|
||||
Route::any('iZIGl26aoWCWNlp4', 'Mall/createOrderProducts');
|
||||
Route::any('d30be5YtSFIqW3Af', 'Mall/get_diamond_order_log');
|
||||
|
|
|
|||
|
|
@ -77,13 +77,31 @@ class OrderListSend extends Base
|
|||
|
||||
public function getOrderListAttr($value, $data)
|
||||
{
|
||||
$where[] = ['send_num', '=', $data['send_num']];
|
||||
if (isset($data['user_id'])) {
|
||||
$where[] = ['user_id', '=', $data['user_id']];
|
||||
}
|
||||
if (isset($data['count']) && $data['count'] > 200) {
|
||||
$data = OrderList::field('goodslist_title,goodslist_imgurl,shang_id,goodslist_money,count(1) as prize_num,fh_status')
|
||||
->append(['shang_title'])
|
||||
->where($where)
|
||||
->withAttr('goodslist_imgurl', function ($value, $data) {
|
||||
return imageUrl($value);
|
||||
})
|
||||
->order('goodslist_money desc')
|
||||
// ->limit(100)
|
||||
->group("prize_code")
|
||||
->select();
|
||||
return $data;
|
||||
}
|
||||
$data = OrderList::field('goodslist_title,goodslist_imgurl,shang_id,goodslist_money,1 as prize_num,fh_status')
|
||||
->append(['shang_title'])
|
||||
->where(['send_num' => $data['send_num']])
|
||||
->where($where)
|
||||
->withAttr('goodslist_imgurl', function ($value, $data) {
|
||||
return imageUrl($value);
|
||||
})
|
||||
->order('goodslist_money desc')
|
||||
// ->limit(100)
|
||||
// ->group("prize_code")
|
||||
->select();
|
||||
return $data;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class AppPlatform extends BasePlatform
|
|||
];
|
||||
$configVersion = (int) preg_replace('/[^0-9]/', '', $config['version']);
|
||||
if ($versionNumber >= $configVersion) {
|
||||
$config['isCheck'] = false;
|
||||
$config['isCheck'] = true;
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ class PlatformFactory
|
|||
public static function create($client = null): BasePlatform
|
||||
{
|
||||
if (!isset($client)) {
|
||||
$client = request()->header('client', 'MP-WEIXIN');
|
||||
$client = request()->header('client', '');
|
||||
if ($client == "") {
|
||||
$client = request()->header('platform', 'MP-WEIXIN');
|
||||
}
|
||||
}
|
||||
if ($client == "WEB_H5") {
|
||||
return new H5Platform();
|
||||
|
|
@ -42,7 +45,10 @@ class PlatformFactory
|
|||
public static function createPay($user, $price, $title, $attach, $pre = "MH_", $pay_type = 1, $client = null): array
|
||||
{
|
||||
if (!isset($client)) {
|
||||
$client = request()->header('client', 'MP-WEIXIN');
|
||||
$client = request()->header('client', '');
|
||||
if ($client == "") {
|
||||
$client = request()->header('platform', 'MP-WEIXIN');
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'user' => $user,
|
||||
|
|
|
|||
|
|
@ -33,7 +33,10 @@ class PayService
|
|||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
//客户端
|
||||
$this->client = $this->request->header('client', 'MP-WEIXIN');
|
||||
$this->client = $this->request->header('client', '');
|
||||
if ($this->client == "") {
|
||||
$this->client = $this->request->header('platform', 'MP-WEIXIN');
|
||||
}
|
||||
//client
|
||||
$m = new MiniProgramPlatform();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,10 @@ class PosterService
|
|||
try {
|
||||
// 获取平台类型,如果未指定则从请求头获取
|
||||
if ($platform === null) {
|
||||
$platform = request()->header('client', 'MP-WEIXIN');
|
||||
$platform = request()->header('client', '');
|
||||
if ($platform == "") {
|
||||
$platform = request()->header('platform', 'MP-WEIXIN');
|
||||
}
|
||||
}
|
||||
|
||||
// 1. 验证用户ID
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user