|
|
@@ -36,7 +36,7 @@
|
|
|
<div class="module-wrap shop-detail">
|
|
|
<div class="module-tit app-size-30">商品详情</div>
|
|
|
<div class="module-det">
|
|
|
- <img :src="imgNormal" alt mode="widthFix" />
|
|
|
+ <!-- <app-img :src="imgNormal" alt mode="widthFix" /> -->
|
|
|
<div class="module-det-text" v-html="data.content"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -56,6 +56,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import AppImg from '@/components/app-img'
|
|
|
import AppSwiper from '@/components/app-swiper'
|
|
|
import AppTag from '@/components/module/app-tag.vue'
|
|
|
import AppTrademark from '@/components/module/app-trademark'
|
|
|
@@ -69,7 +70,8 @@ export default {
|
|
|
AppTag,
|
|
|
AppTrademark,
|
|
|
BuyFoot,
|
|
|
- SelPopup
|
|
|
+ SelPopup,
|
|
|
+ AppImg
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -83,13 +85,13 @@ export default {
|
|
|
this.init()
|
|
|
},
|
|
|
computed: {
|
|
|
- imgNormal() {
|
|
|
- if (!this.$util.isEmpty(this.data)) {
|
|
|
- return this.data.imgList[0].normal
|
|
|
- } else {
|
|
|
- return ''
|
|
|
- }
|
|
|
- }
|
|
|
+ // imgNormal() {
|
|
|
+ // if (!this.$util.isEmpty(this.data)) {
|
|
|
+ // return this.data.imgList[0]
|
|
|
+ // } else {
|
|
|
+ // return ''
|
|
|
+ // }
|
|
|
+ // }
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
@@ -97,11 +99,15 @@ export default {
|
|
|
},
|
|
|
_getDetail() {
|
|
|
getDetail({ id: this.option.id }).then(res => {
|
|
|
+ if (this.$util.isEmpty(res.data)) return false
|
|
|
this.data = res.data
|
|
|
- this.imgList = this.data.imgList.filter(e => {
|
|
|
- e.img = e.middle
|
|
|
- return e
|
|
|
- })
|
|
|
+ let newArr = []
|
|
|
+ for (let i in res.data.imgList) {
|
|
|
+ newArr.push({
|
|
|
+ img: res.data.imgList[i]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.imgList = newArr
|
|
|
})
|
|
|
},
|
|
|
// 更换数量
|