1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <template>
- <view></view>
- </template>
- <script>
-
- import {
- mapMutations,
- } from 'vuex';
- var app = getApp();
- export default {
- data() {
- return {
- puid: ""
- };
- },
- onLoad: function(options) {
- uni.showLoading({
- title:'正在加载'
- })
- this.puid = options.puid||'';
- this.bind()
- },
- onShareAppMessage: function() {},
- methods: {
- ...mapMutations(['login']),
-
- async bind() {
- var userInfo = await this.$wechatMiniLogin(true);
- this.login(userInfo);
- setTimeout(() => {
- let res = this.$api.request('/team/add', 'GET', {
- puid: this.puid
- });
- wx.switchTab({
- url:"/pages/index/index"
- });
- }, 2000);
- }
- }
- };
- </script>
- <style>
- page {
- background: #F5F5F5;
- padding: 20rpx;
- box-sizing: border-box;
- }
- </style>
|