Browse Source

切换楼盘,客户列表不刷新问题

dmb
corala 1 year ago
parent
commit
c674c9b9e5
2 changed files with 40 additions and 36 deletions
  1. +6
    -3
      pages/index/consumer/index.vue
  2. +34
    -33
      pages/mine/selectBuilding.vue

+ 6
- 3
pages/index/consumer/index.vue View File

@@ -394,7 +394,6 @@
onLoad(options) {
this.LOADING = true
this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
this.buildingID = uni.getStorageSync('buildingID').id;
let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
this.permissions.commonly1 = newmenulist.khgl_ck;
this.permissions.commonly2 = newmenulist.khgl_gj;
@@ -419,14 +418,18 @@
},

onShow() {
if (this.isnorefresh != 'refresh') {
this.buildingID = uni.getStorageSync('buildingID').id;
this.updatebuildingID = uni.getStorageSync('updatebuildingID')
if (this.isnorefresh != 'refresh'||this.updatebuildingID=='updatebuildingID') {
this.nextPage = 1;
this.recordList = []
this.getMyCustom()
this.getFreeList()
this.getfindKeywordsList()
this.getFromSource();
this.isRefresh = false;
this.getMyCustom()
this.isnorefresh = 'refresh';
uni.setStorageSync('updatebuildingID', '');
}
this.updateInit()
},


+ 34
- 33
pages/mine/selectBuilding.vue View File

@@ -1,26 +1,26 @@
<template>
<view class="selectBuilding">
<view class="searchStyle">
<u-search placeholder="输入项目名称" v-model="search" @search="s" @custom="s"></u-search>
</view>
<template>
<view class="selectBuilding">
<view class="searchStyle">
<u-search placeholder="输入项目名称" v-model="search" @search="s" @custom="s"></u-search>
</view>
<view class="searchResultStyle">
<view class="searchList" v-for="(item,index) in list" :key="index" @click="okSelect(item.id,item.propertyName)">
{{item.propertyName}}
</view>
</view>
</view>
</template>
</view>
</view>
</view>
</template>
<script>
var config = require("@/config");
export default {
name: "selectBuilding",
data() {
return {
search: "",
list: [],
};
var config = require("@/config");
export default {
name: "selectBuilding",
data() {
return {
search: "",
list: [],
};
},
methods:{
s(e){
@@ -32,6 +32,7 @@
name
}
uni.setStorageSync("buildingID", lopan);
uni.setStorageSync("updatebuildingID", 'updatebuildingID');
uni.navigateBack({
delta:-1
})
@@ -54,23 +55,23 @@
},
onLoad() {
this.init("")
}
}
</script>
<style lang="scss" scoped>
.selectBuilding {
.searchStyle {
padding: 20rpx;
}
}
}
</script>
<style lang="scss" scoped>
.selectBuilding {
.searchStyle {
padding: 20rpx;
}
.searchResultStyle {
padding: 0 30rpx;
padding: 0 30rpx;
.searchList{
border-bottom: 1rpx solid #E0E0E0;
padding: 30rpx 0;
font-size: 30rpx;
}
}
}
}
}
}
</style>

Loading…
Cancel
Save