diff --git a/App.vue b/App.vue index 9608f69..45471b0 100755 --- a/App.vue +++ b/App.vue @@ -50,10 +50,10 @@ // 2. 连接聊天服务器 if (token) { store.dispatch('GetUserInfo') - store.dispatch('ConnectSocket', { - userId: store.getters.userId, - token - }) + // store.dispatch('ConnectSocket', { + // userId: store.getters.userId, + // token + // }) } // 3. 获取配置信息 RedisApi.getConfig().then(res => { diff --git a/pages/login/components/main.vue b/pages/login/components/main.vue index 82ffc43..f11b020 100755 --- a/pages/login/components/main.vue +++ b/pages/login/components/main.vue @@ -7,7 +7,7 @@ 账号登录 --> - + diff --git a/sub_pages/house/add.vue b/sub_pages/house/add.vue index 65c3c59..2f6e7c7 100644 --- a/sub_pages/house/add.vue +++ b/sub_pages/house/add.vue @@ -146,13 +146,9 @@ 办公室配套 - - - - - + + @@ -353,6 +349,7 @@ DictApi.listDictionary().then(res => { this.dict = res.data; }) + }, getHouse(id){ const app = this @@ -362,6 +359,8 @@ app.form = res.data app.houseLabel = JSON.parse(app.form.houseLabel) || [] app.fileList1 = JSON.parse(app.form.files) || [] + + }) }, onChangeTab(e) { @@ -478,11 +477,13 @@ const app = this if (app.disabled === true) return console.log("app.tempFile: ", app.tempFile); + const supporting = this.supportingData.filter(item=>item.checked) this.$refs.uForm.validate().then(() => { app.disabled = true app.form.houseLabel = JSON.stringify(app.houseLabel) app.form.files = JSON.stringify(app.fileList1) app.form.videoUrl = app.fileList2[0]?app.fileList2[0].url: null + app.form.supporting = JSON.stringify(supporting) const saveOrUpdate = app.selectId > 0 ? updateHouseInfo : addHouseInfo; saveOrUpdate(app.form).then(result => { app.$toast('保存成功') @@ -553,6 +554,9 @@ app.houseLabel.push(text) } }, + onSupportingLabel(item) { + item.checked = !item.checked + }, inArr(text) { const { houseLabel diff --git a/sub_pages/house/detail.vue b/sub_pages/house/detail.vue index 1b987e7..a0e343f 100644 --- a/sub_pages/house/detail.vue +++ b/sub_pages/house/detail.vue @@ -98,13 +98,8 @@ 办公室配套 - - - - - {{baseListItem.title}} - - + + {{form.supporting}} @@ -329,7 +324,7 @@ }) } getUser().then(res=>{ - this.isManager = res.data.gradeId == 15 + this.isManager = res.data.gradeId == 16 }).catch((err)=>{ console.log(err); }) @@ -355,6 +350,14 @@ app.form.houseLabel = JSON.parse(res.data.houseLabel) || [] // app.form.supporting = JSON.parse(res.data.supporting) || [] + try{ + app.form.supporting = JSON.parse(app.form.supporting) + console.log('app.form.supporting: ',app.form.supporting); + }catch(e){ + console.log(e); + //TODO handle the exception + } + uni.$u.mpShare = { title: `${app.form.houseTitle} ${app.form.monthlyRent}元/月 ${app.form.houseType} ${app.form.extent}m²`, path: `sub_pages/house/detail?houseId=${app.form.houseId}&user_id=${uni.getStorageSync('userId')}`