activity.vue 8.3 KB

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