Vue + vuex+ajax, the data is not saved in state

the data sent by vue to the ajax request is not saved in vuex"s state
seems to be. In the course of the request, the data is saved, the request ends, and the data is missing again
the code is as follows

  data() {
    return {

    }
  },
  created(){
    console.log(this.$store.state.list)   //84
    this.getNews()
    console.log(this.$store.state.list)  //86
  },
  computed:{
    ...mapState(["list", "cont", "loading"]),
    ...mapGetters(["addNews"])
  },
  methods: {
    getNews(){
      var url = "http://www.toutiao.com/api/comment/list/?group_id=6364965628189327618&item_id=6364969235889783298&offset=0&count=10"
      this.$axios.get(url).then( res=> {
        this.$store.state.list = res.data.data.comments
        console.log(this.list)  //97
      })
      console.log(this.list)  //99
    },

the vuex store.js code is as follows

import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)
// data
const state = {
    list: [],
    loading: false
}
// n
const mutations = {

}
// n
const actions = {

}
// getter
const getters = {

}

export default new Vuex.Store({
    state,
    mutations,
    actions,
    getters
})
Output of

page after running::

Apr.17,2022

  

Don't directly operate state , use dispatch

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e494a0-43a59.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e494a0-43a59.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?