|
@@ -11,15 +11,23 @@
|
|
|
<ul class="productPack clear">
|
|
|
<!-- @click="changePitem(index)" -->
|
|
|
<li v-for="(item, index) in productList" :key="item.id">
|
|
|
- <div class="box" :class="{ selected: item.id == radioV }">
|
|
|
+ <div
|
|
|
+ class="box"
|
|
|
+ :class="{
|
|
|
+ cbox:
|
|
|
+ (index === 0 && admin === '1') ||
|
|
|
+ (index === 1 && admin === '2'),
|
|
|
+ }"
|
|
|
+ >
|
|
|
<img :src="item.img" alt="" />
|
|
|
<p>{{ item.name }}</p>
|
|
|
<span
|
|
|
+ class="stock-span"
|
|
|
v-if="
|
|
|
(index === 0 && admin === '1') || (index === 1 && admin === '2')
|
|
|
"
|
|
|
>可用库存:{{ item.stock }}份</span
|
|
|
- ><span v-else> </span>
|
|
|
+ ><span class="stock-span" v-else> </span>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -288,6 +296,7 @@ export default {
|
|
|
}
|
|
|
.productPack {
|
|
|
width: 100%;
|
|
|
+ // background: #e4393c;
|
|
|
// .packageBox {
|
|
|
// display: flex;
|
|
|
// justify-content: space-between;
|
|
@@ -297,28 +306,42 @@ export default {
|
|
|
list-style: none;
|
|
|
float: left;
|
|
|
width: calc(50% - 5px);
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
// display: inline-block;
|
|
|
// padding: 5px;
|
|
|
&:last-child {
|
|
|
float: right;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
.box {
|
|
|
background: #f5f5f5;
|
|
|
border-radius: 13px;
|
|
|
- padding: 5px 5px 10px 5px;
|
|
|
+ height: 183px;
|
|
|
+ border: 5px solid #f5f5f5;
|
|
|
+ padding: 0 0 5px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ &.cbox {
|
|
|
+ border: 5px solid #ebd593;
|
|
|
+ }
|
|
|
img {
|
|
|
width: 100%;
|
|
|
+ height: 115px;
|
|
|
}
|
|
|
p {
|
|
|
- margin: 10px 0 5px 10px;
|
|
|
+ padding: 8px 0 5px 10px;
|
|
|
+ margin: 0;
|
|
|
font-size: 1.2em;
|
|
|
+ float: left;
|
|
|
+ width: 100%;
|
|
|
font-weight: 600;
|
|
|
color: #1a1a1a;
|
|
|
}
|
|
|
- span {
|
|
|
+ span.stock-span {
|
|
|
margin-left: 10px;
|
|
|
font-size: 1em;
|
|
|
font-weight: 400;
|
|
|
+ height: 14px;
|
|
|
color: #4d4d4d;
|
|
|
}
|
|
|
}
|