Giter Site home page Giter Site logo

easyapi-service's Introduction

EasyAPI服务中心 http://service.easyapi.com

项目介绍

本模块主要是EasyAPI服务中心,可以查看服务市场购买的服务,并进行密钥管理,成员管理等功能。

相关技术和第三方库


开发调试

# Project setup
yarn install

# Compiles and hot-reloads for development
yarn run serve

# Compiles and minifies for production
yarn run build

# Run your tests
yarn run test

# Lints and fixes files
yarn run lint

项目目录结构

├── README.md
├── public                  #静态资源文件夹,绝对路径来引用
├── dist                    #打包后输出文件夹
├── index.html              #入口
├── node_modules            #依赖模块
├── package.json
├── src                     #源码
  ├── App.vue
  ├── assets                #静态资源
  │   ├── icons             #自定义图标
  │   ├── images            #图片
  │   └── styles            #样式表
  ├── components            #业务组件
  ├── libs                  #依赖工具函数
  ├── locale                #多语言文件
  ├── main.js
  ├── pages                 #页面文件
  ├── router                #路由配置
  ├── api
  │   ├── api.js            #API列表
  │   └── request.js          #Ajax封装
  └── store                 #Vuex配置
└── static                  #静态资源文件
  └── images                #图片

命名规范

  • 使用kebab-case(短横线)命名方式
  • 图片资源采用的命名规范
  • CSS命名规范
  • 常规名称命名方案,参见EasyAPI中英文翻译
  • API接口方法命名,例如getUser,getUserList,createUser,updateUser,deleteUser,其他方法尽量动词在前,例如cancelOrder 取消订单

其他说明

  • page目录页面命名规范,文件命令简明扼要,例如/pages/api/list.vue表示API列表页,/pages/api/detail.vue表示API详情页,其他还包括edit.vue,info.vue,report.vue
  • 如果页面必须是2个单词组成,使用短横线分隔命名,例如文章分类article-category,另外考虑是否可以使用/pages/article/category/list.vue来命名,尽量不使用短横线
  • page目录中尽量采用样式表和页面分离开发,例如login文件夹中包含login.vue,login.styl
  • 自定义组建说明,基于成熟的组建进行自定义开发,可平滑升级,打造属于EasyAPI的Vue组件库,以EasyAPI缩写ea为前缀,例如ea-table
  • 布局已放到pages/layout/ 文件夹下的layout.vue
  • 网络请求已使用axios,并封装到fetch.js
  • 用户信息等全局变量,必须使用store管理,包括相关api请求放置到modules文件夹下

Vue方法放置顺序

components
props
data
created
mounted
activited
update
beforeRouteUpdate
metods
filter
computed
watch

常见问题

1. 编译失败

请使用cnpm试试

2. 编译成功启动失败

请确保网络正常,可提供错误给相关工程师

easyapi-service's People

Contributors

chenyunc123 avatar jyoyyz avatar shdboom avatar zhang20084 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.