mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
优化代码
This commit is contained in:
parent
84eabb958a
commit
853f8a37fb
@ -1,5 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
requestNoAuth
|
requestNoAuth,request
|
||||||
} from '../java110Request.js'
|
} from '../java110Request.js'
|
||||||
import
|
import
|
||||||
url
|
url
|
||||||
@ -119,7 +119,7 @@ export function getOwnerCommunitys(dataObj) {
|
|||||||
//动态数据
|
//动态数据
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
let _communtiys = res.data.data;
|
let _communitys = res.data.data;
|
||||||
resolve(_communitys);
|
resolve(_communitys);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -128,4 +128,5 @@ export function getOwnerCommunitys(dataObj) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -7,10 +7,10 @@
|
|||||||
<view class="cu-item" v-for="(item,sub) in communitys" :key="sub" @tap="_doChangeCommunity(item)">
|
<view class="cu-item" v-for="(item,sub) in communitys" :key="sub" @tap="_doChangeCommunity(item)">
|
||||||
<view class="content padding-tb-sm">
|
<view class="content padding-tb-sm">
|
||||||
<view>
|
<view>
|
||||||
<text class="lg cuIcon-homefill text-blue margin-right-xs"></text> {{item.name}}
|
<text class="lg cuIcon-homefill text-blue margin-right-xs"></text> {{item.communityName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="text-gray text-sm">
|
<view class="text-gray text-sm">
|
||||||
<text class="lg text-gray cuIcon-location margin-right-xs"></text> {{item.address}}
|
<text class="lg text-gray cuIcon-location margin-right-xs"></text> {{item.name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -23,6 +23,8 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {getOwnerCommunitys} from '../../api/community/communityApi.js'
|
import {getOwnerCommunitys} from '../../api/community/communityApi.js'
|
||||||
|
import {getCurOwner} from '../../api/owner/ownerApi.js'
|
||||||
|
import mapping from '../../constant/MappingConstant.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -37,10 +39,10 @@
|
|||||||
methods: {
|
methods: {
|
||||||
_loadCommunitys: function() {
|
_loadCommunitys: function() {
|
||||||
let _that = this;
|
let _that = this;
|
||||||
let _condition = {
|
let _ownerInfo = wx.getStorageSync(mapping.OWNER_INFO);
|
||||||
name: this.communityName
|
getOwnerCommunitys({
|
||||||
}
|
link:_ownerInfo.link
|
||||||
getOwnerCommunitys()
|
})
|
||||||
.then(_communitys => {
|
.then(_communitys => {
|
||||||
_that.communitys = _communitys;
|
_that.communitys = _communitys;
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user