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