图片下载
This commit is contained in:
parent
7bfa56cf5b
commit
b47742884b
|
|
@ -220,6 +220,7 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { imgLocal } from '@/utils/common.js';
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
onMounted,
|
onMounted,
|
||||||
|
|
@ -261,6 +262,7 @@
|
||||||
footerImage: '',
|
footerImage: '',
|
||||||
showMask: false,
|
showMask: false,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
|
footerImg:''
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectedImage = ref('');
|
const selectedImage = ref('');
|
||||||
|
|
@ -279,13 +281,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
loadCache();
|
loadCache();
|
||||||
// 加载保存的footer图片
|
// 加载保存的footer图片
|
||||||
const savedFooter = uni.getStorageSync(FOOTER_IMAGE_KEY);
|
const savedFooter = uni.getStorageSync(FOOTER_IMAGE_KEY);
|
||||||
if (savedFooter) {
|
if (savedFooter) {
|
||||||
data.footerImage = savedFooter;
|
data.footerImage = savedFooter;
|
||||||
|
}else{
|
||||||
|
data.footerImage = await imgLocal.getLocalImage('other/bank/jsyh/footerImg.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function loadCache() {
|
function loadCache() {
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
闲钱投资?看看热议基金
|
闲钱投资?看看热议基金
|
||||||
<image src="/static/image/other/bank/zsyh/icon4.png" mode="widthFix"></image>
|
<image src="/static/image/other/bank/zsyh/icon4.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="bImg" src="/static/image/other/bank/zsyh/bImg.png" mode="widthFix"></image>
|
<image class="bImg" :src="data.bgImg" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="echart">
|
<view class="echart">
|
||||||
|
|
@ -257,6 +257,7 @@
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { imgLocal } from '@/utils/common.js';
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
|
|
@ -296,6 +297,7 @@
|
||||||
huabeiInfo:{
|
huabeiInfo:{
|
||||||
image: ''
|
image: ''
|
||||||
},
|
},
|
||||||
|
bgImg:'',
|
||||||
huabeiInfoStorageKey: 'bank_zsyh_info_storage',
|
huabeiInfoStorageKey: 'bank_zsyh_info_storage',
|
||||||
showMask: false,
|
showMask: false,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
|
|
@ -351,12 +353,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
onLoad((option) => {
|
onLoad(async(option) => {
|
||||||
// selectedImage.value = uni.getStorageSync('zsyhselectedImage')
|
|
||||||
// 读取缓存
|
|
||||||
let savedInfo = uni.getStorageSync(data.huabeiInfoStorageKey)||{image:'/static/image/other/bank/zsyh/zsyhdb.png'}
|
let savedInfo = uni.getStorageSync(data.huabeiInfoStorageKey)||{image:'/static/image/other/bank/zsyh/zsyhdb.png'}
|
||||||
// savedInfo.image = ""
|
|
||||||
// uni.setStorageSync(data.huabeiInfoStorageKey, savedInfo)
|
|
||||||
console.log("savedInfo====", savedInfo)
|
console.log("savedInfo====", savedInfo)
|
||||||
if (savedInfo) {
|
if (savedInfo) {
|
||||||
// 合并默认值,防止旧数据缺少新字段
|
// 合并默认值,防止旧数据缺少新字段
|
||||||
|
|
@ -365,6 +364,7 @@
|
||||||
...savedInfo
|
...savedInfo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
data.bgImg= await imgLocal.getLocalImage('other/bank/zsyh/bImg.png');
|
||||||
const config = uni.getStorageSync('config')
|
const config = uni.getStorageSync('config')
|
||||||
console.log("---config---", config);
|
console.log("---config---", config);
|
||||||
const font = config.config['client.uniapp.font']
|
const font = config.config['client.uniapp.font']
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress"
|
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress"
|
||||||
:css="`width:${data.width}px;height:${data.height }px;background-color:#fff;`">
|
:css="`width:${data.width}px;height:${data.height }px;background-color:#fff;`">
|
||||||
<l-painter-view
|
<l-painter-view
|
||||||
:css="`margin-top:109px;margin-left:75px;position: relative;width:666px;height:406px;background-image: url('/static/image/other/card/cardBGImg.png');background-size:6660px 406px;`">
|
:css="`margin-top:109px;margin-left:75px;position: relative;width:666px;height:406px;background-image: url('${data.bgImg}');background-size:6660px 406px;`">
|
||||||
<!-- 头部年月 -->
|
<!-- 头部年月 -->
|
||||||
<l-painter-view :css="`position: absolute;left:122px;top:54px;`">
|
<l-painter-view :css="`position: absolute;left:122px;top:54px;`">
|
||||||
<l-painter-text :css="data.textCss+data.textCssLeft" :text="data.form.name" />
|
<l-painter-text :css="data.textCss+data.textCssLeft" :text="data.form.name" />
|
||||||
|
|
@ -124,6 +124,7 @@
|
||||||
// 自定义头部
|
// 自定义头部
|
||||||
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
||||||
|
|
||||||
|
import { imgLocal } from '@/utils/common.js';
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
|
|
@ -152,6 +153,7 @@
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
code: '',
|
code: '',
|
||||||
|
bgImg:'',
|
||||||
form: {
|
form: {
|
||||||
name: '某某',
|
name: '某某',
|
||||||
gender: '男',
|
gender: '男',
|
||||||
|
|
@ -175,7 +177,8 @@
|
||||||
// 弹窗相关
|
// 弹窗相关
|
||||||
const showEditPopup = ref(false);
|
const showEditPopup = ref(false);
|
||||||
const editForm = ref({});
|
const editForm = ref({});
|
||||||
onLoad((option) => {
|
onLoad(async(option) => {
|
||||||
|
data.bgImg= await imgLocal.getLocalImage('other/card/cardBGImg.png');
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "生成中"
|
title: "生成中"
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:250px;"
|
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:250px;"
|
||||||
v-if="data.type == 0">
|
v-if="data.type == 0">
|
||||||
<l-painter-view
|
<l-painter-view
|
||||||
:css="`width:351px;height:250px;background-image: url('/static/image/other/certificate/graduate/graduate1.png');position: relative;`">
|
:css="`width:351px;height:250px;background-image: url('${data.bgImg1}');position: relative;`">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<l-painter-view :css="`position: absolute;left:${data.graduate.type == 0 ? 46 : 85}px;top:67px;`">
|
<l-painter-view :css="`position: absolute;left:${data.graduate.type == 0 ? 46 : 85}px;top:67px;`">
|
||||||
<l-painter-image :src="data.graduate.title"
|
<l-painter-image :src="data.graduate.title"
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:262px;"
|
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:262px;"
|
||||||
v-else-if="data.type == 1">
|
v-else-if="data.type == 1">
|
||||||
<l-painter-view
|
<l-painter-view
|
||||||
:css="`width:351px;height:262px;background-image: url('/static/image/other/certificate/graduate/graduate2.png');position: relative;`">
|
:css="`width:351px;height:262px;background-image: url('${data.bgImg2}');position: relative;`">
|
||||||
<l-painter-view :css="`position: absolute;right:126px;bottom:113px;`">
|
<l-painter-view :css="`position: absolute;right:126px;bottom:113px;`">
|
||||||
<l-painter-text :css="data.textCss2 + 'text-align: right;color:#838383;'" :text="data.graduate.name" />
|
<l-painter-text :css="data.textCss2 + 'text-align: right;color:#838383;'" :text="data.graduate.name" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
|
|
@ -539,6 +539,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 自定义头部
|
// 自定义头部
|
||||||
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
||||||
|
import { imgLocal } from '@/utils/common.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
|
|
@ -562,6 +563,8 @@
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
styleType:0,
|
styleType:0,
|
||||||
type: 0,
|
type: 0,
|
||||||
|
bgImg1:'',
|
||||||
|
bgImg2:'',
|
||||||
graduate: {
|
graduate: {
|
||||||
type: 0,
|
type: 0,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
|
|
@ -619,7 +622,9 @@
|
||||||
// 弹窗相关
|
// 弹窗相关
|
||||||
const showEditPopup = ref(false);
|
const showEditPopup = ref(false);
|
||||||
const editForm = ref({});
|
const editForm = ref({});
|
||||||
onLoad((option) => {
|
onLoad(async(option) => {
|
||||||
|
data.bgImg1= await imgLocal.getLocalImage('other/certificate/graduate/graduate1.png');
|
||||||
|
data.bgImg2= await imgLocal.getLocalImage('other/certificate/graduate/graduate2.png');
|
||||||
data.styleType=option.styleType||0
|
data.styleType=option.styleType||0
|
||||||
if(data.styleType==0){
|
if(data.styleType==0){
|
||||||
data.navbar.title='毕业证书'
|
data.navbar.title='毕业证书'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { imgLocal } from '@/utils/common.js';
|
||||||
import wmWatermark from "@/components/wm-watermark/wm-watermark.vue"
|
import wmWatermark from "@/components/wm-watermark/wm-watermark.vue"
|
||||||
import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue';
|
import DateTimePicker from '@/components/dengrq-datetime-picker/dateTimePicker/index.vue';
|
||||||
import {
|
import {
|
||||||
|
|
@ -11,6 +12,7 @@
|
||||||
const CACHE_KEY = 'score_guandong_info';
|
const CACHE_KEY = 'score_guandong_info';
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
|
bgImg:'',
|
||||||
form: {
|
form: {
|
||||||
avatar: '',
|
avatar: '',
|
||||||
name: '大王',
|
name: '大王',
|
||||||
|
|
@ -42,7 +44,9 @@
|
||||||
data: {}
|
data: {}
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
|
||||||
|
data.bgImg= await imgLocal.getLocalImage('other/score/guandong/guandongbg.png');
|
||||||
loadCache();
|
loadCache();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -135,7 +139,7 @@
|
||||||
{{ getTime(data.form.time,1) }}广东省普通高等学校招生全国统一考试
|
{{ getTime(data.form.time,1) }}广东省普通高等学校招生全国统一考试
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="bgimg" src="/static/image/other/score/guandong/guandongbg.png" mode="widthFix"></image>
|
<image class="bgimg" :src="data.bgImg" mode="widthFix"></image>
|
||||||
<view class="list" @click="openEditDialog">
|
<view class="list" @click="openEditDialog">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="text1">
|
<view class="text1">
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:460px;"
|
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:460px;"
|
||||||
v-if="data.type == 0">
|
v-if="data.type == 0">
|
||||||
<l-painter-view
|
<l-painter-view
|
||||||
:css="`width:351px;height:460px;background-image: url('/static/image/other/silkBanner/banner1.png');position: relative;`">
|
:css="`width:351px;height:460px;background-image: url('${data.bgImg1}');position: relative;`">
|
||||||
<!-- 落款日期 -->
|
<!-- 落款日期 -->
|
||||||
<l-painter-view :css="`position: absolute;left:85px;bottom:94px;`">
|
<l-painter-view :css="`position: absolute;left:85px;bottom:94px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.dateText" />
|
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.dateText" />
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:460px;"
|
<l-painter isCanvasToTempFilePath @success="successImage" @progress="progress" css="width:351px;height:460px;"
|
||||||
v-else-if="data.type == 1">
|
v-else-if="data.type == 1">
|
||||||
<l-painter-view
|
<l-painter-view
|
||||||
:css="`width:351px;height:460px;background-image: url('/static/image/other/silkBanner/banner2.png');position: relative;`">
|
:css="`width:351px;height:460px;background-image: url('${data.bgImg2}');position: relative;`">
|
||||||
<!-- 落款日期 -->
|
<!-- 落款日期 -->
|
||||||
<l-painter-view :css="`position: absolute;left:85px;bottom:94px;`">
|
<l-painter-view :css="`position: absolute;left:85px;bottom:94px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.dateText" />
|
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.dateText" />
|
||||||
|
|
@ -156,6 +156,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 自定义头部
|
// 自定义头部
|
||||||
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
||||||
|
import { imgLocal } from '@/utils/common.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
|
|
@ -206,6 +207,8 @@
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
isShow:false,
|
isShow:false,
|
||||||
type: 0,
|
type: 0,
|
||||||
|
bgImg1:'',
|
||||||
|
bgImg2:'',
|
||||||
banner: mergeBanner(null, 0),
|
banner: mergeBanner(null, 0),
|
||||||
shuaxing: false,
|
shuaxing: false,
|
||||||
navbar: {
|
navbar: {
|
||||||
|
|
@ -228,7 +231,9 @@
|
||||||
// 弹窗相关
|
// 弹窗相关
|
||||||
const showEditPopup = ref(false);
|
const showEditPopup = ref(false);
|
||||||
const editForm = ref({});
|
const editForm = ref({});
|
||||||
onLoad((option) => {
|
onLoad(async(option) => {
|
||||||
|
data.bgImg1= await imgLocal.getLocalImage('other/silkBanner/banner1.png');
|
||||||
|
data.bgImg2= await imgLocal.getLocalImage('other/silkBanner/banner2.png');
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "生成中"
|
title: "生成中"
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue