发票
This commit is contained in:
@@ -21,6 +21,10 @@ const store = new Vuex.Store({
|
||||
showLoginModel: false, // 登录框
|
||||
question: {}, // 帮助与反馈
|
||||
showCoupons: true, // 是否显示新人领取优惠券
|
||||
invoiceInfo: { // 是否选择发票
|
||||
invoice_type: '',
|
||||
invoice_id: 0,
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
getOrderAddress(state) {
|
||||
@@ -31,8 +35,15 @@ const store = new Vuex.Store({
|
||||
},
|
||||
getGoodsInfo(state) {
|
||||
return state.goodsDetails.goods;
|
||||
},
|
||||
hasInvoice(state) {
|
||||
const type = state.invoiceInfo.invoice_type;
|
||||
return type ? type : 0;
|
||||
},
|
||||
getInvoiceId(state) {
|
||||
return state.invoiceInfo.invoice_id || 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
// 登录
|
||||
loginIn(state, token) {
|
||||
@@ -83,6 +94,9 @@ const store = new Vuex.Store({
|
||||
},
|
||||
updateShowCoupons(state, status) {
|
||||
state.showCoupons = status;
|
||||
},
|
||||
setInvoiceInfo(state, invoice = {}) {
|
||||
state.invoiceInfo = invoice;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user