diff --git a/components/tabbar/tabbar.vue b/components/tabbar/tabbar.vue
index 2cbb408..1f9f3aa 100644
--- a/components/tabbar/tabbar.vue
+++ b/components/tabbar/tabbar.vue
@@ -1,131 +1,183 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/store/index.js b/store/index.js
index 35999ac..2daceb7 100644
--- a/store/index.js
+++ b/store/index.js
@@ -6,40 +6,43 @@ Vue.use(Vuex);
const store = new Vuex.Store({
state: {
- messageNum: 0,//底部消息数量
- sjServiceList:{},//商家分配手艺人时服务数据shop/staff
- tabbarList: [], //底部设置
- reservationTime: {}, // 预约时刻信息
- reservationSyr: {}, // 预约手艺人人信息
- reservationAddress: {}, // 预约地址信息
- selectStore: {}, //选择的门店信息
- wxShareType: 0, // 正式版:0,测试版:1,体验版:2
- //公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
+ messageNum: 0, // 底部消息数量
+ // ========== 新增:全局当前选中的 tab 索引 ==========
+ currentTabIndex: 0, // 用于自定义 tabbar 高亮
+ // ============================================
+ sjServiceList: {}, // 商家分配手艺人时服务数据shop/staff
+ tabbarList: [], // 底部设置
+ reservationTime: {}, // 预约时刻信息
+ reservationSyr: {}, // 预约手艺人人信息
+ reservationAddress: {}, // 预约地址信息
+ selectStore: {}, // 选择的门店信息
+ wxShareType: 0, // 正式版:0,测试版:1,体验版:2
searchCity: {
center: "117.330043,38.372266",
name: "黄骅",
},
- systemInfo: uni.getSystemInfoSync(), //设备信息
- //是否有定位权限
+ systemInfo: uni.getSystemInfoSync(),
isLocation: false,
- //路由
baseUrl: "",
- //手机和app信息
version: {
VersionCode: "",
DeviceBrand: "",
DeviceType: "",
},
- //商家信息
sjInfo: {},
- workSpaceSJClassList: [], //商家工位分类列表
- workHourSJClassList: [], //商家工时分类列表
+ workSpaceSJClassList: [],
+ workHourSJClassList: [],
},
mutations: {
- //写入底部消息数量
+ // 写入底部消息数量
setMessageNum(state, newval) {
state.messageNum = newval;
},
+ // ========== 新增:设置全局当前选中 tab 索引 ==========
+ SET_CURRENT_TAB_INDEX(state, index) {
+ state.currentTabIndex = index;
+ },
+ // ==============================================
clearServiceState(state) {
state.reservationTime = {};
state.reservationSyr = {};