lyqu hace 4 años
padre
commit
dde8418ea2

+ 10 - 11
components/works-poster/works-poster.vue

@@ -4,8 +4,8 @@
 			<canvas id='canvas' @click.stop="" :style="{ width: canvasW + 'px', height: canvasH + 'px' }" canvas-id="my-canvas"></canvas>
 			<!-- <view class="text-center text-white">长按保存图片</view> -->
 		</view>
-		<u-popup v-model="imgShow" mode="center" width="640" height="940upx" border-radius="16">
-			<u-image width="640rpx%" height="940rpx" :src="imgUrl"></u-image>
+		<u-popup v-model="imgShow" mode="center" width="640" height="940" border-radius="16">
+			<u-image width="640" height="940" :src="imgUrl"></u-image>
 		</u-popup>
 	</view>
 
@@ -33,7 +33,8 @@
 		methods:{
 			//显示
 			showCanvas(){
-				this.isShow = true
+				this.isShow = true;
+				this.imgShow = true;
 				this.__init()
 			},
 			//初始化画布
@@ -105,9 +106,12 @@
 				setTimeout(()=>{
 					this.ctx.draw(true,()=>{
 						uni.hideLoading()
-						this.saveImage();
 					})
 				},500)
+				setTimeout(()=>{
+					this.saveImage();
+				}, 600)
+				
 			},
 			//绘制实心圆
 			drawEmptyRound(ctx,x,y,radius){
@@ -187,17 +191,12 @@
 			},
 			//保存图片到相册
 			saveImage(){
-				var that = this;
+				this.isShow = false;
 				uni.canvasToTempFilePath({
 					canvasId: 'my-canvas',
 					quality: 1,
 					success: (res) => {
-						console.log("base64图片===>>>>", res.tempFilePath)
-						base64ToPath(res.tempFilePath).then(path => {
-							console.log("图片===>>>>",path)
-							that.imgUrl = path;
-							that.imgShow = true;
-						})
+						this.imgUrl = res.tempFilePath;
 					}
 				},this);
 			}

+ 6 - 3
pages/activityList/activity/authorBoost.vue

@@ -46,7 +46,7 @@
 			<view class="title">打call助力</view>
 		</view>
 		<view class="bg-white padding-sm">
-			<view class="flex justify-around" style="flex-wrap: wrap;">
+			<view class="grid col-3 padding-xs">
 				<block v-for="(item,index) in boostDetail.presentList" :key="index">
 					<view class="text-center padding-top-xs" :class="current == index ? 'boder':''" @click="change(item.id,index)">
 						<image :src="item.icon" style="width: 80upx;height: 80upx;"></image>
@@ -142,13 +142,13 @@
 		data() {
 			return {
 				works: {
-					image: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/00662895-99aa-49dd-96dc-ab9715c61bd7-16144015443002660866131263584.png',
+					image: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/1d1454791585426da9f81a73a24b5274-图层 1.png',
 					title: '',
 					hotValue: '',
 					rank: '',
 					avatar: '',
 					name: '',
-					qrcode: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/00662895-99aa-49dd-96dc-ab9715c61bd7-16144015443002660866131263584.png',
+					qrcode: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/a9ef5a035d1b46e6b9e1deb78fe04703-qrcode.png',
 				},
 				current: 0,
 				boostDetail: {},
@@ -285,6 +285,9 @@
 			//邀请
 			invite() {
 				this.shareShow = true;
+				if (!this.$u.test.isEmpty(this.boostDetail.cover)) {
+					this.works.image = this.boostDetail.cover;
+				}
 				this.works.title = this.boostDetail.nickName;
 				this.works.hotValue = +this.boostDetail.hotValue;
 				this.works.rank = this.boostDetail.sequence;

+ 8 - 3
pages/activityList/activity/musicBoost.vue

@@ -44,7 +44,7 @@
 			<view class="title">打call助力</view>
 		</view>
 		<view class="bg-white padding-sm">
-			<view class="flex justify-around">
+			<view class="grid col-3 padding-xs">
 				<block v-for="(item,index) in boostDetail.presentList" :key="index">
 					<view class="text-center padding-top-xs" :class="current == index ? 'boder':''" @click="change(item.id, index)">
 						<image :src="item.icon" style="width: 80upx;height: 80upx;"></image>
@@ -140,13 +140,13 @@
 		data() {
 			return {
 				works: {
-					image: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/00662895-99aa-49dd-96dc-ab9715c61bd7-16144015443002660866131263584.png',
+					image: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/1d1454791585426da9f81a73a24b5274-图层 1.png',
 					title: '',
 					hotValue: '',
 					rank: '',
 					avatar: '',
 					name: '',
-					qrcode: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/00662895-99aa-49dd-96dc-ab9715c61bd7-16144015443002660866131263584.png',
+					qrcode: 'https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/a9ef5a035d1b46e6b9e1deb78fe04703-qrcode.png',
 				},
 				activityId: '',
 				current: 0,
@@ -295,6 +295,11 @@
 			//邀请
 			invite() {
 				this.shareShow = true;
+				if (this.boostDetail.urlsType == 1) {
+					this.works.image = this.boostDetail.cover;
+				} else {
+					this.works.image = this.boostDetail.urls;
+				}
 				this.works.title = this.boostDetail.title;
 				this.works.hotValue = +this.boostDetail.hotValue;
 				this.works.rank = this.boostDetail.rank;