修复拼团页面缓存问题
This commit is contained in:
@@ -5,7 +5,9 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 后台管理系统
|
VUE_APP_TITLE = 后台管理系统
|
||||||
|
|
||||||
# 后台管理系统/开发环境
|
# 后台管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.18.147:48080'
|
#VUE_APP_BASE_API = 'http://192.168.18.147:48080'
|
||||||
|
VUE_APP_BASE_API = 'http://192.168.10.113:48080'
|
||||||
|
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
@@ -207,7 +207,6 @@ export default {
|
|||||||
'form1.good.productId': {
|
'form1.good.productId': {
|
||||||
handler(val,oldVal){
|
handler(val,oldVal){
|
||||||
if(val){
|
if(val){
|
||||||
this.getBargainInfo()
|
|
||||||
this.getInfoChooseGood (val)
|
this.getInfoChooseGood (val)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -218,19 +217,19 @@ export default {
|
|||||||
// this.getBargainInfo()
|
// this.getBargainInfo()
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
//砍价独立链接图
|
// //砍价独立链接图
|
||||||
getBargainInfo(){
|
// getBargainInfo(){
|
||||||
let that=this
|
// let that=this
|
||||||
let id=this.form.id
|
// let id=this.form.id
|
||||||
getBargainInfo(id).then(res=>{
|
// getBargainInfo(id).then(res=>{
|
||||||
console.log('res',res,this.form.linkImage)
|
// console.log('res',res,this.form.linkImage)
|
||||||
if(res.linkImage==null||res.linkImage==undefined){
|
// if(res.linkImage==null||res.linkImage==undefined){
|
||||||
that.form.linkImage=''
|
// that.form.linkImage=''
|
||||||
}else{
|
// }else{
|
||||||
that.form.linkImage=res.linkImage;
|
// that.form.linkImage=res.linkImage;
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
// 详情选择商品生成规格用
|
// 详情选择商品生成规格用
|
||||||
getInfoChooseGood (id) {
|
getInfoChooseGood (id) {
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ export default {
|
|||||||
unitName: data.unitName,
|
unitName: data.unitName,
|
||||||
stock: data.stock,
|
stock: data.stock,
|
||||||
sales: data.sales,
|
sales: data.sales,
|
||||||
|
linkImage: data.linkImage==null?'':data.linkImage,
|
||||||
images: data.images,
|
images: data.images,
|
||||||
imageArr: data.image.split(','),
|
imageArr: data.image.split(','),
|
||||||
sliderImageArr: data.images.split(','),
|
sliderImageArr: data.images.split(','),
|
||||||
|
|||||||
@@ -432,10 +432,14 @@ export default {
|
|||||||
console.info("oldval:" + oldVal)
|
console.info("oldval:" + oldVal)
|
||||||
if (val) {
|
if (val) {
|
||||||
this.getInfoChooseGood(val)
|
this.getInfoChooseGood(val)
|
||||||
|
this.getInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// created() {
|
||||||
|
// this.getInfoChooseGood(this.form1.good.productId)
|
||||||
|
// },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
},
|
},
|
||||||
@@ -623,8 +627,11 @@ export default {
|
|||||||
let cate_id = parseInt(data.cate_id) || 0;
|
let cate_id = parseInt(data.cate_id) || 0;
|
||||||
this.attrs = data.items || [];
|
this.attrs = data.items || [];
|
||||||
that.formValidate = data;
|
that.formValidate = data;
|
||||||
if(data.linkImage==null||data.linkImage){
|
// console.log('调用?',data)
|
||||||
|
if(data.linkImage==null||data.linkImage==undefined){
|
||||||
that.formValidate.linkImage=''
|
that.formValidate.linkImage=''
|
||||||
|
}else {
|
||||||
|
that.formValidate.linkImage=data.linkImage
|
||||||
}
|
}
|
||||||
that.formValidate.cate_id = cate_id;
|
that.formValidate.cate_id = cate_id;
|
||||||
that.oneFormValidate = [data.attr];
|
that.oneFormValidate = [data.attr];
|
||||||
@@ -670,6 +677,7 @@ export default {
|
|||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
handleSubmit(name) {
|
handleSubmit(name) {
|
||||||
|
console.log("!this.$route.params.id",!this.$route.params.id);
|
||||||
this.$refs[name].validate((valid) => {
|
this.$refs[name].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.formValidate.spec_type === 0) {
|
if (this.formValidate.spec_type === 0) {
|
||||||
@@ -694,7 +702,9 @@ export default {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.resetForm()
|
if (!this.$route.params.id){
|
||||||
|
this.resetForm() //新增清除缓存
|
||||||
|
}
|
||||||
this.$router.push({path: '/bxg/activity/combination'});
|
this.$router.push({path: '/bxg/activity/combination'});
|
||||||
}, 500);
|
}, 500);
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
@@ -711,6 +721,16 @@ export default {
|
|||||||
},
|
},
|
||||||
resetForm(){
|
resetForm(){
|
||||||
this.$refs['formValidate'].resetFields()
|
this.$refs['formValidate'].resetFields()
|
||||||
|
this.form1={
|
||||||
|
good: {
|
||||||
|
productId: null,
|
||||||
|
storeName: null,
|
||||||
|
image: null,
|
||||||
|
otPrice: null,
|
||||||
|
price: null,
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
this.oneFormValidate=[
|
this.oneFormValidate=[
|
||||||
{
|
{
|
||||||
imageArr: [],
|
imageArr: [],
|
||||||
|
|||||||
@@ -613,9 +613,9 @@ export default {
|
|||||||
this.attrs = data.items || [];
|
this.attrs = data.items || [];
|
||||||
that.formValidate = data;
|
that.formValidate = data;
|
||||||
console.log('data111111111',data)
|
console.log('data111111111',data)
|
||||||
// if(data.linkImage==null){
|
if(data.linkImage==null||data.linkImage==undefined){
|
||||||
// that.formValidate.linkImage = '';
|
that.formValidate.linkImage = '';
|
||||||
// }
|
}
|
||||||
that.formValidate.cate_id = cate_id;
|
that.formValidate.cate_id = cate_id;
|
||||||
that.oneFormValidate = [data.attr];
|
that.oneFormValidate = [data.attr];
|
||||||
that.formValidate.header = [];
|
that.formValidate.header = [];
|
||||||
@@ -752,6 +752,16 @@ export default {
|
|||||||
},
|
},
|
||||||
resetForm(){
|
resetForm(){
|
||||||
this.$refs['formValidate'].resetFields()
|
this.$refs['formValidate'].resetFields()
|
||||||
|
this.form1={
|
||||||
|
good:{
|
||||||
|
productId: null,
|
||||||
|
storeName: null,
|
||||||
|
image: null,
|
||||||
|
otPrice: null,
|
||||||
|
price: null,
|
||||||
|
cform: null
|
||||||
|
}
|
||||||
|
},
|
||||||
this.formValidate={
|
this.formValidate={
|
||||||
slider_image: [],
|
slider_image: [],
|
||||||
otPrice: '',
|
otPrice: '',
|
||||||
@@ -765,6 +775,7 @@ export default {
|
|||||||
merId: '',
|
merId: '',
|
||||||
image: '',
|
image: '',
|
||||||
images: '',
|
images: '',
|
||||||
|
linkImage:'',
|
||||||
imageArr:[],
|
imageArr:[],
|
||||||
sliderImageArr: [],
|
sliderImageArr: [],
|
||||||
title: '',
|
title: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user