activity_deatil.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <template>
  2. <view class="content">
  3. <view class="header">
  4. <view class="title-read">
  5. <view class="title">
  6. {{ model.title }}
  7. </view>
  8. <view class="read">阅读量 {{ model.read }}</view>
  9. </view>
  10. <view class="header-image">
  11. <image src="/static/activity/u1104.png" alt="" />
  12. </view>
  13. </view>
  14. <view class="active-deatil">
  15. <ul>
  16. <li>
  17. <p class="name">活动时间</p>
  18. <p class="deatil-content">{{ model.date }}</p>
  19. </li>
  20. <li>
  21. <p class="name">活动类型</p>
  22. <p class="deatil-content">{{ model.type == 1 ? "线上" : "线下" }}</p>
  23. </li>
  24. <li>
  25. <p class="name">主办方</p>
  26. <p class="deatil-content">{{ model.way }}</p>
  27. </li>
  28. </ul>
  29. </view>
  30. <view class="rich">
  31. <activityRichCard :model="textModel" :isFold="true" />
  32. </view>
  33. <view class="share-box">
  34. <view class="share">
  35. <view class="shareCount">{{ model.share }}</view>
  36. <image src="../../static/share_icon.png"></image>
  37. </view>
  38. <view class="button"
  39. ><button
  40. @click="signUpActivity"
  41. :disabled="!(model.status == 0 && model.type == 2)"
  42. :class="{
  43. start: model.status == 0,
  44. begun: model.status == 1,
  45. ended: model.status == 2,
  46. }"
  47. >
  48. {{ model.activiteState }}
  49. </button></view
  50. >
  51. <!-- "status":"活动状态 0:待开始;1:已开始; 2:已结束
  52. "type":"活动类型 1:线上;2 线下"} -->
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import md5 from "@/common/md5.js";
  58. import activity_rich_card from "../policy/policy_rich_card";
  59. export default {
  60. components: {
  61. activityRichCard: activity_rich_card,
  62. },
  63. data() {
  64. return {
  65. id: "",
  66. model: {
  67. title: "400场讲座,200多门课程,免费送上门!就等你来申请啦~",
  68. read: 123,
  69. url: "",
  70. date: "2021.08.20 14:00 - 2021.08.30 17:00",
  71. type: 1,
  72. status: 0,
  73. way: "区人力资源局",
  74. share: 0,
  75. activiteState: "活动进行中",
  76. },
  77. textModel: {
  78. title: "活动内容",
  79. text:
  80. "<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;</strong>2021QQ名人赛第二季全明星王牌赛从开战至今便火爆出圈、收获超高关注度,明星嘉宾与主播联袂征战,激烈对抗燃爆整个电竞赛场;豪华的阵容加上新奇玩法,缔造全场高能的视觉盛宴!生而为战,精彩不断,如今第五期比赛余热未散,9月25日下午13:00的第六期比赛即将高能来袭!</p><p><br></p><p><strong>&nbsp;&nbsp;&nbsp;&nbsp;此外,在直播期间,还有Airpods pro、西伯利亚耳机、QQ年费黄钻、会员、绿钻以及白鹤梁神女,乞巧织情,战令币等多款礼品在直播间在线放送,一定不要错过咯~</strong></p><p>&nbsp;</p><p><strong>&nbsp;&nbsp;&nbsp;“奶味甜豆”张星特遇上“水系男孩”俞更寅!</strong></p><p>&nbsp;&nbsp;&nbsp;&nbsp;本次全明星王牌赛王者专场第六期到场的明星嘉宾是张星特与俞更寅,两位实力vocal男神将在峡谷相遇,开启实力峡谷对决!</p><p>&nbsp;&nbsp;&nbsp;&nbsp;本期红方阵营出战的是被称为“奶味甜豆”的张星特,舞台上的他用自己迷人的声音和灿烂的微笑收获了不少观众的青睐,这个像星星一样闪闪发光的男孩,在生活中也是一个爱撒娇的“小甜豆”哦,期待他这次可以在展示自己电竞实力的同时也能“萌翻峡谷”~</p><p>&nbsp;&nbsp;&nbsp;&nbsp;本期蓝方阵营出战的是被称为“水系男孩”的俞更寅,他凭着自己对音乐的热爱,坚定地踏上了追梦之旅,用自己天籁般的嗓音治愈着观众,创造着一个又一个奇迹,当这个无畏逐梦的男孩来到峡谷,势必会给我们创造无限惊喜!</p><p>&nbsp;&nbsp;&nbsp;&nbsp;两位实力vocal男神降临峡谷,不仅能欣赏他们精彩的游戏技术还能看到他们“彪歌”“彪高音”,一起期待吧!</p><p><br></p><p><br></p><p><strong>&nbsp;&nbsp;&nbsp;&nbsp;打野天花板清清vs 8国服主播菜咪,实力与人气之争!</strong></p><p>&nbsp;&nbsp;&nbsp;&nbsp;本期我们还邀请到了两位技术流主播清清和菜咪。其中清清搭档张星特作为红方阵营,而菜咪搭档俞更寅作为蓝方阵营。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;作为拥有着国服最高战力曜的清清,一直是打野天花板的存在,这位教学殿堂级主播,素有“虎牙清清曜无敌”的美誉,其操作绝对值得一看;而拥有着双系统8国服的菜咪,一直凭借着自己超高的颜值和高超的辅助技术深受玩家喜爱,是人气爆火的实力派,其粉丝美称“菜咪不菜,峡谷打怪”!</p><p><br></p><p><br></p><p>&nbsp;&nbsp;&nbsp;&nbsp;除此之外,我们还邀请到了仙染、名辞、 汤汤、耀宇、乔妹等6位虎牙人气主播作为线上嘉宾,精兵强将在峡谷一决高下!</p><p>&nbsp;&nbsp;&nbsp;&nbsp;强强对决,到底红蓝双方谁能脱颖而出?记得关注9月25日下午13:00的2021QQ名人赛第二季全明星王牌赛第六期,届时将会为大家揭晓答案。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;2021QQ名人赛-虎牙直播全明星联赛,作为一档王牌明星电竞对抗赛事,由腾讯QQ主办,QQ游戏中心、QQ空间、QQicon联合主办,由虎牙直播独家直播呈现,携手战略合作伙伴先知电竞打造的全明星电竞赛事。赛事以王者荣耀、和平精英等热门游戏为比赛项目,聚合众多人气明星及游戏KOL进行游戏竞技。青春热血,生而为战,王牌聚集,开战无敌!</p><p>&nbsp;&nbsp;&nbsp;&nbsp;明星嘉宾携手知名主播在峡谷相约对战,精彩刺激的红蓝对决,现场互动玩法升级,请持续关注2021QQ名人赛第二季全明星王牌赛!</p><p>&nbsp;</p>",
  81. },
  82. };
  83. },
  84. onLoad(op) {
  85. this.id = op.id;
  86. // this.getActivityDeatil();
  87. },
  88. methods: {
  89. getActivityDeatil() {
  90. let md5Sign = md5(
  91. "method=" +
  92. "common" +
  93. "&timestamp=" +
  94. getApp().globalData.globalTimestamp +
  95. "&secret=" +
  96. getApp().globalData.secret
  97. );
  98. let url =
  99. getApp().globalData.shareUrl +
  100. "api/api.php" +
  101. "?method=common&source=activity&action=info_by_id&timestamp=" +
  102. getApp().globalData.globalTimestamp +
  103. "&sign=" +
  104. md5Sign;
  105. let postData = {
  106. id: this.id,
  107. };
  108. //获取文章
  109. uni.request({
  110. url: url,
  111. method: "POST",
  112. header: {
  113. "content-type": "application/x-www-form-urlencoded",
  114. },
  115. data: postData,
  116. success: (res) => {
  117. console.log(res);
  118. if (res.data.code === 200) {
  119. this.getRich();
  120. }
  121. },
  122. fail: () => {
  123. console.log("连接失败");
  124. },
  125. });
  126. },
  127. getRich() {
  128. uni.request({
  129. url:
  130. getApp().globalData.shareUrl +
  131. `content/business/${Math.floor(this.id / 1000)}/${this.id}.html`,
  132. method: "GET",
  133. header: {
  134. "content-type": "application/x-www-form-urlencoded",
  135. },
  136. success: (res) => {
  137. console.log(res);
  138. if (res.statusCode === 200) {
  139. this.model.artical = res.data;
  140. }
  141. },
  142. fail: () => {
  143. console.log("连接失败");
  144. },
  145. });
  146. },
  147. signUpActivity() {
  148. let md5Sign = md5(
  149. "method=" +
  150. "common" +
  151. "&timestamp=" +
  152. getApp().globalData.globalTimestamp +
  153. "&secret=" +
  154. getApp().globalData.secret
  155. );
  156. let url =
  157. getApp().globalData.shareUrl +
  158. "api/api.php" +
  159. "?method=common&source=activity&action=active&timestamp=" +
  160. getApp().globalData.globalTimestamp +
  161. "&sign=" +
  162. md5Sign;
  163. let postData = {
  164. openId: getApp().globalData.open_id,
  165. id: this.id,
  166. };
  167. uni.request({
  168. url: url,
  169. method: "POST",
  170. header: {
  171. "content-type": "application/x-www-form-urlencoded",
  172. },
  173. data: postData,
  174. success: (res) => {
  175. console.log(res);
  176. },
  177. fail: () => {
  178. console.log("连接失败");
  179. },
  180. });
  181. },
  182. },
  183. };
  184. </script>
  185. <style lang="scss" scoped>
  186. .content {
  187. display: flex;
  188. flex-direction: column;
  189. .header {
  190. display: flex;
  191. height: 150rpx;
  192. padding: 20rpx;
  193. .title-read {
  194. height: 100%;
  195. display: flex;
  196. flex-direction: column;
  197. justify-content: space-evenly;
  198. .title {
  199. font-weight: 600;
  200. letter-spacing: 2rpx;
  201. font-size: 32rpx;
  202. }
  203. .read {
  204. margin-top: 20rpx;
  205. font-size: 22rpx;
  206. color: $uni-text-color-grey;
  207. }
  208. }
  209. .header-image {
  210. height: 100%;
  211. width: 50%;
  212. image {
  213. width: 100%;
  214. height: 100%;
  215. }
  216. }
  217. }
  218. .active-deatil {
  219. padding: 20rpx;
  220. ul {
  221. padding: 30rpx;
  222. box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
  223. border-radius: 32rpx;
  224. li {
  225. margin-bottom: 30rpx;
  226. list-style: none;
  227. .name {
  228. margin-bottom: 10rpx;
  229. font-size: 30rpx;
  230. color: $uni-text-color-grey;
  231. }
  232. .deatil-content {
  233. font-size: 27rpx;
  234. }
  235. }
  236. }
  237. }
  238. .rich {
  239. margin-bottom: 150rpx;
  240. padding: 20rpx;
  241. }
  242. .share-box {
  243. box-sizing: border-box;
  244. height: 150rpx;
  245. width: 100%;
  246. align-items: center;
  247. justify-content: space-evenly;
  248. position: fixed;
  249. bottom: 0;
  250. display: flex;
  251. background: #ffffff;
  252. .share {
  253. display: flex;
  254. justify-content: center;
  255. align-items: center;
  256. width: 50rpx;
  257. height: 50rpx;
  258. position: relative;
  259. image {
  260. width: 100%;
  261. height: 100%;
  262. }
  263. .shareCount {
  264. display: flex;
  265. justify-content: center;
  266. align-items: center;
  267. position: absolute;
  268. top: -30%;
  269. right: -30%;
  270. color: #ffffff;
  271. height: 30rpx;
  272. width: 30rpx;
  273. padding: 3rpx;
  274. font-size: 16rpx;
  275. border-radius: 50%;
  276. background: #fe3637;
  277. }
  278. }
  279. .button {
  280. height: 100rpx;
  281. width: 70%;
  282. display: flex;
  283. justify-content: center;
  284. button {
  285. width: 80%;
  286. height: 90%;
  287. border: 1px solid;
  288. outline: none;
  289. background: none;
  290. }
  291. .start {
  292. //待开始
  293. background-color: #00a8ea;
  294. color: #ffffff;
  295. border-color: none;
  296. }
  297. .begun {
  298. //已开始
  299. border-color: #00a8ea;
  300. color: #00a8ea;
  301. }
  302. .ended {
  303. //已结束
  304. color: #aaaaaa;
  305. border-color: #aaaaaa;
  306. }
  307. }
  308. }
  309. }
  310. </style>