From 380b47e37196eaa8c92e89a1751be14013a8a101 Mon Sep 17 00:00:00 2001 From: owen Date: Sun, 24 Sep 2023 23:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=94=80=EF=BC=9A=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=B5=B7=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods_details/index.vue | 13 +------------ pages/users/user_spread_code/index.vue | 9 +-------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index d74690f6..db7e67ef 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -278,7 +278,6 @@ import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js' import { toLogin } from '@/libs/login.js'; import { mapGetters } from "vuex"; - import { imageBase64 } from "@/api/public"; import productConSwiper from '@/components/productConSwiper'; import couponListWindow from '@/components/couponListWindow'; import productWindow from '@/components/productWindow'; @@ -530,7 +529,7 @@ // #ifdef H5 this.make(); this.ShareInfo(); - this.getImageBase64(); + this.imgTop = this.spu.picUrl; // #endif // #ifdef MP this.getQrcode(); @@ -1003,16 +1002,6 @@ "onMenuShareTimeline" ], configAppMessage); }, - /** - * 获得商品的封面 base64 - */ - getImageBase64: function() { - imageBase64({ - url: this.spu.picUrl - }).then(res => { - this.imgTop = res.data.code; - }) - }, /** * 获得小程序的二维码 */ diff --git a/pages/users/user_spread_code/index.vue b/pages/users/user_spread_code/index.vue index 082b5d37..5df3b0a4 100644 --- a/pages/users/user_spread_code/index.vue +++ b/pages/users/user_spread_code/index.vue @@ -42,7 +42,6 @@ import { getQrcode } from '@/api/api.js'; // #endif import home from '@/components/home'; - import { imageBase64 } from "@/api/public"; import * as TradeConfigApi from '@/api/trade/config.js'; export default { components: { @@ -131,13 +130,7 @@ let posterUrls = [] // 生成一个Promise对象的数组 images.forEach(item => { - // TODO @芋艿:imageBase64 这里是为了下载图片的 base64;后续看看可以前端直接操作不; - const oneApi = imageBase64({ - url: item.pic - }).then(res => { - return res.data.code; - }) - posterUrls.push(oneApi) + posterUrls.push(item.pic) }) Promise.all(posterUrls).then(result => { that.$set(that, 'base64List', result);