Commit 048c6b91 by 展昭

hosting complete

parent 500b0360
...@@ -7,7 +7,6 @@ export default { ...@@ -7,7 +7,6 @@ export default {
// get数据 // get数据
getPeriod() { getPeriod() {
console.log('usermenberId=', usermemberId);
let url = urls.getPeriod(usermemberId); let url = urls.getPeriod(usermemberId);
return AjaxRequest.get(url); return AjaxRequest.get(url);
}, },
......
...@@ -269,6 +269,7 @@ export default { ...@@ -269,6 +269,7 @@ export default {
this.loadBillHostingData(this.currentPerId); this.loadBillHostingData(this.currentPerId);
}, },
async loadPeriodData() { async loadPeriodData() {
let flag = false;
await this.loadBillPeriod(this.usermemberId).then( await this.loadBillPeriod(this.usermemberId).then(
data => { data => {
this.period = data; this.period = data;
...@@ -281,15 +282,20 @@ export default { ...@@ -281,15 +282,20 @@ export default {
break; break;
} }
} }
flag = true;
}, },
err => { err => {
console.log(err); console.log(err);
} }
); );
if (flag) {
await this.loadBillSummaryData(this.currentPerId);
await this.loadBillHostingData(this.currentPerId);
}
}, },
async loadBillSummaryData(accountId) { async loadBillSummaryData(accountId) {
let param = { let param = {
accountId, accountId
}; };
await this.loadBillSummary(param).then( await this.loadBillSummary(param).then(
data => { data => {
...@@ -303,7 +309,7 @@ export default { ...@@ -303,7 +309,7 @@ export default {
}, },
async loadBillHostingData(accountId) { async loadBillHostingData(accountId) {
let param = { let param = {
accountId, accountId
}; };
await this.loadBillHosting(param).then( await this.loadBillHosting(param).then(
data => { data => {
...@@ -317,8 +323,6 @@ export default { ...@@ -317,8 +323,6 @@ export default {
}, },
async mounted() { async mounted() {
await this.loadPeriodData(); await this.loadPeriodData();
await this.loadBillSummaryData(this.currentPerId);
await this.loadBillHostingData(this.currentPerId);
} }
}; };
</script> </script>
......
...@@ -172,7 +172,6 @@ export default { ...@@ -172,7 +172,6 @@ export default {
this.period = this.getPeriod; this.period = this.getPeriod;
if (this.getHosting) { if (this.getHosting) {
this.hosting = this.getHosting; this.hosting = this.getHosting;
// console.log("this.hosting=", this.hosting);
} }
} }
}, },
...@@ -201,7 +200,7 @@ export default { ...@@ -201,7 +200,7 @@ export default {
}; };
await this.loadBillHosting(param).then( await this.loadBillHosting(param).then(
data => { data => {
this.data.hosting = data; this.hosting = data;
}, },
err => { err => {
console.log(err); console.log(err);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment