Vue project-imitation of Xiaomi store record

DAY 1

1 core technology

page

  • Mall Home
  • Sign in
  • Mall Product Station
  • Mall details
  • shopping cart
  • Order Confirmation
  • Order payment (WeChat/Alipay)
  • Order list
    component
  • NavHeader (navigation component)
  • NavFooter (bottom component)
  • ServiceBar (service bar component)
  • ProductParam (product parameter component)
  • OrderHeader (Order header component)
  • Loading (loading components)
  • Model (bullet component)
  • NoData (No data component)
  • ScanPayCode (payment component)
    technology stack
    Insert picture description hereNode environment installation Omit
    Git installation Omit
    Git configuration
  • git config -list View the current git configuration
  • git config -global user.name "hello" Set the current user name to xxx and configure it globally
  • git config -global user.email “[email protected]” Set the current mailbox to xxx, and it is global configuration
  • git config -global credential.helper store set up credential, help vscode remember account password
  • ssh-keygen -t rsa -C "[email protected]" Configure the public key, put the public key on the server, and put the private key on the local to
    build a warehouse- git clone http://xxxx

DAY 2

VueCli4.0 installation

  • npm install -g @vue/cli can use cnpm if the installation is slow
  • yarn global add @vue/cli
  • view -version

Vue DevTools installation

slightly

2 Front-end cross-domain solution

  • Cross-domain is a restriction strategy made by browsers for security
  • Browser requests must follow the same-origin policy: same domain name, same port, and same protocol

Three cross-domain methods

  1. CORS cross-domain
    server settings, direct call from the front-end
    Description: The back-end allows access to a certain front-end site
  2. JSONP cross-domain
    front - end adaptation, back - end cooperation
    Note: simultaneous transformation of front - end and back - end
  3. Agent cross-domain
    front - end adaptation, back - end cooperation
    Note: simultaneous transformation of front - end and back - end

Demand combing

  • Familiar with documents, view prototypes, understand requirements
  • Understand the front-end design draft-design front-end business architecture
  • Understand the back-end interface documentation-formulate relevant docking specifications
  • Coordinate resources
  • Build front-end architecture

Project directory structure settings✔

Routing encapsulation ✔

Guess you like

Origin blog.csdn.net/weixin_43176019/article/details/108456722