index.js 1.44 KB
Newer Older
张卓 committed
1 2 3 4 5 6 7 8 9 10 11 12
let app = getApp()
const { spokesmanApi, DFSImg, $themeToLink } = app;
const componentOptions = {
  // 组件选项
  options: {
    multipleSlots: true
  },
  behaviors: [],
  properties: {},
  // 组件数据
  data: {
    isPageHidden: false,
张卓 committed
13
    showPop: true,
张卓 committed
14
    nickname: '',
张卓 committed
15 16 17 18 19 20 21
  },
  // 数据监听器
  observers: {},
  // 组件生命周期
  lifetimes: {
    created() {},
    ready() {
张卓 committed
22 23
      this.setData({ nickname: app.fenxiaoModel.applySucessEntry.nicknameByDistributor || app.fenxiaoModel.applySucessEntry.nickname });
      console.log(app.fenxiaoModel.applySucessEntry,222221111111)
张卓 committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
    },
    moved() {},
    detached() {}
  },
  attached() {
    
  },
  definitionFilter() {},
  onPageScroll() {
    // console.log(e,444444444444);
  },
  // 页面生命周期
  pageLifetimes: {
    // 页面被展示
    show() {

    },
    // 页面被隐藏
    hide() {
      
    },
    // 页面尺寸变化时
    resize() {}
  },
  // 组件方法
  methods: {
张卓 committed
50
    closePopuop() {
张卓 committed
51
      this.setData({ showPop: false });
张卓 committed
52 53
      app.fenxiaoModel.apply_for_withdraw({type:'applyRemindFlag'}).then(res => {
        
张卓 committed
54
      });
张卓 committed
55
    },
张卓 committed
56 57
    toSpokesmanCenter() {
      let linkVal = '/personalCenter/spokesmanCenter'
张卓 committed
58
      this.setData({ showPop: false });
张卓 committed
59 60
      app.fenxiaoModel.apply_for_withdraw({type:'applyRemindFlag'}).then(res => {
        
张卓 committed
61
      });
张卓 committed
62 63 64 65 66 67 68 69 70 71 72
      $themeToLink({
        type: 1,
        link:linkVal,
      });
    },
  }
};

Component(componentOptions);