|
@@ -69,7 +69,7 @@ const list3 = ref(['']) // Initialize with at least one empty item
|
|
|
const ValueZone = ref(['']) // Initialize with at least one empty item
|
|
|
const hotList = ref([])
|
|
|
const ValueZoneSwiper = ref([''])
|
|
|
-const userType = uni.getStorageSync('userType'); //读取本地存储
|
|
|
+const userType = uni.getStorageSync('userType') || 1; //读取本地存储
|
|
|
const text1 = ref('');
|
|
|
|
|
|
|
|
@@ -258,6 +258,7 @@ const settingAddress = async () => {
|
|
|
}
|
|
|
|
|
|
onShow(() => {
|
|
|
+
|
|
|
getBanners()
|
|
|
|
|
|
// 在 App.vue 中初始化
|
|
@@ -270,6 +271,8 @@ onShow(() => {
|
|
|
globalData.value = { statusBarHeight, navBarHeight }
|
|
|
},
|
|
|
})
|
|
|
+ console.log('=========>!userType',!userType);
|
|
|
+
|
|
|
})
|
|
|
|
|
|
const addresstree = ref([])
|
|
@@ -300,10 +303,7 @@ onMounted(async () => {
|
|
|
getList()
|
|
|
})
|
|
|
} else {
|
|
|
- if(!userType){
|
|
|
- //设置默认角色
|
|
|
- uni.setStorageSync('userType', 1);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
getList();
|
|
|
}
|