提交 c20bb9c9 编写于 作者: 2 222000134

我的小队显示

上级 2a65c334
<template>
<view>
<view @click="goTeamAdd" class="add-team">
<u-icon name="plus" color="#F1992D" size="40"></u-icon>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
goTeamAdd() {
uni.navigateTo({
url: '/pages/team/add-team'
})
}
}
}
</script>
<style lang="scss" scoped>
.add-team {
position: fixed;
right: 20rpx;
bottom: 180rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: white;
box-shadow: 0 0 20rpx #999;
display: flex;
justify-content: center;
align-items: center;
}
</style>
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
<template> <template>
<view> <view>
<text>小队</text>
<!-- 添加小队按钮 -->
<add-team-tag></add-team-tag>
<!-- 标签栏 -->
<u-tabs :list="list" lineWidth="30" lineColor="#F1992D" :activeStyle="{
color: '#F1992D',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#606266',
transform: 'scale(1)'
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" @click="tabChange" :current="current">
</u-tabs>
<!-- 我的小队 -->
<view v-if="current == 0">
<view class="icon-with-name">
<image src="../../static/icon/1.png" class="icon" />
<text class="name">{{name}}</text>
</view>
<view class="content" v-if="join==null">
<view class="one-activity" v-for="item in activityList">
<image class="horn-icon" :src="'../../static/team/horn.png'"
style="width: 60px;height: 60px;margin-left: 10px;" />
<text class="text-content">{{item.title}}</text>
</view>
</view>
<view class="content" v-if="join==false">
<view class="no-join">
<view class="nojoin-icon-view">
<image class="nojoin-icon" :src="'../../static/team/nojoin.png'"
style="width: 230px;height: 200px;" />
</view>
<view class="text-no-view">
<text class="text-no">您还没有加入任何小队哦~-</text>
</view>
</view>
</view>
</view>
<!-- 加入小队 -->
<view v-if="current == 1">
</view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
// onLoad() {
// uni.hideTabBar(); data() {
// }, return {
current: 0,
show: false,
value1: "",
join: 'true',
userId: '644a643a0c801ca878983559',
list: [{
name: '我的小队'
}, {
name: '加入小队',
}, ],
name: '昵称',
activityList: [{
activityId: 1,
title: '跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步步跑步跑步跑步跑步步跑步跑步跑步跑步步跑步跑步跑步跑步步跑步跑步跑步跑步!'
},
{
activityId: 2,
title: '一起来!'
}
]
};
},
methods: {
tabChange(index) {
this.current = index.index;
},
},
onLoad() {
uniCloud.callFunction({
name: 'fe-team-activityList',
data: {
userId: this.userId
}
})
.then(res => {
console.log(res),
this.name = res.result.data.username,
this.activityList = res.result.data.activityList,
this.join = res.result.join,
console.log(this.join)
})
}
} }
</script> </script>
<style> <style>
.content {
margin-top: 10px;
}
.icon-with-name {
width: 80%;
height: 45px;
margin-left: 10px;
margin-top: 15px;
margin-bottom: 15px;
float: left;
overflow: auto;
}
.icon {
width: 45px;
height: 45px;
border-radius: 50%;
float: left;
}
.name {
float: left;
margin-bottom: auto;
margin-left: 10px;
margin-top: 9px;
font-size: 18px;
font-weight: bold;
width: 60%;
}
.one-activity {
width: 90%;
background-color: rgb(245 154 35 / 30%);
margin-left: auto;
margin-right: auto;
margin-top: 20px;
border-radius: 15px;
overflow: auto;
display: flex;
flex-direction: row;
padding: 10px;
}
.no-join {
width: 90%;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
border-radius: 15px;
overflow: auto;
display: flex;
flex-direction: column;
padding: 10px;
}
.text-content {
font-weight: bold;
display: flex;
margin-left: 10px;
flex-direction: row;
align-items: center;
justify-content: center;
word-wrap: break-word;
}
.text-no{
font-weight: bold;
display: flex;
margin: auto;
flex-direction: column;
color: #F1992D;
}
.horn-icon {
flex-shrink: 0;
margin: auto 0;
}
.nojoin-icon{
display: flex;
flex-direction: column;
margin: auto;
display: block;
}
.nojoin-icon-view{
margin-top: 50px;
}
.text-no-view{
margin: 30px auto;
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册