Blame view

pc-master/src/views/userCenter/myEvaluate/evaluateList.vue 5.3 KB
3f535f30   杨鑫   '初始'
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
  <template>
      <div class="evaluateList">
      <div class="sub-main" v-if="data.length > 0">
          <div class="content" v-for="(item,index) in data" :key="index">
              <div class="head">
                  <img :src="item.shopLogo" style="width:17px; height:17px;"/>&nbsp;{{item.shopName}}
              </div>
              <div class="productBox">
                  <div class="product">
                      <div class="left fs13">
                          <div class="box">
                              <div class="desc">
                                  <img :src="item.productImage" alt="">
                                  <div>
                                      <p class="name">{{item.productName}}</p>
                                      <p class="size font-color-999"><span v-for="(val,idx) in item.values" :key="idx">{{val}}</span></p>
                                  </div>
                              </div>
                          </div>
                      </div>
                      <div class="right">
                          <div class="time">
                              <p>{{item.value}}</p>
                          </div>
                          <div class="operate">
                              <div>
                                  <p v-if="item.comment === ''" @click="emit('eva',item)">评价</p>
                                  <p v-if="item.comment !== ''" @click="emit('detail',item)">查看评价</p>
                                  <p v-if="item.ifAdd==0 && item.comment !== ''" @click="emit('addEva',item)">去追评</p>
                              </div>
                          </div>
                      </div>
                  </div>
              </div>
          </div>
      </div>
      <div class="nothing" v-else>
          <icon-svg style="width: 240px; height: 240px; margin-bottom: 20px;" icon-class="user-order-nodata" />
          <p class="fs20 font-color-999">你还没有评价~</p>
      </div>
      </div>
  </template>
  
  <script>
  export default {
      props: {
          data: {
              type: Array,
              default: () => []
          }
      },
      methods: {
          emit (key, val) {
              this.$emit(key, val)
          }
      }
  }
  </script>
  
  <style lang="scss" scoped>
  .evaluateList{
      .content{
          width: 100%;
          margin-bottom: 20px;
          border: 1px solid #E5E5E5;
          border-bottom: 0;
          box-sizing: border-box;
          .head{
              width: 100%;
              height: 40px;
              padding-left: 15px;
              color: #FFF;
              background-color: #333333;
              display: flex;
              align-items: center;
          }
          .productBox{
              width: 100%;
              box-sizing: border-box;
              .product{
                  width: 100%;
                  display: flex;
                  .left{
                      flex: 1;
                      .box{
                          padding: 20px 0 20px 20px;
                          display: flex;
                          border-bottom: 1px solid #E5E5E5;
                          .desc{
                              flex: 1;
                              display: flex;
                              img{
                                  width: 86px;
                                  height: 86px;
                                  margin-right: 10px;
                              }
                              div{
                                  display: flex;
                                  flex-direction: column;
                                  justify-content: space-between;
                                  .name{
                                      font-size: 14px;
                                  }
                                  .size{
                                      font-size: 13px;
                                      span{
                                          margin-right: 10px;
                                      }
                                      span:last-child{
                                          margin-right: 0;
                                      }
                                  }
                              }
                          }
                      }
                  }
                  .right{
                      padding: 20px 20px 20px 0;
                      flex: 2;
                      display: flex;
                      border-bottom: 1px solid #E5E5E5;
                      .time,.operate{
                          display: flex;
                          justify-content: center;
                          align-items: center;
                          div{
                              text-align: center;
                              .el-button{
                                  border: 1px solid $mainGlod;
                                  color: $mainGlod;
                                  border-radius: 0;
                              }
                              p{
                                  padding: 7px 23px;
                                  color: $mainGlod;
                                  border: 1px solid #F3F4F5;
                                  cursor: pointer;
                              }
                          }
                      }
                      .time{
                          flex: 1;
                      }
                  }
              }
          }
      }
      .nothing{
          width: 100%;
          text-align: center;
          min-height: 400px;
          p{
              margin-bottom: 20px;
          }
      }
  }
  </style>