提交 c9cbc0ef 编写于 作者: 2 222000134

修改小队bug

上级 cab5e10d
......@@ -3,7 +3,7 @@
<view class="nav-bar-back">
<image class="nav-bar-back-icon" src="/static/discover/back.png" @click="goBack"></image>
<view class="nav-bar-title">发起活动</view>
<image class="nav-bar-add" src="../../static/post/send.png" @click="submit"></image>
<image class="nav-bar-add" src="../../static/post/发送.png" @click="submit"></image>
</view>
<view class="school-activity-icon-wrapper">
<image class="school-activity-icon" src="/static/discover/activity-icon.png"></image>
......@@ -52,7 +52,7 @@
export default {
data() {
return {
userId: '644a643a0c801ca878983559',
userId: '',
name: '',
content: '',
object: '',
......@@ -70,7 +70,7 @@
animationDuration: 300
})
},
onload(){
onLoad(){
this.userId=getApp().globalData.userId
},
async submit() {
......@@ -81,6 +81,7 @@
});
return;
}
console.log(this.userId,'this.userId')
uniCloud.callFunction({
name: 'fe-team-createActivity',
data: {
......
......@@ -76,33 +76,26 @@
export default {
data() {
return {
icon: '/static/icon/1.png',
icon: '',
current: 0,
show: false,
svalue: '',
join: null,
tID: '',
userId: '644a643a0c801ca878983559',
userId: '',
teamList: [{
teamId: '11',
teamName: '名字',
createrId: '4324',
discription: '加入我们吧~',
teamId: '',
teamName: '',
createrId: '',
discription: '',
}],
list: [{
name: '我的小队'
}, {
name: '加入小队',
}, ],
name: '昵称',
activityList: [{
activityId: 1,
title: '跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步跑步步跑步跑步跑步跑步步跑步跑步跑步跑步步跑步跑步跑步跑步步跑步跑步跑步跑步!'
},
{
activityId: 2,
title: '一起来!'
}
name: '',
activityList: [
]
};
},
......@@ -110,32 +103,38 @@
tabChange(index) {
this.current = index.index;
if (index.index == 1) {
uniCloud.callFunction({
name: 'fe-team-teamList',
data: {}
})
.then(res => {
console.log(res)
this.teamList = res.result.data.teamList
})
this.showJoinTeam();
}
if (index.index == 0) {
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,
this.icon = res.result.data.icon
console.log(this.join)
})
this.showMyTeam();
}
},
showJoinTeam(){
uniCloud.callFunction({
name: 'fe-team-teamList',
data: {}
})
.then(res => {
console.log(res)
this.teamList = res.result.data.teamList
})
},
showMyTeam(){
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,
this.icon = res.result.data.icon
console.log(this.join)
})
},
showTeamDetail(discription) {
console.log("showTeamDetail")
uni.showModal({
......@@ -249,28 +248,24 @@
}
},
onPullDownRefresh() {
this.showMyTeam()
this.showJoinTeam()
uni.stopPullDownRefresh();
},
onLoad(option) {
this.userId=getApp().globalData.userId
if(option.index==1){
this.tabChange(option)
this.showJoinTeam()
}
else{
uniCloud.callFunction({
name: 'fe-team-activityList',
data: {
userId: this.userId
}
})
.then(res => {
console.log(res),
this.name = res.result.data.teamname,
this.activityList = res.result.data.activityList,
this.join = res.result.join,
this.icon = res.result.data.teamicon
console.log(this.join)
})
this.showMyTeam()
}
},
onShow() {
this.showMyTeam()
this.showJoinTeam()
}
}
</script>
......@@ -282,11 +277,11 @@
height: 100%; */
}
.tabbg{
background-color: #edeef0;
/* background-color: #edeef0; */
}
.content {
background-color: #edeef0;
/* background-color: #edeef0; */
position: absolute;
width: 100%;
height: 100%;
......@@ -313,7 +308,7 @@
outline: none;
font-size: 14px;
color: #333;
background-color: #fff;
background-color: #edeef0;
padding: 0 10px;
}
......@@ -363,7 +358,7 @@
}
.one-activity {
width: 90%;
width: 85%;
background-color: rgb(245 154 35 / 30%);
margin-left: auto;
margin-right: auto;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册