school-circle.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977
  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. },
  304. mounted() {
  305. uni.$on('circleDataUp', (data) => {
  306. console.log(data, '*********************');
  307. this.list.forEach((v, k) => {
  308. if (v.news_id == data.news_id) {
  309. v.like = data.like
  310. v.remark = data.remark
  311. v.heat = data.heat
  312. v.is_like = data.is_like
  313. }
  314. })
  315. this.$forceUpdate()
  316. })
  317. let circleSchoolId = uni.getStorageSync('circleSchoolId');
  318. let schoolName = uni.getStorageSync('school_name');
  319. let circleSchoolName = uni.getStorageSync('circleSchoolName');
  320. this.schoolData.school_name = circleSchoolId ? circleSchoolName : schoolName;
  321. this.classList = [];
  322. this.getTopic();
  323. this.list = [];
  324. this.fromData.page = 1;
  325. this.getList();
  326. this.getCommonText()
  327. },
  328. methods: {
  329. getCommonText() {
  330. getCommonText().then((res) => {
  331. if (res.code == 1) {
  332. this.alumni_str = res.data.alumni_str
  333. }
  334. })
  335. },
  336. toBack() {
  337. tools.leftClick()
  338. },
  339. toSelectSchool() {
  340. uni.navigateTo({
  341. url: '/pages-address/select-school?type=2'
  342. })
  343. },
  344. getTopic() {
  345. getTopic().then((res) => {
  346. if (res.code === 1) {
  347. this.classList = res.data;
  348. this.classList.unshift({
  349. name: '全部贴子',
  350. id: 0
  351. });
  352. }
  353. })
  354. },
  355. selectOrderBuy(type) {
  356. if (this.fromData.orderBy != type) {
  357. this.fromData.orderBy = type;
  358. this.list = [];
  359. this.fromData.page = 1;
  360. this.getList();
  361. }
  362. },
  363. selectTopicId(id) {
  364. if (this.fromData.topic_id != id) {
  365. this.fromData.topic_id = id;
  366. this.list = [];
  367. this.fromData.page = 1;
  368. this.getList();
  369. }
  370. },
  371. getList() {
  372. let circleSchoolId = uni.getStorageSync('circleSchoolId');
  373. let school_id = uni.getStorageSync('school_id');
  374. this.fromData.school_id = circleSchoolId ? circleSchoolId : school_id
  375. getAlumniList(this.fromData).then((res) => {
  376. if (res.code === 1) {
  377. this.list = [...this.list, ...res.data.items];
  378. this.total = res.data.total;
  379. }
  380. })
  381. },
  382. scrolltolower() {
  383. if (this.list.length < this.total) {
  384. this.fromData.page += 1;
  385. this.getList();
  386. }
  387. },
  388. // 点赞
  389. handUp(type, item) {
  390. if (this.isAJAX) {
  391. return
  392. }
  393. this.isAJAX = true;
  394. let is_like = item.is_like == 1 ? 0 : 1;
  395. if (type == 1) {
  396. // 点赞贴子
  397. setAlumniLike({
  398. news_id: item.news_id,
  399. is_like: is_like
  400. }).then((res) => {
  401. this.handUpFun(res, item, is_like)
  402. })
  403. } else {
  404. // 点赞评论
  405. setRemarkLike({
  406. news_id: item.news_id,
  407. is_like: is_like,
  408. remark_id: item.id
  409. }).then((res) => {
  410. this.handUpFun(res, item, is_like)
  411. })
  412. }
  413. },
  414. // 点赞公共回复
  415. handUpFun(res, item, is_like) {
  416. if (res.code === 1) {
  417. item.is_like = is_like;
  418. if (is_like == 0) {
  419. item.like -= 1
  420. } else {
  421. item.like += 1
  422. }
  423. this.isAJAX = false;
  424. tools.success(res.msg,1000);
  425. } else {
  426. this.isAJAX = false;
  427. tools.error(res.msg,1000);
  428. }
  429. },
  430. // 获取回复列表
  431. openReply(type, item) {
  432. // type 1获取其他 2加载更多
  433. if (this.isAJAX) {
  434. return
  435. }
  436. this.isAJAX = true;
  437. if (type == 1) {
  438. item.replyList = [];
  439. this.replyData.page = 1;
  440. } else {
  441. this.replyData.page += 1;
  442. }
  443. getRemarkList({
  444. news_id: item.news_id,
  445. remark_id: item.id,
  446. page: this.replyData.page
  447. }).then((res) => {
  448. if (res.code === 1) {
  449. this.isAJAX = false;
  450. item.replyList = [...item.replyList, ...res.data.items];
  451. item.isOpen = false;
  452. } else {
  453. this.isAJAX = false;
  454. tools.error(res.msg)
  455. }
  456. })
  457. },
  458. // 打开评论
  459. openMsg(item) {
  460. this.remarkData.news_id = item.news_id;
  461. this.msgData.news_id = item.news_id;
  462. this.remarkData.remark_id = 0;
  463. this.getMsg();
  464. },
  465. // 获取评论
  466. getMsg() {
  467. if (this.isAJAX) {
  468. return
  469. }
  470. this.isAJAX = true;
  471. getRemarkList({
  472. news_id: this.remarkData.news_id,
  473. remark_id: this.remarkData.remark_id,
  474. page: this.remarkData.page
  475. }).then((res) => {
  476. if (res.code === 1) {
  477. this.isAJAX = false;
  478. this.remarkData.list = [...this.remarkData.list, ...res.data.items];
  479. this.remarkData.total = res.data.total;
  480. this.remarkData.list.forEach((v) => {
  481. v.replyList = [];
  482. if (v.count > 0) {
  483. v.isOpen = true;
  484. }
  485. })
  486. this.$refs.popmsg.open();
  487. } else {
  488. this.isAJAX = false;
  489. tools.error(res.msg)
  490. }
  491. })
  492. },
  493. // 加载更多评论
  494. scrolltolowerList() {
  495. if (this.remarkData.list.length < this.remarkData.total) {
  496. this.remarkData.page += 1;
  497. this.getMsg();
  498. }
  499. },
  500. // 关闭评论
  501. closeMsg() {
  502. this.$refs.popmsg.close();
  503. this.remarkData.list = [];
  504. this.remarkData.page = 1;
  505. this.msgData.news_id = '';
  506. this.remarkData.remark_id = '';
  507. },
  508. openInput(type, item) {
  509. if (type == 0) {
  510. this.msgData.remark_id = 0;
  511. } else if (type == 1) {
  512. this.msgData.remark_id = item.id;
  513. this.msgData.reply_id = item.m_id;
  514. } else {
  515. this.msgData.remark_id = item.remark_id;
  516. this.msgData.reply_id = item.m_id;
  517. }
  518. this.isShowIpnut = true;
  519. },
  520. closeInput() {
  521. this.isShowIpnut = false;
  522. this.msgData.remark_id = '';
  523. this.msgData.content = '';
  524. this.msgData.reply_id = '';
  525. },
  526. save() {
  527. if (this.isAJAX) {
  528. return
  529. }
  530. this.isAJAX = true;
  531. setCreateRemark(this.msgData).then((res) => {
  532. if (res.code == 1) {
  533. tools.success('评论成功',1000)
  534. setTimeout(() => {
  535. this.isAJAX = false;
  536. this.closeInput()
  537. if (this.msgData.remark_id == 0) {
  538. this.remarkData.list = [];
  539. this.remarkData.page = 1;
  540. this.getMsg();
  541. this.list = [];
  542. this.fromData.page = 1;
  543. this.getList();
  544. } else {
  545. this.remarkData.list = [];
  546. this.remarkData.page = 1;
  547. this.getMsg();
  548. }
  549. }, 1500)
  550. } else {
  551. this.isAJAX = false;
  552. tools.error(res.msg)
  553. }
  554. })
  555. },
  556. delInfo(item) {
  557. if (this.isAJAX) {
  558. return
  559. }
  560. this.isAJAX = true;
  561. delRemark({
  562. remark_id: item.id
  563. }).then((res) => {
  564. if (res.code === 1) {
  565. tools.success('删除成功',1000)
  566. setTimeout(() => {
  567. this.isAJAX = false;
  568. this.remarkData.list = [];
  569. this.remarkData.page = 1;
  570. this.getMsg();
  571. this.list = [];
  572. this.fromData.page = 1;
  573. this.getList();
  574. }, 1500)
  575. } else {
  576. this.isAJAX = false;
  577. tools.error(res.msg)
  578. }
  579. })
  580. },
  581. // 添加贴子
  582. add() {
  583. uni.navigateTo({
  584. url: "/pages-school/add-circle"
  585. })
  586. },
  587. // 打开举报
  588. openRepot(item) {
  589. this.reportData.news_id = item.news_id;
  590. this.$refs.popup.open();
  591. },
  592. // 举报
  593. closePop(type) {
  594. if (type === 1) {
  595. this.reportData.news_id = '';
  596. this.reportData.content = '';
  597. this.$refs.popup.close();
  598. } else {
  599. if (this.isAJAX) {
  600. return
  601. }
  602. this.isAJAX = true;
  603. alumniReport(this.reportData).then((res) => {
  604. if (res.code === 1) {
  605. tools.success(res.msg,1000)
  606. setTimeout(() => {
  607. this.isAJAX = false;
  608. this.closePop(1);
  609. }, 1000)
  610. } else {
  611. tools.error(res.msg);
  612. this.isAJAX = false;;
  613. }
  614. })
  615. }
  616. },
  617. toDet(item) {
  618. uni.navigateTo({
  619. url: "/pages-school/circle-info?news_id=" + item.news_id
  620. })
  621. },
  622. },
  623. }
  624. </script>
  625. <style>
  626. body {
  627. background: linear-gradient(to bottom, #F5F4F9, #fff padding-bottom: env(safe-area-inset-bottom));
  628. }
  629. </style>
  630. <style scoped lang="scss">
  631. .card-2{
  632. word-wrap: break-word;
  633. }
  634. .navCustom {
  635. position: relative;
  636. width: 100%;
  637. }
  638. .nav-left {
  639. position: absolute;
  640. left: 0;
  641. }
  642. .nav-title {
  643. // position: absolute;
  644. // left: 50%;
  645. // top: 20rpx;
  646. }
  647. .label-box {
  648. padding: 0 12rpx;
  649. height: 38rpx;
  650. line-height: 38rpx;
  651. }
  652. .wz {
  653. width: 32rpx;
  654. height: 32rpx;
  655. }
  656. .input-box {
  657. width: 100%;
  658. height: 80rpx;
  659. background: #F2F2F2;
  660. border-radius: 200rpx;
  661. line-height: 80rpx;
  662. }
  663. .b-bottom {
  664. width: 100%;
  665. height: 88rpx;
  666. line-height: 88rpx;
  667. background: linear-gradient(105deg, #57CAFF 0%, #41ABF5 100%);
  668. border-radius: 200rpx;
  669. }
  670. .school-circle {
  671. // padding-left: 24rpx;
  672. // padding-right: 24rpx;
  673. position: relative;
  674. .pop-h-20 {
  675. height: 18vh !important;
  676. }
  677. .pop-h-30 {
  678. height: 30vh !important;
  679. }
  680. .pop-box {
  681. width: 100%;
  682. height: 60vh;
  683. background-color: #fff;
  684. border-radius: 24rpx 24rpx 0rpx 0rpx;
  685. display: flex;
  686. flex-direction: column;
  687. .item-box {
  688. width: 100%;
  689. height: 92rpx;
  690. border-radius: 200rpx;
  691. line-height: 92rpx;
  692. text-align: center;
  693. margin-bottom: 24rpx;
  694. }
  695. }
  696. .pop-msg {
  697. height: 80vh;
  698. position: relative;
  699. .pop-input {
  700. position: absolute;
  701. width: 100%;
  702. height: 80vh;
  703. background-color: #fff;
  704. bottom: 0;
  705. left: 0;
  706. border-top: 1rpx solid #ccc;
  707. border-radius: 20rpx 20rpx 0 0;
  708. display: flex;
  709. flex-direction: column;
  710. .save-box {
  711. text-align: center;
  712. line-height: 88rpx;
  713. font-weight: 600;
  714. font-size: 32rpx;
  715. color: #FFFFFF;
  716. width: 100%;
  717. height: 80rpx;
  718. border-radius: 200rpx;
  719. background: linear-gradient(105deg, #57CAFF 0%, #41ABF5 100%);
  720. }
  721. }
  722. .head-pop {
  723. padding-bottom: 34rpx !important;
  724. border-bottom: 1rpx solid #F2F2F2;
  725. }
  726. .list-box {
  727. .list-box-img {
  728. width: 80rpx;
  729. height: 80rpx;
  730. border-radius: 50%;
  731. margin-right: 16rpx;
  732. }
  733. .only-box {
  734. padding: 4rpx 16rpx;
  735. background: rgba(65, 171, 245, 0.1);
  736. border-radius: 8rpx 8rpx 8rpx 8rpx;
  737. }
  738. .msg-img {
  739. width: 144rpx;
  740. height: 144rpx;
  741. border-radius: 12rpx;
  742. margin-right: 5rpx;
  743. margin-bottom: 5rpx;
  744. }
  745. .msg-img:nth-child(3n) {
  746. margin-right: 0rpx;
  747. }
  748. .msg-img-1 {
  749. width: 100rpx !important;
  750. height: 100rpx !important;
  751. }
  752. }
  753. }
  754. .circle-add {
  755. width: 88rpx;
  756. height: 88rpx;
  757. position: absolute;
  758. right: 32rpx;
  759. bottom: 20vh;
  760. z-index: 2;
  761. }
  762. .w-400 {
  763. width: 400rpx;
  764. }
  765. .bg-box {
  766. width: 100%;
  767. height: 260rpx;
  768. filter: blur(80rpx);
  769. background: linear-gradient(to right, #E1F2FD, #E0F3FA, #DBF8EF);
  770. position: absolute;
  771. top: 0;
  772. left: 0;
  773. z-index: -1;
  774. }
  775. .ts-box {
  776. width: 100%;
  777. height: 72rpx;
  778. background: linear-gradient(180deg, #FFDBD0 -50%, #FFFFFF 100%);
  779. border-radius: 16rpx;
  780. image {
  781. width: 44rpx;
  782. height: 44rpx;
  783. margin-right: 8rpx;
  784. }
  785. }
  786. .nav-box {
  787. width: 100%;
  788. overflow-x: scroll;
  789. .h130 {
  790. height: 130rpx !important;
  791. }
  792. .nav-item {
  793. margin-right: 12rpx;
  794. width: 144rpx;
  795. height: 114rpx;
  796. text-align: center;
  797. border-radius: 20rpx;
  798. position: relative;
  799. .nav-icon {
  800. width: 64rpx;
  801. height: 64rpx;
  802. margin: 12rpx auto 0 auto;
  803. }
  804. .nav-bg {
  805. width: 144rpx;
  806. height: 130rpx;
  807. position: absolute;
  808. top: 0;
  809. left: 0;
  810. z-index: -1;
  811. }
  812. }
  813. }
  814. .type-box {
  815. .box-s {
  816. height: 50rpx;
  817. line-height: 50rpx;
  818. font-weight: 600 !important;
  819. color: #41ABF5;
  820. background: #E0F1FF !important;
  821. box-sizing: border-box;
  822. border: 1rpx solid #70C0F8;
  823. }
  824. .box-1 {
  825. padding: 0 32rpx;
  826. height: 50rpx;
  827. line-height: 50rpx;
  828. margin-right: 20rpx;
  829. background-color: #fff;
  830. border-radius: 12rpx;
  831. font-size: 24rpx;
  832. font-weight: 400;
  833. box-sizing: border-box;
  834. }
  835. .box-2 {
  836. width: 168rpx;
  837. height: 50rpx;
  838. line-height: 50rpx;
  839. text-align: center;
  840. border-radius: 12rpx 12rpx 12rpx 12rpx;
  841. border: 1rpx solid #41ABF5;
  842. box-sizing: border-box;
  843. }
  844. }
  845. .card-box {
  846. width: 100%;
  847. min-height: 100rpx;
  848. border-radius: 20rpx;
  849. margin-bottom: 20rpx;
  850. .card-head {
  851. width: 80rpx;
  852. height: 80rpx;
  853. border-radius: 50%;
  854. margin-right: 16rpx;
  855. }
  856. // .dian-img {
  857. // width: 30rpx;
  858. // height: 6rpx;
  859. // margin-bottom: 24rpx;
  860. // margin-left: auto;
  861. // }
  862. .hot-img {
  863. width: 40rpx;
  864. height: 40rpx;
  865. margin-left: auto;
  866. }
  867. .card-3 {
  868. .card-3-img {
  869. width: 182rpx;
  870. height: 182rpx;
  871. border-radius: 12rpx;
  872. margin-right: 6rpx;
  873. margin-bottom: 6rpx;
  874. }
  875. .card-3-img:nth-child(3n) {
  876. margin-right: 0rpx;
  877. }
  878. }
  879. .card-4 {
  880. view {
  881. padding: 4rpx 16rpx;
  882. background: #F2F2F2;
  883. border-radius: 200rpx;
  884. font-size: 24rpx;
  885. color: #999;
  886. margin-right: 20rpx;
  887. margin-bottom: 10rpx;
  888. }
  889. }
  890. .card-5 {
  891. .info-img {
  892. width: 40rpx;
  893. height: 40rpx;
  894. margin-right: 8rpx;
  895. }
  896. .dian-img {
  897. width: 30rpx;
  898. height: 6rpx;
  899. }
  900. }
  901. }
  902. }
  903. </style>