Summary of the week of internship

The feeling of a week’s internship is that, because my university is not a computer major, so I don’t have much experience, including self-study, there are many limitations, because I don’t know how the projects of outside companies are written, and I am in Some knowledge points may be missed in the self-study process. At this time, the internship becomes very important.

image

These days, I have been looking at the code written by others. Fortunately, I pay more attention to the basics, so 80% of the code written by others can be understood, but it is still flawed.

Looking back at the vue.js front-end project I wrote before, and I didn’t have that kind of thinking before, that is, modularization, componentization, and encapsulation. These ideas are too important to write a lot of code and write less repetitive code. The front-end project of the intern company just reflects this thinking very well.

image

This picture can actually reflect a lot of things, it can reflect component thinking, we can leave a big frame for this picture,

Separate the head and bottom parts, separate them, and become a component, which can realize the sharing of components, because it may be practical in other pages, then we only need to introduce it. In fact, this thinking is caused by Developed from the background,

And the main content below,

In fact, this part can be separated into a component, and then introduced into this large framework. The data we need can be passed from the large framework to the small component. This reflects the attribute transfer of the parent and child components. It is necessary to use vue . The props attribute of js, and the $emit for event dispatch,

Also, from the screenshot above, you can roughly see what fields are needed in the database, such as avatar field, nickname field, content field, time field, comment field, like field, etc.

Now the front and back are separated, and then the front and back ends write data to the interface together. The front end is to configure the path according to the backend interface, and then obtain the data passed by the backend to us through asynchronous requests. Pay attention to those Fields must communicate well with the background and cooperate well. Asynchronous requests are generally called using Promise-encapsulated functions

image

Of course, there are many more. The created life cycle function is generally used to initialize the page. For example, when a page is just loaded, we should have data for the user to see, so when it first loads, we must first request it from the background Some initialization data is now on the page, so this function came into being.


Next are watch, computed, and method attributes. These two words and things are too powerful. If you learn how to use them, you may be handy. I'm still studying them, and they are mainly applied to the needs of linkage.

image

Of course, I also found a very interesting thing is the DOS batch command

Post the code to see

@ECHO OFFe: cd edtam-modelplus-master \ modelplusnpm run serve
 
 
  1. @echo off 表示不会显的意思,


  2. e: 表示本地磁盘e


  3. cd 项目的目录


  4. npm run serve 执行命令,启动项目


  5. 然后就可以运行项目了


image

image

image

So I still learned a lot of things. The company's Xuan brother also gave us a bit of science, how to solve the utf-8 garbled, etc., let’s summarize it here today.

Guess you like

Origin blog.51cto.com/15067249/2576223