@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 获取不限制的小程序码
export function getUnlimitedQRCode(data = {}) {
// 从本地存储获取用户类型和用户ID
- const userType = uni.getStorageSync('userType') || '';
+ const userType = uni.getStorageSync('userType') || 1;
const userId = uni.getStorageSync('userId') || '';
// 打印日志,便于调试
@@ -48,7 +48,7 @@ const props = defineProps({
})
const qrCodeUrl = ref('')
-const userType = uni.getStorageSync('userType') // 读取本地存储
+const userType = uni.getStorageSync('userType') || 1 // 读取本地存储,默认为1
const userId = uni.getStorageSync('userId')// 读取本地存储
// 打印用户信息,方便查看
@@ -261,7 +261,7 @@ onShow(() => {
// 页面加载时
onMounted(() => {
- uni.setStorageSync('userType', 0)
+ uni.setStorageSync('userType', 1)
// 设置状态栏为透明
uni.setNavigationBarColor({
frontColor: '#ffffff',