version:1.7
fix: update:增加抢购详情的api和bean
This commit is contained in:
@@ -136,22 +136,23 @@ dependencies {
|
|||||||
// implementation fileTree(dir: 'libs', include: ['*.jar'])
|
// implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
compileOnly files('libs/framework.jar')
|
compileOnly files('libs/framework.jar')
|
||||||
implementation files('libs/QWeather_Public_Android_V4.6.jar')
|
implementation files('libs/QWeather_Public_Android_V4.6.jar')
|
||||||
|
//保持1.3.1 更新会报错
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||||
|
//2.0.4以上无法预览
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
||||||
// For control over item selection of both touch and mouse driven selection
|
// For control over item selection of both touch and mouse driven selection
|
||||||
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
|
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
|
||||||
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
||||||
// Java language implementation
|
// Java language implementation
|
||||||
implementation "androidx.fragment:fragment:1.4.0"
|
implementation "androidx.fragment:fragment:1.4.1"
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||||
//glide
|
//glide
|
||||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
implementation 'com.github.bumptech.glide:glide:4.13.1'
|
||||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.1'
|
||||||
//RxJava
|
//RxJava
|
||||||
// implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
|
// implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
|
||||||
// implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
// implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||||
@@ -162,7 +163,7 @@ dependencies {
|
|||||||
// implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
|
// implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
|
||||||
implementation "com.squareup.retrofit2:adapter-rxjava3:2.9.0"
|
implementation "com.squareup.retrofit2:adapter-rxjava3:2.9.0"
|
||||||
//Gson
|
//Gson
|
||||||
implementation 'com.google.code.gson:gson:2.8.9'
|
implementation 'com.google.code.gson:gson:2.9.0'
|
||||||
implementation 'com.google.zxing:core:3.4.1'
|
implementation 'com.google.zxing:core:3.4.1'
|
||||||
//生命周期管理
|
//生命周期管理
|
||||||
implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
|
implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
|
||||||
@@ -176,7 +177,7 @@ dependencies {
|
|||||||
//高德地图定位
|
//高德地图定位
|
||||||
implementation 'com.amap.api:location:5.1.0'
|
implementation 'com.amap.api:location:5.1.0'
|
||||||
//MMKV
|
//MMKV
|
||||||
implementation 'com.tencent:mmkv-static:1.2.11'
|
implementation 'com.tencent:mmkv-static:1.2.12'
|
||||||
//状态栏透明
|
//状态栏透明
|
||||||
implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
|
implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
|
||||||
//指示器
|
//指示器
|
||||||
|
|||||||
44
app/src/main/java/com/uiui/os/bean/ArticleDetails.java
Normal file
44
app/src/main/java/com/uiui/os/bean/ArticleDetails.java
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
package com.uiui.os.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class ArticleDetails implements Serializable {
|
||||||
|
private static final long serialVersionUID = -1838902080467423485L;
|
||||||
|
|
||||||
|
int id;
|
||||||
|
String title;
|
||||||
|
String content;
|
||||||
|
String img;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
}
|
||||||
57
app/src/main/java/com/uiui/os/bean/ArticleInfo.java
Normal file
57
app/src/main/java/com/uiui/os/bean/ArticleInfo.java
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
package com.uiui.os.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class ArticleInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 5156317868469352633L;
|
||||||
|
|
||||||
|
int id;
|
||||||
|
/*标题*/
|
||||||
|
String title;
|
||||||
|
/*内容*/
|
||||||
|
String content;
|
||||||
|
/*缩略图链接*/
|
||||||
|
String img;
|
||||||
|
/*跳转链接*/
|
||||||
|
String jump_url;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJump_url() {
|
||||||
|
return jump_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJump_url(String jump_url) {
|
||||||
|
this.jump_url = jump_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
88
app/src/main/java/com/uiui/os/bean/GoodsDetails.java
Normal file
88
app/src/main/java/com/uiui/os/bean/GoodsDetails.java
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
package com.uiui.os.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class GoodsDetails implements Serializable {
|
||||||
|
private static final long serialVersionUID = 8555224831444328502L;
|
||||||
|
int id;
|
||||||
|
String goods_name;
|
||||||
|
String img;
|
||||||
|
String goods_desc;
|
||||||
|
float original_price;
|
||||||
|
float buying_price;
|
||||||
|
int stock;
|
||||||
|
String details_img;
|
||||||
|
String video_url;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGoods_name() {
|
||||||
|
return goods_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoods_name(String goods_name) {
|
||||||
|
this.goods_name = goods_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGoods_desc() {
|
||||||
|
return goods_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoods_desc(String goods_desc) {
|
||||||
|
this.goods_desc = goods_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getOriginal_price() {
|
||||||
|
return original_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginal_price(float original_price) {
|
||||||
|
this.original_price = original_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getBuying_price() {
|
||||||
|
return buying_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuying_price(float buying_price) {
|
||||||
|
this.buying_price = buying_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStock() {
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStock(int stock) {
|
||||||
|
this.stock = stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetails_img() {
|
||||||
|
return details_img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetails_img(String details_img) {
|
||||||
|
this.details_img = details_img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideo_url() {
|
||||||
|
return video_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_url(String video_url) {
|
||||||
|
this.video_url = video_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
107
app/src/main/java/com/uiui/os/bean/GoodsInfo.java
Normal file
107
app/src/main/java/com/uiui/os/bean/GoodsInfo.java
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
package com.uiui.os.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class GoodsInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = -229267734972111105L;
|
||||||
|
int id;
|
||||||
|
/*商品名*/
|
||||||
|
String goods_name;
|
||||||
|
/*简介*/
|
||||||
|
String goods_desc;
|
||||||
|
/*缩略图链接*/
|
||||||
|
String img;
|
||||||
|
/*详情图链接*/
|
||||||
|
String details_img;
|
||||||
|
/*视频链接*/
|
||||||
|
String video_url;
|
||||||
|
/*原价*/
|
||||||
|
float original_price;
|
||||||
|
/*抢购价*/
|
||||||
|
float buying_price;
|
||||||
|
/*库存*/
|
||||||
|
int stock;
|
||||||
|
/*跳转链接*/
|
||||||
|
String jump_url;
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGoods_name() {
|
||||||
|
return goods_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoods_name(String goods_name) {
|
||||||
|
this.goods_name = goods_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGoods_desc() {
|
||||||
|
return goods_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGoods_desc(String goods_desc) {
|
||||||
|
this.goods_desc = goods_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetails_img() {
|
||||||
|
return details_img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetails_img(String details_img) {
|
||||||
|
this.details_img = details_img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideo_url() {
|
||||||
|
return video_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_url(String video_url) {
|
||||||
|
this.video_url = video_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getOriginal_price() {
|
||||||
|
return original_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginal_price(float original_price) {
|
||||||
|
this.original_price = original_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getBuying_price() {
|
||||||
|
return buying_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuying_price(float buying_price) {
|
||||||
|
this.buying_price = buying_price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStock() {
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStock(int stock) {
|
||||||
|
this.stock = stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJump_url() {
|
||||||
|
return jump_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJump_url(String jump_url) {
|
||||||
|
this.jump_url = jump_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,5 +18,13 @@ public class URLAddress {
|
|||||||
public static final String UPDATE_DESKTOP_LAYOUT = "updateDesktopLayout";
|
public static final String UPDATE_DESKTOP_LAYOUT = "updateDesktopLayout";
|
||||||
/*获取桌面布局*/
|
/*获取桌面布局*/
|
||||||
public static final String GET_DESKTOP_LAYOUT = "getDesktopLayout";
|
public static final String GET_DESKTOP_LAYOUT = "getDesktopLayout";
|
||||||
|
/*获取抢购列表*/
|
||||||
|
public static final String GET_GOODS_LIST = "getGoodsList";
|
||||||
|
/*获取资讯列表*/
|
||||||
|
public static final String GET_ARTICLE_LIST = "getArticleList";
|
||||||
|
/*获取抢购详情*/
|
||||||
|
public static final String GET_GOODS_DETAILS = "getGoodsDetails";
|
||||||
|
/*获取资讯详情*/
|
||||||
|
public static final String GET_ARTICLE_DETAILS = "getArticleDetails";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.uiui.os.network.api;
|
||||||
|
|
||||||
|
import com.uiui.os.bean.ArticleDetails;
|
||||||
|
import com.uiui.os.bean.BaseResponse;
|
||||||
|
import com.uiui.os.network.URLAddress;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface ArticleDetailsApi {
|
||||||
|
@GET(URLAddress.GET_ARTICLE_DETAILS)
|
||||||
|
Observable<BaseResponse<ArticleDetails>> getArticleDetails(
|
||||||
|
@Query("id") int id
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.uiui.os.network.api;
|
||||||
|
|
||||||
|
import com.uiui.os.bean.ArticleInfo;
|
||||||
|
import com.uiui.os.bean.BaseResponse;
|
||||||
|
import com.uiui.os.network.URLAddress;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface ArticleListApi {
|
||||||
|
@GET(URLAddress.GET_ARTICLE_LIST)
|
||||||
|
Observable<BaseResponse<List<ArticleInfo>>> getArticleList(
|
||||||
|
@Query("sn") String sn
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.uiui.os.network.api;
|
||||||
|
|
||||||
|
import com.uiui.os.bean.BaseResponse;
|
||||||
|
import com.uiui.os.bean.GoodsDetails;
|
||||||
|
import com.uiui.os.bean.GoodsInfo;
|
||||||
|
import com.uiui.os.network.URLAddress;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface GoodsDetailsApi {
|
||||||
|
@GET(URLAddress.GET_GOODS_DETAILS)
|
||||||
|
Observable<BaseResponse<GoodsDetails>> getGoodsDetails(
|
||||||
|
@Query("id") int id
|
||||||
|
);
|
||||||
|
}
|
||||||
18
app/src/main/java/com/uiui/os/network/api/GoodsListApi.java
Normal file
18
app/src/main/java/com/uiui/os/network/api/GoodsListApi.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package com.uiui.os.network.api;
|
||||||
|
|
||||||
|
import com.uiui.os.bean.BaseResponse;
|
||||||
|
import com.uiui.os.bean.GoodsInfo;
|
||||||
|
import com.uiui.os.network.URLAddress;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface GoodsListApi {
|
||||||
|
@GET(URLAddress.GET_GOODS_LIST)
|
||||||
|
Observable<BaseResponse<List<GoodsInfo>>> getGoodsList(
|
||||||
|
@Query("sn") String sn
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user