Browse Source

开关状态显示、首页跳转

pull/139/head
zq 4 days ago
parent
commit
2e57cf7b5b
  1. 7
      src/components/HeaderClientSet.vue
  2. 4
      src/components/SetLeftMenu.vue
  3. 2
      src/components/clientSet/reviewBtn.vue
  4. 16
      src/views/super/clientSet/switchPage.vue

7
src/components/HeaderClientSet.vue

@ -121,9 +121,10 @@ export default {
}
},
toHome() {
this.$router.push({
path: '/'
})
// this.$router.push({
// path: '/'
// })
location.href = 'http://www.kuailelunwen.com/?adm=1'
},
goToPage(path) {
console.log(this.currentPath ,path,'===0000');

4
src/components/SetLeftMenu.vue

@ -54,6 +54,10 @@ export default {
store.dispatch('fetchPaibanTemplateOption');
}
if(newPath.includes('/super/clientSet')){
const id = localStorage.getItem('template_id');
if(id){
store.commit('SET_CLIENTTEMID', id);
}
store.dispatch('fetchClientConfig',{id:this.$route.query.id || localStorage.getItem('template_id')});
store.commit('SET_CLIENTTEMTYPE', this.$route.query.type);
}

2
src/components/clientSet/reviewBtn.vue

@ -26,7 +26,7 @@ export default {
},
props:['type','status'],
mounted() {
console.log(this.client_tpl_id,'client_tpl_id====');
// console.log(this.client_tpl_id,'client_tpl_id====');
},
methods:{
submitFun(){

16
src/views/super/clientSet/switchPage.vue

@ -39,7 +39,15 @@ export default {
this.editInfo = editInfo;
},
computed: {
...mapState(['client_tpl_config']),
...mapState(['client_tpl_config','client_tpl_id']),
},
watch: {
'client_tpl_config.status':{
handler(newVal){
this.is_use_templete = newVal;
},
immediate:true
}
},
methods: {
updatePayAutoRefund() {
@ -49,14 +57,14 @@ export default {
this.time = Date.now();
return
}
console.log(this.is_use_templete,'this.is_use_templete==');
console.log(this.client_tpl_id,'client_tpl_id===');
this.$http('POST', '/supernew/ajax_update_paiban_template_status', {
status: this.is_use_templete ,
template_id:this.$route.query.id
template_id:this.$route.query.id || this.client_tpl_id
}).then(response => {
this.$nextTick(() => {
if (response.status) {
store.dispatch('fetchClientConfig',{id:this.$route.query.id || localStorage.getItem('template_id')});
store.dispatch('fetchClientConfig',{id:this.$route.query.id || this.client_tpl_id});
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);

Loading…
Cancel
Save