|
@@ -1,8 +1,6 @@
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
import Vuex from 'vuex'
|
|
Vue.use(Vuex)
|
|
Vue.use(Vuex)
|
|
-//蓝牙设置
|
|
|
|
-import Bluetooth from '@/store/bluetooth/index.js'
|
|
|
|
let lifeData = {};
|
|
let lifeData = {};
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -41,12 +39,10 @@ const saveLifeData = function(key, value) {
|
|
uni.setStorageSync('lifeData', tmp);
|
|
uni.setStorageSync('lifeData', tmp);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+let sysinfo = uni.getSystemInfoSync();
|
|
|
|
|
|
|
|
|
|
const store = new Vuex.Store({
|
|
const store = new Vuex.Store({
|
|
- modules: {
|
|
|
|
- Bluetooth
|
|
|
|
- },
|
|
|
|
state: {
|
|
state: {
|
|
sysinfo: uni.getSystemInfoSync(),//系统信息
|
|
sysinfo: uni.getSystemInfoSync(),//系统信息
|
|
enter:{},
|
|
enter:{},
|
|
@@ -93,7 +89,18 @@ const store = new Vuex.Store({
|
|
clientId: lifeData.clientId?lifeData.clientId: "",
|
|
clientId: lifeData.clientId?lifeData.clientId: "",
|
|
// 确定收货
|
|
// 确定收货
|
|
isConfigfreightTransport:true,
|
|
isConfigfreightTransport:true,
|
|
- choice:""
|
|
|
|
|
|
+ choice:"",
|
|
|
|
+ //蓝牙信息
|
|
|
|
+ BLEInformation: {
|
|
|
|
+ platform: sysinfo.platform || "",
|
|
|
|
+ deviceId: "",
|
|
|
|
+ writeCharaterId: "",
|
|
|
|
+ writeServiceId: "",
|
|
|
|
+ notifyCharaterId: "",
|
|
|
|
+ notifyServiceId: "",
|
|
|
|
+ readCharaterId: "",
|
|
|
|
+ readServiceId: "",
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mutations: {
|
|
mutations: {
|
|
$uStore(state, payload) {
|
|
$uStore(state, payload) {
|
|
@@ -140,8 +147,9 @@ const store = new Vuex.Store({
|
|
state.enter = provider
|
|
state.enter = provider
|
|
console.log(state)
|
|
console.log(state)
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ BLEInformationSet(state, info){
|
|
|
|
+ state.BLEInformation = info;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
actions: {
|
|
actions: {
|
|
|
|
|