111
This commit is contained in:
@@ -37,6 +37,8 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
public static FirebaseAnalytics mFirebaseAnalytics;
|
||||
public static AppEventsLogger logger;
|
||||
public static boolean isReady = false;
|
||||
public static String home_zdy_img_us = "";
|
||||
public static String home_zdy_img_cn = "";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class FaceBookUpModel extends BaseModel {
|
||||
String type,link;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
@@ -13,18 +14,28 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.InstructorOperationEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||
import static com.yunbao.common.CommonAppContext.lang;
|
||||
|
||||
public class InstructorOperationDialog extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
@@ -84,8 +95,15 @@ public class InstructorOperationDialog extends AbsDialogFragment {
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
ImageView to_msg = mRootView.findViewById(R.id.to_msg);
|
||||
if(lang.equals("english")){
|
||||
ImgLoader.display(mContext,home_zdy_img_us, to_msg);
|
||||
}else{
|
||||
ImgLoader.display(mContext,home_zdy_img_cn, to_msg);
|
||||
}
|
||||
|
||||
NoviceInstructorManager.get(getActivity()).setHomeZdyPop("");
|
||||
mRootView.findViewById(R.id.hurry_contact).setOnClickListener(new View.OnClickListener() {
|
||||
mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz");
|
||||
|
||||
@@ -2,12 +2,16 @@ package com.yunbao.common.http;
|
||||
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
@@ -61,6 +65,12 @@ public interface PDLiveApi {
|
||||
@Query("trumpet_msg") String trumpetMsg,
|
||||
@Query("anchor_id") String anchorid);
|
||||
|
||||
/**
|
||||
* FB是否替换新key
|
||||
*/
|
||||
@GET("/api/public/?service=Login.getFaceBookUpType")
|
||||
Observable<ResponseModel<FaceBookUpModel>> faceBookUp();
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.yunbao.common.http.main;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
@@ -9,6 +10,8 @@ import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -66,21 +69,19 @@ public class MainNetManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
* @param jianKey 簡體關鍵字
|
||||
* @param fanKey 繁體關鍵字
|
||||
* @param type 搜索類型 1,全部 2,主播 3,用戶
|
||||
* @param p 頁碼
|
||||
* FB是否替换新Key
|
||||
* @param callback
|
||||
*/
|
||||
public void search(String jianKey, String fanKey, int type, int p, HttpCallback<List<List<SearchModel>>> callback) {
|
||||
API.get().pdLiveApi(mContext).search(jianKey, fanKey, type, p)
|
||||
public void FaceBookUp(HttpCallback<FaceBookUpModel> callback) {
|
||||
API.get().pdLiveApi(mContext).faceBookUp()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (callback != null) {
|
||||
List<List<SearchModel>> model = listResponseModel.getData().getInfo();
|
||||
callback.onSuccess(model);
|
||||
.subscribe(new Consumer<ResponseModel<FaceBookUpModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<FaceBookUpModel> obj) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(obj.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
@@ -88,31 +89,6 @@ public class MainNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
* @param jianKey 簡體關鍵字
|
||||
* @param fanKey 繁體關鍵字
|
||||
* @param type 搜索類型 1,全部 2,主播 3,用戶
|
||||
* @param p 頁碼
|
||||
*/
|
||||
public void searchNew(String jianKey, String fanKey, int type, int p, HttpCallback<List<SearchModel>> callback) {
|
||||
API.get().pdLiveApi(mContext).searchNew(jianKey, fanKey, type, p)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (callback != null) {
|
||||
List<SearchModel> model = listResponseModel.getData().getInfo();
|
||||
callback.onSuccess(model);
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 猜你喜欢
|
||||
*
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="350dp"
|
||||
android:layout_height="320dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="66dp"
|
||||
android:layout_marginTop="86dp"
|
||||
android:background="@mipmap/tip_box"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@@ -20,6 +21,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="85dp"
|
||||
android:text="@string/welcome_pd"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#FF1A1A1A"
|
||||
android:textSize="21sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -30,6 +33,7 @@
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/welcome_pd_tip"
|
||||
android:textColor="#FFF19DA0"
|
||||
android:visibility="gone"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
@@ -48,17 +52,20 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@mipmap/icon_love_message"
|
||||
android:drawablePadding="3dp"
|
||||
android:text="@string/do_you_like_find"
|
||||
android:textColor="#FFFFBE41"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/welcome_pd_tip"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#FF4659"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/exclusive_instructor1"
|
||||
android:textColor="#FF737373"
|
||||
@@ -67,8 +74,8 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/exclusive_instructor2"
|
||||
android:textColor="#FF737373"
|
||||
android:textSize="10sp" />
|
||||
@@ -86,7 +93,7 @@
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="#FFFFBE41"
|
||||
app:cardCornerRadius="20dp"
|
||||
@@ -114,6 +121,16 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
<ImageView android:id="@+id/to_msg"
|
||||
android:layout_width="500dp"
|
||||
android:layout_height="500dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@mipmap/top_zhidao_bg" />
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginTop="86dp"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
</RelativeLayout>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 288 KiB |
@@ -833,11 +833,12 @@
|
||||
<string name="live_hot_ruletext22">前往「個人中心」-「我的包裹」中,即可使用熱度卡。</string>
|
||||
<string name="live_hot_ruletext31">熱度卡生效多久?</string>
|
||||
<string name="live_hot_ruletext32">對指定主播使用熱度卡後,將會立即生效,效果時長為24小時,不管主播是否在線,熱度時長都將會持續減少</string>
|
||||
<string name="welcome_pd">Welcome to PD LIVE</string>
|
||||
<string name="welcome_pd_tip">Here are all kinds of interesting anchor\n And a variety of activities to play</string>
|
||||
<string name="welcome_pd">Rewards coming!</string>
|
||||
<string name="welcome_pd_tip">Receive free
|
||||
Limited ride And limited avatar frame</string>
|
||||
<string name="do_you_like_find">Looking for you like?</string>
|
||||
<string name="exclusive_instructor1">Contact your dedicated mentor to We can</string>
|
||||
<string name="exclusive_instructor2">match you with more styles of anchor!</string>
|
||||
<string name="exclusive_instructor1">Go contact your personal guide to</string>
|
||||
<string name="exclusive_instructor2">get your prize redemption code!</string>
|
||||
<string name="hurry_contact">Contact a mentor now!</string>
|
||||
<string name="withdraw_success">Withdrawal succeeded</string>
|
||||
<string name="normal_barrage">normal barrage</string>
|
||||
|
||||
@@ -847,11 +847,11 @@
|
||||
<string name="live_hot_ruletext31">熱度卡生效多久?</string>
|
||||
<string name="live_hot_ruletext32">對指定主播使用熱度卡後,將會立即生效,效果時長為24小時,不管主播是否在線,熱度時長都將會持續減少</string>
|
||||
<string name="quote">引用</string>
|
||||
<string name="welcome_pd">歡迎來到PD LIVE</string>
|
||||
<string name="welcome_pd_tip">這有各類好看有趣的主播\n還有各種豐富的活動玩法</string>
|
||||
<string name="welcome_pd">你被大獎砸中啦!</string>
|
||||
<string name="welcome_pd_tip">限定好禮 免費領取 \n限定座駕和限定頭像框</string>
|
||||
<string name="do_you_like_find">在找您喜歡的主播嗎?</string>
|
||||
<string name="exclusive_instructor1">聯系您的專屬指導員</string>
|
||||
<string name="exclusive_instructor2">給您匹配更多風格的主播唷!</string>
|
||||
<string name="exclusive_instructor1">恭喜你成為今日幸運新人</string>
|
||||
<string name="exclusive_instructor2">快去聯繫你的專屬指導員\n領取大獎兌換碼吧!</string>
|
||||
<string name="hurry_contact">趕快聯系他/她吧!</string>
|
||||
<string name="withdraw_success">撤回成功</string>
|
||||
<string name="normal_barrage">普通彈幕</string>
|
||||
|
||||
Reference in New Issue
Block a user