d
This commit is contained in:
@@ -432,6 +432,16 @@ public class HttpConstants {
|
||||
*/
|
||||
public static String URi_device_AppCustomer_fpOrderInfo = URiBase + "/device/AppCustomer/fpOrderInfo";
|
||||
|
||||
/**
|
||||
* 风格
|
||||
*/
|
||||
public static String URi_device_AppCustomer_style = URiBase + "/device/AppCustomer/style";
|
||||
|
||||
/**
|
||||
* 添加客户和完善信息
|
||||
*/
|
||||
public static String URi_device_AppCustomer_addCustomer = URiBase + "/device/AppCustomer/addCustomer";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -421,4 +421,101 @@ public class NetApi {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* style
|
||||
*/
|
||||
public Observable<Response> style() {
|
||||
|
||||
return new Observable<Response>() {
|
||||
@Override
|
||||
public void subscribe(final Observer<Response> observer) {
|
||||
|
||||
OkGo.<String>post(HttpConstants.URi_device_AppCustomer_style)
|
||||
.converter(new StringConvert())//
|
||||
.cacheMode(CacheMode.NO_CACHE) //无缓存模式 CacheMode.NO_CACHE
|
||||
.adapt(new ObservableResponse<String>())//
|
||||
.subscribeOn(Schedulers.io())//
|
||||
.observeOn(AndroidSchedulers.mainThread())//
|
||||
.subscribe(new io.reactivex.Observer<Response<String>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
// addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull Response<String> response) {
|
||||
observer.onNext(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public Observable<Response> addCustomer(final String uid, final String headimg, final String name, final String phone, final String wechat, final String address, final String decoration, final String style_id, final String budget, final String source, final String customer_id) {
|
||||
|
||||
return new Observable<Response>() {
|
||||
@Override
|
||||
public void subscribe(final Observer<Response> observer) {
|
||||
|
||||
OkGo.<String>post(HttpConstants.URi_device_AppCustomer_addCustomer)
|
||||
.params("uid", uid)
|
||||
.params("headimg", headimg)
|
||||
.params("name", name)
|
||||
.params("phone", phone)
|
||||
.params("wechat", wechat)
|
||||
.params("address", address)
|
||||
.params("decoration", decoration)
|
||||
.params("style_id", style_id)
|
||||
.params("budget", budget)
|
||||
.params("source", source)
|
||||
.params("customer_id", customer_id)
|
||||
.converter(new StringConvert())//
|
||||
.cacheMode(CacheMode.NO_CACHE) //无缓存模式 CacheMode.NO_CACHE
|
||||
.adapt(new ObservableResponse<String>())//
|
||||
.subscribeOn(Schedulers.io())//
|
||||
.observeOn(AndroidSchedulers.mainThread())//
|
||||
.subscribe(new io.reactivex.Observer<Response<String>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
// addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull Response<String> response) {
|
||||
observer.onNext(response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user