This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| export default { | |
| globalData: { | |
| text: 'text' | |
| }, | |
| onLaunch: function() { | |
| console.log('App Launch') | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages | |
| { | |
| "path": "pages/index/index", | |
| "style": { | |
| "navigationBarTitleText": "uni-app" | |
| } | |
| } | |
| ,{ | |
| "path" : "pages/user/user", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 模板====================== | |
| <div class="panel admin-panel"> | |
| <div class="panel-head"><strong><span class="icon-key"></span> 修改会员密码</strong></div> | |
| <div class="body-content"> | |
| 【post传输,id为form】 | |
| <form method="post" id='form' class="form-x" action=""> | |
| <div class="form-group"> | |
| <div class="label"> | |
| <label for="sitename">管理员帐号:</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 【0】首先检查数据库连接 | |
| //在.evn环境下进行设置 | |
| //创建数据库 blog utf8 utf8_general_ci | |
| //创建用户表 | |
| id tinyint //主键 | |
| admin_name varchar 50 | |
| admin_pass char 32 //MD5定长32 | |
| salt char 6 //管理员加密 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //下载插件 | |
| //https://www.layuiweb.com/layer/index.htm | |
| //解压,全部image/css/js资源放在public独立文件夹下 | |
| //在头部模板中添加 | |
| <!-- 弹出窗插件 --> | |
| <script src="{{ asset('cjlib/layer/layer.js')}}"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 创建后台登陆页面 login 的步骤(可以广泛应用) | |
| 1//制作前端界面 admin/login.html | |
| 2//将页面等资源放在public/admin下 | |
| 3//添加路由 | |
| 4//添加控制器(注意文章,图片,使用resource路由) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //创建控制器 | |
| php artisan make:controller Admin/Xxxcontroller -r | |
| //列出所有路由列表 | |
| php artisan route:list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 数据库构造器 | |
| <?php | |
| namespace App\Http\Controllers\Xxx; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Support\Facades\DB; | |
| class XXXController extends Controller | |
| { | |
| public function index(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 【1】继承一个视图并进行传值更改 | |
| //--头部视图 | |
| //resources\views\layout\header.blade.php | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| {{-- //后面部分是子模版的定义名 --}} | |
| <title>模板名@yield('title')</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //页面显示渲染时间 | |
| This Page Render Time: {{ (microtime(true) - LARAVEL_START) }} |
NewerOlder