analysis-box.vue 3.9 KB

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