【发布时间】:2020-07-24 20:35:21
【问题描述】:
我已经有来自父页面的“breedKey”和返回的“thedate”的值,我怎样才能将这两个值放入 axios.get URL,我想以这种方式在 URL 中替换它们
"https://www.mustavi.com/TimeSeries/?param1={{breedkey}}¶m2={{thedate}}"
props: ["breedKey", "time"],
data() {
return {
thedate: this.time
};
},
async created() {
try {
this.promise = axios.get(
"https://www.mustavi.com/TimeSeries/?param1=nctzenselcaday¶m2=2020-04-09"
);
const res = await this.promise;
【问题讨论】:
-
你想这样做,对吧?网址+"/?param1="+myparam1+"¶m2="+myparam2?还是我没有正确理解你?
标签: javascript vue.js url url-rewriting vue-component