|
@@ -0,0 +1,62 @@
|
|
|
+<template>
|
|
|
+
|
|
|
+
|
|
|
+ <view >
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // pages/tabbar/index/index.js
|
|
|
+ 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)
|
|
|
+
|
|
|
+ let res = await this.$api.request('/team/add', 'GET', {
|
|
|
+ puid: this.puid,
|
|
|
+ });
|
|
|
+
|
|
|
+ wx.switchTab({
|
|
|
+ url:"/pages/index/index"
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+ page {
|
|
|
+ background: #F5F5F5;
|
|
|
+ padding: 20rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+</style>
|