You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
1.8 KiB
92 lines
1.8 KiB
import Vue from 'vue';
|
|
import Vuex from 'vuex';
|
|
import add from './modules/add';
|
|
import getters from './getters';
|
|
|
|
Vue.use(Vuex);
|
|
|
|
const store = new Vuex.Store({
|
|
state: {
|
|
currentSchool: '',
|
|
latLng: {},
|
|
classChooseItem: {},
|
|
pdfUrl: '',
|
|
webViewUrl: '',
|
|
havePay: 0, //tabbar 页面是否显示报错小图标
|
|
currentMyMsg: {},
|
|
billPrice: 0, //开发票的id
|
|
TrainingOrderId: '', //退款流程里的驾校id
|
|
bankInfo: {
|
|
realName: uni.getStorageSync('userInfo').realName,
|
|
phoneCode: ''
|
|
},
|
|
chooseCoachItem: {
|
|
coachId: ''
|
|
}, //报名时选择的教练
|
|
realAuthsuccee: false,
|
|
|
|
},
|
|
getters,
|
|
mutations: {
|
|
upDateTrainingSchoolId(state, currentSchool) {
|
|
state.currentSchool = currentSchool
|
|
},
|
|
updatePdfUrl(state, url) {
|
|
state.pdfUrl = url
|
|
},
|
|
upDateRealAuthsuccee(state, flag) {
|
|
state.realAuthsuccee = flag
|
|
},
|
|
updateWebVeiwUrl(state, url) {
|
|
state.webViewUrl = url
|
|
},
|
|
|
|
updatePushMyMsg(state, item) {
|
|
state.currentMyMsg = item
|
|
},
|
|
upDateBillPrice(state, billPrice) {
|
|
state.billPrice = billPrice
|
|
},
|
|
upDateTrainingOrderId(state, trainingOrderId) {
|
|
state.trainingOrderId = trainingOrderId
|
|
},
|
|
// tabbar 页面是否显示报错小图标
|
|
updateHavePay(state, havePay) {
|
|
state.havePay = havePay
|
|
},
|
|
// 报名时选择教练
|
|
upDateCoachItem(state, item) {
|
|
state.chooseCoachItem = item
|
|
},
|
|
// 申请退款时的银行卡信息
|
|
upDateBankInfo(state, obj) {
|
|
for (let k in obj) {
|
|
if (state.bankInfo[k]) {
|
|
state.bankInfo[k] = obj[k]
|
|
} else {
|
|
uni.$set(state.bankInfo, k, obj[k])
|
|
}
|
|
}
|
|
},
|
|
// 更新经纬度
|
|
updateLatLng(state, item) {
|
|
state.latLng = item
|
|
},
|
|
// 选中班型去报名
|
|
ForecastClassType(state, item) {
|
|
state.classChooseItem = item
|
|
},
|
|
|
|
// 获取广告位
|
|
|
|
},
|
|
actions: {
|
|
|
|
|
|
},
|
|
modules: {
|
|
add,
|
|
},
|
|
});
|
|
|
|
export default store;
|