How does WeChat Mini Programs promise get the returned value and pass it into the variable, which is the data of res?

util.getToken (). Then (token = > {

      
        return util.wxRequest({
            url: ports.orderList,
            method: "POST",
            data: { user_id: 32793, ofstatus:10},
            header: { "X-Auth-Token": token,  "content-type": "application/x-www-form-urlencoded"}
        })

    }).then(function (res){
      console.log("------------");
      console.log(res.orderlist);
      
      }).catch(function (e) { return Promise.reject(e); });
Mar.03,2021
Menu