Micro-channel applet project into uni-app

Preface:

  Before doing yourself a uni-app items when the front end of the need to achieve a more complex dynamic tab and swiper switching function, but because of their own front-end to pull the foot did not write it, then we have found there is a micro-channel when the Internet search applet inside pages and extremely fit my needs. So the question is how do I turn the micro-channel applet for the uni-app project it? Search the Internet under the relevant solutions will have a really small micro-channel program into uniapp project, the project name is called [ miniprogram-to-uniapp ], then take a look at how the practical operation of it!

miniprogram-to-uniapp Project description:

Overview: a micro channel can be converted to the open source project item Uni-app item

github Address: https://github.com/zhangdaren/miniprogram-to-uniapp

Guide: https://ask.dcloud.net.cn/article/36037

The first step, install the NPM package management tool on the window:

  As the project requires the use of NPM package management tool to install the corresponding project package, while NPM is accompanied NodeJS package management tools installed together, so then we just need to node.js installed and configured.

Node.js installation configuration detailed tutorial: https://www.runoob.com/nodejs/nodejs-install-setup.html

The second step, a NPM initialization module:

First check NPM version:

In any blank disk to create a new folder to hold NPM initialization module configuration:

Use CMD input into the corresponding folder: npm init command to

The third step, using miniprogram-to-uniapp micro channel conversion uniapp applet instance:

First, download the needed transformation of small micro-channel program:

To demonstrate just download a small program mall micro letter, the project addresses: https://github.com/hanxue10180/shangcheng

The following figure shows the basic structure of a micro channel applet:

Installation miniprogram-to-uniapp, and applets into uniapp items:

Because this package is the tool requires global can be used, so it is necessary to install -g globally, run the following command to install:

asl install mini-programs-to-uniapp -g

 The installation is complete, execute the following command to view the tool version:

(Wtu -> from wx to uni meaning behind all this with the global command)

-V total population

Run the following command to small micro-channel program into a uni-app items:

At the command line, enter [wtu -i "Your applet project path"], attention -i trailing space! ! ! Such as: [wtu -i "G: \ shangcheng"]; 

carriage return after a suffix can get the same item in the source directory and directory _uni that a successful conversion.
See below:

 

 

 

 It's done, successfully transformed into uni-app project structure:

Guess you like

Origin www.cnblogs.com/Can-daydayup/p/12453173.html