quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<template>
  <!--
        作者:luoyiming
        时间:2020-06-20
        描述:diy组件-模拟显示-限时拼团
    -->
  <div class="drag optional" :class="{ selected: index === selectedIndex }"
    @click.stop="$parent.$parent.onEditer(index)">
    <div class="diy-sharpproduct" style="background: #ffffff">
      <div class="sharpproduct-head d-b-c">
        <img v-img-url="item.style.background_image" />
      </div>
      <ul class="product-list assemble" :class="['column__3']" :style="getUlwidth(item)">
        <li class="product-item" v-for="(product, index) in item.data" :key="index">
          <div v-if="item.style.show.productName == '1'" class="product-title">{{ product.product_name }}</div>
          <div class="d-b-s">
            <div class="product-cover">
              <img v-img-url="product.image" />
              <div class="desc-situation product-sale">
                <span class="">2人团</span>
              </div>
            </div>
            <div class="flex-1">
              <div class="">
                <div class="f12">
                  <div>
                    <span v-if="item.style.show.assemblePrice == '1'" style="color:#f6220c;" class="f12">¥</span><span
                      style="color:#f6220c;" class="f16 fb" v-if="item.style.show.assemblePrice == '1'">233.00</span>
                  </div>
                  <div v-if="item.style.show.linePrice == '1'" class="text-d-line-through gray9">¥233</div>
                </div>
              </div>
              <div class="assemble_btns">去开团</div>
            </div>
          </div>
 
 
        </li>
      </ul>
    </div>
    <div class="btn-edit-del">
      <div class="btn-del" @click.stop="$parent.$parent.onDeleleItem(index)">删除</div>
    </div>
  </div>
</template>
 
<script>
  export default {
    data() {
      return {
        /*商品列表*/
        tableData: [],
        /*分类id*/
        category_id: 0
      };
    },
    created() {},
    props: ['item', 'index', 'selectedIndex'],
    methods: {
      /*计算宽度*/
      getUlwidth(item) {
        if (item.style.display == 'slide') {
          let total = 0;
          if (item.params.source == 'choice') {
            total = item.data.length;
          } else {
            total = item.defaultData.length;
          }
          let w = 0;
          if (item.style.column == 2) {
            w = total * 150;
          } else {
            w = total * 100;
          }
          return 'width:' + w + 'px;';
        }
      }
    }
  };
</script>
 
<style scoped>
  .diy-sharpproduct {
    padding: 3px 10px;
    background-color: #F2F2F2;
  }
 
  .diy-sharpproduct .product-list.assemble {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    background-color: #FFFFFF;
  }
 
  .diy-sharpproduct .product-list.assemble .product-title {
    height: 40px;
    line-height: 20px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    margin-bottom: 18px;
  }
 
  .diy-sharpproduct .product-list.assemble .price {
    margin: 0 auto;
    margin-top: 10px;
    margin-bottom: 15px;
    width: 100%;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-align: center;
  }
 
  .diy-sharpproduct .display__list .column__3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
 
  .diy-sharpproduct .product-list.assemble.column__3 {
    overflow-x: scroll;
    flex-wrap: nowrap;
    background: #FFFFFF;
  }
 
  .diy-sharpproduct .product-list.assemble.column__3 .product-item {
    width: 221px;
    margin-right: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #ffffff;
    flex-shrink: 0;
    margin-right: 10px;
    background: linear-gradient(180deg, #FFEFE8 0%, #FFFFFF 100%);
    padding: 15px;
    box-sizing: border-box;
  }
 
  .diy-sharpproduct .product-list.assemble.column__3 .product-item .product-cover {
    width: 63px;
    height: 57px;
    border-radius: 3px;
    background-color: #f6f6f6;
    overflow: hidden;
    position: relative;
  }
 
  .diy-sharpproduct .product-list.assemble.column__3 .product-item .product-cover img {
    width: 63px;
    height: 57px;
    border-radius: 3px;
  }
 
  .diy-sharpproduct .product-list.assemble.column__3 .product-item .product-cover .desc-situation {
    position: absolute;
    bottom: 1px;
    left: 1px;
    background: linear-gradient(60deg, #FC4528 0%, #FC573C 43%, #FC7639 100%);
    color: #FFFFFF !important;
    padding: 0 3px;
    border-top-left-radius: 6px;
    border-bottom-right-radius: 6px;
  }
 
  .diy-sharpproduct .product-list.assemble.column__3 .product-title {
    margin: 0 auto;
    margin-bottom: 8px;
    width: 100%;
    height: 36px;
    line-height: 18px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 12px;
  }
 
  .sharpproduct-head {
    height: 40px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
  }
 
  .sharpproduct-head .name.assemble_name {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
  }
 
  .sharpproduct-head .datetime {
    margin-left: 20px;
  }
 
  .sharpproduct-head .datetime>span {
    display: inline-block;
  }
 
  .sharpproduct-head .datetime .text {
    padding: 0 2px;
  }
 
  .sharpproduct-head .datetime .box {
    padding: 2px;
    background: #000000;
    color: #ffffff;
  }
 
  .diy-sharpproduct .product-list.assemble .assemble_btns {
    line-height: 20px;
    font-size: 10px;
    text-align: center;
    color: #FFFFFF;
    width: 63px;
    height: 20px;
    background: #FF4C01;
    border-radius: 10px;
  }
</style>