Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
xxsq
Commits
e6e758d0
Commit
e6e758d0
authored
Oct 28, 2022
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加悬浮广告
parent
cb3cf000
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
10 deletions
+38
-10
MainActivity.java
app/src/main/java/com/zxhl/shop/activity/MainActivity.java
+22
-5
activity_main.xml
app/src/main/res/layout/activity_main.xml
+11
-0
NetConfig.java
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
+4
-4
HomeQyBannerAdapter.kt
...n/java/com/zxbw/modulemain/adapter/HomeQyBannerAdapter.kt
+1
-1
No files found.
app/src/main/java/com/zxhl/shop/activity/MainActivity.java
View file @
e6e758d0
...
...
@@ -5,6 +5,7 @@ import android.content.Intent;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.view.View
;
import
android.widget.ImageView
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
...
...
@@ -57,7 +58,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
private
LoadingDialog
mLoading
;
private
Observable
<
String
>
mRestartLoginObservable
;
private
Observable
<
Integer
>
mSwitchMainObservable
;
private
ImageView
adview
;
@Override
public
int
layoutID
()
{
return
R
.
layout
.
activity_main
;
...
...
@@ -81,6 +82,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
false
);
navigationView
=
findViewById
(
R
.
id
.
id_activity_main_fragment_navigation
);
adview
=
findViewById
(
R
.
id
.
id_img_fly_ad
);
initListener
();
mRestartLoginObservable
=
RxBus
.
get
().
register
(
Constant
.
REFRESH_LOGIN_STATS
,
String
.
class
);
mRestartLoginObservable
.
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
new
Consumer
<
String
>()
{
...
...
@@ -110,7 +112,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
boolean
firstLoginApp
=
SettingPreference
.
getFirstLoginApp
();
if
(
firstLoginApp
)
{
UserInfo
userInfoData
=
SettingPreference
.
getUserInfoData
();
if
(
userInfoData
!=
null
&&
userInfoData
.
member
!=
null
)
{
if
(
userInfoData
!=
null
&&
userInfoData
.
member
!=
null
)
{
Constant
.
Switch
.
isOpenVip
=
userInfoData
.
member
;
if
(!
userInfoData
.
member
)
{
SettingPreference
.
setFirstLoginApp
();
...
...
@@ -173,7 +175,8 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
}
else
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_cash
)
{
switchFragment
(
2
);
EventUtils
.
INSTANCE
.
onEvent
(
"tab_imp"
,
"cash_check"
);
}
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_user
)
{
}
if
(
vId
==
com
.
zxbw
.
modulemain
.
R
.
id
.
id_view_navigation_bottom_user
)
{
switchFragment
(
3
);
EventUtils
.
INSTANCE
.
onEvent
(
"tab_imp"
,
"user"
);
}
...
...
@@ -212,7 +215,7 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
super
.
onResume
();
MobclickAgent
.
onResume
(
this
);
UserInfo
userInfoData
=
SettingPreference
.
getUserInfoData
();
if
(
userInfoData
!=
null
&&
userInfoData
.
member
!=
null
)
{
if
(
userInfoData
!=
null
&&
userInfoData
.
member
!=
null
)
{
Constant
.
Switch
.
isOpenVip
=
userInfoData
.
member
;
}
ClipboardManagerUtil
.
INSTANCE
.
getTbLink
(
this
);
...
...
@@ -279,4 +282,18 @@ public class MainActivity extends BaseActivity implements NavigationBottomView.N
// super.onSaveInstanceState(outState);
}
private
void
getAdInfo
()
{
ApiClient
.
INSTANCE
.
getHomeApi
().
closeApp
().
compose
(
RxSchedulers
.
observableIO2Main
()).
subscribe
(
new
BaseObserver
<
Object
>()
{
@Override
public
void
onSuccess
(
Object
result
)
{
exitActivity
();
}
@Override
public
void
onFailure
(
Throwable
e
,
String
code
,
String
errorMsg
)
{
exitActivity
();
}
});
}
}
app/src/main/res/layout/activity_main.xml
View file @
e6e758d0
...
...
@@ -25,7 +25,18 @@
android:background=
"@color/white"
android:clipChildren=
"false"
/>
<ImageView
android:id=
"@+id/id_img_fly_ad"
android:layout_width=
"75dp"
android:layout_height=
"75dp"
android:layout_above=
"@+id/id_activity_main_fragment_navigation"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10dp"
android:layout_marginBottom=
"100dp"
android:src=
"@drawable/icon_head_defalt"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"0.5dp"
android:layout_above=
"@+id/id_activity_main_fragment_navigation"
...
...
cms/src/main/java/com/zxhl/cms/common/NetConfig.java
View file @
e6e758d0
...
...
@@ -194,18 +194,18 @@ public class NetConfig {
}
public
static
class
H5
{
public
static
String
WEB_URL_USER
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/person_app.html?webName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
);
public
static
String
WEB_URL_USER
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/person_app.html?webName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
);
public
static
String
WEB_URL_PRIVACY
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/privacy_app.html?appName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
)+
"APP&company=北京掌心互联科技有限公司&money=虚拟货币&webName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
);
public
static
String
WEB_URL_PRIVACY
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/privacy_app.html?appName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
)
+
"APP&company=北京掌心互联科技有限公司&money=虚拟货币&webName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
);
public
static
String
WEB_URL_RULE
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xiaoxiangSaveMoney/huafeiRule.html"
;
public
static
String
WEB_URL_ABOUT_US
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/aboutMe.html?version="
+
Constant
.
Param
.
vn
+
"&appName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
)+
"&company=北京掌心互联科技有限公司"
;
public
static
String
WEB_URL_ABOUT_US
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/aboutMe.html?version="
+
Constant
.
Param
.
vn
+
"&appName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
)
+
"&company=北京掌心互联科技有限公司"
;
public
static
String
WEB_URL_CUSTOMER_SERVICE
=
"https://1568685.s4.udesk.cn/im_client/?web_plugin_id=43807"
;
public
static
String
WEB_URL_CUSTOMER_SERVICE_ERROR
=
"https://h5.zhangxinzhixun.com/to_refund"
;
public
static
String
WEB_URL_ZENGZHI_SERVICE
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/xxsq_zz_server.html"
;
public
static
String
WEB_URL_BUYER_KNOW
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/buyerKnow.html?version="
+
Constant
.
Param
.
vn
+
"&appName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
)+
"&company=北京掌心互联科技有限公司"
;
public
static
String
WEB_URL_BUYER_KNOW
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/buyerKnow.html?version="
+
Constant
.
Param
.
vn
+
"&appName="
+
AppContext
.
get
().
getResources
().
getString
(
R
.
string
.
app_name
)
+
"&company=北京掌心互联科技有限公司"
;
public
static
String
WEB_URL_WEEK_RULE
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/week_activity_rule.html"
;
public
static
String
WEB_URL_INVITE
;
public
static
String
WEB_URL_H5_PAY
=
"https://newspool.zhangxinhulian.com/sspapiNovel/su/custom/xingyunmohe/pay_order.html"
;
...
...
moduleMain/src/main/java/com/zxbw/modulemain/adapter/HomeQyBannerAdapter.kt
View file @
e6e758d0
...
...
@@ -58,7 +58,7 @@ class HomeQyBannerAdapter : PagerAdapter {
var
mJgqQyAdapter
=
JgqQyAdapter
(
mActivity
,
OnRecycleItemClickListener
<
JgqQyEntity
>
{
view
,
position
,
data
->
EventUtils
.
onEvent
(
"gird_click"
,
""
+
data
.
sort
)
EventUtils
.
onEvent
(
"gird_click"
,
""
+
data
.
brand
)
if
(
TextUtils
.
equals
(
data
.
rechargeType
,
"51"
))
{
JumpUtils
.
CardVoucherJump
(
data
.
brand
)
}
else
if
(
TextUtils
.
equals
(
data
.
rechargeType
,
"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