account.js 767 B

12345678910111213141516171819202122232425262728
  1. var app = new Vue({
  2. 'el': '#app',
  3. 'data': {
  4. // 当前导航
  5. type: 1,
  6. info: {},
  7. },
  8. created: function(){
  9. this.type = getParam('type');
  10. this.type = this.type? this.type : 1;
  11. this.getInfo();
  12. },
  13. methods: {
  14. // 获取账户信息
  15. getInfo: function(){
  16. var _this = this;
  17. $.showLoading("数据加载中...");
  18. $.post('/weixin/member/getMemberInfo', {type: _this.type}, function (res) {
  19. $.hideLoading();
  20. if (res.code == 'success') {
  21. _this.info = res.data
  22. }else if(res.code == 'login'){
  23. login(res.data.url);
  24. }
  25. }, "json");
  26. }
  27. }
  28. })