Merge branch 'hotfix/download_domain_fix' of wmtx/platform into release

落地页域名后台配置功能
master
万盟天下 4 years ago committed by Gogs
commit 3397319a36

@ -1312,20 +1312,23 @@ class CompanyStatementSetController extends Controller {
}
}
}
if($v['platform_amount'] == 0 && $v['statement_money'] == 0){
continue ;
}
if($type == 2 && $v['statement_money'] == 0){
//补点不存
}else{
if($v['platform_amount'] < 300){
//存未满
if($lackcompany['pay_amount'] != 0){
// if($lackcompany['pay_amount'] != 0){
$lask_id = $LackStatement->add($lackcompany);
$countdata['create_lack_ids'][] =$lask_id;
$countdata['lack_statement_money'] +=$lackcompany['statement_money'];
$countdata['lack_platform_amount'] +=$lackcompany['platform_amount'];
}
// }
}else{
if($v['pay_amount'] != 0){
// if($v['pay_amount'] != 0){
//存成功配置单号
$company =[
"pool_id"=>0,
@ -1356,7 +1359,7 @@ class CompanyStatementSetController extends Controller {
$countdata['platform_amount'] +=$v['platform_amount'];
$countdata['fine'] +=$v['fine'];
$countdata['reward'] +=$v['reward'];
}
// }
}
}
}

@ -79,7 +79,7 @@ class ApplyService {
public function getDownloadUrl($apply)
{
$host = C('DOMAIN_DOWNLOAD');
$host = $this->getDownloadDomain();
$host = $host ? $host : Request::getHost();
$code = $this->encodeApplyCode($apply, self::ENCRYPT_TYPE_DOWNLOAD);
return $host . '/index.php?s=/Home/Package/download/code/' . $code;
@ -87,12 +87,21 @@ class ApplyService {
public function getLandingPageUrl($apply)
{
$host = C('DOMAIN_DOWNLOAD');
$host = $this->getDownloadDomain();
$host = $host ? $host : Request::getHost();
$code = $this->encodeApplyCode($apply, self::ENCRYPT_TYPE_LANDING_PAGE);
return $host . '/index.php?s=/Home/Home/landingPage/code/' . $code;
}
public function getDownloadDomain()
{
if (C('APP_ENV') == 'prod') {
return C('DOMAIN_DOWNLOAD_PROD');
} else {
return C('DOMAIN_DOWNLOAD');
}
}
public function getApplyData($apply, $type, $version)
{
$data = null;

@ -264,16 +264,17 @@ class HomeController extends Controller
// $isIOS = true;
$downloadUrl = '';
$applyService = new ApplyService();
$downloadDomain = $applyService->getDownloadDomain();
if (!$isNewIos && $isIOS13) {
$downloadUrl = 'itms-services://?action=download-manifest&url=' . Request::getHost() . ltrim($gameSource['org_plist_url'], '.');
} else {
$applyService = new ApplyService();
$downloadUrl = $applyService->getDownloadUrl($apply);
}
$serviceQQ = M("config", "sys_")->field('value')->where("name='APP_QQ'")->find()['value'];
$ssgUrl = C('DOMAIN_DOWNLOAD') . '/mobile.php/Ssg/pay/game_id/' . $game['id'] . '/promote_id/' . $promoteId;
$ssgUrl = $downloadDomain . '/mobile.php/Ssg/pay/game_id/' . $game['id'] . '/promote_id/' . $promoteId;
/* if(in_array($game['id'], [187, 188])) {
$game['relation_game_name'] = '游戏下载';

@ -103,6 +103,7 @@ class PackageController extends Controller
M('user_action_log', 'tab_')->data($log)->add();
$downloadDomain = $applyService->getDownloadDomain();
if (Request::isIOS() || Request::isIPadOS()) {
$packageDownloadLogService = new PackageDownloadLogService();
$packageDownloadLogService->add([
@ -114,7 +115,7 @@ class PackageController extends Controller
$plistUrl = substr($packageUrl, 1, strlen($packageUrl));
header("HTTP/1.1 303 See Other");
header("Location: "."itms-services://?action=download-manifest&url=" . C('DOMAIN_DOWNLOAD') . '/' . ltrim($plistUrl, '/'));
header("Location: "."itms-services://?action=download-manifest&url=" . $downloadDomain . '/' . ltrim($plistUrl, '/'));
} else {
$this->gotoPkgUrl($packageUrl);
}
@ -122,6 +123,8 @@ class PackageController extends Controller
private function gotoPkgUrl($packageUrl)
{
$applyService = new ApplyService();
$downloadDomain = $applyService->getDownloadDomain();
if (preg_match("/http/", $packageUrl)) {
$url = str_replace('-internal', '', $packageUrl);
echo "<script>window.location.href='$url';</script>";
@ -136,7 +139,7 @@ class PackageController extends Controller
if (!file_exists($packageUrl)) {
$this->error('文件不存在哦,亲!');
}else{
redirect(C('DOMAIN_DOWNLOAD') . ltrim($packageUrl, '.'));
redirect($downloadDomain . ltrim($packageUrl, '.'));
}
}
}

@ -2496,3 +2496,20 @@ ADD COLUMN `performance_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '维护
ALTER TABLE `sys_ucenter_member`
ADD COLUMN `work_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '离职状态' AFTER `openid_sign`;
CREATE TABLE `tab_payment_orders` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`merchant_id` int(11) NOT NULL COMMENT '商户ID',
`order_no` varchar(100) NOT NULL COMMENT '订单号',
`business_type` varchar(20) NOT NULL DEFAULT '' COMMENT '业务类型',
`order_amount` decimal(12, 2) not null default '0.00' comment '订单金额',
`fee` decimal(12, 2) not null default '0.00' comment '手续费',
`product_name` varchar(255) NOT NULL DEFAULT '' COMMENT '产品名称',
`channel_order_no` varchar(100) NOT NULL DEFAULT '' COMMENT '渠道订单号',
`channel_user_account` varchar(100) NOT NULL DEFAULT '' COMMENT '渠道用户',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`created_at` datetime NOT NULL COMMENT '订单创建时间',
`finished_at` datetime NOT NULL COMMENT '订单完成时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Loading…
Cancel
Save