在你的代码中,${this.rowData.storeCode}是一个模板字符串,用于将this.rowData.storeCode的值插入到字符串中。如果${this.rowData.storeCode}在参数里面显示为乱码,可能是因为编码或转义问题导致的。你可以尝试使用encodeURIComponent函数对storeCode进行编码,确保它被正确传递。
修改后的代码示例:
let storeCode = encodeURIComponent(this.rowData.storeCode);
let data = {
range: {
start: 1,
length: 10
}
};
this.$httpacm.post(`/gw/api/acm-service/limitManage/applyForBatchProsingQuota?objectKey=${this.rowData.objectKey}&storeCode=${storeCode}&merchantCode=${this.rowData.merchantCode}`, data)
.then(res => {
if (res.data.code === 200) {
this.dataSource = res.data.data;
this.pagination.total = res.data.rowCount;
} else {
this.$message.error(res.data.msg);
}
})
.catch(e => {
this.$message.error(e);
})
.finally(() => {
this.loading = false;
});
这样应该能够正确传递和显示storeCode的值。如果问题仍然存在,请进一步检查接口和数据编码相关的设置。
内容由零声教学AI助手提供,问题来源于学员提问




