parent
32a4827eb1
commit
b8365373fd
|
|
@ -4,10 +4,10 @@
|
||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2026-02-28T08:59:56.877010800Z">
|
<DropdownSelection timestamp="2026-02-28T10:08:53.722874Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=Y5DELZR46DZTCI9D" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=JRBI89BIE6AI5TG6" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,12 @@ import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
class ConfigEntity {
|
class ConfigEntity {
|
||||||
|
@SerializedName("client.version.upgrade") //版本更新
|
||||||
|
var versionEntity: VersionEntity? = null
|
||||||
|
|
||||||
|
@SerializedName("client.uni.version.upgrade") //小程序模拟器
|
||||||
|
var uniVersionEntity: List<UniVersionEntity>? = emptyList()
|
||||||
|
|
||||||
@SerializedName("client.popup.display") //显示开关控制
|
@SerializedName("client.popup.display") //显示开关控制
|
||||||
var popupConfig: PopupConfigEntity? = null
|
var popupConfig: PopupConfigEntity? = null
|
||||||
|
|
||||||
|
|
@ -14,9 +20,6 @@ class ConfigEntity {
|
||||||
@SerializedName("client.weixin.open.appid") //微信appid
|
@SerializedName("client.weixin.open.appid") //微信appid
|
||||||
var wxAppId: String = ""
|
var wxAppId: String = ""
|
||||||
|
|
||||||
@SerializedName("client.version.upgrade") //版本更新
|
|
||||||
var versionEntity: VersionEntity? = null
|
|
||||||
|
|
||||||
@SerializedName("client.weixin.share") //微信分享
|
@SerializedName("client.weixin.share") //微信分享
|
||||||
var wxShareEntity: WxShareEntity? = null
|
var wxShareEntity: WxShareEntity? = null
|
||||||
|
|
||||||
|
|
@ -29,19 +32,4 @@ class ConfigEntity {
|
||||||
@SerializedName("client.login.type") //登录方式
|
@SerializedName("client.login.type") //登录方式
|
||||||
var loginType: List<String>? = emptyList()
|
var loginType: List<String>? = emptyList()
|
||||||
|
|
||||||
@SerializedName("client.ad.switch") //广告总开关
|
|
||||||
var adSwitch: Boolean = false
|
|
||||||
|
|
||||||
@SerializedName("client.service.phone") //客服电话
|
|
||||||
var servicePhoneList: List<String> = emptyList()
|
|
||||||
|
|
||||||
@SerializedName("client.chatwarning") //聊天安全提示
|
|
||||||
var chatWarning: String? = null
|
|
||||||
|
|
||||||
@SerializedName("client.travel.ad") //聊天安全提示
|
|
||||||
val travelAd: List<String> = emptyList()
|
|
||||||
|
|
||||||
// 圈子-顶部banner占位图配置
|
|
||||||
@SerializedName("client.team.ad") //聊天安全提示
|
|
||||||
val teamAd: List<String> = emptyList()
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.img.rabbit.bean.response
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
class UniVersionEntity(
|
||||||
|
var version: String = "",
|
||||||
|
var url: String = "",
|
||||||
|
var last_version_force: String = "",
|
||||||
|
var force: Boolean = false,
|
||||||
|
var title: String = "",
|
||||||
|
var description: String = "",
|
||||||
|
var unimp_id: String = "",
|
||||||
|
var unimp_type: String = "",
|
||||||
|
var icon: String = "",
|
||||||
|
)
|
||||||
|
|
@ -10,11 +10,13 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.aspectRatio
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.offset
|
import androidx.compose.foundation.layout.offset
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.wrapContentHeight
|
import androidx.compose.foundation.layout.wrapContentHeight
|
||||||
import androidx.compose.foundation.layout.wrapContentSize
|
import androidx.compose.foundation.layout.wrapContentSize
|
||||||
|
|
@ -31,6 +33,7 @@ import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
|
@ -43,7 +46,9 @@ import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import androidx.navigation.NavHostController
|
import androidx.navigation.NavHostController
|
||||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||||
import androidx.navigation.compose.rememberNavController
|
import androidx.navigation.compose.rememberNavController
|
||||||
|
import coil3.compose.AsyncImage
|
||||||
import com.img.rabbit.R
|
import com.img.rabbit.R
|
||||||
|
import com.img.rabbit.provider.storage.PreferenceUtil
|
||||||
import com.img.rabbit.route.ScreenRoute
|
import com.img.rabbit.route.ScreenRoute
|
||||||
import com.img.rabbit.viewmodel.GeneralViewModel
|
import com.img.rabbit.viewmodel.GeneralViewModel
|
||||||
|
|
||||||
|
|
@ -78,6 +83,7 @@ fun HomeScreen(navController: NavHostController,generalViewModel: GeneralViewMod
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
.background(Color.White)
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
){
|
){
|
||||||
Image(
|
Image(
|
||||||
|
|
@ -98,6 +104,72 @@ fun HomeScreen(navController: NavHostController,generalViewModel: GeneralViewMod
|
||||||
)
|
)
|
||||||
.verticalScroll(scrollState)
|
.verticalScroll(scrollState)
|
||||||
){
|
){
|
||||||
|
val uniVersionConfig = PreferenceUtil.getUserConfig()?.config?.uniVersionEntity
|
||||||
|
if(uniVersionConfig?.isNotEmpty() == true){
|
||||||
|
val uniVersionSize = uniVersionConfig.size
|
||||||
|
//模拟器
|
||||||
|
Image(
|
||||||
|
painter = painterResource(id = R.mipmap.ic_home_title_0_mock),
|
||||||
|
contentDescription = null,
|
||||||
|
contentScale = ContentScale.Crop,
|
||||||
|
modifier = Modifier
|
||||||
|
.wrapContentWidth()
|
||||||
|
.padding(start = 16.dp, end = 16.dp, top = 12.dp)
|
||||||
|
)
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(start = 16.dp, end = 16.dp, top = 12.dp)
|
||||||
|
){
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.wrapContentWidth()
|
||||||
|
.weight(1f)
|
||||||
|
.clickable(
|
||||||
|
indication = null,
|
||||||
|
interactionSource = remember { MutableInteractionSource() }
|
||||||
|
) {
|
||||||
|
// 处理点击事件
|
||||||
|
Toast.makeText(context, "微信模拟器", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
AsyncImage(
|
||||||
|
model = uniVersionConfig[0].icon,
|
||||||
|
contentDescription = "微信模拟器图标",
|
||||||
|
contentScale = ContentScale.FillWidth,
|
||||||
|
modifier = Modifier.fillMaxWidth().aspectRatio(168/96f),
|
||||||
|
fallback = painterResource(id = R.mipmap.ic_wx_mock),
|
||||||
|
error = painterResource(id = R.mipmap.ic_wx_mock)
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
Box(modifier = Modifier.width(7.dp))
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.wrapContentWidth()
|
||||||
|
.weight(1f)
|
||||||
|
.clickable(
|
||||||
|
indication = null,
|
||||||
|
interactionSource = remember { MutableInteractionSource() }
|
||||||
|
) {
|
||||||
|
// 处理点击事件
|
||||||
|
Toast.makeText(context, "支付宝模拟器", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
if(uniVersionSize>1){
|
||||||
|
AsyncImage(
|
||||||
|
model = uniVersionConfig[1].icon,
|
||||||
|
contentDescription = "支付宝模拟器",
|
||||||
|
contentScale = ContentScale.FillWidth,
|
||||||
|
modifier = Modifier.fillMaxWidth().aspectRatio(168/96f),
|
||||||
|
fallback = painterResource(id = R.mipmap.ic_alipay_mock),
|
||||||
|
error = painterResource(id = R.mipmap.ic_alipay_mock)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//选尺寸制作
|
//选尺寸制作
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.mipmap.ic_home_title_1_size),
|
painter = painterResource(id = R.mipmap.ic_home_title_1_size),
|
||||||
|
|
@ -132,6 +204,7 @@ fun HomeScreen(navController: NavHostController,generalViewModel: GeneralViewMod
|
||||||
){
|
){
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
||||||
|
modifier = Modifier.fillMaxWidth().aspectRatio(166/68f),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -181,6 +254,7 @@ fun HomeScreen(navController: NavHostController,generalViewModel: GeneralViewMod
|
||||||
){
|
){
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
||||||
|
modifier = Modifier.fillMaxWidth().aspectRatio(166/68f),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -232,6 +306,7 @@ fun HomeScreen(navController: NavHostController,generalViewModel: GeneralViewMod
|
||||||
){
|
){
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
||||||
|
modifier = Modifier.fillMaxWidth().aspectRatio(166/68f),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -281,6 +356,7 @@ fun HomeScreen(navController: NavHostController,generalViewModel: GeneralViewMod
|
||||||
){
|
){
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
painter = painterResource(id = R.mipmap.ic_home_size_bg),
|
||||||
|
modifier = Modifier.fillMaxWidth().aspectRatio(166/68f),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Loading…
Reference in New Issue