Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8f83615b
authored
Jul 25, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加内容提交的字数限制
parent
9ded4d4a
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
36 additions
and
22 deletions
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
app/src/main/java/com/dayu/bigfish/ui/service/LocationService.java
app/src/main/res/layout/activity_feedback.xml
baseSDK/src/main/java/com/dayu/base/api/Api.java
baseSDK/src/main/res/values/strings.xml
orderCenter/src/main/res/layout/activity_multi_process_order.xml
orderCenter/src/main/res/layout/activity_process_order.xml
orderCenter/src/main/res/layout/activity_return_part.xml
orderCenter/src/main/res/layout/fragment_multi_detail.xml
orderCenter/src/main/res/layout/item_multi_process_foot.xml
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
8f83615b
...
...
@@ -43,7 +43,6 @@ import com.dayu.utils.UserManager;
import
com.dayu.utils.badgeNumberManger.BadgeNumberManager
;
import
com.dayu.widgets.CustomDialog
;
import
com.dayu.widgets.listener.onDownloadListener
;
import
com.megvii.idcardlib.util.Constant
;
import
com.umeng.analytics.MobclickAgent
;
import
org.greenrobot.eventbus.EventBus
;
...
...
app/src/main/java/com/dayu/bigfish/ui/service/LocationService.java
View file @
8f83615b
...
...
@@ -11,7 +11,6 @@ import android.support.annotation.Nullable;
import
com.dayu.bigfish.api.ApiFactory
;
import
com.dayu.common.Constants
;
import
com.dayu.location.base.LocationUtils
;
import
com.dayu.utils.ToastUtils
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
...
...
@@ -56,7 +55,8 @@ public class LocationService extends Service {
e
.
printStackTrace
();
}
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
jsonObject
.
toString
());
ApiFactory
.
commiteLocation
(
requestBody
).
subscribe
(
aBoolean
->
ToastUtils
.
showShortToast
(
"地址上传成功"
));
ApiFactory
.
commiteLocation
(
requestBody
).
subscribe
(
aBoolean
->
{
});
}
}));
super
.
handleMessage
(
msg
);
...
...
app/src/main/res/layout/activity_feedback.xml
View file @
8f83615b
...
...
@@ -52,6 +52,7 @@
android:hint=
"@{presenter.mHint}"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_17"
android:maxEms=
"200"
android:text=
"@={presenter.mComment}"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
...
...
baseSDK/src/main/java/com/dayu/base/api/Api.java
View file @
8f83615b
...
...
@@ -16,7 +16,6 @@ import java.io.IOException;
import
java.util.concurrent.TimeUnit
;
import
io.reactivex.Observable
;
import
io.reactivex.ObservableSource
;
import
io.reactivex.ObservableTransformer
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.schedulers.Schedulers
;
...
...
@@ -123,18 +122,20 @@ public class Api {
public
static
<
T
>
ObservableTransformer
<
BaseResponse
<
T
>,
T
>
applySchedulers
()
{
return
(
ObservableTransformer
<
BaseResponse
<
T
>,
T
>)
transformer
;
return
upstream
->
upstream
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
flatMap
(
Api:
:
flatResponse
);
}
final
static
ObservableTransformer
transformer
=
new
ObservableTransformer
()
{
@Override
public
ObservableSource
apply
(
Observable
upstream
)
{
return
upstream
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
flatMap
((
response
)
->
flatResponse
((
BaseResponse
<
Object
>)
response
));
}
};
//
final static ObservableTransformer transformer = new ObservableTransformer() {
//
@Override
//
public ObservableSource apply(Observable upstream) {
//
return upstream.subscribeOn(Schedulers.io())
//
.observeOn(AndroidSchedulers.mainThread())
//
.flatMap((response) -> flatResponse((BaseResponse<Object>) response));
//
}
//
};
/**
...
...
@@ -144,7 +145,7 @@ public class Api {
* @param <T>
* @return
*/
p
ublic
static
<
T
>
Observable
<
T
>
flatResponse
(
final
BaseResponse
<
T
>
response
)
{
p
rivate
static
<
T
>
Observable
<
T
>
flatResponse
(
final
BaseResponse
<
T
>
response
)
{
return
Observable
.
create
(
e
->
{
if
(
response
.
isSuccess
())
{
if
(!
e
.
isDisposed
())
{
...
...
baseSDK/src/main/res/values/strings.xml
View file @
8f83615b
...
...
@@ -195,7 +195,7 @@
<string
name=
"receive_time_out"
>
接单超时
</string>
<string
name=
"appointment_time_out"
>
预约超时
</string>
<string
name=
"delivery_time_out"
>
验收超时
</string>
<string
name=
"server_time_out"
>
服务
超时
</string>
<string
name=
"server_time_out"
>
上门
超时
</string>
<string
name=
"need_again_door"
>
需要再次上门
</string>
<string
name=
"waite_appointemnt"
>
待预约
</string>
<string
name=
"waite_server"
>
待服务
</string>
...
...
@@ -293,7 +293,7 @@
<string
name=
"prodcut_type"
>
类
      
型
</string>
<string
name=
"door_time"
>
上门时间
</string>
<string
name=
"order_remark"
>
工单备注
</string>
<string
name=
"order_attachment"
>
附
      
件
</string>
<string
name=
"order_attachment"
>
附
      
   
件:
</string>
<string
name=
"customer_info"
>
客户信息
</string>
<string
name=
"customer_type"
>
客户类型
</string>
<string
name=
"customer_name"
>
客户姓名
</string>
...
...
@@ -528,7 +528,7 @@
<string
name=
"global0101"
>
验证码错误
</string>
<string
name=
"global0102"
>
未知错误GLOBAL0102
</string>
<string
name=
"global0103"
>
验证码错误
</string>
<string
name=
"global0104"
>
用户名
和
密码错误
</string>
<string
name=
"global0104"
>
用户名
或
密码错误
</string>
<string
name=
"global0400"
>
未知错误GLOBAL0400
</string>
<string
name=
"global0406"
>
未知错误GLOBAL0406
</string>
<string
name=
"global0405"
>
未知错误GLOBAL0405
</string>
...
...
orderCenter/src/main/res/layout/activity_multi_process_order.xml
View file @
8f83615b
...
...
@@ -144,6 +144,7 @@
android:layout_marginLeft=
"90dp"
android:layout_toRightOf=
"@id/text_two_text"
android:background=
"@null"
android:maxEms=
"50"
android:hint=
"@string/order_brand_name"
android:text=
"@={presenter.mBrandName}"
android:textColor=
"@color/default_text_color"
...
...
@@ -225,6 +226,7 @@
android:layout_marginLeft=
"75dp"
android:layout_toRightOf=
"@id/tv_serial_num"
android:background=
"@null"
android:maxEms=
"50"
android:hint=
"@string/order_serail_hint"
android:text=
"@={presenter.mSn}"
android:textColor=
"@color/default_text_color"
...
...
@@ -306,6 +308,7 @@
android:hint=
"@string/order_hint"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_11"
android:maxEms=
"200"
android:text=
"@={presenter.mInfo}"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
...
...
orderCenter/src/main/res/layout/activity_process_order.xml
View file @
8f83615b
...
...
@@ -144,6 +144,7 @@
android:layout_marginLeft=
"90dp"
android:layout_toRightOf=
"@id/text_two_text"
android:background=
"@null"
android:maxEms=
"50"
android:text=
'@{!TextUtils.isEmpty(presenter.mDetail.brandName)?presenter.mDetail.brandName:@string/no_data}'
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
...
...
@@ -225,6 +226,7 @@
android:layout_marginLeft=
"75dp"
android:layout_toRightOf=
"@id/tv_serial_num"
android:background=
"@null"
android:maxEms=
"50"
android:text=
"@{!TextUtils.isEmpty(presenter.mDetail.sn)?presenter.mDetail.sn:@string/no_data}"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
...
...
@@ -427,6 +429,7 @@
android:layout_toRightOf=
"@id/time_subscribe_remark"
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:maxEms=
"200"
android:hint=
"@string/order_hint"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_11"
...
...
@@ -747,6 +750,7 @@
android:layout_marginTop=
"@dimen/dp_17"
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:maxEms=
"100"
android:hint=
"@string/tv_order_other"
android:paddingTop=
"@dimen/dp_11"
android:text=
"@{presenter.mOrderField.otherInfo}"
...
...
orderCenter/src/main/res/layout/activity_return_part.xml
View file @
8f83615b
...
...
@@ -43,7 +43,7 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"
76
dp"
android:layout_height=
"
38
dp"
android:background=
"@color/cl_white"
android:orientation=
"horizontal"
>
...
...
@@ -52,7 +52,6 @@
android:layout_height=
"wrap_content"
android:paddingLeft=
"@dimen/dp_15"
android:paddingRight=
"43dp"
android:paddingTop=
"@dimen/dp_20"
android:text=
"@string/ka_beizhu"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
...
...
@@ -62,8 +61,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingRight=
"@dimen/dp_15"
android:paddingTop=
"@dimen/dp_20"
android:maxLines=
"5"
android:maxLines=
"2"
android:ellipsize=
"end"
android:text=
"@{TextUtils.isEmpty(presenter.kaComent)?@string/no_data:presenter.kaComent}"
android:textColor=
"@color/default_text_color"
...
...
@@ -103,6 +101,7 @@
android:hint=
"请说明寄回内容,数量和寄回原因"
android:paddingRight=
"@dimen/dp_15"
android:text=
"@={presenter.spComent}"
android:maxEms=
"500"
android:textColor=
"@color/default_editext_color"
android:textSize=
"15sp"
/>
</LinearLayout>
...
...
orderCenter/src/main/res/layout/fragment_multi_detail.xml
View file @
8f83615b
...
...
@@ -310,6 +310,7 @@
android:layout_marginTop=
"@dimen/dp_13"
android:layout_toRightOf=
"@+id/tv_customer_mobile"
android:text=
'@{item.customerTelphome}'
android:visibility=
"@{TextUtils.isEmpty(item.customerTelphome)?View.GONE:View.VISIBLE}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_13.3"
/>
...
...
@@ -328,7 +329,7 @@
android:id=
"@+id/navigation"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"
@dimen/dp_10
"
android:layout_marginLeft=
"
19dp
"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_below=
"@+id/tv_contact_tel"
android:layout_toRightOf=
"@id/tv_address"
...
...
orderCenter/src/main/res/layout/item_multi_process_foot.xml
View file @
8f83615b
...
...
@@ -390,6 +390,7 @@
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:hint=
"@string/tv_order_other"
android:maxEms=
"100"
android:paddingTop=
"@dimen/dp_11"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
View file @
8f83615b
...
...
@@ -17,6 +17,7 @@ import com.dayu.utils.MD5Util;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UserManager
;
import
com.dayu.utils.UtilsUserAccountMatcher
;
import
com.hyphenate.EMCallBack
;
import
com.hyphenate.chat.EMClient
;
...
...
@@ -38,6 +39,10 @@ public class PwLoginPresenter extends PwLoginContract.Presenter {
@Override
public
void
login
()
{
if
(!
UtilsUserAccountMatcher
.
isPhoneNum
(
phoneNume
.
get
()))
{
ToastUtils
.
showShortToast
(
R
.
string
.
alipay_phone_error
);
return
;
}
mView
.
showDialog
();
UserApiFactory
.
login
(
phoneNume
.
get
(),
MD5Util
.
encrypt
(
code
.
get
()),
"usernameLogin"
).
subscribe
(
baseObserver
(
userInfo
->
{
if
(
userInfo
.
getDetectStatus
()
==
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment