mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-24 17:12:53 +08:00
开门红:微信头像生成 --提交人:阳华祥
This commit is contained in:
@@ -1,26 +1,16 @@
|
||||
<template>
|
||||
<div class="back-container">
|
||||
<van-image fit="fill" class="back_class" :src="showImgInfo.defaultImg" v-if="showImgInfo.showFlag == '0'">
|
||||
<van-image
|
||||
Lazyload
|
||||
fit="fill"
|
||||
:class="[{ 'bg-white': showImgInfo.showFlag == '1' }, 'back_class']"
|
||||
:src="showImgInfo.showFlag == '0' ? showImgInfo.defaultImg : showImgInfo.showFlag == '1' ? showImgInfo.defaultBackImg : showImgInfo.composeImg"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
<van-loading type="spinner" size="40" color="#1989fa" vertical>加载中...</van-loading>
|
||||
</template>
|
||||
<template v-slot:error>加载失败</template>
|
||||
</van-image>
|
||||
|
||||
<van-image fit="fill" class="back_class bg-white" :src="showImgInfo.defaultBackImg" v-if="showImgInfo.showFlag == '1'">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="40" />
|
||||
</template>
|
||||
<template v-slot:error>加载失败</template>
|
||||
</van-image>
|
||||
|
||||
<van-image fit="fill" class="back_class" :src="showImgInfo.composeImg" v-if="showImgInfo.showFlag == '2'">
|
||||
<template v-slot:loading>
|
||||
<van-loading type="spinner" size="20" />
|
||||
</template>
|
||||
<template v-slot:error>加载失败</template>
|
||||
</van-image>
|
||||
|
||||
<div class="flex justify-content-c bottom-btn">
|
||||
<van-button
|
||||
:disabled="downLoadFlag"
|
||||
@@ -40,7 +30,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Image as VanImage, Lazyload, Grid, GridItem } from 'vant'
|
||||
import { Image as VanImage, Lazyload, Grid, GridItem, Loading } from 'vant'
|
||||
import { createWXHeadImg, getWXHeadImgConfig } from '@/api/ebiz/my/my.js'
|
||||
import config from '@/config'
|
||||
|
||||
@@ -49,7 +39,8 @@ export default {
|
||||
[VanImage.name]: VanImage,
|
||||
[Grid.name]: Grid,
|
||||
[GridItem.name]: GridItem,
|
||||
[Lazyload.name]: Lazyload
|
||||
[Lazyload.name]: Lazyload,
|
||||
[Loading.name]: Loading
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -134,8 +125,8 @@ export default {
|
||||
if (res.result == 0) {
|
||||
// 合成图片
|
||||
//this.showImgInfo.composeImg = config.imgDomain + '/returnImageStream?a=b.jpg&imgPath=' + encodeURIComponent(res.composePath)
|
||||
this.showImgInfo.showFlag = '2'
|
||||
this.showImgInfo.composeImg = res.httpPath
|
||||
this.showImgInfo.showFlag = '2'
|
||||
// 下载图片地址
|
||||
this.downLoadUrl = config.imgDomain + '/returnDirectStream?imgPath=' + encodeURIComponent(res.composePath)
|
||||
this.downLoadFlag = false
|
||||
|
||||
Reference in New Issue
Block a user