
Front and rear source code for fitness Mini programs
Environmental requirements:
PHP>=7.0 (recommended 7.2)
Laravel 5.6
Installation steps:
Install the PHP environment (please Baidu yourself)
Upload source code to a web directory
Refer to Laravel installation steps.
The source code of the Mini programs is the weapp directory. Use HBuilder to open it, fill in the appid of your Mini programs, and configure the domain name.
It is recommended to use Pagoda to install it, which is more convenient, and you need to enable PHP-related extensions and some functions (laravel needs to use some functions).
Download plug-in code
After downloading, unzip it to a certain directory, then open HBuilderX, File->Import->Importfromlocalproject, find the directory you just extracted, and import
Modify interface domain name
Open appcode->plugins->request->js-> index.js, and add the code to http://js.wonyes.org/api/
Change it to your domain name (how to download and configure backend code will be explained later), assuming that the domain name you deploy backend is www.abc.com,
Then fill in http://www.example.com here www.abc.com/api/
Back-end source code, the back-end is based on laravel5.8, and the source code is api.zip in the source code compression package of Fitness Mini programs
deployment environment
It is recommended to use the Pagoda Panel, configure php7.2mysql5, create a site, and then upload the extracted source code to this directory
Pagoda Panel-> Website-> Site-> Settings-> Website Directory-> Operation Directory-> Select Disclosure
Pseudo-static set to
Location/{
try_files$uri$uri//index.php$is_args$query_string;
}
Go to the root directory of the website and set the storage and bootstrap/cache permissions to 777
Enter the site directory (the directory with composer.json) from the terminal, execute composerinstall, and wait for completion
Create a database with the library name and user name jianshen, and the password is asdgasa324. You can also modify it yourself. After modification, you need to synchronize the password information in the.env file under the root directory, and then import data.sql under the root directory of the website
Suppose the domain name you deploy is www.abc.com, then the backend management address is http://www.abc.com/sidong, and the user name admin password is 123456
To enter the background, first enter System Settings-> Merchant Management-> Four-Action Fitness-> Edit, and configure relevant information such as Mini programs id, merchant id, key, etc., otherwise it cannot be used