| | |
| | | </template> |
| | | |
| | | <script> |
| | | import UIcon from '@/uview-components/uview-ui/components/u-icon/u-icon.vue'; |
| | | import UNavbar from '@/uview-components/uview-ui/components/u-navbar/u-navbar.vue'; |
| | | import UPopup from '@/uview-components/uview-ui/components/u-popup/u-popup.vue'; |
| | | import '@/components/uview-components/uview-ui'; |
| | | |
| | | |
| | | /************接口API***************/ |
| | |
| | | import popups from "@/components/popups/popups"; //气泡框 |
| | | import takeDownFormSaleGoods from "@/components/m-take-down-sale-goods/index"; //下架框 |
| | | import setup from "./product/popup/popup"; |
| | | |
| | | import { |
| | | getSTSToken |
| | | } from '@/api/common.js' |
| | | export default { |
| | | components: { |
| | | popups, |
| | |
| | | GoodsSwiper, |
| | | popupGoods, |
| | | popupAddress, |
| | | takeDownFormSaleGoods, |
| | | UIcon, |
| | | UNavbar, |
| | | UPopup, |
| | | takeDownFormSaleGoods |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | this.$store.state.distributionId = distributionId; |
| | | } |
| | | } |
| | | const sts = await getSTSToken(); |
| | | const stsUrl = sts.data.data.endpoint |
| | | // // 处理数据 |
| | | // goodsList.data.result.records.forEach(item => { |
| | | // if (item.thumbnail !== '' && item.thumbnail !== null && item.thumbnail.indexOf('http') === |
| | | // -1) { |
| | | // item.thumbnail = stsUrl + '/' + item.thumbnail |
| | | // } |
| | | // if (item.goodsVideo !== '' && item.goodsVideo !== null && item.goodsVideo.indexOf( |
| | | // 'http') === -1) { |
| | | // item.goodsVideo = stsUrl + '/' + item.goodsVideo |
| | | // } |
| | | // }) |
| | | /**商品信息以及规格信息存储 */ |
| | | console.log('--------------------------1>',response.data.result.data.goodsGalleryList) |
| | | response.data.result.data.goodsGalleryList.forEach((item,index)=>{ |
| | | if (item !== '' && item !== null && item.indexOf('http') === |
| | | -1) { |
| | | response.data.result.data.goodsGalleryList[index] = stsUrl + '/' + item |
| | | console.log('是否执行-------------》',item) |
| | | } |
| | | }) |
| | | console.log('--------------------------2>',response.data.result.data.goodsGalleryList) |
| | | this.goodsDetail = response.data.result.data; |
| | | if (this.goodsDetail.goodsVideo !== '' && this.goodsDetail.goodsVideo !== null && this.goodsDetail.goodsVideo.indexOf( |
| | | 'http') === -1) { |
| | | this.goodsDetail.goodsVideo = stsUrl + '/' + this.goodsDetail.goodsVideo |
| | | } |
| | | console.log('--------------------------2>',this.goodsDetail.goodsGalleryList) |
| | | this.wholesaleList = response.data.result.wholesaleList; |
| | | this.goodsSpec = response.data.result.specs; |
| | | this.PromotionList = response.data.result.promotionMap; |