张文飞 3 年之前
父節點
當前提交
5be34a70f7
共有 1 個文件被更改,包括 17 次插入8 次删除
  1. 17 8
      pages/shareCardPage/shareCardPage.vue

+ 17 - 8
pages/shareCardPage/shareCardPage.vue

@@ -56,14 +56,26 @@
 			this.page = param.page;
 			this.projectId =param.projectId;
 			this.type=param.type;
-			this.getShareCard();
-			this.queryProjectByH5();
+			if(this.projectId){
+				this.queryProjectByH5();
+				this.getShareCard();
+			}else {
+				this.queryProtocolConfigView();
+			}
+			
 		},
 		methods:{
-			async  getShareCard(){
-				uni.showLoading({
-					title:"分享图片生成中"
+			async queryProtocolConfigView(){
+				let res = await this.$myRequest({
+					url: "/project/queryProtocolConfigView",
+					data: {},
 				})
+				if(res.data.success){
+					this.shareUrl = res.data.single.shareImage;
+					this.shareRemark =  res.data.single.shareRemark||''
+				}
+			},
+			async  getShareCard(){
 				let ret = await this.$myRequest({
 					url: "/share/shareCard",
 					data: {
@@ -74,9 +86,6 @@
 				})
 				if (ret.data.success) {
 					 this.shareUrl = ret.data.single;
-					 uni.hideLoading()
-				}else{
-					uni.hideLoading()
 				}
 			},
 			async queryProjectByH5(){