index.vue 903 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="login">
  3. <en-loading></en-loading>
  4. </view>
  5. </template>
  6. <script>
  7. import EnLoading from "../../components/en-utils/en-loading/en-loading";
  8. import bitkeepTron from "../../common/wallet/bitkeep-wallet/bitkeep-tron";
  9. import tools from "../../common/js/tools";
  10. export default {
  11. components: {
  12. EnLoading
  13. },
  14. data() {
  15. return {
  16. }
  17. },
  18. onLoad(query) {
  19. this.getAccount()
  20. },
  21. mounted() {
  22. },
  23. methods: {
  24. getAccount(){
  25. bitkeepTron.getAccounts().then((Address)=>{
  26. if(Address){
  27. console.log('Address:'+Address)
  28. }else {
  29. tools.toError('信息获取失败!')
  30. }
  31. }).catch((e)=>{
  32. tools.toError('信息获取失败!')
  33. })
  34. }
  35. },
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. @import url("/static/css/icon-common.css") ;
  40. </style>