1. ctx.set("Access-Control-Allow-Origin","*")
    1. class Http{
    2. static baseUrl="http://47.108.197.28"
    3. static request(url){
    4. return new Promise((resolve,reject)=>{
    5. wx.request({
    6. url: this.baseUrl+url,
    7. success:res=>{
    8. resolve(res)
    9. }
    10. })
    11. })
    12. }
    13. }
    14. module.exports=Http
    1. const getMusicHttp=require('../../Utils/class_music')
    2. onLoad:async function (options) {
    3. var that=this
    4. var bannerRes=await getMusicHttp.getBannerHttp()
    5. }