Home > front end >  Torture me two days of questions, WeChat once small program execution wx. Request the whole project
Torture me two days of questions, WeChat once small program execution wx. Request the whole project

Time:09-18

 data: {
Img_src: "'
},

 wx. Request ({
Url: 'http://localhost:8182/userinfo/getqrimg',
Complete: (res)=& gt; {
Enclosing setData ({
Img_src: res. Data. The message,
});
},
Data: {
The username: '123456'
},
DataType: 'json,
Header: {
'the content-type' : 'application/json. Charset=utf-8 ',
'Token' : 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9. EyJleHAiOjE1OTAxNjA3OTEsInVzZXJuYW1lIjoiMjAxODEzMTEyMyJ9. AOT5 IVD - ow_S_3G5gcJ__9dpx6HJbgPXqToTJAdGIM'
},
Method: "POST",
})

Is a very simple request interface (the return value is a image path, and the image in the local existence), service USES Java to do the test no problem,
Create a small program to set up the home page, index, js page data inside img_src variables - inside the onl oad add above request code - put an image tag on the front page & lt; Image SRC="https://bbs.csdn.net/topics/{{img_src}}" & gt; , compile the execution load can see this picture, but a flash page automatically to be compiled, has been repeatedly run run repeatedly,
Then I put the request in the button click event, open the project does not automatically reload, click the button to request, pictures to load a flash of the whole project and recompile,
In short said is once the request, the whole project will be reloaded, as if people point to the compile button,

CodePudding user response:

Resolved: -> business logic problems, because every time I request to request the server to generate the image would be to small program folder, but small programs as long as the folder or file contents change immediately to recompile, pit the two days, I haven't found, god,,,

CodePudding user response:

The share is good, thumb up, this problem estimates may encounter many people,
  • Related