出现403错误
# 具体遇到的问题
课程学的差不多了,再次回过头来复习的时候发现访问服务器时出现了403错误
# 报错信息的截图
可以看到我是添加了appKey的:

# 相关课程内容截图
# 尝试过的解决思路和结果
# 粘贴全部相关代码,切记添加代码注释(请勿截图)
在这里输入代码,可通过选择【代码语言】突出显示
async getThemes() {
const names = `${Theme.locationA}`;
this.themes = await Http.request({
url: `theme/by/names`,
data: {
names: names
}
});
}
class Http {
static async request({url, data, method = "GET"}) {
const res = await promisic(wx.request)({
url: `${config.apiBaseUrl}${url}`,
data,
method,
header: {
appKey: config.appKey
}
});
return res.data;
}
}
116
收起


恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星