The function handleQueryNewsId is used to handle the query for a specific news ID.

  1. The loading variable is set to true to indicate that the query is in progress.
  2. The thisNewsId variable is assigned the value of formData.newsId, which is the inputted news ID.
  3. The getNewsPage function is called with the parameters newsId: thisNewsId, page: 1, and pageSize: 10 to retrieve the news page with the specified news ID.
  4. The retrieved data is logged to the console.
  5. The newsIds variable is assigned an array of news IDs extracted from the retrieved data.
  6. If the newsIds array includes the thisNewsId, it means that the news ID exists. In this case, a message is logged to indicate that the news ID is on sale.
  7. If the newsIds array does not include the thisNewsId, it means that the news ID does not exist. In this case, a message is logged to indicate that the news ID does not exist.
  8. The newsList variable is assigned the value of data.rows, which contains the retrieved news data.
  9. The total variable is assigned the value of data.total, which represents the total number of news pages.
  10. Finally, the loading variable is set to false to indicate that the query is complete.
function handleQueryNewsId loadingvalue = true; thisNewsId = formDatanewsId; consolelog-------thisNewsId-=- thisNewsId; getNewsPage newsId thisNewsId page 1 pageSize 10 thendata any = c