分销:修正分享海报
parent
5d319b3f37
commit
380b47e371
|
|
@ -278,7 +278,6 @@
|
||||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||||
import { toLogin } from '@/libs/login.js';
|
import { toLogin } from '@/libs/login.js';
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import { imageBase64 } from "@/api/public";
|
|
||||||
import productConSwiper from '@/components/productConSwiper';
|
import productConSwiper from '@/components/productConSwiper';
|
||||||
import couponListWindow from '@/components/couponListWindow';
|
import couponListWindow from '@/components/couponListWindow';
|
||||||
import productWindow from '@/components/productWindow';
|
import productWindow from '@/components/productWindow';
|
||||||
|
|
@ -530,7 +529,7 @@
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
this.make();
|
this.make();
|
||||||
this.ShareInfo();
|
this.ShareInfo();
|
||||||
this.getImageBase64();
|
this.imgTop = this.spu.picUrl;
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
this.getQrcode();
|
this.getQrcode();
|
||||||
|
|
@ -1003,16 +1002,6 @@
|
||||||
"onMenuShareTimeline"
|
"onMenuShareTimeline"
|
||||||
], configAppMessage);
|
], configAppMessage);
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 获得商品的封面 base64
|
|
||||||
*/
|
|
||||||
getImageBase64: function() {
|
|
||||||
imageBase64({
|
|
||||||
url: this.spu.picUrl
|
|
||||||
}).then(res => {
|
|
||||||
this.imgTop = res.data.code;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* 获得小程序的二维码
|
* 获得小程序的二维码
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
import { getQrcode } from '@/api/api.js';
|
import { getQrcode } from '@/api/api.js';
|
||||||
// #endif
|
// #endif
|
||||||
import home from '@/components/home';
|
import home from '@/components/home';
|
||||||
import { imageBase64 } from "@/api/public";
|
|
||||||
import * as TradeConfigApi from '@/api/trade/config.js';
|
import * as TradeConfigApi from '@/api/trade/config.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -131,13 +130,7 @@
|
||||||
let posterUrls = []
|
let posterUrls = []
|
||||||
// 生成一个Promise对象的数组
|
// 生成一个Promise对象的数组
|
||||||
images.forEach(item => {
|
images.forEach(item => {
|
||||||
// TODO @芋艿:imageBase64 这里是为了下载图片的 base64;后续看看可以前端直接操作不;
|
posterUrls.push(item.pic)
|
||||||
const oneApi = imageBase64({
|
|
||||||
url: item.pic
|
|
||||||
}).then(res => {
|
|
||||||
return res.data.code;
|
|
||||||
})
|
|
||||||
posterUrls.push(oneApi)
|
|
||||||
})
|
})
|
||||||
Promise.all(posterUrls).then(result => {
|
Promise.all(posterUrls).then(result => {
|
||||||
that.$set(that, 'base64List', result);
|
that.$set(that, 'base64List', result);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue