| | |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/uview-components/uview-ui' |
| | | import '@/components/uview-components/uview-ui'; |
| | | |
| | | |
| | | /************接口API***************/ |
| | | import { getGoods, getGoodsList, getMpScene, getGoodsDistribution } from "@/api/goods.js"; |
| | | import * as API_trade from "@/api/trade.js"; |
| | |
| | | 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, |
| | |
| | | // #endif |
| | | navbarListData: [ |
| | | //导航栏列表栏数据 |
| | | { |
| | | title: "首页", |
| | | icon: "home-fill", |
| | | ___type: "other", |
| | | }, |
| | | // { |
| | | // title: "首页", |
| | | // icon: "home-fill", |
| | | // ___type: "other", |
| | | // }, |
| | | { |
| | | title: "购物车", |
| | | icon: "bag-fill", |
| | | ___type: "other", |
| | | }, |
| | | { |
| | | title: "搜索", |
| | | icon: "search", |
| | | ___type: "category", |
| | | }, |
| | | // { |
| | | // title: "搜索", |
| | | // icon: "search", |
| | | // ___type: "category", |
| | | // }, |
| | | { |
| | | title: "个人中心", |
| | | icon: "account-fill", |
| | |
| | | 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; |