preface
Get up in the morning and ask yourself: What do you have for breakfast?
It’s 11 o ‘clock, time to order takeout, and ask yourself: What’s for lunch?
Five o ‘clock off work, go home to cook, ask yourself: what dish for dinner?
At half past ten in the evening, digestion almost hungry again, ask yourself: midnight snack eat what?
A lot of times, when it’s time for dinner, we start thinking about what to eat and it never gets resolved, which is frustrating…
In order to help you solve this problem, I came up with a lottery program. That is, if you don’t know what to eat, you draw lots.
Project experience
Address: food.y0701.com/
The project should be divided into three pages, the pages are: 1 home page lottery, 2 recipe list, 3 new recipe
- Home page lottery page
On the right side of the home page are three random recipes, and the core function is on the left. The left function can randomly select recipes with a specified number of conditions, and can replace any result of the lottery.
- Recipe list page
By default, a maximum of 12 recipes are displayed in the recipe list. You can view them in pages and filter them by keyword and type.
- The new recipe
I just listed part of the dishes I often cook and eat. In order to facilitate more people to use, the operation of adding recipes can be more convenient and fast.
Function implementation
For convenience, I used Bootstrap for the front-end layout, which can adapt to the layout of mobile and computer terminals, and used layer. js to optimize the pop-up prompt. The backend was developed using ThinkPHP5 framework. In addition, I also exported the data table and stored it in the root directory of the project public/t_food. SQL, can be directly imported to execute.
Complete source code
For your convenience, I have uploaded all the code to GitHub, welcome you to PR more interesting code
GitHub project address: github.com/gxcuizy/wha…
The last
If you have any questions, you can leave a message to me. I will revise it in time. If there is something wrong, please help to correct it. By the way, the front-end page I write is more pieced together, professionals do not bother me ha……