小程序产品库完成
This commit is contained in:
		
							
								
								
									
										52
									
								
								src/mods/AppContent/contentDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								src/mods/AppContent/contentDetail.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | ||||
| <template> | ||||
|   <section class="contentDetail"> | ||||
|     <ai-detail :detail="detail" :props="props"/> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AiDetail from "../../components/AiDetail/AiDetail"; | ||||
|  | ||||
| export default { | ||||
|   name: "contentDetail", | ||||
|   components: {AiDetail}, | ||||
|   data() { | ||||
|     return { | ||||
|       detail: {title: "内容详情"}, | ||||
|       props: { | ||||
|         count: "viewCount" | ||||
|       }, | ||||
|       id: "", | ||||
|     } | ||||
|   }, | ||||
|   onLoad({id}) { | ||||
|     if (id) { | ||||
|       this.id = id; | ||||
|       this.getDetail(id); | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail(id) { | ||||
|       this.$instance.post(`/app/appcontentinfo/queryDetailById`, null, { | ||||
|         params: {id} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.detail = res.data | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|   }, | ||||
|  | ||||
|   onShareAppMessage() { | ||||
|     return { | ||||
|       title: detail.title, | ||||
|       path: '/mods/AppContent/contentDetail?id=' + this.id | ||||
|     }; | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .contentDetail { | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user