From 0d91f0aa5cf9c35aeea02e538af3c90566d5f52e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 21 Nov 2019 23:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/SafeController.class.php | 31 ++----------------- .../Home/View/default/Safe/safeDocument.html | 20 +++--------- 2 files changed, 7 insertions(+), 44 deletions(-) diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index f411f529a..260dc2c8c 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -443,38 +443,13 @@ class SafeController extends BaseController{ public function safeDocument() { $time = time(); - $today = date('Y-m-d'); - $username = $_REQUEST['username']; - $tsession =S($today); - if(S($username)) { - $code = S($username); - }else { - if(!empty($tsession)) { - $num = $tsession + 1; - }else { - $num = 1; - } - $promoteRs = M('promote','tab_')->where(['account'=>$username])->getField('create_time',true); - $code = date('Ymd',$promoteRs[0])."_".$num; - } + $loginPromote = $this->getLoginPromote(); + $sn = date('Ymd') . '-' . strtoupper(substr(md5($loginPromote['id']), 8, 16)); $endTime = date('Y-m-d',strtotime('+1 year')); $this->assign('time',date('Y-m-d',$time)); $this->assign('endTime',$endTime); - $this->assign('code',$code); - $this->assign('username',$username); + $this->assign('sn',$sn); $this->display(); } - - public function ajaxAgree() { - $username = $_REQUEST['username']; - $code = $_REQUEST['code']; - $today = date('Y-m-d'); - if(empty(S($username))) { - S($username, $code); - $t = S($today); - S($today,$t+1); - } - $this->ajaxReturn(['code'=>10000]); - } } \ No newline at end of file diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index a2f05aaf3..3395e8ae0 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -51,7 +51,7 @@ and open the template in the editor.

游戏推广服务框架协议

本协议由以下双方于{$time}签订:

-

合同编号:{$code}

+

合同编号:{$sn}

甲方:海南万盟天下科技有限公司

注册地址:海南省海口市南海大道26号海口国家高新区创业孵化中心A楼5层A1-1268室

联系电话:13067391751

@@ -237,8 +237,6 @@ and open the template in the editor.
- -







@@ -247,20 +245,10 @@ and open the template in the editor. $(function() { - var username = document.getElementById('us').value; - var code = document.getElementById('code').value; $("#ag").on('click',function(event) { - $.ajax({ - type:"POST", - url:"{:U('Safe/ajaxAgree')}", - data:{'username':username,'code':code}, - dataType:'json', - success:function(res) { - window.localStorage.setItem('checked','checked'); - window.history.back(-1); - } - }); - }) + window.localStorage.setItem('checked','checked'); + window.location.href = "/index.php?s=/Home/Safe/modifyBaseInfo.html" + }); })