Browse Source

长图海报

xhj 2 years ago
parent
commit
7d6059e631
2 changed files with 20 additions and 6 deletions
  1. 1 0
      library/poster/index.vue
  2. 19 6
      library/posterService/posterService.vue

+ 1 - 0
library/poster/index.vue

@@ -3,6 +3,7 @@
 		<view class="top-sort ddflex">
 			<view :class="'top-sort-item flex '+(tabCode=='poster'?'top-sort-item-active':'')" @click="tabChange('poster')">海报</view>
 			<view :class="'top-sort-item flex '+(tabCode=='poster_product'?'top-sort-item-active':'')" @click="tabChange('poster_product')">产品宣传</view>
+			<view :class="'top-sort-item flex '+(tabCode=='poster_long'?'top-sort-item-active':'')" @click="tabChange('poster_long')">长图海报</view>
 		</view>
 		<view style="height: 85rpx;"></view>
 		<view style="border-top: 20rpx solid #F4F5F9;">

+ 19 - 6
library/posterService/posterService.vue

@@ -3,16 +3,24 @@
 		<view class="poster" id="poster">
 			<image class="poster-pic" :src="posterBg" mode="widthFix"></image>
 			<view class="ddflex" style="padding: 22rpx 35rpx;position: relative;">
+				<!-- 普通海报 -->
 				<view class="flex" v-if="typeCode=='poster'">
 					<view class="poster-title">
 						{{userInfo.realName?userInfo.realName:(userInfo.nickName?userInfo.nickName:'')}} | 中国人寿股份湖南分公司
 					</view>
 					<view class="poster-note">长按小程序码了解更多</view>
 				</view>
+				<!-- 产品宣传 -->
 				<view class="flex" v-if="typeCode=='poster_product'">
 					<view class="poster-title">{{productTitle?productTitle:'请填写产品链接'}}</view>
 					<view class="poster-note">长按二维码了解更多</view>
 				</view>
+				<!-- 长图海报 -->
+				<view class="flex" v-if="typeCode=='poster_long'">
+					<view class="poster-title">{{userInfo.realName?userInfo.realName:(userInfo.nickName?userInfo.nickName:'')}}{{userInfo.mobile?' | '+userInfo.mobile:''}}</view>
+					<view class="poster-note">扫码即可咨询理赔事宜</view>
+				</view>
+				
 				<image class="poster-code" :src="code?code:'../../static/images/lj_img.png'"></image>
 				<view class="change-product ddflex" @click="jumpUrl('/library/productLink/productLink')"
 					v-if="typeCode=='poster_product'">
@@ -99,7 +107,7 @@
 				}, res => {
 					this.posterDetail = res
 					this.posterBg = this.posterDetail.pic
-					if (this.typeCode == 'poster') {
+					if (this.typeCode == 'poster'||this.typeCode=='poster_long') {
 						this.getCodeUrl()
 					}
 				})
@@ -225,11 +233,16 @@
 						
 						
 						// ctx.restore();
-						
-						let nickName = this.userInfo.realName?this.userInfo.realName:(this.userInfo.nickName?this.userInfo.nickName:'');
-						nickName = nickName+' | 中国人寿股份湖南分公司'
-						
-						if(this.typeCode=="poster_product") nickName = this.productTitle
+						let nickName = ''
+						if(this.typeCode=='poster'){
+							nickName = this.userInfo.realName?this.userInfo.realName:(this.userInfo.nickName?this.userInfo.nickName:'');
+							nickName = nickName+' | 中国人寿股份湖南分公司'
+						}else if(this.typeCode=='poster_product'){
+							nickName = this.productTitle
+						}else if(this.typeCode=='poster_long'){
+							nickName = this.userInfo.realName?this.userInfo.realName:(this.userInfo.nickName?this.userInfo.nickName:'');
+							nickName = nickName+(this.userInfo.mobile?' | '+this.userInfo.mobile:'')
+						}
 						
 						ctx.fillStyle = '#333333';
 						ctx.font = '400 28px PingFang SC';