yii图书商城 学习笔记之三 后台界面

后台管理员账户相关页面

账户登录相关界面

新建UserController

新建Login, Edit, ResetPwd方法

新建 对应的视图层

相关链接

账户管理相关界面

新建AccountController

新建Index, Set, Info方法

新建 对应视图层

相关链接

con/DefaultController

class DefaultController extends Controller
{
    public function actionIndex()
    {
        //去掉默认布局
        $this->layout = false;
        return $this->render('index');
    }
}

views/default/index 加入页面元素

同样的操作对错误页面也做一遍

con/UserController

class UserController extends Controller
{
    public function actionLogin()
    {
        $this->layout = false;
        return $this->render('login');
    }

    public function actionEdit()
    {
        $this->layout = false;
        return $this->render('edit');
    }

    public function actionResetPwd()
    {
        $this->layout = false;
        return $this->render('reset_pwd');
    }
}

新建view/user下的
edit.php
login.php
reset_pwd.php

同样的操作对账户管理相关界面做一遍

原文地址:https://www.cnblogs.com/Qyhg/p/14252901.html