|
@@ -271,6 +271,7 @@
|
|
|
// 裁剪组件的基础配置option
|
|
// 裁剪组件的基础配置option
|
|
|
option: {
|
|
option: {
|
|
|
img: '', // 裁剪图片的地址
|
|
img: '', // 裁剪图片的地址
|
|
|
|
|
+ type:'',//类型
|
|
|
info: true, // 裁剪框的大小信息
|
|
info: true, // 裁剪框的大小信息
|
|
|
outputSize: 1, // 裁剪生成图片的质量
|
|
outputSize: 1, // 裁剪生成图片的质量
|
|
|
outputType: 'jpeg', // 裁剪生成图片的格式
|
|
outputType: 'jpeg', // 裁剪生成图片的格式
|
|
@@ -294,7 +295,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
|
- // this.needLogin()
|
|
|
|
|
|
|
+ this.needLogin()
|
|
|
var sale_id = this.$route.query.id ? this.$route.query.id : 0;
|
|
var sale_id = this.$route.query.id ? this.$route.query.id : 0;
|
|
|
this._getConsultCate()
|
|
this._getConsultCate()
|
|
|
if (sale_id!=0) {
|
|
if (sale_id!=0) {
|
|
@@ -326,7 +327,19 @@
|
|
|
}
|
|
}
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
|
- this.saleInfo.img_icon=res.filename;
|
|
|
|
|
|
|
+ this.type=0;
|
|
|
|
|
+ if(this.option.type==1)
|
|
|
|
|
+ {
|
|
|
|
|
+ this.saleInfo.img_icon=res.filename;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(this.option.type==2)
|
|
|
|
|
+ {
|
|
|
|
|
+ this.teacherInfo.img=res.filename;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(this.option.type==3)
|
|
|
|
|
+ {
|
|
|
|
|
+ this.saleInfo.video_img=res.filename;
|
|
|
|
|
+ }
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -418,17 +431,33 @@
|
|
|
let filename=res.filename;
|
|
let filename=res.filename;
|
|
|
// 上传成功后将图片地址赋值给裁剪框显示图片
|
|
// 上传成功后将图片地址赋值给裁剪框显示图片
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- this.option.img =filename
|
|
|
|
|
|
|
+ this.option.img =filename;
|
|
|
|
|
+ this.option.fixedNumber=[310,175]
|
|
|
|
|
+ this.option.type=type;
|
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
else if(type==2)
|
|
else if(type==2)
|
|
|
{
|
|
{
|
|
|
- this.teacherInfo.img=res.filename;
|
|
|
|
|
|
|
+ let filename=res.filename;
|
|
|
|
|
+ // 上传成功后将图片地址赋值给裁剪框显示图片
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.option.img =filename;
|
|
|
|
|
+ this.option.fixedNumber=[100,100]
|
|
|
|
|
+ this.option.type=type;
|
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
else if(type==3)
|
|
else if(type==3)
|
|
|
{
|
|
{
|
|
|
- this.saleInfo.video_img=res.filename;
|
|
|
|
|
|
|
+ let filename=res.filename;
|
|
|
|
|
+ // 上传成功后将图片地址赋值给裁剪框显示图片
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.option.img =filename;
|
|
|
|
|
+ this.option.fixedNumber=[739,416]
|
|
|
|
|
+ this.option.type=type;
|
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
else if(type==4)
|
|
else if(type==4)
|
|
|
{
|
|
{
|