시그니처 관리
- 캔 수정, 19금 설정 추가
This commit is contained in:
		| @@ -46,6 +46,15 @@ | |||||||
|               {{ item.can }} |               {{ item.can }} | ||||||
|             </template> |             </template> | ||||||
|  |  | ||||||
|  |             <template v-slot:item.isAdult="{ item }"> | ||||||
|  |               <h3 v-if="item.isAdult"> | ||||||
|  |                 O | ||||||
|  |               </h3> | ||||||
|  |               <h3 v-else> | ||||||
|  |                 X | ||||||
|  |               </h3> | ||||||
|  |             </template> | ||||||
|  |  | ||||||
|             <template v-slot:item.image="{ item }"> |             <template v-slot:item.image="{ item }"> | ||||||
|               <v-img |               <v-img | ||||||
|                 :src="item.image" |                 :src="item.image" | ||||||
| @@ -131,6 +140,20 @@ | |||||||
|             </v-row> |             </v-row> | ||||||
|           </v-card-text> |           </v-card-text> | ||||||
|  |  | ||||||
|  |           <v-card-text> | ||||||
|  |             <v-row> | ||||||
|  |               <v-col cols="4"> | ||||||
|  |                 19금 | ||||||
|  |               </v-col> | ||||||
|  |               <v-col cols="8"> | ||||||
|  |                 <input | ||||||
|  |                   v-model="is_adult" | ||||||
|  |                   type="checkbox" | ||||||
|  |                 > | ||||||
|  |               </v-col> | ||||||
|  |             </v-row> | ||||||
|  |           </v-card-text> | ||||||
|  |  | ||||||
|           <v-card-text> |           <v-card-text> | ||||||
|             <v-row align="center"> |             <v-row align="center"> | ||||||
|               <v-col cols="4"> |               <v-col cols="4"> | ||||||
| @@ -144,6 +167,7 @@ | |||||||
|                   <v-file-input |                   <v-file-input | ||||||
|                     id="image" |                     id="image" | ||||||
|                     v-model="image" |                     v-model="image" | ||||||
|  |                     accept="image/*" | ||||||
|                     @change="imageAdd" |                     @change="imageAdd" | ||||||
|                   /> |                   /> | ||||||
|                 </div> |                 </div> | ||||||
| @@ -193,7 +217,24 @@ | |||||||
|                 캔 |                 캔 | ||||||
|               </v-col> |               </v-col> | ||||||
|               <v-col cols="8"> |               <v-col cols="8"> | ||||||
|                 {{ selected_signature_can.can }} 캔 |                 <v-text-field | ||||||
|  |                   v-model="can" | ||||||
|  |                   label="캔" | ||||||
|  |                 /> | ||||||
|  |               </v-col> | ||||||
|  |             </v-row> | ||||||
|  |           </v-card-text> | ||||||
|  |  | ||||||
|  |           <v-card-text> | ||||||
|  |             <v-row> | ||||||
|  |               <v-col cols="4"> | ||||||
|  |                 19금 | ||||||
|  |               </v-col> | ||||||
|  |               <v-col cols="8"> | ||||||
|  |                 <input | ||||||
|  |                   v-model="is_adult" | ||||||
|  |                   type="checkbox" | ||||||
|  |                 > | ||||||
|               </v-col> |               </v-col> | ||||||
|             </v-row> |             </v-row> | ||||||
|           </v-card-text> |           </v-card-text> | ||||||
| @@ -211,6 +252,7 @@ | |||||||
|                   <v-file-input |                   <v-file-input | ||||||
|                     id="image" |                     id="image" | ||||||
|                     v-model="image" |                     v-model="image" | ||||||
|  |                     accept="image/*" | ||||||
|                     @change="imageAdd" |                     @change="imageAdd" | ||||||
|                   /> |                   /> | ||||||
|                 </div> |                 </div> | ||||||
| @@ -298,6 +340,7 @@ export default { | |||||||
|  |  | ||||||
|       can: 0, |       can: 0, | ||||||
|       image: null, |       image: null, | ||||||
|  |       is_adult: false, | ||||||
|       image_url: null, |       image_url: null, | ||||||
|       creator_id: null, |       creator_id: null, | ||||||
|       is_active: null, |       is_active: null, | ||||||
| @@ -322,6 +365,12 @@ export default { | |||||||
|           sortable: false, |           sortable: false, | ||||||
|           value: 'can', |           value: 'can', | ||||||
|         }, |         }, | ||||||
|  |         { | ||||||
|  |           text: '19금', | ||||||
|  |           align: 'center', | ||||||
|  |           sortable: false, | ||||||
|  |           value: 'isAdult', | ||||||
|  |         }, | ||||||
|         { |         { | ||||||
|           text: '이미지', |           text: '이미지', | ||||||
|           align: 'center', |           align: 'center', | ||||||
| @@ -366,6 +415,8 @@ export default { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     showModifyDialog(item) { |     showModifyDialog(item) { | ||||||
|  |       this.can = item.can; | ||||||
|  |       this.is_adult = item.isAdult | ||||||
|       this.image_url = item.image; |       this.image_url = item.image; | ||||||
|       this.selected_signature_can = item |       this.selected_signature_can = item | ||||||
|       this.show_modify_dialog = true |       this.show_modify_dialog = true | ||||||
| @@ -396,6 +447,7 @@ export default { | |||||||
|       this.image_url = null |       this.image_url = null | ||||||
|       this.can = 0 |       this.can = 0 | ||||||
|       this.is_active = null |       this.is_active = null | ||||||
|  |       this.is_adult = false | ||||||
|       this.selected_signature_can = {} |       this.selected_signature_can = {} | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
| @@ -432,6 +484,7 @@ export default { | |||||||
|         const formData = new FormData() |         const formData = new FormData() | ||||||
|         formData.append("can", this.can) |         formData.append("can", this.can) | ||||||
|         formData.append("image", this.image) |         formData.append("image", this.image) | ||||||
|  |         formData.append("isAdult", this.is_adult) | ||||||
|         formData.append("creator_id", this.creator_id) |         formData.append("creator_id", this.creator_id) | ||||||
|  |  | ||||||
|         const res = await api.createSignature(formData) |         const res = await api.createSignature(formData) | ||||||
| @@ -454,7 +507,11 @@ export default { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     async modifySignatureCan() { |     async modifySignatureCan() { | ||||||
|       if (this.image === null) { |       if ( | ||||||
|  |         this.image === null && | ||||||
|  |         this.is_adult === this.selected_signature_can.isAdult && | ||||||
|  |         this.can === this.selected_signature_can.can | ||||||
|  |       ) { | ||||||
|         this.notifyError('수정사항이 없습니다.') |         this.notifyError('수정사항이 없습니다.') | ||||||
|         return; |         return; | ||||||
|       } |       } | ||||||
| @@ -466,7 +523,18 @@ export default { | |||||||
|       try { |       try { | ||||||
|         const formData = new FormData() |         const formData = new FormData() | ||||||
|         formData.append("id", this.selected_signature_can.id) |         formData.append("id", this.selected_signature_can.id) | ||||||
|         formData.append("image", this.image) |  | ||||||
|  |         if (this.image !== null) { | ||||||
|  |           formData.append("image", this.image) | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (this.is_adult !== this.selected_signature_can.isAdult) { | ||||||
|  |           formData.append("isAdult", this.is_adult) | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (this.can !== this.selected_signature_can.can) { | ||||||
|  |           formData.append("can", this.can) | ||||||
|  |         } | ||||||
|  |  | ||||||
|         const res = await api.modifySignature(formData) |         const res = await api.modifySignature(formData) | ||||||
|         if (res.status === 200 && res.data.success === true) { |         if (res.status === 200 && res.data.success === true) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung