|
@@ -134,31 +134,12 @@
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
- <view class="dialog" v-if="dialog.show==true" @tap="dialogClose">
|
|
|
|
- <view class="dialog_1" v-if="dialog.type=='1'">
|
|
|
|
- <swiper class="swiper" circular @change="diaSpecs" :current="is_specs">
|
|
|
|
- <swiper-item class="list" v-for="(item,index) in specsList" :key="index">
|
|
|
|
- <view class="list_1">
|
|
|
|
- <image class="image"
|
|
|
|
- :src="item.file&&item.file.length>0?item.file[0].url:info.goods.file[0].url"
|
|
|
|
- mode="aspectFit"></image>
|
|
|
|
- </view>
|
|
|
|
- <view class="name">
|
|
|
|
- <text>{{item.name}}</text>
|
|
|
|
- </view>
|
|
|
|
- </swiper-item>
|
|
|
|
- </swiper>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
- goodsInfo: {
|
|
|
|
- type: Object,
|
|
|
|
- },
|
|
|
|
info: {
|
|
info: {
|
|
type: Object,
|
|
type: Object,
|
|
},
|
|
},
|
|
@@ -174,9 +155,6 @@
|
|
is_specs: {
|
|
is_specs: {
|
|
type: Number
|
|
type: Number
|
|
},
|
|
},
|
|
- buy_num: {
|
|
|
|
- type: Number
|
|
|
|
- },
|
|
|
|
is_zero: {
|
|
is_zero: {
|
|
type: Boolean
|
|
type: Boolean
|
|
},
|
|
},
|
|
@@ -193,6 +171,7 @@
|
|
actList: [],
|
|
actList: [],
|
|
setList: [],
|
|
setList: [],
|
|
specsList: [],
|
|
specsList: [],
|
|
|
|
+ buy_num: 1,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -204,9 +183,9 @@
|
|
const that = this;
|
|
const that = this;
|
|
that.$emit('toSpecs', item)
|
|
that.$emit('toSpecs', item)
|
|
},
|
|
},
|
|
- toCount() {
|
|
|
|
|
|
+ toCount(e) {
|
|
const that = this;
|
|
const that = this;
|
|
- that.$emit('toCount')
|
|
|
|
|
|
+ that.$emit('toCount', e)
|
|
},
|
|
},
|
|
toMarket() {
|
|
toMarket() {
|
|
const that = this;
|
|
const that = this;
|
|
@@ -232,37 +211,36 @@
|
|
const that = this;
|
|
const that = this;
|
|
that.$emit('toSetMarket', item)
|
|
that.$emit('toSetMarket', item)
|
|
},
|
|
},
|
|
- dialogClose() {
|
|
|
|
- const that = this;
|
|
|
|
- that.$emit('dialogClose')
|
|
|
|
- },
|
|
|
|
diaSpecs() {
|
|
diaSpecs() {
|
|
const that = this;
|
|
const that = this;
|
|
that.$emit('diaSpecs')
|
|
that.$emit('diaSpecs')
|
|
},
|
|
},
|
|
|
|
+ toDeatil(item) {
|
|
|
|
+ const that = this;
|
|
|
|
+ that.$emit('toDeatil', item)
|
|
|
|
+ },
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
specsInfo: {
|
|
specsInfo: {
|
|
deep: true,
|
|
deep: true,
|
|
immediate: true,
|
|
immediate: true,
|
|
handler(val) {
|
|
handler(val) {
|
|
- if (val && val?.file.length > 0) this.$set(this, `specfileList`, val?.file)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- goodsInfo: {
|
|
|
|
- deep: true,
|
|
|
|
- immediate: true,
|
|
|
|
- handler(val) {
|
|
|
|
- if (val && val?.file.length > 0) this.$set(this, `goodsfileList`, val?.file)
|
|
|
|
|
|
+ if (val && val.file && val.file.length > 0) this.$set(this, `specfileList`, val?.file)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
info: {
|
|
info: {
|
|
deep: true,
|
|
deep: true,
|
|
immediate: true,
|
|
immediate: true,
|
|
handler(val) {
|
|
handler(val) {
|
|
- if (val && val?.act.length > 0) this.$set(this, `actList`, val?.act)
|
|
|
|
- if (val && val?.sets.length > 0) this.$set(this, `setList`, val?.sets)
|
|
|
|
- if (val && val?.specs.length > 0) this.$set(this, `specsList`, val?.specs)
|
|
|
|
|
|
+ if (val && val.goods && val?.goods.length > 0) {
|
|
|
|
+ this.$set(this, `goodsInfo`, val?.goods)
|
|
|
|
+ if (val.goods && val.goods.file && val.goods.file.length > 0) {
|
|
|
|
+ this.$set(this, `goodsfileList`, val.goods.file)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (val && val.act && val.act.length > 0) this.$set(this, `actList`, val?.act)
|
|
|
|
+ if (val && val.sets && val.sets.length > 0) this.$set(this, `setList`, val?.sets)
|
|
|
|
+ if (val && val.specs && val.specs.length > 0) this.$set(this, `specsList`, val?.specs)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -271,6 +249,11 @@
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
.specs {
|
|
.specs {
|
|
|
|
+ position: relative;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ height: 54vh;
|
|
|
|
+
|
|
.specs_1 {
|
|
.specs_1 {
|
|
position: relative;
|
|
position: relative;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -584,52 +567,5 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- .dialog {
|
|
|
|
- position: fixed;
|
|
|
|
- width: 100vw;
|
|
|
|
- height: 100vh;
|
|
|
|
- background-color: #000000;
|
|
|
|
- z-index: 99999;
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- justify-content: center;
|
|
|
|
-
|
|
|
|
- swiper {
|
|
|
|
- height: 60vh;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .list {
|
|
|
|
- .list_1 {
|
|
|
|
- padding: 2vw;
|
|
|
|
- margin: 0 0 5vw 0;
|
|
|
|
-
|
|
|
|
- .image {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 40vh;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .name {
|
|
|
|
- text-align: center;
|
|
|
|
- margin: 0 10vw;
|
|
|
|
- background-color: #6666669f;
|
|
|
|
- border-radius: 25px;
|
|
|
|
- padding: 2vw;
|
|
|
|
-
|
|
|
|
- text {
|
|
|
|
- color: #fff;
|
|
|
|
- font-size: 15px;
|
|
|
|
- overflow: hidden;
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
- -webkit-line-clamp: 2;
|
|
|
|
- word-break: break-all;
|
|
|
|
- display: -webkit-box;
|
|
|
|
- -webkit-box-orient: vertical;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|