videoPopup.nvue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="subnvue" :style="{height: height+'px',width: width +'px'}">
  3. <!-- 逐集观看提示弹窗 -->
  4. <view class="tipspopbox">
  5. <view class="tipspop">
  6. <view class="tc_bg">
  7. <image class="tc_bg" src="@/static/images/ad/tc_bg.png" mode="widthFix" style="width: 100%;height: auto;"></image>
  8. </view>
  9. <view class="tipspop-con">
  10. <text class="tipspop-title">建议逐集观看,学习效果更佳</text>
  11. <text class="tipspop-desc">是否返回逐集观看?</text>
  12. </view>
  13. <view class="tipspop-footer">
  14. <text class="tipspop-footer-btn tipspop-footer-l" @click="handleClick('cancel')">取消</text>
  15. <text class="tipspop-footer-btn" @click="handleClick('confirm')">确认</text>
  16. </view>
  17. </view>
  18. <view class="jianyi_icon_flex">
  19. <view class="jianyi_icon_box">
  20. <image class="jianyi_icon" src="@/static/images/ad/jianyi_icon.png" mode="aspectFill"></image>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. height: uni.getSystemInfoSync().windowHeight,
  31. width: uni.getSystemInfoSync().windowWidth,
  32. index: null,
  33. };
  34. },
  35. created() {
  36. const that = this;
  37. uni.$on('getTipShowType', (data) => {
  38. this.index = data.index
  39. })
  40. },
  41. beforeDestroy() {
  42. uni.$off('getTipShowType');
  43. },
  44. methods: {
  45. handleClick(type) {
  46. const data = {
  47. type: type,
  48. extraData: this.index
  49. }
  50. uni.$emit('getEventType', data);
  51. }
  52. }
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. @mixin u-flex($flexD, $alignI, $justifyC) {
  57. display: flex;
  58. flex-direction: $flexD;
  59. align-items: $alignI;
  60. justify-content: $justifyC;
  61. }
  62. .subnvue {
  63. @include u-flex(column, center, center);
  64. }
  65. .tipspopbox{
  66. position: relative;
  67. padding-top: 74rpx;
  68. @include u-flex(column, center, center);
  69. .jianyi_icon_flex {
  70. width: 630rpx;
  71. @include u-flex(row, center, center);
  72. position: absolute;
  73. left:0;
  74. top: 0;
  75. }
  76. .jianyi_icon_box {
  77. width: 124rpx;
  78. height: 124rpx;
  79. border-radius: 50%;
  80. background-image:linear-gradient(to bottom,#FF9B45, #FF5C03);
  81. border: 12rpx solid #FFFFFF;
  82. @include u-flex(row, center, center);
  83. }
  84. .jianyi_icon {
  85. height: 64rpx;
  86. width: 64rpx;
  87. }
  88. }
  89. .tipspop {
  90. width: 630rpx;
  91. // height: 376rpx;
  92. padding-bottom: 40rpx;
  93. background: linear-gradient(to bottom, #FFEDE3, #FFFFFF);
  94. border-radius: 32rpx 32rpx 32rpx 32rpx;
  95. position: relative;
  96. text-align: center;
  97. .tc_bg {
  98. width: 630rpx;
  99. // height: auto;
  100. border-radius: 32rpx 32rpx 0 0;
  101. overflow: hidden;
  102. }
  103. &-con {
  104. padding: 0 48rpx;
  105. text-align: center;
  106. }
  107. &-title {
  108. display: inline-flex;
  109. text-align: center;
  110. margin: 14rpx 0 20rpx 0;
  111. font-weight: 500;
  112. font-size: 34rpx;
  113. color: #333333;
  114. }
  115. &-desc {
  116. display: inline-flex;
  117. text-align: center;
  118. font-family: PingFang SC, PingFang SC;
  119. font-weight: 400;
  120. font-size: 28rpx;
  121. color: #757575;
  122. }
  123. &-footer {
  124. padding-top: 34rpx;
  125. @include u-flex(row, center, center);
  126. &-btn {
  127. width: 248rpx;
  128. height: 84rpx;
  129. line-height: 84rpx;
  130. text-align: center;
  131. background: #FF5C03;
  132. border-radius: 42rpx 42rpx 42rpx 42rpx;
  133. font-family: PingFang SC, PingFang SC;
  134. font-weight: 500;
  135. font-size: 32rpx;
  136. color: #FFFFFF;
  137. }
  138. .tipspop-footer-l {
  139. margin-right: 38rpx;
  140. background: #F4F4F4;
  141. color: #757575;
  142. }
  143. }
  144. }
  145. </style>