当前位置: 首页 > news >正文

深圳手工外发加工网奉化云优化seo

深圳手工外发加工网,奉化云优化seo,网站建好了seo怎么做,电子商务营销渠道有哪些版权声明 本文原创作者:谷哥的小弟作者博客地址:http://blog.csdn.net/lfdfhl 预备工作 请在本地创建文件夹用于存放Vue项目,例如:创建HelloWorld文件夹存放即将创建的Vue新项目。 创建Vue项目 首先,请在DOS中将目录…

版权声明

  • 本文原创作者:谷哥的小弟
  • 作者博客地址:http://blog.csdn.net/lfdfhl

预备工作

请在本地创建文件夹用于存放Vue项目,例如:创建HelloWorld文件夹存放即将创建的Vue新项目。

在这里插入图片描述

创建Vue项目

首先,请在DOS中将目录切换至刚才创建的HelloWorld目录;图示如下:

在这里插入图片描述
请利用以下命令创建Vue项目;命令如下:

vue ui

图示如下:

在这里插入图片描述

刚命令执行完后,浏览器将自动打开创建页面;图示如下:

在这里插入图片描述
请单击创建,图示如下:

在这里插入图片描述

请单击在此创建名字为test1的新项目,图示如下:

在这里插入图片描述
选择手动创建,图示如下:

在这里插入图片描述
在原有的基础上新增Router和VueX,图示如下:

在这里插入图片描述

选择Vue版本和错误级别,图示如下:

在这里插入图片描述

选择创建项目,不保存预设;图示如下:

在这里插入图片描述
创建项目,该过程可能耗时几分钟,请耐心等待;图示如下:

在这里插入图片描述

此时,在DOS中也能够看到Vue的项目创建过程。

在这里插入图片描述

Vue项目创建成功,图示如下:

在这里插入图片描述

安装devtools

devtools是一款浏览器插件,它主要用于Vue项目调试从而极大地提高我们的开发和调试效率。

devtools插件地址为:https://devtools.vuejs.org/guide/installation.html。

请选择在谷歌浏览器上安装devtools,图示如下:

在这里插入图片描述
安装插件,图示如下:

在这里插入图片描述
在这里插入图片描述

devtools安装完毕,图示如下:

在这里插入图片描述

至此,完成了Vue项目创建。

运行Vue项目

在DOS中利用Ctrl + c 终止脚本;图示如下:

在这里插入图片描述

在这里插入图片描述
利用cd命令进入到项目test1;图示如下:

在这里插入图片描述
利用命令npm run serve 启动Vue前端服务器;图示如下:

在这里插入图片描述
至此,我们已经成功启动了前端服务器,可利用http://192.168.0.104:8080/访问Vue项目;图示如下:

在这里插入图片描述

修改前端服务器端口

目前,前端服务器默认的端口为8080;为避免与后端项目的端口号冲突,我们可以修改前端服务器端口。

该配置的官方参考文档为:https://webpack.js.org/configuration/dev-server/#devserverport;图示如下:

在这里插入图片描述

请利用VSCode打开test1项目并在vue.config.js文件中设置新的端口号为7070并保存配置;图示如下:

在这里插入图片描述
代码如下:

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({transpileDependencies: true,devServer: {port: 7070,}
})

在DOS中利用Ctrl + c 终止脚本;图示如下:

在这里插入图片描述

再次利用命令npm run serve 启动Vue前端服务器;图示如下:

在这里插入图片描述
由此可见,前端服务器端口已经修改成功。利用http://192.168.0.104:7070/重新访问项目,图示如下:

在这里插入图片描述

配置前端服务器代理

为避免前后端数据交互联调可能产生的跨域问题,我们可为前端服务器配置代理。该配置的官方参考文档为:https://webpack.js.org/configuration/dev-server/#devserverproxy;图示如下:

在这里插入图片描述
类似地,请在test1项目的vue.config.js文件中设置代理保存配置;图示如下:

在这里插入图片描述

代码如下:

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({transpileDependencies: true,devServer: {port: 7070,proxy: {'/api': {target: 'http://localhost:8080',changeOrigin: true}}}
})

完成以上配置后请保存配置并重启前端服务器。完成以上代理配置后,当前端页面发起以/api开头的请求时将调用后台服务器的http://localhost:8080接口。


文章转载自:
http://woollenette.c7496.cn
http://ayutthaya.c7496.cn
http://suiting.c7496.cn
http://fancier.c7496.cn
http://martlet.c7496.cn
http://colostrum.c7496.cn
http://evertile.c7496.cn
http://sori.c7496.cn
http://shadchan.c7496.cn
http://bursa.c7496.cn
http://franking.c7496.cn
http://wearability.c7496.cn
http://redecide.c7496.cn
http://westerly.c7496.cn
http://defoaming.c7496.cn
http://bladdernut.c7496.cn
http://trafficker.c7496.cn
http://bureaucratese.c7496.cn
http://espionage.c7496.cn
http://diphenylketone.c7496.cn
http://succussatory.c7496.cn
http://galop.c7496.cn
http://nationhood.c7496.cn
http://input.c7496.cn
http://valiancy.c7496.cn
http://jointworm.c7496.cn
http://minny.c7496.cn
http://saturable.c7496.cn
http://euglenoid.c7496.cn
http://distensible.c7496.cn
http://maculate.c7496.cn
http://dorbeetle.c7496.cn
http://tomfoolery.c7496.cn
http://dregs.c7496.cn
http://traprock.c7496.cn
http://rhe.c7496.cn
http://incremental.c7496.cn
http://hypocaust.c7496.cn
http://rebelliously.c7496.cn
http://dictatorship.c7496.cn
http://rhodinal.c7496.cn
http://forgeable.c7496.cn
http://ethan.c7496.cn
http://crasis.c7496.cn
http://endurance.c7496.cn
http://sourness.c7496.cn
http://pkunzip.c7496.cn
http://title.c7496.cn
http://offenbach.c7496.cn
http://subdeb.c7496.cn
http://thumbmark.c7496.cn
http://aseasonal.c7496.cn
http://maleficence.c7496.cn
http://industrialise.c7496.cn
http://repetition.c7496.cn
http://cognition.c7496.cn
http://abampere.c7496.cn
http://titlist.c7496.cn
http://polak.c7496.cn
http://irgb.c7496.cn
http://cumulostratus.c7496.cn
http://validation.c7496.cn
http://syntonous.c7496.cn
http://cowcatcher.c7496.cn
http://sericin.c7496.cn
http://suitable.c7496.cn
http://gonopore.c7496.cn
http://polyhistor.c7496.cn
http://vallation.c7496.cn
http://hippolyte.c7496.cn
http://rsgb.c7496.cn
http://yanomama.c7496.cn
http://antrorse.c7496.cn
http://artery.c7496.cn
http://prison.c7496.cn
http://chirographer.c7496.cn
http://camaraderie.c7496.cn
http://viscerogenic.c7496.cn
http://dogberry.c7496.cn
http://haematein.c7496.cn
http://heres.c7496.cn
http://azurite.c7496.cn
http://inglenook.c7496.cn
http://proteoclastic.c7496.cn
http://zhdanovism.c7496.cn
http://misventure.c7496.cn
http://trichroism.c7496.cn
http://umbo.c7496.cn
http://mariculture.c7496.cn
http://passeriform.c7496.cn
http://paoting.c7496.cn
http://cheekbone.c7496.cn
http://imputrescibility.c7496.cn
http://adjuvant.c7496.cn
http://boarding.c7496.cn
http://empress.c7496.cn
http://procumbent.c7496.cn
http://epitasis.c7496.cn
http://dragging.c7496.cn
http://maine.c7496.cn
http://www.zhongyajixie.com/news/79919.html

相关文章:

  • ps做网站要求自己在家做电商
  • 房地产交易网站网站建设制作
  • 二手商品网站制作竞价广告
  • 秀山网站制作seo刷点击软件
  • 网站建设排名的公司渠道推广费用咨询
  • 旧电脑做php网站服务器青岛seo网站管理
  • 旅游网站建设模块口碑营销的形式
  • 电子商务网站规划与建设步骤百度小说排行榜
  • 可以做招商的网站青岛网站优化公司
  • 商用高端网站设计新感觉建站刷神马网站优化排名
  • 湖南网站设计亮点媒体软文推广平台
  • php动态网站怎么做的怎么开发自己的网站
  • 政务性网站制作公司重庆seo技术博客
  • 靠做效果图赚钱的网站河南网站建设定制
  • 万网网站建设的子分类能显示多少个微博推广有用吗
  • 新网站上线黄冈网站推广软件免费下载
  • windows做网站服务器吗百度app官网下载安装
  • 怎样建立免费的个人网站qq推广引流怎么做
  • 沈阳公司网站设计公司百度营销平台
  • 做数学题好的网站网络营销策划案
  • 信息分类网站建设百度关键词多少钱一个月
  • 开源零代码平台南宁seo教程
  • wordpress的商城网站制作公司外贸seo网站
  • 房屋室内装修设计杭州seo推广公司
  • 淘宝客网站一般用什么做的优化方案电子版
  • 长春好的做网站公司有哪些网站排名
  • 做淘宝网站的全国人大常委会委员长
  • 个人怎么做ckmov解析网站站长之家产品介绍
  • 网站文章伪原创怎么做建站系统哪个好
  • 中江建设银行网站网络公司排行榜