Platform of beauty and skin care based on Flask framework

1, Development tools

This platform uses Python programming language, uses Flask and Bootstrap framework, develops under Windows 10 operating system, uses Pycharm development environment, front-end development uses HTML+CSS+JS mode, database uses MySQL database, browser uses Google Chrome.

2, Demand summary

3, Use case diagram

4, Functional module diagram

5, Database design

This platform uses Navicat database software to create rainbow database, which mainly involves user information, cosmetics information, evaluation information and other entities, and provides the structure design of key tables in the database. There are 33 datasheets in the beauty and skin care platform, including 11 main datasheets, i.e. commodity, commodity test main, commodity test subtitle, commodity comment, dynamic, dynamic comment, journal (journal information table), journal_comment (Journal comment information table), search (search keyword information table), user (user information table).

6, Detailed design

Homepage design

Among them, the implementation code of rotation animation is as follows:

function timeout(s,c,i,content){
      inter = setTimeout(function () {
      change_text[i].innerText += content[s][c];
      }, 200*c); }
function createInteral(content,cb,m) {
      change_text[m].innerText = '';
      for (let t in content) {
         for (let index = 0; index < content[t].length; index++) {
            cb(t,index,m,content); } } }

Personal information page

The main codes of user modification data are as follows:

if u and u['user_id'] and u['user_nickname'] and u['user_phone'] and u['user_age'] and u['user_autograpgh']:
nn = getUserByName(u['user_nickname'])
rr = getUserById(u['user_id'])
       if rr['user_phone'] == u['user_phone']:
           res = updateUserMessage(u)
       else: mm = getUserByTel(u['user_phone'])
           if mm: return {"status_code": "10002", "status_text": "User already exists"}
           else: res = updateUserMessage(u)

Cosmetics search page

Users can search through popular keywords, but also multi criteria search.

if k['keyword'] and k['etp'] and k['condition']:
        res = searchByProductBrands(k)
    elif k['keyword'] and k['etp']:
        res = searchByProductBrand(k)
        return {"status_code": "40005", "status_text": "Illegal data format"}
    if res:
        for i in res:
            i['commodity_date'] = str(i['commodity_date'])
        return res

Storage box page

Leaderboard query page

The real-time hot spots in leaderboards are based on the number of user clicks

client = POOL.connection()
    hot_cosmetics = None
    cursor = client.cursor(cursor=pymysql.cursors.DictCursor)
    sql = search_sql['hotCosmetics']
    hot_cosmetics = cursor.fetchall()

Make up details page

Evaluation release page

    if con.get('title') and con.get('content') and con.get('img') and con.get('tag') and con.get('title1') and con.get('content1') and con.get('title2') and con.get('content2'):
    tag = toStr(con['tag'])
    con['tag'] = tag
    com_id = get_Com(con['com'])
    con['com_id'] = com_id
    res = graphicTest(con)

7, References

[1] Lai Haiming. Design and implementation of Internet document sharing platform [D]. Xiamen University, 2013
[2] Shen Yueming, Liu Lihua. Conception of building beauty O2O platform based on the international demand of beauty luxury goods [J]. Modern commerce, 2017 (19): 32-33
[3] AI Yingdong, Li Jianbing, Han Yingjie. Design and implementation of Microcomputer Laboratory Management System Based on Python language and Flask framework [J]. Information and computer (theoretical Edition), 2019 (06): 107-108
[4] Xiao Rui, Zi yongsuo, Hou Xiaomao. MySQL database development practice [M]. Beijing: China Water Conservancy and Hydropower Press, 2017
[5] Zhang Haifan. Introduction to software engineering [M]. Beijing: Tsinghua University Press, 2012:18-20
[6] Shen Hongwei. Design and implementation of enterprise intranet security system based on Flask [D]. Beijing Jiaotong University, 2018
[7] Qin hang. Principle and practice of software project management [M]. Beijing: Tsinghua University Press, 2015
[8] An Caixia. Enterprise marketing management system based on Python and MySQL [J]. Computer programming skills and maintenance, 2014 (16): 47-49

Published 4 original articles, won praise 0, visited 7
Private letter follow

Keywords: Database Python MySQL Programming

Added by Dtonlinegames on Fri, 21 Feb 2020 07:50:48 +0200