Commit 632c9163 authored by 罗超's avatar 罗超

1

parent 1e384fd2
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
if(type==0){ if(type==0){
this.addatas=res.Data.PageData this.addatas=res.Data.PageData
}else{ }else{
this.addatas=this.addatas.concat(res.Ddata.PageData) this.addatas=this.addatas.concat(res.Data.PageData)
} }
this.total=res.Data.Count this.total=res.Data.Count
} }
......
...@@ -611,18 +611,6 @@ ...@@ -611,18 +611,6 @@
}, },
save(imgUrl) { save(imgUrl) {
this.isLoading = true; this.isLoading = true;
// let msg = {
// ID: this.dataId,
// BaseAdvertisingID: this.templateId,
// content: JSON.stringify(this.nodes),
// AdvertisingPicUrl: '',
// SecretKey: '',
// fileName: '',
// fileSize: '',
// TCID: 0,
// IsAssociated: 0,
// }
let msg = { let msg = {
ID: this.dataId, ID: this.dataId,
AdvertisingPicUrl: '', AdvertisingPicUrl: '',
...@@ -630,49 +618,21 @@ ...@@ -630,49 +618,21 @@
Content:JSON.stringify(this.nodes), Content:JSON.stringify(this.nodes),
SecretKey:"" SecretKey:""
} }
let that = this let that = this
let blob = that.base64ToBlob(imgUrl) let blob = that.base64ToBlob(imgUrl)
// let newArr = [];
// newArr.push(blob);
// var fileName = `${that.uuid(10,10)}.png`
// // var path = `/Adv/user/${that.user.EmployeeId}/${fileName}`;
// var path = `/Adv/user/template/${fileName}`;
UploadViittoBlobFile ("Edu",blob,(res)=>{ UploadViittoBlobFile ("Edu",blob,(res)=>{
this.isLoading = false; this.isLoading = false;
console.log(671,res); console.log(671,res);
if(res.Code===1){ if(res.Code===1){
msg.AdvertisingPicUrl = res.FileUrl msg.AdvertisingPicUrl = res.FileUrl
new browserMD5File(blob, function (err, md5) { new browserMD5File(blob, function (err, md5) {
msg.SecretKey = md5; msg.SecretKey = md5;
saveMakeAd(msg).then(res=>{ saveMakeAd(msg).then(res=>{
console.log(651,res) console.log(651,res)
}) })
// msg.fileName = fileName;
// msg.fileSize = blob.size;
// that.apipost("Advertising_post_Set", msg, x => {
// that.isLoading = false;
// that.outerVisible = false;
// if (x.data.resultCode == 1) {
// that.$message.success('保存成功!')
// if (msg.ID == 0) {
// that.dataId = x.data.data.result
// }
// } else
// that.$message.success(x.data.message)
// }, err => {})
}) })
} }
})
},'ad')
...@@ -742,7 +702,6 @@ ...@@ -742,7 +702,6 @@
} }
getAdvertisingList(this.adMsg).then(res=>{ getAdvertisingList(this.adMsg).then(res=>{
if(res.Code===1){ if(res.Code===1){
console.log(397,res)
res.Data.PageData.forEach(x=>{ res.Data.PageData.forEach(x=>{
x.src=`${x.SamplePicturesUrl}?x-oss-process=image/resize,w_200` x.src=`${x.SamplePicturesUrl}?x-oss-process=image/resize,w_200`
x.id=x.ID x.id=x.ID
...@@ -750,7 +709,7 @@ ...@@ -750,7 +709,7 @@
if(type==0){ if(type==0){
this.addatas=res.Data.PageData this.addatas=res.Data.PageData
}else{ }else{
this.addatas=this.addatas.concat(res.Ddata.PageData) this.addatas=this.addatas.concat(res.Data.PageData)
} }
this.total=res.Data.Count this.total=res.Data.Count
if (res.Data.PageData.length == 0) { if (res.Data.PageData.length == 0) {
......
...@@ -91,12 +91,10 @@ export default { ...@@ -91,12 +91,10 @@ export default {
if(type==0){ if(type==0){
this.addatas=res.Data.PageData this.addatas=res.Data.PageData
}else{ }else{
this.addatas=this.addatas.concat(res.Ddata.PageData) this.addatas=this.addatas.concat(res.Data.PageData)
} }
this.total=res.Data.pageCount this.total=res.Data.pageCount
} }
console.log(98,res)
}) })
}, },
} }
......
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