当前位置:网站首页>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
边栏推荐
- [untitled]
- How to get hardware information in unity
- [pyqt] the cellwidget in tablewidget uses signal and slot mechanism
- 2022.7.5DAY597
- uniapp 在onLaunch中跳轉頁面後,點擊事件失效解决方法
- 通过 Play Integrity API 的 nonce 字段提高应用安全性
- Compile QT project script with qmake
- Kitex retry mechanism
- Graduation season | keep company with youth and look forward to the future together!
- 一些线上学术报告网站与机器学习视频
猜你喜欢

verilog设计抢答器【附源码】

SQL Server knowledge gathering 9: modifying data

The concept, implementation and analysis of binary search tree (BST)

JS add spaces to the string

关于SIoU《SIoU Loss: More Powerful Learning for Bounding Box Regression Zhora Gevorgyan 》的一些看法及代码实现

Using ENSP to do MPLS pseudo wire test
![[untitled]](/img/c2/d70d052b7e9587dc81c622f62f8566.jpg)
[untitled]
![[untitled]](/img/f0/a34c116a793e844da46c7cd407224b.jpg)
[untitled]

【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘

The use of list and Its Simulation Implementation
随机推荐
Cmake learning manual
基于Retrofit框架的金山API翻译功能案例
Avoid mutating a prop directly since the value will be overwritten whenever the parent component
Deep understanding of Apache Hudi asynchronous indexing mechanism
Deep understanding of Apache Hudi asynchronous indexing mechanism
POJ1821 Fence 题解报告
Debezium同步之Debezium架构详解
Some online academic report websites and machine learning videos
基于DE2 115开发板驱动HC_SR04超声波测距模块【附源码】
【OneNote】无法连接到网络,无法同步问题
[untitled]
Get pictures through opencv, change channels and save them
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
Basic knowledge of process (orphan, zombie process)
seata 1.3.0 四種模式解决分布式事務(AT、TCC、SAGA、XA)
VR development optimization
The seventh training assignment
SQL Server knowledge collection 11: Constraints
SQL Server knowledge gathering 9: modifying data
Deconstruction and assignment of variables