oss优化

This commit is contained in:
2025-02-11 16:42:19 +08:00
parent 180e5b60e1
commit 687f0c8225
5 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ android {
//暂时填写默认值即可.
JPUSH_CHANNEL: "developer-n",
]
buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:18080/\"")
buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:8082/devApi/\"")
// buildConfigField("String", "BASE_URL", "\"https://platform.test.v2.dahehuoyun.com/devApi/\"")
buildConfigField "boolean", "isTest", "true"
// //APP名称,可以在androidMainfest中引用
@@ -25,6 +25,7 @@ import com.alibaba.sdk.android.oss.model.OSSRequest;
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
import com.alibaba.sdk.android.oss.model.PutObjectResult;
import com.dahe.mylibrary.utils.LoadingUtils;
import com.dhsd.glowner.BuildConfig;
import com.dhsd.glowner.base.App;
import com.lxj.xpopup.impl.LoadingPopupView;
@@ -79,7 +80,8 @@ public class OssServiceUtil {
//初始化使用参数
public void init() {
bucket = OssConfigBean.bucket;
String stsServer = "http://platform.test.v2.dahehuoyun.com/devApi/file/aliyun/oss/getToken";
// String stsServer = "http://platform.test.v2.dahehuoyun.com/devApi/file/aliyun/oss/getToken";
String stsServer = BuildConfig.BASE_URL + "file/aliyun/oss/getToken";
credentialProvider = new OSSAuthCredentialsProvider(stsServer);
conf = new ClientConfiguration();
conf.setConnectionTimeout(15 * 1000); // 连接超时,默认15秒
@@ -34,7 +34,7 @@ class KnowCarsActivity : BaseActivity<ActivityKnowCarsBinding>() {
setTitleBar("我的熟车", true)
binding.run {
recycler.run {
adapter =recycler.run {
layoutManager = LinearLayoutManager(mContext, RecyclerView.VERTICAL, false)
addItemDecoration(
RecycleViewDivider(