// 活动请求接口 var actApi = { data: { act_id: 0, uid: 12138, baseUrl: '', // 公用地址 // ↓其他接口的地址 xxx: '' }, portsTemplate: function() { return new MyPromise(function(resolve, reject) { comm.ajax({ type: 'GET', url: actApi.data.baseUrl + actApi.xxx, data: { }, success: function(res) { resolve(res) } }) }) } }