实战项目名称:仿知识星球App
技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql )
已实现功能:微信登录,创建星球,内容管理,星球管理
项目git地址:请点击访问

项目最终效果图:@点击访问效果图,欢迎关注收藏订阅专栏!!!

  • 文章会先按照 ① uni-app端 、 ② Node.js后端 、③ 微信小程序、④ 利用宝塔面板部署项目;先后顺序更新文章。

文章目录

  • 一、今日实战目标
  • 二、实战步骤
    • 1.安装HBuilderX开发工具
    • 2.新建项目
    • 3.配置全局通用css样式文件
  • 总结

提示:该项目只用于个人实战,不应用于任何商业用途。

一、今日实战目标

  • 配置好开发工具
  • 项目全局配置
  • 引入uView UI框架

二、实战步骤

1.安装HBuilderX开发工具

开发工具下载地址:HBuilderX下载链接

我用的是MacOS,以后展示也是Mac版的,建议下载正式版。

2.新建项目

打开HBuilderX工具,点击新建 => 新建项目;并按下方图片进行设置,项目类型选择uni-app,Vue版本选择2

3.配置全局通用css样式文件

  • 项目根目录新建static目录,新增default.css文件,内容如下
/* default Setting */
*,
*::before,
*::after {box-sizing: border-box;margin: 0;padding: 0;
}body {color: #384268;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;font-family: 'PingFangSC-Regular', 'Noto Sans TC', sans-serif;
}.overflow-hidden {overflow: hidden;
}.full{width: 100%;
}
/* Font Setting */
.bold {font-weight: bold;
}/* Element specific css */
.stgap>*:not(:first-child) {margin-top: 5px;
}.stgap1>*:not(:first-child) {margin-top: 10px;
}.stgap2>*:not(:first-child) {margin-top: 20px;
}.stgap3>*:not(:first-child) {margin-top: 30px;
}.stgap4>*:not(:first-child) {margin-top: 40px;
}.stgap5>*:not(:first-child) {margin-top: 50px;
}.stgap6>*:not(:first-child) {margin-top: 60px;
}.stgap7>*:not(:first-child) {margin-top: 70px;
}.stgap8>*:not(:first-child) {margin-top: 80px;
}.stgap9>*:not(:first-child) {margin-top: 90px;
}.stgaph1>*:not(:first-child) {margin-top: 15px;
}.stgaph2>*:not(:first-child) {margin-top: 25px;
}.stgaph3>*:not(:first-child) {margin-top: 35px;
}.stgaph4>*:not(:first-child) {margin-top: 45px;
}.stgaph5>*:not(:first-child) {margin-top: 55px;
}.stgaph6>*:not(:first-child) {margin-top: 65px;
}.stgaph7>*:not(:first-child) {margin-top: 75px;
}.stgaph8>*:not(:first-child) {margin-top: 85px;
}.stgaph9>*:not(:first-child) {margin-top: 95px;
}.slgap>*:not(:first-child) {margin-left: 5px;
}.slgap1>*:not(:first-child) {margin-left: 10px;
}.slgap2>*:not(:first-child) {margin-left: 20px;
}.slgap3>*:not(:first-child) {margin-left: 30px;
}.slgap4>*:not(:first-child) {margin-left: 40px;
}.slgap5>*:not(:first-child) {margin-left: 50px;
}.slgap6>*:not(:first-child) {margin-left: 60px;
}.slgap7>*:not(:first-child) {margin-left: 70px;
}.slgap8>*:not(:first-child) {margin-left: 80px;
}.slgap9>*:not(:first-child) {margin-left: 90px;
}.slgaph1>*:not(:first-child) {margin-left: 15px;
}.slgaph2>*:not(:first-child) {margin-left: 25px;
}.slgaph3>*:not(:first-child) {margin-left: 35px;
}.slgaph4>*:not(:first-child) {margin-left: 45px;
}.slgaph5>*:not(:first-child) {margin-left: 55px;
}.slgaph6>*:not(:first-child) {margin-left: 65px;
}.slgaph7>*:not(:first-child) {margin-left: 75px;
}.slgaph8>*:not(:first-child) {margin-left: 85px;
}.slgaph9>*:not(:first-child) {margin-left: 95px;
}/* New flex css */
.flex {display: flex;
}.row {display: flex;flex-direction: row !important;
}.col {display: flex;flex-direction: column;
}.row-rev {display: flex;flex-direction: row-reverse;
}.col-rev {display: flex;flex-direction: column-reverse;
}.warp {display: flex;flex-wrap: wrap;
}.nowrap {display: flex;flex-wrap: nowrap;
}.space-between {display: flex;justify-content: space-between;
}.flex-start {display: flex;justify-content: flex-start;
}.flex-center {display: flex;justify-content: center;
}.flex-end {display: flex;justify-content: flex-end;
}/* (Horizontal) The main spindle is X, the X axis is symmetrical */
.hor-center {display: flex;align-items: center;
}.hor-start{display: flex;align-items: flex-start;
}
.hor-end {display: flex;align-items: flex-end;
}
/* (Vertical) The main spindle is Y, the Y axis is symmetrical */
.ver-center {display: flex;justify-content: center;
}.ver-start{display: flex;justify-content: flex-start;
}
.ver-end {display: flex;justify-content: flex-end;
}.both-center {display: flex;justify-content: center;align-items: center;
}.text-overflow {overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}.text-overflow1,
.text-overflow2,
.text-overflow3,
.text-overflow4,
.text-overflow5 {overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;
}.text-overflow1 {-webkit-line-clamp: 1;
}.text-overflow2 {-webkit-line-clamp: 2;
}.text-overflow3 {-webkit-line-clamp: 3;
}.text-overflow4 {-webkit-line-clamp: 4;
}.text-overflow5 {-webkit-line-clamp: 5;
}.relative {position: relative;
}.absolute {position: absolute;
}.pre-line {white-space: pre-line;/*換行\n <br/>都能*/
}/*== New CSS End ==*/
  • 在App.vue文件中,引入上面新增的css文件,配置这个是为了项目提高项目的开发效率,里面都是项目中会常用到的css样式

总结

为了提高开发效率,项目也使用了uView UI框架,下一篇讲解如何引入uView框架,想了解这个框架的可以点击上面的蓝色字体链接进行访问

由于项目目前在对接后台api中,项目git地址:请点击访问,大家可以去clone下来借鉴下;

  • 温馨提示:
  1. 项目仅用于个人实战,设计图和架构是自己基于知识星球APP进行设计的,算得上是入门级的uni-app,后期会更新一个企业级uniapp项目
  2. 我是在空闲中写写博客,并没有很规范,欢迎在评论区留下你的建议与意见。
  3. git项目拷贝下来的代码有不懂的,可以截图私信给我,看到会回复你,希望可以帮助到你了解和开发uniapp。

uniapp实战项目 (仿知识星球App) - - 配置开发工具和全局css样式相关推荐

  1. uniapp实战项目 (仿知识星球App) - - tabBar配置

    实战项目名称:仿知识星球App 技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql ) 已实现功能:微信登录,创建星球,内容管理, ...

  2. uniapp实战项目 (仿知识星球App) - - 自定义顶部导航栏和登录弹窗组件

    实战项目名称:仿知识星球App 技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql ) 已实现功能:微信登录,创建星球,内容管理, ...

  3. uniapp实战项目 (仿知识星球App) - - 引入uView框架

    实战项目名称:仿知识星球App 技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql ) 已实现功能:微信登录,创建星球,内容管理, ...

  4. uniapp实战项目 (仿知识星球App) - - 效果篇

    实战项目名称:仿知识星球App 技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql ) 已实现功能:微信登录,创建星球,内容管理, ...

  5. uniapp实战项目 (仿知识星球App) - - 利用computed监听用户操作

    实战项目名称:仿知识星球App 技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql ) 已实现功能:微信登录,创建星球,内容管理, ...

  6. uniapp实战项目 (仿知识星球App) - - 封装组件

    实战项目名称:仿知识星球App 技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql ) 已实现功能:微信登录,创建星球,内容管理, ...

  7. uniapp实战项目 (仿知识星球App) - - 实现图片懒加载

    实战项目名称:仿知识星球App 技术栈:前端 => uni-app ( 后端:Node.js + Mysql + Apollo + Graphql ) 已实现功能:微信登录,创建星球,内容管理, ...

  8. uniapp实战项目仿糗事百科_项目设计最好用的底层思考模型——黄金圈

    为什么要学习黄金圈法则 如何学习黄金圈法则 学习黄金圈法则哪些内容 彩蛋 全文共计2200字,10张图片I阅读13分钟 为什么要学习黄金圈法则 在工作中和生活中,你是否遇到过以下的困惑: 1-老板突然 ...

  9. UNIAPP实战项目笔记43 购物车页面修改收货地址和修改默认地址

    UNIAPP实战项目笔记43 购物车页面修改收货地址和修改默认地址 实际案例图片 修改收货地址和修改默认地址页面布局和功能 具体内容图片自己替换哈,随便找了个图片的做示例 用到了vuex的状态机,具体 ...

最新文章

  1. Delphi XE5 常见问题解答
  2. SQL数据库常见故障及解决方法
  3. Linux socket 网络编程常用函数总结
  4. JAVA数据结构-稀疏数组
  5. 微服务扩展新途径:Messaging
  6. 【C语言简单说】十八:二维数组
  7. 牛客网【每日一题】5月1日题目 [SCOI2012]滑雪与时间胶囊
  8. 基于matlab的数字下变频器的设计与仿真应用,基于MATLAB的数字下变频器的设计与仿真应用.pdf...
  9. github的应用详解
  10. 电子科大提出“姿态蒸馏”算法-实现快速人体姿态估计
  11. Kafka的消费语义
  12. [zz]为小米创建虚拟机路由器
  13. 编译OpenJDK12:freetypeScaler.obj error LINK2019 无法解析的外部符号
  14. 透过微积分看芝诺悖论-龟兔赛跑
  15. hashmap按值排序
  16. 光纤传输网的发展及其新的分层结构
  17. 9 款最好的免费博客网站对比
  18. 微信小程序--立体清新文字
  19. 电子学推动计算机产业,自旋电子学和计算机硬件产业!-物理杂志.PDF
  20. 【MQTT】使用MQTT.fx上报温度到腾讯云

热门文章

  1. CardView属性app:cardUseCompatPadding和app:cardPreventCornerOverlap
  2. wav2lip:Accurately Lip-syncing Videos In The Wild
  3. 什么才算是“好的”测试用例?
  4. 增加bt下载tracker的网站
  5. 0111总结-函数与极限-高等数学
  6. 【Java IO模式】Java BIO NIO AIO总结
  7. 增加/删除临时IP地址
  8. java web 图片上传
  9. 缓解 WPF 应用程序中的空域问题
  10. 【C语言】打印出一箭穿心图案(简单版)----gotoxy函数