Compare commits

..

9 Commits
master ... hxd

Author SHA1 Message Date
ljl 2349f1104b 修改 7 months ago
ljl 0fc827d5e1 修改bug 7 months ago
elf ae05762cc0 yh 7 months ago
elf e8214180a0 yh 7 months ago
elf 80f6a9fae9 yh 7 months ago
elf 6f3faa33dd yh 7 months ago
elf 640f333830 修改 7 months ago
elf c96d4a2375 y 7 months ago
elf f6241f961a 修改 7 months ago

@ -5,7 +5,7 @@ namespace Admin\Controller;
class CompanySystemRatioController extends AdminController
{
private $api = "http://admin.jianghuifa.cn/index.php?g=Api&m=CpJuheCompany&a=ratioIndex";
private $api = "http://admin.hexidongkeji.top/index.php?g=Api&m=CpJuheCompany&a=ratioIndex";
public function _initialize()
{

@ -15,6 +15,7 @@ use Admin\Event\QiNiuEvent;
use Think\Model;
use Think\Upload;
use Base\Service\OssService;
use Base\Tool\Storage;
/**
* 图片模型
@ -70,15 +71,14 @@ class PictureModel extends Model{
$this->where(['id'=>$value['id']])->save($data);
}
}
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
$path = explode('/', $value['path']);
$saveFileName = 'icon/' . $path[4];
$localFilePath = '.' . $value['path'];
$ossService = new OssService();
$result = $ossService->upload($localFilePath, $saveFileName);
$result = Storage::upload($localFilePath, $saveFileName);
if ($result['status']) {
$dataUrl['oss_url'] = $ossService->getUrl($saveFileName);
$coo = $this->where(['id' => $value['id']])->save($dataUrl);
$dataUrl['oss_url'] = $result['data']['url'];
$this->where(['id' => $value['id']])->save($dataUrl);
} else {
$this->error = $result['message'];
return false;

@ -151,19 +151,19 @@ function check_order($order_number,$pay_order_number){
}
function get_img_url($cover_id){
if(empty($cover_id)){
return "";
}
$picture = M('Picture')->where(array('status'=>1))->getById($cover_id);
if (C('OSS_STATUS')) {
if(!empty($picture['oss_url'])){
return $picture['oss_url'];
}else{
return 'http://' . $_SERVER['HTTP_HOST'] . __ROOT__.$picture['path'];
}
} else {
return 'http://' . $_SERVER['HTTP_HOST'] .__ROOT__.$picture['path'];
}
if(empty($cover_id)){
return "";
}
$picture = M('Picture')->where(array('status'=>1))->getById($cover_id);
if (C('STORAGE_TYPE')) {
if(!empty($picture['oss_url'])){
return $picture['oss_url'];
}else{
return 'http://' . $_SERVER['HTTP_HOST'] . __ROOT__.$picture['path'];
}
}else{
return 'http://' . $_SERVER['HTTP_HOST'] .__ROOT__.$picture['path'];
}
}

@ -1,10 +1,9 @@
<?php
namespace Base\Service;
use Base\Model\PromoteModel;
use Base\Model\ApplyModel;
use Base\Tool\Base62;
use Base\Tool\PlistDemo;
use Base\Tool\Storage;
use GuzzleHttp\Client;
class GameSourceService {
@ -332,7 +331,7 @@ class GameSourceService {
public function uploadPackage($localFilePath, $distFilePath, $isDeleteLocal = false)
{
$isChunk = C('PACKAGE_CHUNK_ENABLED') ? true : false;
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
if ($isChunk) {
return $this->uploadPackageChunk($localFilePath, $distFilePath, $isDeleteLocal);
} else {
@ -356,7 +355,7 @@ class GameSourceService {
'timeout' => 30.0,
]);
try {
$response = $client->post('/upload', [
$response = $client->post('/upload/upload', [
'verify' => false,
'form_params' => [
'file' => $localFilePath,
@ -378,13 +377,15 @@ class GameSourceService {
'message' => '请求异常: ' . $e->getMessage(),
];
}
if ($result['code'] == '0000') {
$result['status'] = true;
}
return $result;
}
public function uploadPackageOnce($localFilePath, $distFilePath, $isDeleteLocal = false)
{
$ossService = new OssService();
$result = $ossService->upload($localFilePath, $distFilePath);
$result = Storage::upload($localFilePath, $distFilePath);
if ($isDeleteLocal && file_exists($localFilePath)) {
@unlink($localFilePath);
}

@ -0,0 +1,94 @@
<?php
namespace Base\Tool;
use Base\Tool\StorageClient;
use Exception;
use Qcloud\Cos\Client as BaseCosClient;
/**
* 腾讯云OBS
*/
class CosClient implements StorageClient
{
private $secretId;
private $secretKey;
private $region;
private $domain;
private $bucket;
private $client;
public function __construct()
{
$this->domain = C('COS_DOMAIN');
$this->region = C('COS_REGION');
$this->bucket = C('COS_BUCKET');
$this->secretId = C('COS_SECRET_ID');
$this->secretKey = C('COS_SECRET_KEY');
$this->client = new BaseCosClient(
[
'region' => $this->region,
'scheme' => 'https', //协议头部默认为http
'credentials'=> [
'secretId' => $this->secretId,
'secretKey' => $this->secretKey,
]
]
);
}
public function upload($localFilePath, $saveFileName)
{
try {
$file = fopen($localFilePath, 'rb');
if (!$file) {
throw new Exception('读取文件失败');
}
$result = $this->client->Upload(
$this->bucket,
$saveFileName,
$file
);
return [
'status' => true,
'message' => '上传成功',
'data' => [
'url' => $this->getUrl($saveFileName)
]
];
} catch (\Exception $e) {
return [
'status' => false,
'message' => $e->getMessage()
];
}
}
public function delete($deleteFile)
{
try {
$result = $this->client->deleteObject(array(
'Bucket' => $this->bucket,
'Key' => $deleteFile
));
return [
'status' => true,
'message' => '删除成功',
];
} catch (\Exception $e) {
return [
'status' => false,
'message' => $e->getMessage()
];
}
}
public function getUrl($saveFileName)
{
return $this->domain . '/' . $saveFileName;
}
public function __destruct()
{
}
}

@ -0,0 +1,113 @@
<?php
namespace Base\Tool;
use Base\Tool\StorageClient;
use Obs\ObsClient as BaseObsClient;
/**
* 华为云OBS
*/
class ObsClient implements StorageClient
{
const MAX_PART_SIZE = 5368709120;
const MID_PART_SIZE = 10485760;
const MIN_PART_SIZE = 102400;
private $accessKey;
private $secretKey;
private $endpoint;
private $bucket;
private $domain;
private $client;
public function __construct()
{
$this->accessKey = C('OBS_ACCESS_KEY');
$this->secretKey = C('OBS_SECRET_KEY');
$this->endpoint = C('OBS_ENDPOINT');
$this->domain = C('OBS_DOMAIN');
$this->bucket = C('OBS_BUCKET');
$this->client = new BaseObsClient([
'key' => $this->accessKey,
'secret' => $this->secretKey,
'endpoint' => $this->endpoint
]);
}
public function upload($localFilePath, $saveFileName)
{
/* $resp = $this->client->putObject([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'SourceFile' => $localFilePath,
]); */
try {
$this->multiuploadFile($localFilePath, $saveFileName);
return [
'status' => true,
'message' => '上传OSS成功',
'data' => [
'url' => $this->getUrl($saveFileName)
]
];
} catch (\Obs\ObsException $e) {
return [
'status' => false,
'message' => $e->getExceptionMessage()
];
}
}
private function multiuploadFile($file, $saveFileName)
{
$resp = $this->client->initiateMultipartUpload([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'ContentType' => 'text/plain'
]);
$uploadId = $resp['UploadId'];
$packetSize = 1048576;
$byteTotal = filesize($file);
$packetTotal = ceil($byteTotal / $packetSize);
$fileContent = fopen($file, 'r');
$parts = [];
for ($i=0; $i<$packetTotal; $i++) {
$packetFileContent = fread($fileContent, $packetSize);
$resp = $this->client->uploadPart([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'UploadId' => $uploadId,
'PartNumber' => $i+1,
'Body' => $packetFileContent
]);
$parts[] = ['PartNumber' => $i+1, 'ETag' => $resp['ETag']];
}
fclose($fileContent);
$resp = $this->client->completeMultipartUpload([
'Bucket' => $this->bucket,
'Key' => $saveFileName,
'UploadId' => $uploadId,
'Parts' => $parts
]);
}
public function delete($deleteFile)
{
$resp = $this->client->deleteObject([
'Bucket' => $this->bucket,
'Key' => $deleteFile,
]);
}
public function getUrl($saveFileName)
{
return $this->domain . '/' . $saveFileName;
}
public function __destruct()
{
$this->client->close();
}
}

@ -0,0 +1,118 @@
<?php
namespace Base\Tool;
use OSS\Core\OssUtil;
use OSS\OssClient as BaseOssClient;
use OSS\Core\OSsException;
/**
* 阿里云OSS
*/
class OssClient implements StorageClient {
private $accessKeyId = '';
private $accessKeySecret = '';
private $endpoint = '';
private $isCName = false;
private $bucket = '';
private $domain = '';
private $client;
private $errorMessage = '';
public function __construct()
{
Vendor('OSS.autoload');
$this->accessKeyId = C('OSS_ACCESS_KEY_ID');
$this->accessKeySecret = C('OSS_ACCESS_KEY_SECRET');
$this->endpoint = C('OSS_ENDPOINT');
$this->domain = C('OSS_DOMAIN');
$this->isCName = C('OSS_IS_CNAME');
$this->bucket = C('OSS_BUCKET');
$this->client = new BaseOssClient($this->accessKeyId, $this->accessKeySecret, $this->endpoint, $this->isCName);
}
public function upload($localFilePath, $saveFileName)
{
try {
$this->multiuploadFile($localFilePath, $saveFileName);
return [
'status' => true,
'message' => '上传OSS成功',
'data' => [
'url' => $this->getUrl($saveFileName)
]
];
} catch (OssException $e) {
return [
'status' => false,
'message' => $e->getMessage()
];
}
}
private function multiuploadFile($file, $saveFileName)
{
$uploadId = $this->client->initiateMultipartUpload($this->bucket, $saveFileName);
/*
* step 2. 上传分片
*/
$partSize = 5 * 1000 * 1024;
$uploadFile = $file;
$uploadFileSize = filesize($uploadFile);
$pieces = $this->client->generateMultiuploadParts($uploadFileSize, $partSize);
$responseUploadPart = [];
$uploadPosition = 0;
$isCheckMd5 = true;
foreach ($pieces as $i => $piece) {
$fromPos = $uploadPosition + (integer) $piece[BaseOssClient::OSS_SEEK_TO];
$toPos = (integer) $piece[BaseOssClient::OSS_LENGTH] + $fromPos - 1;
$upOptions = [
BaseOssClient::OSS_FILE_UPLOAD => $uploadFile,
BaseOssClient::OSS_PART_NUM => ($i + 1),
BaseOssClient::OSS_SEEK_TO => $fromPos,
BaseOssClient::OSS_LENGTH => $toPos - $fromPos + 1,
BaseOssClient::OSS_CHECK_MD5 => $isCheckMd5,
];
if ($isCheckMd5) {
$contentMd5 = OssUtil::getMd5SumForFile($uploadFile, $fromPos, $toPos);
$upOptions[BaseOssClient::OSS_CONTENT_MD5] = $contentMd5;
}
// 2. 将每一分片上传到OSS
$responseUploadPart[] = $this->client->uploadPart($this->bucket, $saveFileName, $uploadId, $upOptions);
}
$uploadParts = [];
foreach ($responseUploadPart as $i => $eTag) {
$uploadParts[] = [
'PartNumber' => ($i + 1),
'ETag' => $eTag,
];
}
/**
* step 3. 完成上传
*/
$this->client->completeMultipartUpload($this->bucket, $saveFileName, $uploadId, $uploadParts);
}
/**
*删除文件
*/
public function delete($deleteFile)
{
$this->client->deleteObject($this->bucket, $deleteFile);
}
public function getUrl($saveFileName)
{
$url = '';
/* if ($this->isCName) {
$url = 'http://' . $this->endpoint . '/' . $saveFileName;
} else {
$url = 'https://' . $this->bucket . '.' . $this->endpoint . '/' . $saveFileName;
$url = str_replace('-internal', '', $url);
} */
$url = $this->domain . '/' . $saveFileName;
return $url;
}
}

@ -0,0 +1,42 @@
<?php
namespace Base\Tool;
use Exception;
class Storage {
/**
* @var StorageClient
*/
private static $client;
private static function getClient(): StorageClient {
if (empty(self::$client)) {
if (C('STORAGE_TYPE') == 'oss') {
self::$client = new OssClient();
} elseif (C('STORAGE_TYPE') == 'obs') {
self::$client = new ObsClient();
} elseif (C('STORAGE_TYPE') == 'cos') {
self::$client = new CosClient();
} else {
throw new Exception("Storage type undefined!");
}
}
return self::$client;
}
public static function upload($localFilePath, $saveFileName) {
return self::getClient()->upload($localFilePath, $saveFileName);
}
public static function delete($deleteFile)
{
return self::getClient()->delete($deleteFile);
}
public static function getUrl($saveFileName)
{
return self::getClient()->getUrl($saveFileName);
}
}

@ -0,0 +1,12 @@
<?php
namespace Base\Tool;
interface StorageClient {
public function upload($localFilePath, $saveFileName);
public function delete($deleteFile);
public function getUrl($saveFileName);
}

@ -2397,7 +2397,7 @@ function get_child_ids($id){
}
//获取图片连接
function icon_url($value){
if (C('OSS_STATUS')){
if (C('STORAGE_TYPE')){
$url = get_cover($value, 'path');
} else {
$url = 'http://' . $_SERVER['HTTP_HOST'] . get_cover($value, 'path');

@ -1020,7 +1020,7 @@ function get_cover($cover_id, $field = null, $root = 1, $flag = true)
return "";
}
$picture = M('Picture')->where(array('status' => 1))->getById($cover_id);
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
if (!empty($picture['oss_url'])) {
return str_replace('http:', 'https:', $picture['oss_url']);
} else {

@ -1023,7 +1023,7 @@ class PromoteController extends BaseController
if (empty($user)) {
$this->redirect("Home/Index/index");
}
$promoteUrl = "https://m.jianghuifa.cn/mobile.php?s=Ssg/home/promote_id/" . $user['pid'];
$promoteUrl = "https://m.hexidongkeji.top/mobile.php?s=Ssg/home/promote_id/" . $user['pid'];
$this->assign("promote_url", $promoteUrl);
$this->display();

@ -11,6 +11,7 @@ namespace Home\Model;
use Think\Model;
use Think\Upload;
use Base\Service\OssService;
use Base\Tool\Storage;
/**
* 图片模型
@ -56,15 +57,14 @@ class PictureModel extends Model{
unset($info[$key]);
}
}
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
$path = explode('/', $value['path']);
$saveFileName = 'icon/' . $path[4];
$localFilePath = '.' . $value['path'];
$ossService = new OssService();
$ossService->upload($localFilePath, $saveFileName);
$result = Storage::upload($localFilePath, $saveFileName);
if ($result['status']) {
$dataUrl['oss_url'] = $ossService->getUrl($saveFileName);
$coo = $this->where(['id' => $value['id']])->save($dataUrl);
$dataUrl['oss_url'] = $result['data']['url'];
$this->where(['id' => $value['id']])->save($dataUrl);
} else {
$this->error = $result['message'];
return false;

@ -110,8 +110,8 @@
<section class="down-app-box">
<div class="down-app-inner">
<img src="__IMG__/Poster/poster.png">
<a href="itms-services://?action=download-manifest&url=https://m.jianghuifa.cn/manifest.plist" class="down-app-btn jq-dwn-btn">立即下载</a>
<a href="https://m.jianghuifa.cn" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
<a href="itms-services://?action=download-manifest&url=https://m.hexidongkeji.top/manifest.plist" class="down-app-btn jq-dwn-btn">立即下载</a>
<a href="https://m.hexidongkeji.top" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
</div>
</section>
<div style="text-align: center">

@ -548,7 +548,7 @@ function get_img_url($cover_id){
return "";
}
$picture = M('Picture')->where(array('status'=>1))->getById($cover_id);
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
if(!empty($picture['oss_url'])){
return $picture['oss_url'];
}else{

@ -589,9 +589,9 @@ class SsgController extends BaseController {
$param['payway'] = 1;
$param['title'] = $price;
$param['body'] = $price;
//$param['callback'] = "https://m.jianghuifa.cn/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.jianghuifa.cn/callback.php/Notify/notify/apitype/alipay";
if(stripos($_SERVER['HTTP_HOST'], '.jianghuifa.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
//$param['callback'] = "https://m.hexidongkeji.top/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.hexidongkeji.top/callback.php/Notify/notify/apitype/alipay";
if(stripos($_SERVER['HTTP_HOST'], '.hexidongkeji.top') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
$param['callback'] = "http://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "http://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
}else{

@ -1006,7 +1006,7 @@ class PromoteController extends BaseController
if (empty($user)) {
$this->redirect("Home/Index/index");
}
$promoteUrl = "https://m.jianghuifa.cn/mobile.php?s=Ssg/home/promote_id/" . $user['pid'];
$promoteUrl = "https://m.hexidongkeji.top/mobile.php?s=Ssg/home/promote_id/" . $user['pid'];
$this->assign("promote_url", $promoteUrl);
$this->display();

@ -203,7 +203,7 @@ class QrCodePromotionController extends BaseController
]);
if ($id > 0) {
$uniqueStr = $this->getUniqueStr();
$h5Link = "https://game.jianghuifa.cn"."/index.php?s=/Qrcode/Jump/jumpMp/{$uniqueStr}";
$h5Link = "https://game.hexidongkeji.top"."/index.php?s=/Qrcode/Jump/jumpMp/{$uniqueStr}";
$shortLink = $this->getShortUrl($h5Link);
M('qrcode_promotion_list', 'tab_')->where(['id' => $id])->save([

@ -11,6 +11,7 @@ namespace Qrcode\Model;
use Think\Model;
use Think\Upload;
use Base\Service\OssService;
use Base\Tool\Storage;
/**
* 图片模型
@ -56,15 +57,14 @@ class PictureModel extends Model{
unset($info[$key]);
}
}
if (C('OSS_STATUS')) {
if (C('STORAGE_TYPE')) {
$path = explode('/', $value['path']);
$saveFileName = 'icon/' . $path[4];
$localFilePath = '.' . $value['path'];
$ossService = new OssService();
$ossService->upload($localFilePath, $saveFileName);
$result = Storage::upload($localFilePath, $saveFileName);
if ($result['status']) {
$dataUrl['oss_url'] = $ossService->getUrl($saveFileName);
$coo = $this->where(['id' => $value['id']])->save($dataUrl);
$dataUrl['oss_url'] = $result['data']['url'];
$this->where(['id' => $value['id']])->save($dataUrl);
} else {
$this->error = $result['message'];
return false;

@ -121,7 +121,7 @@
dataType: 'json',
type: 'POST',
//url: 'http://10.0.10.185:8089/index.php?s=/Qrcode/Jump/getURLScheme',
url: 'https://mg.jianghuifa.cn/index.php?s=/Qrcode/Jump/getURLScheme',
url: 'https://mg.hexidongkeji.top/index.php?s=/Qrcode/Jump/getURLScheme',
data: {
'unique_str': "{$unique_str}",
},

@ -190,7 +190,7 @@ class AppleController extends BaseController{
$data['subject'] = "subject";
$data['notifyurl'] =C('pay_header')."/callback.php/Notify/sq_callback";//通知
$data['returnurl'] = $returl;
$data['mchAppId'] = "jianghuifa.cn;
$data['mchAppId'] = "hexidongkeji.top;
$data['mchAppName'] = "mchAppName";
$data['deviceInfo'] = "AND_WAP";
$data['clientIp'] = get_client_ip();
@ -620,9 +620,9 @@ class AppleController extends BaseController{
$data['paymenttype'] = "UNION";
$data['MerRemark'] = "mark";
$data['subject'] = "subject";
$data['notifyurl'] = "http://"."api.jianghuifa.cn"."/callback.php/Notify/sq_callback";//通知
$data['notifyurl'] = "http://"."api.hexidongkeji.top"."/callback.php/Notify/sq_callback";//通知
$data['returnurl'] = $returl;
$data['mchAppId'] = "jianghuifa.cn";
$data['mchAppId'] = "hexidongkeji.top";
$data['mchAppName'] = "mchAppName";
$data['deviceInfo'] = "AND_WAP";
$data['clientIp'] = get_client_ip();

@ -46,7 +46,7 @@ class Ipa365Controller extends BaseController{
$param['title'] = $price;
$param['body'] = $price;
$param['callback'] = "http://www.baidu.com";
$param['notifyurl'] = "https://api.jianghuifa.cn/callback.php/Notify/sq_callback";
$param['notifyurl'] = "https://api.hexidongkeji.top/callback.php/Notify/sq_callback";
$ret = $this->alipay($param);
redirect($ret['url']);
die;
@ -177,7 +177,7 @@ class Ipa365Controller extends BaseController{
$orderId = $payLog['order_id'];
}elseif ($payLog && $payLog['pay_status']==1){
/*$orderId = $payLog['order_id'];
if(stripos($_SERVER['HTTP_HOST'], '.jianghuifa.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
if(stripos($_SERVER['HTTP_HOST'], '.hexidongkeji.top') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
redirect("http://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
}else{
redirect("https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
@ -221,9 +221,9 @@ class Ipa365Controller extends BaseController{
$param['payway'] = 1;
$param['title'] = $price;
$param['body'] = $price;
//$param['callback'] = "https://m.jianghuifa.cn/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.jianghuifa.cn/callback.php/Notify/notify/apitype/alipay";
if(stripos($_SERVER['HTTP_HOST'], '.jianghuifa.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
//$param['callback'] = "https://m.hexidongkeji.top/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.hexidongkeji.top/callback.php/Notify/notify/apitype/alipay";
if(stripos($_SERVER['HTTP_HOST'], '.hexidongkeji.top') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
$param['callback'] = "http://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
$param['notifyurl'] = "http://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
}else{
@ -274,7 +274,7 @@ class Ipa365Controller extends BaseController{
$orderId = $payLog['order_id'];
}elseif ($payLog && $payLog['pay_status']==1){
$orderId = $payLog['order_id'];
if(stripos($_SERVER['HTTP_HOST'], '.jianghuifa.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
if(stripos($_SERVER['HTTP_HOST'], '.hexidongkeji.top') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
redirect("http://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
}else{
redirect("https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId");
@ -312,9 +312,9 @@ class Ipa365Controller extends BaseController{
$param['payway'] = 1;
$param['title'] = $price;
$param['body'] = $price;
//$param['callback'] = "https://m.jianghuifa.cn/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.jianghuifa.cn/callback.php/Notify/notify/apitype/alipay";
if(stripos($_SERVER['HTTP_HOST'], '.jianghuifa.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
//$param['callback'] = "https://m.hexidongkeji.top/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.hexidongkeji.top/callback.php/Notify/notify/apitype/alipay";
if(stripos($_SERVER['HTTP_HOST'], '.hexidongkeji.top') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
$param['callback'] = "http://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
$param['notifyurl'] = "http://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
}else{
@ -373,8 +373,8 @@ class Ipa365Controller extends BaseController{
$param['payway'] = 1;
$param['title'] = $price;
$param['body'] = $price;
//$param['callback'] = "https://m.jianghuifa.cn/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.jianghuifa.cn/callback.php/Notify/notify/apitype/alipay";
//$param['callback'] = "https://m.hexidongkeji.top/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
//$param['notifyurl'] = "https://m.hexidongkeji.top/callback.php/Notify/notify/apitype/alipay";
$param['callback'] = "https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
$param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";

@ -137,7 +137,7 @@ class WapPayController extends BaseController{
$data['subject'] = "subject";
$data['notifyurl'] = C('pay_header')."/callback.php/Notify/sq_callback";//通知
$data['returnurl'] = $returl;
$data['mchAppId'] = "jianghuifa.cn";
$data['mchAppId'] = "hexidongkeji.top";
$data['mchAppName'] = "mchAppName";
$data['deviceInfo'] = "AND_WAP";
$data['clientIp'] = get_client_ip();
@ -344,7 +344,7 @@ class WapPayController extends BaseController{
'payAmount' => $payInfo['price'],
'secret' => C('sqpay.key'),
'merOrderNo' => $payInfo['order_id'],
'NotifyURL' => "http://api.jianghuifa.cn"."/callback.php?Notify/sq_callback",
'NotifyURL' => "http://api.hexidongkeji.top"."/callback.php?Notify/sq_callback",
'purpose' => 'aaaa'
));
//echo "发送短信==》".time()."<br>";
@ -628,18 +628,18 @@ class WapPayController extends BaseController{
$json_data['paytype'] ="wx";
}else{
if(!empty($request['scheme'])) {
$redirect_url = 'https://api.jianghuifa.cn' . "/sdk.php/Spend/pay_success2/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
$redirect_url = 'https://api.hexidongkeji.top' . "/sdk.php/Spend/pay_success2/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
} else {
$redirect_url = 'https://api.jianghuifa.cn' . "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'];
$redirect_url = 'https://api.hexidongkeji.top' . "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'];
}
$json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.urlencode( $redirect_url );
$json_data['paytype'] ="wx";
}
}else{
$json_data['status'] = 500;
$json_data['url'] = "https://" . 'api.jianghuifa.cn';
$json_data['url'] = "https://" . 'api.hexidongkeji.top';
}
$json_data['cal_url'] = 'https://api.jianghuifa.cn';
$json_data['cal_url'] = 'https://api.hexidongkeji.top';
echo base64_encode(json_encode($json_data));exit;
// $this->redirect('WapPay/weixin_pay_view',['user_id'=>$request['user_id'],'game_id'=>$request['game_id']]);
} else if(get_wx_pay_type() == 1){ // 威富通

@ -585,7 +585,7 @@ VALUES
('contact_cs', '联系客服', '[{\"name\":\"support\",\"title\":\"\\u8054\\u7cfb\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"2\",\"act\":\"3007567814\",\"ios_url\":\"3007567814\",\"sort\":\"1\",\"id\":1,\"icon\":\"\",\"cover\":\"\"}]', '', 5, 1, 1571723212 );
INSERT INTO `tab_tool` (`name`, `title`, `config`, `template`, `type`, `status`, `create_time` )
VALUES
('sdk_menu', 'SDK用户菜单', '[{\"name\":\"mine\",\"title\":\"\\u6211\\u7684\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"my\",\"ios_url\":\"\",\"sort\":\"1\",\"id\":\"1\",\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd524dfd76fa.png\",\"cover\":\"1980\"},{\"name\":\"gift\",\"title\":\"\\u793c\\u5305\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/GameGiftPage\\/gift_list\",\"type\":\"0\",\"act\":\"gift\",\"ios_url\":\"?action=gift\",\"sort\":\"2\",\"id\":2,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd52509f3767.png\",\"cover\":\"1981\"},{\"name\":\"support\",\"title\":\"\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"support\",\"ios_url\":\"\",\"sort\":\"3\",\"id\":3,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5251e0aee3.png\",\"cover\":\"1982\"},{\"name\":\"message\",\"title\":\"\\u6d88\\u606f\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"msg\",\"ios_url\":\"\",\"sort\":\"4\",\"id\":4,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525606ff53.png\",\"cover\":\"1983\"},{\"name\":\"logout\",\"title\":\"\\u9000\\u51fa\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"logout\",\"ios_url\":\"\",\"sort\":\"5\",\"id\":5,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525d99ed99.png\",\"cover\":\"1984\"},{\"name\":\"suppersign\",\"title\":\"\\u8d85\\u7ea7\\u7b7e\",\"menu_version\":\"2\",\"url\":\"\\/mobile.php\\/ssg\\/home\",\"type\":\"2\",\"act\":\"suppersign\",\"ios_url\":\"http:\\/\\/m.jianghuifa.cn\\/mobile.php\\/ssg\\/home\",\"sort\":\"6\",\"id\":6,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525f388843.png\",\"cover\":\"1985\"}]', '', 5, 1, 1571723212 );
('sdk_menu', 'SDK用户菜单', '[{\"name\":\"mine\",\"title\":\"\\u6211\\u7684\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"my\",\"ios_url\":\"\",\"sort\":\"1\",\"id\":\"1\",\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd524dfd76fa.png\",\"cover\":\"1980\"},{\"name\":\"gift\",\"title\":\"\\u793c\\u5305\",\"menu_version\":\"0\",\"url\":\"\\/sdk.php\\/GameGiftPage\\/gift_list\",\"type\":\"0\",\"act\":\"gift\",\"ios_url\":\"?action=gift\",\"sort\":\"2\",\"id\":2,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd52509f3767.png\",\"cover\":\"1981\"},{\"name\":\"support\",\"title\":\"\\u5ba2\\u670d\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"support\",\"ios_url\":\"\",\"sort\":\"3\",\"id\":3,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd5251e0aee3.png\",\"cover\":\"1982\"},{\"name\":\"message\",\"title\":\"\\u6d88\\u606f\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"msg\",\"ios_url\":\"\",\"sort\":\"4\",\"id\":4,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525606ff53.png\",\"cover\":\"1983\"},{\"name\":\"logout\",\"title\":\"\\u9000\\u51fa\",\"menu_version\":\"0\",\"url\":\"\",\"type\":\"1\",\"act\":\"logout\",\"ios_url\":\"\",\"sort\":\"5\",\"id\":5,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525d99ed99.png\",\"cover\":\"1984\"},{\"name\":\"suppersign\",\"title\":\"\\u8d85\\u7ea7\\u7b7e\",\"menu_version\":\"2\",\"url\":\"\\/mobile.php\\/ssg\\/home\",\"type\":\"2\",\"act\":\"suppersign\",\"ios_url\":\"http:\\/\\/m.hexidongkeji.top\\/mobile.php\\/ssg\\/home\",\"sort\":\"6\",\"id\":6,\"icon\":\"\\/Uploads\\/Picture\\/2019-11-20\\/5dd525f388843.png\",\"cover\":\"1985\"}]', '', 5, 1, 1571723212 );
-- 修改迁移
ALTER TABLE `tab_mend`
@ -1710,7 +1710,7 @@ CREATE TABLE `sys_kv` (
UNIQUE KEY `key_name` (`key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='系统简单kv储存表';
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('aggregate_finance_api', 'http://admin.jianghuifa.cn/index.php?g=api&m=FinanceWeekCount&a=returnFinanceAccountsDataList', 'string', '聚合下游结算Api地址');
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('aggregate_finance_api', 'http://admin.hexidongkeji.top/index.php?g=api&m=FinanceWeekCount&a=returnFinanceAccountsDataList', 'string', '聚合下游结算Api地址');
-- chenzhi 20200422
CREATE TABLE `tab_aggregate_statement` (
@ -1752,7 +1752,7 @@ ADD COLUMN `old_change_promote_account` varchar(30) NULL COMMENT '修改配置
--20200518 chenzhi
--
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('aggregate_cp_settlement_api', 'http://admin.jianghuifa.cn/index.php?g=api&m=FinanceWeekCount&a=returnCPSettlement', 'string', '聚合cp结算Api地址');
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('aggregate_cp_settlement_api', 'http://admin.hexidongkeji.top/index.php?g=api&m=FinanceWeekCount&a=returnCPSettlement', 'string', '聚合cp结算Api地址');
INSERT INTO `sys_kv` (`key`, `value`, `type`, `remark`) VALUES ('payment_check_mobile', '18959188422', 'string', '打款登陆验证手机');
--

@ -105,8 +105,8 @@
<section class="down-app-box">
<div class="down-app-inner">
<img src="../Public/Home/images/Poster/poster.png">
<a href="itms-services://?action=download-manifest&url=https://m.jianghuifa.cn/manifest.plist" class="down-app-btn jq-dwn-btn">立即下载</a>
<a href="https://m.jianghuifa.cn" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
<a href="itms-services://?action=download-manifest&url=https://m.hexidongkeji.top/manifest.plist" class="down-app-btn jq-dwn-btn">立即下载</a>
<a href="https://m.hexidongkeji.top" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
</div>
</section>

@ -51,7 +51,7 @@ class Heepay {
$sign_str = $sign_str . '&agent_bill_time=' . $pay['time'];
$sign_str = $sign_str . '&pay_type=30';
$sign_str = $sign_str . '&pay_amt=' . $pay['amount'];
$sign_str = $sign_str . '&notify_url=http://'."api.jianghuifa.cn"."/callback.php/Notify/heepay_callback";
$sign_str = $sign_str . '&notify_url=http://'."api.hexidongkeji.top"."/callback.php/Notify/heepay_callback";
$sign_str = $sign_str . '&return_url='.$pay['return_url'];
$sign_str = $sign_str . '&user_ip='. $pay['user_ip'];
$sign_str = $sign_str . '&bank_card_type='. $pay['bank_card_type'];
@ -64,7 +64,7 @@ class Heepay {
} else if ($pay['device'] == 'android'){
$meta_option= '{"s":"Android","n":"帝王的纷争(安卓版)","id":"应用在一台设备上的唯一标识在manifest文件里面的声明"}';
} else if ($pay['device'] == 'wap') {
$meta_option = '{"s":"WAP","n":"jianghuifa.cn","id":"jianghuifa.cn"}';
$meta_option = '{"s":"WAP","n":"hexidongkeji.top","id":"hexidongkeji.top"}';
}
$meta_option = urlencode(base64_encode(iconv("UTF-8", "gb2312//IGNORE", $meta_option)));
@ -75,7 +75,7 @@ class Heepay {
'agent_id'=>$pay['agent_id'],//商户号
'agent_bill_id'=>$pay['order_no'],//订单号
'pay_amt'=>$pay['amount'],//支付金额
'notify_url'=>"http://"."api.jianghuifa.cn"."/callback.php/Notify/heepay_callback",//通知地址
'notify_url'=>"http://"."api.hexidongkeji.top"."/callback.php/Notify/heepay_callback",//通知地址
'return_url' => $pay['return_url'],
'user_ip'=>$pay['user_ip'],//用户ip
'agent_bill_time'=>$pay['time'],//date('YmdHis', time()) 时间

@ -167,7 +167,7 @@ class Sqpay
$data['merNo'] = 168885;
$data['secret'] = 12345678; */
$notifyurl = "http://".'api.jianghuifa.cn'."/callback.php/Notify/sq_callback";//通知
$notifyurl = "http://".'api.hexidongkeji.top'."/callback.php/Notify/sq_callback";//通知
$data['NotifyURL'] = $notifyurl;
$bankInfo = $this->getbankinfo($data['cardNo']);
$data['cardType'] = $bankInfo['cardType'] == 'CC' ? 2: 1;

@ -1,12 +1,8 @@
{
"require": {
"rodneyrehm/plist": "^2.0",
"guzzlehttp/guzzle": "~6.0"
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
"guzzlehttp/guzzle": "~6.0",
"obs/esdk-obs-php": "3.22.6",
"qcloud/cos-sdk-v5": ">=2.0"
}
}

@ -116,9 +116,9 @@
<section class="down-app-box">
<div class="down-app-inner">
<img src="../Public/Home/images/Poster/poster.png">
<a href="itms-services://?action=download-manifest&url=https://m.jianghuifa.cn/manifest.plist" class="down-app-btn jq-dwn-btn">立即下载</a>
<a href="http://www.jianghuifa.cn" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
<?php if (stripos($_SERVER['HTTP_HOST'],'dl.jianghuifa.cn') !== false) :?>
<a href="itms-services://?action=download-manifest&url=https://m.hexidongkeji.top/manifest.plist" class="down-app-btn jq-dwn-btn">立即下载</a>
<a href="http://www.hexidongkeji.top" class="down-app-index">进入网站<i class="iconfont icongengduo" style="margin-left: -0.3rem;font-size: 0.8rem;"></i></a>
<?php if (stripos($_SERVER['HTTP_HOST'],'dl.hexidongkeji.top') !== false) :?>
<a target="cyxyv" class="down-app-img" href="javascript:;"><img src="https://aqyzmedia.yunaq.com/labels/label_lg_90030.png" style="position: initial;width: 68px;margin-top: 10px;"></a>
<?php endif ;?>
</div>

@ -0,0 +1,58 @@
Java类Demo中存在方法func1、func2、func3和func4请问该方法中哪些是不合法的定义( )
public class Demo{
  float func1()
  {
    int i=1;
    return;
  }
  float func2()
  {
    short i=2;
    return i;
  }
  float func3()
  {
    long i=3;
    return i;
  }
  float func4()
  {
    double i=4;
    return i;
  }
}
Afunc1
Bfunc2
Cfunc3
Dfunc4
以下说法中正确的有
AStringBuilder是 线程不安全的
BJava类可以同时用 abstract和final声明
CHashMap中使用 get(key)==null可以 判断这个Hasmap是否包含这个key
Dvolatile关键字不保证对变量操作的原子性
下列说法正确的是
A在类方法中可用this来调用本类的类方法
B在类方法中调用本类的类方法可直接调用
C在类方法中只能调用本类的类方法
D在类方法中绝对不能调用实例方法
list是一个ArrayList的对象哪个选项的代码填到//todo delete处可以在Iterator遍历的过程中正确并安全的删除一个list中保存的对象
Iterator it = list.iterator();
int index = 0;
while (it.hasNext())
{
Object obj = it.next();
if (needDelete(obj)) //needDelete返回boolean决定是否要删除
{
//todo delete
}
index ++;
}
Ait.remove();
Blist.remove(obj);
Clist.remove(index);
Dlist.remove(obj,index);

@ -1,40 +0,0 @@
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] POST /upload --> main.setupRouter.func1 (3 handlers)
[GIN-debug] Listening and serving HTTP on :8080
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] POST /upload --> main.setupRouter.func1 (3 handlers)
[GIN-debug] Listening and serving HTTP on :8080
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] POST /upload --> main.setupRouter.func1 (3 handlers)
[GIN-debug] Listening and serving HTTP on :8080
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] POST /upload --> main.setupRouter.func1 (3 handlers)
[GIN-debug] Listening and serving HTTP on :8080
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] POST /upload --> main.setupRouter.func1 (3 handlers)
[GIN-debug] Listening and serving HTTP on :8080

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save