This commit is contained in:
zhaofang
2022-11-11 15:34:27 +08:00
parent c6de49f643
commit be2bbec9aa

View File

@@ -22,7 +22,7 @@
<view style="display: flex;line-height: 40upx;">
<author-info :name="detailData.sysCreateBy" :avatar="detailData.avatar" :sex="detailData.sex" :info="detailData.ucode" :showInfo="true"></author-info>
</view>
<view class="concern" v-if="hasFollow" @click="cancelFollow()">
<view class="concern" v-if="hasFollow" @click="followShow = true">
已关注
</view>
<view class="concern" v-else @click="addFollow()">
@@ -184,6 +184,17 @@
<view @click="closeBtns()" class="big-button">取消</view>
</view>
</u-popup>
<u-popup :show="followShow">
<view class="cancel-pop">
<view class="btn" @click="cancelFollow()">
<image style="width:32upx;height:32upx;vertical-align: middle;margin-right: 20upx;" src="../../static/images/icon/follow-stop.png" mode=""></image>
停止关注 {{detailData.sysCreateBy}}
</view>
<view class="btn btn2" @click="followShow = false">
取消
</view>
</view>
</u-popup>
<u-toast ref="interactToast"></u-toast>
</view>
</template>
@@ -198,6 +209,7 @@ import { mapGetters } from 'vuex';
export default {
data() {
return {
followShow:false,
detailData: {}, //问题详情数据
answers:0,
images:[],
@@ -296,6 +308,7 @@ export default {
apiFollow.remove(this.detailData.sysCreateAid).then(res=>{
if(res.status == 200) {
$this.hasFollow=false;
$this.followShow = false;
uni.showToast({icon: 'success',title:"已取消关注"})
}else {
uni.showToast({icon: 'info',title:"取消关注失败"+res.message})
@@ -754,6 +767,31 @@ export default {
</script>
<style lang="scss" scoped>
.cancel-pop{
// height: 142px;
background: #F8F8F8;
border-radius: 32upx 32upx 0 0;
padding: 44upx 36upx 40upx 36upx;
.btn{
height: 88upx;
font-size: 32upx;
font-weight: 500;
color: #333333;
line-height: 88upx;
box-shadow: 0 4upx 14upx 2upx rgba(104,102,102,0.08);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
display: -webkit-box;-webkit-line-clamp: 1;
word-break:break-all;
}
.btn2{
margin-top: 22upx;
border-radius: 44upx;
}
}
.interval{
height: 20upx;
width: 100%;