张文飞 3 anni fa
parent
commit
37cadf0b7a
1 ha cambiato i file con 35 aggiunte e 4 eliminazioni
  1. 35 4
      pages/shareCardPage/shareCardPage.vue

+ 35 - 4
pages/shareCardPage/shareCardPage.vue

@@ -6,9 +6,9 @@
 				<image @click="back" class="close" src="../../static/icons/icon_close_share.png" mode=""></image>
 			</view>
 			<view class="share_desc">
-				项目背靠景区,在售建面约132-161㎡国风合院,均价20000元/㎡;建面约95㎡洋房…
+				{{shareRemark}}
 			</view>
-			<view class="share_copy">
+			<view class="share_copy" @click="copy">
 				<image class="icon_share_copy" src="../../static/icons/icon_copy.png" mode=""></image>
 				<text class="share_txt">复制发圈</text>
 			</view>
@@ -31,6 +31,7 @@
 				type:"",
 				projectId:"",
 				page:"",
+				shareRemark:"",
 			};
 		},
 		created() {
@@ -41,6 +42,7 @@
 			this.projectId =param.projectId;
 			this.type=param.type;
 			this.getShareCard();
+			this.queryProjectByH5();
 		},
 		methods:{
 			async  getShareCard(){
@@ -56,10 +58,32 @@
 					 this.shareUrl = ret.data.single
 				}
 			},
+			async queryProjectByH5(){
+				let ret = await this.$myRequest({
+					url: "/project/queryProjectByH5",
+					data: {
+						"projectId": this.projectId,
+					}
+				})
+				if (ret.data.success) {
+					this.shareRemark =  ret.data.single.shareRemark||''
+				}
+			},
 			back(){
 				uni.reLaunch({
 					url:"../homePage/homePage"
 				})
+			},
+			copy(){
+				uni.setClipboardData({
+					data:this.shareRemark,
+					success() {
+						uni.showToast({
+							icon:"none",
+							title:"复制成功"
+						})
+					}
+				})
 			}
 		}
 	}
@@ -104,14 +128,21 @@
 		}
 		
 		.share_desc{
+			width: calc(100% - 60rpx);
 			font-size: 24rpx;
 			font-family: Verdana, Verdana-Regular;
 			font-weight: 400;
 			text-align: left;
 			color: #7f7f7f;
 			margin-top: 22rpx;
-			padding-left: 30rpx;
-			padding-right: 30rpx;
+			box-sizing: border-box;
+			text-overflow: -o-ellipsis-lastline;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-line-clamp: 2;
+			line-clamp: 2;
+			-webkit-box-orient: vertical;
 		}
 		
 		.share_copy{