|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="school-circle iPhone-bottom flex-common-css box-border-box ">
|
|
|
- <image class="circle-add" src="@/static/img/school/add.png" mode="" @click="openPop()"></image>
|
|
|
+ <image class="circle-add" src="@/static/img/school/add.png" mode="" @click="add()"></image>
|
|
|
|
|
|
<view class="bg-box"></view>
|
|
|
|
|
|
@@ -46,7 +46,7 @@
|
|
|
</view>
|
|
|
|
|
|
<scroll-view v-else scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
|
|
|
- <view class="card-box box-border-box p-24 bgc-f flex-justify-space" v-for="(item,i) in list" :key="i" @click.stop="toDet()">
|
|
|
+ <view class="card-box box-border-box p-24 bgc-f flex-justify-space" v-for="(item,i) in list" :key="i" @click.stop="toDet(item)">
|
|
|
<image class="card-head" :src="item.head_img" mode="scaleToFill"></image>
|
|
|
<view class="flex-1">
|
|
|
<view class="card-1 flex-justify-space mb-16">
|
|
|
@@ -55,7 +55,7 @@
|
|
|
<view class="fs-24 fc-9">{{item.created_date}}</view>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- <image class="dian-img" src="@/static/img/school/dian.png" mode=""></image>
|
|
|
+ <image @click.stop="openRepot(item)" class="dian-img" src="@/static/img/school/dian.png" mode=""></image>
|
|
|
<view class="align-items-center">
|
|
|
<image class="hot-img" src="@/static/img/school/hot.png" mode=""></image>
|
|
|
<view class="fs-26 fw-400 fc-9">{{item.heat}}</view>
|
|
|
@@ -74,7 +74,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="card-5 flex-justify-space">
|
|
|
- <view class="align-items-center">
|
|
|
+ <view class="align-items-center" @click.stop="share()">
|
|
|
<image src="@/static/img/school/fx.png" mode=""></image>
|
|
|
<view class="fs-24 fc-9">分享</view>
|
|
|
</view>
|
|
|
@@ -92,16 +92,25 @@
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
|
+
|
|
|
+ <uni-popup ref="popshare" type="bottom">
|
|
|
+ <view class="pop-box pop-h-20 box-border-box p-24">
|
|
|
+ <view @click.stop="shareSelect(0)" class="b-bottom text-align-center fs-32 fw-600 fc-f mb-20">分享到群聊</view>
|
|
|
+ <view @click.stop="shareSelect(1)" class="b-bottom text-align-center fs-32 fw-600 fc-f">分享到朋友圈</view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
<uni-popup ref="popup" type="bottom">
|
|
|
- <view class="pop-box box-border-box p-24">
|
|
|
+ <view class="pop-box pop-h-30 box-border-box p-24">
|
|
|
<view class="head-pop flex-justify-space align-items-center mb-24">
|
|
|
- <uni-icons @click.stop="closePop()" type="closeempty" size="24"></uni-icons>
|
|
|
- <view class="fs-36 fc-0 fw-600">选发布类型</view>
|
|
|
- <view class="fs-28 fw-600 fc-41ABF5" @click.stop="add()">确定</view>
|
|
|
+ <uni-icons @click.stop="closePop(1)" type="closeempty" size="24"></uni-icons>
|
|
|
+ <view class="fs-36 fc-0 fw-600">请输入举报内容</view>
|
|
|
+ <view class="fs-28 fw-600 fc-41ABF5">确定</view>
|
|
|
</view>
|
|
|
<view class="scroll-view-css">
|
|
|
- <view class="item-box fs-32 " :class="id==i?'fc-41ABF5 bgc-D5EDFB':'bgc-F3F4F6'" v-for="(item,i) in classListPop" :key="i">{{item.name}}</view>
|
|
|
+ <textarea style="height: 100%;" v-model="reportData.content" class=" fs-24" :maxlength='50' placeholder='请输入举报内容'></textarea>
|
|
|
</view>
|
|
|
+ <view @click.stop="closePop(2)" class="b-bottom text-align-center fs-32 fw-600 fc-f">确认举报</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
|
|
|
@@ -178,7 +187,7 @@
|
|
|
|
|
|
<script>
|
|
|
import EnBlank from "@/components/en-utils/en-blank/en-blank";
|
|
|
- import {getAlumniList,setAlumniLike,getRemarkList} from '@/api/alumni.js';
|
|
|
+ import {getAlumniList,setAlumniLike,getRemarkList,alumniReport} from '@/api/alumni.js';
|
|
|
import {getTopic} from '@/api/category.js';
|
|
|
import tools from '@/service/tools';
|
|
|
|
|
|
@@ -186,11 +195,9 @@
|
|
|
components:{EnBlank},
|
|
|
data(){
|
|
|
return{
|
|
|
- id:0,
|
|
|
isShowIpnut:false,
|
|
|
|
|
|
classList:[],
|
|
|
- classListPop:[],
|
|
|
|
|
|
total:0,
|
|
|
list:[],
|
|
|
@@ -211,6 +218,11 @@
|
|
|
schoolData:{
|
|
|
school_name:'',
|
|
|
},
|
|
|
+
|
|
|
+ reportData:{
|
|
|
+ news_id:'',
|
|
|
+ content:'',
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
onShow(){
|
|
|
@@ -238,7 +250,6 @@
|
|
|
getTopic(){
|
|
|
getTopic().then((res)=>{
|
|
|
if(res.code === 1){
|
|
|
- this.classListPop = JSON.parse(JSON.stringify(res.data));
|
|
|
this.classList = res.data;
|
|
|
this.classList.unshift({name:'全部贴子',id:0});
|
|
|
}
|
|
|
@@ -289,6 +300,11 @@
|
|
|
setAlumniLike({news_id:item.news_id,is_like:is_like}).then((res)=>{
|
|
|
if(res.code === 1){
|
|
|
item.is_like = is_like;
|
|
|
+ if(is_like == 0){
|
|
|
+ item.like -= 1
|
|
|
+ }else{
|
|
|
+ item.like += 1
|
|
|
+ }
|
|
|
this.isAJAX = false;
|
|
|
tools.success(res.msg);
|
|
|
}else{
|
|
|
@@ -313,27 +329,72 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- toDet(){
|
|
|
+ add(){
|
|
|
uni.navigateTo({
|
|
|
- url:"/pages-school/circle-info"
|
|
|
+ url:"/pages-school/add-circle"
|
|
|
})
|
|
|
},
|
|
|
- openPop(){
|
|
|
+ openRepot(item){
|
|
|
+ this.reportData.news_id = item.news_id;
|
|
|
this.$refs.popup.open();
|
|
|
},
|
|
|
- closePop(){
|
|
|
- this.$refs.popup.close();
|
|
|
+ closePop(type){
|
|
|
+ if(type === 1){
|
|
|
+ this.reportData.news_id = '';
|
|
|
+ this.reportData.content = '';
|
|
|
+ this.$refs.popup.close();
|
|
|
+ }else{
|
|
|
+ if(this.isAJAX){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isAJAX = true;
|
|
|
+ alumniReport(this.reportData).then((res)=>{
|
|
|
+ if(res.code === 1){
|
|
|
+ tools.success(res.msg)
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.isAJAX = false;
|
|
|
+ this.closePop(1);
|
|
|
+ },1000)
|
|
|
+ }else{
|
|
|
+ tools.success(res.msg);
|
|
|
+ this.isAJAX = false;;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ share(){
|
|
|
+ this.$refs.popshare.open();
|
|
|
},
|
|
|
- add(item){
|
|
|
+ shareSelect(type){
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let currentPage = pages[pages.length - 1];
|
|
|
+ let url = currentPage.route || currentPage.$route.path;
|
|
|
+ uni.share({
|
|
|
+ provider: "weixin",
|
|
|
+ scene: "WXSceneTimeline",
|
|
|
+ type: type,
|
|
|
+ href: url,
|
|
|
+ title: "君子校友",
|
|
|
+ summary: "我正在使用君子校友小程序,邀请您一起体验",
|
|
|
+ imageUrl: "https://sjz-school.oss-cn-chengdu.aliyuncs.com/logo.png",
|
|
|
+ success:(res)=>{
|
|
|
+ tools.success('分享成功')
|
|
|
+ this.$refs.popshare.close();
|
|
|
+ },
|
|
|
+ fail:(err)=>{
|
|
|
+ tools.error('分享失败')
|
|
|
+ this.$refs.popshare.close();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ toDet(item){
|
|
|
uni.navigateTo({
|
|
|
- url:"/pages-school/add-circle?topic_id=" + this.fromData.topic_id + '&news_id=' + item.news_id
|
|
|
+ url:"/pages-school/circle-info?news_id=" + item.news_id
|
|
|
})
|
|
|
},
|
|
|
|
|
|
-
|
|
|
closeMsg(){
|
|
|
this.$refs.popmsg.close();
|
|
|
},
|
|
|
@@ -351,11 +412,27 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+ .b-bottom{
|
|
|
+ width: 100%;
|
|
|
+ height: 88rpx;
|
|
|
+ line-height: 88rpx;
|
|
|
+ background: linear-gradient( 105deg, #57CAFF 0%, #41ABF5 100%);
|
|
|
+ border-radius: 200rpx;
|
|
|
+ }
|
|
|
+
|
|
|
.school-circle{
|
|
|
padding-left: 24rpx;
|
|
|
padding-right: 24rpx;
|
|
|
position: relative;
|
|
|
|
|
|
+
|
|
|
+ .pop-h-20{
|
|
|
+ height: 18vh !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .pop-h-30{
|
|
|
+ height: 30vh !important;
|
|
|
+ }
|
|
|
.pop-box{
|
|
|
|
|
|
width: 100%;
|