Method common frame built in uni-app .....

  • Obtain login information, getStorage

  

  • Initial page request data 

  

  • Pull-down refresh the page

  

  • load more 

  

  • Click to jump personal center 

  

  • uni.request (the OBJECT)    Success = Success failure complete = fail = success & failure

    Initiating a network request.

    In each applet runtime platform, network-related API before use to configure domain whitelist.

    OBJECT Parameter Description

    parameter name Types of Mandatory Defaults Explanation Platform Differences Description
    url String Yes   Developers server interface address  
    data Object/String/ArrayBuffer no   Parameters request 5 + App (custom pattern compiler component) type not supported ArrayBuffer
    header Object no   Setting request header, header can not be provided Referer.  
    method String no GET Valid values ​​See explanation below  
    dataType String no json If set to json, will try to return the data to do a JSON.parse  
    responseType String no text Setting the data type of response. Legal values: text, arraybuffer 5 + App and small does not support Alipay
    success Function no   Developers receive a callback service successfully returned  
    fail Function no   Interface calls the failure callback function  
    complete Function no   Interface calls the end of the callback function (call succeeds, the failure will be executed)  
  •  uni.showLoading ({ 'title': "Loading ..."}); loading the display prompt text 
  •  uni.hideLoading ();     
  •  uni.stopPullDownRefresh Stop Stop the drop-down refresh the current page.
  •  

    uni.showModal delete, prompt box 

 

Guess you like

Origin www.cnblogs.com/reeber/p/11299294.html