初始化
This commit is contained in:
40
store/index.js
Normal file
40
store/index.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import Vue from 'vue'
|
||||
export const store = Vue.observable({
|
||||
userInfo: uni.getStorageSync('userInfo'),
|
||||
letterInfo: null,
|
||||
productionType: [{
|
||||
id: 0,
|
||||
title: '普通打印',
|
||||
explain: '编辑内容普通A4纸打印 此方式免费',
|
||||
price: 0,
|
||||
key:'photo_general'
|
||||
}, {
|
||||
id: 1,
|
||||
title: '人工代写',
|
||||
explain: '人工使用中性笔手写,此方式',
|
||||
price: 2,
|
||||
key:'photo_artificial'
|
||||
}, {
|
||||
id: 2,
|
||||
title: '手写拍照',
|
||||
explain: '自己熟悉得字迹,富有温度',
|
||||
price: 2,
|
||||
key:'photo_write'
|
||||
}],
|
||||
photoPrice: null,
|
||||
letterViewInfo: {}
|
||||
|
||||
})
|
||||
export const mutations = {
|
||||
setUserInfo(data) {
|
||||
store.userInfo = data
|
||||
},
|
||||
setLetterInfo(data) {
|
||||
store.letterInfo = data
|
||||
},
|
||||
setPhotoPrice(data) {
|
||||
Vue.set(store, 'photoPrice', data)
|
||||
}
|
||||
}
|
||||
Vue.prototype.$store = store
|
||||
Vue.prototype.$mutations = mutations
|
||||
Reference in New Issue
Block a user