|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
<view class="top-img-box">
|
|
|
- <img class="top-img" src="@/static/logo.png" alt="" />
|
|
|
- <view class="top-name"> My Team </view>
|
|
|
+ <image class="top-img" :src="avatar" />
|
|
|
+ <view class="top-name"> {{ nickname }} </view>
|
|
|
</view>
|
|
|
|
|
|
<view class="group-item-box">
|
|
@@ -11,11 +11,14 @@
|
|
|
<view class="top-r">></view>
|
|
|
</view>
|
|
|
<view class="item-content">
|
|
|
- <img class="item-img" :key="item" src="@/static/logo.png" alt="" v-for="item of 3" />
|
|
|
+ <view class="person-item" v-for="item of teamPersonList">
|
|
|
+ <image class="item-img" :src="item.inviteUserAvatar" mode="aspectFill" />
|
|
|
+ <view class="item-name">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="group-item-box">
|
|
|
+ <!-- <view class="group-item-box">
|
|
|
<view class="item-top">
|
|
|
<view class="top-l">最近动态</view>
|
|
|
<view class="top-r">></view>
|
|
@@ -33,78 +36,75 @@
|
|
|
<view class="item-content">
|
|
|
<img class="item-img" src="@/static/logo.png" alt="" :key="item" v-for="item of 3" />
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <button @click='handlerBind'>绑定</button>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <button @click='handlerBind'>绑定</button>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { getMyTeam , inviteBind } from "@/api/client/mine.js"
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- queryParams:{
|
|
|
- paging:'1,10'
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- mounted(){
|
|
|
- this.handlerInitList()
|
|
|
- },
|
|
|
- methods:{
|
|
|
- // 初始化我的团队列表
|
|
|
- handlerInitList(){
|
|
|
- getMyTeam(this.queryParams).then(res=>{
|
|
|
- console.log("Res",res)
|
|
|
- })
|
|
|
+ import {
|
|
|
+ getMyTeam,
|
|
|
+ inviteBind
|
|
|
+ } from "@/api/client/mine.js"
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from "vuex"
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ queryParams: {
|
|
|
+ paging: '1,10'
|
|
|
+ },
|
|
|
+ teamPersonList: []
|
|
|
+ };
|
|
|
},
|
|
|
- // 测试绑定
|
|
|
- handlerBind(){
|
|
|
- let params = {
|
|
|
- userId:'1692178132393070594',
|
|
|
- targetId:'1774462327015325697',
|
|
|
- type:1
|
|
|
- }
|
|
|
- inviteBind(params).then(res=>{
|
|
|
- console.log("@@@@res",res)
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
+ mounted() {
|
|
|
+ this.handlerInitList()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['userId', 'gender', 'avatar', 'nickname'])
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 初始化我的团队列表
|
|
|
+ handlerInitList() {
|
|
|
+ getMyTeam(this.queryParams).then(res => {
|
|
|
+ let {
|
|
|
+ records
|
|
|
+ } = res.data
|
|
|
+ this.teamPersonList = records
|
|
|
+ console.log("Res", res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 测试绑定
|
|
|
+ handlerBind() {
|
|
|
+ let params = {
|
|
|
+ userId: this.userId,
|
|
|
+ targetId: '1774462327015325697',
|
|
|
+ type: 1
|
|
|
+ }
|
|
|
+ inviteBind(params).then(res => {
|
|
|
+ console.log("@@@@res", res)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.container {
|
|
|
- padding: 20rpx 10rpx 50rpx;
|
|
|
-
|
|
|
- .top-img-box {
|
|
|
- text-align: center;
|
|
|
-
|
|
|
- .top-img {
|
|
|
- width: 160rpx;
|
|
|
- height: 160rpx;
|
|
|
- border-radius: 100rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .top-name {
|
|
|
- color: #6b7280;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 32rpx;
|
|
|
- margin-top: 20rpx;
|
|
|
- }
|
|
|
- }
|
|
|
+ .container {
|
|
|
+ padding: 20rpx 10rpx 50rpx;
|
|
|
|
|
|
- .group-item-box {
|
|
|
- padding: 0 20rpx;
|
|
|
- margin-top: 60rpx;
|
|
|
+ .top-img-box {
|
|
|
+ text-align: center;
|
|
|
|
|
|
- .item-top {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
+ .top-img {
|
|
|
+ width: 160rpx;
|
|
|
+ height: 160rpx;
|
|
|
+ border-radius: 100rpx;
|
|
|
+ }
|
|
|
|
|
|
- .top-l,
|
|
|
- .top-r {
|
|
|
+ .top-name {
|
|
|
color: #6b7280;
|
|
|
font-weight: bold;
|
|
|
font-size: 32rpx;
|
|
@@ -112,22 +112,56 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .item-content {
|
|
|
- display: flex;
|
|
|
+ .group-item-box {
|
|
|
+ padding: 0 20rpx;
|
|
|
+ margin-top: 60rpx;
|
|
|
|
|
|
- .item-img {
|
|
|
- width: 160rpx;
|
|
|
- height: 160rpx;
|
|
|
- border-radius: 100rpx;
|
|
|
- margin: 60rpx 20rpx 0 0;
|
|
|
+ .item-top {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .top-l,
|
|
|
+ .top-r {
|
|
|
+ color: #6b7280;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 32rpx;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- .dynamic-img {
|
|
|
+ .item-content {
|
|
|
+ display: flex;
|
|
|
width: 100%;
|
|
|
- height: 500rpx;
|
|
|
- margin-top: 60rpx;
|
|
|
+
|
|
|
+ .person-item {
|
|
|
+ margin-right: 20rpx;
|
|
|
+ text-align: center;
|
|
|
+ width: 25%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item-name {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+
|
|
|
+ .person-item:last-child {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item-img {
|
|
|
+ width: 160rpx;
|
|
|
+ height: 160rpx;
|
|
|
+ border-radius: 100rpx;
|
|
|
+ margin: 60rpx 20rpx 0 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .dynamic-img {
|
|
|
+ width: 100%;
|
|
|
+ height: 500rpx;
|
|
|
+ margin-top: 60rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
</style>
|