• The original link

Stock robot

Front end (mobile & applets)/back end (NodeJS)

Front end: Vue + Mpvue (support mobile terminal and applets); Back end: KOA (using Koa2 to develop the server)

Vue is a set of progressive frameworks for building user interfaces. Vue’s core library focuses only on the view layer, making it easy to get started and integrate with third-party libraries or existing projects. On the other hand, when combined with modern toolchains and various supporting libraries, Vue is perfectly capable of providing drivers for complex, single-page applications.

Mpvue is a front-end framework for developing applets using vue.js. The framework is based on vue. js core, and MPvue modifies the runtime and Compiler implementation of vue. js to enable it to run in the environment of small programs, thus introducing a whole set of vue. js development experience for small program development.

Koa was built by the original Express team to be a smaller, more expressive, and more robust Web framework. Composing web applications using KOA eliminates repetitive and tedious nesting of callback functions and greatly improves error handling efficiency by combining different generators. Koa doesn’t bundle any middleware into kernel methods, it just provides a lightweight and elegant library of functions that makes writing Web applications a breeze.

Introduction to the

A chatbot that uses Node services to support both mobile and applets

Build Setup

# install dependencies
npm install

# build mini program
npm start

# build H5 pages
npm run startH5

# build pages for production with minification for mini program
npm run build

# build pages for production with minification for H5 program
npm run buildH5

# build node resource for server
gulp build

Copy the code

Front end separation

# start mini progrom
npm run dev

# start H5 pages
npm run devH5

# start server
npm run server
Copy the code

The server code is only in the projectserverFolder, can be split according to their own needs)

Important!!

  • pleaseproject.config.jsonFile,appidFill in your wechat development accountappid;
  • Echarts-for-weixin supports wechat version >= 6.6.3, corresponding to the base library version >= 1.9.91.

features

  • useVue.jsBuild mobile applications
  • usempvueReuse code to build applets
  • useKoaBuilding the server
  • The Vuex data management solution facilitates building complex applications
  • Use webPack build mechanisms: custom build strategy, development phase hotReload
  • Support for using NPM external dependencies
  • Use the OLAMI ARTIFICIAL Intelligence Open Platform natural language semantic understanding API

The plug-in

  • gulp is a toolkit for automating painful or time-consuming tasks in your development workflow, so you can stop messing around and build something.

  • Echarts is an open source JavaScript visualization library that runs seamlessly on PC and mobile devices, compatible with most browsers (IE8/9/10/11, Chrome, Firefox, Safari, etc.). The bottom layer relies on ZRender, a lightweight vector graphics library, to provide intuitive, interactive and highly personalized data visualization charts.

  • Day.js is a lightweight JavaScript library that handles times and dates, keeping exactly the same API design as moment. js. If you’ve ever used moment.js, do you already know how to use day.js

screenshots

Mobile & applets

Contribution

RuShi

License

MIT