index.vue 853 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view >
  3. </view>
  4. </template>
  5. <script>
  6. // pages/tabbar/index/index.js
  7. import {
  8. mapMutations,
  9. } from 'vuex';
  10. var app = getApp();
  11. export default {
  12. data() {
  13. return {
  14. puid: ""
  15. };
  16. },
  17. onLoad: function(options) {
  18. uni.showLoading({
  19. title:'正在加载'
  20. })
  21. this.puid = options.puid||'';
  22. this.bind()
  23. },
  24. onShareAppMessage: function() {},
  25. methods: {
  26. ...mapMutations(['login']),
  27. async bind() {
  28. var userInfo = await this.$wechatMiniLogin(true);
  29. this.login(userInfo)
  30. let res = await this.$api.request('/team/add', 'GET', {
  31. puid: this.puid,
  32. });
  33. /*
  34. wx.switchTab({
  35. url:"/pages/index/index"
  36. })*/
  37. }
  38. }
  39. };
  40. </script>
  41. <style>
  42. page {
  43. background: #F5F5F5;
  44. padding: 20rpx;
  45. box-sizing: border-box;
  46. }
  47. </style>