parent
6b178ed9b1
commit
0b84bdb904
|
|
@ -197,7 +197,7 @@ fun AccountBindScreen(navController: NavHostController, viewModel: AccountBindVi
|
||||||
indication = null,
|
indication = null,
|
||||||
interactionSource = remember { MutableInteractionSource() }
|
interactionSource = remember { MutableInteractionSource() }
|
||||||
) {
|
) {
|
||||||
//TODO 跳转绑定或解绑微信
|
// 跳转绑定或解绑微信
|
||||||
if (userInfo?.weixinAppId.isNullOrEmpty()) {
|
if (userInfo?.weixinAppId.isNullOrEmpty()) {
|
||||||
navController.navigate("bind?type=${BindViewModel.BindType.FROM_WX.type}")
|
navController.navigate("bind?type=${BindViewModel.BindType.FROM_WX.type}")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,13 @@
|
||||||
package com.img.rabbit.provider.storage
|
package com.img.rabbit.provider.storage
|
||||||
|
|
||||||
import android.text.TextUtils
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import com.img.rabbit.bean.local.UniMpVersionBean
|
import com.img.rabbit.bean.local.UniMpVersionBean
|
||||||
import com.img.rabbit.bean.response.UserConfigEntity
|
import com.img.rabbit.bean.response.UserConfigEntity
|
||||||
import com.img.rabbit.bean.response.LoginInfoEntity
|
import com.img.rabbit.bean.response.LoginInfoEntity
|
||||||
import com.img.rabbit.bean.response.UserInfoEntity
|
import com.img.rabbit.bean.response.UserInfoEntity
|
||||||
import com.img.rabbit.provider.utils.HeadParamUtils.applicationContext
|
|
||||||
import com.img.rabbit.utils.MMKVUtils
|
|
||||||
import com.img.rabbit.utils.MMKVUtils.mmkv
|
import com.img.rabbit.utils.MMKVUtils.mmkv
|
||||||
import com.img.rabbit.utils.appwalle.ChannelReader
|
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import org.json.JSONObject
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SharedPreferences工具类,用于简化数据持久化操作
|
* SharedPreferences工具类,用于简化数据持久化操作
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,8 @@ object UniAppUtils {
|
||||||
|
|
||||||
// 下载文件小于1KB,需要判断Url是否可靠
|
// 下载文件小于1KB,需要判断Url是否可靠
|
||||||
if (fileSize < 1024) {
|
if (fileSize < 1024) {
|
||||||
return@withContext response.isSuccessful
|
val result = response.isSuccessful
|
||||||
|
return@withContext result
|
||||||
} else {
|
} else {
|
||||||
return@withContext true
|
return@withContext true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ class AccountBindViewModel : BaseViewModel() {
|
||||||
if(wechatCode.isEmpty()){
|
if(wechatCode.isEmpty()){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
PreferenceUtil.saveWxCode(wechatCode)
|
|
||||||
|
|
||||||
// 调用 API 获取数据
|
// 调用 API 获取数据
|
||||||
val jsonWx = JsonObject()
|
val jsonWx = JsonObject()
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,9 @@ class FeedbackViewModel : BaseViewModel() {
|
||||||
fun uploadImage(context: Context, uri: Uri) {
|
fun uploadImage(context: Context, uri: Uri) {
|
||||||
mLaunch {
|
mLaunch {
|
||||||
try {
|
try {
|
||||||
val compressedUri = ImageUtils.imageCompressToUri(context, uri) ?: throw IOException("无法压缩图片")
|
val compressedUri:ByteArray = ImageUtils.imageCompressToUri(context, uri) ?: throw IOException("无法压缩图片")
|
||||||
val requestFile = RequestBody.create("multipart/form-data".toMediaTypeOrNull(), compressedUri)
|
val requestFile:RequestBody = RequestBody.create("multipart/form-data".toMediaTypeOrNull(), compressedUri)
|
||||||
val filePart = MultipartBody.Part.createFormData("file", uri.lastPathSegment, requestFile)
|
val filePart:MultipartBody.Part = MultipartBody.Part.createFormData("file", uri.lastPathSegment, requestFile)
|
||||||
val response = ApiManager.serviceVo.upload(filePart, "feedback")
|
val response = ApiManager.serviceVo.upload(filePart, "feedback")
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
val updateFile = FileManagerBean(response.data, uri)
|
val updateFile = FileManagerBean(response.data, uri)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<network-security-config>
|
<network-security-config>
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
<base-config cleartextTrafficPermitted="true" />
|
||||||
<domain includeSubdomains="true">enrichgw.10010.com</domain>
|
<!-- <domain-config cleartextTrafficPermitted="true">-->
|
||||||
<domain includeSubdomains="true">aliyuncs.com</domain>
|
<!-- <domain includeSubdomains="true">enrichgw.10010.com</domain>-->
|
||||||
</domain-config>
|
<!-- <domain includeSubdomains="true">aliyuncs.com</domain>-->
|
||||||
|
<!-- <domain includeSubdomains="true">home.batiao8.com</domain>-->
|
||||||
|
<!-- </domain-config>-->
|
||||||
</network-security-config>
|
</network-security-config>
|
||||||
Loading…
Reference in New Issue