라이브 관심사, 크리에이터 관심사 - 연령제한 추가
This commit is contained in:
		| @@ -2,7 +2,7 @@ | ||||
|   <div> | ||||
|     <v-toolbar dark> | ||||
|       <v-spacer /> | ||||
|       <v-toolbar-title>수다친구 관심사 관리</v-toolbar-title> | ||||
|       <v-toolbar-title>크리에이터 관심사 관리</v-toolbar-title> | ||||
|       <v-spacer /> | ||||
|     </v-toolbar> | ||||
|  | ||||
| @@ -78,7 +78,12 @@ | ||||
|         </template> | ||||
|  | ||||
|         <v-card> | ||||
|           <v-card-title>관심사 등록</v-card-title> | ||||
|           <v-card-title v-if="selected_tag !== null"> | ||||
|             관심사 수정 | ||||
|           </v-card-title> | ||||
|           <v-card-title v-else> | ||||
|             관심사 등록 | ||||
|           </v-card-title> | ||||
|           <v-card-text> | ||||
|             <v-text-field | ||||
|               v-model="tag_text" | ||||
| @@ -86,6 +91,19 @@ | ||||
|               required | ||||
|             /> | ||||
|           </v-card-text> | ||||
|           <v-card-text> | ||||
|             <v-row> | ||||
|               <v-col cols="4"> | ||||
|                 연령제한 | ||||
|               </v-col> | ||||
|               <v-col cols="8"> | ||||
|                 <input | ||||
|                   v-model="is_adult" | ||||
|                   type="checkbox" | ||||
|                 > | ||||
|               </v-col> | ||||
|             </v-row> | ||||
|           </v-card-text> | ||||
|           <div class="image-select"> | ||||
|             <label for="image"> | ||||
|               이미지 등록 | ||||
| @@ -150,6 +168,7 @@ export default { | ||||
|       show_dialog: false, | ||||
|       selected_tag: null, | ||||
|       tag_text: null, | ||||
|       is_adult: false, | ||||
|       image: null, | ||||
|       image_url: null | ||||
|     } | ||||
| @@ -194,12 +213,15 @@ export default { | ||||
|       this.image = null | ||||
|       this.image_url = null | ||||
|       this.tag_text = null | ||||
|       this.is_adult = false | ||||
|       this.selected_tag = null | ||||
|     }, | ||||
|  | ||||
|     showModifyTagDialog(tag) { | ||||
|       this.selected_tag = tag | ||||
|       this.image_url = tag.image | ||||
|       this.tag_text = tag.tag | ||||
|       this.is_adult = tag.isAdult | ||||
|       this.show_dialog = true | ||||
|     }, | ||||
|  | ||||
| @@ -208,15 +230,13 @@ export default { | ||||
|  | ||||
|       const formData = new FormData() | ||||
|       formData.append("image", this.image) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text})) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text, isAdult: this.is_adult})) | ||||
|  | ||||
|       const res = await api.enrollment(formData) | ||||
|  | ||||
|       if (res.status === 200 && res.data.success === true) { | ||||
|         this.show_dialog = false | ||||
|         this.image = null | ||||
|         this.image_url = null | ||||
|         this.tag_text = null | ||||
|         this.cancel() | ||||
|  | ||||
|         this.tags = [] | ||||
|         this.notifySuccess(res.data.message) | ||||
|  | ||||
| @@ -263,15 +283,13 @@ export default { | ||||
|  | ||||
|       const formData = new FormData() | ||||
|       formData.append("image", this.image) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text})) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text, isAdult: this.is_adult})) | ||||
|  | ||||
|       const res = await api.modifyTag(this.selected_tag.id, formData) | ||||
|  | ||||
|       if (res.status === 200 && res.data.success === true) { | ||||
|         this.show_dialog = false | ||||
|         this.image = null | ||||
|         this.image_url = null | ||||
|         this.tag_text = null | ||||
|         this.cancel() | ||||
|         this.tags = [] | ||||
|         this.notifySuccess(res.data.message) | ||||
|  | ||||
|   | ||||
| @@ -91,6 +91,19 @@ | ||||
|               required | ||||
|             /> | ||||
|           </v-card-text> | ||||
|           <v-card-text> | ||||
|             <v-row> | ||||
|               <v-col cols="4"> | ||||
|                 연령제한 | ||||
|               </v-col> | ||||
|               <v-col cols="8"> | ||||
|                 <input | ||||
|                   v-model="is_adult" | ||||
|                   type="checkbox" | ||||
|                 > | ||||
|               </v-col> | ||||
|             </v-row> | ||||
|           </v-card-text> | ||||
|           <div class="image-select"> | ||||
|             <label for="image"> | ||||
|               이미지 등록 | ||||
| @@ -155,6 +168,7 @@ export default { | ||||
|       show_dialog: false, | ||||
|       selected_tag: null, | ||||
|       tag_text: null, | ||||
|       is_adult: false, | ||||
|       image: null, | ||||
|       image_url: null | ||||
|     } | ||||
| @@ -200,12 +214,14 @@ export default { | ||||
|       this.image_url = null | ||||
|       this.tag_text = null | ||||
|       this.selected_tag = null | ||||
|       this.is_adult = false | ||||
|     }, | ||||
|  | ||||
|     showModifyTagDialog(tag) { | ||||
|       this.selected_tag = tag | ||||
|       this.image_url = tag.image | ||||
|       this.tag_text = tag.tag | ||||
|       this.is_adult = tag.isAdult | ||||
|       this.show_dialog = true | ||||
|     }, | ||||
|  | ||||
| @@ -214,15 +230,13 @@ export default { | ||||
|  | ||||
|       const formData = new FormData() | ||||
|       formData.append("image", this.image) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text})) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text, isAdult: this.is_adult})) | ||||
|  | ||||
|       const res = await api.enrollment(formData) | ||||
|  | ||||
|       if (res.status === 200 && res.data.success === true) { | ||||
|         this.show_dialog = false | ||||
|         this.image = null | ||||
|         this.image_url = null | ||||
|         this.tag_text = null | ||||
|         this.cancel() | ||||
|  | ||||
|         this.tags = [] | ||||
|         this.notifySuccess(res.data.message) | ||||
|  | ||||
| @@ -269,16 +283,13 @@ export default { | ||||
|  | ||||
|       const formData = new FormData() | ||||
|       formData.append("image", this.image) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text})) | ||||
|       formData.append("request", JSON.stringify({tag: this.tag_text, isAdult: this.is_adult})) | ||||
|  | ||||
|       const res = await api.modifyTag(this.selected_tag.id, formData) | ||||
|  | ||||
|       if (res.status === 200 && res.data.success === true) { | ||||
|         this.show_dialog = false | ||||
|         this.selected_tag = null | ||||
|         this.image = null | ||||
|         this.image_url = null | ||||
|         this.tag_text = null | ||||
|         this.cancel() | ||||
|  | ||||
|         this.tags = [] | ||||
|         this.notifySuccess(res.data.message) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung