info.js 504 B

1234567891011121314151617181920212223242526
  1. import Vue from 'vue';
  2. import lib from 'lib';
  3. export default{
  4. data () {
  5. return {
  6. user_id : lib.getLocalData("user_id"),
  7. game_zone : lib.getLocalData("game_zone")
  8. }
  9. },
  10. mounted () {
  11. this.getData();
  12. },
  13. beforeDestroy () {
  14. },
  15. methods: {
  16. getData () {
  17. let self = this;
  18. let api = `${lib.apiUrl}/player/${self.game_zone}/${self.user_id}/`;
  19. let data = {};
  20. lib.get(api, (ret) => {
  21. console.log(ret);
  22. })
  23. }
  24. }
  25. }