当前位置:网站首页>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
边栏推荐
猜你喜欢
![[pyqt] the cellwidget in tablewidget uses signal and slot mechanism](/img/0e/02265f7195ca0add4155694530822a.png)
[pyqt] the cellwidget in tablewidget uses signal and slot mechanism

verilog设计抢答器【附源码】

shardingsphere分库分表示例(逻辑表,真实表,绑定表,广播表,单表)

通过 Play Integrity API 的 nonce 字段提高应用安全性
![[C #] the solution of WinForm operation zoom (blur)](/img/66/b70213c95acd4ad9fe2eb739bd46b5.png)
[C #] the solution of WinForm operation zoom (blur)

Arduino board description

Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)

What if copying is prohibited?

Still cannot find RPC dispatcher table failed to connect in virtual KD

RationalDMIS2022阵列工件测量
随机推荐
Kitex 重试机制
变量的解构赋值
How to remove addition and subtraction from inputnumber input box
How to play video on unityui
Still cannot find RPC dispatcher table failed to connect in virtual KD
Vscode 尝试在目标目录创建文件时发生一个错误:拒绝访问【已解决】
Hash / (understanding, implementation and application)
2022.7.6DAY598
Socket socket programming
关于在云服务器上(这里用腾讯云)安装mysql8.0并使本地可以远程连接的方法
【STM32】实战3.1—用STM32与TB6600驱动器驱动42步进电机(一)
在线硬核工具
Rolling puddle Uni_ App (VIII)
2021-05-21
vim 的各种用法,很实用哦,都是本人是在工作中学习和总结的
The difference between monotonicity constraint and anti monotonicity constraint
Get pictures through opencv, change channels and save them
Interprocess communication (IPC)
Antd select selector drop-down box follows the scroll bar to scroll through the solution
Mysql的json格式查询