list.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <view class="content">
  3. <pcNav></pcNav>
  4. <view style="height: 72px;"></view>
  5. <view class="gotop" @click="gotoTop">
  6. <image src="../../static/pcimg/btn_top@2x.png" mode="" class="gotopImg"></image>
  7. </view>
  8. <view class="top">
  9. <view class="topName">{{topName}}</view>
  10. <view class="comment">{{comment}}</view>
  11. </view>
  12. <view class="main">
  13. <view class="dynamicCol">
  14. <view class="dynamicColLeft">
  15. <view class="dynamicColLIne" :class="{'activeTab':tabIndex==index}" v-for="(item,index) in dynamicCol" @click="tabBtn(index)">{{item.name}}</view>
  16. </view>
  17. <view class="dynamicColRight">
  18. <image src="../../static/pcimg/icon_kapian_def@2x.png" v-show="qhIndex==2" class="qhImg" @click="qhIndex=1"></image>
  19. <image src="../../static/pcimg/icon_kapian_sel@2x.png" v-show="qhIndex==2" class="qhImg"></image>
  20. <image src="../../static/pcimg/icon_liebiao_sel@2x.png" v-show="qhIndex==1" class="qhImg" ></image>
  21. <image src="../../static/pcimg/qh2.png" v-show="qhIndex==1" class="qhImg" @click="qhIndex=2"></image>
  22. </view>
  23. </view>
  24. <view class="cont2">
  25. <view class="contf" v-if="qhIndex==2">
  26. <view class="mainwzline" v-for="(wz,wzindex) in list" :class="{'mainwzlineR':wzindex%3==0&&wzindex!=0}">
  27. <view class="mainwzImgBox">
  28. <img :src="wz.LogoImg" alt="" class="mainwzImg">
  29. </view>
  30. <view class="wztitle">{{wz.Title}}</view>
  31. </view>
  32. </view>
  33. <view class="contL" v-if="qhIndex==1">
  34. <view class="wxLine" v-for="(wz,wzindex) in list">
  35. <view class="wzLineLeft">
  36. <image :src="wz.LogoImg" class="wzLeftIMg"></image>
  37. </view>
  38. <view class="wzLineRight">
  39. <view class="wzTitle">{{wz.Name}}</view>
  40. <view class="wzComment">{{wz.Comment}}</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- <view>
  47. <a class="table-btn" href="http://phone.66km.cn:8088/marketing/training/940C4BF0A2E04542A1A1AD244EAFB6E2.xlsx" target='_blank'>下载入口</a>
  48. </view> -->
  49. </view>
  50. </template>
  51. <script>
  52. import pcNav from '../../components/pcNav/pcNav.vue'
  53. export default {
  54. components: {
  55. pcNav,
  56. },
  57. data() {
  58. return {
  59. list:[],
  60. comment:'',
  61. topName:'',
  62. parentCode:'',
  63. topCode:'',
  64. page:1,
  65. dynamicCol:[],
  66. qhIndex:1,
  67. tabIndex:0,
  68. }
  69. },
  70. onLoad(opt) {
  71. this.topName=opt.topName;
  72. this.comment=opt.comment;
  73. this.topCode='';
  74. this.parentCode=opt.code;
  75. this.getcategoryPageData()
  76. },
  77. methods: {
  78. gotoTop(){
  79. uni.pageScrollTo({
  80.    scrollTop: 0, duration: 300
  81. });
  82. },
  83. tabBtn(index){
  84. this.tabIndex=index
  85. },
  86. getcategoryPageData(){
  87. var params={
  88. parentCode:this.parentCode,
  89. topCode:this.topCode,
  90. limit:20,
  91. page:this.page,
  92. }
  93. this.$http('/trainingOpenApi/categoryPageData', params, 'GET').then(res => {
  94. this.list=res.data.Items;
  95. var arr=[
  96. {
  97. 'name':'全部','code':'',
  98. }
  99. ]
  100. this.dynamicCol=arr.concat(res.data.dynamicCol);
  101. })
  102. }
  103. }
  104. }
  105. </script>
  106. <style scoped>
  107. *{
  108. padding: 0;
  109. margin: 0;
  110. }
  111. .gotopImg{
  112. width: 60px;
  113. height: 60px;
  114. }
  115. .gotop{
  116. position: fixed;
  117. right:15vh ;
  118. bottom: 100px;
  119. cursor: pointer;
  120. }
  121. .topName{
  122. text-align: center;
  123. font-size: 24px;
  124. font-weight: 500;
  125. color: #3C3C3C;
  126. line-height: 33px;
  127. padding-top: 30px;
  128. }
  129. .comment{
  130. text-align: center;
  131. font-size: 14px;
  132. font-weight: 400;
  133. color: #999999;
  134. line-height: 20px;
  135. width: 500px;
  136. padding-top: 10px;
  137. margin: 0 auto;
  138. }
  139. .main{
  140. width: 1200px;
  141. margin: 0 auto;
  142. padding-top: 30px;
  143. }
  144. .dynamicColLeft{
  145. display: flex;
  146. }
  147. .dynamicColLIne{
  148. padding-right: 44px;
  149. font-size: 16px;
  150. color: #3C3C3C;
  151. cursor: pointer;
  152. }
  153. .qhImg{
  154. width: 28px;
  155. height: 28px;
  156. margin-left: 8px;
  157. cursor: pointer;
  158. }
  159. .dynamicCol{
  160. display: flex;
  161. justify-content: space-between;
  162. }
  163. .activeTab{
  164. color: #FF4F00;
  165. }
  166. .mainwzImg{
  167. width: 276px;
  168. height: 184px;
  169. }
  170. .mainwzImgBox{
  171. border-radius: 15px;
  172. overflow: hidden;
  173. }
  174. .contf{
  175. display: flex;
  176. }
  177. .mainwzline{
  178. width: 276px;
  179. height: 260px;
  180. background: #FFFFFF;
  181. margin-right: 32px;
  182. padding-top: 33px;
  183. cursor: pointer;
  184. }
  185. .mainwzlineR{
  186. margin-right: 0px;
  187. }
  188. .wztitle{
  189. width: 250px;
  190. font-size: 16px;
  191. color: #333333;
  192. line-height: 22px;
  193. height: 44px;
  194. text-overflow: -o-ellipsis-lastline;
  195. overflow: hidden;
  196. text-overflow: ellipsis;
  197. display: -webkit-box;
  198. -webkit-line-clamp: 2;
  199. line-clamp: 2;
  200. -webkit-box-orient: vertical;
  201. padding-top: 16px;
  202. padding:0 13px ;
  203. }
  204. .wzLeftIMg{
  205. width: 200px;
  206. height: 132px;
  207. }
  208. .wxLine{
  209. display: flex;
  210. padding-top: 30px;
  211. }
  212. .wzLineLeft{
  213. border-radius: 10px;
  214. overflow: hidden;
  215. width: 200px;
  216. height: 132px;
  217. }
  218. .wzLineRight{
  219. padding-left: 16px;
  220. }
  221. .wzTitle{
  222. font-size: 16px;
  223. font-weight: 500;
  224. color: #3C3C3C;
  225. }
  226. .wzComment{
  227. font-size: 12px;
  228. font-family: PingFangSC-Regular, PingFang SC;
  229. font-weight: 400;
  230. color: #999999;
  231. line-height: 17px;
  232. padding-top: 10px;
  233. }
  234. </style>