purui před 2 týdny
rodič
revize
9eff13f7ba

+ 19 - 0
packages/app/src/pages-sub/home/content/index.vue

@@ -16,6 +16,15 @@ const id = ref()
 const type = ref()
 const request = ref<() => Promise<IResData<Partial<Content>>>>()
 const { data, run } = useRequest(() => request.value(), { initialData: {} })
+const formatData = (res) =>{
+	return {
+	  		data:{
+	  			isBanner: true,
+	  			title: res.name,
+	  			contentDetail: res.bannerDetailsContent
+	  		}
+	  } 
+}
 onLoad(async (query: { id: string; type?: 'banner'; data?: string }) => {
   id.value = query.id
   type.value = query.type
@@ -36,6 +45,16 @@ onLoad(async (query: { id: string; type?: 'banner'; data?: string }) => {
           },
         }
       })
+  }else if(type.value === 'home-banner'){
+		let res = JSON.parse(query.data)
+		console.log(res)	
+		request.value = () => {
+				return {
+					isBanner: true,
+					title: res.name,
+					contentDetail: res.bannerDetailsContent
+				}
+			}  
   } else {
     request.value = () => getContent({ id: id.value })
   }

+ 6 - 6
packages/app/src/pages-sub/mine/honors/detail/index.vue

@@ -52,7 +52,7 @@ const createPoster = () => {
           data.value.quantity ? data.value.activedImage : data.value.image,
           designer.value.headImgUrl || userInfo.value?.avatar || NetImages.DefaultAvatar,
           NetImages.Logo,
-          designer.value?.qrcodeUrl,
+          designer.value?.homeUrl,
         ].map((it) => it && uni.getImageInfo({ src: it }).then(({ path }) => path)),
       )
       const ctx = uni.createCanvasContext('firstCanvas')
@@ -70,13 +70,13 @@ const createPoster = () => {
           canvas.FillText(userInfo.value?.nickname, '#ffffff', 16, 63, 46)
           const textNameWidth = ctx.measureText(data.value.name).width
           const textDesWidth = ctx.measureText(subTitle.value).width
+		  console.log(textDesWidth)
           canvas.FillText(data.value?.name, '#ffffff', 18, (345 - textNameWidth) / 2, 291)
-          canvas.FillText(subTitle.value, '#ffffff', 14, (345 - textDesWidth) / 2, 326)
-
-          canvas.Image(icon1, 17, 415, 28, 28)
-          canvas.FillText('筑巢荟', '#ffffff', 18, 63, 436)
+          canvas.FillText(subTitle.value, '#ffffff', 14, (365 - textDesWidth) / 2, 326)
+          // canvas.Image(icon1, 17, 415, 28, 28)
+          // canvas.FillText('筑巢荟', '#ffffff', 18, 63, 436)
           canvas.Image(icon2, 250, 393, 80, 80)
-
+				
           ctx.draw(true, () => {
             uni.canvasToTempFilePath({
               canvasId: 'firstCanvas',

+ 1 - 1
packages/app/src/pages-sub/mine/honors/index.vue

@@ -95,7 +95,6 @@ const handleGetBadge = (badge: any) => {
 const currentCertificate = ref<Certificate | undefined>()
 const isOwner = computed(() => String(userInfo.value?.userId) === id.value)
 onLoad(async (query?: Record<string | 'active' | 'id' | 'isShared', string>) => {
-  console.log('query:::::', query)
   if (Object.keys(query).length !== 0) {
     if (query?.active) {
       active.value = query.active
@@ -111,6 +110,7 @@ onLoad(async (query?: Record<string | 'active' | 'id' | 'isShared', string>) =>
   await setBadges()
   await setCertificates()
   await setCollectionBadges()
+  console.log('query:::::', isOwner.value,isShared.value)
 })
 </script>
 <template>