analysis-box.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view>
  3. <view class="block" v-if="subscribe">
  4. <view class="item-container" @click="navRoseChart">
  5. <view class="analysis-name">
  6. <view class="t-icon t-icon-xtubiao-"></view>
  7. <text class="analysis-text">优劣科目分析</text>
  8. </view>
  9. </view>
  10. <view class="item-container" @click="navRadarChart">
  11. <view class="analysis-name">
  12. <view class="t-icon t-icon-xtubiao-3"></view>
  13. <text class="analysis-text">考试能力分析</text>
  14. </view>
  15. </view>
  16. <view class="item-container" @click="navArcbarChart">
  17. <view class="analysis-name">
  18. <view class="t-icon t-icon-xtubiao-6"></view>
  19. <text class="analysis-text">成绩占比分析</text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="nosub-box" v-if="!subscribe" @click="getSubscribe">
  24. <view style="display: flex; align-items: center;margin: 30rpx 0 0 15rpx;">
  25. <!-- <view class="t-icon t-icon-xtubiao-3" style="width: 50rpx;height: 50rpx;"></view> -->
  26. <view class="nosub-text">综合分析模块</view>
  27. </view>
  28. <view class="nosub-content">孩子成绩综合全面分析</view>
  29. <view class="nosub-content">点击订阅</view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import {
  35. mapState ,mapMutations
  36. } from 'vuex'
  37. export default {
  38. name: "analysis-box",
  39. computed: {
  40. ...mapState('m_parent', ['subscribe']),
  41. },
  42. data() {
  43. return {
  44. };
  45. },
  46. methods: {
  47. ...mapMutations('m_parent',['updateSubscribe']),
  48. //获取订阅
  49. getSubscribe() {
  50. this.updateSubscribe(true)
  51. const orderInfo = {
  52. order_price: 0.01,
  53. }
  54. //获取服务供应商
  55. // uni.getProvider({
  56. // service: 'payment',
  57. // success: function(res) {
  58. // console.log(res.provider)
  59. // if (res.provider.indexOf('wxpay')) {
  60. // //调用客户端支付api
  61. // uni.requestPayment({
  62. // provider: res.provider,
  63. // orderInfo: orderInfo
  64. // })
  65. // }
  66. // }
  67. // })
  68. },
  69. //导航玫瑰图页面
  70. navRoseChart(e) {
  71. console.log(e);
  72. uni.navigateTo({
  73. url: "/gradepkg/rose-chart/rose-chart"
  74. })
  75. },
  76. //导航雷达图页面
  77. navRadarChart(e) {
  78. console.log(e);
  79. uni.navigateTo({
  80. url: "/gradepkg/radar-chart/radar-chart"
  81. })
  82. },
  83. //导航到进度条页面
  84. navArcbarChart(e) {
  85. console.log(e);
  86. uni.navigateTo({
  87. url: "/gradepkg/arcbar-chart/arcbar-chart"
  88. })
  89. },
  90. }
  91. }
  92. </script>
  93. <style lang="scss">
  94. .block {
  95. display: flex;
  96. flex-direction: column;
  97. justify-content: space-between;
  98. width: 347rpx;
  99. height: 345rpx;
  100. .item-container {
  101. display: flex;
  102. align-items: center;
  103. border-radius: 16rpx;
  104. background-color: #FFFFFF;
  105. box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
  106. width: 347rpx;
  107. height: 100rpx;
  108. .analysis-name {
  109. display: flex;
  110. align-items: center;
  111. justify-content: flex-start;
  112. width: 100%;
  113. margin: 20rpx 0rpx 20rpx 40rpx;
  114. .analysis-text {
  115. margin: 26rpx;
  116. font-size: 30rpx;
  117. font-weight: bold;
  118. color: #3B4144;
  119. }
  120. }
  121. }
  122. }
  123. .nosub-box {
  124. display: flex;
  125. flex-direction: column;
  126. border-radius: 16rpx;
  127. background: $card-back-base64;
  128. background-size: cover; //背景图片自适应
  129. box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
  130. width: 347rpx;
  131. height: 345rpx;
  132. .nosub-text {
  133. font-size: 40rpx;
  134. font-weight: bold;
  135. margin-left: 10rpx;
  136. background-image: linear-gradient(to right, #a56d58, #e8997d);
  137. background-clip: text;//裁剪成文字的前景色
  138. color: transparent;//文字颜色变成透明
  139. }
  140. .nosub-content {
  141. margin: 25rpx 65rpx 0 25rpx;
  142. font-size: 45rpx;
  143. font-weight: bold;
  144. background-image: linear-gradient(to right, #a56d58, #e8997d);
  145. background-clip: text;//裁剪成文字的前景色
  146. color: transparent;//文字颜色变成透明
  147. }
  148. }
  149. </style>