Commit 16255e87 authored by zhanglu's avatar zhanglu

Merge branch 'build' into 'master'

Build

See merge request alpha/sun!29
parents 3b3fb394 f44616ca
This diff is collapsed.
.upload-container[data-v-54c5d4d6]{width:100%;position:relative}.upload-container[data-v-54c5d4d6]:after{content:"";display:table;clear:both}.upload-container .image-uploader[data-v-54c5d4d6]{width:35%;float:left}.upload-container .image-preview[data-v-54c5d4d6]{width:200px;height:200px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-preview .image-preview-wrapper[data-v-54c5d4d6]{position:relative;width:100%;height:100%}.upload-container .image-preview .image-preview-wrapper img[data-v-54c5d4d6]{width:100%;height:100%}.upload-container .image-preview .image-preview-action[data-v-54c5d4d6]{position:absolute;width:100%;height:100%;left:0;top:0;cursor:default;color:#fff;opacity:0;font-size:20px;background-color:rgba(0,0,0,.5);-webkit-transition:opacity .3s;transition:opacity .3s;cursor:pointer;text-align:center;line-height:200px}.upload-container .image-preview .image-preview-action .el-icon-delete[data-v-54c5d4d6]{font-size:36px}.upload-container .image-preview:hover .image-preview-action[data-v-54c5d4d6]{opacity:1}.upload-container .image-app-preview[data-v-54c5d4d6]{width:320px;height:180px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-app-preview .app-fake-conver[data-v-54c5d4d6]{height:44px;position:absolute;width:100%;text-align:center;line-height:64px;color:#fff}.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-212ef548]{position:relative}.createPost-container .createPost-main-container[data-v-212ef548]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-212ef548]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-212ef548]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-212ef548]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-212ef548]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-212ef548]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-212ef548]{display:inline-block}.createPost-container .word-counter[data-v-212ef548]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.upload-container[data-v-54c5d4d6]{width:100%;position:relative}.upload-container[data-v-54c5d4d6]:after{content:"";display:table;clear:both}.upload-container .image-uploader[data-v-54c5d4d6]{width:35%;float:left}.upload-container .image-preview[data-v-54c5d4d6]{width:200px;height:200px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-preview .image-preview-wrapper[data-v-54c5d4d6]{position:relative;width:100%;height:100%}.upload-container .image-preview .image-preview-wrapper img[data-v-54c5d4d6]{width:100%;height:100%}.upload-container .image-preview .image-preview-action[data-v-54c5d4d6]{position:absolute;width:100%;height:100%;left:0;top:0;cursor:default;color:#fff;opacity:0;font-size:20px;background-color:rgba(0,0,0,.5);-webkit-transition:opacity .3s;transition:opacity .3s;cursor:pointer;text-align:center;line-height:200px}.upload-container .image-preview .image-preview-action .el-icon-delete[data-v-54c5d4d6]{font-size:36px}.upload-container .image-preview:hover .image-preview-action[data-v-54c5d4d6]{opacity:1}.upload-container .image-app-preview[data-v-54c5d4d6]{width:320px;height:180px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-app-preview .app-fake-conver[data-v-54c5d4d6]{height:44px;position:absolute;width:100%;text-align:center;line-height:64px;color:#fff}.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-0f553769]{position:relative}.createPost-container .createPost-main-container[data-v-0f553769]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f553769]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f553769]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-0f553769]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-0f553769]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-0f553769]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-0f553769]{display:inline-block}.createPost-container .word-counter[data-v-0f553769]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.upload-container[data-v-54c5d4d6]{width:100%;position:relative}.upload-container[data-v-54c5d4d6]:after{content:"";display:table;clear:both}.upload-container .image-uploader[data-v-54c5d4d6]{width:35%;float:left}.upload-container .image-preview[data-v-54c5d4d6]{width:200px;height:200px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-preview .image-preview-wrapper[data-v-54c5d4d6]{position:relative;width:100%;height:100%}.upload-container .image-preview .image-preview-wrapper img[data-v-54c5d4d6]{width:100%;height:100%}.upload-container .image-preview .image-preview-action[data-v-54c5d4d6]{position:absolute;width:100%;height:100%;left:0;top:0;cursor:default;color:#fff;opacity:0;font-size:20px;background-color:rgba(0,0,0,.5);-webkit-transition:opacity .3s;transition:opacity .3s;cursor:pointer;text-align:center;line-height:200px}.upload-container .image-preview .image-preview-action .el-icon-delete[data-v-54c5d4d6]{font-size:36px}.upload-container .image-preview:hover .image-preview-action[data-v-54c5d4d6]{opacity:1}.upload-container .image-app-preview[data-v-54c5d4d6]{width:320px;height:180px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-app-preview .app-fake-conver[data-v-54c5d4d6]{height:44px;position:absolute;width:100%;text-align:center;line-height:64px;color:#fff}.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-212ef548]{position:relative}.createPost-container .createPost-main-container[data-v-212ef548]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-212ef548]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-212ef548]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-212ef548]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-212ef548]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-212ef548]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-212ef548]{display:inline-block}.createPost-container .word-counter[data-v-212ef548]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
.upload-container[data-v-54c5d4d6]{width:100%;position:relative}.upload-container[data-v-54c5d4d6]:after{content:"";display:table;clear:both}.upload-container .image-uploader[data-v-54c5d4d6]{width:35%;float:left}.upload-container .image-preview[data-v-54c5d4d6]{width:200px;height:200px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-preview .image-preview-wrapper[data-v-54c5d4d6]{position:relative;width:100%;height:100%}.upload-container .image-preview .image-preview-wrapper img[data-v-54c5d4d6]{width:100%;height:100%}.upload-container .image-preview .image-preview-action[data-v-54c5d4d6]{position:absolute;width:100%;height:100%;left:0;top:0;cursor:default;color:#fff;opacity:0;font-size:20px;background-color:rgba(0,0,0,.5);-webkit-transition:opacity .3s;transition:opacity .3s;cursor:pointer;text-align:center;line-height:200px}.upload-container .image-preview .image-preview-action .el-icon-delete[data-v-54c5d4d6]{font-size:36px}.upload-container .image-preview:hover .image-preview-action[data-v-54c5d4d6]{opacity:1}.upload-container .image-app-preview[data-v-54c5d4d6]{width:320px;height:180px;position:relative;border:1px dashed #d9d9d9;float:left;margin-left:50px}.upload-container .image-app-preview .app-fake-conver[data-v-54c5d4d6]{height:44px;position:absolute;width:100%;text-align:center;line-height:64px;color:#fff}.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-0f553769]{position:relative}.createPost-container .createPost-main-container[data-v-0f553769]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f553769]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-0f553769]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-0f553769]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-0f553769]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-0f553769]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-0f553769]{display:inline-block}.createPost-container .word-counter[data-v-0f553769]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
<el-form ref="postForm" :model="postForm" :rules="rules" class="form-container">
<sticky :class-name="'sub-navbar '+postForm.status">
<el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm" :disabled="isdisabledFn">保存
<el-button v-loading="loading" :disabled="isdisabledFn" style="margin-left: 10px;" type="success" @click="submitForm">保存
</el-button>
</sticky>
......@@ -27,10 +27,16 @@
<el-col :span="12">
<el-form-item label-width="75px" label="*性别:" prop="gender">
<el-select v-model="postForm.sex" :placeholder="'性别:'" clearable
<el-select
v-model="postForm.sex"
:placeholder="'性别:'"
clearable
class="postInfo-container-item"
style="width: 230px">
<el-option v-for="item in GenderTypeOptions" :key="item.key" :label="item.display_name"
<el-option
v-for="item in GenderTypeOptions"
:key="item.key"
:label="item.display_name"
:value="item.key"/>
</el-select>
</el-form-item>
......@@ -43,15 +49,15 @@
<div>
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="*原图:" prop="avatar">
<span v-model="uploadType"></span>
<FaceUpload v-model="postForm.ordinary_image_url" :uploadType="uploadType"/>
<span v-model="uploadType"/>
<FaceUpload v-model="postForm.ordinary_image_url" :upload-type="uploadType"/>
</el-form-item>
</div>
<div>
<el-form-item style="margin-bottom: 20px;" label-width="75px" label="*模型:" prop="avatar">
<span v-model="uploadType"></span>
<FaceUpload v-model="postForm.modeling_obj_url" :uploadType="uploadType"/>
<span v-model="uploadType"/>
<FaceUpload v-model="postForm.modeling_obj_url" :upload-type="uploadType"/>
</el-form-item>
</div>
</el-card>
......@@ -63,44 +69,44 @@
</template>
<script>
import Tinymce from '@/components/Tinymce'
import FaceUpload from '@/components/Upload/faceupload'
import MDinput from '@/components/MDinput'
import Sticky from '@/components/Sticky' // 粘性header组件
import waves from '@/directive/waves'
import Pagination from '@/components/Pagination'
import {validateURL} from '@/utils/validate'
import {faceStarCreate, facestarDetail} from '@/api/face_image_upload'
import Tinymce from '@/components/Tinymce'
import FaceUpload from '@/components/Upload/faceupload'
import MDinput from '@/components/MDinput'
import Sticky from '@/components/Sticky' // 粘性header组件
import waves from '@/directive/waves'
import Pagination from '@/components/Pagination'
import { validateURL } from '@/utils/validate'
import { faceStarCreate, facestarDetail } from '@/api/face_image_upload'
const SexOptions = [
{'key': 1, 'display_name': '男'},
{'key': 2, 'display_name': '女'},
]
const SexOptions = [
{ 'key': 1, 'display_name': '男' },
{ 'key': 2, 'display_name': '女' }
]
const sexTypeKeyValue = SexOptions.reduce((acc, cur) => {
const sexTypeKeyValue = SexOptions.reduce((acc, cur) => {
acc[cur.key] = cur.display_name
return acc
}, {})
}, {})
const ValueToSexTypeKeyValue = SexOptions.reduce((acc, cur) => {
const ValueToSexTypeKeyValue = SexOptions.reduce((acc, cur) => {
acc[cur.key] = cur.display_name
return acc
}, {})
}, {})
const defaultForm = {
const defaultForm = {
status: 'draft',
uploadType: '',
name: '',
sex: '',
ordinary_image_url: '',
modeling_obj_url: '',
}
modeling_obj_url: ''
}
export default {
export default {
name: 'FaceStarDetail',
components: {Tinymce, MDinput, FaceUpload, Sticky, Pagination},
directives: {waves},
components: { Tinymce, MDinput, FaceUpload, Sticky, Pagination },
directives: { waves },
props: {
isEdit: {
type: Boolean,
......@@ -127,13 +133,13 @@
tags: [],
rules: {
name: [{validator: validateRequire, trigger: 'blur'}],
sex: [{validator: validateRequire, trigger: 'blur'}],
name: [{ validator: validateRequire, trigger: 'blur' }],
sex: [{ validator: validateRequire, trigger: 'blur' }]
},
tempRoute: {},
GenderTypeOptions: [
{'key': 1, 'display_name': '男'},
{'key': 2, 'display_name': '女'},
{ 'key': 1, 'display_name': '男' },
{ 'key': 2, 'display_name': '女' }
],
uploadType: -99,
isdisabledFn: false
......@@ -164,26 +170,20 @@
})
},
submitForm() {
this.$refs.postForm.validate(valid => {
if (valid) {
this.loading = true
if (this.postForm.ordinary_image_url === ''){
if (this.postForm.ordinary_image_url === '') {
this.$message.error('头像一不能为空~')
this.loading = false
return false
}
if (this.postForm.modeling_obj_url === ''){
this.$message.error('头像二不能为空~')
this.loading = false
return false
}
const gender = {
'男': 1,
'女': 2
}
this.isdisabledFn = true
if (gender.hasOwnProperty(this.postForm.sex)){
if (gender.hasOwnProperty(this.postForm.sex)) {
this.postForm.sex = gender[this.postForm.sex]
}
this.isdisabledFn = true
......@@ -202,8 +202,7 @@
type: 'danger',
duration: 2000
})
});
})
this.postForm.status = 'published'
this.loading = false
......@@ -224,9 +223,9 @@
if (!response.data.data.data) return
this.tagListOptions = response.data.data.data
})
},
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment