AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
~~~ class HTTP { request(param) { //param是一个对象,包含url,data,method,success if (!param.method) { param.method = "GET"; } wx.request({ url: param.url, data: param.data, method: param.method, header: { 'Content-Type': 'application/json', "appkey": config.appkey }, success: function (res) { let code = res.statusCode.toString(); if (code.startsWith("2")) { param.success(res.data); } else { wx.showToast({ title: '网络错误', icon: 'none' }) } }, fail: function () { wx.showToast({ title: '网络错误', icon: 'none' }) } }) } } ~~~