Compare commits
No commits in common. "b250034b475cc2e51a504830491aa296241d65a1" and "026d39a0e5d0c2fdbd5a57f879fb428421dd0fed" have entirely different histories.
b250034b47
...
026d39a0e5
|
|
@ -286,7 +286,7 @@ const otherList = [{
|
||||||
{
|
{
|
||||||
icon: "/static/image/other/certificate/certificate.png",
|
icon: "/static/image/other/certificate/certificate.png",
|
||||||
name: "证书",
|
name: "证书",
|
||||||
path: "/pages/other/certificate/index"
|
path: "/pages/other/certificate/graduate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "/static/image/other/silkBanner/silkBanner.png",
|
icon: "/static/image/other/silkBanner/silkBanner.png",
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,14 @@
|
||||||
<!-- 自定义头部导航栏 -->
|
<!-- 自定义头部导航栏 -->
|
||||||
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
|
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
|
||||||
:bgColor="data.navbar.bgColor" :isBack="true" />
|
:bgColor="data.navbar.bgColor" :isBack="true" />
|
||||||
|
<scroll-view scroll-x="true" class="footer-btn" :show-scrollbar="false">
|
||||||
<view class="footer-box">
|
<view class="footer-box">
|
||||||
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == getType(index) }"
|
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
|
||||||
@click="setType(index)">
|
@click="setType(index)">
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
<view style="display: flex;align-items: center;background: #fff;border-radius: 6px;margin: 10px;padding: 4px;color: #767676;">
|
<view style="display: flex;align-items: center;background: #fff;border-radius: 6px;margin: 10px;padding: 4px;color: #767676;">
|
||||||
<image src="/static/image/other/notice.png" style="width: 16px;height: 16px;margin-right: 10rpx;margin-left: 10rpx;"></image>
|
<image src="/static/image/other/notice.png" style="width: 16px;height: 16px;margin-right: 10rpx;margin-left: 10rpx;"></image>
|
||||||
此功能不具备真实性,仅供娱乐
|
此功能不具备真实性,仅供娱乐
|
||||||
|
|
@ -553,7 +555,6 @@
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance();
|
} = getCurrentInstance();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
styleType:0,
|
|
||||||
type: 0,
|
type: 0,
|
||||||
graduate: {
|
graduate: {
|
||||||
type: 0,
|
type: 0,
|
||||||
|
|
@ -598,14 +599,14 @@
|
||||||
textCssLeft: 'text-align: left;',
|
textCssLeft: 'text-align: left;',
|
||||||
textCssCenter: 'text-align: center;',
|
textCssCenter: 'text-align: center;',
|
||||||
typeList: [
|
typeList: [
|
||||||
'样式一',//毕业证书
|
'毕业证书样式1',
|
||||||
'样式二',//毕业证书
|
'毕业证书样式2',
|
||||||
'情侣证',
|
'情侣证',
|
||||||
'分手证',
|
'分手证',
|
||||||
'样式一',//奖状样式
|
'奖状样式1',
|
||||||
'样式二',//奖状样式
|
'奖状样式2',
|
||||||
'样式一',//女神证
|
'女神证',
|
||||||
'样式二',//男神证
|
'男神证',
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -613,39 +614,9 @@
|
||||||
const showEditPopup = ref(false);
|
const showEditPopup = ref(false);
|
||||||
const editForm = ref({});
|
const editForm = ref({});
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
data.styleType=option.styleType||0
|
uni.showLoading({
|
||||||
if(data.styleType==0){
|
title: "生成中"
|
||||||
data.typeList=[
|
})
|
||||||
'样式一',//毕业证书
|
|
||||||
'样式二',//毕业证书
|
|
||||||
]
|
|
||||||
setType(0)
|
|
||||||
}else if(data.styleType==1){
|
|
||||||
data.typeList=['情侣证',]
|
|
||||||
data.type=2
|
|
||||||
setType(0)
|
|
||||||
}else if(data.styleType==2){
|
|
||||||
data.typeList=['分手证',]
|
|
||||||
data.type=3
|
|
||||||
setType(0)
|
|
||||||
}else if(data.styleType==3){
|
|
||||||
data.typeList=[
|
|
||||||
'样式一',//奖状样式
|
|
||||||
'样式二',//奖状样式
|
|
||||||
]
|
|
||||||
data.type=4
|
|
||||||
setType(0)
|
|
||||||
}else{
|
|
||||||
data.type=6
|
|
||||||
data.typeList=[
|
|
||||||
'样式一',//女神证
|
|
||||||
'样式二',//男神证
|
|
||||||
]
|
|
||||||
setType(0)
|
|
||||||
}
|
|
||||||
// uni.showLoading({
|
|
||||||
// title: "生成中"
|
|
||||||
// })
|
|
||||||
// 进入毕业证书页面埋点
|
// 进入毕业证书页面埋点
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: 'event',
|
type: 'event',
|
||||||
|
|
@ -653,10 +624,10 @@
|
||||||
prefix: '.uni.other.',
|
prefix: '.uni.other.',
|
||||||
value: "证书"
|
value: "证书"
|
||||||
})
|
})
|
||||||
// let graduateData = uni.getStorageSync("graduateData")
|
let graduateData = uni.getStorageSync("graduateData")
|
||||||
// if (graduateData) {
|
if (graduateData) {
|
||||||
// data.graduate = graduateData
|
data.graduate = graduateData
|
||||||
// }
|
}
|
||||||
uni.$on("editFormPhoto", (info) => {
|
uni.$on("editFormPhoto", (info) => {
|
||||||
data.code = ""
|
data.code = ""
|
||||||
if(data.type==2||data.type==3){
|
if(data.type==2||data.type==3){
|
||||||
|
|
@ -744,17 +715,6 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
function setType(index) {
|
function setType(index) {
|
||||||
if(data.styleType==0){
|
|
||||||
|
|
||||||
}else if(data.styleType==1){
|
|
||||||
index+=2
|
|
||||||
}else if(data.styleType==2){
|
|
||||||
index+=3
|
|
||||||
}else if(data.styleType==3){
|
|
||||||
index+=4
|
|
||||||
}else{
|
|
||||||
index+=6
|
|
||||||
}
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "生成中"
|
title: "生成中"
|
||||||
})
|
})
|
||||||
|
|
@ -843,20 +803,7 @@
|
||||||
editForm.value.icon = '/static/image/other/certificate/graduate/icon1.png';
|
editForm.value.icon = '/static/image/other/certificate/graduate/icon1.png';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getType = (index) => {
|
|
||||||
switch (Number(data.styleType)) {
|
|
||||||
case 0:
|
|
||||||
return index
|
|
||||||
case 1:
|
|
||||||
return index + 2
|
|
||||||
case 2:
|
|
||||||
return index + 3
|
|
||||||
case 3:
|
|
||||||
return index + 4
|
|
||||||
default:
|
|
||||||
return index + 6
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function successImage(e) {
|
function successImage(e) {
|
||||||
data.code = e
|
data.code = e
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
|
@ -1344,29 +1291,33 @@
|
||||||
box-shadow: 0 2rpx 6rpx rgba(7, 140, 193, 0.3);
|
box-shadow: 0 2rpx 6rpx rgba(7, 140, 193, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-box {
|
.footer-btn {
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
bottom: 16px;
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
display: flex;
|
overflow-x: auto;
|
||||||
justify-content: center;
|
white-space: nowrap;
|
||||||
.btn {
|
|
||||||
font-size: 18px;
|
.footer-box {
|
||||||
color: #767676;
|
display: inline-flex;
|
||||||
width: 94px;
|
padding: 10rpx 0;
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
.btn {
|
||||||
background: #FFFFFF;
|
padding: 8rpx 10rpx;
|
||||||
border-radius: 8px 8px 8px 8px;
|
background: #FFFFFF;
|
||||||
background: #FFFFFF;
|
border-radius: 12px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 24rpx;
|
margin: 0 24rpx;
|
||||||
color: #767676;
|
color: #767676;
|
||||||
}
|
font-size: 12px;
|
||||||
.active {
|
// border: 2px solid #FFFFFF;
|
||||||
color: #1777FF;
|
min-width: 120rpx;
|
||||||
border: 2px solid #1777FF;
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: #1777FF;
|
||||||
|
// border: 2px solid #1777FF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,129 +1,57 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container" >
|
||||||
<ZdyNavbar :title="data.navbar.title" :bgColor="data.navbar.bgColor" :isAdd="true" :isSearch="$system=='Android'">
|
<!-- 自定义头部导航栏 -->
|
||||||
</ZdyNavbar>
|
<!-- <ZdyNavbar :title="data.navbar.title" :bgColor="data.navbar.bgColor" :isAdd="true" :isSearch="$system=='Android'">
|
||||||
|
</ZdyNavbar> -->
|
||||||
|
|
||||||
<view class="card-grid">
|
|
||||||
<view class="card" v-for="(item, index) in cardList" :key="index">
|
|
||||||
<view class="title">
|
|
||||||
{{item.title}}
|
|
||||||
</view>
|
|
||||||
<image :src="item.img" class="card-img" />
|
|
||||||
<button class="card-btn" @click="create(index)">立即制作</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import ZdyNavbar from "@/components/nav-bar/nav-bar.vue"
|
// 自定义头部
|
||||||
|
// import ZdyNavbar from "@/components/navbar/navbar.vue"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive
|
reactive,
|
||||||
} from 'vue'
|
watch,
|
||||||
|
nextTick,
|
||||||
|
getCurrentInstance
|
||||||
|
} from "vue";
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
onReady,
|
||||||
|
onPullDownRefresh,
|
||||||
|
onReachBottom
|
||||||
|
} from "@dcloudio/uni-app";
|
||||||
|
const {
|
||||||
|
appContext,
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
navbar: {
|
navbar: {
|
||||||
title: '证件选择',
|
title: "微信",
|
||||||
bgColor: ''
|
bgColor: '#EDEDED',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const cardList = ref([
|
onLoad((option) => {
|
||||||
{
|
})
|
||||||
title: '身份证',
|
onReady(()=>{
|
||||||
img: '/static/image/other/certificate/certificate1.png',
|
|
||||||
},
|
})
|
||||||
{
|
onShow(() => {})
|
||||||
title: '毕业证',
|
onPullDownRefresh(() => {
|
||||||
img: '/static/image/other/certificate/certificate2.png',
|
setTimeout(() => {
|
||||||
},
|
uni.stopPullDownRefresh();
|
||||||
{
|
}, 1000);
|
||||||
title: '情侣证',
|
})
|
||||||
img: '/static/image/other/certificate/certificate3.png',
|
onReachBottom(() => {
|
||||||
},
|
|
||||||
{
|
})
|
||||||
title: '分手证',
|
|
||||||
img: '/static/image/other/certificate/certificate4.png',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '奖状',
|
|
||||||
img: '/static/image/other/certificate/certificate5.png',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '颜值证',
|
|
||||||
img: '/static/image/other/certificate/certificate6.png',
|
|
||||||
},
|
|
||||||
])
|
|
||||||
function create(index){
|
|
||||||
if(index){
|
|
||||||
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/pages/other/certificate/graduate?styleType='+(index-1)
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
uni.navigateTo({
|
|
||||||
url:'/pages/other/card/card'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
|
||||||
padding: 20rpx;
|
|
||||||
background-color: #F0F4F9;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
.card-grid {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
width: 48%;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
padding: 20rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
align-items: center;
|
|
||||||
box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.title{
|
|
||||||
font-size: 14px;
|
|
||||||
color: #1A1A1A;
|
|
||||||
line-height: 14px;
|
|
||||||
}
|
|
||||||
.card-img {
|
|
||||||
width: 130px;
|
|
||||||
height: 80px;
|
|
||||||
/* border-radius: 8px 8px 8px 8px; */
|
|
||||||
margin-top: 21px;
|
|
||||||
margin-bottom: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.card-btn {
|
|
||||||
width: 68px;
|
|
||||||
height: 28px;
|
|
||||||
background: linear-gradient(327deg, #1777FF 0%, #17CDFF 100%);
|
|
||||||
border-radius: 8px 8px 8px 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
button{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,16 @@
|
||||||
<!-- 自定义头部导航栏 -->
|
<!-- 自定义头部导航栏 -->
|
||||||
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
|
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
|
||||||
:bgColor="data.navbar.bgColor" :isBack="true" />
|
:bgColor="data.navbar.bgColor" :isBack="true" />
|
||||||
<view class="footer-box">
|
<scroll-view scroll-x="true" class="footer-btn" :show-scrollbar="false">
|
||||||
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
|
<view class="footer-box">
|
||||||
@click="setType(index)">
|
<view class="btn" v-for="(item, index) in data.typeList" :key="index" :class="{ active: data.type == index }"
|
||||||
样式一
|
@click="setType(index)">
|
||||||
|
{{ item }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
<view
|
<view style="display: flex;align-items: center;background: #fff;border-radius: 6px;margin: 10px;padding: 4px;color: #767676;">
|
||||||
style="display: flex;align-items: center;background: #fff;border-radius: 6px;margin: 10px;padding: 4px;color: #767676;">
|
<image src="/static/image/other/notice.png" style="width: 16px;height: 16px;margin-right: 10rpx;margin-left: 10rpx;"></image>
|
||||||
<image src="/static/image/other/notice.png"
|
|
||||||
style="width: 16px;height: 16px;margin-right: 10rpx;margin-left: 10rpx;"></image>
|
|
||||||
此功能不具备真实性,仅供娱乐
|
此功能不具备真实性,仅供娱乐
|
||||||
</view>
|
</view>
|
||||||
<image :src="data.code" mode="widthFix" style="width:calc( 100vw - 24px);margin:0 12px;" @click="previewImage">
|
<image :src="data.code" mode="widthFix" style="width:calc( 100vw - 24px);margin:0 12px;" @click="previewImage">
|
||||||
|
|
@ -27,46 +27,46 @@
|
||||||
:css="`width:351px;height:460px;background-image: url('/static/image/other/silkBanner/banner1.png');position: relative;`">
|
:css="`width:351px;height:460px;background-image: url('/static/image/other/silkBanner/banner1.png');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.textCss" :text="data.banner.dateText" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<!-- 敬赠落款 -->
|
<!-- 敬赠落款 -->
|
||||||
<l-painter-view :css="`position: absolute;left:100px;bottom:94px;`">
|
<l-painter-view :css="`position: absolute;left:105px;bottom:94px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.donorLine" />
|
<l-painter-text :css="data.textCss" :text="data.banner.donorLine" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<!-- 受赠对象 -->
|
<!-- 受赠对象 -->
|
||||||
<l-painter-view :css="`position: absolute;top:86px;right:74px;`">
|
<l-painter-view :css="`position: absolute;top:86px;right:74px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.recipientLine" />
|
<l-painter-text :css="data.textCss" :text="data.banner.recipientLine" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<!-- 中心大字 -->
|
<!-- 中心大字 -->
|
||||||
<l-painter-view :css="`position: absolute;top:86px;left:171px;`">
|
<l-painter-view :css="`position: absolute;top:86px;left:171px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss1" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:112px;left:124px;`">
|
<l-painter-view :css="`position: absolute;top:112px;left:124px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss1" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:112px;right:116px;`">
|
<l-painter-view :css="`position: absolute;top:112px;right:116px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss1" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:155px;left:107px;`">
|
<l-painter-view :css="`position: absolute;top:155px;left:107px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss1" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:155px;right:101px;`">
|
<l-painter-view :css="`position: absolute;top:155px;right:101px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss1" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:198px;left:141px;`">
|
<l-painter-view :css="`position: absolute;top:198px;left:141px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss1" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:198px;right:126px;`">
|
<l-painter-view :css="`position: absolute;top:198px;right:126px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss1" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss1" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:112px;left:142px;`">
|
<l-painter-view :css="`position: absolute;top:112px;left:142px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss2" :text="data.banner.centerChar" />
|
<l-painter-text :css="data.textCss2" :text="data.banner.centerChar" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;bottom:165px;left:10px;`">
|
<l-painter-view :css="`position: absolute;bottom:170px;left:10px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss3" :text="data.banner.phraseTop" />
|
<l-painter-text :css="data.textCss3" :text="data.banner.phraseTop" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;bottom:118px;left:10px;`">
|
<l-painter-view :css="`position: absolute;bottom:118px;left:10px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss3" :text="data.banner.phraseBottom" />
|
<l-painter-text :css="data.textCss3" :text="data.banner.phraseBottom" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
|
|
||||||
<l-painter-view v-if="$isVip()" :css="`position: absolute;left:117px;bottom:127px;`">
|
<l-painter-view v-if="$isVip()" :css="`position: absolute;left:117px;bottom:127px;`">
|
||||||
|
|
@ -80,22 +80,22 @@
|
||||||
:css="`width:351px;height:460px;background-image: url('/static/image/other/silkBanner/banner2.png');position: relative;`">
|
:css="`width:351px;height:460px;background-image: url('/static/image/other/silkBanner/banner2.png');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.textCss" :text="data.banner.dateText" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<!-- 敬赠落款 -->
|
<!-- 敬赠落款 -->
|
||||||
<l-painter-view :css="`position: absolute;left:100px;bottom:94px;`">
|
<l-painter-view :css="`position: absolute;left:105px;bottom:94px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.donorLine" />
|
<l-painter-text :css="data.textCss" :text="data.banner.donorLine" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<!-- 受赠对象 -->
|
<!-- 受赠对象 -->
|
||||||
<l-painter-view :css="`position: absolute;top:86px;right:74px;`">
|
<l-painter-view :css="`position: absolute;top:86px;right:74px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss" :text="data.banner.recipientLine" />
|
<l-painter-text :css="data.textCss" :text="data.banner.recipientLine" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
|
|
||||||
<l-painter-view :css="`position: absolute;top:102px;right:131px;`">
|
<l-painter-view :css="`position: absolute;top:102px;right:131px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss4" :text="data.banner.phraseTop" />
|
<l-painter-text :css="data.textCss4" :text="data.banner.phraseTop" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
<l-painter-view :css="`position: absolute;top:102px;left:142px;`">
|
<l-painter-view :css="`position: absolute;top:102px;left:142px;`">
|
||||||
<l-painter-text :css="data.textFont+data.textCss4" :text="data.banner.phraseBottom" />
|
<l-painter-text :css="data.textCss4" :text="data.banner.phraseBottom" />
|
||||||
</l-painter-view>
|
</l-painter-view>
|
||||||
|
|
||||||
<l-painter-view v-if="$isVip()" :css="`position: absolute;left:117px;bottom:127px;`">
|
<l-painter-view v-if="$isVip()" :css="`position: absolute;left:117px;bottom:127px;`">
|
||||||
|
|
@ -191,16 +191,14 @@
|
||||||
// 返回对应 type 的数据,如果没有则返回默认 type 1
|
// 返回对应 type 的数据,如果没有则返回默认 type 1
|
||||||
return banners[type] || banners[1]
|
return banners[type] || banners[1]
|
||||||
}
|
}
|
||||||
|
function mergeBanner(raw,type) {
|
||||||
function mergeBanner(raw, type) {
|
|
||||||
return Object.assign(defaultBanner(type), raw && typeof raw === 'object' ? raw : {})
|
return Object.assign(defaultBanner(type), raw && typeof raw === 'object' ? raw : {})
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
isShow:false,
|
|
||||||
type: 0,
|
type: 0,
|
||||||
banner: mergeBanner(null, 0),
|
banner: mergeBanner(null,0),
|
||||||
shuaxing: false,
|
shuaxing: true,
|
||||||
navbar: {
|
navbar: {
|
||||||
title: "锦旗",
|
title: "锦旗",
|
||||||
bgColor: '#EDEDED',
|
bgColor: '#EDEDED',
|
||||||
|
|
@ -208,13 +206,13 @@
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
code: '',
|
code: '',
|
||||||
textCss: 'text-align: center;font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;width:10px;color:#FFDD6D;font-size:10px; mix-blend-mode: overlay;',
|
textCss: 'text-align: center;font-weight: bold;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "SimSun", "宋体", sans-serif;width:10px;color:#FFDD6D;font-size:10px; mix-blend-mode: overlay;',
|
||||||
|
|
||||||
textCss1: 'font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:20px; mix-blend-mode: overlay;',
|
textCss1: 'font-weight: bold;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "SimSun", "宋体", sans-serif;color:#FFDD6D;font-size:20px; mix-blend-mode: overlay;',
|
||||||
textCss2: 'font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:80px; mix-blend-mode: overlay;',
|
textCss2: 'font-weight: bold;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "SimSun", "宋体", sans-serif;color:#FFDD6D;font-size:80px; mix-blend-mode: overlay;',
|
||||||
textCss3: 'text-align: center;width:351px;font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:30px; mix-blend-mode: overlay;',
|
textCss3: 'text-align: center;width:351px;font-weight: bold;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "SimSun", "宋体", sans-serif;color:#FFDD6D;font-size:30px; mix-blend-mode: overlay;',
|
||||||
textCss4: 'text-align: center;width:20px;font-weight: 400;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;color:#FFDD6D;font-size:40px; mix-blend-mode: overlay;',
|
textCss4: 'text-align: center;width:20px;font-weight: bold;word-spacing: 50px;letter-spacing: 20px;word-spacing: 20px;font-family: "SimSun", "宋体", sans-serif;color:#FFDD6D;font-size:40px; mix-blend-mode: overlay;',
|
||||||
textFont: 'font-family:"certificate2";',
|
textFont:'font-family:"certificate";',
|
||||||
typeList: ['样式1', '样式2']
|
typeList: ['样式1', '样式2']
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -228,32 +226,28 @@
|
||||||
// 进入锦旗页面埋点
|
// 进入锦旗页面埋点
|
||||||
proxy.$apiUserEvent('all', {
|
proxy.$apiUserEvent('all', {
|
||||||
type: 'event',
|
type: 'event',
|
||||||
key: 'silkBanner',
|
key: 'certificate',
|
||||||
prefix: '.uni.other.',
|
prefix: '.uni.other.',
|
||||||
value: "锦旗"
|
value: "锦旗"
|
||||||
})
|
})
|
||||||
data.banner = mergeBanner(uni.getStorageSync("silkBanner" + data.type), data.type)
|
data.banner = mergeBanner(uni.getStorageSync("silkBanner"+data.type),data.type)
|
||||||
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']
|
||||||
|
|
||||||
console.log("字体地址信息", font.certificate2);
|
console.log("字体地址信息", font.certificate);
|
||||||
// Font loading logic
|
// Font loading logic
|
||||||
const fontUrl = font.certificate2;
|
const fontUrl = font.certificate;
|
||||||
const fontName = 'certificate2';
|
const fontName = 'certificate';
|
||||||
|
|
||||||
const loadFont = (path) => {
|
const loadFont = (path) => {
|
||||||
uni.loadFontFace({
|
uni.loadFontFace({
|
||||||
family: fontName,
|
family: fontName,
|
||||||
source: `url("${path}")`,
|
source: `url("${path}")`,
|
||||||
success() {
|
success() {
|
||||||
data.isShow=true
|
|
||||||
data.shuaxing=true
|
|
||||||
console.log('字体加载成功');
|
console.log('字体加载成功');
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
data.isShow=true
|
|
||||||
data.shuaxing=true
|
|
||||||
console.error('字体加载失败', err);
|
console.error('字体加载失败', err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -278,7 +272,7 @@
|
||||||
tempFilePath: res.tempFilePath,
|
tempFilePath: res.tempFilePath,
|
||||||
success: (saveRes) => {
|
success: (saveRes) => {
|
||||||
const savedPath = saveRes.savedFilePath;
|
const savedPath = saveRes.savedFilePath;
|
||||||
uni.setStorageSync('certificate2_font_path', savedPath);
|
uni.setStorageSync('certificate_font_path', savedPath);
|
||||||
console.log("字体保存路径", savedPath);
|
console.log("字体保存路径", savedPath);
|
||||||
loadFont(savedPath);
|
loadFont(savedPath);
|
||||||
},
|
},
|
||||||
|
|
@ -309,12 +303,13 @@
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function setType(index) {
|
function setType(index) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "生成中"
|
title: "生成中"
|
||||||
})
|
})
|
||||||
data.type = index
|
data.type = index
|
||||||
data.banner = mergeBanner(uni.getStorageSync("silkBanner" + data.type), data.type)
|
data.banner = mergeBanner(uni.getStorageSync("silkBanner"+data.type),data.type)
|
||||||
}
|
}
|
||||||
|
|
||||||
function successImage(e) {
|
function successImage(e) {
|
||||||
|
|
@ -328,7 +323,7 @@
|
||||||
}
|
}
|
||||||
// 打开编辑弹窗
|
// 打开编辑弹窗
|
||||||
function edit() {
|
function edit() {
|
||||||
editForm.value = mergeBanner(JSON.parse(JSON.stringify(data.banner)), data.type)
|
editForm.value = mergeBanner(JSON.parse(JSON.stringify(data.banner)),data.type)
|
||||||
showEditPopup.value = true;
|
showEditPopup.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -343,11 +338,11 @@
|
||||||
title: "生成中"
|
title: "生成中"
|
||||||
})
|
})
|
||||||
data.shuaxing = false
|
data.shuaxing = false
|
||||||
data.banner = mergeBanner(editForm.value, data.type)
|
data.banner = mergeBanner(editForm.value,data.type)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
data.shuaxing = true
|
data.shuaxing = true
|
||||||
}, 100)
|
}, 100)
|
||||||
uni.setStorageSync("silkBanner" + data.type, data.banner)
|
uni.setStorageSync("silkBanner"+data.type, data.banner)
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
showEditPopup.value = false;
|
showEditPopup.value = false;
|
||||||
}
|
}
|
||||||
|
|
@ -623,7 +618,7 @@
|
||||||
|
|
||||||
.popup-title {
|
.popup-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -646,7 +641,7 @@
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -687,7 +682,7 @@
|
||||||
.form-total-input {
|
.form-total-input {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
color: #ff6b35;
|
color: #ff6b35;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 上传图片样式 */
|
/* 上传图片样式 */
|
||||||
|
|
@ -763,7 +758,7 @@
|
||||||
padding: 18rpx 60rpx;
|
padding: 18rpx 60rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 400;
|
font-weight: bold;
|
||||||
box-shadow: 0 3rpx 10rpx rgba(7, 66, 193, 0.3);
|
box-shadow: 0 3rpx 10rpx rgba(7, 66, 193, 0.3);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -774,33 +769,39 @@
|
||||||
transform: translateY(-2rpx);
|
transform: translateY(-2rpx);
|
||||||
box-shadow: 0 4rpx 12rpx rgba(7, 72, 193, 0.4);
|
box-shadow: 0 4rpx 12rpx rgba(7, 72, 193, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-save-image:active {
|
.btn-save-image:active {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
box-shadow: 0 2rpx 6rpx rgba(7, 140, 193, 0.3);
|
box-shadow: 0 2rpx 6rpx rgba(7, 140, 193, 0.3);
|
||||||
}
|
}
|
||||||
.footer-box {
|
|
||||||
position: fixed;
|
.footer-btn {
|
||||||
left: 0;
|
|
||||||
bottom: 16px;
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
display: flex;
|
overflow-x: auto;
|
||||||
justify-content: center;
|
white-space: nowrap;
|
||||||
.btn {
|
|
||||||
font-size: 18px;
|
.footer-box {
|
||||||
color: #767676;
|
display: inline-flex;
|
||||||
width: 94px;
|
padding: 10rpx 0;
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
.btn {
|
||||||
background: #FFFFFF;
|
padding: 8rpx 10rpx;
|
||||||
border-radius: 8px 8px 8px 8px;
|
background: #FFFFFF;
|
||||||
background: #FFFFFF;
|
border-radius: 12px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 24rpx;
|
margin: 0 24rpx;
|
||||||
color: #767676;
|
color: #767676;
|
||||||
}
|
font-size: 12px;
|
||||||
.active {
|
// border: 2px solid #FFFFFF;
|
||||||
color: #1777FF;
|
min-width: 120rpx;
|
||||||
border: 2px solid #1777FF;
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: #1777FF;
|
||||||
|
// border: 2px solid #1777FF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 43 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 67 KiB |
Loading…
Reference in New Issue