index.vue 598 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. {{dev1}}
  3. </template>
  4. <script>
  5. import http from '@/utils/request'
  6. export default {
  7. onLoad(option) {
  8. if (option && option.code) {
  9. console.log('code', option.code) // name eagle
  10. var code = option.code
  11. }
  12. http.get("app-api/wxLogin/login?code="+code).then(e =>{
  13. this.dev1 = e
  14. uni.navigateTo({
  15. url: '../login/index'
  16. });
  17. })
  18. },
  19. data() {
  20. return {
  21. dev1: ""
  22. }
  23. },
  24. }
  25. // var code = getParameterByName(code)
  26. // http.get("http://zyhzty.top:8001/wxApi/login?code="+code).then(e =>{
  27. // console.log(e);
  28. // })
  29. </script>
  30. <style>
  31. </style>