ソースを参照

Merge remote-tracking branch 'origin/sheep_develop' into sheep_develop

zhengyang 2 年 前
コミット
07494712da

+ 1 - 1
app/build.gradle

@@ -229,7 +229,7 @@ dependencies {
 
     //不要修改这里,相信我
     releaseImplementation 'com.android.support:multidex:1.0.3'
-    implementation(name: 'com.kfzs.safe-201809211354', ext: 'aar')
+    implementation(name: 'com.kfzs.safe-202403062150', ext: 'aar')
 
     //butterknife
     implementation('com.jakewharton:butterknife:8.8.1') {

BIN
app/libs/com.kfzs.safe-202403062150.aar


+ 59 - 20
app/src/main/java/com/sheep/gamegroup/model/entity/NewAboutUs.java

@@ -19,70 +19,109 @@ public class NewAboutUs {
 
     private String CooperationQq;
 
+    private String CustomerWechat;
+
+    private String CustomerWechatQr;
+
     private int CreateTime;
 
     private int UpdateTime;
 
     private int Id;
 
-    public void setWechatPlatform(String WechatPlatform){
+    public void setWechatPlatform(String WechatPlatform) {
         this.WechatPlatform = WechatPlatform;
     }
-    public String getWechatPlatform(){
+
+    public String getWechatPlatform() {
         return this.WechatPlatform;
     }
-    public void setOfficialAddress(String OfficialAddress){
+
+    public void setOfficialAddress(String OfficialAddress) {
         this.OfficialAddress = OfficialAddress;
     }
-    public String getOfficialAddress(){
+
+    public String getOfficialAddress() {
         return this.OfficialAddress;
     }
-    public void setComplaintQq(String ComplaintQq){
+
+    public void setComplaintQq(String ComplaintQq) {
         this.ComplaintQq = ComplaintQq;
     }
-    public String getComplaintQq(){
+
+    public String getComplaintQq() {
         return this.ComplaintQq;
     }
-    public void setTitle(String Title){
+
+    public void setCustomerWechat(String CustomerWechat) {
+        this.CustomerWechat = CustomerWechat;
+    }
+
+    public String getCustomerWechat() {
+        return this.CustomerWechat;
+    }
+
+    public void setCustomerWechatQr(String CustomerWechatQr) {
+        this.CustomerWechatQr = CustomerWechatQr;
+    }
+
+    public String getCustomerWechatQr() {
+        return this.CustomerWechatQr;
+    }
+
+    public void setTitle(String Title) {
         this.Title = Title;
     }
-    public String getTitle(){
+
+    public String getTitle() {
         return this.Title;
     }
-    public void setContent(String Content){
+
+    public void setContent(String Content) {
         this.Content = Content;
     }
-    public String getContent(){
+
+    public String getContent() {
         return this.Content;
     }
-    public void setMailbox(String Mailbox){
+
+    public void setMailbox(String Mailbox) {
         this.Mailbox = Mailbox;
     }
-    public String getMailbox(){
+
+    public String getMailbox() {
         return this.Mailbox;
     }
-    public void setCooperationQq(String CooperationQq){
+
+    public void setCooperationQq(String CooperationQq) {
         this.CooperationQq = CooperationQq;
     }
-    public String getCooperationQq(){
+
+    public String getCooperationQq() {
         return this.CooperationQq;
     }
-    public void setCreateTime(int CreateTime){
+
+    public void setCreateTime(int CreateTime) {
         this.CreateTime = CreateTime;
     }
-    public int getCreateTime(){
+
+    public int getCreateTime() {
         return this.CreateTime;
     }
-    public void setUpdateTime(int UpdateTime){
+
+    public void setUpdateTime(int UpdateTime) {
         this.UpdateTime = UpdateTime;
     }
-    public int getUpdateTime(){
+
+    public int getUpdateTime() {
         return this.UpdateTime;
     }
-    public void setId(int Id){
+
+    public void setId(int Id) {
         this.Id = Id;
     }
-    public int getId(){
+
+    public int getId() {
         return this.Id;
     }
 

+ 40 - 0
app/src/main/java/com/sheep/gamegroup/util/ApiUtil.java

@@ -121,6 +121,46 @@ public class ApiUtil {
                             }
                         });
     }
+
+    public static void getNewAboutUsCustomerWechat(final Action1<String> action1) {
+        final NewAboutUs newAboutUs = DataUtil.getInstance().getCacheResult(ApiKey.new_about_us, NewAboutUs.class);
+        if(newAboutUs != null && !TextUtils.isEmpty(newAboutUs.getCustomerWechat())){
+            Observable.just(newAboutUs.getCustomerWechat())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new AbsObserver<String>() {
+                        @Override
+                        public void onNext(String wechatUrl) {
+                            action1.call(wechatUrl);
+                        }
+                    });
+            newAboutUs.setComplaintQq(null);//设置为空任务标记已经读取,下面的接口不用调用call
+        }
+        SheepApp.getInstance().getNetComponent().getApiService().getNewAboutUs()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        if(newAboutUs != null && TextUtils.equals(newAboutUs.getCustomerWechat(), "hasRead")){
+                            return;
+                        }
+                        NewAboutUs item = baseMessage.getData(NewAboutUs.class);
+                        if(item != null && !TextUtils.isEmpty(item.getCustomerWechat())){
+                            action1.call(item.getCustomerWechat());
+                        } else {
+                            action1.call("https://work.weixin.qq.com/kfid/kfc770ad220d79c6657");
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        if(newAboutUs != null && TextUtils.equals(newAboutUs.getComplaintQq(), "hasRead")){
+                            return;
+                        }
+                        action1.call("https://work.weixin.qq.com/kfid/kfc770ad220d79c6657");
+                    }
+                });
+    }
     //点击热门搜索后,统计点击次数
     public static void postTopSearchStatisticsClickTopSearch(@Nullable IHomePageSearch item) {
         if(item != null)

+ 8 - 0
app/src/main/java/com/sheep/gamegroup/util/QQUtil.java

@@ -42,6 +42,14 @@ public class QQUtil {
         }
     }
 
+    public static void skip4(Activity activity, String url) {
+        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+        // 跳转前先判断Uri是否存在,如果打开一个不存在的Uri,App可能会崩溃
+        if (isValidIntent(activity, intent)) {
+            activity.startActivity(intent);
+        }
+    }
+
     /**
      * 判断 用户是否安装QQ客户端
      */

+ 3 - 8
app/src/main/java/com/sheep/gamegroup/view/activity/ActNewAboutUs.java

@@ -129,15 +129,13 @@ public class ActNewAboutUs extends BaseActivity {
     @BindView(R.id.status_height_view)
     View status_height_view;
 
+    @BindView(R.id.about_us_customer_wechat_qr)
+    ImageView about_us_customer_wechat_qr;
 
     @BindView(R.id.about_us_addr_tv)
     TextView about_us_addr_tv;//相关信息--官方地址
     @BindView(R.id.about_us_platform_tv)
     TextView about_us_platform_tv;//相关信息--官方微信公众平台
-    @BindView(R.id.about_us_qq_back_tv)
-    TextView about_us_qq_back_tv;//投诉与建议--qq
-    @BindView(R.id.about_us_qq_tv)
-    TextView about_us_qq_tv;//商务合作--QQ
     @BindView(R.id.about_us_email_tv)
     TextView about_us_email_tv;//商务合作--邮箱
     @BindView(R.id.about_us_other_tv)
@@ -147,17 +145,14 @@ public class ActNewAboutUs extends BaseActivity {
     @BindView(R.id.about_us_version_tv)
     TextView about_us_version_tv;//版本号
     private void loadData(NewAboutUs newAboutUs) {
-        ViewUtil.setText(about_us_qq_back_tv, newAboutUs.getComplaintQq());
         ViewUtil.setH5Text(about_us_other_tv, about_us_other_wv, newAboutUs.getContent());
-        ViewUtil.setText(about_us_qq_tv, newAboutUs.getCooperationQq());
         ViewUtil.setText(about_us_email_tv, newAboutUs.getMailbox());
         ViewUtil.setText(about_us_addr_tv, newAboutUs.getOfficialAddress());
         ViewUtil.setText(about_us_platform_tv, newAboutUs.getWechatPlatform());
+        ViewUtil.setImage(about_us_customer_wechat_qr, newAboutUs.getCustomerWechatQr());
     }
     private void resetData() {
-        ViewUtil.setText(about_us_qq_back_tv);
         ViewUtil.setText(about_us_other_tv);
-        ViewUtil.setText(about_us_qq_tv);
         ViewUtil.setText(about_us_email_tv);
         ViewUtil.setText(about_us_addr_tv);
         ViewUtil.setText(about_us_platform_tv);

+ 10 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/FeedbackAct.java

@@ -58,7 +58,7 @@ public class FeedbackAct extends BaseActivity {
 
     @Override
     public void initListener() {
-        ViewUtil.setImage(contact_qq_iv, ViewUtil.getNetImgByName("ic_contact_qq"));
+        ViewUtil.setImage(contact_qq_iv, ViewUtil.getNetImgByName("ic_contact_wechat"));
     }
 
     @Override
@@ -109,4 +109,13 @@ public class FeedbackAct extends BaseActivity {
             }
         });
     }
+
+    public void onClickCustomerWechat(View view) {
+        ApiUtil.getNewAboutUsCustomerWechat(new Action1<String>() {
+            @Override
+            public void call(String url) {
+                QQUtil.skip4(FeedbackAct.this, url);
+            }
+        });
+    }
 }

+ 1 - 1
app/src/main/res/layout/act_feedback_layout.xml

@@ -137,7 +137,7 @@
         android:layout_height="wrap_content"
         android:layout_alignParentEnd="true"
         android:layout_alignParentBottom="true"
-        android:onClick="onClickContactQQ"
+        android:onClick="onClickCustomerWechat"
         android:layout_marginEnd="13dp"
         android:layout_marginBottom="100dp"
         android:gravity="center"

+ 51 - 69
app/src/main/res/layout/act_new_about_us.xml

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                xmlns:app="http://schemas.android.com/apk/res-auto"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent" xmlns:tools="http://schemas.android.com/tools">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 
-    <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
+    <android.support.design.widget.CoordinatorLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/white_light">
@@ -20,17 +20,20 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:background="@mipmap/home_blue_bg"
-                android:paddingBottom="@dimen/content_padding_10"
-                android:paddingEnd="@dimen/content_padding_20"
                 android:paddingStart="@dimen/content_padding_20"
                 android:paddingTop="@dimen/status_bar_height"
+                android:paddingEnd="@dimen/content_padding_20"
+                android:paddingBottom="@dimen/content_padding_10"
                 app:expandedTitleTextAppearance="@style/TextAppearance.Design.CollapsingToolbar.Expanded"
                 app:layout_scrollFlags="scroll|exitUntilCollapsed">
 
                 <TextView
-                    android:layout_width="match_parent"
+                    android:layout_width="0dp"
                     android:layout_height="?attr/actionBarSize"
                     android:gravity="center"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
                     android:text="关于小绵羊"
                     android:textColor="@color/white"
                     android:textSize="@dimen/text_size_4" />
@@ -39,8 +42,8 @@
                     android:id="@+id/about_us_iv"
                     android:layout_width="70dp"
                     android:layout_height="70dp"
-                    android:src="@mipmap/icon"
                     android:layout_marginTop="?attr/actionBarSize"
+                    android:src="@mipmap/icon"
                     app:layout_constraintBottom_toTopOf="@+id/about_us_app_tv"
                     app:layout_constraintEnd_toEndOf="parent"
                     app:layout_constraintStart_toStartOf="parent"
@@ -100,8 +103,8 @@
                     <TextView
                         android:id="@+id/about_us_addr_tv"
                         style="@style/style_about_us_label"
-                        android:layout_alignParentEnd="true"
                         android:layout_alignParentTop="true"
+                        android:layout_alignParentEnd="true"
                         android:layout_toEndOf="@+id/about_us_addr_label_tv"
                         android:gravity="end"
                         android:text="天府四街天府四街天府四街天府四街天府四街天府四街天府四街天府四街" />
@@ -114,15 +117,15 @@
                     <TextView
                         android:id="@+id/about_us_platform_label_tv"
                         style="@style/style_about_us_label"
-                        android:layout_alignParentStart="true"
                         android:layout_below="@id/about_us_line_1"
+                        android:layout_alignParentStart="true"
                         android:text="官方微信公众平台" />
 
                     <TextView
                         android:id="@+id/about_us_platform_tv"
                         style="@style/style_about_us_label"
-                        android:layout_alignParentEnd="true"
                         android:layout_below="@id/about_us_line_1"
+                        android:layout_alignParentEnd="true"
                         android:layout_toEndOf="@+id/about_us_platform_label_tv"
                         android:gravity="end"
                         android:text="好玩之家" />
@@ -130,66 +133,20 @@
 
                 <TextView
                     style="@style/style_about_us_title"
-                    android:text="投诉与建议" />
-
-                <RelativeLayout style="@style/style_about_us_rl">
-
-                    <TextView
-                        android:id="@+id/about_us_qq_back_label_tv"
-                        style="@style/style_about_us_label"
-                        android:layout_alignParentStart="true"
-                        android:layout_alignParentTop="true"
-                        android:text="QQ" />
-
-                    <TextView
-                        android:id="@+id/about_us_qq_back_tv"
-                        style="@style/style_about_us_label"
-                        android:layout_alignParentEnd="true"
-                        android:layout_alignParentTop="true"
-                        android:layout_toEndOf="@+id/about_us_qq_back_label_tv"
-                        android:gravity="end"
-                        android:text="13888888888" />
-                </RelativeLayout>
-
-                <TextView
-                    style="@style/style_about_us_title"
                     android:text="商务合作" />
 
                 <RelativeLayout style="@style/style_about_us_rl">
 
                     <TextView
-                        android:id="@+id/about_us_qq_label_tv"
-                        style="@style/style_about_us_label"
-                        android:layout_alignParentStart="true"
-                        android:layout_alignParentTop="true"
-                        android:text="QQ" />
-
-                    <TextView
-                        android:id="@+id/about_us_qq_tv"
-                        style="@style/style_about_us_label"
-                        android:layout_alignParentEnd="true"
-                        android:layout_alignParentTop="true"
-                        android:layout_toEndOf="@+id/about_us_qq_label_tv"
-                        android:gravity="end"
-                        android:text="88888888" />
-
-                    <View
-                        android:id="@+id/about_us_line_2"
-                        style="@style/style_about_us_line"
-                        android:layout_below="@+id/about_us_qq_tv" />
-
-                    <TextView
                         android:id="@+id/about_us_email_label_tv"
                         style="@style/style_about_us_label"
                         android:layout_alignParentStart="true"
-                        android:layout_below="@id/about_us_line_2"
                         android:text="邮箱" />
 
                     <TextView
                         android:id="@+id/about_us_email_tv"
                         style="@style/style_about_us_label"
                         android:layout_alignParentEnd="true"
-                        android:layout_below="@id/about_us_line_2"
                         android:layout_toEndOf="@+id/about_us_email_label_tv"
                         android:gravity="end"
                         android:text="88888888@qq.com" />
@@ -197,6 +154,25 @@
 
                 <TextView
                     style="@style/style_about_us_title"
+                    android:text="联系客服" />
+
+                <android.support.constraint.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:background="@drawable/shape_white_solid_rectangle_bottom"
+                    android:layout_height="wrap_content">
+
+                    <ImageView
+                        android:id="@+id/about_us_customer_wechat_qr"
+                        android:layout_width="250dp"
+                        android:layout_height="250dp"
+                        android:src="@mipmap/icon"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+                </android.support.constraint.ConstraintLayout>
+
+                <TextView
+                    style="@style/style_about_us_title"
                     android:text="公司简介" />
 
                 <RelativeLayout
@@ -217,36 +193,42 @@
             </LinearLayout>
         </android.support.v4.widget.NestedScrollView>
     </android.support.design.widget.CoordinatorLayout>
+
     <View
         android:id="@+id/status_height_view"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/status_bar_height"/>
+        android:layout_height="@dimen/status_bar_height" />
+
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="?attr/actionBarSize"
         android:layout_below="@+id/status_height_view">
+
         <View
             android:id="@+id/new_about_us_bar"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:visibility="invisible"
-            android:background="@color/white_F9F9F9"/>
-        <include layout="@layout/title_bottom_line"
+            android:background="@color/white_F9F9F9"
+            android:visibility="invisible" />
+
+        <include
+            layout="@layout/title_bottom_line"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:visibility="invisible"
-            android:layout_alignParentBottom="true"/>
+            android:layout_alignParentBottom="true"
+            android:visibility="invisible" />
+
         <ImageView
             android:id="@+id/img_baseactivity_title"
             android:layout_width="wrap_content"
             android:layout_height="?attr/actionBarSize"
             android:foreground="@drawable/selector_forground_circle_white"
-            tools:ignore="UnusedAttribute"
+            android:gravity="center_vertical"
             android:paddingStart="@dimen/content_padding_20"
             android:paddingEnd="@dimen/content_padding_20"
-            android:gravity="center_vertical"
             android:scaleType="centerInside"
-            android:src="@drawable/level_list_back" />
+            android:src="@drawable/level_list_back"
+            tools:ignore="UnusedAttribute" />
 
         <TextView
             android:id="@+id/txt_baseactivity_title"
@@ -255,7 +237,7 @@
             android:gravity="center"
             android:text="@string/app_name"
             android:textColor="@color/black_text_deep"
-            android:visibility="invisible"
-            android:textSize="@dimen/text_size_4" />
+            android:textSize="@dimen/text_size_4"
+            android:visibility="invisible" />
     </RelativeLayout>
 </RelativeLayout>

ファイルの差分が大きいため隠しています
+ 1 - 1
app/src/main/res/values/strings.xml


+ 2 - 2
gradle.properties

@@ -17,8 +17,8 @@
 # org.gradle.parallel=true
 #android.injected.build.model.only.versioned = 3
 
-VERSION_NAME=3.9.0
-VERSION_CODE=3009000
+VERSION_NAME=3.9.1
+VERSION_CODE=3009001
 ANDROID_COMPILE_SDK_VERSION=30
 ANDROID_MIN_SDK_VERSION=19
 ANDORID_TARGET_SDK_VERSION=28