improve-popup-content.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="improve-popup-content w-screen fx-col rounded-t-lg">
  3. <view class="fx-row fx-cen-cen h-[50px] improve-title">
  4. <view class="text-white pb-15 pl-15">提升录取概率方法</view>
  5. </view>
  6. <view class="fx-col fx-cen-cen pt-10 pb-20 text-primary-light">
  7. <text>{{ data.majorName }}</text>
  8. <text class="text-2xs">{{ data.majorDirection }}</text>
  9. </view>
  10. <view class="mx-20 rounded-t-lg bg-white fx-col p-20">
  11. <view class="fx-row fx-bet-cen gap-30 pt-10">
  12. <view v-for="(rule,idx) in displayImproves" :key="idx"
  13. class="flex-1 fx-row fx-bet-cen mx-border rounded p-20"
  14. :style="{opacity: rule.missingValue == 0 ? 0.7: 1}">
  15. <view class="flex-1 pr-20">
  16. <view class="text-2xs text-tips">
  17. 您的{{ rule.improveType }}还需提升
  18. </view>
  19. <view class="text-2xl text-main font-bold">
  20. {{ rule.missingValue == 0 ? '-' : rule.missingValue }}
  21. <text class="ml-10 text-sm font-light text-content">分</text>
  22. </view>
  23. </view>
  24. <uv-image :src="ruleIcons[idx%ruleIcons.length]" width="35" height="40"/>
  25. </view>
  26. </view>
  27. <uv-cell-group title="方法提示" class="mt-20">
  28. <uv-cell v-for="item in doList" :key="item.title" :icon="item.icon" :title="item.title"
  29. :label="item.label"
  30. icon-style="width:44px; height:44px; margin-right:12px">
  31. <view slot="value">
  32. <uv-button v-bind="miniBtnBinding" size="mini" :text="item.btnText"/>
  33. </view>
  34. </uv-cell>
  35. </uv-cell-group>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import AIFormCommonStyle from "@/pages/ie/components/AIFormCommonStyle";
  41. export default {
  42. name: "improve-popup-content",
  43. mixins: [AIFormCommonStyle],
  44. props: {
  45. data: {
  46. type: Object,
  47. default: null
  48. }
  49. },
  50. data() {
  51. return {
  52. ruleIcons: ['/static/ie/report/improve-rule-base.png', '/static/ie/report/improve-rule-skill.png'],
  53. doList: [{
  54. icon: '/static/ie/report/improve-do-exercise.png',
  55. title: '刷题训练提分',
  56. label: '针对性练习',
  57. btnText: '立即练习'
  58. }, {
  59. icon: '/static/ie/report/improve-do-buy.png',
  60. title: '购买资料',
  61. label: '考点归纳,答题技巧',
  62. btnText: '立即购买'
  63. }, {
  64. icon: '/static/ie/report/improve-do-training.png',
  65. title: '进行培训',
  66. label: '一对一个性化培训',
  67. btnText: '立即培训'
  68. }]
  69. }
  70. },
  71. computed: {
  72. miniBtnBinding() {
  73. return {
  74. ...this.gradientBtnBinding,
  75. customStyle: {height: '30px', padding: '0 12px'}
  76. }
  77. },
  78. displayImproves() {
  79. // TODO: improve filter
  80. return this.data.improves || []
  81. }
  82. }
  83. }
  84. </script>
  85. <style scoped lang="scss">
  86. .improve-popup-content {
  87. background: linear-gradient(0, #ADD9FF, #E6F8FF);
  88. }
  89. .improve-title {
  90. background-image: url("~@/static/ie/report/improve-title-bg.png");
  91. background-repeat: no-repeat;
  92. background-size: contain;
  93. background-position: top center;
  94. }
  95. </style>