|
|
@ -109,7 +109,7 @@ |
|
|
|
<view class="v-card-item"> |
|
|
|
<view class="v-card-item"> |
|
|
|
<view class="v-card-box"> |
|
|
|
<view class="v-card-box"> |
|
|
|
<common-title :title="'宣传视频'"></common-title> |
|
|
|
<common-title :title="'宣传视频'"></common-title> |
|
|
|
<htz-image-upload v-model="ceshiData" mediaType="video" :sourceType="['album','camera']" |
|
|
|
<htz-image-upload :data-type="1" v-model="ceshiData" mediaType="video" :sourceType="['album']" |
|
|
|
:compress="false" :remove="true" :headers="{'Authorization':token}" |
|
|
|
:compress="false" :remove="true" :headers="{'Authorization':token}" |
|
|
|
@uploadSuccess="ceshiUploadSuccess1" @imgDelete="ceshiImgDelete" |
|
|
|
@uploadSuccess="ceshiUploadSuccess1" @imgDelete="ceshiImgDelete" |
|
|
|
@uploadFail="ceshiUploadFail" :action="requestUrl"></htz-image-upload> |
|
|
|
@uploadFail="ceshiUploadFail" :action="requestUrl"></htz-image-upload> |
|
|
@ -156,10 +156,12 @@ |
|
|
|
return { |
|
|
|
return { |
|
|
|
token: getToken(), |
|
|
|
token: getToken(), |
|
|
|
imgShow: true, |
|
|
|
imgShow: true, |
|
|
|
|
|
|
|
baseUr:baseUrl, |
|
|
|
requestUrl: baseUrl + '/common/upload', |
|
|
|
requestUrl: baseUrl + '/common/upload', |
|
|
|
imgType: 'jpg,png,gif', |
|
|
|
imgType: 'jpg,png,gif', |
|
|
|
imgList: [], |
|
|
|
imgList: [], |
|
|
|
ceshiData: [], |
|
|
|
ceshiData: [], |
|
|
|
|
|
|
|
ceshiData1: [], |
|
|
|
hideRequiredAsterisk: false, |
|
|
|
hideRequiredAsterisk: false, |
|
|
|
array: ['其他','A', 'AA', 'AAA', 'AAAA', 'AAAAA'], |
|
|
|
array: ['其他','A', 'AA', 'AAA', 'AAAA', 'AAAAA'], |
|
|
|
index: 0, |
|
|
|
index: 0, |
|
|
@ -245,15 +247,24 @@ |
|
|
|
this.$refs.form.setRules(this.rules); |
|
|
|
this.$refs.form.setRules(this.rules); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// ceshiUploadSuccess1(res) { //上传成功 |
|
|
|
fileSuccess(val) { |
|
|
|
// var _res = JSON.parse(res.data); |
|
|
|
let this_ = this |
|
|
|
// //console.log('_res', _res) |
|
|
|
if (val) { |
|
|
|
// let this_ = this |
|
|
|
this_.info.mp3Url = val |
|
|
|
// if (_res.code == 200) { |
|
|
|
} |
|
|
|
// this_.ceshiData.push(this_.requestUrl + _res.fileName); |
|
|
|
}, |
|
|
|
// } |
|
|
|
ceshiUploadSuccess1(res) { //上传成功 |
|
|
|
// console.log(this_.ceshiData) |
|
|
|
var _res = JSON.parse(res.data); |
|
|
|
// }, |
|
|
|
//console.log('_res', _res) |
|
|
|
|
|
|
|
let this_ = this |
|
|
|
|
|
|
|
if (_res.code == 200) { |
|
|
|
|
|
|
|
this_.ceshiData.push(this_.baseUr + _res.fileName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this_.ceshiData,'上传视频后') |
|
|
|
|
|
|
|
this_.ceshiData1.push(_res.fileName); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log(this_.ceshiData) |
|
|
|
|
|
|
|
}, |
|
|
|
bindTimeChange(e) { |
|
|
|
bindTimeChange(e) { |
|
|
|
let this_ = this |
|
|
|
let this_ = this |
|
|
|
console.log(this_.info) |
|
|
|
console.log(this_.info) |
|
|
@ -287,6 +298,9 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
ceshiImgDelete(e) { |
|
|
|
ceshiImgDelete(e) { |
|
|
|
console.log('ceshiImgDelete', e) |
|
|
|
console.log('ceshiImgDelete', e) |
|
|
|
|
|
|
|
let this_ = this |
|
|
|
|
|
|
|
this_.ceshiData1 = [] |
|
|
|
|
|
|
|
console.log(this_.ceshiData1) |
|
|
|
}, |
|
|
|
}, |
|
|
|
bindPickerChange: function(e) { |
|
|
|
bindPickerChange: function(e) { |
|
|
|
console.log('picker发送选择改变,携带值为', e.detail.value); |
|
|
|
console.log('picker发送选择改变,携带值为', e.detail.value); |
|
|
@ -313,18 +327,24 @@ |
|
|
|
console.log(e); |
|
|
|
console.log(e); |
|
|
|
}, |
|
|
|
}, |
|
|
|
scenicManageDetail(id) { |
|
|
|
scenicManageDetail(id) { |
|
|
|
|
|
|
|
let this_ = this |
|
|
|
scenicManageDetail(id).then((res) => { |
|
|
|
scenicManageDetail(id).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.code == 200) { |
|
|
|
console.log(res.data) |
|
|
|
console.log(res.data) |
|
|
|
this.info = res.data |
|
|
|
this.info = res.data |
|
|
|
|
|
|
|
if(res.data.videoUrl&&res.data.videoUrl!=null){ |
|
|
|
if(res.data.openTime!=null){ |
|
|
|
this_.ceshiData1 = res.data.videoUrl.split(",") |
|
|
|
this.startTime = res.data.openTime.split('-')[0] |
|
|
|
this_.ceshiData1.forEach(item=>{ |
|
|
|
this.endTime = res.data.openTime.split('-')[1] |
|
|
|
this.ceshiData.push(this_.baseUr+item) |
|
|
|
}else{ |
|
|
|
}) |
|
|
|
this.startTime = '' |
|
|
|
|
|
|
|
this.endTime = '' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// if(res.data.openTime!=null){ |
|
|
|
|
|
|
|
// this.startTime = res.data.openTime.split('-')[0] |
|
|
|
|
|
|
|
// this.endTime = res.data.openTime.split('-')[1] |
|
|
|
|
|
|
|
// }else{ |
|
|
|
|
|
|
|
// this.startTime = '' |
|
|
|
|
|
|
|
// this.endTime = '' |
|
|
|
|
|
|
|
// } |
|
|
|
this.selectMultiple.index = res.data.label.split(','); |
|
|
|
this.selectMultiple.index = res.data.label.split(','); |
|
|
|
this.form.selectIndex = res.data.label.split(','); |
|
|
|
this.form.selectIndex = res.data.label.split(','); |
|
|
|
this.form.selectValue = res.data.labelValue; |
|
|
|
this.form.selectValue = res.data.labelValue; |
|
|
@ -365,12 +385,23 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
save() { |
|
|
|
save() { |
|
|
|
let this_ = this; |
|
|
|
let this_ = this; |
|
|
|
this_.info.openTime = this_.startTime + "-" + this_.endTime |
|
|
|
// this_.info.openTime = this_.startTime + "-" + this_.endTime |
|
|
|
this_.info.imageUrl = this_.imgList.join(","); |
|
|
|
if(this_.imgList&&this_.imgList.length>0){ |
|
|
|
|
|
|
|
this_.info.imageUrl = this_.imgList.join(","); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$refs.form.validate((res) => { |
|
|
|
this.$refs.form.validate((res) => { |
|
|
|
if (res) { |
|
|
|
if (res) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this_.ceshiData1&&this_.ceshiData1.length>0){ |
|
|
|
|
|
|
|
this_.info.videoUrl = this.ceshiData1.join(",") |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this_.info.videoUrl = '' |
|
|
|
|
|
|
|
} |
|
|
|
this.info.label = this.form.selectIndex.join(","); |
|
|
|
this.info.label = this.form.selectIndex.join(","); |
|
|
|
this.info.grade = this.index; |
|
|
|
this.info.grade = this.index; |
|
|
|
|
|
|
|
console.log(this_.info) |
|
|
|
scenicManageUpdate(this.info).then(res => { |
|
|
|
scenicManageUpdate(this.info).then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.code == 200) { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|