Skip to content
项目
Groups
代码片段
帮助
正在加载...
Sign in / Register
Toggle navigation
W
workoffice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图表
统计图
Create a new issue
作业
提交
议题看板
Open sidebar
冷广德
workoffice
Commits
ee04a849
提交
ee04a849
authored
3月 27, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.关于软件
2.//TODO erp用户激活,忘记密码测试,产品下单还差附件,bat,mes,消息,我的,刷新token
上级
410c0ed2
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
370 行增加
和
5 行删除
+370
-5
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+16
-1
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+10
-0
UserAboutActivity.java
...com/wd/workoffice/ui/activity/user/UserAboutActivity.java
+59
-0
UserModifyPwdActivity.java
...wd/workoffice/ui/activity/user/UserModifyPwdActivity.java
+105
-0
UserSettingActivity.java
...m/wd/workoffice/ui/activity/user/UserSettingActivity.java
+2
-4
activity_about.xml
app/src/main/res/layout/activity_about.xml
+91
-0
activity_modify_pwd.xml
app/src/main/res/layout/activity_modify_pwd.xml
+87
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
ee04a849
...
...
@@ -560,7 +560,22 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.user.UserModifyPwdActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"修改密码"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.user.UserAboutActivity"
android:configChanges=
"keyboardHidden|orientation"
android:label=
"关于软件"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<provider
android:name=
"androidx.core.content.FileProvider"
android:authorities=
"com.wd.workoffice.fileprovider"
...
...
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
ee04a849
...
...
@@ -66,6 +66,16 @@ public interface ApiService {
Observable
<
BaseBean
>
forgetPwd
(
@Query
(
"phone"
)
String
phone
,
@Query
(
"verifyCode"
)
String
verifyCode
,
@Query
(
"newPassword"
)
String
newPassword
);
/**
* 根据旧密码重置密码
*
* @return
*/
@PUT
(
"/sys/user/change-pwd"
)
Observable
<
BaseBean
>
modifyPwd
(
@Query
(
"oldPassword"
)
String
oldPassword
,
@Query
(
"newPassword"
)
String
newPassword
);
/**
* 激活员工前获取该员工信息
*
...
...
app/src/main/java/com/wd/workoffice/ui/activity/user/UserAboutActivity.java
0 → 100644
浏览文件 @
ee04a849
package
com
.
wd
.
workoffice
.
ui
.
activity
.
user
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.UserInfoBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.login.LoginActivity
;
import
com.wd.workoffice.util.UserKeeper
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
flexible.xd.android_base.utils.AppUtil
;
import
io.reactivex.disposables.Disposable
;
/**
* 我的 - 设置 -关于
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
UserAboutActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_version
)
TextView
tvVersion
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
tvVersion
.
setText
(
"版本信息:"
+
AppUtil
.
getAppVersionName
());
}
@Override
protected
void
initData
()
{
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_about
;
}
}
app/src/main/java/com/wd/workoffice/ui/activity/user/UserModifyPwdActivity.java
0 → 100644
浏览文件 @
ee04a849
package
com
.
wd
.
workoffice
.
ui
.
activity
.
user
;
import
android.text.TextUtils
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.Config
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
flexible.xd.android_base.utils.RegexUtils
;
import
io.reactivex.disposables.Disposable
;
/**
* 我的 - 设置 - 修改密码
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
UserModifyPwdActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
et_old_pwd
)
EditText
etOldPwd
;
@BindView
(
R
.
id
.
et_pwd
)
EditText
etPwd
;
@BindView
(
R
.
id
.
et_confirm_pwd
)
EditText
etConfirmPwd
;
@BindView
(
R
.
id
.
btn_ok
)
Button
btnOk
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
}
@Override
protected
void
initData
()
{
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_modify_pwd
;
}
private
void
modify
(
String
oldPwd
,
String
newPwd
)
{
RtfUtils
.
getRtf
().
modifyPwd
(
oldPwd
,
newPwd
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
toast
(
"修改成功"
);
finish
();
}
});
}
@OnClick
(
R
.
id
.
btn_ok
)
public
void
onViewClicked
()
{
String
oldPwd
=
etOldPwd
.
getText
().
toString
();
String
pwd
=
etPwd
.
getText
().
toString
();
String
confirmPwd
=
etConfirmPwd
.
getText
().
toString
();
if
(!
RegexUtils
.
isMatch
(
Config
.
REGEX_PASSWORD
,
pwd
))
{
toast
(
"设置密码数字或字母6-16位"
);
return
;
}
if
(
TextUtils
.
equals
(
pwd
,
"123456"
))
{
toast
(
"密码不能为123456"
);
return
;
}
if
(!
TextUtils
.
equals
(
pwd
,
confirmPwd
))
{
toast
(
"两次输入的密码不一致"
);
return
;
}
modify
(
oldPwd
,
pwd
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/user/UserSettingActivity.java
浏览文件 @
ee04a849
...
...
@@ -78,13 +78,11 @@ public class UserSettingActivity extends WorkToolBarActivity {
@OnClick
({
R
.
id
.
rl_account
,
R
.
id
.
rl_phone
,
R
.
id
.
rl_pwd
,
R
.
id
.
rl_about
,
R
.
id
.
btn_logout
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
rl_account
:
break
;
case
R
.
id
.
rl_phone
:
break
;
case
R
.
id
.
rl_pwd
:
startActivity
(
UserModifyPwdActivity
.
class
);
break
;
case
R
.
id
.
rl_about
:
startActivity
(
UserAboutActivity
.
class
);
break
;
case
R
.
id
.
btn_logout
:
logout
();
...
...
app/src/main/res/layout/activity_about.xml
0 → 100644
浏览文件 @
ee04a849
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center_horizontal"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"100mm"
android:layout_height=
"100mm"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"50mm"
android:background=
"@mipmap/login_icon"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/dp_40"
android:gravity=
"center"
android:text=
"正望"
android:textColor=
"#d2b48c"
android:textSize=
"18sp"
/>
<TextView
android:id=
"@+id/tv_version"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5mm"
android:gravity=
"center"
android:text=
"版本信息:1.0.0"
android:textColor=
"#d2b48c"
android:textSize=
"16sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:text=
"《软件服务协议》"
android:textColor=
"@color/red"
android:textSize=
"@dimen/sp_14"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10mm"
android:text=
"《隐私协议》"
android:textColor=
"@color/red"
android:textSize=
"@dimen/sp_14"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"8mm"
android:gravity=
"center"
android:text=
"青岛红柿子软件技术有限公司 版权所有"
android:textColor=
"@color/red"
android:textSize=
"12sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"8mm"
android:gravity=
"center"
android:text=
"Copyright @ 2020 All Rights Reserve"
android:textColor=
"@color/red"
android:textSize=
"12sp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_modify_pwd.xml
0 → 100644
浏览文件 @
ee04a849
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:paddingVertical=
"10mm"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"旧密码"
/>
<EditText
android:id=
"@+id/et_old_pwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:background=
"@null"
android:hint=
"输入旧密码"
android:padding=
"4mm"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
style=
"@style/dividerX"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
android:paddingHorizontal=
"20mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"新密码"
/>
<EditText
android:id=
"@+id/et_pwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:background=
"@null"
android:hint=
"输入新密码"
android:padding=
"4mm"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
style=
"@style/dividerX"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingVertical=
"10mm"
android:paddingHorizontal=
"20mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"确认新密码"
/>
<EditText
android:id=
"@+id/et_confirm_pwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:background=
"@null"
android:hint=
"确认信密码"
android:padding=
"4mm"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
style=
"@style/dividerX"
/>
<Button
android:id=
"@+id/btn_ok"
android:text=
"确认"
android:background=
"@color/input_background"
android:layout_width=
"match_parent"
android:layout_height=
"50mm"
android:layout_marginHorizontal=
"40mm"
android:layout_marginTop=
"20mm"
/>
</LinearLayout>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论