What are the methods for Mini Program success to assign values to external variables?

I mainly want to store the returned information in data when post returns, and find that it is not possible for setData to be written in wx.request. Finally, I can only use wx.setStorageSync storage. I just contacted Mini Program and soon wanted to ask the boss if there is any other way to save the return value.

var that=this;
Page({
  data: {
    mediaurl:"1"
  },
onLaunch: function() {
    var that = this;
    wx.request({
      url: "http://www.test.php/login",
      data: {
        UserCode: "wechart",
      },
      method: "post",
      success: function (res) {
        that.setData({
          mediaurl: ""
        })
      }
    })
    }
})

Hello, is "setData not allowed" an error or something wrong? I didn't find anything wrong with setData when I developed it. Generally, you can also use the wepy framework, which encapsulates this method and can directly:

this.title = "this is title";
this.$apply();
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b589-40acb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b589-40acb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?