var app = getApp();
var that;
import 'dingtalk-jsapi/entry/mobile';
import openLink from 'dingtalk-jsapi/api/biz/util/openLink';
Page({
  data: {
    userData:[],
    corpMessage:{}
  },
  onLoad(query) {
    that = this;
    dd.setNavigationBar({ title: "我的" });
    this.setData({userData:app.globalData.userData,corpMessage:app.globalData.corpMessage});
  },
  //跳转
  openView(e) {
    var index = e.target.dataset.index-1;
    if(index==5){
      openLink({
        url: `https://page.dingtalk.com/wow/dingtalk/act/serviceconversation?wh_biz=tm&showmenu=false&goodsCode=DT_GOODS_881607043109331&corpId=${app.globalData.corpId}&token=5784a3e6b5e025ee891517ea814180f4`
      })
      return;
    }
    var urls = [
      { url: '../addMoney/addMoney', query: '' },
      { url: '../organization/organization', query: '' },
      { url: '../integralRule/integralRule', query: '' },
      { url: '../setCheck/setCheck', query: '' },
      { url: '../upgrade/upgrade', query: '' },
    ];
    dd.navigateTo({
      url: urls[index].url+'?'+urls[index].query
    })
  },
});
