文章目录
前言一、项⽬搭建1.新建⼩程序项⽬2. 搭建⽬录结构3. 搭建⽬录结构4. 字体图标5. 其他前言
一、项⽬搭建
1.新建⼩程序项⽬
填入自己的appid
2. 搭建⽬录结构
3. 搭建⽬录结构
{"pages": [ "pages/index/index","pages/category/index", "pages/goods_list/index","pages/goods_detail/index", "pages/cart/index","pages/collect/index","pages/order/index","pages/search/index","pages/user/index","pages/feedback/index","pages/login/index","pages/auth/index","pages/pay/index"],"window": {"backgroundTextStyle": "light","navigationBarBackgroundColor": "#eb4450","navigationBarTitleText": "黑马优购","navigationBarTextStyle": "white"},"tabBar": {"color": "#999","selectedColor": "#ff2d4a","backgroundColor": "#fafafa","position": "bottom","borderStyle": "black","list": [{"pagePath": "pages/index/index","text": "首页","iconPath": "icons/home.png","selectedIconPath": "icons/home-o.png"},{"pagePath": "pages/category/index","text": "分类","iconPath": "icons/category.png","selectedIconPath": "icons/category-o.png"},{"pagePath": "pages/cart/index","text": "购物车","iconPath": "icons/cart.png","selectedIconPath": "icons/cart-o.png"},{"pagePath": "pages/user/index","text": "我的","iconPath": "icons/my.png","selectedIconPath": "icons/my-o.png"}]},"sitemapLocation": "sitemap.json"}
4. 字体图标
打开阿⾥巴巴字体图标 ⽹站选择的图标添加⾄项⽬下载到本地将样式⽂件 由 css 修改为 wxss⼩程序中引⼊网站:/
5. 其他
小程序开发文档:https://developers./miniprogram/dev/framework/
mdn文档:/zh-CN/