当前位置:网站首页>Vuthink proper installation process
Vuthink proper installation process
2022-07-07 11:12:00 【Full stack programmer webmaster】
1. Download project vuethink, This example places items website Under the document . 2. Backstage construction Local station construction –》 With phpstudy For example 1) Create a new site domain name <VirtualHost*:80> DocumentRoot “D:\website\VueThink\php\public” ServerName www.vuethink.com ServerAlias <Directory “D:\website\VueThink\php\public”> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost> 2) win+R function drivers stay etc/hosts Add local files ip domain name 127.0.0.1www.vuethink.com 3. Front desk set up 1) function cmd Get into frontend file 2) npm install Tips for this project npm WARN package.json [email protected] No repository field. Reference address :http://hao.jser.com/archive/5381/ modify : stay package.json add to ( It can also be ignored , Don't modify ) “private”:true, “repository”: { “type”:”git”, “url”:”http://github.com/yourname/repositoryname.git” }, 3) npm run dev 4. Check php edition First thinkphp5.0 requirement php by 5.4 above , So please check first php edition . 5. user name :admin, password :123456 6. Modify file 1) Modify the database configuration file Vuethink/php/config/database.php ‘type’ => ‘mysql’, ‘hostname’ => ‘127.0.0.1’, ‘database’ => ‘install’, ‘username’ => ‘root’, ‘password’ => ‘root’, 2) Old version compressed package , Data sheet menu url The field begins with / Modify the front src/router.js file Will all children path Add... Before the path / , Login again and the jump display is normal New compressed package , Data sheet menuurl The field does not start with / There is no need to modify it here 3) modify application\admin\controller\Base.php file , See the last : // miss route : Handle unmatched routing rules public function miss() { return ; } take return; It is amended as follows return “router_error”; ( Prompt for convenience of modification here ) 4) Fore and aft end separation , modify main.js file take axios.defaults.baseURL = HOST Change it to axios.defaults.baseURL = ‘http://www.vuethink.com/index.php/’ vuethink use axios Request backend program , And the setting here is to make axios Every request is automatically added baseURL. window.HOST = HOST Change it to window.HOST = ‘http://www.vuethink.com/index.php/’ The meaning here is not clear , I'll add later .
installation is complete Interpretation band index.php reason (thinkphp problem ): because thinkphp5.0 in \config\config.php // Entry auto binding module ‘auto_bind_module’ =>false, I'm going to set it to false, therefore url Must be http://vuethink.com/index.php/admin/base/getConfigs But enter in the address bar url It still doesn't show , original \config\route_admin.php Defined above url The request can only be POST request , That's why there's a problem . take ’admin/base/getConfigs’=> [‘admin/base/getConfigs’, [‘method’ => ‘POST’]], Of POST Change it to GET, Enter in the address field http://www.vuethink.com/index.php/admin/base/getConfigs, The result shows the data ( Be on the safe side , After the test is completed, it should be changed back to POST The way ) The front and back end routing relationship is : The routing address sends a request through splicing , get data 1. Main.js file axios.defaults.baseURL= “http://www.vuethink.com/index.php/” window.HOST =”http://www.vuethink.com/index.php/” 2. for example login.vue file this.apiPost(‘admin/base/login’,data).then((res) => { if (res.code != 200) { this.loading = !this.loading this.handleError(res) } else { this.refreshVerify() if (this.checked) { Cookies.set(‘rememberPwd’,true, { expires: 1 }) } this.resetCommonData(res.data) _g.toastMsg(‘success’, ‘ Login successful ’) } }
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/113791.html Link to the original text :https://javaforall.cn
边栏推荐
- [STM32] actual combat 3.1 - drive 42 stepper motors with STM32 and tb6600 drivers (I)
- Simple and easy to modify spring frame components
- 创意信息获2家机构调研:GreatDB 数据库已在9地部署
- 香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
- Project ERROR: Unknown module(s) in QT: core gui
- The use of list and Its Simulation Implementation
- Avoid mutating a prop directly since the value will be overwritten whenever the parent component
- [untitled]
- Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
- SQL Server knowledge collection 11: Constraints
猜你喜欢
在线硬核工具
RationalDMIS2022 高级编程宏程序
Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
How to use cherry pick?
[untitled]
Qtcreator sets multiple qmake
Transaction rolled back because it has been marked as rollback-only解决
Unity script visualization about layout code
数据库同步工具 DBSync 新增对MongoDB、ES的支持
[untitled]
随机推荐
Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
网络协议 概念
[untitled]
[untitled]
How to use cherry pick?
关于在云服务器上(这里用腾讯云)安装mysql8.0并使本地可以远程连接的方法
Unity websocket server
IDEA快捷键大全
Qtcreator sets multiple qmake
【pyqt】tableWidget里的cellWidget使用信号与槽机制
mif 文件格式记录
Bookmarking - common website navigation for programmers
Opencv installation and environment configuration - vs2017
一些线上学术报告网站与机器学习视频
從色情直播到直播電商
Go slice comparison
Deconstruction and assignment of variables
Graduation season | keep company with youth and look forward to the future together!
uniapp 在onLaunch中跳转页面后,点击事件失效解决方法
使用引用