Feelings about solving problems for students - Tianxia Frontend is a family!

   In the process of completing the project in full swing, everyone will have various interfaces when designing the xxx system, and this has reached the field of this rookie! hhh, half of my childhood dream of being a painter has come true, but the brush has become code~

   Recently, I solved the front-end problems for two students, but neither of them is the javascript language I learned. I was groping for the front-end ideas I usually learned , or successfully solved these problems, feel it, and record it~

  •    The first one to appear was a study committee member who was learning python by himself, and also a prospective graduate student. The problem he encountered was that a complex interface was defined in project a, and a simple page was defined in project b. When he found me, he said that project b was started, but the page defined by project a was opened. The error is as follows:

d60d9f2414f5a2867091a5a14db6e54.png
    After reading his page, this route is not the same as what I learned!

8bb4fc7bab1580d1baa6692d0f2b801.png
  Open his browser page, look at the network request of the page, 404, my first reaction may be his routing problem, so that this page cannot be found, and the interface of the previous project is displayed. . .

dc111956dfdb5bc954fd74c3bfdea11.png
  But I changed my mind, 404 should not display the interface of another project, unless the server of the previous project is requested. Notice again in the warning, use a server instead, isn’t this just changing the server, it must be that the previous port is occupied, so it is equivalent to requesting the previous server. So, when I move out, I only have a small black window of a cd:

1684658842987.png
   After solving the occupation, restart the project and fully display the pages in the new project~ This problem belongs to Jiwang, but the idea of ​​front-end and back-end is still in it. Sure enough, it's still basic~

  • The second one was a female student who was working on an Android app (graduation project). She was lying on the bed and received her series of questions. The navigation bar is hidden? I sat up in shock:

1684659076469.png
   After listening to her description carefully, after having the navigation bar, the position of some buttons on the page deviates, as shown in the figure below:

4637c8740c325359481bc6fb139af42.png
  The original khaki circle should coincide with the blue circle below. After clearing the level, the color below will be displayed. Because the buttons on the lower layer are nested in the background image, the fixed position is not known, and absolute positioning cannot be used to control the positions of the two buttons to coincide completely (she made the page by visual dragging method). There must be a way to make the navigation bar transparent, but I think it is useless if it is only transparent but still occupies the document flow!

1684659743090.png   The way to find netizens. After trying it, the simulator display is indeed ok, the navigation bar is hidden, and the position deviation is eliminated. When the mouse touches the position of the navigation bar, the navigation bar appears, which is very user-friendly! But when she viewed it through the apk installation package on her mobile phone, there was still a certain deviation. I think it was because of the screen size? After reading his code, the relative unit dp is used, and it should be self-adaptive. I don’t understand this. After all, the problem of adapting to all models caused me a headache during the internship!


PS: I should thank my teachers and teammates here, who firmly let me do a project that separates the front and back ends, build the database by myself, write the interface by myself, and have a more detailed understanding of the sending and receiving of front and back end requests!

Guess you like

Origin juejin.im/post/7235458133505491005