Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
05400f0c
Commit
05400f0c
authored
Sep 25, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_im' of
http://113.105.137.151:22280/lify/rvapp
into master-video
parents
b9d340f6
0ea337f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
SPConstance.java
...pper/src/main/java/com/ruiwenliu/wrapper/SPConstance.java
+2
-0
BaseLoginActivity.java
...n/java/com/rv/home/rv/module/basic/BaseLoginActivity.java
+2
-1
RvWebView.java
plugin_share/src/main/java/com/rv/share/view/RvWebView.java
+6
-5
No files found.
RvWrapper/src/main/java/com/ruiwenliu/wrapper/SPConstance.java
View file @
05400f0c
...
@@ -3,6 +3,7 @@ package com.ruiwenliu.wrapper;
...
@@ -3,6 +3,7 @@ package com.ruiwenliu.wrapper;
public
final
class
SPConstance
{
public
final
class
SPConstance
{
public
static
final
String
USER_JSON
=
"user_json"
;
public
static
final
String
USER_JSON
=
"user_json"
;
public
static
final
String
USER_JSON_NAME
=
"username"
;
public
static
final
String
USER_JSON_NAME
=
"username"
;
public
static
final
String
USER_JSON_NICKANAME
=
"nickname"
;
public
static
final
String
USER_JSON_HEADERURL
=
"headerurl"
;
public
static
final
String
USER_JSON_HEADERURL
=
"headerurl"
;
public
static
final
String
USER_JSON_USERID
=
"userid"
;
public
static
final
String
USER_JSON_USERID
=
"userid"
;
public
static
final
String
USER_JSON_TOKEN
=
"token"
;
public
static
final
String
USER_JSON_TOKEN
=
"token"
;
...
@@ -12,4 +13,5 @@ public final class SPConstance {
...
@@ -12,4 +13,5 @@ public final class SPConstance {
public
static
final
String
USER_JSON_USERINFO
=
"userinfo"
;
public
static
final
String
USER_JSON_USERINFO
=
"userinfo"
;
public
static
final
String
USER_JSON_CODE
=
"userCode"
;
public
static
final
String
USER_JSON_CODE
=
"userCode"
;
public
static
final
String
USER_JSON_TOKE_TIME
=
"tokentime"
;
public
static
final
String
USER_JSON_TOKE_TIME
=
"tokentime"
;
}
}
module_home/src/main/java/com/rv/home/rv/module/basic/BaseLoginActivity.java
View file @
05400f0c
...
@@ -140,9 +140,10 @@ public abstract class BaseLoginActivity<P extends MvpPresenter> extends BaseStat
...
@@ -140,9 +140,10 @@ public abstract class BaseLoginActivity<P extends MvpPresenter> extends BaseStat
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_HEADERURL
,
registeredBean
.
getData
().
getHeaderurl
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_HEADERURL
,
registeredBean
.
getData
().
getHeaderurl
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_TOKEN
,
registeredBean
.
getToken
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_TOKEN
,
registeredBean
.
getToken
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_TOKE_TIME
,
DateUtils
.
getCurDate
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_TOKE_TIME
,
DateUtils
.
getCurDate
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_NICKANAME
,
registeredBean
.
getData
().
getNickname
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_IMUSERID
,
registeredBean
.
getData
().
getImUserId
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_IMUSERID
,
registeredBean
.
getData
().
getImUserId
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_IMTOKEN
,
registeredBean
.
getData
().
getImToken
());
Cookie
.
save
(
getApplicationContext
(),
SPConstance
.
USER_JSON_IMTOKEN
,
registeredBean
.
getData
().
getImToken
());
UtilsManager
.
getInstance
(
OkGoUtil
.
application
).
setSharePreferencesSave
(
SPConstance
.
USER_JSON
).
putString
(
SPConstance
.
USER_JSON_CODE
,
registeredBean
.
getData
().
getCode
()).
commit
();
UtilsManager
.
getInstance
(
OkGoUtil
.
application
).
setSharePreferencesSave
(
SPConstance
.
USER_JSON
).
putString
(
SPConstance
.
USER_JSON_CODE
,
registeredBean
.
getData
().
getCode
()).
commit
();
UtilsManager
.
getInstance
(
OkGoUtil
.
application
).
setSharePreferencesSave
(
SPConstance
.
USER_JSON
).
putString
(
SPConstance
.
USER_JSON_NAME
,
registeredBean
.
getData
().
getUsername
()).
commit
();
UtilsManager
.
getInstance
(
OkGoUtil
.
application
).
setSharePreferencesSave
(
SPConstance
.
USER_JSON
).
putString
(
SPConstance
.
USER_JSON_NAME
,
registeredBean
.
getData
().
getUsername
()).
commit
();
...
...
plugin_share/src/main/java/com/rv/share/view/RvWebView.java
View file @
05400f0c
...
@@ -127,8 +127,8 @@ public class RvWebView extends WebView {
...
@@ -127,8 +127,8 @@ public class RvWebView extends WebView {
@JavascriptInterface
@JavascriptInterface
public
String
getTokenOrLogin
()
{
public
String
getTokenOrLogin
()
{
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
if
(
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
Intent
intent
=
LoginRvActivity
.
getIntent
(
getContext
(),
1
)
;
Intent
intent
=
LoginRvActivity
.
getIntent
(
getContext
(),
1
)
;
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
;
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
getContext
().
startActivity
(
intent
);
getContext
().
startActivity
(
intent
);
return
""
;
return
""
;
}
}
...
@@ -141,13 +141,14 @@ public class RvWebView extends WebView {
...
@@ -141,13 +141,14 @@ public class RvWebView extends WebView {
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
name
);
intent
.
setComponent
(
name
);
intent
.
putExtra
(
"to"
,
"mine_coupons"
);
intent
.
putExtra
(
"to"
,
"mine_coupons"
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
;
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
getContext
().
startActivity
(
intent
);
getContext
().
startActivity
(
intent
);
}
}
@JavascriptInterface
@JavascriptInterface
public
String
getUserName
()
{
public
String
getUserName
()
{
String
name
=
Cookie
.
getStringValue
(
getContext
(),
SPConstance
.
USER_JSON_NAME
,
""
);
String
name
=
!
TextUtils
.
isEmpty
(
Cookie
.
getStringValue
(
getContext
(),
SPConstance
.
USER_JSON_NICKANAME
,
""
))
?
Cookie
.
getStringValue
(
getContext
(),
SPConstance
.
USER_JSON_NICKANAME
,
""
)
:
Cookie
.
getStringValue
(
getContext
(),
SPConstance
.
USER_JSON_NAME
,
""
);
return
name
;
return
name
;
}
}
...
@@ -197,7 +198,7 @@ public class RvWebView extends WebView {
...
@@ -197,7 +198,7 @@ public class RvWebView extends WebView {
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
setComponent
(
name
);
intent
.
setComponent
(
name
);
intent
.
putExtra
(
"to"
,
"mine_wallet"
);
intent
.
putExtra
(
"to"
,
"mine_wallet"
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
;
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
getContext
().
startActivity
(
intent
);
getContext
().
startActivity
(
intent
);
}
}
...
...
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