Browse Source

修复拼团页面缓存问题

master
sj 2 years ago
parent
commit
faea52e6f9
  1. 4
      .env.dev
  2. 27
      src/views/bxg/activity/bargain/form.vue
  3. 1
      src/views/bxg/activity/bargain/index.vue
  4. 24
      src/views/bxg/activity/combination/form.vue
  5. 17
      src/views/bxg/activity/seckill/form.vue

4
.env.dev

@ -5,7 +5,9 @@ ENV = 'development'
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

27
src/views/bxg/activity/bargain/form.vue

@ -207,7 +207,6 @@ export default {
'form1.good.productId': {
handler(val,oldVal){
if(val){
this.getBargainInfo()
this.getInfoChooseGood (val)
}
},
@ -218,19 +217,19 @@ export default {
// this.getBargainInfo()
// },
methods: {
//
getBargainInfo(){
let that=this
let id=this.form.id
getBargainInfo(id).then(res=>{
console.log('res',res,this.form.linkImage)
if(res.linkImage==null||res.linkImage==undefined){
that.form.linkImage=''
}else{
that.form.linkImage=res.linkImage;
}
})
},
// //
// getBargainInfo(){
// let that=this
// let id=this.form.id
// getBargainInfo(id).then(res=>{
// console.log('res',res,this.form.linkImage)
// if(res.linkImage==null||res.linkImage==undefined){
// that.form.linkImage=''
// }else{
// that.form.linkImage=res.linkImage;
// }
// })
// },
//
getInfoChooseGood (id) {

1
src/views/bxg/activity/bargain/index.vue

@ -145,6 +145,7 @@ export default {
unitName: data.unitName,
stock: data.stock,
sales: data.sales,
linkImage: data.linkImage==null?'':data.linkImage,
images: data.images,
imageArr: data.image.split(','),
sliderImageArr: data.images.split(','),

24
src/views/bxg/activity/combination/form.vue

@ -432,10 +432,14 @@ export default {
console.info("oldval:" + oldVal)
if (val) {
this.getInfoChooseGood(val)
this.getInfo()
}
},
},
},
// created() {
// this.getInfoChooseGood(this.form1.good.productId)
// },
mounted() {
this.getInfo();
},
@ -623,8 +627,11 @@ export default {
let cate_id = parseInt(data.cate_id) || 0;
this.attrs = data.items || [];
that.formValidate = data;
if(data.linkImage==null||data.linkImage){
// console.log('',data)
if(data.linkImage==null||data.linkImage==undefined){
that.formValidate.linkImage=''
}else {
that.formValidate.linkImage=data.linkImage
}
that.formValidate.cate_id = cate_id;
that.oneFormValidate = [data.attr];
@ -670,6 +677,7 @@ export default {
//
handleSubmit(name) {
console.log("!this.$route.params.id",!this.$route.params.id);
this.$refs[name].validate((valid) => {
if (valid) {
if (this.formValidate.spec_type === 0) {
@ -694,7 +702,9 @@ export default {
type: 'success'
});
setTimeout(() => {
this.resetForm()
if (!this.$route.params.id){
this.resetForm() //
}
this.$router.push({path: '/bxg/activity/combination'});
}, 500);
}).catch(res => {
@ -711,6 +721,16 @@ export default {
},
resetForm(){
this.$refs['formValidate'].resetFields()
this.form1={
good: {
productId: null,
storeName: null,
image: null,
otPrice: null,
price: null,
}
},
this.oneFormValidate=[
{
imageArr: [],

17
src/views/bxg/activity/seckill/form.vue

@ -613,9 +613,9 @@ export default {
this.attrs = data.items || [];
that.formValidate = data;
console.log('data111111111',data)
// if(data.linkImage==null){
// that.formValidate.linkImage = '';
// }
if(data.linkImage==null||data.linkImage==undefined){
that.formValidate.linkImage = '';
}
that.formValidate.cate_id = cate_id;
that.oneFormValidate = [data.attr];
that.formValidate.header = [];
@ -752,6 +752,16 @@ export default {
},
resetForm(){
this.$refs['formValidate'].resetFields()
this.form1={
good:{
productId: null,
storeName: null,
image: null,
otPrice: null,
price: null,
cform: null
}
},
this.formValidate={
slider_image: [],
otPrice: '',
@ -765,6 +775,7 @@ export default {
merId: '',
image: '',
images: '',
linkImage:'',
imageArr:[],
sliderImageArr: [],
title: '',

Loading…
Cancel
Save