12345678910111213141516171819202122232425262728293031323334 |
- import HouseApi from '../../../apis/house'
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- house_id: String
- },
- data: {
- intros: []
- },
- ready () {
- this.getHouseDetail(this.properties.house_id)
- },
- methods: {
- getHouseDetail(house_id){
- wx.showLoading({
- title: '加载数据中'
- })
- HouseApi.houseDetail(house_id).then(res => {
- let house = res.data
- if (house.remarks) {
- this.setData({
- intros: JSON.parse(house.remarks)
- })
- }
- wx.hideLoading()
- }).catch(err => {
- wx.hideLoading()
- })
- },
- }
- })
|