提交 dbf9dd1b authored 作者: huaxinzhu's avatar huaxinzhu

1、更换logo;2、商品图片上传优化;3、提现申请,去支付宝

上级 40739631
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
</template> </template>
<script> <script>
import logoImg from '@/assets/logo/logo.png' // import logoImg from '@/assets/logo/logo.png';
import logoImg from '@/assets/logo/logo_white.png';
export default { export default {
name: 'SidebarLogo', name: 'SidebarLogo',
...@@ -33,7 +34,7 @@ export default { ...@@ -33,7 +34,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped >
.sidebarLogoFade-enter-active { .sidebarLogoFade-enter-active {
transition: opacity 1.5s; transition: opacity 1.5s;
} }
......
...@@ -15,11 +15,11 @@ const service = axios.create({ ...@@ -15,11 +15,11 @@ const service = axios.create({
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
// 是否需要设置 token // 是否需要设置 token
const isToken = (config.headers || {}).isToken === false const isToken = (config.headers || {}).isToken === false;
if (getToken() && !isToken) { if (getToken() && !isToken) {
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
} }
//config.headers['Authorization'] = 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbk5hbWUiOiIxNTcxMTEzOTg5NSIsInVpZCI6NTI4MjgsImNoYW5uZWxJZCI6MCwiZXhwIjoxNjE5NTEyMzI0LCJpc3MiOiJnaW4tYmxvZyJ9.1I74xBUHyu_XIc7BggNMpxRUGGZnGJEEvElD85xxIPY' //config.headers['Authorization'] = 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbk5hbWUiOiIxNTcxMTEzOTg5NSIsInVpZCI6NTI4MjgsImNoYW5uZWxJZCI6MCwiZXhwIjoxNjE5Njc2MDMzLCJpc3MiOiJnaW4tYmxvZyJ9.ccnrAoIMRLQV1MAAII6J3F7ATnFDjcgUnMw6VoKuRA0'
return config return config
}, error => { }, error => {
console.log("25reject"); console.log("25reject");
...@@ -49,8 +49,7 @@ service.interceptors.response.use(res => { ...@@ -49,8 +49,7 @@ service.interceptors.response.use(res => {
}) })
} else if (code === 500) { } else if (code === 500) {
Message({ Message({
message: "状态吗500", message: message,
// message: message,
type: 'error' type: 'error'
}) })
return Promise.reject(new Error(message)) return Promise.reject(new Error(message))
...@@ -75,31 +74,31 @@ service.interceptors.response.use(res => { ...@@ -75,31 +74,31 @@ service.interceptors.response.use(res => {
} }
}, error => { }, error => {
// --- start ---- 开发时候用这段,把错误彻底抛出来 --- start --- // --- start ---- 开发时候用这段,把错误彻底抛出来 --- start ---
// let {message} = error; let {message} = error;
// if (message == 'Network Error') { if (message == 'Network Error') {
// message = "后端接口连接异常"; message = "后端接口连接异常";
// } else if (message.includes('timeout')) { } else if (message.includes('timeout')) {
// message = '系统接口请求超时'; message = '系统接口请求超时';
// } else if (message.includes("Request failed with status code")) { } else if (message.includes("Request failed with status code")) {
// message = "系统接口" + message.substr(message.length - 3) + "异常"; message = "系统接口" + message.substr(message.length - 3) + "异常";
// } }
// Message({ Message({
// message: message, message: message,
// type: "error" type: "error"
// }); });
// console.log(message); // console.log(message);
// --- end ---- 开发时候用这段,把错误彻底抛出来 --- end --- // --- end ---- 开发时候用这段,把错误彻底抛出来 --- end ---
// --- start --- 正式上线,隐藏报错信息 ----- start ---- // --- start --- 正式上线,隐藏报错信息 ----- start ----
let ssa = window.location.host; // let ssa = window.location.host;
setTimeout(function () { // setTimeout(function () {
if (ssa == 'localhost:1024') { // if (ssa == 'localhost:1024') {
window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa // window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa
} else { // } else {
window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa // window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa
} // }
}, 1000); // }, 1000);
// --- end --- 正式上线,隐藏报错信息 ----- end ---- // --- end --- 正式上线,隐藏报错信息 ----- end ----
return Promise.reject(error) return Promise.reject(error)
......
...@@ -38,7 +38,6 @@ export default { ...@@ -38,7 +38,6 @@ export default {
this.tiaozuan(); this.tiaozuan();
// this.getCookie(); // this.getCookie();
// this.getCode(); // this.getCode();
}, },
methods: { methods: {
tiaozuan(){ tiaozuan(){
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>绑定银行卡</span> <span>账户管理</span>
<el-button <el-button
style='float:right' style='float:right'
:disabled="!addbank" :disabled="!addbank"
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
@click="handleAdd" @click="handleAdd"
>新增 >新增
</el-button> </el-button>
</div> </div>
<el-table v-loading="loading" :height="tableHeight" :data="bankcardList" <el-table v-loading="loading" :height="tableHeight" :data="bankcardList"
...@@ -47,56 +46,66 @@ ...@@ -47,56 +46,66 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改商户银行卡对话框 --> <!-- 添加或修改商户银行卡对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
<el-form-item label="类型"> <!-- <el-form-item label="类型">-->
<el-select @change="selectChanged" v-model="form.txType" placeholder="类型"> <!-- <el-select @change="selectChanged" v-model="form.txType" placeholder="类型">-->
<el-option v-for="item in state" :key="item.value" :label="item.label" <!-- <el-option v-for="item in state" :key="item.value" :label="item.label"-->
:value="item.value"></el-option> <!-- :value="item.value"></el-option>-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
</el-form> <!-- </el-form>-->
<div slot="footer" class="dialog-footer"> <!-- <div slot="footer" class="dialog-footer">-->
<el-button type="primary" @click="submitForm">确 定</el-button> <!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
<el-button @click="cancel">取 消</el-button> <!-- <el-button @click="cancel">取 消</el-button>-->
</div> <!-- </div>-->
</el-dialog> <!-- </el-dialog>-->
<el-dialog :visible.sync="bank" :title="banktitle"> <el-dialog :visible.sync="bank" :title="banktitle">
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="开户城市" prop="ProvinceCity"> <el-row>
<el-input v-model="form.ProvinceCity" placeholder="请输入城市名和商户提交时一致"/> <el-col :span="16" :offset="3">
</el-form-item> <el-form-item label="开户城市" prop="ProvinceCity">
<el-form-item label="银行名称"> <el-input v-model="form.ProvinceCity" placeholder="请输入城市名和商户提交时一致"/>
<el-select v-model="form.BankName" placeholder="状态"> </el-form-item>
<el-option v-for="item in bankList" :key="item.value" :label="item.value" </el-col>
:value="item.value"></el-option> </el-row>
</el-select>
</el-form-item> <el-row>
<el-form-item label="开户行" prop="kaihuhang"> <el-col :span="16" :offset="3">
<el-input v-model="form.kaihuhang" placeholder="请输入开户行"/> <el-form-item label="银行名称">
</el-form-item> <el-select v-model="form.BankName" placeholder="状态" style="width: 100%">
<el-form-item label="持卡人姓名" prop="BankAccountName"> <el-option v-for="item in bankList" :key="item.value" :label="item.value"
<el-input v-model="form.BankAccountName" placeholder="请输入持卡人姓名"/> :value="item.value"></el-option>
</el-form-item> </el-select>
<el-form-item label="卡号" prop="BankAccountNo"> </el-form-item>
<el-input v-model="form.BankAccountNo" placeholder="请输入卡号"/> </el-col>
</el-form-item> </el-row>
</el-form>
<div slot="footer" class="dialog-footer"> <el-row>
<el-button type="primary" @click="submitForm">确 定</el-button> <el-col :span="16" :offset="3">
<el-button @click="cancel">取 消</el-button> <el-form-item label="开户行" prop="kaihuhang">
</div> <el-input v-model="form.kaihuhang" placeholder="请输入开户行"/>
</el-dialog> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16" :offset="3">
<el-form-item label="持卡人姓名" prop="BankAccountName">
<el-input v-model="form.BankAccountName" placeholder="请输入持卡人姓名"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16" :offset="3">
<el-form-item label="卡号" prop="BankAccountNo">
<el-input v-model="form.BankAccountNo" placeholder="请输入卡号"/>
</el-form-item>
</el-col>
</el-row>
<el-dialog :visible.sync="zfb" :title="banktitle">
<el-form ref="form" :model="form" :rules="rules2" label-width="80px">
<el-form-item label="支付宝账户名称" prop="ZfbAccountName">
<el-input v-model="form.ZfbAccountName" placeholder="请输入支付宝账户名称"/>
</el-form-item>
<el-form-item label="支付宝账户" prop="ZfbAccount">
<el-input v-model="form.ZfbAccount" placeholder="请输入支付宝账户"/>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
...@@ -104,6 +113,21 @@ ...@@ -104,6 +113,21 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- <el-dialog :visible.sync="zfb" :title="banktitle">-->
<!-- <el-form ref="form" :model="form" :rules="rules2" label-width="80px">-->
<!-- <el-form-item label="支付宝账户名称" prop="ZfbAccountName">-->
<!-- <el-input v-model="form.ZfbAccountName" placeholder="请输入支付宝账户名称"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="支付宝账户" prop="ZfbAccount">-->
<!-- <el-input v-model="form.ZfbAccount" placeholder="请输入支付宝账户"/>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
<!-- <el-button @click="cancel">取 消</el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
</el-card> </el-card>
</div> </div>
</template> </template>
...@@ -119,7 +143,6 @@ ...@@ -119,7 +143,6 @@
state: [ state: [
// {label: "支付宝", value: 2}, // {label: "支付宝", value: 2},
{label: "银行卡", value: 1}, {label: "银行卡", value: 1},
], ],
//银行 //银行
bankList: [], bankList: [],
...@@ -139,7 +162,7 @@ ...@@ -139,7 +162,7 @@
bankcardList: [], bankcardList: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
banktitle: "银行卡/支付宝数量最大为3个", banktitle: "对公账户(数量最多为3个)",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
addbank: false, addbank: false,
...@@ -152,7 +175,9 @@ ...@@ -152,7 +175,9 @@
sellerId: 0, sellerId: 0,
}, },
// 表单参数 // 表单参数
form: {}, form: {
},
// 表单校验 // 表单校验
rules: {}, rules: {},
rules2: { rules2: {
...@@ -191,19 +216,18 @@ ...@@ -191,19 +216,18 @@
}); });
}, },
//类型改变 //类型改变
selectChanged(v) { // selectChanged(v) {
if (v == 1) { // if (v == 1) {
this.bank = true // this.bank = true
this.zfb = false // this.zfb = false
} else if (v == 2) { // } else if (v == 2) {
this.bank = false // this.bank = false
this.zfb = true // this.zfb = true
} else { // } else {
this.bank = false // this.bank = false
this.zfb = true // this.zfb = true
} // }
// },
},
//根据银行类别判断 //根据银行类别判断
btypa(row) { btypa(row) {
var lx = "" var lx = ""
...@@ -258,7 +282,7 @@ ...@@ -258,7 +282,7 @@
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.bank = true;
this.title = "添加商户银行卡"; this.title = "添加商户银行卡";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
...@@ -275,7 +299,8 @@ ...@@ -275,7 +299,8 @@
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.form.sellerId = this.queryParams.sellerId this.form.sellerId = this.queryParams.sellerId;
this.form.TxType = 1;
addBankcard(this.form).then(response => { addBankcard(this.form).then(response => {
if (response.code === 0) { if (response.code === 0) {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
:before-upload = "beforeUpGoodsMainImg" :before-upload = "beforeUpGoodsMainImg"
:before-remove = "beforeRemoveMainImg" :before-remove = "beforeRemoveMainImg"
:on-preview="handleMainImgPreview" :on-preview="handleMainImgPreview"
:on-remove="handleRemoveMainImg"
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
...@@ -35,9 +34,7 @@ ...@@ -35,9 +34,7 @@
:on-exceed="limitCount5" :on-exceed="limitCount5"
:before-upload = "beforeUpCarouselImg" :before-upload = "beforeUpCarouselImg"
:before-remove="beforeRemoveCarouselImg" :before-remove="beforeRemoveCarouselImg"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
...@@ -97,23 +94,22 @@ ...@@ -97,23 +94,22 @@
ruleFormdialogImageUrl: { ruleFormdialogImageUrl: {
handler(val, oldVal) { handler(val, oldVal) {
this.$set(this.picall, 'ruleFormdialogImageUrl', val) this.$set(this.picall, 'ruleFormdialogImageUrl', val)
}, },
deep: true deep: true
}, },
// ruleFormdialogImageUrlplus: { ruleFormdialogImageUrlplus: {
// handler(val, oldVal) { handler(val, oldVal) {
// this.$set(this.picall, 'ruleFormdialogImageUrlplus', val) this.$set(this.picall, 'ruleFormdialogImageUrlplus', val)
// }, },
// deep: true deep: true
// }, },
}, },
methods: { methods: {
// 商品主图 数量限制 // 商品主图 数量限制
limitCount1(files,fileList){ limitCount1(files,fileList){
this.$message({message: '最多上传1张图片', type: 'warning'}); this.$message({message: '最多上传1张图片', type: 'warning'});
}, },
// 上传前 商品主图 大小格式样式校验 // 商品主图 大小格式样式校验
beforeUpGoodsMainImg(file,fileList){ beforeUpGoodsMainImg(file,fileList){
if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") { if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") {
this.$message({ this.$message({
...@@ -122,7 +118,6 @@ ...@@ -122,7 +118,6 @@
}); });
return false; return false;
} }
let isImgSize = (file.size / 1024 / 1024 ) > 2; let isImgSize = (file.size / 1024 / 1024 ) > 2;
if(isImgSize) { if(isImgSize) {
this.$message({ this.$message({
...@@ -131,7 +126,6 @@ ...@@ -131,7 +126,6 @@
}); });
return false; return false;
} }
// 图片宽高尺寸限制 // 图片宽高尺寸限制
return new Promise(function(resolve, reject){ return new Promise(function(resolve, reject){
let _URL = window.URL || window.webkitURL; let _URL = window.URL || window.webkitURL;
...@@ -153,11 +147,64 @@ ...@@ -153,11 +147,64 @@
}); });
}, },
// 商品轮播图 数量限制 // 上传商品主图
uploadGoodsMain(param) {
this.getBase64(param.file).then((res) => {
let result = res.split(",");
this.Base64img = result[1];
let data = {"image": this.Base64img}
UploadImg(data).then(res => {
if (res && res.data.code == 1) {
this.ruleFormdialogImageUrlplus.push({'url': res.data.data.imageUrl})
this.$message({ message:'上传成功',type:'success'});
}else {
this.$message({ message:'上传失败,请重新上传',type:'error'});
}
})
});
},
// 商品主图 删除移除前
beforeRemoveMainImg(file,fileList) {
if(file.status === 'success') {
return new Promise((res, rej) => {
this.$confirm(`是否删除此图片`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for(let i = 0; i < this.ruleFormdialogImageUrlplus.length; i++) {
if(file.uid === this.ruleFormdialogImageUrlplus[i].uid) {
this.ruleFormdialogImageUrlplus.splice(i,1);
}
}
this.$message({
type: 'success',
message: '删除成功!'
});
return res();
}).catch(() => {
this.$message({
type: 'success',
message: '取消删除!'
});
return rej();
});
});
}
},
// 商品主图 预览
handleMainImgPreview(file) {
this.dialogImageUrlplus = file.url;
this.dialogVisibleplus = true;
},
// 轮播图 数量限制
limitCount5(files,fileList){ limitCount5(files,fileList){
this.$message({message: '最多上传1张图片', type: 'warning'}); this.$message({message: '最多上传1张图片', type: 'warning'});
}, },
// 上传前 轮播图 大小格式样式校验 // 轮播图 大小格式样式校验
beforeUpCarouselImg(file) { beforeUpCarouselImg(file) {
if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") { if(file.type !== "image/png" && file.type !== "image/jpg" && file.type != "image/jpeg") {
this.$message({ this.$message({
...@@ -190,138 +237,94 @@ ...@@ -190,138 +237,94 @@
return file; return file;
}, ()=>{ }, ()=>{
this.$message({ this.$message({
message:'商品主图必须为正方形,请重新选择!', message:'轮播图图必须为正方形,请重新选择!',
type: 'warning' type: 'warning'
}); });
return Promise.reject(); return Promise.reject();
}); });
}, },
handleinfomationclick() { // 轮播图上传
let pic = { uploadSectionFile(param) {
ruleFormdialogImageUrlplus: this.ruleFormdialogImageUrlplus,
ruleFormdialogImageUrl: this.ruleFormdialogImageUrl
}
this.$emit('imgclicks', pic)
},
// 商品主图删除
handleRemoveMainImg(file, fileList) {
debugger
for(let i = 0; i < this.ruleFormdialogImageUrlplus.length; i++) {
if(file.uid === this.ruleFormdialogImageUrlplus[i].uid) {
this.ruleFormdialogImageUrlplus.splice(i,1);
}
}
},
handleMainImgPreview(file) {
this.dialogImageUrlplus = file.url;
this.dialogVisibleplus = true;
},
// 上传商品主图
uploadGoodsMain(param) {
this.getBase64(param.file).then((res) => { this.getBase64(param.file).then((res) => {
let result = res.split(","); let result = res.split(",");
this.Base64img = result[1]; this.Base64img = result[1];
let data = {"image": this.Base64img} let data = {"image": this.Base64img}
UploadImg(data).then(res => { UploadImg(data).then(res => {
if (res && res.data.code == 1) { if (res && res.data.code == 1) {
this.ruleFormdialogImageUrlplus.push({'url': res.data.data.imageUrl}) this.ruleFormdialogImageUrl.push({'url': res.data.data.imageUrl});
this.$message({ message:'上传成功',type:'success'});
}else {
this.$message({ message:'上传失败,请重新上传',type:'error'});
} }
this.$message({ message:'上传成功',type:'success'});
}) })
}); });
}, },
// 商品主图 删除前
beforeRemoveMainImg() {
this.$confirm('此操作将永久删除该文件,是否继续?','提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRemoveMainImg();
}).catch(() => {});
},
//多图
uploadSectionFile(param) {
// this.getBase64(param.file).then((res) => {
// let result = res.split(",");
// this.Base64img = result[1];
// let data = {"image": this.Base64img}
// UploadImg(data).then(res => {
// if (res && res.data.code == 1) {
// this.ruleFormdialogImageUrlplus.push({'url': res.data.data.imageUrl})
// }
// this.$message({ message:'上传成功',type:'success'});
// })
// });
// if (1) {
// this.getBase64(param.file).then((res) => {
// console.log(273,res)
// let result = res.split(",");
// this.Base64img = result[1];
// let data = {"image": this.Base64img}
// UploadImg(data).then(res => {
// if (res.data.code == 1) {
// this.ruleFormdialogImageUrl.push({'url': res.data.data.imageUrl})
// }
// this.$message('上传成功');
// })
//
// });
// }
},
beforeRemove(file, fileList) {
console.log(291,file);
console.log(292,fileList);
},
handleRemove(file, fileList) {
// console.log(file, fileList);
// let listImg = this.removeAaary(fileList, file);
//
// let datas = {
// id: this.skuId,
// sampleCoverUrl: this.datadialogImageUrl(listImg),
// };
// let that = this;
// changesku(datas).then((res) => {
// that.$notify.success({
// title: "成功",
// message: "删除成功",
// });
// that.ruleFormdialogImageUrl = that.removeAaary(fileList, file);
// this.info();
// });
},
// 轮播图 删除前 // 轮播图 删除前
beforeRemoveCarouselImg() { beforeRemoveCarouselImg(file) {
console.log("轮播图删除前方法", file);
}, if(file.status === 'success') {
return new Promise((res, rej) => {
removeAaary(_arr, _obj) { this.$confirm(`是否删除此图片`, '提示', {
var length = _arr.length; confirmButtonText: '确定',
for (var i = 0; i < length; i++) { cancelButtonText: '取消',
if (_arr[i] == _obj) { type: 'warning'
if (i == 0) { }).then(() => {
_arr.shift(); //删除并返回数组的第一个元素 for(let i = 0; i < this.ruleFormdialogImageUrl.length; i++) {
return _arr; if(file.uid === this.ruleFormdialogImageUrl[i].uid) {
} else if (i == length - 1) { this.ruleFormdialogImageUrl.splice(i,1);
_arr.pop(); //删除并返回数组的最后一个元素 }
return _arr; }
} else { console.log(275,this.ruleFormdialogImageUrl);
_arr.splice(i, 1); //删除下标为i的元素 this.$message({
return _arr; type: 'success',
} message: '删除成功!'
} });
return res();
}).catch(() => {
this.$message({
type: 'success',
message: '取消删除!'
});
return rej();
});
});
} }
}, },
// 轮播图预览
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url; this.dialogImageUrl = file.url;
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleinfomationclick() {
let pic = {
ruleFormdialogImageUrlplus: this.ruleFormdialogImageUrlplus,
ruleFormdialogImageUrl: this.ruleFormdialogImageUrl
}
this.$emit('imgclicks', pic)
},
// removeAaary(_arr, _obj) {
// var length = _arr.length;
// for (var i = 0; i < length; i++) {
// if (_arr[i] == _obj) {
// if (i == 0) {
// _arr.shift(); //删除并返回数组的第一个元素
// return _arr;
// } else if (i == length - 1) {
// _arr.pop(); //删除并返回数组的最后一个元素
// return _arr;
// } else {
// _arr.splice(i, 1); //删除下标为i的元素
// return _arr;
// }
// }
// }
// },
// -------------------------通用 // -------------------------通用
// 图片转换为 base64 // 图片转换为 base64
getBase64(file) { getBase64(file) {
...@@ -406,4 +409,8 @@ ...@@ -406,4 +409,8 @@
} }
} }
// 上传图片样式 重置 end // 上传图片样式 重置 end
/deep/.el-upload-list__item .el-icon-close-tip {
display :none!important;
}
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论