Commit 66ca6b05 authored by Mac's avatar Mac

1 接口的绑定

parent cdcba47f
...@@ -29,14 +29,15 @@ ...@@ -29,14 +29,15 @@
</view> </view>
</view> </view>
<view class="gzbtn" @click.stop="setFollowTeacher(x,i)" > <view class="gzbtn" @click.stop="setFollowTeacher(x,i)" v-if="UserId != x.UserId">
<view class="iconstyle" :style="{background:mainColor,border:'none'}" v-if="x.IsFocus==0">
<u-icon name="plus" color="#FFF" size="32"></u-icon>
</view>
<view class="iconstyle" :style="{background:mainColor}" v-if="x.IsFocus==1"> <view class="iconstyle" :style="{background:mainColor}" v-if="x.IsFocus==1">
<u-icon name="success" color="#FFF" size="32"></u-icon> <u-icon name="success" color="#FFF" size="32"></u-icon>
</view> </view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-hu.png" style="width: 50rpx;height: 50rpx;" v-if="x.IsFocus==2"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-hu.png" style="width: 50rpx;height: 50rpx;" v-if="x.IsFocus==2"></image>
<view class="iconstyle" :style="{background:mainColor}" v-else>
<u-icon name="plus" color="#FFF" size="32"></u-icon>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -59,14 +60,15 @@ ...@@ -59,14 +60,15 @@
<view>{{x.Mobile}}</view> <view>{{x.Mobile}}</view>
</view> </view>
</view> </view>
<view class="gzbtn" @click.stop="setFollowTeacher(x,i)" > <view class="gzbtn" @click.stop="setFollowTeacher(x,i)" v-if="UserId != x.UserId">
<view class="iconstyle" :style="{background:mainColor,border:'none'}" v-if="x.IsFocus==0">
<u-icon name="plus" color="#FFF" size="32"></u-icon>
</view>
<view class="iconstyle" :style="{background:mainColor}" v-if="x.IsFocus==1"> <view class="iconstyle" :style="{background:mainColor}" v-if="x.IsFocus==1">
<u-icon name="success" color="#FFF" size="32"></u-icon> <u-icon name="success" color="#FFF" size="32"></u-icon>
</view> </view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-hu.png" style="width: 50rpx;height: 50rpx;" v-if="x.IsFocus==2"></image> <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-hu.png" style="width: 50rpx;height: 50rpx;" v-if="x.IsFocus==2"></image>
<view class="iconstyle" :style="{background:mainColor}" v-else>
<u-icon name="plus" color="#FFF" size="32"></u-icon>
</view>
</view> </view>
</view> </view>
<view class="box-Remark" v-if="x.Remark!=''"> <view class="box-Remark" v-if="x.Remark!=''">
...@@ -127,6 +129,7 @@ export default { ...@@ -127,6 +129,7 @@ export default {
nomore: "没有更多了", nomore: "没有更多了",
}, },
windowWidth:0, windowWidth:0,
UserId:0,
}; };
}, },
created() { created() {
...@@ -135,7 +138,7 @@ export default { ...@@ -135,7 +138,7 @@ export default {
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.pricecolor = this.$uiConfig.pricecolor; this.pricecolor = this.$uiConfig.pricecolor;
this.windowWidth = this.$utils.SystemInfo().windowWidth; this.windowWidth = this.$utils.SystemInfo().windowWidth;
this.UserId = uni.getStorageSync('mall_UserInfo')?uni.getStorageSync('mall_UserInfo').UserId : 0;
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
...@@ -159,6 +162,7 @@ export default { ...@@ -159,6 +162,7 @@ export default {
this.type= options.type; this.type= options.type;
this.msg.ActivityId= options.ActivityId; this.msg.ActivityId= options.ActivityId;
} }
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
this.u = { this.u = {
...@@ -192,21 +196,40 @@ export default { ...@@ -192,21 +196,40 @@ export default {
); );
}, },
setFollowTeacher(x,i){ setFollowTeacher(x,i){
let ID=0
if(x.IsFocus!=0){
ID = x.MyFollowId
}
this.request2({ this.request2({
url: '/api/AppletEducation/baomingList', url: '/api/AppletMiai/GetFollowMember',
data: { data: {
ID: x.ID, ID:ID,
TeacherId:x.TeacherId, UserId:x.UserId,
} }
}, },
res => { res => {
this.g.splice(i,1)
this.count--
uni.showToast({ uni.showToast({
title: res.message, title:res.message,
icon: 'none', icon:'none'
duration: 2000 })
});
this.request2(
{
url: '/api/AppletMiai/GetActivityEnrollPageList',
data: {
pageIndex: 1,
pageSize:10,
ActivityId:this.msg.ActivityId,
Id:x.Id
},
},
res => {
if(res.resultCode==1){
this.g[i] = res.data.pageData[0]
this.$forceUpdate()
}
}
);
} }
); );
...@@ -295,9 +318,10 @@ export default { ...@@ -295,9 +318,10 @@ export default {
margin-left: 8px; margin-left: 8px;
color: #111111; color: #111111;
display: flex; display: flex;
align-items: flex-end; align-items: center;
justify-content: center; justify-content: flex-end;
font-size: 13px; font-size: 13px;
} }
.iconstyle{ .iconstyle{
width: 50rpx; width: 50rpx;
......
This diff is collapsed.
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<view class="ftBox"> <view class="ftBox">
<view class="interDList" v-for="(x, i) in g" :key="i"> <view class="interDList" v-for="(x, i) in g" :key="i">
<view style="position: relative;"> <view style="position: relative;">
<u-avatar :src="x.TeacherLogo" size="80"></u-avatar> <u-avatar :src="x.Photo" size="80"></u-avatar>
<image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image> <image v-if="x.Sex==1" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nan.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
<image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image> <image v-if="x.Sex==2" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-nv.png" style="width: 32rpx;height: 32rpx;position: absolute;right: 0;bottom: 0;"></image>
</view> </view>
...@@ -29,10 +29,13 @@ ...@@ -29,10 +29,13 @@
</view> </view>
<view class="gzbtn" @click.stop="setFollowTeacher(x,i)" > <view class="gzbtn" @click.stop="setFollowTeacher(x,i)" >
<view class="iconstyle" > <view class="iconstyle" v-if="x.show==false && x.MutualFollowId==0">
<u-icon name="success" color="#999999" size="32"></u-icon> <u-icon name="success" color="#999999" size="32"></u-icon>
</view> </view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-hu.png" style="width: 50rpx;height: 50rpx;"></image> <view class="iconstyle" :style="{background:mainColor,border:'none'}" v-if="x.show==true">
<u-icon name="plus" color="#FFF" size="32"></u-icon>
</view>
<image v-if="x.MutualFollowId>0 && x.show==false" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/basic-hu.png" style="width: 50rpx;height: 50rpx;"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -140,7 +143,11 @@ export default { ...@@ -140,7 +143,11 @@ export default {
res => { res => {
if(res.resultCode==1){ if(res.resultCode==1){
this.loading = false; this.loading = false;
this.g = this.g.concat(res.data.pageData); let data = res.data.pageData
data.forEach(x=>{
x.show=false
})
this.g = this.g.concat(data);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
if (this.page_count == 1) { if (this.page_count == 1) {
this.status = "nomore"; this.status = "nomore";
...@@ -150,21 +157,24 @@ export default { ...@@ -150,21 +157,24 @@ export default {
); );
}, },
setFollowTeacher(x,i){ setFollowTeacher(x,i){
let ID = x.show==true?0: x.ID
this.request2({ this.request2({
url: '/api/AppletEducation/followlist', url: '/api/AppletMiai/GetFollowMember',
data: { data: {
ID: x.ID, ID:ID,
TeacherId:x.TeacherId, UserId:x.UserId,
} }
}, },
res => { res => {
this.g.splice(i,1)
this.count--
uni.showToast({ uni.showToast({
title: res.message, title:res.message,
icon: 'none', icon:'none'
duration: 2000 })
}); console.log(this.g[i].show)
this.g[i].show = !this.g[i].show
} }
); );
......
This diff is collapsed.
...@@ -139,6 +139,7 @@ ...@@ -139,6 +139,7 @@
left: 0; left: 0;
bottom: 0; bottom: 0;
background: #FFF; background: #FFF;
z-index: 2;
} }
.postDetails .btn2-l{ .postDetails .btn2-l{
...@@ -312,13 +313,13 @@ ...@@ -312,13 +313,13 @@
</view> </view>
<view class="details-info-c"> <view class="details-info-c">
<view style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 14px;color: #111111;font-weight: bold;">{{details.UserName}}</view> <view style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 14px;color: #111111;font-weight: bold;">{{details.UserName}}</view>
<view style='font-size: 11px;color: #858687;' v-if="details.CreateDate"> <view style='font-size: 11px;color: #858687;' v-if="details.CreateDate" >
{{details.CreateDate.split(' ')[0].split('-')[1]}}-{{details.CreateDate.split(' ')[0].split('-')[2]}} {{details.CreateDate.split(' ')[0].split('-')[1]}}-{{details.CreateDate.split(' ')[0].split('-')[2]}}
</view> </view>
</view> </view>
</view> </view>
<view v-if='details.UserId!=sendMsg.ReplyUserId' class="details-info-r" :style="{background:mainColor}"> <view v-if='details.UserId!=sendMsg.ReplyUserId' class="details-info-r" :style="{background:mainColor}" @click="getfollow(details)">
{{details.IsFocus==true?'已关注':'关注'}} {{details.IsFocus==0?'关注':details.IsFocus==1?'已关注':'互相关注'}}
</view> </view>
</view> </view>
<view class="activitytime" v-if='details.IsOpenEnroll==1'> <view class="activitytime" v-if='details.IsOpenEnroll==1'>
...@@ -865,6 +866,37 @@ ...@@ -865,6 +866,37 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/blindDate/baomingList?type=' + type +'&ActivityId='+this.details.Id url: '/pages/blindDate/baomingList?type=' + type +'&ActivityId='+this.details.Id
}) })
},
getfollow(x){
let ID=0
if(x.IsFocus!=0){
ID = x.MyFollowId
}
this.request2({
url: '/api/AppletMiai/GetFollowMember',
data: {
ID:ID,
UserId:x.UserId,
}
},
res => {
uni.showToast({
title:res.message,
icon:'none'
})
this.request2(
{
url: '/api/AppletMiai/GetActivityInfo',
data: {ActivityId:this.msg.ActivityId}
},
res => {
this.details = res.data
}
);
}
);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment