forked from bailicangdu/vue2-elm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
43 lines (40 loc) · 1.2 KB
/
index.js
File metadata and controls
43 lines (40 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './action'
import getters from './getters'
Vue.use(Vuex)
const state = {
latitude: '', // 当前位置纬度
longitude: '', // 当前位置经度
cartList: {}, // 加入购物车的商品列表
shopDetail: null, //商家详情信息
userInfo: null, //用户信息
shopid: null,//商铺id
remarkText: null,//可选备注内容
inputText: '',//输入备注内容
invoice: false,//开发票
newAddress: [], //确认订单页新的地址
searchAddress: null,//搜索并选择的地址
geohash: '31.22299,121.36025',//地址geohash值
choosedAddress: null,//选择地址
addressIndex: null,//选择地址的索引值
needValidation: null,//确认订单时是否需要验证
cartId: null, //购物车id
sig: null,//购物车sig
orderParam: null,//订单的参数
orderMessage: null, //订单返回的信息
orderDetail: null, //订单详情
login: true,//是否登录
imgPath:null,//头像地址
removeAddress:[],//移除地址
addAddress:'', //新增地址
question: null,//问题详情
cartPrice: null, //会员卡价格
}
export default new Vuex.Store({
state,
getters,
actions,
mutations,
})