合并master

This commit is contained in:
905166056 2021-08-10 09:17:15 +08:00
commit 060d03d305
2 changed files with 24 additions and 17 deletions

View File

@ -124,6 +124,7 @@ export default {
deleteAllocationStorehouse: baseUrl + "callComponent/resourceStore.deleteAllocationStorehouse", deleteAllocationStorehouse: baseUrl + "callComponent/resourceStore.deleteAllocationStorehouse",
// 取消申请 // 取消申请
deletePurchaseApply: baseUrl + "callComponent/deletePurchaseApply/delete", deletePurchaseApply: baseUrl + "callComponent/deletePurchaseApply/delete",
//查询水电抄表记录
listMeterWaters: baseUrl+"app/meterWater.listMeterWaters", listMeterWaters: baseUrl+"app/meterWater.listMeterWaters",
listRepairSettings: baseUrl + 'app/repair.listRepairSettings', listRepairSettings: baseUrl + 'app/repair.listRepairSettings',
saveHelpOwnerRepair: baseUrl + "callComponent/addOwnerRepair/save", saveHelpOwnerRepair: baseUrl + "callComponent/addOwnerRepair/save",

View File

@ -9,32 +9,36 @@
<button class="cu-btn bg-gradual-green shadow-blur round" @tap="_searchCommunity()">搜索</button> <button class="cu-btn bg-gradual-green shadow-blur round" @tap="_searchCommunity()">搜索</button>
</view> </view>
</view> </view>
<view> <view>
<view class="padding">小区信息</view> <view class="padding">小区信息</view>
<view class="cu-list menu "> <view class="cu-list menu ">
<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}}</view> <text class="lg cuIcon-homefill text-blue margin-right-xs"></text> {{item.name}}
</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}}</view> <text class="lg text-gray cuIcon-location margin-right-xs"></text> {{item.address}}
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {getCommunity} from '../../api/community/community.js' import {
getCommunity
} from '../../api/community/community.js'
import mapping from '../../constant/mapping.js' import mapping from '../../constant/mapping.js'
export default { export default {
data() { data() {
return { return {
communityName:'', communityName: '',
communitys:[] communitys: []
} }
}, },
onLoad() { onLoad() {
@ -42,23 +46,25 @@
this._loadCommunitys(); this._loadCommunitys();
}, },
methods: { methods: {
_loadCommunitys:function(){ _loadCommunitys: function() {
let _that = this; let _that = this;
let _condition = { let _condition = {
name:this.communityName name: this.communityName
} }
getCommunity(function(_communitys){ getCommunity(true, _condition)
_that.communitys = _communitys; .then(_communitys => {
console.log('_communitys',_communitys); _that.communitys = _communitys;
},true,_condition); console.log('_communitys', _communitys);
});
}, },
_searchCommunity:function(){ _searchCommunity: function() {
this._loadCommunitys(); this._loadCommunitys();
}, },
_doChangeCommunity:function(_community){ _doChangeCommunity: function(_community) {
uni.setStorageSync(mapping.CURRENT_COMMUNITY_INFO, JSON.stringify(_community)); uni.setStorageSync(mapping.CURRENT_COMMUNITY_INFO, JSON.stringify(_community));
uni.navigateBack({ uni.navigateBack({
delta:1 delta: 1
}) })
} }
} }