Skip to content

Commit 89c1b01

Browse files
committed
设置密码页面修改
1 parent 7c01a7d commit 89c1b01

11 files changed

Lines changed: 265 additions & 52 deletions

File tree

app/src/enterprise/AndroidManifest.xml

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -44,50 +44,50 @@
4444
<!-- 信鸽需要的组件 begin———————————————————————————————————————————————————————————————————————————— -->
4545
<!-- 【必须】 信鸽receiver广播接收 -->
4646
<!--<receiver-->
47-
<!--android:name="com.tencent.android.tpush.XGPushReceiver"-->
48-
<!--android:process=":xg_service_v2">-->
49-
<!--<intent-filter android:priority="0x7fffffff">-->
47+
<!--android:name="com.tencent.android.tpush.XGPushReceiver"-->
48+
<!--android:process=":xg_service_v2">-->
49+
<!--<intent-filter android:priority="0x7fffffff">-->
5050

51-
<!--&lt;!&ndash; 【必须】 信鸽SDK的内部广播 &ndash;&gt;-->
52-
<!--<action android:name="com.tencent.android.tpush.action.SDK" />-->
53-
<!--<action android:name="com.tencent.android.tpush.action.INTERNAL_PUSH_MESSAGE" />-->
54-
<!--&lt;!&ndash; 【必须】 系统广播:网络切换 &ndash;&gt;-->
55-
<!--<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />-->
51+
<!--&lt;!&ndash; 【必须】 信鸽SDK的内部广播 &ndash;&gt;-->
52+
<!--<action android:name="com.tencent.android.tpush.action.SDK" />-->
53+
<!--<action android:name="com.tencent.android.tpush.action.INTERNAL_PUSH_MESSAGE" />-->
54+
<!--&lt;!&ndash; 【必须】 系统广播:网络切换 &ndash;&gt;-->
55+
<!--<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />-->
5656

57-
<!--&lt;!&ndash; 【可选】 系统广播:开屏 &ndash;&gt;-->
58-
<!--<action android:name="android.intent.action.USER_PRESENT" />-->
57+
<!--&lt;!&ndash; 【可选】 系统广播:开屏 &ndash;&gt;-->
58+
<!--<action android:name="android.intent.action.USER_PRESENT" />-->
5959

60-
<!--&lt;!&ndash; 【可选】 一些常用的系统广播,增强信鸽service的复活机会,请根据需要选择。当然,你也可以添加APP自定义的一些广播让启动service &ndash;&gt;-->
61-
<!--<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />-->
62-
<!--<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />-->
63-
<!--<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />-->
64-
<!--</intent-filter>-->
65-
<!--&lt;!&ndash; 【可选】 usb相关的系统广播,增强信鸽service的复活机会,请根据需要添加 &ndash;&gt;-->
66-
<!--<intent-filter android:priority="0x7fffffff">-->
67-
<!--<action android:name="android.intent.action.MEDIA_UNMOUNTED" />-->
68-
<!--<action android:name="android.intent.action.MEDIA_REMOVED" />-->
69-
<!--<action android:name="android.intent.action.MEDIA_CHECKING" />-->
70-
<!--<action android:name="android.intent.action.MEDIA_EJECT" />-->
60+
<!--&lt;!&ndash; 【可选】 一些常用的系统广播,增强信鸽service的复活机会,请根据需要选择。当然,你也可以添加APP自定义的一些广播让启动service &ndash;&gt;-->
61+
<!--<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />-->
62+
<!--<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />-->
63+
<!--<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />-->
64+
<!--</intent-filter>-->
65+
<!--&lt;!&ndash; 【可选】 usb相关的系统广播,增强信鸽service的复活机会,请根据需要添加 &ndash;&gt;-->
66+
<!--<intent-filter android:priority="0x7fffffff">-->
67+
<!--<action android:name="android.intent.action.MEDIA_UNMOUNTED" />-->
68+
<!--<action android:name="android.intent.action.MEDIA_REMOVED" />-->
69+
<!--<action android:name="android.intent.action.MEDIA_CHECKING" />-->
70+
<!--<action android:name="android.intent.action.MEDIA_EJECT" />-->
7171

72-
<!--<data android:scheme="file" />-->
73-
<!--</intent-filter>-->
72+
<!--<data android:scheme="file" />-->
73+
<!--</intent-filter>-->
7474
<!--</receiver>-->
7575
<!--&lt;!&ndash; 【必须】 (2.30及以上版新增)展示通知的activity &ndash;&gt;-->
7676
<!--&lt;!&ndash; 【注意】 如果被打开的activity是启动模式为SingleTop,SingleTask或SingleInstance,请根据通知的异常自查列表第8点处理 &ndash;&gt;-->
7777
<!--<activity-->
78-
<!--android:name="com.tencent.android.tpush.XGPushActivity"-->
79-
<!--android:exported="true">-->
80-
<!--<intent-filter>-->
81-
<!--<action android:name="android.intent.action" />-->
82-
<!--</intent-filter>-->
78+
<!--android:name="com.tencent.android.tpush.XGPushActivity"-->
79+
<!--android:exported="true">-->
80+
<!--<intent-filter>-->
81+
<!--<action android:name="android.intent.action" />-->
82+
<!--</intent-filter>-->
8383
<!--</activity>-->
8484

8585
<!-- 【必须】 信鸽service -->
8686
<!--<service-->
87-
<!--android:name="com.tencent.android.tpush.service.XGPushService"-->
88-
<!--android:exported="true"-->
89-
<!--android:persistent="true"-->
90-
<!--android:process=":xg_service_v2" />-->
87+
<!--android:name="com.tencent.android.tpush.service.XGPushService"-->
88+
<!--android:exported="true"-->
89+
<!--android:persistent="true"-->
90+
<!--android:process=":xg_service_v2" />-->
9191

9292
<receiver android:name=".EnterprisePushReceiver">
9393
<intent-filter>
@@ -100,11 +100,11 @@
100100

101101
<!--&lt;!&ndash; 【必须】 通知service,此选项有助于提高抵达率 &ndash;&gt;-->
102102
<!--<service-->
103-
<!--android:name="com.tencent.android.tpush.rpc.XGRemoteService"-->
104-
<!--android:exported="true">-->
105-
<!--<intent-filter>-->
106-
<!--<action android:name="net.coding.program.enterprise.PUSH_ACTION" />-->
107-
<!--</intent-filter>-->
103+
<!--android:name="com.tencent.android.tpush.rpc.XGRemoteService"-->
104+
<!--android:exported="true">-->
105+
<!--<intent-filter>-->
106+
<!--<action android:name="net.coding.program.enterprise.PUSH_ACTION" />-->
107+
<!--</intent-filter>-->
108108
<!--</service>-->
109109
<!-- 信鸽需要的组件 end ———————————————————————————————————————————————————————————————————————————— -->
110110

@@ -168,6 +168,11 @@
168168
</intent-filter>
169169
</receiver>
170170

171+
<activity
172+
android:name=".login.phone.EnterprisePrivateEmailSetPasswordActivity_"
173+
android:label="@string/empty"
174+
android:screenOrientation="portrait"
175+
android:theme="@style/ActionbarTranslate" />
171176
<activity
172177
android:name=".login.phone.EnterpriseEmailSetPasswordActivity_"
173178
android:label="@string/empty"

app/src/enterprise/java/net/coding/program/EnterpriseApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static void setHost(@NonNull String enterpriseName) {
6868

6969
private static void initPrivateHost(Context context) {
7070
GlobalData.setEnterpriseGK(PRIVATE_GK);
71-
String host = AccountInfo.loadLastPrivateHost(context);
71+
String host = "http://" + AccountInfo.loadLastPrivateHost(context);
7272
Global.HOST = host;
7373
Global.HOST_API = Global.HOST + "/api";
7474
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package net.coding.program.login.phone;
2+
3+
import android.text.TextUtils;
4+
import android.view.View;
5+
6+
import net.coding.program.EnterpriseApp;
7+
import net.coding.program.R;
8+
import net.coding.program.common.Global;
9+
import net.coding.program.common.widget.LoginEditTextNew;
10+
11+
import org.androidannotations.annotations.AfterViews;
12+
import org.androidannotations.annotations.EActivity;
13+
import org.androidannotations.annotations.Extra;
14+
import org.androidannotations.annotations.ViewById;
15+
16+
/**
17+
* Created by chenchao on 2017/1/4.
18+
*/
19+
@EActivity(R.layout.enterprise_private_activity_email_set_password)
20+
public class EnterprisePrivateEmailSetPasswordActivity extends EmailSetPasswordActivity {
21+
22+
@Extra
23+
String enterpriseName = "";
24+
25+
@ViewById
26+
LoginEditTextNew privateHost;
27+
28+
@ViewById
29+
View enterpriseLine;
30+
31+
@AfterViews
32+
void initEnterpriseEmailSetPasswordActivity() {
33+
privateHost.setText(enterpriseName);
34+
hideActionbarShade();
35+
36+
if (TextUtils.isEmpty(enterpriseName)) {
37+
privateHost.requestFocus();
38+
} else {
39+
emailEdit.requestFocus();
40+
}
41+
}
42+
43+
@Override
44+
protected String getUrl() {
45+
EnterpriseApp.setPrivateHost(privateHost.getTextString());
46+
return String.format("%s%s", Global.HOST_API, "/account/password/forget");
47+
}
48+
}

app/src/enterprise/java/net/coding/program/user/EnterpriseLoginActivity.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import net.coding.program.login.auth.TotpClock;
4848
import net.coding.program.login.phone.Close2FAActivity_;
4949
import net.coding.program.login.phone.EnterpriseEmailSetPasswordActivity_;
50+
import net.coding.program.login.phone.EnterprisePrivateEmailSetPasswordActivity_;
5051
import net.coding.program.network.constant.MemberAuthority;
5152

5253
import org.androidannotations.annotations.AfterViews;
@@ -174,10 +175,6 @@ void initEnterpriseLoginActivity() {
174175

175176
if (isPrivate) {
176177
String lastHost = AccountInfo.loadLastPrivateHost(this);
177-
final String PRE = "http://";
178-
if (lastHost.startsWith(PRE)) {
179-
lastHost = lastHost.substring(PRE.length());
180-
}
181178
privateHost.setText(lastHost);
182179
}
183180

@@ -371,10 +368,16 @@ protected final void loginFail() {
371368
account = "";
372369
}
373370

374-
EnterpriseEmailSetPasswordActivity_.intent(this)
375-
.enterpriseName(enterpriseGK)
376-
.account(account)
377-
.start();
371+
if (isPrivate) {
372+
EnterprisePrivateEmailSetPasswordActivity_.intent(this)
373+
.enterpriseName(privateHost.getTextString())
374+
.start();
375+
} else {
376+
EnterpriseEmailSetPasswordActivity_.intent(this)
377+
.enterpriseName(enterpriseGK)
378+
.account(account)
379+
.start();
380+
}
378381
}
379382

380383
@Click

app/src/enterprise/res/layout/activity_account_setting.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
android:textColor="@color/font_3"
102102
android:textSize="15sp" />
103103

104-
<View style="@style/DivideLine_15" android:layout_alignParentBottom="true"/>
104+
<View
105+
style="@style/DivideLine_15"
106+
android:layout_alignParentBottom="true" />
105107

106108
</RelativeLayout>
107109

@@ -147,7 +149,6 @@
147149

148150
</RelativeLayout>
149151

150-
<include layout="@layout/divide_line_1" />
151152

152153
<RelativeLayout
153154
android:id="@+id/close2FA"
@@ -167,6 +168,7 @@
167168
android:textColor="@color/font_1"
168169
android:textSize="15sp" />
169170

171+
<include layout="@layout/divide_line_1" />
170172
</RelativeLayout>
171173

172174
<include layout="@layout/divide_bottom_15" />
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
xmlns:app="http://schemas.android.com/apk/res-auto"
7+
android:background="@color/white">
8+
9+
<LinearLayout
10+
android:layout_width="match_parent"
11+
android:layout_height="match_parent"
12+
android:orientation="vertical">
13+
14+
<RelativeLayout
15+
android:id="@+id/layoutRoot"
16+
android:layout_width="match_parent"
17+
android:layout_height="match_parent">
18+
19+
<LinearLayout
20+
android:layout_width="match_parent"
21+
android:layout_height="wrap_content"
22+
android:orientation="vertical"
23+
android:paddingTop="7.5dp">
24+
25+
<LinearLayout
26+
android:layout_width="match_parent"
27+
android:layout_height="wrap_content"
28+
android:paddingLeft="5dp"
29+
android:layout_marginRight="5dp"
30+
android:orientation="vertical">
31+
32+
<TextView
33+
android:id="@+id/toolbarTitle"
34+
android:layout_width="wrap_content"
35+
android:layout_height="40dp"
36+
android:layout_alignParentBottom="true"
37+
android:layout_marginBottom="15dp"
38+
android:layout_marginLeft="15dp"
39+
android:layout_marginTop="28dp"
40+
android:gravity="center_vertical"
41+
android:text="找回密码"
42+
android:textColor="#272C33"
43+
android:textSize="28sp" />
44+
45+
<net.coding.program.common.widget.LoginEditTextNew
46+
android:id="@+id/privateHost"
47+
style="@style/EmailEdit"
48+
android:layout_marginRight="15dp"
49+
app:hint="请输入企业域名" />
50+
51+
<net.coding.program.common.LoginEditText
52+
android:id="@+id/emailEdit"
53+
android:layout_marginLeft="15dp"
54+
android:layout_marginRight="15dp"
55+
style="@style/EditLogin"
56+
android:hint="邮箱"
57+
android:inputType="textEmailAddress"
58+
app:topLine="false" />
59+
60+
<FrameLayout
61+
android:id="@+id/captchaEditLayout"
62+
android:layout_marginLeft="15dp"
63+
android:layout_marginRight="15dp"
64+
android:layout_width="match_parent"
65+
android:layout_height="wrap_content"
66+
android:layout_marginTop="15dp">
67+
68+
<net.coding.program.common.LoginEditText
69+
android:id="@+id/captchaEdit"
70+
style="@style/EditLogin"
71+
android:layout_marginTop="0dp"
72+
android:hint="验证码"
73+
tools:visibility="visible" />
74+
75+
<ImageView
76+
android:id="@+id/captchaImage"
77+
style="@style/CaptchaImage"
78+
android:layout_gravity="right|center_vertical" />
79+
80+
</FrameLayout>
81+
82+
83+
</LinearLayout>
84+
85+
<com.flyco.roundview.RoundTextView
86+
android:id="@+id/loginButton"
87+
android:layout_width="match_parent"
88+
android:layout_height="50dp"
89+
android:layout_marginLeft="15dp"
90+
android:layout_marginRight="15dp"
91+
android:layout_marginTop="20dp"
92+
android:gravity="center"
93+
android:text="下一步"
94+
android:textColor="@color/white"
95+
android:textSize="17sp"
96+
app:rv_backgroundColor="@color/font_2"
97+
app:rv_cornerRadius="4dp" />
98+
99+
<TextView
100+
android:id="@+id/textClause"
101+
android:layout_width="match_parent"
102+
android:layout_height="wrap_content"
103+
android:layout_marginLeft="@dimen/padding_15"
104+
android:layout_marginRight="@dimen/padding_15"
105+
android:gravity="center_horizontal"
106+
android:textAppearance="?android:attr/textAppearanceSmall"
107+
android:textColor="@color/font_1" />
108+
109+
</LinearLayout>
110+
111+
</RelativeLayout>
112+
113+
</LinearLayout>
114+
</ScrollView>

app/src/main/java/net/coding/program/MyApp.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ public void setBlank(int itemSize, Object fragment, boolean request, View v, Str
318318
} else if (fragment instanceof ProjectDynamicFragment) {
319319
iconId = R.drawable.ic_exception_blank_dynamic;
320320
text = "当前项目暂无相关动态~";
321+
} else if (fragment instanceof ReleaseDetailActivity) {
322+
iconId = R.drawable.ic_exception_blank_task;
323+
text = "Release 不存在";
321324
} else if (fragment instanceof TeamListActivity) {
322325
iconId = R.drawable.ic_exception_blank_team;
323326
text = "还没有创建团队~";

0 commit comments

Comments
 (0)