works.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. <template>
  2. <view class="details" v-if="opusInfo">
  3. <!-- 头部图片 -->
  4. <swiper
  5. class="swiper"
  6. indicator-dots="true"
  7. autoplay="true"
  8. interval="5000"
  9. duration="1500"
  10. circular="true"
  11. >
  12. <swiper-item v-if="opusInfo.opus_type == 1">
  13. <video :src="opusInfo.media_address" style="width: 100%"></video>
  14. </swiper-item>
  15. <swiper-item v-for="(item, index) in imglist" :key="index">
  16. <image :src="item" mode="aspectFill" style="width: 100%"></image>
  17. </swiper-item>
  18. </swiper>
  19. <!-- <view class="top-image">
  20. <image src="@/static/delImg/banenr.png" mode=""></image>
  21. </view> -->
  22. <view class="title">
  23. {{ opusInfo.title }}
  24. </view>
  25. <!-- 标题 -->
  26. <view class="three-even">
  27. <view class="item">
  28. <view class="good">
  29. <image src="@/static/good.png" mode=""></image>
  30. <view class="num">
  31. {{ opusInfo.like_num }}
  32. </view>
  33. </view>
  34. <view class="message" >
  35. <image src="@/static/message.png" mode=""></image>
  36. <view class="num">
  37. {{ opusInfo.comment_sum }}
  38. </view>
  39. </view>
  40. <view class="link">
  41. <image src="@/static/link.png" mode=""></image>
  42. <view class="num">
  43. {{ opusInfo.share_sum }}
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 个人信息 -->
  49. <view class="personal">
  50. <view class="item">
  51. <image :src="opusInfo.head_photo" mode=""></image>
  52. <view class="name-time">
  53. <view class="name">
  54. {{ opusInfo.nickname }}
  55. </view>
  56. <view class="time">
  57. {{ opusInfo.create_time }}
  58. </view>
  59. </view>
  60. <view class="follow-button"> +关注 </view>
  61. </view>
  62. </view>
  63. <!-- 简介 -->
  64. <view class="introduce">
  65. <view class="top">
  66. <view class="simple">
  67. <view class="line"> </view>
  68. <view class="item"> 简介 </view>
  69. </view>
  70. <view class="simple-content">
  71. {{ opusInfo.content }}
  72. </view>
  73. </view>
  74. </view>
  75. <view class="bottom-btn u-bg-fff">
  76. <view class="pt-pb30 u-plr30 u-flex-center-sb">
  77. <view class="u-flex-center">
  78. <button class="buy-btn u-DCCDA4 u-font30" @click="open(0)">
  79. 查看更多
  80. </button> <button class="buy-btn u-DCCDA4 u-font30" @click="open(1)">
  81. 下载App
  82. </button>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. export default {
  90. data() {
  91. return {
  92. config: {
  93. back: true, //false是tolbar页面 是则不写
  94. title: "文章详情",
  95. color: "#fff",
  96. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  97. backgroundColor: [1, "#00321E"],
  98. statusBarFontColor: "#ffffff",
  99. },
  100. opusInfo: null,
  101. goodIndex: 2,
  102. imglist: [],
  103. content: null,
  104. };
  105. },
  106. props: {
  107. options: {
  108. type: Object,
  109. default: null,
  110. },
  111. },
  112. watch: {
  113. options(n) {
  114. this.options = n;
  115. this.getDetail(this.options.id);
  116. },
  117. },
  118. created() {
  119. this.getDetail(this.options.id);
  120. },
  121. methods: {
  122. getDetail(id) {
  123. this.$http.get("/opus/info/" + id).then((res) => {
  124. if (res && res.code == 200) {
  125. this.opusInfo = res.data;
  126. this.imglist = res.data.images.split(",");
  127. }
  128. });
  129. },
  130. open(){
  131. if(number==0){
  132. window.location.href =
  133. "lida://&pageType=3&type=" + this.type + "&id=" + this.opusInfo.id+"&shareId="+this.options.shareId;
  134. }else{
  135. //'lida://;
  136. uni.navigateTo({
  137. url:"/pages/down"
  138. })
  139. }
  140. },
  141. },
  142. };
  143. </script>
  144. <style lang="scss" scoped>
  145. .bottom-btn .buy-btn{
  146. width: 340px;
  147. height: 42px;
  148. line-height: 42px;
  149. background: #00321e;
  150. border-radius: 21px;
  151. }
  152. .show-bottom {
  153. background-color: #ffffff;
  154. border-radius: 50rpx 50rpx 0 0;
  155. padding: 37rpx 30rpx 22rpx 30rpx;
  156. .input {
  157. .texterea-item {
  158. background-color: #fafafa;
  159. padding: 22rpx 20rpx;
  160. border-radius: 21rpx;
  161. margin: 22rpx 29rpx 4rpx 30rpx;
  162. }
  163. }
  164. .top {
  165. display: flex;
  166. align-items: center;
  167. .line {
  168. width: 6rpx;
  169. height: 26rpx;
  170. background-color: #00321e;
  171. border-radius: 3rpx;
  172. }
  173. .item {
  174. font-size: 36rpx;
  175. color: #1a1a1a;
  176. font-weight: 700;
  177. margin-left: 14rpx;
  178. flex: 1;
  179. }
  180. .deter-mine {
  181. font-size: 30rpx;
  182. font-weight: 500;
  183. color: #1a1a1a;
  184. }
  185. }
  186. }
  187. .stay-msg {
  188. .title-top {
  189. font-size: 36rpx;
  190. font-weight: 700;
  191. color: #1a1a1a;
  192. padding: 28rpx 0 31rpx 32rpx;
  193. }
  194. .character {
  195. display: flex;
  196. margin-bottom: 40rpx;
  197. .image {
  198. margin-left: 32rpx;
  199. margin-right: 18rpx;
  200. image {
  201. width: 83rpx;
  202. height: 83rpx;
  203. }
  204. }
  205. .item {
  206. .top {
  207. font-size: 28rpx;
  208. font-weight: 400;
  209. color: #1a1a1a;
  210. }
  211. .time {
  212. font-size: 24rpx;
  213. color: #999999;
  214. font-weight: 500;
  215. }
  216. }
  217. }
  218. .character:nth-child(odd) {
  219. .content {
  220. font-size: 28rpx;
  221. font-weight: 500;
  222. color: #1a1a1a;
  223. margin-top: 15rpx;
  224. }
  225. }
  226. .character:nth-child(even) {
  227. .content {
  228. font-size: 28rpx;
  229. font-weight: 500;
  230. color: #999999;
  231. margin-top: 15rpx;
  232. }
  233. }
  234. }
  235. .recommend {
  236. width: 750rpx;
  237. padding-bottom: 40rpx;
  238. border-bottom: 10rpx solid #f5f5f5;
  239. .recommend-item {
  240. width: 720rpx;
  241. margin: 0 auto;
  242. .see-more {
  243. display: flex;
  244. justify-content: center;
  245. align-items: center;
  246. font-size: 22rpx;
  247. color: #999999;
  248. font-weight: 400;
  249. .linge {
  250. margin-left: 9rpx;
  251. }
  252. }
  253. }
  254. .componen-titem {
  255. margin: 0 auto;
  256. display: flex;
  257. padding: 30rpx 39rpx;
  258. .img {
  259. image {
  260. width: 139rpx;
  261. height: 139rpx;
  262. }
  263. }
  264. .item {
  265. margin-left: 19rpx;
  266. padding-right: 39rpx;
  267. width: 100%;
  268. .item-title {
  269. color: #1a1a1a;
  270. font-size: 24rpx;
  271. overflow: hidden;
  272. text-overflow: ellipsis;
  273. display: -webkit-box;
  274. -webkit-line-clamp: 2;
  275. -webkit-box-orient: vertical;
  276. word-wrap: break-word;
  277. word-break: break-all;
  278. white-space: normal !important;
  279. }
  280. .num {
  281. margin-top: 18rpx;
  282. display: flex;
  283. justify-content: space-between;
  284. width: 100%;
  285. .num-color {
  286. color: #ff0000;
  287. .large {
  288. font-size: 38rpx;
  289. font-weight: 700;
  290. }
  291. .small {
  292. font-size: 20rpx;
  293. font-weight: Regular;
  294. }
  295. }
  296. }
  297. .button {
  298. padding: 12rpx 35rpx 11rpx 35rpx;
  299. background-color: #00321e;
  300. border-radius: 32rpx;
  301. color: #d5c49b;
  302. font-size: 28rpx;
  303. font-weight: 500;
  304. }
  305. }
  306. }
  307. }
  308. .introduce {
  309. padding: 40rpx 19rpx 40rpx 30rpx;
  310. border-bottom: 8rpx solid #f5f5f5;
  311. .practice {
  312. margin-top: 34rpx;
  313. .practice-item {
  314. display: flex;
  315. align-items: center;
  316. .simple {
  317. width: 6rpx;
  318. height: 26rpx;
  319. background: #00321e;
  320. border-radius: 3rpx;
  321. }
  322. .practice-details {
  323. font-size: 28rpx;
  324. font-weight: 700;
  325. color: #1a1a1a;
  326. margin-left: 16rpx;
  327. }
  328. }
  329. .introduction-details {
  330. margin-top: 19rpx;
  331. font-size: 24rpx;
  332. color: #666666;
  333. font-weight: 500;
  334. text-align: left;
  335. .item {
  336. font-size: 24rpx;
  337. color: #666666;
  338. }
  339. }
  340. }
  341. .middle {
  342. margin-top: 34rpx;
  343. .middle-item {
  344. display: flex;
  345. align-items: center;
  346. .simple {
  347. width: 6rpx;
  348. height: 26rpx;
  349. background-color: #00321e;
  350. border-radius: 3rpx;
  351. }
  352. .material {
  353. font-size: 28rpx;
  354. font-weight: 700;
  355. color: #1a1a1a;
  356. margin-left: 16rpx;
  357. }
  358. }
  359. .item-block {
  360. margin-top: 19rpx;
  361. font-size: 24rpx;
  362. font-weight: 400;
  363. color: #666;
  364. line-height: 38rpx;
  365. }
  366. }
  367. .top {
  368. .simple-content {
  369. color: #666666;
  370. font-weight: 400;
  371. font-size: 24rpx;
  372. margin-top: 19rpx;
  373. }
  374. .simple {
  375. display: flex;
  376. align-items: center;
  377. .line {
  378. width: 6rpx;
  379. height: 26rpx;
  380. line-height: 26rpx;
  381. background-color: #00321e;
  382. border-radius: 3rpx;
  383. }
  384. .item {
  385. margin-left: 16rpx;
  386. font-size: 28rpx;
  387. font-weight: 700;
  388. color: #1a1a1a;
  389. }
  390. }
  391. }
  392. }
  393. .personal {
  394. border-bottom: 8rpx solid #f5f5f5;
  395. .item {
  396. display: flex;
  397. margin: 28rpx 30rpx 40rpx 30rpx;
  398. .follow-button {
  399. margin-top: 12rpx;
  400. color: #00321e;
  401. font-size: 28rpx;
  402. font-weight: 400;
  403. padding: 10rpx 26rpx;
  404. background-color: rgba(218, 198, 161, 1);
  405. border-radius: 18rpx;
  406. height: 40rpx;
  407. line-height: 40rpx;
  408. }
  409. .name-time {
  410. margin-left: 18rpx;
  411. flex: 1;
  412. .name {
  413. font-size: 28rpx;
  414. line-height: 40rpx;
  415. color: #1a1a1a;
  416. font-weight: 400;
  417. opacity: 1;
  418. letter-spacing: -1rpx;
  419. margin-bottom: 10rpx;
  420. }
  421. .time {
  422. font-size: 24rpx;
  423. font-weight: 500;
  424. line-height: 33rpx;
  425. color: #999999;
  426. opacity: 1;
  427. }
  428. }
  429. image {
  430. width: 83rpx;
  431. height: 83rpx;
  432. }
  433. }
  434. }
  435. .three-even {
  436. margin: 0 auto;
  437. .item {
  438. display: flex;
  439. width: 690rpx;
  440. margin: 0 30rpx;
  441. padding-bottom: 45rpx;
  442. border-bottom: 1rpx solid #e6e6e6;
  443. .link {
  444. display: flex;
  445. image {
  446. width: 39rpx;
  447. height: 37rpx;
  448. margin-left: 44rpx;
  449. }
  450. .num {
  451. margin-left: 11rpx;
  452. color: #999;
  453. }
  454. }
  455. .message {
  456. display: flex;
  457. image {
  458. margin-left: 44rpx;
  459. width: 38rpx;
  460. height: 30rpx;
  461. }
  462. .num {
  463. margin-left: 11rpx;
  464. font-size: 24rpx;
  465. color: #999999;
  466. font-weight: 500;
  467. }
  468. }
  469. .good {
  470. display: flex;
  471. image {
  472. width: 37rpx;
  473. height: 37rpx;
  474. }
  475. .num {
  476. margin-left: 17rpx;
  477. font-size: 24rpx;
  478. color: #999999;
  479. font-weight: 500;
  480. }
  481. }
  482. }
  483. }
  484. .title {
  485. margin: 33rpx 36rpx 18rpx 10rpx;
  486. padding-left: 16rpx;
  487. font-size: 32rpx;
  488. font-weight: 700;
  489. color: #1a1a1a;
  490. }
  491. .top-image {
  492. width: 750rpx;
  493. height: 584rpx;
  494. image {
  495. width: 750rpx;
  496. height: 584rpx;
  497. }
  498. }
  499. </style>