school-circle.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. <template>
  2. <view class="school-circle iPhone-bottom flex-common-css box-border-box ">
  3. <image class="circle-add" src="@/static/img/school/add.png" mode="" @click="add()"></image>
  4. <view class="bg-box"></view>
  5. <Nav :leftShow='false' :customNav='true' bgckgroundBox='transparent'>
  6. <template>
  7. <view slot="custom" class="align-items-center flex-justify-center navCustom">
  8. <view class="align-items-center nav-left" @click="toBack()">
  9. <uni-icons type="left" size="20"></uni-icons>
  10. <view class="fs-34">
  11. 返回
  12. </view>
  13. </view>
  14. <view class="nav-title w-390 text-overflow-ellipsis-one text-align-center fs-36 fw-400">
  15. {{schoolData.school_name}}
  16. </view>
  17. </view>
  18. </template>
  19. </Nav>
  20. <view class="pl-24 pr-24 box-border-box">
  21. <view class="ts-box mt-24 align-items-center box-border-box plr-12 mb-20">
  22. <image src="@/static/img/school/ts.png" mode=""></image>
  23. <view class="fs-26 fw-400 fc-FB3D03">{{alumni_str}}</view>
  24. </view>
  25. </view>
  26. <view class="nav-box display-flex mb-20 pl-24 pr-24 box-border-box">
  27. <view class="nav-item view-nowrap" @click="selectTopicId(item.id)"
  28. :class="fromData.topic_id == item.id?'h130':'bgc-f'" v-for="(item,i) in classList" :key="i">
  29. <image v-if="item.id == 0" class="nav-icon" src="@/static/img/school/icon.png" mode=""></image>
  30. <image v-else class="nav-icon" :src="item.image" mode=""></image>
  31. <view class="fs-24 plr-24 " :class="fromData.topic_id==item.id?'fw-600 fc-41ABF5':''">{{item.name}}
  32. </view>
  33. <image v-if="fromData.topic_id == item.id" class="nav-bg" src="@/static/img/school/bg.png" mode="">
  34. </image>
  35. </view>
  36. </view>
  37. <view class="flex-justify-space type-box mb-24 pl-24 pr-24 box-border-box">
  38. <view class="display-flex">
  39. <view @click="selectOrderBuy(1)" class="box-1" :class="fromData.orderBy == 1?'box-s':''">最新</view>
  40. <view @click="selectOrderBuy(2)" class="box-1" :class="fromData.orderBy == 2?'box-s':''">最热</view>
  41. <view @click="selectOrderBuy(3)" class="box-1" :class="fromData.orderBy == 3?'box-s':''">评论最多</view>
  42. </view>
  43. <view class="box-2 fs-24 fc-41ABF5" @click="toSelectSchool()">逛其他学校</view>
  44. </view>
  45. <view v-if="list.length === 0" class="scroll-view-css">
  46. <EnBlank :customSrc='true'>
  47. <template v-slot:blankImg>
  48. <image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
  49. </template>
  50. </EnBlank>
  51. </view>
  52. <scroll-view v-else scroll-y="true" class="scroll-view-css pl-24 pr-24 box-border-box bgc-F5F4F9"
  53. @scrolltolower="scrolltolower">
  54. <view class="card-box box-border-box p-24 bgc-f flex-justify-space" v-for="(item,i) in list" :key="i"
  55. @click.stop="toDet(item)">
  56. <image class="card-head" :src="item.head_img" mode="scaleToFill"></image>
  57. <view class="flex-1">
  58. <view class="card-1 flex-justify-space mb-16">
  59. <view class="">
  60. <view class="w-400 fs-28 fw-600 mb-8">{{item.nickname}}</view>
  61. <view class="fs-24 fc-9">{{item.created_date}}</view>
  62. </view>
  63. <view class="">
  64. <view class="align-items-center">
  65. <image class="hot-img" src="@/static/img/school/hot.png" mode=""></image>
  66. <view class="fs-26 fw-400 fc-9">{{item.heat}}</view>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="card-2 fs-30 fw-400 mb-16" style="width: 560rpx;">
  71. {{item.content}}
  72. </view>
  73. <view class="card-3 flex-wrap-wrap mb-32" style="width: 560rpx;">
  74. <image class="card-3-img" :src="item" v-for="(item,i) in item.image" mode="aspectFill"></image>
  75. </view>
  76. <view class="align-items-center mb-40">
  77. <view class="label-box align-items-center mr-20 b-rad-200 bgc-F2F2F2">
  78. <image class="wz mr-8" src="@/static/img/my/wz-two.png" mode=""></image>
  79. <view class="fs-24 fc-9">
  80. {{item.school_name}}
  81. </view>
  82. </view>
  83. <view class="label-box align-items-center b-rad-200 bgc-F2F2F2">
  84. <image class="wz mr-8" src="@/static/img/my/ht.png" mode=""></image>
  85. <view class="fs-24 fc-9">
  86. {{item.topic_name}}
  87. </view>
  88. </view>
  89. </view>
  90. <view class="card-5 align-items-center flex-justify-space">
  91. <!-- <view class="align-items-center"></view> -->
  92. <view class="align-items-center" @click.stop="handUp(1,item)">
  93. <uni-icons type="hand-up" size="22" :color="item.is_like==1?'#FD5C02':'#999'"></uni-icons>
  94. <view class="fs-24 " :class="item.is_like==1?'fc-FD5C02':'fc-9'">{{item.like}}</view>
  95. </view>
  96. <view class="align-items-center">
  97. <image class="info-img" src="@/static/img/school/info.png" mode=""></image>
  98. <view class="fs-24 fc-9">{{item.remark}}</view>
  99. </view>
  100. <image @click.stop="openRepot(item)" class="info-img" src="@/static/img/school/dian.png"
  101. mode=""></image>
  102. </view>
  103. </view>
  104. </view>
  105. </scroll-view>
  106. <uni-popup ref="popup" type="bottom">
  107. <view class="pop-box pop-h-30 box-border-box p-24">
  108. <view class="head-pop flex-justify-space align-items-center mb-24">
  109. <uni-icons @click.stop="closePop(1)" type="closeempty" size="24"></uni-icons>
  110. <view class="fs-36 fc-0 fw-600">请输入举报内容</view>
  111. <view class="fs-28 fw-600 fc-41ABF5" @click.stop="closePop(2)">确定</view>
  112. </view>
  113. <view class="scroll-view-css">
  114. <textarea style="height: 100%;" v-model="reportData.content" class=" fs-24" :maxlength='50'
  115. placeholder='请输入举报内容'></textarea>
  116. </view>
  117. <!-- <view class="b-bottom text-align-center fs-32 fw-600 fc-f">确认举报</view> -->
  118. </view>
  119. </uni-popup>
  120. <uni-popup ref="popmsg" type="bottom">
  121. <view class="pop-box pop-msg box-border-box p-24">
  122. <!-- 输入框 -->
  123. <view class="pop-input" v-if="isShowIpnut">
  124. <view class="head-pop flex-justify-space align-items-center mb-24 box-border-box p-24">
  125. <view class="fs-28 fw-600 fc-41ABF5"></view>
  126. <view class="fs-36 fc-0 fw-600">评论</view>
  127. <uni-icons @click.stop="closeInput()" type="closeempty" size="24"></uni-icons>
  128. </view>
  129. <view class="scroll-view-css">
  130. <view class="bgc-f box-border-box p-32">
  131. <view class="fs-34 fw-600 mb-20">评论</view>
  132. <textarea v-model="msgData.content" maxlength="100" class=" fs-24"
  133. placeholder='友善评论,文明发言'></textarea>
  134. </view>
  135. </view>
  136. <view class="box-border-box p-24">
  137. <view class="save-box" @click.stop="save()">评论</view>
  138. </view>
  139. </view>
  140. <!-- ----- -->
  141. <view class="head-pop flex-justify-space align-items-center mb-24">
  142. <view class=""></view>
  143. <view class="align-items-center">
  144. <view class="fs-36 fc-0 fw-600 mr-4">
  145. 评论
  146. </view>
  147. <view class="fs-24 fc-9">
  148. ({{remarkData.list.length}})
  149. </view>
  150. </view>
  151. <uni-icons @click.stop="closeMsg()" type="closeempty" size="24"></uni-icons>
  152. </view>
  153. <view v-if="remarkData.list.length === 0" class="scroll-view-css">
  154. <EnBlank :customSrc='true'>
  155. <template v-slot:blankImg>
  156. <image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
  157. </template>
  158. </EnBlank>
  159. </view>
  160. <view v-else class="scroll-view-css box-border-box plr-24">
  161. <view class="list-box flex-justify-space" v-for="(item,i) in remarkData.list" :key="i">
  162. <image class="list-box-img" :src="item.head_img" mode="scaleToFill"></image>
  163. <view class="flex-1 p-b-20">
  164. <view class=" flex-justify-space">
  165. <view class=" b-b-F9F9F9 mr-20">
  166. <view class="fs-28 fw-400 fc-9 mb-8 align-items-center">
  167. {{item.nickname}}
  168. <span v-if="item.is_author == 1"
  169. class='only-box text-align-center fs-24 fc-41ABF5 ml-10'>作者</span>
  170. <span v-if="item.is_self == 1" class="fs-28 fc-6 ml-10">我</span>
  171. </view>
  172. <view class="fs-30 fw-400 mb-8" @click.stop="openInput(1,item)">
  173. {{item.content}}
  174. </view>
  175. <view class="display-flex mb-8">
  176. <view class="fs-24 fw-400 fc-9 mr-6">{{item.created_date}}</view>
  177. <uni-icons v-if="item.is_self == 1" @click="delInfo(item)" type="trash"
  178. size="16"></uni-icons>
  179. </view>
  180. </view>
  181. <view class="display-flex" @click.stop="handUp(2,item)">
  182. <uni-icons class="mr-8" type="hand-up" size="20"
  183. :color="item.is_like==1?'#FD5C02':'#999'"></uni-icons>
  184. <view class="fs-24 fw-400 mt-5" :class="item.is_like==1?'fc-FD5C02':'fc-9'">
  185. {{item.like}}
  186. </view>
  187. </view>
  188. </view>
  189. <view v-if="item.isOpen" class="fs-24 fc-6 text-align-center mb-12"
  190. @click="openReply(1,item)">展开更多评论</view>
  191. <!-- 回复 -->
  192. <view class="mb-16" v-if="item.replyList.length > 0">
  193. <view class="list-box flex-justify-space" v-for="(info,index) in item.replyList"
  194. :key="index">
  195. <image class="list-box-img" :src="info.head_img" mode="scaleToFill"></image>
  196. <view class="flex-1">
  197. <view class=" flex-justify-space">
  198. <view class=" b-b-F9F9F9 mr-20">
  199. <view class="fs-28 fw-400 fc-9 mb-8 align-items-center">
  200. {{info.nickname}}
  201. <span v-if="info.is_author == 1"
  202. class='only-box text-align-center fs-24 fc-41ABF5 ml-10'>作者</span>
  203. <span v-if="info.is_self == 1" class="fs-28 fc-6 ml-10">我</span>
  204. </view>
  205. <view class="fs-30 fw-400 mb-8" @click.stop="openInput(2,info)">
  206. {{info.content}}
  207. </view>
  208. <view class="display-flex mb-8">
  209. <view class="fs-24 fw-400 fc-9 mr-6">{{info.created_date}}</view>
  210. <uni-icons class="fs-24" v-if="info.is_self == 1"
  211. @click="delInfo(item)" type="trash"></uni-icons>
  212. </view>
  213. </view>
  214. <view class="display-flex" @click.stop="handUp(2,info)">
  215. <uni-icons type="hand-up" size="20"
  216. :color="info.is_like==1?'#FD5C02':'#999'"></uni-icons>
  217. <view class="fs-24 fw-400 mt-5"
  218. :class="info.is_like==1?'fc-FD5C02':'fc-9'">{{info.like}}</view>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. <view v-if="item.replyList.length < item.count"
  224. class="fs-24 fc-6 text-align-center mb-12" @click="openReply(2,item)">展开更多评论</view>
  225. </view>
  226. </view>
  227. </view>
  228. <view v-if="remarkData.list.length < remarkData.total" class="text-align-center fs-26"
  229. @click="scrolltolowerList">加载更多评论</view>
  230. </view>
  231. <view class="input-box text-align-left fs-28 fc-9 box-border-box plr-24" @click.stop="openInput(0,'')">
  232. 友善评论,文明发言</view>
  233. </view>
  234. </uni-popup>
  235. </view>
  236. </template>
  237. <script>
  238. import EnBlank from "@/components/en-utils/en-blank/en-blank";
  239. import {
  240. getAlumniList,
  241. setAlumniLike,
  242. getRemarkList,
  243. alumniReport,
  244. setCreateRemark,
  245. setRemarkLike,
  246. delRemark
  247. } from '@/api/alumni.js';
  248. import {
  249. getCommonText
  250. } from '@/api/common.js'
  251. import {
  252. getTopic
  253. } from '@/api/category.js';
  254. import tools from '@/service/tools';
  255. export default {
  256. components: {
  257. EnBlank
  258. },
  259. data() {
  260. return {
  261. isShowIpnut: false,
  262. classList: [],
  263. total: 0,
  264. list: [],
  265. fromData: {
  266. topic_id: 0,
  267. orderBy: 1, //1最新 2最热 3最多评论
  268. school_id: '',
  269. page: 1,
  270. },
  271. isAJAX: false,
  272. schoolData: {
  273. school_name: '',
  274. },
  275. // 举报
  276. reportData: {
  277. news_id: '',
  278. content: '',
  279. },
  280. // 一级评论
  281. remarkData: {
  282. remark_id: '',
  283. news_id: '',
  284. total: 0,
  285. list: [],
  286. page: 1,
  287. },
  288. // 发起评论
  289. msgData: {
  290. news_id: '',
  291. remark_id: '',
  292. content: '',
  293. reply_id: '',
  294. },
  295. // 回复评论
  296. replyData: {
  297. page: 1,
  298. },
  299. alumni_str: '' // 校友圈提示
  300. }
  301. },
  302. onShow() {
  303. uni.$once('operateType', type => {
  304. if (type) {
  305. let circleSchoolId = uni.getStorageSync('circleSchoolId');
  306. let schoolName = uni.getStorageSync('school_name');
  307. let circleSchoolName = uni.getStorageSync('circleSchoolName');
  308. this.schoolData.school_name = circleSchoolId ? circleSchoolName : schoolName;
  309. this.classList = [];
  310. this.getTopic();
  311. this.list = [];
  312. this.fromData.page = 1;
  313. this.getList();
  314. this.getCommonText()
  315. }
  316. })
  317. },
  318. mounted() {
  319. uni.$on('circleDataUp', (data) => {
  320. console.log(data, '*********************');
  321. this.list.forEach((v, k) => {
  322. if (v.news_id == data.news_id) {
  323. v.like = data.like
  324. v.remark = data.remark
  325. v.heat = data.heat
  326. v.is_like = data.is_like
  327. }
  328. })
  329. this.$forceUpdate()
  330. })
  331. let circleSchoolId = uni.getStorageSync('circleSchoolId');
  332. let schoolName = uni.getStorageSync('school_name');
  333. let circleSchoolName = uni.getStorageSync('circleSchoolName');
  334. this.schoolData.school_name = circleSchoolId ? circleSchoolName : schoolName;
  335. this.classList = [];
  336. this.getTopic();
  337. this.list = [];
  338. this.fromData.page = 1;
  339. this.getList();
  340. this.getCommonText()
  341. },
  342. methods: {
  343. getCommonText() {
  344. getCommonText().then((res) => {
  345. if (res.code == 1) {
  346. this.alumni_str = res.data.alumni_str
  347. }
  348. })
  349. },
  350. toBack() {
  351. tools.leftClick()
  352. },
  353. toSelectSchool() {
  354. uni.navigateTo({
  355. url: '/pages-address/select-school?type=2'
  356. })
  357. },
  358. getTopic() {
  359. getTopic().then((res) => {
  360. if (res.code === 1) {
  361. this.classList = res.data;
  362. this.classList.unshift({
  363. name: '全部贴子',
  364. id: 0
  365. });
  366. }
  367. })
  368. },
  369. selectOrderBuy(type) {
  370. if (this.fromData.orderBy != type) {
  371. this.fromData.orderBy = type;
  372. this.list = [];
  373. this.fromData.page = 1;
  374. this.getList();
  375. }
  376. },
  377. selectTopicId(id) {
  378. if (this.fromData.topic_id != id) {
  379. this.fromData.topic_id = id;
  380. this.list = [];
  381. this.fromData.page = 1;
  382. this.getList();
  383. }
  384. },
  385. getList() {
  386. let circleSchoolId = uni.getStorageSync('circleSchoolId');
  387. let school_id = uni.getStorageSync('school_id');
  388. this.fromData.school_id = circleSchoolId ? circleSchoolId : school_id
  389. getAlumniList(this.fromData).then((res) => {
  390. if (res.code === 1) {
  391. this.list = [...this.list, ...res.data.items];
  392. this.total = res.data.total;
  393. }
  394. })
  395. },
  396. scrolltolower() {
  397. if (this.list.length < this.total) {
  398. this.fromData.page += 1;
  399. this.getList();
  400. }
  401. },
  402. // 点赞
  403. handUp(type, item) {
  404. if (this.isAJAX) {
  405. return
  406. }
  407. this.isAJAX = true;
  408. let is_like = item.is_like == 1 ? 0 : 1;
  409. if (type == 1) {
  410. // 点赞贴子
  411. setAlumniLike({
  412. news_id: item.news_id,
  413. is_like: is_like
  414. }).then((res) => {
  415. this.handUpFun(res, item, is_like)
  416. })
  417. } else {
  418. // 点赞评论
  419. setRemarkLike({
  420. news_id: item.news_id,
  421. is_like: is_like,
  422. remark_id: item.id
  423. }).then((res) => {
  424. this.handUpFun(res, item, is_like)
  425. })
  426. }
  427. },
  428. // 点赞公共回复
  429. handUpFun(res, item, is_like) {
  430. if (res.code === 1) {
  431. item.is_like = is_like;
  432. if (is_like == 0) {
  433. item.like -= 1
  434. } else {
  435. item.like += 1
  436. }
  437. this.isAJAX = false;
  438. tools.success(res.msg, 1000);
  439. } else {
  440. this.isAJAX = false;
  441. tools.error(res.msg, 1000);
  442. }
  443. },
  444. // 获取回复列表
  445. openReply(type, item) {
  446. // type 1获取其他 2加载更多
  447. if (this.isAJAX) {
  448. return
  449. }
  450. this.isAJAX = true;
  451. if (type == 1) {
  452. item.replyList = [];
  453. this.replyData.page = 1;
  454. } else {
  455. this.replyData.page += 1;
  456. }
  457. getRemarkList({
  458. news_id: item.news_id,
  459. remark_id: item.id,
  460. page: this.replyData.page
  461. }).then((res) => {
  462. if (res.code === 1) {
  463. this.isAJAX = false;
  464. item.replyList = [...item.replyList, ...res.data.items];
  465. item.isOpen = false;
  466. } else {
  467. this.isAJAX = false;
  468. tools.error(res.msg)
  469. }
  470. })
  471. },
  472. // 打开评论
  473. openMsg(item) {
  474. this.remarkData.news_id = item.news_id;
  475. this.msgData.news_id = item.news_id;
  476. this.remarkData.remark_id = 0;
  477. this.getMsg();
  478. },
  479. // 获取评论
  480. getMsg() {
  481. if (this.isAJAX) {
  482. return
  483. }
  484. this.isAJAX = true;
  485. getRemarkList({
  486. news_id: this.remarkData.news_id,
  487. remark_id: this.remarkData.remark_id,
  488. page: this.remarkData.page
  489. }).then((res) => {
  490. if (res.code === 1) {
  491. this.isAJAX = false;
  492. this.remarkData.list = [...this.remarkData.list, ...res.data.items];
  493. this.remarkData.total = res.data.total;
  494. this.remarkData.list.forEach((v) => {
  495. v.replyList = [];
  496. if (v.count > 0) {
  497. v.isOpen = true;
  498. }
  499. })
  500. this.$refs.popmsg.open();
  501. } else {
  502. this.isAJAX = false;
  503. tools.error(res.msg)
  504. }
  505. })
  506. },
  507. // 加载更多评论
  508. scrolltolowerList() {
  509. if (this.remarkData.list.length < this.remarkData.total) {
  510. this.remarkData.page += 1;
  511. this.getMsg();
  512. }
  513. },
  514. // 关闭评论
  515. closeMsg() {
  516. this.$refs.popmsg.close();
  517. this.remarkData.list = [];
  518. this.remarkData.page = 1;
  519. this.msgData.news_id = '';
  520. this.remarkData.remark_id = '';
  521. },
  522. openInput(type, item) {
  523. if (type == 0) {
  524. this.msgData.remark_id = 0;
  525. } else if (type == 1) {
  526. this.msgData.remark_id = item.id;
  527. this.msgData.reply_id = item.m_id;
  528. } else {
  529. this.msgData.remark_id = item.remark_id;
  530. this.msgData.reply_id = item.m_id;
  531. }
  532. this.isShowIpnut = true;
  533. },
  534. closeInput() {
  535. this.isShowIpnut = false;
  536. this.msgData.remark_id = '';
  537. this.msgData.content = '';
  538. this.msgData.reply_id = '';
  539. },
  540. save() {
  541. if (this.isAJAX) {
  542. return
  543. }
  544. this.isAJAX = true;
  545. setCreateRemark(this.msgData).then((res) => {
  546. if (res.code == 1) {
  547. tools.success('评论成功', 1000)
  548. setTimeout(() => {
  549. this.isAJAX = false;
  550. this.closeInput()
  551. if (this.msgData.remark_id == 0) {
  552. this.remarkData.list = [];
  553. this.remarkData.page = 1;
  554. this.getMsg();
  555. this.list = [];
  556. this.fromData.page = 1;
  557. this.getList();
  558. } else {
  559. this.remarkData.list = [];
  560. this.remarkData.page = 1;
  561. this.getMsg();
  562. }
  563. }, 1500)
  564. } else {
  565. this.isAJAX = false;
  566. tools.error(res.msg)
  567. }
  568. })
  569. },
  570. delInfo(item) {
  571. if (this.isAJAX) {
  572. return
  573. }
  574. this.isAJAX = true;
  575. delRemark({
  576. remark_id: item.id
  577. }).then((res) => {
  578. if (res.code === 1) {
  579. tools.success('删除成功', 1000)
  580. setTimeout(() => {
  581. this.isAJAX = false;
  582. this.remarkData.list = [];
  583. this.remarkData.page = 1;
  584. this.getMsg();
  585. this.list = [];
  586. this.fromData.page = 1;
  587. this.getList();
  588. }, 1500)
  589. } else {
  590. this.isAJAX = false;
  591. tools.error(res.msg)
  592. }
  593. })
  594. },
  595. // 添加贴子
  596. add() {
  597. uni.navigateTo({
  598. url: "/pages-school/add-circle"
  599. })
  600. },
  601. // 打开举报
  602. openRepot(item) {
  603. this.reportData.news_id = item.news_id;
  604. this.$refs.popup.open();
  605. },
  606. // 举报
  607. closePop(type) {
  608. if (type === 1) {
  609. this.reportData.news_id = '';
  610. this.reportData.content = '';
  611. this.$refs.popup.close();
  612. } else {
  613. if (this.isAJAX) {
  614. return
  615. }
  616. this.isAJAX = true;
  617. alumniReport(this.reportData).then((res) => {
  618. if (res.code === 1) {
  619. tools.success(res.msg, 1000)
  620. setTimeout(() => {
  621. this.isAJAX = false;
  622. this.closePop(1);
  623. }, 1000)
  624. } else {
  625. tools.error(res.msg);
  626. this.isAJAX = false;;
  627. }
  628. })
  629. }
  630. },
  631. toDet(item) {
  632. uni.navigateTo({
  633. url: "/pages-school/circle-info?news_id=" + item.news_id
  634. })
  635. },
  636. },
  637. }
  638. </script>
  639. <style>
  640. body {
  641. background: linear-gradient(to bottom, #F5F4F9, #fff padding-bottom: env(safe-area-inset-bottom));
  642. }
  643. </style>
  644. <style scoped lang="scss">
  645. .card-2 {
  646. word-wrap: break-word;
  647. }
  648. .navCustom {
  649. position: relative;
  650. width: 100%;
  651. }
  652. .nav-left {
  653. position: absolute;
  654. left: 0;
  655. }
  656. .nav-title {
  657. // position: absolute;
  658. // left: 50%;
  659. // top: 20rpx;
  660. }
  661. .label-box {
  662. padding: 0 12rpx;
  663. height: 38rpx;
  664. line-height: 38rpx;
  665. }
  666. .wz {
  667. width: 32rpx;
  668. height: 32rpx;
  669. }
  670. .input-box {
  671. width: 100%;
  672. height: 80rpx;
  673. background: #F2F2F2;
  674. border-radius: 200rpx;
  675. line-height: 80rpx;
  676. }
  677. .b-bottom {
  678. width: 100%;
  679. height: 88rpx;
  680. line-height: 88rpx;
  681. background: linear-gradient(105deg, #57CAFF 0%, #41ABF5 100%);
  682. border-radius: 200rpx;
  683. }
  684. .school-circle {
  685. // padding-left: 24rpx;
  686. // padding-right: 24rpx;
  687. position: relative;
  688. .pop-h-20 {
  689. height: 18vh !important;
  690. }
  691. .pop-h-30 {
  692. height: 30vh !important;
  693. }
  694. .pop-box {
  695. width: 100%;
  696. height: 60vh;
  697. background-color: #fff;
  698. border-radius: 24rpx 24rpx 0rpx 0rpx;
  699. display: flex;
  700. flex-direction: column;
  701. .item-box {
  702. width: 100%;
  703. height: 92rpx;
  704. border-radius: 200rpx;
  705. line-height: 92rpx;
  706. text-align: center;
  707. margin-bottom: 24rpx;
  708. }
  709. }
  710. .pop-msg {
  711. height: 80vh;
  712. position: relative;
  713. .pop-input {
  714. position: absolute;
  715. width: 100%;
  716. height: 80vh;
  717. background-color: #fff;
  718. bottom: 0;
  719. left: 0;
  720. border-top: 1rpx solid #ccc;
  721. border-radius: 20rpx 20rpx 0 0;
  722. display: flex;
  723. flex-direction: column;
  724. .save-box {
  725. text-align: center;
  726. line-height: 88rpx;
  727. font-weight: 600;
  728. font-size: 32rpx;
  729. color: #FFFFFF;
  730. width: 100%;
  731. height: 80rpx;
  732. border-radius: 200rpx;
  733. background: linear-gradient(105deg, #57CAFF 0%, #41ABF5 100%);
  734. }
  735. }
  736. .head-pop {
  737. padding-bottom: 34rpx !important;
  738. border-bottom: 1rpx solid #F2F2F2;
  739. }
  740. .list-box {
  741. .list-box-img {
  742. width: 80rpx;
  743. height: 80rpx;
  744. border-radius: 50%;
  745. margin-right: 16rpx;
  746. }
  747. .only-box {
  748. padding: 4rpx 16rpx;
  749. background: rgba(65, 171, 245, 0.1);
  750. border-radius: 8rpx 8rpx 8rpx 8rpx;
  751. }
  752. .msg-img {
  753. width: 144rpx;
  754. height: 144rpx;
  755. border-radius: 12rpx;
  756. margin-right: 5rpx;
  757. margin-bottom: 5rpx;
  758. }
  759. .msg-img:nth-child(3n) {
  760. margin-right: 0rpx;
  761. }
  762. .msg-img-1 {
  763. width: 100rpx !important;
  764. height: 100rpx !important;
  765. }
  766. }
  767. }
  768. .circle-add {
  769. width: 88rpx;
  770. height: 88rpx;
  771. position: absolute;
  772. right: 32rpx;
  773. bottom: 20vh;
  774. z-index: 2;
  775. }
  776. .w-400 {
  777. width: 400rpx;
  778. }
  779. .bg-box {
  780. width: 100%;
  781. height: 260rpx;
  782. filter: blur(80rpx);
  783. background: linear-gradient(to right, #E1F2FD, #E0F3FA, #DBF8EF);
  784. position: absolute;
  785. top: 0;
  786. left: 0;
  787. z-index: -1;
  788. }
  789. .ts-box {
  790. width: 100%;
  791. height: 72rpx;
  792. background: linear-gradient(180deg, #FFDBD0 -50%, #FFFFFF 100%);
  793. border-radius: 16rpx;
  794. image {
  795. width: 44rpx;
  796. height: 44rpx;
  797. margin-right: 8rpx;
  798. }
  799. }
  800. .nav-box {
  801. width: 100%;
  802. overflow-x: scroll;
  803. .h130 {
  804. height: 130rpx !important;
  805. }
  806. .nav-item {
  807. margin-right: 12rpx;
  808. width: 144rpx;
  809. height: 114rpx;
  810. text-align: center;
  811. border-radius: 20rpx;
  812. position: relative;
  813. .nav-icon {
  814. width: 64rpx;
  815. height: 64rpx;
  816. margin: 12rpx auto 0 auto;
  817. }
  818. .nav-bg {
  819. width: 144rpx;
  820. height: 130rpx;
  821. position: absolute;
  822. top: 0;
  823. left: 0;
  824. z-index: -1;
  825. }
  826. }
  827. }
  828. .type-box {
  829. .box-s {
  830. height: 50rpx;
  831. line-height: 50rpx;
  832. font-weight: 600 !important;
  833. color: #41ABF5;
  834. background: #E0F1FF !important;
  835. box-sizing: border-box;
  836. border: 1rpx solid #70C0F8;
  837. }
  838. .box-1 {
  839. padding: 0 32rpx;
  840. height: 50rpx;
  841. line-height: 50rpx;
  842. margin-right: 20rpx;
  843. background-color: #fff;
  844. border-radius: 12rpx;
  845. font-size: 24rpx;
  846. font-weight: 400;
  847. box-sizing: border-box;
  848. }
  849. .box-2 {
  850. width: 168rpx;
  851. height: 50rpx;
  852. line-height: 50rpx;
  853. text-align: center;
  854. border-radius: 12rpx 12rpx 12rpx 12rpx;
  855. border: 1rpx solid #41ABF5;
  856. box-sizing: border-box;
  857. }
  858. }
  859. .card-box {
  860. width: 100%;
  861. min-height: 100rpx;
  862. border-radius: 20rpx;
  863. margin-bottom: 20rpx;
  864. .card-head {
  865. width: 80rpx;
  866. height: 80rpx;
  867. border-radius: 50%;
  868. margin-right: 16rpx;
  869. }
  870. // .dian-img {
  871. // width: 30rpx;
  872. // height: 6rpx;
  873. // margin-bottom: 24rpx;
  874. // margin-left: auto;
  875. // }
  876. .hot-img {
  877. width: 40rpx;
  878. height: 40rpx;
  879. margin-left: auto;
  880. }
  881. .card-3 {
  882. .card-3-img {
  883. width: 182rpx;
  884. height: 182rpx;
  885. border-radius: 12rpx;
  886. margin-right: 6rpx;
  887. margin-bottom: 6rpx;
  888. }
  889. .card-3-img:nth-child(3n) {
  890. margin-right: 0rpx;
  891. }
  892. }
  893. .card-4 {
  894. view {
  895. padding: 4rpx 16rpx;
  896. background: #F2F2F2;
  897. border-radius: 200rpx;
  898. font-size: 24rpx;
  899. color: #999;
  900. margin-right: 20rpx;
  901. margin-bottom: 10rpx;
  902. }
  903. }
  904. .card-5 {
  905. .info-img {
  906. width: 40rpx;
  907. height: 40rpx;
  908. margin-right: 8rpx;
  909. }
  910. .dian-img {
  911. width: 30rpx;
  912. height: 6rpx;
  913. }
  914. }
  915. }
  916. }
  917. </style>