|
@@ -11,57 +11,59 @@
|
|
|
<div class="swiper-container" id="goodlist">
|
|
|
<ul class="swiper-wrapper">
|
|
|
<li class="swiper-slide" v-for="(i, index) in tagclick.data.products" :key="index">
|
|
|
- <viewimg :list="i.pics" :keyid="`viewimg_${index + 1}`" />
|
|
|
+ <div>
|
|
|
+ <viewimg :list="i.pics" :keyid="`viewimg_${index + 1}`" />
|
|
|
|
|
|
- <div class="info">
|
|
|
- <p>{{ i.name }}</p>
|
|
|
- <div v-if="i.skus">
|
|
|
- <span>{{ i.price[0].symbol }}</span
|
|
|
- ><span>{{ i.currentSku.price }}</span>
|
|
|
+ <div class="info">
|
|
|
+ <p>{{ i.name }}</p>
|
|
|
+ <div v-if="i.skus">
|
|
|
+ <span>{{ i.price[0].symbol }}</span
|
|
|
+ ><span>{{ i.currentSku.price }}</span>
|
|
|
+ </div>
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>規格:</span>
|
|
|
+ <ul>
|
|
|
+ <li @click.stop="onClickSku(item)" :class="{ active: item.id == i.currentSku.id }" v-for="(item, idx) in i.skus" :key="idx">
|
|
|
+ <span v-if="item.properties[0]">
|
|
|
+ {{ item.properties[0].value }}
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>數量:</span>
|
|
|
+ <div class="number">
|
|
|
+ <ui-icon
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ i.cartnum--;
|
|
|
+ i.cartnum = Math.max(i.cartnum, 0);
|
|
|
+ }
|
|
|
+ "
|
|
|
+ type="cad-neiqiang"
|
|
|
+ ></ui-icon>
|
|
|
+ <input maxlength="5" v-model="i.cartnum" type="number" />
|
|
|
+ <ui-icon
|
|
|
+ @click="
|
|
|
+ () => {
|
|
|
+ i.cartnum++;
|
|
|
+ i.cartnum = Math.min(i.cartnum, 9999);
|
|
|
+ }
|
|
|
+ "
|
|
|
+ type="add"
|
|
|
+ ></ui-icon>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="goods-button">
|
|
|
+ <span v-if="i.saleChannel == 1" class="tipss">僅供線下門店購買</span>
|
|
|
+ <template v-else>
|
|
|
+ <div @click.stop="viewDetail(i)">查看詳情</div>
|
|
|
+ <div @click.stop="addCart(i)">加入購物車</div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>規格:</span>
|
|
|
- <ul>
|
|
|
- <li @click.stop="onClickSku(item)" :class="{ active: item.id == i.currentSku.id }" v-for="(item, idx) in i.skus" :key="idx">
|
|
|
- <span v-if="item.properties[0]">
|
|
|
- {{ item.properties[0].value }}
|
|
|
- </span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>數量:</span>
|
|
|
- <div class="number">
|
|
|
- <ui-icon
|
|
|
- @click="
|
|
|
- () => {
|
|
|
- i.cartnum--;
|
|
|
- i.cartnum = Math.max(i.cartnum, 0);
|
|
|
- }
|
|
|
- "
|
|
|
- type="cad-neiqiang"
|
|
|
- ></ui-icon>
|
|
|
- <input maxlength="5" v-model="i.cartnum" type="number" />
|
|
|
- <ui-icon
|
|
|
- @click="
|
|
|
- () => {
|
|
|
- i.cartnum++;
|
|
|
- i.cartnum = Math.min(i.cartnum, 9999);
|
|
|
- }
|
|
|
- "
|
|
|
- type="add"
|
|
|
- ></ui-icon>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="goods-button">
|
|
|
- <span v-if="i.saleChannel == 1" class="tipss">僅供線下門店購買</span>
|
|
|
- <template v-else>
|
|
|
- <div @click.stop="viewDetail(i)">查看詳情</div>
|
|
|
- <div @click.stop="addCart(i)">加入購物車</div>
|
|
|
- </template>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -292,108 +294,111 @@ onMounted(() => {
|
|
|
position: relative;
|
|
|
font-size: 0;
|
|
|
overflow: hidden;
|
|
|
+
|
|
|
+ > div {
|
|
|
background: #fff;
|
|
|
padding-bottom: 14px;
|
|
|
|
|
|
- .info {
|
|
|
- font-size: 14px;
|
|
|
- color: #131d34;
|
|
|
- padding: 16px 20px;
|
|
|
- > p {
|
|
|
- font-size: 16px;
|
|
|
- width: 100%;
|
|
|
- line-height: 1.5;
|
|
|
- word-break: break-all;
|
|
|
- }
|
|
|
- > div {
|
|
|
- color: var(--editor-main-color);
|
|
|
- padding: 8px 0px 10px;
|
|
|
- border-bottom: 1px solid #ebebeb;
|
|
|
- > span {
|
|
|
+ .info {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #131d34;
|
|
|
+ padding: 16px 20px;
|
|
|
+ > p {
|
|
|
font-size: 16px;
|
|
|
- &:first-of-type {
|
|
|
- font-size: 12px;
|
|
|
- margin-right: 4px;
|
|
|
- }
|
|
|
+ width: 100%;
|
|
|
+ line-height: 1.5;
|
|
|
+ word-break: break-all;
|
|
|
}
|
|
|
- }
|
|
|
- > ul {
|
|
|
- padding: 12px 0;
|
|
|
- border-bottom: 1px solid #ebebeb;
|
|
|
-
|
|
|
- > li {
|
|
|
- margin: 10px 0;
|
|
|
- color: #909090;
|
|
|
- &:last-of-type {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- }
|
|
|
+ > div {
|
|
|
+ color: var(--editor-main-color);
|
|
|
+ padding: 8px 0px 10px;
|
|
|
+ border-bottom: 1px solid #ebebeb;
|
|
|
> span {
|
|
|
- font-size: 12px;
|
|
|
+ font-size: 16px;
|
|
|
+ &:first-of-type {
|
|
|
+ font-size: 12px;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
}
|
|
|
- > ul {
|
|
|
- display: block;
|
|
|
- > li {
|
|
|
- display: inline-block;
|
|
|
- > span {
|
|
|
+ }
|
|
|
+ > ul {
|
|
|
+ padding: 12px 0;
|
|
|
+ border-bottom: 1px solid #ebebeb;
|
|
|
+
|
|
|
+ > li {
|
|
|
+ margin: 10px 0;
|
|
|
+ color: #909090;
|
|
|
+ &:last-of-type {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ > span {
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ > ul {
|
|
|
+ display: block;
|
|
|
+ > li {
|
|
|
display: inline-block;
|
|
|
- border: 1px solid #ebebeb;
|
|
|
- padding: 2px 4px;
|
|
|
- min-width: 73px;
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- margin: 8px 8px 0 0;
|
|
|
- text-align: center;
|
|
|
- border-radius: 4px;
|
|
|
- font-size: 12px;
|
|
|
- }
|
|
|
- &.active {
|
|
|
> span {
|
|
|
- border: solid 1px var(--editor-main-color);
|
|
|
- color: var(--editor-main-color);
|
|
|
+ display: inline-block;
|
|
|
+ border: 1px solid #ebebeb;
|
|
|
+ padding: 2px 4px;
|
|
|
+ min-width: 73px;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ margin: 8px 8px 0 0;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ &.active {
|
|
|
+ > span {
|
|
|
+ border: solid 1px var(--editor-main-color);
|
|
|
+ color: var(--editor-main-color);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .number {
|
|
|
- display: flex;
|
|
|
- i {
|
|
|
- font-size: 12px;
|
|
|
- border: 1px solid #ebebeb;
|
|
|
- padding: 2px 8px;
|
|
|
- border-radius: 15px;
|
|
|
- }
|
|
|
- input {
|
|
|
- max-width: 40px;
|
|
|
- text-align: center;
|
|
|
- color: #131d34;
|
|
|
+ .number {
|
|
|
+ display: flex;
|
|
|
+ i {
|
|
|
+ font-size: 12px;
|
|
|
+ border: 1px solid #ebebeb;
|
|
|
+ padding: 2px 8px;
|
|
|
+ border-radius: 15px;
|
|
|
+ }
|
|
|
+ input {
|
|
|
+ max-width: 40px;
|
|
|
+ text-align: center;
|
|
|
+ color: #131d34;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .goods-button {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- font-size: 16px;
|
|
|
- padding: 0 20px;
|
|
|
+ .goods-button {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 16px;
|
|
|
+ padding: 0 20px;
|
|
|
|
|
|
- > div {
|
|
|
- height: 42px;
|
|
|
- background: #ff8e24;
|
|
|
- border-radius: 4px;
|
|
|
- width: 48%;
|
|
|
- text-align: center;
|
|
|
- line-height: 42px;
|
|
|
- &:last-of-type {
|
|
|
- background: var(--editor-main-color);
|
|
|
+ > div {
|
|
|
+ height: 42px;
|
|
|
+ background: #ff8e24;
|
|
|
+ border-radius: 4px;
|
|
|
+ width: 48%;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 42px;
|
|
|
+ &:last-of-type {
|
|
|
+ background: var(--editor-main-color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tipss {
|
|
|
+ color: #909090;
|
|
|
+ display: inline-block;
|
|
|
+ margin: 0 auto;
|
|
|
}
|
|
|
- }
|
|
|
- .tipss {
|
|
|
- color: #909090;
|
|
|
- display: inline-block;
|
|
|
- margin: 0 auto;
|
|
|
}
|
|
|
}
|
|
|
}
|