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
c0a4e338
Commit
c0a4e338
authored
Dec 04, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改邀请码请求不到的问题
parent
dd9c0061
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
36 deletions
+25
-36
MainActivity.java
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
+25
-1
WelcomeActivity.java
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
+0
-21
LoginRvActivity.java
.../java/com/rv/home/rv/module/ui/login/LoginRvActivity.java
+0
-14
No files found.
RvClient/src/main/java/com/xxfc/rv/MainActivity.java
View file @
c0a4e338
...
...
@@ -57,7 +57,6 @@ import com.rv.home.rv.module.ApiConfig;
import
com.ruiwenliu.wrapper.base.presenter.CommonPresenter
;
import
com.rv.home.rv.module.ui.main.home.HomeFragment
;
import
com.rv.home.rv.module.ui.main.home.bean.EffectiveTimeBean
;
import
com.rv.im.CustomerListActivity
;
import
com.rv.im.ImService
;
import
com.rv.im.ImSetting
;
import
com.rv.im.call.AudioOrVideoController
;
...
...
@@ -75,6 +74,7 @@ import com.rv.version.DownListenerManager;
import
com.rv.version.bean.VersionCheckBean
;
import
com.rv.version.util.DownloadAppUtils
;
import
com.rv.version.util.UpdateAppUtils
;
import
com.sh.sdk.shareinstall.ShareInstall
;
import
com.xxfc.discovery.DiscoveryFragment
;
import
com.xxfc.discovery.api.DiscoveryApi
;
import
com.xxfc.discovery.bean.DiscoveryIMTokenBean
;
...
...
@@ -84,6 +84,8 @@ import com.yuyife.okgo.OkGoUtil;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
java.io.File
;
import
java.util.ArrayList
;
...
...
@@ -240,6 +242,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
checkVersion
();
checkToken
();
getPreRentDays
();
initShareCode
();
}
...
...
@@ -326,6 +329,27 @@ public class MainActivity extends BaseActivity<CommonPresenter> implements DownL
.
update
();
}
/********
* 保存分享的code
*/
private
void
initShareCode
()
{
ShareInstall
.
getInstance
().
getInfo
(
getIntent
(),
info
->
{
// 客户端获取到的参数是json字符串格式
LogUtil
.
d
(
"ShareInstall"
,
"info = "
+
info
);
JSONObject
object
;
try
{
object
=
new
JSONObject
(
info
);
String
inviteCode
=
object
.
optString
(
"code"
);
if
(!
TextUtils
.
isEmpty
(
inviteCode
))
{
AppCookie
.
save
(
"code"
,
inviteCode
);
}
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
});
}
/**
* 设置token时间检测
*/
...
...
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
View file @
c0a4e338
...
...
@@ -76,27 +76,6 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
protected
void
initView
(
Bundle
savedInstanceState
,
TitleView
titleView
,
Intent
intent
)
{
showTitle
(
false
);
//隐藏菜单栏
permissionProcess
();
initShareCode
();
}
/********
* 保存分享的code
*/
private
void
initShareCode
()
{
ShareInstall
.
getInstance
().
getInfo
(
getIntent
(),
info
->
{
// 客户端获取到的参数是json字符串格式
LogUtil
.
d
(
"ShareInstall"
,
"info = "
+
info
);
JSONObject
object
;
try
{
object
=
new
JSONObject
(
info
);
String
inviteCode
=
object
.
optString
(
"code"
);
if
(!
TextUtils
.
isEmpty
(
inviteCode
))
{
AppCookie
.
save
(
"code"
,
inviteCode
);
}
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
});
}
private
void
init
()
{
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/login/LoginRvActivity.java
View file @
c0a4e338
...
...
@@ -95,20 +95,6 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
jumptype
=
intent
.
getIntExtra
(
"jumptype"
,
0
);
// etPhone.setText(""+mActivity.getPackageName());
initRxbus
();
ShareInstall
.
getInstance
().
getInfo
(
getIntent
(),
info
->
{
// 客户端获取到的参数是json字符串格式
LogUtil
.
d
(
"ShareInstall"
,
"info = "
+
info
);
JSONObject
object
=
null
;
try
{
object
=
new
JSONObject
(
info
);
String
inviteCode
=
object
.
optString
(
"code"
);
if
(!
TextUtils
.
isEmpty
(
inviteCode
))
{
AppCookie
.
save
(
"code"
,
inviteCode
);
}
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
});
}
@SuppressLint
(
"CheckResult"
)
...
...
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