1. 程式人生 > >html.replace is not a function

html.replace is not a function

本文出自:

http://blog.csdn.net/wyk304443164

莫名其妙的錯,我是在Fetch請求裡面 get 請求後面?xxx=dd&xxxx=ddd 這邊又用了一個? 也就是變成了?xxx=dd&xxxx=ddd?xxxxxx=dddddd多了一個?去掉即可

let url = `${API_URL.customers.homepage.getActivityCount}${common.formatPostData({
            start,
            end,
        })}`;
        Fetch.get
(url).then(data => { this.state.count.activityCount = data; this.setState(this.state); });

少年不要急,仔細想象你幹了啥導致這樣的錯誤,一步一步排查,網上搜不大可取。