瀏覽代碼

1.服务套餐页面去掉套餐类型选项

王鹏鹏 2 年之前
父節點
當前提交
0e550383d9

+ 1 - 0
.idea/gradle.xml

@@ -14,6 +14,7 @@
             <option value="$PROJECT_DIR$/app" />
             <option value="$PROJECT_DIR$/baselib" />
             <option value="$PROJECT_DIR$/common" />
+            <option value="$PROJECT_DIR$/evaluation" />
             <option value="$PROJECT_DIR$/game" />
             <option value="$PROJECT_DIR$/healthconsultation" />
             <option value="$PROJECT_DIR$/home" />

+ 1 - 0
evaluation/.gitignore

@@ -0,0 +1 @@
+/build

+ 25 - 0
evaluation/build.gradle

@@ -0,0 +1,25 @@
+apply from: "../module.build.gradle"
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-kapt'
+
+android {
+
+    defaultConfig {
+        // 如果是独立模块,则使用当前组件的包名
+        if (singleModule.toBoolean()) {
+            applicationId "com.yingyangfly.evaluation"
+        }
+    }
+    // 统一资源前缀,规范资源引用
+    resourcePrefix "game_"
+}
+
+dependencies {
+    implementation project(path: ':baselib')
+    api fileTree(exclude: '*.bak', dir: 'libs')
+    implementation(rootProject.ext.androidx.kotlin_lib)
+    implementation(rootProject.ext.androidx.kotlin_core)
+    implementation(rootProject.ext.androidx.appcompat)
+    implementation(rootProject.ext.androidx.material)
+    implementation(rootProject.ext.androidx.constraintlayout)
+}

+ 0 - 0
evaluation/consumer-rules.pro


+ 21 - 0
evaluation/proguard-rules.pro

@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 4 - 0
evaluation/src/main/AndroidManifest.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest package="com.yingyangfly.evaluation">
+
+</manifest>

+ 10 - 0
evaluation/src/main/manifest/AndroidManifest.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest package="com.yingyangfly.evaluation">
+
+
+    <application>
+
+
+    </application>
+
+</manifest>

+ 1 - 0
settings.gradle

@@ -18,3 +18,4 @@ include ':timcommon'
 include ':tuicore'
 include ':imageselector'
 include ':game'
+include ':evaluation'

+ 4 - 44
workbenches/src/main/java/com/yingyang/workbenches/servicepackage/ServicePackageActivity.kt

@@ -8,11 +8,9 @@ import androidx.recyclerview.widget.GridLayoutManager
 import com.alibaba.android.arouter.facade.annotation.Route
 import com.yingyang.workbenches.R
 import com.yingyang.workbenches.adapter.ServicePackageListAdapter
-import com.yingyang.workbenches.adapter.ServicePackageTypeAdapter
 import com.yingyang.workbenches.databinding.ActivityServicePackageBinding
 import com.yingyang.workbenches.dialog.PurchaseServicesDialog
 import com.yingyang.workbenches.entity.PackageInfoBean
-import com.yingyang.workbenches.entity.TrainTypeBean
 import com.yingyangfly.baselib.ext.getEndAnimation
 import com.yingyangfly.baselib.ext.getScaleAnimation
 import com.yingyangfly.baselib.ext.toast
@@ -28,14 +26,6 @@ class ServicePackageActivity :
     BaseMVVMActivity<ActivityServicePackageBinding, ServicePackageViewModel>(),
     View.OnTouchListener {
 
-    /**
-     * 服务套餐类型
-     */
-    private var servicePackageTypeGridLayoutManager: GridLayoutManager? = null
-    private var servicePackageTypeList = mutableListOf<TrainTypeBean>()
-    private val servicePackageTypeAdapter by lazy { ServicePackageTypeAdapter() }
-    private var packageType = ""
-
     /**
      * 服务套餐列表
      */
@@ -45,10 +35,6 @@ class ServicePackageActivity :
 
     override fun initViews() {
         binding {
-            servicePackageTypeGridLayoutManager = GridLayoutManager(this@ServicePackageActivity, 2)
-            rvType.layoutManager = servicePackageTypeGridLayoutManager
-            rvType.adapter = servicePackageTypeAdapter
-
             gridLayoutManager = GridLayoutManager(this@ServicePackageActivity, 3)
             rvTrainingPackage.layoutManager = gridLayoutManager
             rvTrainingPackage.adapter = servicePackageListAdapter
@@ -71,35 +57,7 @@ class ServicePackageActivity :
     }
 
     override fun initData() {
-        servicePackageTypeAdapter.onServicePackageTypeClickListener = {
-            packageType = it.dictValue
-            servicePackageListAdapter.clearData()
-            getServicePackageList()
-        }
-        getSelectByDictType()
-    }
-
-    /**
-     * 获取服务套餐类型列表
-     */
-    private fun getSelectByDictType() {
-        viewModel.getSelectByDictType(fail = {
-            it.toast()
-        }, success = {
-            runOnUiThread {
-                servicePackageTypeList.clear()
-                if (it.isNullOrEmpty().not()) {
-                    servicePackageTypeList.addAll(it!!)
-                    servicePackageTypeGridLayoutManager?.spanCount = it.size
-                    servicePackageTypeAdapter.setData(servicePackageTypeList)
-                    packageType = servicePackageTypeList[0].dictValue
-                    getServicePackageList()
-                } else {
-                    gridLayoutManager?.spanCount = 1
-                    servicePackageListAdapter.showEmptyView = servicePackageList.isEmpty()
-                }
-            }
-        })
+        getServicePackageList()
     }
 
     /**
@@ -107,7 +65,7 @@ class ServicePackageActivity :
      */
     private fun getServicePackageList() {
         servicePackageList.clear()
-        viewModel.getServicePackageList(packageType, fail = {
+        viewModel.getServicePackageList("", fail = {
             if (TextUtils.isEmpty(it).not()) {
                 it.toast()
             }
@@ -132,6 +90,7 @@ class ServicePackageActivity :
                     v.startAnimation(getScaleAnimation())
                 }
             }
+
             MotionEvent.ACTION_UP -> {
                 v.startAnimation(getEndAnimation())
                 if (v.id == R.id.layoutHead) {
@@ -142,6 +101,7 @@ class ServicePackageActivity :
                     JumpUtil.jumpActivity(RouterUrlCommon.orderList, mContext)
                 }
             }
+
             MotionEvent.ACTION_CANCEL -> {
                 if (v.id == R.id.layoutHead || v.id == R.id.tvOrderList) {
                     v.startAnimation(getEndAnimation())

+ 0 - 18
workbenches/src/main/res/layout/activity_service_package.xml

@@ -69,24 +69,6 @@
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@+id/titleLayout">
 
-            <com.google.android.material.card.MaterialCardView
-                android:layout_width="wrap_content"
-                android:layout_height="@dimen/divider_55px"
-                android:layout_gravity="center_horizontal"
-                android:layout_marginTop="@dimen/divider_26px"
-                android:theme="@style/Theme.MaterialComponents.NoActionBar"
-                app:cardCornerRadius="@dimen/divider_20px"
-                app:strokeColor="@color/color_FF4974FF"
-                app:strokeWidth="@dimen/divider_2px">
-
-                <androidx.recyclerview.widget.RecyclerView
-                    android:id="@+id/rvType"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent"
-                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
-
-            </com.google.android.material.card.MaterialCardView>
-
             <androidx.recyclerview.widget.RecyclerView
                 android:id="@+id/rvTrainingPackage"
                 style="@style/layout_properties_specify_width_geight"