智慧画屏客户端
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.

388 lines
7.3 KiB

3 years ago
  1. <template>
  2. <view class="content">
  3. <!-- 列表 -->
  4. <view class="artic">
  5. <view class="justy">
  6. <view class="rdlist" v-for="(item,ind) in readlists" :key="ind"
  7. @click="togglePopup(item, 'image')">
  8. <view class="justy-type">
  9. <view class="rdlist-img">
  10. <image :src="item.localCover"
  11. mode="scaleToFill" class="listimg"></image>
  12. </view>
  13. <view class="rdlist-name">{{item.name}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <!-- 插屏弹窗 -->
  19. <uni-popup ref="image" :custom="true" :mask-click="true" >
  20. <view class="tc-image">
  21. <view class="x">
  22. <image class="background" src="../../static/img/yuewen_03.png" mode="" />
  23. <view class="tcartic">
  24. <view class="tctitle">人工智能的终极探索</view>
  25. <view class="container">
  26. <view class="" v-if="ifShow" >
  27. <view class="qrimg-i">
  28. <tki-qrcode
  29. ref="qrcode"
  30. :val="val"
  31. :size="size"
  32. :unit="unit"
  33. :background="background"
  34. :foreground="foreground"
  35. :pdground="pdground"
  36. :icon="icon"
  37. :iconSize="iconsize"
  38. :lv="lv"
  39. :onval="onval"
  40. :loadMake="loadMake"
  41. :usingComponents="true"
  42. @result="qrR" />
  43. </view>
  44. </view>
  45. <view class="saoma">扫码免费阅读本文</view>
  46. </view>
  47. <view class="tcfoot">
  48. <view class="ewm">
  49. <view class="ewmimg">
  50. <image :src="listcont.localCover" mode="" class="ewmimage"></image>
  51. </view>
  52. <view class="cpgroup">
  53. <view class="cptit">标题{{listcont.name}}</view>
  54. <view class="cpauter">作者{{listcont.creator}}</view>
  55. </view>
  56. </view>
  57. <view class="tcjj">{{listcont.desc}}</view>
  58. <view class="out" @click="cancel('image')" >
  59. <image src="../../static/img/yuewen_06.png" class="outto"></image>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </uni-popup>
  66. </view>
  67. </template>
  68. <script>
  69. import {LocalData, getStorage,serialNum} from '@/utils/global.js'
  70. import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue'
  71. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  72. import uniPagination from '@/components/uni-pagination/uni-pagination.vue'
  73. export default {
  74. components: {
  75. uniPagination,
  76. uniPopup,
  77. tkiQrcode
  78. },
  79. props:{
  80. readlists: {
  81. type: Array,
  82. default: () => {
  83. return []
  84. }
  85. }
  86. },
  87. data() {
  88. return {
  89. // 弹窗
  90. ifShow: true,
  91. val: '', // 要生成的二维码值
  92. size: 125, // 二维码大小
  93. unit: 'upx', // 单位
  94. background: '#ffffff', // 背景色
  95. foreground: '#000000', // 前景色
  96. pdground: '#000000', // 角标色
  97. icon: '', // 二维码图标
  98. iconsize: 40, // 二维码图标大小
  99. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  100. onval: false, // val值变化时自动重新生成二维码
  101. loadMake: false, // 组件加载完成后自动生成二维码
  102. src: '' ,// 二维码生成后的图片地址或base64
  103. listcont:'' //简介
  104. }
  105. },
  106. methods: {
  107. qrR(res) {
  108. this.src = res
  109. // console.log(res)
  110. },
  111. togglePopup(item,open) {
  112. console.log(item)
  113. this.listcont=item
  114. this.ifShow = false
  115. this.loadMake = false
  116. this.$refs[open].open()
  117. let that=this
  118. this.$nextTick(function(){
  119. that.ifShow = true
  120. that.loadMake = true
  121. })
  122. let h5ReaderUrl=uni.getStorageSync('h5ReaderUrl')
  123. this.val=h5ReaderUrl+"?name=read&sn="+serialNum+"&id="+item.resourceId
  124. console.log("196-",this.val)
  125. },
  126. cancel(type) {
  127. this.$refs[type].close()
  128. },
  129. },
  130. onLoad(e) {
  131. getStorage()
  132. this.togglePopup(this.readlists, 'image')
  133. }
  134. }
  135. </script>
  136. <style>
  137. .content {
  138. display: flex;
  139. flex-direction: column;
  140. justify-content: flex-start;
  141. width: 100%;
  142. /* height: 1335upx; */
  143. background: rgb(0,21,52);
  144. color: white;
  145. }
  146. .unihead-title{
  147. width: 100%;
  148. height: 120upx;
  149. display: flex;
  150. justify-content: space-between;
  151. box-sizing: border-box;
  152. padding: 34upx 8%;
  153. }
  154. .title{
  155. width: 50%;
  156. margin-top: 13upx;
  157. font-size: 34upx;
  158. font-weight: 600;
  159. }
  160. .unihead-right{
  161. display: flex;
  162. justify-content: space-between;
  163. }
  164. .icon-item{
  165. width: 11%;
  166. min-width: 102upx;
  167. display: flex;
  168. justify-content: flex-end;
  169. }
  170. .help{
  171. margin-left: 10upx;
  172. line-height: 90upx;
  173. font-size: 0.5rem;
  174. }
  175. .iconhelp{
  176. margin-top: 30upx;
  177. width: 28upx;
  178. height: 28upx;
  179. }
  180. .helps{
  181. background: url(../../static/img/help.png) no-repeat;
  182. background-size: 100%;
  183. }
  184. .home{
  185. background: url(../../static/img/home.png) no-repeat;
  186. background-size: 100%;
  187. }
  188. .back{
  189. background: url(../../static/img/back.png) no-repeat;
  190. background-size: 100%;
  191. }
  192. .artic{
  193. width: 100%;
  194. margin: 0 auto;
  195. height: 1015upx;
  196. margin-top: 10upx;
  197. }
  198. .justy{
  199. width: 100%;
  200. box-sizing: border-box;
  201. padding: 0 6%;
  202. margin-top: 20upx;
  203. display: flex;
  204. flex-flow: row wrap;
  205. justify-content: flex-start;
  206. }
  207. .justy-type{
  208. width: 83%;
  209. height: 100%;
  210. display: flex;
  211. flex-direction: column;
  212. justify-content: center;
  213. align-items: center;
  214. box-sizing: border-box;
  215. padding: 6upx 0;
  216. background: url(../../static/img/yuewen2_03.png) no-repeat;
  217. background-size:100% 100%;
  218. }
  219. .rdlist{
  220. width: 25%;
  221. height: 176upx;
  222. display: flex;
  223. justify-content: center;
  224. align-items: center;
  225. margin-bottom: 28upx;
  226. /* background-color: red; */
  227. }
  228. .rdlist-img{
  229. width: 90%;
  230. height: 80%;
  231. border-radius: 2upx;
  232. }
  233. .listimg{
  234. width: 100%;
  235. height: 100%;
  236. }
  237. .rdlist-name{
  238. width: 95%;
  239. height: 50upx;
  240. margin-left:5upx;
  241. font-size: 0.5rem;
  242. display: block;
  243. white-space: nowrap;
  244. overflow: hidden;
  245. text-overflow: ellipsis;
  246. }
  247. /* 分页 */
  248. .example-body{
  249. height: 200upx;
  250. padding: 70upx 2%;
  251. box-sizing: border-box;
  252. }
  253. /* 插屏广告 */
  254. uni-popup{
  255. width: 100%;
  256. height: 100%;
  257. }
  258. .content>>>.uni-popup__wrapper.center{
  259. align-items: flex-start;
  260. }
  261. .tc-image {
  262. position: relative;
  263. text-align: left;
  264. }
  265. .tc-image .background {
  266. width: 600upx;
  267. height: 800upx;
  268. }
  269. .x{
  270. position: relative;
  271. }
  272. .tcartic{
  273. position: absolute;
  274. top: 12%;
  275. left: 0;
  276. padding: 0 70upx;
  277. }
  278. .tctitle{
  279. font-weight: 700;
  280. font-size: 0.8rem;
  281. padding-bottom: 4upx;
  282. margin-bottom: 30upx;
  283. border-bottom: 2px solid rgb(2,68,106);
  284. }
  285. .container{
  286. display: flex;
  287. flex-direction: column;
  288. align-items: center;
  289. }
  290. .tki-qrcode{
  291. display: inline-block;
  292. padding: 5upx;
  293. text-align: center;
  294. background: white;
  295. font-size: 0;
  296. }
  297. .saoma{
  298. font-size: 0.5rem;
  299. }
  300. .qrimg-i{
  301. padding: 4upx;
  302. }
  303. .uni-image-close {
  304. position: absolute;
  305. right: -30px;
  306. top: -30px;
  307. z-index: 2;
  308. }
  309. .tcfoot{
  310. margin-top: 30upx;
  311. box-sizing: border-box;
  312. padding: 30upx;
  313. width: 100%;
  314. display: flex;
  315. flex-flow: column wrap;
  316. border: 1px solid rgb(19,96,125) ;
  317. }
  318. .ewm{
  319. width: 100%;
  320. display: flex;
  321. }
  322. .ewmimg{
  323. width: 132upx;
  324. height: 132upx;
  325. background: url(../../static/img/yuewen_10.png) no-repeat;
  326. background-size:100% ;
  327. margin-right: 16upx;
  328. padding: 10upx;
  329. }
  330. .cpgroup{
  331. width: 70%;
  332. display: flex;
  333. flex-flow: column wrap;
  334. }
  335. .cptit,.cpauter{
  336. font-size: 0.5rem;
  337. }
  338. .ewmimage{
  339. width: 100%;
  340. height: 91%;
  341. }
  342. .tcjj{
  343. font-size: 0.4rem;
  344. height: 120upx;
  345. overflow: hidden;
  346. /* background: #007AFF; */
  347. }
  348. .out{
  349. width: 30upx;
  350. height: 30upx;
  351. position: absolute;
  352. top: -20upx;
  353. right: 80upx;
  354. }
  355. .outto{
  356. width: 100%;
  357. height: 100%;
  358. }
  359. .leftbutton{
  360. width: 5%;
  361. height: 200upx;
  362. position: fixed;
  363. top:40%;
  364. left:0;
  365. }
  366. .leftbutton image{
  367. width: 100%;
  368. height: 100%;
  369. }
  370. .rightbutton{
  371. width: 5%;
  372. height: 200upx;
  373. position: fixed;
  374. top:40%;
  375. right:0;
  376. }
  377. .rightbutton image{
  378. width: 100%;
  379. height: 100%;
  380. }
  381. </style>