master
luoJunYong.123 3 years ago
parent 4719526a71
commit 85f9c3ad36
  1. 16
      src/App.vue
  2. 0
      src/util/local.js
  3. 20
      src/utils/http.js
  4. 2
      src/views/Transaction.vue

@ -8,7 +8,21 @@
</div> </div>
</template> </template>
<style> <script>
export default {
created () {
//localStorage
localStorage.getItem("userMsg") && this.$store.replaceState(Object.assign(this.$store.state,JSON.parse(localStorage.getItem("userMsg"))));
//vuexlocalStorage
window.addEventListener("beforeunload",()=>{
localStorage.setItem("userMsg",JSON.stringify(this.$store.state))
})
}
}
</script>
<style lang='scss'>
#app { #app {
font-family: Avenir, Helvetica, Arial, sans-serif; font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;

@ -170,11 +170,11 @@ export function get(url, params){
}) })
.catch(err => { .catch(err => {
reject(err.data) reject(err.data)
// this.$message({ this.$message({
// showClose: true, showClose: true,
// message: '请求失败,请刷新页面重新进行请求', message: '请求失败,请刷新页面重新进行请求',
// type: 'error' type: 'error'
// }); });
}) })
}); });
} }
@ -229,11 +229,11 @@ export function post(url, params) {
}) })
.catch(err => { .catch(err => {
reject(err.data) reject(err.data)
// this.$message({ this.$message({
// showClose: true, showClose: true,
// message: '请求失败,请刷新页面重新进行请求', message: '请求失败,请刷新页面重新进行请求',
// type: 'error' type: 'error'
// }); });
}) })
}); });
} }

@ -395,7 +395,7 @@ export default {
token: atob(decodeURI(this.$route.query.token)) token: atob(decodeURI(this.$route.query.token))
}); });
this.checkChange.push(false) this.checkChange.push(false)
console.log('remounted')
this.getTreeData(); this.getTreeData();
console.log(this.treeData) console.log(this.treeData)
if (this.$route.query.systemId) { if (this.$route.query.systemId) {

Loading…
Cancel
Save