|
@@ -13,18 +13,19 @@ export default {
|
|
getToken() {
|
|
getToken() {
|
|
let that = this;
|
|
let that = this;
|
|
let loginInfo = new FormData();
|
|
let loginInfo = new FormData();
|
|
- loginInfo.append("userName", "user_dianxin");
|
|
|
|
- loginInfo.append("password", "Dx123456");
|
|
|
|
- loginInfo.append("clientId", 1);
|
|
|
|
- loginInfo.append("serviceId", 0);
|
|
|
|
- fetch("http://10.235.245.174:8888/oauth/api/user/login", {
|
|
|
|
|
|
+ for (const key in userLoginConfig) {
|
|
|
|
+ if (Object.prototype.hasOwnProperty.call(userLoginConfig, key)) {
|
|
|
|
+ loginInfo.append(key, userLoginConfig[key]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ fetch(oauthUrl + "/oauth/api/user/login", {
|
|
method: "POST",
|
|
method: "POST",
|
|
body: loginInfo
|
|
body: loginInfo
|
|
})
|
|
})
|
|
.then(resp => resp.json())
|
|
.then(resp => resp.json())
|
|
.then(data => {
|
|
.then(data => {
|
|
SkySceneryConfig = {
|
|
SkySceneryConfig = {
|
|
- authUrl: "http://10.235.245.174:8888/",
|
|
|
|
|
|
+ authUrl: oauthUrl,
|
|
token: data.message
|
|
token: data.message
|
|
};
|
|
};
|
|
that.addScripts(scriptObj.main).then(function() {
|
|
that.addScripts(scriptObj.main).then(function() {
|
|
@@ -217,7 +218,6 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
#skysceneryContainer {
|
|
#skysceneryContainer {
|
|
width: 100%;
|
|
width: 100%;
|