modified 修改自定义类库的调用

This commit is contained in:
zhaoxiang 2016-11-07 01:00:35 +08:00
parent 1aedcb4efd
commit 00308e4be1
3 changed files with 5 additions and 7 deletions

View File

@ -7,9 +7,9 @@
namespace app\index\controller; namespace app\index\controller;
use extend\StrOrg; use think\Controller;
class User extends Base { class User extends Controller {
public function index(){ public function index(){
return $this->fetch(); return $this->fetch();
} }
@ -146,7 +146,7 @@ class User extends Base {
private function getAuthStr(){ private function getAuthStr(){
$ticket = config('AUTH_TICKET'); $ticket = config('AUTH_TICKET');
$nonceStr = StrOrg::randString(12,5,'oOLl01'); $nonceStr = \StrOrg::randString(12,5,'oOLl01');
$now = time(); $now = time();
$hashStr = sha1("ticket={$ticket}&noncestr={$nonceStr}&timestamp={$now}"); $hashStr = sha1("ticket={$ticket}&noncestr={$nonceStr}&timestamp={$now}");
$urlParam = [ $urlParam = [

View File

@ -4,8 +4,6 @@
* @author zhaoxiang <zhaoxiang051405@gmail.com> * @author zhaoxiang <zhaoxiang051405@gmail.com>
*/ */
namespace extend;
class StrOrg { class StrOrg {

View File

@ -17,7 +17,7 @@
$.post(target, query).success(function(data) { $.post(target, query).success(function(data) {
if (data.url) { if (data.url) {
alertMSG.showAlert({ alertMSG.showAlert({
msg:'<p><i class="icon-ok-sign mr10" style="color:#3c3"></i>'+data.info+' 页面即将自动跳转~</p>', msg:'<p><i class="icon-ok-sign mr10" style="color:#3c3"></i>'+data.msg+' 页面即将自动跳转~</p>',
callback: function(){ callback: function(){
setTimeout(function(){ setTimeout(function(){
window.location.href= data.url; window.location.href= data.url;
@ -26,7 +26,7 @@
}); });
} else { } else {
alertMSG.showAlert({ alertMSG.showAlert({
msg:'<p>'+data.info+'</p>', msg:'<p>'+data.msg+'</p>',
}); });
} }
}); });