猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.9 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <view>
  3. <view class="my-data">
  4. <view class="my-data-mounth">
  5. <cardTitle :cardTitle="nounthName"></cardTitle>
  6. <cardData :cardData="nounthData"></cardData>
  7. </view>
  8. </view>
  9. <view class="my-data">
  10. <view class="my-data-total">
  11. <cardTitle :cardTitle="totalName"></cardTitle>
  12. <cardData :cardData="totalData"></cardData>
  13. </view>
  14. </view>
  15. <view class="bottom box-size child"
  16. :style="{ borderRadius: '16rpx' }" >
  17. <up-parse :content="configList.cumulative_data_statement.paramValueArea"
  18. containerStyle="{
  19. color: '#A55822',
  20. fontSize: '22rpx',
  21. lineHeight: '29rpx',
  22. }"></up-parse>
  23. </view>
  24. </view>
  25. </template>
  26. <script setup>
  27. import cardTitle from '../../components/cardTitle.vue'
  28. import cardData from '../../components/cardData.vue'
  29. import {
  30. ref,
  31. reactive,
  32. computed,
  33. } from "vue"
  34. import { useStore } from 'vuex'
  35. const store = useStore()
  36. const props = defineProps({
  37. dataInfo : {
  38. default : () => {
  39. return {}
  40. }
  41. }
  42. })
  43. const configList = computed(() => {
  44. return store.getters.configList
  45. })
  46. const nounthData = computed(() => {
  47. return [{
  48. title: '当月注册用户',
  49. num: (props.dataInfo.register_users || 0) + "个",
  50. },
  51. {
  52. title: '当月下单用户',
  53. num: (props.dataInfo.order_users || 0) + "个",
  54. },
  55. {
  56. title: '当月有效用户',
  57. num: (props.dataInfo.use_users || 0) + "个",
  58. },
  59. ]
  60. })
  61. const totalData = computed(() => {
  62. return [{
  63. title: '累计注册用户',
  64. num: (props.dataInfo.register_users_sum || 0) + "个",
  65. },
  66. {
  67. title: '累计下单用户',
  68. num: (props.dataInfo.order_users_sum || 0) + "个",
  69. },
  70. {
  71. title: '累计有效用户',
  72. num: (props.dataInfo.use_users_sum || 0) + "个",
  73. color:'red'
  74. },
  75. ]
  76. })
  77. const nounthName = ref('当月数据')
  78. const totalName = ref('累计数据')
  79. </script>
  80. <style scoped lang="scss">
  81. @import "../index.scss";
  82. </style>