1. index.js 导入vuex import store from './store/index.js' // #ifndef VUE3 import Vue from 'vue' Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App, store }) app.$mount() // #endif 2. 配置 store的index.js