|
|
@@ -25,18 +25,18 @@ service.interceptors.request.use(
|
|
|
var Appid = 'wx9e9cda4611521ed4';
|
|
|
console.log(md5,sha1)
|
|
|
let Sign = md5(sha1(Appid + timestamp + appSecret + timestamp + Appid + appSecret))
|
|
|
-
|
|
|
- if (!config.header) {
|
|
|
- config.header = {
|
|
|
+ console.log(config)
|
|
|
+ if (!config.headers) {
|
|
|
+ config.headers = {
|
|
|
"App-id": Appid,
|
|
|
"Sign": Sign,
|
|
|
"Sign-time": timestamp
|
|
|
}
|
|
|
} else {
|
|
|
// 添加key请求头
|
|
|
- config.header["App-id"] = Appid;
|
|
|
- config.header['Sign-time'] = timestamp;
|
|
|
- config.header['Sign'] = Sign;
|
|
|
+ config.headers["App-id"] = Appid;
|
|
|
+ config.headers['Sign-time'] = timestamp;
|
|
|
+ config.headers['Sign'] = Sign;
|
|
|
}
|
|
|
return config
|
|
|
},
|