Tip: This article is only a personal note, does not solve the technical problems, does not send technical feedback, the current technical content is not guaranteed, will be solved and modified one by one later

1) If statement multi-level loop, if deep nested if, and multi-level logical nesting

The main solution is to work backwards and remove useless conditional judgments

2) The second is regular, multi-purpose

$options. Methods in Vue can’t save the data in data, so it needs to return and use a promise object to receive the data

``` async uploadReportImage() { this.fileList.forEach((item) => { this.newFileList.push(item.content); }); try { const webResult = await initReview({ report_image_list: new Set(this.newFileList), }); If (webresult. code === "Success") {toast.success (" Success"); this.imageList = webResult.data.list; this.reviewResult = this.$options.methods.reviewReportImage( this.imageList ); this.isReviewCompleted = true; } else {toast.fail (" upload failed "); }} catch (err) {toast.fail (" upload failed "); } // Get the response and initialize this.init(); }, // check async reviewReportImage(image_list) {try {const webResult = await processReview({image_list: image_list, }); if (webResult.code === "Success") { this.reviewResultList = webResult.data.list; } return this.reviewResultList; } catch (err) { console.log(err); }}, ` ` `Copy the code

4) There is no better solution to this problem at present, for example, the feedback data of the background is an object, including

check_type:String
is_high:Boolean
is_time:Boolean
info_id:Number
status:String
Copy the code

If the value of is_high is true, the value of is_high will be check_type. If the value of is_high is true, the value of is_high will be check_type.

5) Pay attention to sass-Loader leseeloader version and NPM version when installing Sass-Loader and LESS

6) The user submits the report requirement, the condition is not clear after submission, h5 refresh the page, use this.$router.push(0).

7) The h5 header of index. HTML in Vue was modified when an image path was a URL obtained from JSON. The image will show loading failure, but the URL is accessible.