Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
ELF 5 years ago
commit 38e83a2f97

@ -1557,4 +1557,18 @@ class ApplyController extends BaseController
$this->ajaxReturn(array("status" => 0, "msg" => "添加成功"));
}
public function getEnableStatus()
{
$applyId = I('post.apply_id');
if (empty($applyId)) {
$this->ajaxReturn(['status' => 0, 'msg' => '数据异常']);
}
$map['id'] = $applyId;
$enableStatus = M('Apply', 'tab_')->where($map)->getField('enable_status');
$this->ajaxReturn(['status' => 1, 'data' => $enableStatus]);
}
}

@ -541,6 +541,12 @@ class PromoteController extends BaseController
$this->assign("data", $data);
$this->wxQrcode($data);
$user = D('Promote')->isLogin();
if (empty($user)) {
$this->redirect("Home/Index/index");
}
$promoteUrl = "https://m.wmtxkj.com/mobile.php?s=Ssg/login/promote_id/".$user['pid'];
$this->assign("promote_url", $promoteUrl);
$this->display();
}

@ -257,9 +257,9 @@
<span class="add-game" game-id="{$vo.id}" promote-type="3" style="cursor: pointer;margin-right: 10px;"><u>添加推广员游戏</u></span>
</if>
<?php $downloadUrl = get_apply_dow_url($vo['id'],$vo['promote_id']);?>
<span class="game-link" data-qrcode="{:U('Apply/qrcode',['url'=>base64_encode(base64_encode($downloadUrl)),'logo'=>$qrcode])}" data-url="{$downloadUrl}" data-status="{$vo.enable_status}" style="cursor: pointer;margin-right: 10px;"><u>复制下载链接</u></span>
<span class="game-link" data-qrcode="{:U('Apply/qrcode',['url'=>base64_encode(base64_encode($downloadUrl)),'logo'=>$qrcode])}" data-url="{$downloadUrl}" data-apply-id="{$vo.applyid}" style="cursor: pointer;margin-right: 10px;"><u>复制下载链接</u></span>
<?php $flooringPageUrl = 'http://'.C('APPLY_DOWN_DOMAIN').U('Home/promitionofregestion',array('gid'=>$vo['id'],'pid'=>$vo['promote_id']));?>
<span class="game-link" data-qrcode="{:U('Apply/qrcode',['url'=>base64_encode(base64_encode($flooringPageUrl)),'logo'=>$qrcode])}" data-url="{$flooringPageUrl}" data-status="{$vo.enable_status}" style="cursor: pointer;margin-right: 10px;"><u>落地页链接</u></span>
<span class="game-link" data-qrcode="{:U('Apply/qrcode',['url'=>base64_encode(base64_encode($flooringPageUrl)),'logo'=>$qrcode])}" data-url="{$flooringPageUrl}" data-apply-id="{$vo.applyid}" style="cursor: pointer;margin-right: 10px;"><u>落地页链接</u></span>
<span class="down-game-btn" data-id="{$vo.id}" style="cursor: pointer;margin-right: 10px;color: #999"><u>下架</u></span>
</div>
</div>
@ -974,9 +974,33 @@
$('.game-link').on('click', function () {
var url = $(this).attr('data-url');
var qrcode = $(this).attr('data-qrcode');
var enableStatus = parseInt($(this).attr('data-status'));
var applyId = parseInt($(this).attr('data-apply-id'));
if (enableStatus != 1) {
$.ajax({
type: "post",
url: "__URL__/getEnableStatus",
dataType: "json",
data: {'apply_id': applyId},
success: function (data) {
console.log(data);
if (data.status == 0) {
layer.msg(data.msg, {icon: 5});
return false;
}
var enableStatus = parseInt(data.data);
if (enableStatus == 1) {
// $('#download_copy').attr('data-url',url);
$('#game_link_ercode').attr('src',qrcode);
$('#game_link_address').text(url);
$('#game_link_address_copy').text(url);
$('#game_link').show();
$('.game-window-bg').show();
var e = document.getElementById("game_link_address_copy");
e.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
} else {
var iconIndex = 7;
var enableStatusName = '';
@ -997,17 +1021,11 @@
layer.alert(enableStatusName, {icon: iconIndex});
return false;
}
// $('#download_copy').attr('data-url',url);
$('#game_link_ercode').attr('src',qrcode);
$('#game_link_address').text(url);
$('#game_link_address_copy').text(url);
$('#game_link').show();
$('.game-window-bg').show();
var e = document.getElementById("game_link_address_copy");
e.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
// $("#download_copy").zclip({

@ -82,6 +82,15 @@
<span id="email_tip"></span>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>超级签链接:</td>
<td class="r" style="position: relative;">
<span><a href="{$promote_url}" target="_blank">{$promote_url}</a></span>
<span id="email_tip"></span>
</td>
</tr>
<!-- <tr>-->
<!-- <td class="l"><span class="req">*</span>支付宝账号:</td>-->
<!-- <td class="r">-->

@ -21,9 +21,19 @@ class SsgController extends BaseController {
public function login(){
$user = session("user_auth");
$promoteId = I("promote_id");
if (!$promoteId) {
$this->error("参数非法");
}
$exists = M("promote", "tab_")->where(array('id' => $promoteId))->find();
if (!$exists) {
$this->error("参数非法.");
}
/*if ($user) {
redirect(U("ssg/index"));
}*/
$this->assign("promote_id", $promoteId);
$this->display();
}
@ -36,6 +46,15 @@ class SsgController extends BaseController {
{
$account = I("Account");
$password = I("Password");
$promoteId = I("promote_id");
if (!$promoteId) {
$this->ajaxReturn(array("ErrorCode" => -97, "ResultMsg" => "参数非法"));
}
$promote = M("promote", "tab_")->where(array('id' => $promoteId))->find();
if (!$promote) {
$this->ajaxReturn(array("ErrorCode" => -97, "ResultMsg" => "参数非法."));
}
//var_dump($password);
$verify = new \Think\Verify();
if (!$verify->check(I("VerifyCode"))) {
@ -62,6 +81,18 @@ class SsgController extends BaseController {
}
if($user_id>0){
$_SESSION['user_id'] = $user_id;
$user = M('user', 'tab_')->where(array(
'id' => $user_id
))->find();
if (!$user['promote_id']) {
M('user', 'tab_')->where(array(
'id' => $user_id
))->save(array(
'promote_id' => $promoteId,
'promote_account' => $promote['account']
));
}
}
$this->ajaxReturn(array("ErrorCode"=>$res_code,"ResultMsg"=>$res_msg),'JSON');
}
@ -95,6 +126,15 @@ class SsgController extends BaseController {
$map['a.user_id']= $user['user_id'];
$map['a.sdk_version'] = 2;
$game_list = M("user_play a","tab_")->field("b.*,b.id as game_id,od.pay_status")->join("inner join tab_game b on a.game_id=b.id left join tab_game_supersign od on od.user_id=a.user_id and od.game_id=b.id and od.pay_status=1")->where($map)->select();
if (!$game_list) {
$game_list = M("game", "tab_")->field("*, id as game_id")->where(array(
"sdk_version" => 2,
"game_status" => 1,
))->select();
foreach ($game_list as &$v) {
$v['pay_status'] = 0;
}
}
$this->assign("data_list",$game_list);
$this->display();
}

@ -15,6 +15,7 @@
<div class="login">
<div class="login-title">
<h2>Hello!终于等到你~</h2>
<input type="hidden" value="{$promote_id}" id="promote_id" name="promote_id"/>
</div>
<div class="login-input">
<ul>
@ -37,6 +38,7 @@
</ul>
</div>
<div class="login-btn"><a href="javascript:;" onclick="Login()">登录</a></div>
<div style="padding-top: 0.2rem;" class="login-btn"><a href="https://m.wmtxkj.com/mobile.php?s=/User/step1.html">注册</a></div>
</div>
</div>
</body>
@ -53,6 +55,7 @@
var loginName = $("#userAccount").val();
var loginPass = $("#password").val();
var userCode = $("#userCode").val();
var promoteId = $("#promote_id").val();
if (loginName == "") {
alert("账号不能为空");
return false;
@ -65,6 +68,10 @@
alert("验证码不能为空");
return false;
}
if (promoteId == "") {
alert("推广员ID不能为空");
return false;
}
jQuery.ajax({
type: 'POST',
@ -72,7 +79,8 @@
data: {
'Account':loginName,
'Password':(loginPass),
'VerifyCode':userCode
'VerifyCode':userCode,
'promote_id' :promoteId,
},
dataType: 'JSON',
xhrFields:{

@ -6,9 +6,10 @@ use Mobile\Controller\SsgController;
// a8eeac3335cef5ee117d357738598f691932513b
class Ipa365Controller extends BaseController{
const signprice = 0.01; // 超级签价格
const signprice = 10; // 超级签价格
public function test(){
die();
$ipa365 = new Ipa365Controller();
$result = $ipa365->pay_notify(array(
'trade_id' => "2222",
@ -62,12 +63,16 @@ class Ipa365Controller extends BaseController{
}
public function pay_notify_test() {
die();
$this->pay_notify(array(
'order_id' => 'SS_20190924102317T2jO',
'game_id' => 1,
));
}
/**
* 订单检查
*/
public function pay_order_check() {
$orderId = I('order_id');

Loading…
Cancel
Save