This commit is contained in:
zhangmanman
2021-09-30 12:19:25 +08:00
parent d156ad6042
commit 8ac459e047
4 changed files with 51 additions and 73 deletions

View File

@@ -131,6 +131,7 @@
showHelp() {
uni.showModal({
title: '能量碎片',
confirmColor: '#8b64fd',
content: this.energyShard.description,
showCancel: false
})

View File

@@ -69,7 +69,7 @@
inviteData: [] ,//二维码信息
codeIndex : 0,
posterImg : '',
defaultImg: '/static/dev/WechatIMG9663.png',
defaultImg: '',
loaded : false,
posterShow: false
};
@@ -95,7 +95,6 @@
// 生成海报
async coverCode(){
// let { img, title, price, head, tips } = this
let img = this.inviteData[this.codeIndex].code
let back = this.inviteData[this.codeIndex].cover
let name = this.inviteData[this.codeIndex].user_info.nickname
@@ -104,14 +103,14 @@
let date = this.inviteData[this.codeIndex].date
draw = new Draw({
width: 375,
height: 745,
height: 667,
canvasId:'myCanvas',
_this: this,
background: {
type: 'color',
color: 'white',
w: 375,
h: 745,
h: 667,
},
})
let res = await draw.createdSharePoster(({ bgObj }) => {
@@ -126,7 +125,7 @@
y: 0,
src: back,
w: 375,
h: 745,
h: 667,
zIndex: 0,
},
@@ -134,7 +133,7 @@
{
type: 'rect',
x: 280,
y: 20,
y: 10,
w: 60, // 宽度 必填
h: 80, // 高度 必填
zIndex: 99,
@@ -148,7 +147,7 @@
type: 'line',
zIndex: 99,
x: 280,
y: 74,
y: 62,
w: 60, // 宽度 默认整个画布的宽度 - x轴的距离
color: '#ffffff', // 颜色 默认#000000 在不考虑字节跳动小程序的前提下可简写(#000)
alpha: 1, // 透明度 默认1 取值范围 0~1
@@ -161,7 +160,7 @@
{
type: 'text',
x: 284,
y: 28,
y: 18,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.month,
@@ -174,14 +173,14 @@
// 日历-日
{
type: 'text',
x: 296,
y: 50,
x: 298,
y: 40,
zIndex: 99,
w: width - (20 * 2),
text: date.solar.day,
color: '#ffffff',
font: {
size: 20,
size: 18,
weight: 'bold'
}
},
@@ -190,7 +189,7 @@
{
type: 'text',
x: 282,
y: 80,
y: 70,
zIndex: 99,
w: width - (20 * 2),
text: date.lunar,
@@ -203,39 +202,39 @@
// 用户昵称
{
type: 'text',
x: 90,
y: 650,
x: 86,
y: 600,
zIndex: 99,
w: width - (20 * 2),
text: name,
color: '#ffffff',
font: {
size: 18
size: 16
}
},
// 邀请码
{
type: 'text',
x: 90,
y: 685,
x: 86,
y: 630,
zIndex: 99,
w: width - (20 * 2),
text: '邀请码:' + invite,
color: '#c4a1cb',
font: {
size: 16
size: 14
}
},
// 用户头像
{
type: 'image',
x: 20,
y: 650,
x: 24,
y: 598,
src: avatar,
w: 54,
h: 54,
w: 46,
h: 46,
drawType: 'arc',
zIndex: 99,
borderWidth: 5, // 图片边框大小 默认0
@@ -245,10 +244,10 @@
// 二维码
{
type: 'image',
x: 270,
y: 630,
w: 90,
h: 90,
x: 280,
y: 585,
w: 72,
h: 72,
zIndex: 99,
src: img
}
@@ -304,7 +303,7 @@
.code{
position: relative;
width: 100%;
padding-top: calc(199% - 280rpx - #{$padding * 2});
padding-top: calc(183% - 280rpx - #{$padding * 2});
.code-swiper{
position: absolute;
top: 0;
@@ -366,11 +365,10 @@
// 头像昵称
.codeCont {
position: absolute;
left: 0;
left: 10rpx;
bottom: 0;
width: 100%;
left: 0;
padding: 10rpx 30rpx 50rpx;
padding: 10rpx 30rpx 20rpx;
box-sizing: border-box;
z-index: 9;
.codeCont-avatar {
@@ -384,7 +382,7 @@
width: 100%;
left: 0;
top: 0;
padding: 10rpx 40rpx 0 150rpx;
padding: 10rpx 40rpx 0 140rpx;
box-sizing: border-box;
.codeCont-name {
color: #FFFFFF;
@@ -398,17 +396,17 @@
}
}
.codeCont-img {
width: 140rpx;
height: 140rpx;
width: 120rpx;
height: 120rpx;
position: absolute;
right: 30rpx;
bottom: 30rpx;
right: 50rpx;
bottom: 10rpx;
}
}
// 日历
.codDate {
position: absolute;
top: 30rpx;
top: 15rpx;
right: 70rpx;
z-index: 9;
color: #FFFFFF;
@@ -434,7 +432,7 @@
// canvas
.my-canvas{
width: 375px;
height: 745px;
height: 667px;
position: fixed;
top: -99999999999rpx;
left: -99999999999rpx;

View File

@@ -15,7 +15,7 @@
<view class="newBack" v-if="newState"></view>
<view class="newCont" v-if="newState">
<view class="newCont-title">
{{newList[newPopIndex].title}}
<view class="newCont-title-text">{{newList[newPopIndex].title}}</view>
</view>
<view class="newCont-text">
<rich-text :nodes="newList[newPopIndex].content"></rich-text>
@@ -28,20 +28,7 @@
<!-- 消息列表弹出 end -->
<!-- 用户信息 start -->
<!-- <view class="fileTool" :class="{ bigTool: scroll > 200 }">
<view class="user-portrait">
<image class="user-portrait-head" :src="userData.avatar ? userData.avatar : '/static/user/user-portrait.png'" mode="aspectFill"></image>
</view>
<view class="user-tool">
<view class="user-tool-name">
{{userData.nickname}}
</view>
<image class="user-tool-icon" src="/static/user/user-top-00.png" mode="aspectFill" @click="$Router.push({name: 'setting'})"></image>
<image class="user-tool-icon" src="/static/user/user-top-01.png" mode="aspectFill" @click="$Router.push({name: 'news'})"></image>
</view>
</view> -->
<view class="user-top" :class="[scroll > 0 ? 'bigTop' : 'refurnTop']">
<!-- <image class="user-back" :class="[scroll > 0 ? 'bigSize' : 'refurnSize']" src="../../static/img/user-back.png" mode="aspectFill"></image> -->
<view class="user-top">
<view class="user-tool">
<image class="user-tool-icon" src="/static/user/user-top-00.png" mode="aspectFill" @click="$Router.push({name: 'setting'})"></image>
<image class="user-tool-icon" src="/static/user/user-top-01.png" mode="aspectFill" @click="$Router.push({name: 'news'})"></image>
@@ -113,7 +100,7 @@
<!-- 用户信息 end -->
<!-- 滑动内容 start -->
<view class="slide" :class="{ bigSlide: classStyle }" @touchmove="move">
<view class="slide">
<!-- 消息中心 -->
<view class="userNew">
<image class="userNew-icon" src="/static/user/userNew_icon.png"></image>
@@ -234,19 +221,6 @@
</view>
</view>
</view>
<!-- <view class="btns">
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">基础信息</view>
<view class="item" @click="$Router.push({name: 'goodsManagement'})">商品权证</view>
<view class="item" @click="$Router.push({name: 'couponsManagement'})">优惠券管理</view>
<view class="item" @click="$Router.push({name: 'instrumentBasics'})">店员管理</view>
<view class="item" @click="$Router.push({name: 'instrumentCustomer'})">成交客户</view>
<view class="item" @click="$Router.push({name: 'Personal'})">个人认证</view>
<view class="item" @click="$Router.push({name: 'companyApprove'})">企业认证</view>
<view class="item" @click="$Router.push({name: 'companyApprove', params: { form_type: 'put' }})">编辑企业认证</view>
<view class="item" @click="$Router.push({name: 'setting'})">设置中心</view>
</view> -->
</view>
</view>
</template>
@@ -378,6 +352,7 @@
uni.showModal({
title: title,
content: content,
confirmColor: '#8b64fd',
showCancel: false
})
},
@@ -487,14 +462,19 @@
text-align: center;
color: $text-gray;
.newCont-title {
padding: 80rpx 40rpx 0;
padding: 25rpx 40rpx;
border-bottom: 1rpx solid #eaeaea;
box-sizing: border-box;
font-size: 30rpx;
margin-bottom: 30rpx;
font-weight: 600;
text-align: center;
.newCont-title-text {
padding: 0 50rpx;
box-sizing: border-box;
}
}
.newCont-text {
padding: 50rpx 40rpx;
padding: 20rpx 40rpx 40rpx;
box-sizing: border-box;
line-height: 48rpx;
text-align: justify;
@@ -504,17 +484,16 @@
}
.newCont-btn {
color: #7e54fe;
margin-top: 30rpx;
font-size: 30rpx;
line-height: 90rpx;
border-top: 2rpx solid #eaeaea;
}
.newCont-close {
position: absolute;
top: 20rpx;
top: 28rpx;
right: 20rpx;
width: 34rpx;
height: 34rpx;
width: 32rpx;
height: 32rpx;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 152 KiB