Blame view

src/views/cards/CardList.vue 2 KB
8b40a4fc   刘淇   会员卡
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  <template>
    <div style="padding: 15px">
      <div class="cardBg">
        <ul class="cardList" @click="$router.push({path:'buyCard'})">
          <li style="display: flex;justify-content: space-between">
            <span style="background: blue;padding: 2px 8px;">月卡</span> <span>测试</span>
          </li>
          <li>
            +  购买会员卡
          </li>
          <li>
            ¥  100.00
          </li>
          <li>
            活动有效期: 2021.05.11 - 2022.01.31
          </li>
        </ul>
      </div>
      <div class="cardBg">
        <ul class="cardList">
          <li style="display: flex;justify-content: space-between">
            <span style="background: blue;padding: 2px 8px;">月卡</span> <span>测试</span>
          </li>
          <li>
            +  购买会员卡
          </li>
          <li>
            ¥  100.00
          </li>
          <li>
            活动有效期: 2021.05.11 - 2022.01.31
          </li>
        </ul>
      </div>
    </div>
  </template>
  
  <script>
  import { queryVipAreaCardByOrgId } from "@/api/cards/cards";
  
  export default {
    name: "CardList",
    data(){
      return{
  
      }
    },
    mounted(){
      this.queryVipAreaCardByOrgId()
    },
    methods:{
      queryVipAreaCardByOrgId: function() {
        let jsondata = this.$utils.commonParams();
        jsondata.saleChannel = '3' // 售卖渠道:1-APP、2-公众号、3-平台
        jsondata.sign = this.$utils.signObject(jsondata);
        queryVipAreaCardByOrgId(jsondata).then(data => {
          console.log(data);
          if (data.code == 0) {
            let res = data.data;
          } else {
            this.$vux.toast.text(data.message, "top");
          }
        });
      }
    }
  };
  </script>
  
  <style scoped lang="scss">
    .cardBg {
      width: 100%;
      height: 150px;
      background: #0099FF url("../../assets/images/cards/cards.png") no-repeat 20px 20px;
      background-size: 90% 90%;
      border-radius: 8px;
      margin-bottom: 15px;
    }
  
    .cardList {
      padding: 20px 20px 0 20px;
      color: #fff;
      li {
        margin-bottom: 10px;
        /*line-height: 30px;*/
      }
    }
  </style>