Просмотр исходного кода

Merge branch 'jyb_20250506_dev' into dev-1.2.0

jiayubo месяцев назад: 3
Родитель
Сommit
8dcdcde06d
3 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      api/qrcode.js
  2. 1 1
      components/QRCode/index.vue
  3. 1 1
      pages/login.vue

+ 1 - 1
api/qrcode.js

@@ -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') || '';
   
   // 打印日志,便于调试

+ 1 - 1
components/QRCode/index.vue

@@ -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')// 读取本地存储
 
 // 打印用户信息,方便查看

+ 1 - 1
pages/login.vue

@@ -261,7 +261,7 @@ onShow(() => {
 
 // 页面加载时
 onMounted(() => {
-  uni.setStorageSync('userType', 0)
+  uni.setStorageSync('userType', 1)
   // 设置状态栏为透明
   uni.setNavigationBarColor({
     frontColor: '#ffffff',