| | |
| | | import com.google.android.material.snackbar.Snackbar |
| | | import kotlinx.coroutines.launch |
| | | import com.bumptech.glide.Glide |
| | | import com.example.firstapp.activity.SettingActivity |
| | | import com.example.firstapp.activity.VipActivity |
| | | import com.example.firstapp.database.response.UserInfo |
| | | import com.example.firstapp.ui.invitation.InvitationActivity |
| | |
| | | return binding.root |
| | | } |
| | | |
| | | override fun onResume() { |
| | | super.onResume() |
| | | // 加载用户信息 |
| | | lifecycleScope.launch { |
| | | loadUserInfo() |
| | | } |
| | | } |
| | | |
| | | private suspend fun loadConfigurations() { |
| | | try { |
| | | // 获取小红书链接 |
| | |
| | | |
| | | // 设置提醒 |
| | | binding.layoutReminder.setOnClickListener { |
| | | findNavController().navigate(R.id.action_navigation_notifications_to_reminderSettingsFragment) |
| | | Toast.makeText(context, "设置功能开发中", Toast.LENGTH_SHORT).show() |
| | | } |
| | | |
| | | // 待办 |
| | |
| | | startActivity(intent) |
| | | } |
| | | |
| | | // 设置按钮点击 |
| | | binding.ivSetting.setOnClickListener { |
| | | // 跳转到 |
| | | val intent = Intent(requireContext(), SettingActivity::class.java) |
| | | startActivity(intent) |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | currentUserInfo = response.data |
| | | val userInfo = response.data |
| | | |
| | | // 本地保存我的邀请码 |
| | | //PreferencesManager.setInviteCode(userInfo.intervialcode); |
| | | // 设置头像 |
| | | Glide.with(this) |
| | | .load(userInfo.cover) |