lll
liukangdong
2024-08-07 138db89b3193d60850e203e1847e2f91d2b00ebc
wechat_jiaxuan/pages/mine/mine.js
@@ -1,4 +1,7 @@
import { getMemberInfo, getDictData } from '../../api/index'
import {
  getMemberInfo,
  getDictData
} from '../../api/index'
Page({
  /**
   * 页面的初始数据
@@ -8,7 +11,7 @@
    clientTop: 0,
    member: {},
    housetype: '',
    houseType: {},
    IMG_LIUCHENG: '',
    MINE_BG: ''
  },
@@ -18,15 +21,23 @@
   */
  onLoad(options) {
    const res = wx.getMenuButtonBoundingClientRect()
    this.setData({clientHeight: res.height})
    this.setData({clientTop: res.top})
    this.setData({
      clientHeight: res.height
    })
    this.setData({
      clientTop: res.top
    })
  },
  onShow(){
    this.initData()
  },
  initData() {
    getMemberInfo().then(res => {
      this.setData({member: res.data})
      console.log('res', res);
      if (res.code == 200) {
        this.setData({
          member: res.data
        })
      if(res.data.housetype){
        const temp = res.data.housetype.split('-')
        let houseType = {
@@ -36,20 +47,32 @@
          val4: temp[3],
          val5: temp[4],
        }
        this.setData({houseType})
          this.setData({
            houseType
          })
        }else{
          this.setData({ houseType: {} })
      }
      }else{
        this.setData({ member: {}, houseType: {} })
      }
    })
    getDictData({
      code: 'WEIXIN_DEFAULT_IMGS',
      label: 'IMG_LIUCHENG'
    }).then(res => {
      this.setData({ IMG_LIUCHENG: res.data.code })
      this.setData({
        IMG_LIUCHENG: res.data.code
      })
    })
    getDictData({
      code: 'WEIXIN_DEFAULT_IMGS',
      label: 'MINE_BG'
    }).then(res => {
      this.setData({ MINE_BG: res.data.code })
      this.setData({
        MINE_BG: res.data.code
      })
    })
  },
  changePath(e) {