Browse Source

修改初始页

pull/1/head
pengda 8 months ago
parent
commit
6fe4495640
  1. 10
      control/index.php
  2. 0
      view/templates/index/formula_list.html
  3. 3
      view/templates/index/login.html

10
control/index.php

@ -25,6 +25,10 @@ class index extends publicBase {
return $uinfo; return $uinfo;
} }
public function home() {
exit;
}
public function login() { public function login() {
$name = trim($this->get('name')); $name = trim($this->get('name'));
$password = trim($this->get('password')); $password = trim($this->get('password'));
@ -36,11 +40,11 @@ class index extends publicBase {
$res = $m_user->checkAdminLogin($name, $password); $res = $m_user->checkAdminLogin($name, $password);
if (!$res) $this->show_message($m_user->getError(), '/index/login'); if (!$res) $this->show_message($m_user->getError(), '/index/login');
header('Location: /index/home'); header('Location: /index/formula_list');
} }
} }
public function home() { public function formula_list() {
if ($_COOKIE['uid'] !== 0 && empty($_COOKIE['token'])) header('Location: /index/login'); if ($_COOKIE['uid'] !== 0 && empty($_COOKIE['token'])) header('Location: /index/login');
$this->view['uid'] = $_COOKIE['uid']; $this->view['uid'] = $_COOKIE['uid'];
@ -50,7 +54,7 @@ class index extends publicBase {
$name = trim($this->get('name')); $name = trim($this->get('name'));
$condition = array(); $condition = array();
$url = "/index/home/is_all/{$is_all}"; $url = "/index/formula_list/is_all/{$is_all}";
if ($name) { if ($name) {
$condition['name'] = $name; $condition['name'] = $name;
$url .= "/name/{$name}"; $url .= "/name/{$name}";

0
view/templates/index/home.html → view/templates/index/formula_list.html

3
view/templates/index/login.html

@ -22,7 +22,7 @@
<div class="row">&nbsp;</div> <div class="row">&nbsp;</div>
<div class="row"> <div class="row">
<label for="name">用户名<font color='red'>*</font></label> <label for="name">账号<font color='red'>*</font></label>
<input type="text" id="name" name="name" maxlength="" style="width:280px" value="{$data.name}"> <input type="text" id="name" name="name" maxlength="" style="width:280px" value="{$data.name}">
</div> </div>
@ -76,6 +76,7 @@
#prescription-form label { #prescription-form label {
text-align: center; text-align: center;
width: 45px;
} }
</style> </style>
{/literal} {/literal}

Loading…
Cancel
Save