shop-detail.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view>
  3. <view class="card">
  4. <view class="center" >
  5. <image style="width: 140rpx;height: 140rpx;margin-top: -80rpx;border-radius: 50%;" :src="detail.cover" mode=""></image>
  6. </view>
  7. <view class="content">
  8. <view class="item" >
  9. <text >商户名称</text>
  10. <text>{{detail.name}}</text>
  11. </view>
  12. <view class="item" >
  13. <text >手机号码</text>
  14. <text>{{detail.personTel}}</text>
  15. </view>
  16. <view class="item" >
  17. <text >联系人</text>
  18. <text>{{detail.personName}}</text>
  19. </view>
  20. <view class="item" >
  21. <text >地址</text>
  22. <text>{{detail.address || '暂无数据'}}</text>
  23. </view>
  24. <view class="item" >
  25. <text >行业</text>
  26. <text>{{detail.labelKey}}</text>
  27. </view>
  28. </view>
  29. </view>
  30. <view style="padding:40rpx 30rpx 10rpx;font-weight: 800;font-size: 32rpx;">
  31. <text>数据看板</text>
  32. </view>
  33. <view class="data-board">
  34. <view class="content">
  35. <view class="item">
  36. <text>{{data.allMembers}}</text>
  37. <text>会员数量</text>
  38. </view>
  39. <view class="item">
  40. <text>{{data.pointsTotalValue}}</text>
  41. <text>积分总价值</text>
  42. </view>
  43. <view class="item">
  44. <text>{{data.totalValue}}</text>
  45. <text>累计收入</text>
  46. </view>
  47. <view class="item">
  48. <text>{{data.transactionNum}}</text>
  49. <text>累计交易笔数</text>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. id:'',
  60. detail:{},
  61. data:{}
  62. }
  63. },
  64. onLoad(options) {
  65. this.id=options.id
  66. this.getDtail()
  67. this.getShopData()
  68. },
  69. methods: {
  70. getDtail(){
  71. this.$api.shop.detail({id:this.id}).then(res=>{
  72. this.detail=res.data
  73. })
  74. },
  75. getShopData(){
  76. this.$api.shop.indexInfo({shopId:this.id}).then(res=>{
  77. this.data=res.data
  78. })
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .card{
  85. background-color: #FFFFFF;
  86. margin-top: 120rpx;
  87. position: relative;
  88. .content{
  89. padding: 10rpx 50rpx 0;
  90. .item{
  91. padding: 30rpx 0;
  92. border-bottom: 1rpx solid #EBEBEB;
  93. display: flex;
  94. justify-content: space-between;
  95. text:first-child{
  96. color: #888888;
  97. }
  98. text:last-child{
  99. color: #303030;
  100. }
  101. }
  102. .item:last-child{
  103. border: none;
  104. }
  105. }
  106. }
  107. .data-board{
  108. margin: 20rpx;
  109. border-radius: 20rpx;
  110. background-image: linear-gradient(to right,#FF8D32,#FBA33D);
  111. .content{
  112. display: flex;
  113. flex-wrap: wrap;
  114. justify-content: space-around;
  115. .item{
  116. padding: 40rpx;
  117. width: 40%;
  118. display: flex;
  119. flex-direction: column;
  120. justify-content: center;
  121. align-items: center;
  122. text:first-child{
  123. font-weight: 800;
  124. font-size: 38rpx;
  125. color: #FFFFFF;
  126. }
  127. text:last-child{
  128. font-size: 26rpx;
  129. color: #FFF6EE;
  130. }
  131. }
  132. }
  133. }
  134. </style>