activity.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <template>
  2. <view class="container_box">
  3. <view class="header-nav" :style="{height: `calc(88rpx + ${statusBarHeight}px)`,paddingTop: statusBarHeight + 'px'}">
  4. </view>
  5. <view class="conbox">
  6. <image class="activity_yh_right" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_yh_right.png" mode="widthFix"></image>
  7. <image class="activity_yh_left" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_yh_left.png" mode="widthFix"></image>
  8. <image class="activity_title" v-show="status==0" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_title.png" mode="widthFix"></image>
  9. <view class="activity_title2" v-if="status==1">
  10. 福袋已经失效了~
  11. </view>
  12. <template v-if="status==2">
  13. <view class="activity_title3">
  14. 您已经领取过本次福袋啦~
  15. </view>
  16. <view class="activity_title4">
  17. 赶紧前往芳华未来APP,兑换好物吧
  18. </view>
  19. </template>
  20. <view class="ybg_box">
  21. <view class="ybg"></view>
  22. <image class="activity_lucky_bag" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_lucky_bag.png" mode="heightFix"></image>
  23. <image class="activity_ysx" v-show="status==1" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_ysx.png" mode="widthFix"></image>
  24. <image class="activity_ylq" v-show="status==2" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_ylq.png" mode="widthFix"></image>
  25. </view>
  26. <view class="activity_btn animation" v-if="status==0" @click="handleReceive">
  27. <view class="btn">领取福袋</view>
  28. <image src="https://cdn.his.cdwjyyh.com/minapp/course/activity_btn.png" mode="heightFix"></image>
  29. <view class="exsct"></view>
  30. </view>
  31. <view class="activity_btn_down x-c" v-if="status!=0" @click="navTo">
  32. <text>如何下载芳华未来APP</text>
  33. <image src="https://cdn.his.cdwjyyh.com/minapp/course/activity_more.png" mode="aspectFill"></image>
  34. </view>
  35. </view>
  36. <image class="footer_img" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_xy.png" mode="widthFix"></image>
  37. <u-popup :show="show" mode="center" bgColor="transparent" :closeOnClickOverlay="false" overlayOpacity="0.7">
  38. <view class="popup-box">
  39. <image class="activity_jb" src="https://cdn.his.cdwjyyh.com/minapp/course/activity_jb.png" mode="heightFix"></image>
  40. <text class="popup-tit">恭喜您获得</text>
  41. <view class="con">
  42. <view class="numbox color_FB2205"><text class="num">+100</text>芳华币</view>
  43. <view>您的芳华币总额:<text class="color_FB2205" style="font-weight: 600;">+100</text></view>
  44. </view>
  45. <view class="popup-tips">赶紧去芳华未来APP,兑换好物吧~</view>
  46. <view class="popbtn x-c" @click="show=false">我知道啦</view>
  47. </view>
  48. <view class="popup-tips" style="color: #FFFFFF;margin-top: 60rpx;">兑换提示:请前往芳华未来APP兑换</view>
  49. <view class="popup-tips" style="color: #FFC05C;text-decoration-line: underline;" @click="navTo">如何下载芳华未来APP?</view>
  50. </u-popup>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  58. show: false,
  59. status: 0,
  60. }
  61. },
  62. methods: {
  63. goBack() {
  64. uni.navigateBack();
  65. },
  66. handleReceive() {
  67. this.show = true
  68. },
  69. navTo() {
  70. this.show = false
  71. uni.navigateTo({
  72. url: '/pages_course/appDownload'
  73. })
  74. // uni.showModal({
  75. // title: '领取失败',
  76. // content: '福袋余额不足,请联系客服',
  77. // showCancel: false,
  78. // success: function (res) {
  79. // if (res.confirm) {
  80. // console.log('用户点击确定');
  81. // } else if (res.cancel) {
  82. // console.log('用户点击取消');
  83. // }
  84. // }
  85. // });
  86. }
  87. }
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. .exsct {
  92. height: 92rpx;
  93. width: 437rpx;
  94. background-color: transparent;
  95. border-radius: 69rpx;
  96. position: absolute;
  97. top: 27rpx;
  98. left: 28rpx;
  99. box-shadow: inset -57rpx 0px 40rpx -26rpx rgba(255, 255, 255, 0.7);
  100. will-change: left, opacity;
  101. animation: leftFade 2s linear infinite;
  102. opacity: 0;
  103. }
  104. .color_FB2205 {
  105. color: #FB2205;
  106. }
  107. .activity_title2,.activity_title3,.activity_title4{
  108. margin-top: 8vh;
  109. margin-bottom: 56rpx;
  110. font-family: PingFang SC, PingFang SC;
  111. font-weight: 600;
  112. font-size: 48rpx;
  113. line-height: 80rpx;
  114. filter: drop-shadow(0px 4rpx 8rpx rgba(174,0,25,0.8));
  115. text-align: center;
  116. font-style: normal;
  117. text-transform: none;
  118. background: linear-gradient(270deg, #FFF5EE 0%, #FFE2B3 100%);
  119. -webkit-background-clip: text;
  120. background-clip: text;
  121. -webkit-text-fill-color: transparent;
  122. text-fill-color: transparent;
  123. display: inline-block
  124. }
  125. .activity_title3 {
  126. font-size: 48rpx;
  127. line-height: 80rpx;
  128. margin-top: 6vh;
  129. margin-bottom: 8rpx;
  130. }
  131. .activity_title4 {
  132. font-size: 32rpx;
  133. line-height: 44rpx;
  134. margin-top: 0;
  135. margin-bottom: 48rpx;
  136. }
  137. .container_box {
  138. min-height: 100vh;
  139. position: relative;
  140. background: linear-gradient( 180deg, #FD2F3C 0%, #FFE7CE 100%);
  141. }
  142. .activity_yh_right {
  143. width: 100rpx;
  144. position: absolute;
  145. top: 25%;
  146. right: 0;
  147. }
  148. .activity_yh_left {
  149. width: 114rpx;
  150. position: absolute;
  151. top: 50%;
  152. left: 0;
  153. }
  154. .header-nav {
  155. height: 88rpx;
  156. display: flex;
  157. align-items: center;
  158. justify-content: center;
  159. overflow: hidden;
  160. box-sizing: border-box;
  161. width: 100%;
  162. }
  163. .conbox {
  164. position: relative;
  165. display: flex;
  166. flex-direction: column;
  167. align-items: center;
  168. justify-content: flex-start;
  169. z-index: 3;
  170. .activity_title {
  171. width: 632rpx;
  172. height: auto;
  173. margin-top: 28rpx;
  174. }
  175. .ybg_box {
  176. width: 566rpx;
  177. height: 580rpx;
  178. position: relative;
  179. .activity_ysx,.activity_ylq {
  180. position: absolute;
  181. left: 242rpx;
  182. top: 215rpx;
  183. width: 300rpx;
  184. height: auto;
  185. }
  186. .ybg {
  187. width: 616rpx;
  188. height: 616rpx;
  189. background: #FFE7CE;
  190. border-radius: 0rpx 0rpx 0rpx 0rpx;
  191. filter: blur(94.30000305175781px);
  192. }
  193. image {
  194. height: 580rpx;
  195. position: absolute;
  196. top: 0;
  197. left: 0;
  198. z-index: 99;
  199. }
  200. }
  201. .activity_btn_down {
  202. width: 416rpx;
  203. height: 88rpx;
  204. margin-top: 94rpx;
  205. background: rgba(0,0,0,0.3);
  206. border-radius: 56rpx 56rpx 56rpx 56rpx;
  207. font-family: PingFang SC, PingFang SC;
  208. font-weight: 600;
  209. font-size: 28rpx;
  210. color: #FFFFFF;
  211. image {
  212. width: 32rpx;
  213. height: 32rpx;
  214. margin-left: 16rpx;
  215. }
  216. }
  217. .activity_btn {
  218. height: 137rpx;
  219. width: 502rpx;
  220. margin-top: 48rpx;
  221. font-family: PingFang SC;
  222. font-weight: 600;
  223. font-size: 44rpx;
  224. color: #FFFFFF;
  225. display: flex;
  226. align-items: center;
  227. justify-content: center;
  228. position: relative;
  229. z-index: 2;
  230. overflow: hidden;
  231. border-radius: 137rpx;
  232. image {
  233. height: 137rpx;
  234. position: absolute;
  235. left: 0;
  236. top: 12rpx;
  237. z-index: -1;
  238. }
  239. }
  240. }
  241. .popup-box {
  242. width: 518rpx;
  243. min-height: 568rpx;
  244. background: linear-gradient( 180deg, #FFE7AC 0%, #FFFFFF 100%);
  245. border-radius: 56rpx 56rpx 56rpx 56rpx;
  246. position: relative;
  247. display: flex;
  248. align-items: center;
  249. flex-direction: column;
  250. box-shadow: 0 0 30px -6px rgba(255, 231, 206, 1);
  251. .activity_jb {
  252. height: 184rpx;
  253. margin-top: -130rpx;
  254. position: relative;
  255. }
  256. .popup-tit {
  257. font-family: PingFang SC;
  258. font-weight: 600;
  259. font-size: 40rpx;
  260. color: #000000;
  261. line-height: 80rpx;
  262. }
  263. .con {
  264. margin-top: 16rpx;
  265. width: 438rpx;
  266. min-height: 170rpx;
  267. padding: 16rpx 0;
  268. background: #FFE8AE;
  269. border-radius: 16rpx 16rpx 16rpx 16rpx;
  270. font-family: PingFang SC;
  271. font-weight: 400;
  272. font-size: 28rpx;
  273. color: #333333;
  274. display: flex;
  275. flex-direction: column;
  276. align-items: center;
  277. justify-content: center;
  278. }
  279. .numbox {
  280. font-weight: 600;
  281. margin-bottom: 12rpx;
  282. }
  283. .num {
  284. font-size: 68rpx;
  285. margin-right: 10rpx;
  286. }
  287. .popbtn {
  288. width: 358rpx;
  289. height: 88rpx;
  290. background: linear-gradient( 90deg, #F82D31 0%, #FD6C05 100%);
  291. box-shadow: 0rpx 8rpx 0rpx 0rpx #FEBC92;
  292. border-radius: 64rpx 64rpx 64rpx 64rpx;
  293. margin-top: 32rpx;
  294. font-family: PingFang SC, PingFang SC;
  295. font-weight: 600;
  296. font-size: 32rpx;
  297. color: #FFFFFF;
  298. }
  299. }
  300. .popup-tips {
  301. margin-top: 20rpx;
  302. font-family: PingFang SC;
  303. font-weight: 400;
  304. font-size: 24rpx;
  305. color: #666666;
  306. text-align: center;
  307. }
  308. .footer_img {
  309. width: 100%;
  310. position: fixed;
  311. bottom: 0;
  312. left: 0;
  313. }
  314. .animation {
  315. will-change: transform;
  316. animation: scaleAnimation 2s ease infinite;
  317. }
  318. @keyframes leftFade {
  319. 0% {
  320. left: -464rpx;
  321. opacity: 0;
  322. }
  323. 25% {
  324. opacity: 1;
  325. left: -249rpx;
  326. }
  327. 50% {
  328. opacity: 0;
  329. left: 16rpx;
  330. }
  331. 100% {
  332. opacity: 0;
  333. left: 490rpx;
  334. }
  335. }
  336. @keyframes scaleAnimation {
  337. 0% {
  338. transform: scale(1);
  339. }
  340. // 30% {
  341. // transform: scale(1.05);
  342. // }
  343. 50% {
  344. transform: scale(1.05);
  345. }
  346. 100% {
  347. transform: scale(1);
  348. }
  349. }
  350. </style>