0
点赞
收藏
分享

微信扫一扫

小程序学习电商小项目实战(1)--框架搭建和准备


文章目录

  • ​​开发工具​​
  • ​​框架搭建​​

开发工具

vscode + 小程序开发工具 + git管理

vscode需要装的插件:

小程序学习电商小项目实战(1)--框架搭建和准备_快捷键


补充: vscode的快捷键:

框架搭建

1.新建几个文件夹

小程序学习电商小项目实战(1)--框架搭建和准备_快捷键_02


小程序学习电商小项目实战(1)--框架搭建和准备_ico_03


2.删除默认的文件

如:log页面,默认的app.js. logs等文件夹内容

3.新建13个页面

vs中的快捷键: wx-app:

小程序学习电商小项目实战(1)--框架搭建和准备_快捷键_04


vs列式编辑:几个快捷键:

ctrl + shift + alt + 方向键 : 进入列式编辑

ctrl+左键 ,跳到单词末尾(要选中的话可同时按住shfit)

ctrl+home/end,跳到行尾或行头(要选中的话可同时按住shfit)

技巧:注意用空格先把单词分开,便于处理4.引入字体图标iconfont

小程序学习电商小项目实战(1)--框架搭建和准备_快捷键_05


小程序学习电商小项目实战(1)--框架搭建和准备_小程序_06


小程序学习电商小项目实战(1)--框架搭建和准备_框架搭建_07


​​https://www.jianshu.com/p/17b5a1f12669​​ 5.设置4个tabbar

app.json

{
"pages":[
"pages/index/index",
"pages/category/category",
"pages/goods_list/goods_list",
"pages/goods_detail/goods_detail",
"pages/cart/cart",
"pages/collect/collect",
"pages/order/order",
"pages/search/search",
"pages/user/user",
"pages/feedback/feedback",
"pages/login/login",
"pages/auth/auth",
"pages/pay/pay"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "电商小项目",
"navigationBarTextStyle":"black"
},
"tabBar": {
"color": "#999",
"selectedColor": "#ff2d4a",
"backgroundColor": "#fafafa",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "icons/home.png",
"selectedIconPath": "icons/home-o.png"
},
{
"pagePath": "pages/category/category",
"text": "分类",
"iconPath": "icons/category.png",
"selectedIconPath": "icons/category-o.png"
},
{
"pagePath": "pages/cart/cart",
"text": "购物车",
"iconPath": "icons/cart.png",
"selectedIconPath": "icons/cart-o.png"
},
{
"pagePath": "pages/user/user",
"text": "我的",
"iconPath": "icons/my.png",
"selectedIconPath": "icons/my-o.png"
}
]
},
"sitemapLocation": "sitemap.json"
}

以上的所有操作效果如下:

小程序学习电商小项目实战(1)--框架搭建和准备_框架搭建_08


git代码地址:

​​https://github.com/hufanglei/pyg-demo/tree/day01​​


举报

相关推荐

0 条评论