master
ELF 5 years ago
parent cb63520de5
commit 5e0c1c0f87

@ -280,7 +280,7 @@
<?php else:?> <?php else:?>
<div class="blue-btn" onclick="layer.msg('该游戏已关闭下载');">¥10至尊下载</div> <div class="blue-btn" onclick="layer.msg('该游戏已关闭下载');">¥10至尊下载</div>
<div class="blue-btn stabilization" onclick="layer.msg('该游戏已关闭下载');">beta版下载</div> <div class="blue-btn" onclick="layer.msg('该游戏已关闭下载');">beta版下载</div>
<div class="gray-btn down-link" onclick="layer.msg('该游戏已关闭下载');return false;" down-link="{$downloadUrl}">普通下载</div> <div class="gray-btn down-link" onclick="layer.msg('该游戏已关闭下载');return false;" down-link="{$downloadUrl}">普通下载</div>
<?php endif;?> <?php endif;?>
</div> </div>
@ -534,9 +534,11 @@
</body> </body>
</html> </html>
<script src="__STATIC__/ios9/js/layer/layer.js?VerNo=20190923" type="text/javascript"></script> <script src="__STATIC__/ios9/js/layer/layer.js?VerNo=20190923" type="text/javascript"></script>
<script src="__STATIC__/js.cookie.min.js"></script>
<script> <script>
var gameId = parseInt("{$game.id}"); var gameId = parseInt("{$game.id}");
var promoteId = parseInt("{$promoteId}"); var promoteId = parseInt("{$promoteId}");
var isLogin = Cookies.get('is_landing_login') == undefined ? false : true;
var PhoneObj = { var PhoneObj = {
i:60, i:60,
codeflag: true, codeflag: true,
@ -611,7 +613,11 @@ var PhoneObj = {
$(function(){ $(function(){
$(".stabilization").click(function(){ $(".stabilization").click(function(){
event.stopPropagation(); event.stopPropagation();
if (isLogin) {
showMounting()
} else {
$(".login").show(); $(".login").show();
}
$(".window").hide(); $(".window").hide();
}); });
$(".login .register-heard>a").click(function(){ $(".login .register-heard>a").click(function(){
@ -723,6 +729,8 @@ var PhoneObj = {
}, },
success: function (result) { success: function (result) {
if (result.code == '0000') { if (result.code == '0000') {
Cookies.set('is_landing_login', 1, { expires: 1 })
isLogin = true;
$(".phone").hide(); $(".phone").hide();
showMounting() showMounting()
} else { } else {
@ -776,6 +784,8 @@ var PhoneObj = {
cache: false, cache: false,
success: function (result) { success: function (result) {
if (result.code == '0000') { if (result.code == '0000') {
Cookies.set('is_landing_login', 1, { expires: 1 })
isLogin = true;
$('.login').hide(); $('.login').hide();
showMounting() showMounting()
} else { } else {
@ -822,6 +832,8 @@ var PhoneObj = {
}, },
success: function (result) { success: function (result) {
if (result.code == '0000') { if (result.code == '0000') {
Cookies.set('is_landing_login', 1, { expires: 1 })
isLogin = true;
$(".common").hide(); $(".common").hide();
showMounting() showMounting()
} else { } else {

@ -56,7 +56,7 @@ class CommonController extends BaseController {
$this->respondError($resMsg); $this->respondError($resMsg);
} }
// $_SESSION['user_id'] = $userId; $_SESSION['user_id'] = $userId;
$user = M('user', 'tab_')->where(['id' => $userId])->find(); $user = M('user', 'tab_')->where(['id' => $userId])->find();
if (!$user['promote_id'] && $promote) { if (!$user['promote_id'] && $promote) {
M('user', 'tab_')->where(['id' => $userId])->save([ M('user', 'tab_')->where(['id' => $userId])->save([
@ -114,7 +114,8 @@ class CommonController extends BaseController {
//添加自动登录 //添加自动登录
$userApi = new MemberApi(); $userApi = new MemberApi();
$userId = $userApi->login($params['account'], $params['password'],1); $userId = $userApi->login($params['account'], $params['password'], 1);
$_SESSION['user_id'] = $userId;
$this->respondSuccess('添加成功'); $this->respondSuccess('添加成功');
} }
@ -157,7 +158,8 @@ class CommonController extends BaseController {
//添加自动登录 //添加自动登录
$userApi = new MemberApi(); $userApi = new MemberApi();
$user_id = $userApi->login($account, $password, 1); $userId = $userApi->login($account, $password, 1);
$_SESSION['user_id'] = $userId;
$this->respondSuccess('注册成功'); $this->respondSuccess('注册成功');
} }

@ -0,0 +1,2 @@
/*! js-cookie v3.0.0-beta.3 | MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,r=e.Cookies=t();r.noConflict=function(){return e.Cookies=n,r}}())}(this,function(){"use strict";var e={read:function(e){return e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function n(r,o){function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),n=r.write(n,e),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=e+"="+n+c}}return Object.create({set:i,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],o={},i=0;i<n.length;i++){var c=n[i].split("="),u=c.slice(1).join("=");'"'===u[0]&&(u=u.slice(1,-1));try{var f=e.read(c[0]);if(o[f]=r.read(u,f),t===f)break}catch(e){}}return t?o[t]:o}},remove:function(e,n){i(e,"",t({},n,{expires:-1}))},withAttributes:function(e){return n(this.converter,t({},this.attributes,e))},withConverter:function(e){return n(t({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(r)}})}(e,{path:"/"})});
Loading…
Cancel
Save