# 使用步骤
# 1)从仓库拉下模板项目(仓库地址: https://funenc.coding.net/p/odoo_mobile_web_template/git)
# 2)设置 /package.json文件
设置一个name(如"yong"、"crax"等):"yong":"export CODER=yong&&npm run dev";
mac系统用'export',windows系统用'set'.
# 3)设置 /config/index文件
设置后台host_url,对应自己相应的name.
# 4)设置 /src/main.js文件
a、如果是PC端,可在main.js里引入element-ui.(例如"/src/pages/Login.vue")
b、移动端的话,需要在相应页面按需引入相关vux组件.(例如"/src/pages/Data.vue")
c、根据配置的name设置相应的agent_id和域名、数据库、account_id,本地开发时可不设置域名
d、根据项目文件夹名称设置project_name.
# 5)安装依赖,npm install
如果安装了淘宝镜像的话可使用 "cnpm install",速度会快一些.
# 6)安装依赖,npm run xx(package.json里设置的name)
# 7)项目运行起过后可进行相应开发
(注:
1):如果不验证免登,可把main.jsli的turn设为true.
2):设置路由时,默认的首页路径经常写为' '或'/'.线上应写为'/*')