Commit c976fc7a by 罗承锋

修改后台图片访问错误问题

parent 62ff1131
...@@ -8,7 +8,7 @@ let findByList = (params) => postAction(prefix + "/packageManagement/package/lis ...@@ -8,7 +8,7 @@ let findByList = (params) => postAction(prefix + "/packageManagement/package/lis
let choosepages = (params) => postAction(prefix + "/packageManagement/package/choosepages" , params); let choosepages = (params) => postAction(prefix + "/packageManagement/package/choosepages" , params);
// 编辑 // 编辑
let modify = (params) => postAction(prefix + "/productManagement/package/update" , params); let modify = (params) => postAction(prefix + "/packageManagement/package/update" , params);
// 批量下架 // 批量下架
let batchUpdate = (params) => postAction(prefix + "/packageManagement/package/batchUpdate", params); let batchUpdate = (params) => postAction(prefix + "/packageManagement/package/batchUpdate", params);
......
...@@ -170,8 +170,8 @@ ...@@ -170,8 +170,8 @@
fileListxiaotu:[], fileListxiaotu:[],
fileid:{}, fileid:{},
brackgroundurl:"manager/ciop/productManagement/package/backgroundUpload", brackgroundurl:"manager/ciop/packageManagement/package/backgroundUpload",
xiaotuurl:"manager/ciop/productManagement/package/xiaotuUpload", xiaotuurl:"manager/ciop/packageManagement/package/xiaotuUpload",
Formtable: this.$form.createForm(this, {name: 'Formtable'}), Formtable: this.$form.createForm(this, {name: 'Formtable'}),
//输入框列表 //输入框列表
autoCompleteResult:[], autoCompleteResult:[],
...@@ -186,6 +186,8 @@ ...@@ -186,6 +186,8 @@
xbId:"", xbId:"",
warmTip:"", warmTip:"",
explains:"", explains:"",
smallImgBase64: "",
backgroundBase64: "",
}, },
queryParam: { queryParam: {
name: '', name: '',
...@@ -297,6 +299,7 @@ ...@@ -297,6 +299,7 @@
this.previewVisiblexiaotu = true; this.previewVisiblexiaotu = true;
}, },
handleChangexiaotu(obj) { handleChangexiaotu(obj) {
console.log(obj);
if (this.fileListxiaotu.length==2){ if (this.fileListxiaotu.length==2){
this.fileListxiaotu.splice(0,1) this.fileListxiaotu.splice(0,1)
}else{ }else{
...@@ -337,11 +340,12 @@ ...@@ -337,11 +340,12 @@
},0) },0)
}, },
modifyfunction(data){ modifyfunction(data){
console.log(data);
this.modifyForm.id=data.id this.modifyForm.id=data.id
this.fileid={ this.fileid={
id:data.id id:data.id
} }
let url=this.baseuploadUrl()+"manager/"+data.advImg.replace("enclosure","ciop") let url=this.baseuploadUrl()+"manager/ciop"+data.advImg.replace("enclosure","ciop")
if (!(data.advImg == null || data.advImg=="")) { if (!(data.advImg == null || data.advImg=="")) {
//下载图片浏览 //下载图片浏览
this.fileList.push({ this.fileList.push({
...@@ -354,7 +358,7 @@ ...@@ -354,7 +358,7 @@
//下载图片浏览 //下载图片浏览
if (!(data.logo == null || data.logo == "")) { if (!(data.logo == null || data.logo == "")) {
let xiaotuurl = this.baseuploadUrl() +"manager/"+ data.logo.replace("enclosure","ciop") let xiaotuurl = this.baseuploadUrl() +"manager/ciop"+ data.logo.replace("enclosure","ciop")
this.fileListxiaotu.push({ this.fileListxiaotu.push({
uid: this.getuuid(), uid: this.getuuid(),
name: '找不到图片', name: '找不到图片',
...@@ -396,12 +400,22 @@ ...@@ -396,12 +400,22 @@
this.modifyForm.xbId=values.xbId this.modifyForm.xbId=values.xbId
this.modifyForm.warmTip=values.warmTip this.modifyForm.warmTip=values.warmTip
this.modifyForm.explains=values.explains this.modifyForm.explains=values.explains
console.log(this.fileList);
console.log(this.fileListxiaotu);
if (this.previewImage != undefined) {
this.modifyForm.backgroundBase64 = this.previewImage;
}
if (this.previewImagexiaotu != undefined) {
this.modifyForm.smallImgBase64 = this.previewImagexiaotu;
}
//插入数据 //插入数据
if (this.modifyForm.id==""){ if (this.modifyForm.id==""){
insert(this.modifyForm).then(res=>{ insert(this.modifyForm).then(res=>{
if (res.state=="success") { if (res.state=="success") {
this.$message.success(res.data ? res.data : '添加成功!', 5); this.$message.success(res.data ? res.data : '添加成功!', 5);
this.search(); this.search();
this.modifyvisible = false;
return null; return null;
} }
this.$message.error(res.data ? res.data : '添加失败!', 5); this.$message.error(res.data ? res.data : '添加失败!', 5);
...@@ -413,6 +427,7 @@ ...@@ -413,6 +427,7 @@
if (res.state=="success") { if (res.state=="success") {
this.$message.success(res.data ? res.data : '修改成功!', 5); this.$message.success(res.data ? res.data : '修改成功!', 5);
this.search(); this.search();
this.modifyvisible = false;
return null; return null;
} }
this.$message.error(res.data ? res.data : '修改失败!', 5); this.$message.error(res.data ? res.data : '修改失败!', 5);
......
...@@ -5,11 +5,6 @@ ...@@ -5,11 +5,6 @@
<!-- 搜索区域 --> <!-- 搜索区域 -->
<a-form layout="inline"> <a-form layout="inline">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="4" :sm="8">
<a-form-item label="网点名称:">
<a-input placeholder="网点名称" v-model="queryParam.networkName"></a-input>
</a-form-item>
</a-col>
<a-col :md="3" :sm="6"> <a-col :md="3" :sm="6">
<a-form-item label="县分"> <a-form-item label="县分">
<a-select v-model="queryParam.subName" @change="getSchoolNames"> <a-select v-model="queryParam.subName" @change="getSchoolNames">
...@@ -81,21 +76,7 @@ ...@@ -81,21 +76,7 @@
<!--编辑----弹框--> <!--编辑----弹框-->
<a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px"> <a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px">
<a-form :form="Formtable"> <a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="网点编码">
<a-input placeholder="网点编码" v-decorator="[ 'networkCode']"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="网点名称">
<a-input placeholder="网点名称" v-decorator="[ 'networkName']"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="开学时间">
<a-range-picker @change="changeStartDate" :value="modifyForm.datePeriod"/>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="大于50元激励">
<a-input placeholder="大于50元激励" v-decorator="[ 'greaterFifty']"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="大于100元激励">
<a-input placeholder="大于100元激励" v-decorator="[ 'greaterHundred']"></a-input>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
<a-select placeholder="请选择" v-decorator="[ 'subName', {rules: [{ required: true, message: '县分不能为空!' ,whitespace:true}]} ]"> <a-select placeholder="请选择" v-decorator="[ 'subName', {rules: [{ required: true, message: '县分不能为空!' ,whitespace:true}]} ]">
<a-select-option key="">请选择</a-select-option> <a-select-option key="">请选择</a-select-option>
...@@ -584,8 +565,9 @@ ...@@ -584,8 +565,9 @@
id:data.id id:data.id
} }
let url= ""; let url= "";
if (data.serviceQrCode != undefined) { console.log(data);
url = this.baseuploadUrl()+"manager/"+data.serviceQrcode.replace("enclosure","ciop"); if (data.serviceQrcode != undefined) {
url = this.baseuploadUrl()+"manager/ciop"+data.serviceQrcode.replace("enclosure", "");
}else{ }else{
url = this.baseuploadUrl()+"manager/"; url = this.baseuploadUrl()+"manager/";
} }
...@@ -771,7 +753,7 @@ ...@@ -771,7 +753,7 @@
if (res.state=="success") { if (res.state=="success") {
this.$message.success(res.data ? res.data : '修改成功!', 5); this.$message.success(res.data ? res.data : '修改成功!', 5);
this.search(); this.search();
this.modifyvisible=false this.modifyvisible=false;
return null; return null;
} }
this.$message.error(res.data ? res.data : '修改失败!', 5); this.$message.error(res.data ? res.data : '修改失败!', 5);
......
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