<!-- 获取session方法，不可删除 -->
<template>
  <div class="devGetSession">
    正在获取session
  </div>
</template>
<script>
import router from "../router/index";
import awsuiAxios from "../awsuiAxios/index";
import store from "../store/index";
/*
获取控制台用户会话，注意如果使用是控制台移动端会话，修改vueDeviceType:mobile
data: {
  cmd: "CONSOLE_ADMIN_LOGIN",
  userid: devUserInfo.userid,
  pwd: devUserInfo.pwd,
  lang: "cn",
  vueDeviceType: "pc",
}
*/
/*
获取客户端用户会话，deviceType：pc/mobile/weixin
data: {
  cmd: "CLIENT_USER_LOGIN",
  userid: devUserInfo.userid,
  pwd: devUserInfo.pwd,
  lang: "cn",
  deviceType: "pc",
}
*/
/*
获取CoE用户会话
data: {
  cmd: "com.actionsoft.apps.coe.pal_user_login",
  userid: devUserInfo.userid,
  pwd: devUserInfo.pwd,
  lang: "cn",
  deviceType: "pc",
}
*/
awsuiAxios
  .post({
    url: "jd",
    data: {
      cmd: "CONSOLE_ADMIN_LOGIN",
      userid: devUserInfo.userid,
      pwd: devUserInfo.pwd,
      lang: "cn",
      vueDeviceType: "pc",
    },
  })
  .then(function (r) {
    // let r = response.data;
    if (r.result == "error") {
      //$.simpleAlert(r.msg, "error");
      alert("获取session错误：" + r.msg);
    } else {
      store.commit("edit", { sessionId: r.data.sid });
      router.replace("/" + mainPage);
    }
  });
export default {
  data() {
    return {
      dwList: [], //dw的获取列表
    };
  },
  methods: {},
  mounted() {},
};
</script>
