|  | @@ -8,11 +8,9 @@
 | 
	
		
			
				|  |  |  </route>
 | 
	
		
			
				|  |  |  <script setup lang="ts">
 | 
	
		
			
				|  |  |  import NavbarEvo from '@/components/navbar-evo.vue'
 | 
	
		
			
				|  |  | -import { getBanners,getDesignerInfo } from '../../../../core/libs/requests'
 | 
	
		
			
				|  |  | +import { getBanners, getDesignerInfo } from '../../../../core/libs/requests'
 | 
	
		
			
				|  |  |  import { Badge, BannerMode } from '../../../../core/libs/models'
 | 
	
		
			
				|  |  |  import { NetImages } from '../../../../core/libs/net-images'
 | 
	
		
			
				|  |  | -import { useMessage } from 'wot-design-uni'
 | 
	
		
			
				|  |  | -import { pick } from 'radash'
 | 
	
		
			
				|  |  |  import ImageEvo from '@/components/image-evo.vue'
 | 
	
		
			
				|  |  |  import dayjs from 'dayjs'
 | 
	
		
			
				|  |  |  import { storeToRefs } from 'pinia'
 | 
	
	
		
			
				|  | @@ -129,18 +127,17 @@ const setBadgesPath = (type: string) => {
 | 
	
		
			
				|  |  |      uni.redirectTo({
 | 
	
		
			
				|  |  |        url: `/pages-sub/home/offline-activity/index`,
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  | -  } else if(type === '游学徽章' || type === '典藏勋章') {
 | 
	
		
			
				|  |  | -	  if(banners.value?.length > 0){
 | 
	
		
			
				|  |  | -		  uni.redirectTo({
 | 
	
		
			
				|  |  | -		    url: `/pages-sub/home/study-tour/list?designStudyAbroadYear=${banners.value[0].designStudyAbroadYear}&designDesc=${banners.value[0].designDesc}`,
 | 
	
		
			
				|  |  | -		  })
 | 
	
		
			
				|  |  | -	  }else{
 | 
	
		
			
				|  |  | -		  uni.showToast({
 | 
	
		
			
				|  |  | -		  	title:"暂无游学计划",
 | 
	
		
			
				|  |  | -			icon:"none"
 | 
	
		
			
				|  |  | -		  })
 | 
	
		
			
				|  |  | -	  }
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +  } else if (type === '游学徽章' || type === '典藏勋章') {
 | 
	
		
			
				|  |  | +    if (banners.value?.length > 0) {
 | 
	
		
			
				|  |  | +      uni.redirectTo({
 | 
	
		
			
				|  |  | +        url: `/pages-sub/home/study-tour/list?designStudyAbroadYear=${banners.value[0].designStudyAbroadYear}&designDesc=${banners.value[0].designDesc}`,
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +      uni.showToast({
 | 
	
		
			
				|  |  | +        title: '暂无游学计划',
 | 
	
		
			
				|  |  | +        icon: 'none',
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    } else {
 | 
	
		
			
				|  |  |      uni.switchTab({
 | 
	
		
			
				|  |  |        url: `/pages/home/index`,
 | 
	
	
		
			
				|  | @@ -168,10 +165,9 @@ onLoad(async (query: { type: 'badge' | 'certificate'; data: string; id: number }
 | 
	
		
			
				|  |  |    console.log(query, 'query2')
 | 
	
		
			
				|  |  |    if (query.type === 'badge') {
 | 
	
		
			
				|  |  |      const badge = JSON.parse(query.data) as Badge
 | 
	
		
			
				|  |  | -	console.log(badge)
 | 
	
		
			
				|  |  |      data.value = {
 | 
	
		
			
				|  |  |        name: badge.badgeName,
 | 
	
		
			
				|  |  | -	  userId:query.id,
 | 
	
		
			
				|  |  | +      userId: query.id,
 | 
	
		
			
				|  |  |        quantity: badge.quantity,
 | 
	
		
			
				|  |  |        image: badge.badgeNotObtainedImage,
 | 
	
		
			
				|  |  |        activedImage: badge.badgeYesObtainedImage,
 | 
	
	
		
			
				|  | @@ -179,12 +175,13 @@ onLoad(async (query: { type: 'badge' | 'certificate'; data: string; id: number }
 | 
	
		
			
				|  |  |        badgeDescription: badge.badgeDescription,
 | 
	
		
			
				|  |  |        createTime: badge.createTime,
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -	await setBanners()
 | 
	
		
			
				|  |  | +    console.log('=======================', data)
 | 
	
		
			
				|  |  | +    await setBanners()
 | 
	
		
			
				|  |  |      if (data.value.quantity > 0) {
 | 
	
		
			
				|  |  | -      await setData();	  
 | 
	
		
			
				|  |  | -      if(data.value.userId == userInfo.value.userId){
 | 
	
		
			
				|  |  | -		  posterUrl.value = await createPoster()
 | 
	
		
			
				|  |  | -	  }
 | 
	
		
			
				|  |  | +      await setData()
 | 
	
		
			
				|  |  | +      if (data.value.userId == userInfo.value.userId) {
 | 
	
		
			
				|  |  | +        posterUrl.value = await createPoster()
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  })
 | 
	
	
		
			
				|  | @@ -245,21 +242,21 @@ onLoad(async (query: { type: 'badge' | 'certificate'; data: string; id: number }
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <template v-if="data.userId == userInfo.userId">
 | 
	
		
			
				|  |  | -		<wd-button
 | 
	
		
			
				|  |  | -		  custom-class="w-[161px] h-12 bg-[#0cbe7c]! rounded-[30px]"
 | 
	
		
			
				|  |  | -		  @click="showActions"
 | 
	
		
			
				|  |  | -		  v-if="data.quantity > 0"
 | 
	
		
			
				|  |  | -		>
 | 
	
		
			
				|  |  | -		  去分享
 | 
	
		
			
				|  |  | -		</wd-button>
 | 
	
		
			
				|  |  | -		<wd-button
 | 
	
		
			
				|  |  | -		  custom-class="w-[161px] h-12 bg-[#0cbe7c]! rounded-[30px]"
 | 
	
		
			
				|  |  | -		  @click="setBadgesPath(data.badgeType)"
 | 
	
		
			
				|  |  | -		  v-else
 | 
	
		
			
				|  |  | -		>
 | 
	
		
			
				|  |  | -		  去获得
 | 
	
		
			
				|  |  | -		</wd-button>
 | 
	
		
			
				|  |  | -	</template>
 | 
	
		
			
				|  |  | +      <wd-button
 | 
	
		
			
				|  |  | +        custom-class="w-[161px] h-12 bg-[#0cbe7c]! rounded-[30px]"
 | 
	
		
			
				|  |  | +        @click="showActions"
 | 
	
		
			
				|  |  | +        v-if="data.quantity > 0"
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +        去分享
 | 
	
		
			
				|  |  | +      </wd-button>
 | 
	
		
			
				|  |  | +      <wd-button
 | 
	
		
			
				|  |  | +        custom-class="w-[161px] h-12 bg-[#0cbe7c]! rounded-[30px]"
 | 
	
		
			
				|  |  | +        @click="setBadgesPath(data.badgeType)"
 | 
	
		
			
				|  |  | +        v-else
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +        去获得
 | 
	
		
			
				|  |  | +      </wd-button>
 | 
	
		
			
				|  |  | +    </template>
 | 
	
		
			
				|  |  |      <canvas
 | 
	
		
			
				|  |  |        class="w-[347px] h-[494px] absolute rounded-[20px] top--1000"
 | 
	
		
			
				|  |  |        canvas-id="firstCanvas"
 |