吉光研途前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

541 lines
13 KiB

  1. <template>
  2. <view class="page__view">
  3. <!-- 导航栏 -->
  4. <navbar :title="title" leftClick @leftClick="$utils.navigateBack" bgColor="#4883F9" color="#FFFFFF" />
  5. <!-- 轮播图 -->
  6. <view class="swiper">
  7. <uv-swiper :list="bannerList" keyName="image" :autoplay="bannerList.length" :indicator="bannerList.length" indicatorMode="dot" indicatorActiveColor="#4883F9" indicatorInactiveColor="#FFFFFF" height="424rpx"></uv-swiper>
  8. </view>
  9. <!-- 发表全流程辅导 -->
  10. <view class="section">
  11. <view class="section-header">发表全流程辅导</view>
  12. <view class="section-content paragraph process">
  13. <view class="paragraph">
  14. <view class="flex difficulty">
  15. <view>难度</view>
  16. <uv-rate :value="process.difficulty" size="28rpx" activeColor="#4883F9" :allowHalf="true" :minCount="0.5" readonly></uv-rate>
  17. </view>
  18. <view>{{ process.content }}</view>
  19. </view>
  20. </view>
  21. </view>
  22. <!-- 可发表方向 -->
  23. <view class="section">
  24. <view class="section-header">
  25. <view class="section-header-line"></view>
  26. <view>可发表方向</view>
  27. </view>
  28. <view class="section-content direction">
  29. <view class="table">
  30. <view class="table-row" v-for="row in direction" :key="row.id">
  31. <view class="table-cell">{{ row.title }}</view>
  32. <view class="table-cell">{{ row.desc }}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 师资介绍 -->
  38. <view class="section">
  39. <view class="section-header">
  40. <view class="section-header-line"></view>
  41. <view>师资介绍</view>
  42. </view>
  43. <view class="section-content teachers">
  44. <view class="card" v-for="item in teachers" :key="item.id">
  45. <view class="info">
  46. <view class="title">
  47. <view class="name">{{ item.name }}</view>
  48. <view class="label">
  49. <view class="label-text">{{ item.label }}</view>
  50. <view class="label-line"></view>
  51. </view>
  52. </view>
  53. <view class="tag">
  54. <image class="tag-icon" src="@/static/image/icon-degree.png" mode="widthFix"></image>
  55. <vie>{{ item.degree }}</vie>
  56. </view>
  57. <view class="desc">
  58. <view>专业经历</view>
  59. <view>{{ item.experience }}</view>
  60. </view>
  61. </view>
  62. <view class="pic">
  63. <image class="img" :src="item.image" mode="aspectFill"></image>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 课程安排 -->
  69. <view class="section">
  70. <view class="section-header">
  71. <view class="section-header-line"></view>
  72. <view>课程安排</view>
  73. </view>
  74. <view class="section-content">
  75. <view class="table">
  76. <view class="table-row" v-for="row in course" :key="row.id">
  77. <view class="table-cell">
  78. <view>{{ row.title }}</view>
  79. <view>{{ `(共${row.length}课时)` }}</view>
  80. </view>
  81. <view class="table-cell">{{ row.desc }}</view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. <!-- 适用人群 -->
  87. <view class="section">
  88. <view class="section-header">
  89. <view class="section-header-line"></view>
  90. <view>适用人群</view>
  91. </view>
  92. <view class="section-content target-audience">
  93. <view class="paragraph">
  94. {{ targetAudience }}
  95. </view>
  96. </view>
  97. </view>
  98. <!-- 期刊推荐 -->
  99. <view class="section">
  100. <view class="section-header">
  101. <view class="section-header-line"></view>
  102. <view>期刊推荐</view>
  103. </view>
  104. <view class="section-content journal">
  105. <view class="box" v-for="item in journal" :key="item.id">
  106. <view class="card">
  107. <view class="top">
  108. <view class="pic">
  109. <image class="img" :src="item.image" mode="aspectFill"></image>
  110. </view>
  111. <view class="info">
  112. <view class="name">{{ item.name }}</view>
  113. <view class="desc">{{ item.desc }}</view>
  114. </view>
  115. </view>
  116. <view class="main">
  117. {{ item.intro }}
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. <!-- 附加材料 -->
  124. <view class="section">
  125. <view class="section-header">
  126. <view class="section-header-line"></view>
  127. <view>附加材料</view>
  128. </view>
  129. <view class="section-content attachment">
  130. <view class="flex file" v-for="item in attachment" :key="item.id">
  131. <view class="file-info">
  132. <template v-if="item.type == 'pdf'">
  133. <image class="file-icon" src="@/static/image/icon-pdf.png" mode="widthFix"></image>
  134. </template>
  135. <template v-else>
  136. <image class="file-icon" src="@/static/image/icon-word.png" mode="widthFix"></image>
  137. </template>
  138. <view class="file-detail">
  139. <view class="title">{{ item.name }}</view>
  140. <view class="desc">{{ `${item.type} ${item.size}MB` }}</view>
  141. </view>
  142. </view>
  143. <button class="btn" @click="downloadFile(item.url)">下载</button>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </template>
  149. <script>
  150. export default {
  151. data() {
  152. return {
  153. title: '',
  154. bannerList: [],
  155. process: {},
  156. direction: [],
  157. teachers: [],
  158. course: [],
  159. targetAudience: '',
  160. journal: [],
  161. attachment: [],
  162. }
  163. },
  164. onLoad({ thesisId }) {
  165. this.getData(thesisId)
  166. },
  167. methods: {
  168. async getData(thesisId) {
  169. try {
  170. // todo
  171. await this.$fetch('queryThesisById', { thesisId })
  172. } catch (err) {
  173. }
  174. },
  175. downloadFile(url) {
  176. console.log('downloadFile', url)
  177. uni.downloadFile({
  178. url, // 文件地址
  179. success: (downloadRes) => {
  180. console.log('downloadRes', downloadRes)
  181. if (downloadRes.statusCode === 200) {
  182. uni.openDocument({
  183. showMenu: true,
  184. filePath: downloadRes.tempFilePath,
  185. success: () => console.log('打开成功')
  186. });
  187. } else {
  188. uni.showToast({ title: '下载失败', icon: 'none' });
  189. }
  190. },
  191. fail: (err) => {
  192. uni.showToast({ title: '网络异常', icon: 'none' });
  193. }
  194. });
  195. },
  196. },
  197. }
  198. </script>
  199. <style scoped lang="scss">
  200. .page__view {
  201. padding-bottom: 62rpx;
  202. background: #FFFFFF;
  203. }
  204. .swiper {
  205. margin: 20rpx 18rpx 32rpx 18rpx;
  206. /deep/ .uv-swiper-indicator__wrapper__dot {
  207. width: 15rpx;
  208. height: 15rpx;
  209. }
  210. /deep/ .uv-swiper-indicator__wrapper__dot--active {
  211. width: 15rpx;
  212. }
  213. }
  214. .section {
  215. width: 100%;
  216. padding: 0 18rpx;
  217. box-sizing: border-box;
  218. & + & {
  219. margin-top: 40rpx;
  220. }
  221. &-header {
  222. display: flex;
  223. align-items: center;
  224. justify-content: flex-start;
  225. column-gap: 15rpx;
  226. padding-left: 18rpx;
  227. font-size: 32rpx;
  228. font-weight: 700;
  229. color: #000000;
  230. &-line {
  231. width: 11rpx;
  232. height: 45rpx;
  233. border-radius: 6rpx;
  234. background-image: linear-gradient(#FFFFFF, #4883F9);
  235. }
  236. }
  237. &-content {
  238. margin-top: 37rpx;
  239. .paragraph {
  240. width: 100%;
  241. padding: 22rpx;
  242. box-sizing: border-box;
  243. white-space: pre-line;
  244. font-size: 28rpx;
  245. color: #000000;
  246. background: #F8F8F8;
  247. border-radius: 15rpx;
  248. }
  249. .table {
  250. width: 100%;
  251. border-radius: 15rpx;
  252. overflow: hidden;
  253. &-row {
  254. display: grid;
  255. grid-template-columns: 218rpx auto;
  256. background: #EEEEEE;
  257. &:nth-child(2n) {
  258. background: #DEDEDE;
  259. }
  260. }
  261. &-cell {
  262. display: inline-flex;
  263. flex-direction: column;
  264. align-items: flex-start;
  265. justify-content: center;
  266. padding: 17rpx;
  267. box-sizing: border-box;
  268. font-family: PingFang SC;
  269. font-weight: 400;
  270. font-size: 28rpx;
  271. color: #080808;
  272. &:first-child {
  273. border-right: 1rpx solid #E5E5E5;
  274. }
  275. }
  276. }
  277. &.process {
  278. margin-top: 24rpx;
  279. .difficulty {
  280. justify-content: flex-start;
  281. }
  282. }
  283. &.teachers {
  284. .card {
  285. display: flex;
  286. align-items: center;
  287. column-gap: 12rpx;
  288. background: #ffffff;
  289. border-radius: 15rpx;
  290. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  291. .info {
  292. flex: 1;
  293. padding: 19rpx 0 28rpx 17rpx;
  294. .title {
  295. display: flex;
  296. align-items: center;
  297. padding-left: 11rpx;
  298. color: #000000;
  299. .name {
  300. font-size: 32rpx;
  301. font-weight: 700;
  302. }
  303. .label {
  304. margin-left: 12rpx;
  305. position: relative;
  306. height: 30rpx;
  307. &-line {
  308. margin: 24rpx 0 0 25rpx;
  309. width: 195rpx;
  310. height: 4rpx;
  311. background-image: linear-gradient(#4883F9, #FFFFFF);
  312. border-radius: 2rpx;
  313. }
  314. &-text {
  315. position: absolute;
  316. top: 0;
  317. left: 0;
  318. font-size: 22rpx;
  319. font-weight: 400;
  320. }
  321. }
  322. }
  323. .tag {
  324. margin: 5rpx 0 18rpx 0;
  325. display: inline-flex;
  326. align-items: center;
  327. padding: 5rpx 43rpx 5rpx 16rpx;
  328. column-gap: 16rpx;
  329. font-size: 28rpx;
  330. color: #FFFFFF;
  331. background: rgba(72,131,249,0.58);
  332. border-radius: 30rpx 0rpx 30rpx 0rpx;
  333. &-icon {
  334. width: 38rpx;
  335. height: auto;
  336. }
  337. }
  338. .desc {
  339. padding: 12rpx 15rpx;
  340. font-size: 28rpx;
  341. font-weight: 500;
  342. color: #000000;
  343. background: #f8f8f8;
  344. border-radius: 16rpx;
  345. }
  346. }
  347. .pic {
  348. padding: 48rpx 9rpx 48rpx 0;
  349. width: 253rpx;
  350. height: 345rpx;
  351. border-radius: 127rpx;
  352. overflow: hidden;
  353. .img {
  354. width: 100%;
  355. height: 100%;
  356. }
  357. }
  358. &:nth-child(2n) {
  359. flex-direction: row-reverse;
  360. .info {
  361. padding: 19rpx 17rpx 28rpx 0;
  362. }
  363. .pic {
  364. padding: 48rpx 0 48rpx 9rpx;
  365. }
  366. }
  367. }
  368. .card + .card {
  369. margin-top: 24rpx;
  370. }
  371. }
  372. &.journal {
  373. .box {
  374. padding-top: 73rpx;
  375. .card {
  376. padding: 29rpx 12rpx 19rpx 12rpx;
  377. background: #f6f6f6;
  378. border-radius: 15rpx;
  379. box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
  380. .top {
  381. position: relative;
  382. .pic {
  383. position: absolute;
  384. left: 42rpx;
  385. bottom: 0;
  386. width: 213rpx;
  387. height: 285rpx;
  388. .img {
  389. width: 100%;
  390. height: 100%;
  391. }
  392. }
  393. .info {
  394. height: 181rpx;
  395. padding: 0 14rpx 0 266rpx;
  396. }
  397. }
  398. .main {
  399. margin-top: 18rpx;
  400. padding: 14rpx;
  401. font-size: 28rpx;
  402. color: #000000;
  403. background: #ebebeb;
  404. border-radius: 30rpx 0rpx 30rpx 0rpx;
  405. }
  406. }
  407. &:nth-child(2n) {
  408. .card {
  409. .top {
  410. .info {
  411. padding: 0 258rpx 0 14rpx;
  412. }
  413. .pic {
  414. left: unset;
  415. right: 29rpx;
  416. }
  417. }
  418. }
  419. }
  420. }
  421. .box + .box {
  422. margin-top: 28rpx;
  423. }
  424. }
  425. &.attachment {
  426. .file {
  427. justify-content: space-between;
  428. padding: 32rpx 15rpx 32rpx 26rpx;
  429. background: #f8f8f8;
  430. border-radius: 15rpx;
  431. &-info {
  432. display: flex;
  433. align-items: flex-end;
  434. }
  435. &-icon {
  436. width: 64rpx;
  437. height: auto;
  438. }
  439. &-detail {
  440. margin-left: 14rpx;
  441. .title {
  442. font-size: 30rpx;
  443. color: #000000;
  444. }
  445. .desc {
  446. font-size: 28rpx;
  447. color: #999999;
  448. }
  449. }
  450. .btn {
  451. padding: 7rpx 30rpx;
  452. font-size: 28rpx;
  453. color: #FFFFFF;
  454. background: #4883f9;
  455. border-radius: 27rpx;
  456. }
  457. }
  458. .file + .file {
  459. margin-top: 21rpx;
  460. }
  461. }
  462. }
  463. }
  464. </style>