优化代码

This commit is contained in:
Your Name 2023-01-18 11:55:30 +08:00
parent 81db11b265
commit bffd69536b
2 changed files with 6 additions and 4 deletions

View File

@ -25,6 +25,9 @@ import {
*/ */
export function getRooms() { export function getRooms() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if(!_owner.ownerId){
reject('未包含业主信息');
}
getCurOwner() getCurOwner()
.then(function(_owner) { .then(function(_owner) {
request({ request({

View File

@ -79,12 +79,11 @@
this.irId = options.irId; this.irId = options.irId;
this._loadDetail(); this._loadDetail();
this._loadDetailResNames(); this._loadDetailResNames();
}, },
methods: { methods: {
_loadDetail: function() { _loadDetail: function() {
let _that = this; let _that = this;
getMyItemRelease({ getMyItemRelease(this,{
page: 1, page: 1,
row: 1, row: 1,
irId: this.irId, irId: this.irId,
@ -96,7 +95,7 @@
}, },
_loadDetailResNames: function() { _loadDetailResNames: function() {
let _that = this; let _that = this;
getItemReleaseRes({ getItemReleaseRes(this,{
page: 1, page: 1,
row: 100, row: 100,
irId: this.irId, irId: this.irId,
@ -107,7 +106,7 @@
}, },
_loadComment: function() { _loadComment: function() {
let _that = this; let _that = this;
queryOaWorkflowUser({ queryOaWorkflowUser(this,{
page: 1, page: 1,
row: 100, row: 100,
id: this.irId, id: this.irId,