activityPage.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <template>
  2. <view class="activity">
  3. <statusBar :item="navBarData"></statusBar>
  4. <viewX-Case class="mid">
  5. <template #title>
  6. <view class="title three-font">活动直播</view>
  7. </template>
  8. <template #lookMore>
  9. <view class="lookMore fz-font">
  10. 查看更多
  11. </view>
  12. </template>
  13. <template #activeBlock>
  14. <view class="activeData" v-for="(item,index) in liveList" :key="index">
  15. <!-- <image src="http://43.139.158.220:5007/img/static/activity/bg1.png" mode="aspectFill"></image> -->
  16. <image :src="liveList[index].img" mode="aspectFill"></image>
  17. <view class="liveBroadcast">
  18. <view class="title">
  19. <view class="tag bqZ-font">类型</view>
  20. <text three-font>{{ item.className }}</text>
  21. </view>
  22. <view class="operate">
  23. <view class="left">
  24. <view class="img">
  25. <image :src="liveList[index].imgName"></image>
  26. </view>
  27. <view class="user fwb-font">{{ item.name }}</view>
  28. </view>
  29. <view class="collection">
  30. <!-- <view class="" style="display: flex;margin-right: 10rpx;align-items: center;"> -->
  31. <view class="img">
  32. <image src="http://43.139.158.220:5007/img/static/yym/Vector (Stroke) (2).png"
  33. mode="aspectFill"></image>
  34. </view>
  35. <text class="fz-font">收藏</text>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. </viewX-Case>
  42. <viewX-Case style="margin-top: 10px;">
  43. <template #title>
  44. <view class="title three-font">活动推荐</view>
  45. </template>
  46. <template #lookMore>
  47. <view class="lookMore fz-font" @click="lookMore">查看更多</view>
  48. </template>
  49. <template #activeBlock>
  50. <!-- <activity-case v-for="i in 10" :key="i"></activity-case> -->
  51. <teaching-case v-for="(item,index) in activeList" :item="actData" :key="index"
  52. :activeList="item"></teaching-case>
  53. </template>
  54. </viewX-Case>
  55. <!-- <uni-fab ref="fab"
  56. :pattern="pattern"
  57. :horizontal="horizontal"
  58. :vertical="vertical"
  59. :direction="direction"
  60. buttonColor="#0056a8"
  61. @fabClick="fabClick" /> -->
  62. <view class="" style="height: 30rpx;width: 100%;">
  63. </view>
  64. <view class="qiu" @click="fabClick">
  65. <image src="/static/yym/jia.png" mode="aspectFill"></image>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. data() {
  72. return {
  73. navBarData: {
  74. title: '活动', //导航栏标题
  75. btn: 0 //是否显示返回按钮 0不显示 1 显示
  76. },
  77. actData: {
  78. btn: 1
  79. },
  80. title: 'uni-fab',
  81. liveList: [{
  82. img: "http://43.139.158.220:5007/img/static/mine/img1.jpg",
  83. className: "创业者管理能力训练基础",
  84. imgName: "http://43.139.158.220:5007/img/static/activity/Name1.png",
  85. name: "李芳"
  86. },
  87. {
  88. img: "http://43.139.158.220:5007/img/static/mine/img2.jpg",
  89. className: '创业融资实务',
  90. imgName: "http://43.139.158.220:5007/img/static/activity/Name2.png",
  91. name: "郑秀"
  92. },
  93. {
  94. img: 'http://43.139.158.220:5007/img/static/mine/img3.jpg',
  95. className: '创业基础',
  96. imgName: "http://43.139.158.220:5007/img/static/activity/Name3.png",
  97. name: "杨哲旗"
  98. },
  99. {
  100. img: "http://43.139.158.220:5007/img/static/mine/img4.jpg",
  101. className: "打造无敌商业计划书",
  102. imgName: "http://43.139.158.220:5007/img/static/activity/Name2.png",
  103. name: "杨广"
  104. }
  105. ],
  106. activeList: [{
  107. img: 'http://43.139.158.220:5007/img/static/mine/img10.jpg',
  108. count: '1790',
  109. className: '创新思维开发与落地',
  110. intro: '《暂无简介》'
  111. },
  112. {
  113. img: 'http://43.139.158.220:5007/img/static/mine/img11.jpg',
  114. count: '3842',
  115. className: '创业意识与商机识别',
  116. intro: '在创新创业的大氛围下,课堂上常常强调要以项目为中心,你却苦于迟迟无法最终确定具体的项目?那么,《创业意识与商机识别》这门课程可以帮助你。'
  117. },
  118. {
  119. img: 'http://43.139.158.220:5007/img/static/mine/img12.png',
  120. count: '701',
  121. className: '机电(机械)技术创新创业实务',
  122. intro: '该课程是针对机电、机械行业、企业用户的一门关于创新创业的培训类课程。在国家“大众创业、万众创新”的新时代背景下,创新是引领一个企业发展的第一动力。为推动科技不断进步、促进企业快速健康发展,开发了《机电(机械)技术创新创业实务》课程。计划为36学时,理论讲授30学时,实践案例分析和操作6学时'
  123. },
  124. {
  125. img: 'http://43.139.158.220:5007/img/static/mine/img13.jpg',
  126. count: '823',
  127. className: '打造黄金创始人团队',
  128. intro: '如何摆正自己的工作态度和位置,清醒认识到自己的职责,学会选人用人,努力提高领导力和执行力,带好团队,并最终成为一个卓越的管理者呢?本课程提供给你建议'
  129. },
  130. {
  131. img: 'http://43.139.158.220:5007/img/static/mine/img14.jpg',
  132. count: '2287',
  133. className: '创业素质测评与团队组建',
  134. intro: '本课程采取案例分析、研讨、游戏的方式使同学们的聪明才智能够有发挥的空间,话语权能够得到满足。通过完成团队任务的方式使大家逐渐与陌生人建立良好沟通关系,掌握沟通技巧,使自己具有使命感、懂得感恩。'
  135. },
  136. ],
  137. };
  138. },
  139. methods: {
  140. lookMore() {
  141. const value = uni.getStorageSync('login');
  142. if (value==0) {
  143. uni.navigateTo({
  144. url: "/pages/login/login"
  145. })
  146. } else {
  147. uni.navigateTo({
  148. url: '/pages/activityList/activityList'
  149. })
  150. }
  151. },
  152. fabClick() {
  153. const value = uni.getStorageSync('login');
  154. if (value==0) {
  155. uni.navigateTo({
  156. url: "/pages/login/login"
  157. })
  158. } else {
  159. uni.navigateTo({
  160. url: '/pages/publish/publish'
  161. })
  162. }
  163. },
  164. onChange: function(e) {
  165. this.old.x = e.detail.x
  166. this.old.y = e.detail.y
  167. }
  168. }
  169. }
  170. </script>
  171. <style lang="scss">
  172. .activity {
  173. .qiu {
  174. width: 90rpx;
  175. height: 90rpx;
  176. position: fixed;
  177. z-index: 19;
  178. right: 30rpx;
  179. bottom: 10vh;
  180. border-radius: 50%;
  181. background-color: rgba(0, 86, 168, 1);
  182. display: flex;
  183. justify-content: center;
  184. align-items: center;
  185. image {
  186. position: absolute;
  187. width: 36rpx;
  188. height: 36rpx;
  189. }
  190. }
  191. .mid {
  192. // margin:20px 0;
  193. .activeData {
  194. width: 460rpx;
  195. display: inline-block;
  196. margin-right: 20px;
  197. image {
  198. width: 100%;
  199. height: 120px;
  200. border-radius: 10px;
  201. margin-bottom: 10px;
  202. }
  203. .liveBroadcast {
  204. flex: 1;
  205. width: 460rpx;
  206. display: flex;
  207. flex-direction: column;
  208. align-content: flex-end;
  209. .title {
  210. display: flex;
  211. align-items: center;
  212. margin-bottom: 10rpx;
  213. .tag {
  214. // border: 1px #00b2b6 solid;
  215. // // font-size: 12px;
  216. // width: 64rpx;
  217. // height: 38rpx;
  218. // display: flex;
  219. // white-space: nowrap;
  220. // justify-content: center;
  221. // align-items: center;
  222. // // padding: 2px 4px;
  223. // padding: 1rpx 4rpx;
  224. // border-radius: 3px;
  225. // margin-right: 10rpx;
  226. // color: #00b2b6;
  227. border: 1px #00b2b6 solid;
  228. font-size: 20rpx;
  229. width: 64rpx;
  230. display: flex;
  231. height: 34rpx;
  232. white-space: nowrap;
  233. justify-content: center;
  234. align-items: center;
  235. // padding: 4px 12px 4px 12px;
  236. border-radius: 5rpx;
  237. margin-right: 10rpx;
  238. color: #00b2b6;
  239. }
  240. text {
  241. // display: -webkit-box;//对象作为弹性伸缩盒子模型显示
  242. // overflow: hidden;//溢出隐藏
  243. // -webkit-box-orient: vertical;//设置伸缩盒子对象的子元素的排列方式
  244. // -webkit-line-clamp: 2;//设置 块元素包含的文本行数
  245. overflow: hidden;
  246. text-overflow: ellipsis;
  247. white-space: nowrap;
  248. }
  249. }
  250. .operate {
  251. display: flex;
  252. justify-content: space-between;
  253. align-items: center;
  254. padding: 20rpx 0;
  255. color: #666666;
  256. // margin-bottom: 20rpx;
  257. // padding-bottom: 20rpx;
  258. .left {
  259. display: flex;
  260. align-items: center;
  261. .img {
  262. width: 48rpx;
  263. height: 48rpx;
  264. margin-right: 10rpx;
  265. image {
  266. width: 100%;
  267. height: 100%;
  268. border-radius: 50%;
  269. }
  270. }
  271. .user {}
  272. }
  273. .collection {
  274. display: flex;
  275. align-items: center;
  276. justify-content: space-between;
  277. width: 88rpx;
  278. height: 32rpx;
  279. position: relative;
  280. .img {
  281. position: absolute;
  282. left: 0;
  283. top: 6rpx;
  284. transform: translate(-130%, 0);
  285. }
  286. image {
  287. width: 27rpx;
  288. height: 25rpx;
  289. display: block;
  290. }
  291. // float: right;
  292. // font-size: 14px;
  293. // padding-top: 10px;
  294. }
  295. }
  296. }
  297. }
  298. .activeData:nth-child(1) {
  299. margin-left: 15px;
  300. }
  301. }
  302. .title {
  303. font-weight: bold;
  304. // color: #999999;
  305. }
  306. .lookMore {
  307. color: #666666;
  308. // font-size: 14px;
  309. }
  310. }
  311. </style>