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