浏览代码

风险管理7月9日提交代码-liu.bolan-千海金

Liu.bolan 4 年之前
父节点
当前提交
a11837da23
共有 28 个文件被更改,包括 1353 次插入29 次删除
  1. 3 3
      RMA/app/build.gradle
  2. 10 0
      RMA/app/src/main/AndroidManifest.xml
  3. 27 0
      RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt
  4. 7 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/GlobalDataCollection.kt
  5. 93 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ScoreLogData.kt
  6. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/netManage/utils/MyOkHttpUtils.kt
  7. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/netManage/utils/UpLoadUtils.java
  8. 4 3
      RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/CustomView.kt
  9. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  10. 17 18
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/future/trade/GoodsTradeActivity.kt
  11. 2 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/LoginActivity.kt
  12. 3 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/register/RegisterViewModel.kt
  13. 6 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/PaySuccessActivity.kt
  14. 4 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/PayViewModel.kt
  15. 191 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/SeaKingMainFragment.kt
  16. 77 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/integral/IntegralViewHolder.kt
  17. 216 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/integral/MyIntegralActivity.kt
  18. 46 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/integral/MyIntegralViewModel.kt
  19. 243 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/MyRewardActivity.kt
  20. 46 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/MyRewardViewModel.kt
  21. 238 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/RewardRuleActivity.kt
  22. 99 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/RewardViewHolder.kt
  23. 10 0
      RMA/app/src/main/res/layout/marqueeview.xml
  24. 二进制
      RMA/app/src/main/res/mipmap-xhdpi/my_integral_icon.png
  25. 二进制
      RMA/app/src/main/res/mipmap-xhdpi/my_reward_icon.png
  26. 二进制
      RMA/app/src/main/res/mipmap-xhdpi/my_team_icon.png
  27. 二进制
      RMA/app/src/main/res/mipmap-xhdpi/qhj_tanhao_icon.png
  28. 2 0
      RMA/app/src/main/res/values/colors.xml

+ 3 - 3
RMA/app/build.gradle

@@ -19,8 +19,8 @@ android {
         applicationId "cn.muchinfo.rma"
         applicationId "cn.muchinfo.rma"
         minSdkVersion 24
         minSdkVersion 24
         targetSdkVersion 30
         targetSdkVersion 30
-        versionCode 50012
-        versionName "5.0.12"
+        versionCode 50013
+        versionName "5.0.13"
         multiDexEnabled true
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         //指定room.schemaLocation生成的文件路径
         //指定room.schemaLocation生成的文件路径
@@ -183,7 +183,7 @@ dependencies {
     implementation 'com.github.AAChartModel:AAChartCore-Kotlin:-SNAPSHOT'
     implementation 'com.github.AAChartModel:AAChartCore-Kotlin:-SNAPSHOT'
     implementation 'q.rorbin:badgeview:1.1.3'
     implementation 'q.rorbin:badgeview:1.1.3'
     api 'com.luozm.captcha:captcha:1.1.2'
     api 'com.luozm.captcha:captcha:1.1.2'
-
+    compile 'com.sunfusheng:marqueeview:1.3.3'
     implementation 'com.google.zxing:core:3.3.0'
     implementation 'com.google.zxing:core:3.3.0'
 
 
     compile 'com.cuieney:rxpay-api:2.2.3'
     compile 'com.cuieney:rxpay-api:2.2.3'

+ 10 - 0
RMA/app/src/main/AndroidManifest.xml

@@ -2,6 +2,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="cn.muchinfo.rma">
     package="cn.muchinfo.rma">
 
 
+    <uses-permission android:name="android.permission.CALL_PHONE" />
+    <uses-permission android:name="android.permission.CALL_PHONE" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
@@ -354,6 +356,14 @@
 
 
         <activity android:name=".view.base.platinumtreasure.trade.DealDetailsActivity"/>
         <activity android:name=".view.base.platinumtreasure.trade.DealDetailsActivity"/>
 
 
+        <activity android:name=".view.base.main.reward.MyRewardActivity"/>
+
+        <activity android:name=".view.base.main.team.MyTeamActivity"/>
+
+        <activity android:name=".view.base.main.integral.MyIntegralActivity"/>
+
+        <activity android:name=".view.base.main.reward.RewardRuleActivity"/>
+
     </application>
     </application>
 
 
 </manifest>
 </manifest>

+ 27 - 0
RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt

@@ -1149,4 +1149,31 @@ class AccountManager {
     }
     }
 
 
 
 
+    /**
+     * 查询我的订单
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BankInfoData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryScoreLog(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<ScoreLogData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Qhj/QueryScoreLog",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<ScoreLogData>>>() {
+                override fun onResponse(response: BaseResult<List<ScoreLogData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+
 }
 }

+ 7 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/GlobalDataCollection.kt

@@ -1,7 +1,6 @@
 package cn.muchinfo.rma.global
 package cn.muchinfo.rma.global
 
 
 import cn.muchinfo.rma.global.data.AccountData
 import cn.muchinfo.rma.global.data.AccountData
-import cn.muchinfo.rma.global.data.QuoteDayData
 import cn.muchinfo.rma.global.data.database.EnumDicEntity
 import cn.muchinfo.rma.global.data.database.EnumDicEntity
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.app.Constant
 import com.blankj.utilcode.util.SPUtils
 import com.blankj.utilcode.util.SPUtils
@@ -155,6 +154,13 @@ class GlobalDataCollection : BaseGlobalData() {
     }
     }
 
 
     /**
     /**
+     * 清空所有数据
+     */
+    fun clean() {
+        instance = null
+    }
+
+    /**
      * 七天时间差
      * 七天时间差
      *
      *
      * @return
      * @return

+ 93 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/data/ScoreLogData.kt

@@ -0,0 +1,93 @@
+package cn.muchinfo.rma.global.data
+
+import android.os.Parcel
+import android.os.Parcelable
+import com.google.gson.annotations.SerializedName
+
+/**
+ * 我的积分
+ */
+data class ScoreLogData(
+    @SerializedName("accountid")
+    val accountid : String? = "",//账户ID
+    @SerializedName("createtime")
+    val createtime : String? = "",//创建时间(时间)
+    @SerializedName("goodsid")
+    val goodsid : String? = "",//商品ID
+    @SerializedName("hasuploaded")
+    val hasuploaded : String? = "",//是否已同步(千海金) 0:未同步 1;已同步
+    @SerializedName("logid")
+    val logid : String? = "",//流水ID(211+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+    @SerializedName("marketid")
+    val marketid : String? = "",//市场ID
+    @SerializedName("relatedamount")
+    val relatedamount : String? = "",//关联金额
+    @SerializedName("relatedorderid")
+    val relatedorderid : String? = "",//关联单号(ScoreType=1为Trade_GoodsPickup)
+    @SerializedName("scoreconfigvalue1")
+    val scoreconfigvalue1 : String? = "",//积分配置1
+    @SerializedName("scoreconfigvalue2")
+    val scoreconfigvalue2 : String? = "",//积分配置2
+    @SerializedName("scoretype")
+    val scoretype : String? = "",//积分类型 - 1:提货积分
+    @SerializedName("scorevalue")
+    val scorevalue : String? = "",//积分
+    @SerializedName("tradedate")
+    val tradedate : String? = "",//交易日(yyyyMMdd)
+    @SerializedName("uploadedtime")
+    val uploadedtime : String? = "",//同步时间
+    @SerializedName("userid")
+    val userid : String? = ""//用户ID
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(accountid)
+        parcel.writeString(createtime)
+        parcel.writeString(goodsid)
+        parcel.writeString(hasuploaded)
+        parcel.writeString(logid)
+        parcel.writeString(marketid)
+        parcel.writeString(relatedamount)
+        parcel.writeString(relatedorderid)
+        parcel.writeString(scoreconfigvalue1)
+        parcel.writeString(scoreconfigvalue2)
+        parcel.writeString(scoretype)
+        parcel.writeString(scorevalue)
+        parcel.writeString(tradedate)
+        parcel.writeString(uploadedtime)
+        parcel.writeString(userid)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<ScoreLogData> {
+        override fun createFromParcel(parcel: Parcel): ScoreLogData {
+            return ScoreLogData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<ScoreLogData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

+ 3 - 0
RMA/app/src/main/java/cn/muchinfo/rma/netManage/utils/MyOkHttpUtils.kt

@@ -51,6 +51,9 @@ class MyOkHttpUtils {
         type: String,
         type: String,
         callback: ResponseCallback<*>
         callback: ResponseCallback<*>
     ) {
     ) {
+        if (URL.isNullOrEmpty()){
+            return
+        }
         if (!(URL.contains("http") || URL.contains("https"))) { // Expected URL scheme 'http' or 'https' but no colon was found
         if (!(URL.contains("http") || URL.contains("https"))) { // Expected URL scheme 'http' or 'https' but no colon was found
             LogUtils.e("Expected URL scheme 'http' or 'https' but no colon was found")
             LogUtils.e("Expected URL scheme 'http' or 'https' but no colon was found")
             return
             return

+ 4 - 0
RMA/app/src/main/java/cn/muchinfo/rma/netManage/utils/UpLoadUtils.java

@@ -41,6 +41,10 @@ public class UpLoadUtils {
         this.callback = callback;
         this.callback = callback;
         this.URL = URL;
         this.URL = URL;
 
 
+        if (!URL.startsWith("http") || URL.isEmpty()){
+            return;
+        }
+
         Log.e(TAG, "压缩前" + FileSizeUtil.getAutoFileOrFilesSize(file.getPath()));
         Log.e(TAG, "压缩前" + FileSizeUtil.getAutoFileOrFilesSize(file.getPath()));
         maxSize = 1000;
         maxSize = 1000;
 
 

+ 4 - 3
RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/CustomView.kt

@@ -29,6 +29,7 @@ import com.qmuiteam.qmui.widget.*
 import com.qmuiteam.qmui.widget.grouplist.QMUIGroupListView
 import com.qmuiteam.qmui.widget.grouplist.QMUIGroupListView
 import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
 import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
 import com.qmuiteam.qmui.widget.tab.QMUITabSegment
 import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import com.sunfusheng.marqueeview.MarqueeView
 import mtp.polymer.com.autowidget.recyclerview.NoAlphaItemAnimator
 import mtp.polymer.com.autowidget.recyclerview.NoAlphaItemAnimator
 
 
 
 
@@ -216,9 +217,9 @@ inline fun ViewManager.nestedScrollview(init: (@AnkoViewDslMarker NestedScrollVi
 //    return ankoView({ ctx: Context -> MoneyEditText(ctx) }, theme = 0) { init() }
 //    return ankoView({ ctx: Context -> MoneyEditText(ctx) }, theme = 0) { init() }
 //}
 //}
 
 
-//inline fun ViewManager.linePathView(): LinePathView = linePathView {}
-//inline fun ViewManager.linePathView(init: (@AnkoViewDslMarker LinePathView).() -> Unit): LinePathView {
-//    return ankoView({ ctx: Context -> LinePathView(ctx) }, theme = 0) { init() }
+//inline fun ViewManager.marqueeView(): MarqueeView = marqueeView {}
+//inline fun ViewManager.marqueeView(init: (@AnkoViewDslMarker MarqueeView).() -> Unit): MarqueeView {
+//    return ankoView({ ctx: Context -> MarqueeView(ctx,null) }, theme = 0) { init() }
 //}
 //}
 
 
 inline fun ViewManager.appBarLayout(): QMUIAppBarLayout = appBarLayout { }
 inline fun ViewManager.appBarLayout(): QMUIAppBarLayout = appBarLayout { }

+ 2 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt

@@ -6,7 +6,7 @@ object Constant {
     /**
     /**
      * 获取基础url的接口
      * 获取基础url的接口
      */
      */
-//    const val baseurl = "http://103.40.249.123:8280/cfg?key=mtp_20"//千海金外盘
+    const val baseurl = "http://103.40.249.123:8280/cfg?key=mtp_20"//千海金外盘
 //    const val baseurl = "http://103.40.249.127:28280/cfg?key=mtp_20"
 //    const val baseurl = "http://103.40.249.127:28280/cfg?key=mtp_20"
 //    const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"
 //    const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"
 //    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
 //    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
@@ -19,7 +19,7 @@ object Constant {
 //    const val baseurl = "http://192.168.31.174:8080/cfg?key=test_174"// 邓工
 //    const val baseurl = "http://192.168.31.174:8080/cfg?key=test_174"// 邓工
 
 
 //     const val baseurl = "http://192.168.31.176:8080/cfg?key=test_176" // 9999  123123  黄老板千海金
 //     const val baseurl = "http://192.168.31.176:8080/cfg?key=test_176" // 9999  123123  黄老板千海金
-    const val baseurl = "http://192.168.31.171:8080/cfg?key=test_171" // 邓工 签约解约环境
+//    const val baseurl = "http://192.168.31.171:8080/cfg?key=test_171" // 邓工 签约解约环境
 //    const val baseurl = "http://192.168.21.71:8280/cfg?key=mtp_20"
 //    const val baseurl = "http://192.168.21.71:8280/cfg?key=mtp_20"
 
 
     /**
     /**

+ 17 - 18
RMA/app/src/main/java/cn/muchinfo/rma/view/base/future/trade/GoodsTradeActivity.kt

@@ -792,10 +792,9 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                                             //行情变化后根据不同的价格类型分别对赋值
                                             //行情变化后根据不同的价格类型分别对赋值
                                             viewModel.quoteDayData.bindOptional(context) {
                                             viewModel.quoteDayData.bindOptional(context) {
                                                 if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Last) {//最新价
                                                 if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Last) {//最新价
-                                                    setText(it?.last.toString())
-
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.last.toString()),2))
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/买多取卖一价
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/买多取卖一价
-                                                    setText(it?.ask.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.ask.toString()),2))
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价1/买多取卖一价(参照ios)
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价1/买多取卖一价(参照ios)
                                                     setText(setExceedPrice(it?.ask ?:0.0,0))
                                                     setText(setExceedPrice(it?.ask ?:0.0,0))
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价--限价只需要在选择限价时赋值,其他行情推送不赋值
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价--限价只需要在选择限价时赋值,其他行情推送不赋值
@@ -806,14 +805,14 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                                             viewModel.priceOrderType.bindOptional(context) {
                                             viewModel.priceOrderType.bindOptional(context) {
                                                 val quoteData = viewModel.quoteDayData.value
                                                 val quoteData = viewModel.quoteDayData.value
                                                 if (it == FutureConstent.eOrderPriceSelectType_Last) {//最新价
                                                 if (it == FutureConstent.eOrderPriceSelectType_Last) {//最新价
-                                                    setText(quoteData?.last.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.last.toString()),2))
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/买多取卖一价
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/买多取卖一价
-                                                    setText(quoteData?.ask.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.ask.toString()),2))
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价/买多取卖一价(参照ios)
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价/买多取卖一价(参照ios)
 //                                                    setText(quoteData?.ask.toString())
 //                                                    setText(quoteData?.ask.toString())
                                                     setText(setExceedPrice(quoteData?.ask ?:0.0,0))
                                                     setText(setExceedPrice(quoteData?.ask ?:0.0,0))
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价
-                                                    setText(quoteData?.last.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.last.toString()),2))
                                                 }
                                                 }
                                             }
                                             }
                                             textSizeAuto = 38
                                             textSizeAuto = 38
@@ -873,9 +872,9 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                                             //行情变化后根据不同的价格类型分别对赋值
                                             //行情变化后根据不同的价格类型分别对赋值
                                             viewModel.quoteDayData.bindOptional(context) {
                                             viewModel.quoteDayData.bindOptional(context) {
                                                 if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Last) {//最新价
                                                 if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Last) {//最新价
-                                                    setText(it?.last.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.last.toString()),2))
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
-                                                    setText(it?.ask.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.ask.toString()),2))
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价1/卖多取买一价(参照ios)
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价1/卖多取买一价(参照ios)
                                                     setText(setExceedPrice(it?.bid ?: 0.0,1))
                                                     setText(setExceedPrice(it?.bid ?: 0.0,1))
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价--限价只需要在选择限价时赋值,其他行情推送不赋值
                                                 } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价--限价只需要在选择限价时赋值,其他行情推送不赋值
@@ -886,14 +885,14 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                                             viewModel.priceOrderType.bindOptional(context) {
                                             viewModel.priceOrderType.bindOptional(context) {
                                                 val quoteData = viewModel.quoteDayData.value
                                                 val quoteData = viewModel.quoteDayData.value
                                                 if (it == FutureConstent.eOrderPriceSelectType_Last) {//最新价
                                                 if (it == FutureConstent.eOrderPriceSelectType_Last) {//最新价
-                                                    setText(quoteData?.last.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.last.toString()),2))
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
-                                                    setText(quoteData?.bid.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.bid.toString()),2))
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价/卖多取买一价(参照ios)
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价/卖多取买一价(参照ios)
                                                     setText(setExceedPrice(quoteData?.bid ?:0.0,1))
                                                     setText(setExceedPrice(quoteData?.bid ?:0.0,1))
 
 
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价
                                                 } else if (it == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价
-                                                    setText(quoteData?.last.toString())
+                                                    setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.last.toString()),2))
                                                 }
                                                 }
                                             }
                                             }
                                             textSizeAuto = 38
                                             textSizeAuto = 38
@@ -952,12 +951,12 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                                                     text = "优先平今"
                                                     text = "优先平今"
                                                 } else {
                                                 } else {
                                                     if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Last) {//最新价
                                                     if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Last) {//最新价
-                                                        setText(it?.last.toString())
+                                                        setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.last.toString()),2))
 
 
                                                     } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
                                                     } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
-                                                        setText(it?.ask.toString())
+                                                        setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.ask.toString()),2))
                                                     } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价1/卖多取买一价(参照ios)
                                                     } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价1/卖多取买一价(参照ios)
-                                                        setText(it?.ask.toString())
+                                                        setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(it?.ask.toString()),2))
                                                     } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价--限价只需要在选择限价时赋值,其他行情推送不赋值
                                                     } else if (viewModel.priceOrderType.value == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价--限价只需要在选择限价时赋值,其他行情推送不赋值
 //                                                    setText(it?.last.toString())
 //                                                    setText(it?.last.toString())
                                                     }
                                                     }
@@ -971,13 +970,13 @@ class GoodsTradeActivity : BaseActivity<GoodsTradeViewModel>() {
                                                 } else {
                                                 } else {
                                                     val quoteData = viewModel.quoteDayData.value
                                                     val quoteData = viewModel.quoteDayData.value
                                                     if (it == FutureConstent.eOrderPriceSelectType_Last) {//最新价
                                                     if (it == FutureConstent.eOrderPriceSelectType_Last) {//最新价
-                                                        setText(quoteData?.last.toString())
+                                                        setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.last.toString()),2))
                                                     } else if (it == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
                                                     } else if (it == FutureConstent.eOrderPriceSelectType_Opposite) {//对手价/卖多取买一价
-                                                        setText(quoteData?.bid.toString())
+                                                        setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.bid.toString()),2))
                                                     } else if (it == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价/卖多取买一价(参照ios)
                                                     } else if (it == FutureConstent.eOrderPriceSelectType_OppositeOne) {//超价/卖多取买一价(参照ios)
-                                                        setText(quoteData?.bid.toString())
+                                                        setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.bid.toString()),2))
                                                     } else if (it == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价
                                                     } else if (it == FutureConstent.eOrderPriceSelectType_BidPrice) {//指定价就是限价
-                                                        setText(quoteData?.last.toString())
+                                                        setText(NumberUtils.roundNum(NumberUtils.doubleDistortion(quoteData?.last.toString()),2))
                                                     }
                                                     }
                                                 }
                                                 }
                                             }
                                             }

+ 2 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/LoginActivity.kt

@@ -328,6 +328,8 @@ class LoginActivity : BaseActivity<LoginViewModel>(), UserPopupWindow.OnClearAcc
                     ToastUtils.showLong("当前版本低于服务器版本,请更新后登陆")
                     ToastUtils.showLong("当前版本低于服务器版本,请更新后登陆")
                     return@onClick
                     return@onClick
                 }
                 }
+
+                GlobalDataCollection.instance?.clean()
                 // 开始登录
                 // 开始登录
                 login()
                 login()
             }
             }

+ 3 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/register/RegisterViewModel.kt

@@ -68,6 +68,9 @@ class RegisterViewModel : BaseViewModel(){
     fun getVerificationCode(){
     fun getVerificationCode(){
         val timesMills = TimeUtils.getNowMills().toString()
         val timesMills = TimeUtils.getNowMills().toString()
         timeMills.postValue(timesMills)
         timeMills.postValue(timesMills)
+        if (SPUtils.getInstance().getString(Constant.openApiUrl).isNullOrEmpty()){
+            return
+        }
         OkHttpUtils.get()
         OkHttpUtils.get()
             .url(SPUtils.getInstance().getString(Constant.openApiUrl) + "/verifycode/vcode")
             .url(SPUtils.getInstance().getString(Constant.openApiUrl) + "/verifycode/vcode")
             .addParams("type","0")
             .addParams("type","0")

+ 6 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/PaySuccessActivity.kt

@@ -1,5 +1,6 @@
 package cn.muchinfo.rma.view.base.main
 package cn.muchinfo.rma.view.base.main
 
 
+import android.content.Intent
 import android.os.Bundle
 import android.os.Bundle
 import android.view.Gravity
 import android.view.Gravity
 import android.view.View
 import android.view.View
@@ -8,6 +9,8 @@ import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.app.Constant
 import cn.muchinfo.rma.view.base.home.contract.emptyView
 import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.main.withdrawmanagement.WithDrawLogActivity
+import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.SPUtils
 import com.blankj.utilcode.util.SPUtils
 import org.jetbrains.anko.*
 import org.jetbrains.anko.*
 
 
@@ -103,8 +106,9 @@ class PaySuccessActivity : BaseActivity<PayViewModel>(){
 
 
                     textView {
                     textView {
                         onThrottleFirstClick {
                         onThrottleFirstClick {
-                            SPUtils.getInstance().put(Constant.pay_status,"4")
-                            finish()
+                            val intent = Intent()
+                            intent.setClass(context, WithDrawLogActivity::class.java)
+                            ActivityUtils.startActivity(intent)
                         }
                         }
                         backgroundResource = R.drawable.qhj_main_blue_bg
                         backgroundResource = R.drawable.qhj_main_blue_bg
                         gravity = Gravity.CENTER
                         gravity = Gravity.CENTER

+ 4 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/PayViewModel.kt

@@ -124,6 +124,10 @@ class PayViewModel : BaseViewModel(){
         }else{
         }else{
             url = SPUtils.getInstance().getString(Constant.otherPayUrl) + "/pay"
             url = SPUtils.getInstance().getString(Constant.otherPayUrl) + "/pay"
         }
         }
+
+        if (url.startsWith("http").not()){
+            return
+        }
         val json = com.alibaba.fastjson.JSONObject()
         val json = com.alibaba.fastjson.JSONObject()
         json["accountName"] = GlobalDataCollection.instance?.accountData?.accountid
         json["accountName"] = GlobalDataCollection.instance?.accountData?.accountid
         json["accountId"] = GlobalDataCollection.instance?.accountData?.accountid
         json["accountId"] = GlobalDataCollection.instance?.accountData?.accountid

+ 191 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/SeaKingMainFragment.kt

@@ -1,11 +1,14 @@
 package cn.muchinfo.rma.view.base.main
 package cn.muchinfo.rma.view.base.main
 
 
+import android.Manifest
 import android.content.Intent
 import android.content.Intent
+import android.content.pm.PackageManager
 import android.os.Bundle
 import android.os.Bundle
 import android.view.Gravity
 import android.view.Gravity
 import android.view.LayoutInflater
 import android.view.LayoutInflater
 import android.view.View
 import android.view.View
 import android.view.ViewGroup
 import android.view.ViewGroup
+import androidx.core.app.ActivityCompat
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.R
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.data.BankAccountSignData
 import cn.muchinfo.rma.global.data.BankAccountSignData
@@ -24,6 +27,7 @@ import cn.muchinfo.rma.view.base.main.addressmanagement.MyAddressManagementActiv
 import cn.muchinfo.rma.view.base.main.castsurely.MyCastSurelyActivity
 import cn.muchinfo.rma.view.base.main.castsurely.MyCastSurelyActivity
 import cn.muchinfo.rma.view.base.main.pickup.PickUpGoodsSearchActivity
 import cn.muchinfo.rma.view.base.main.pickup.PickUpGoodsSearchActivity
 import cn.muchinfo.rma.view.base.main.promotioncode.MyPromotionCodeActivity
 import cn.muchinfo.rma.view.base.main.promotioncode.MyPromotionCodeActivity
+import cn.muchinfo.rma.view.base.main.team.MyTeamActivity
 import cn.muchinfo.rma.view.base.main.withdrawmanagement.WithDrawManagementActivity
 import cn.muchinfo.rma.view.base.main.withdrawmanagement.WithDrawManagementActivity
 import cn.muchinfo.rma.view.base.main.withdrawmanagement.WithdrawalActivity
 import cn.muchinfo.rma.view.base.main.withdrawmanagement.WithdrawalActivity
 import cn.muchinfo.rma.view.base.platinumtreasure.activity.PlatinumCancellationsActivity
 import cn.muchinfo.rma.view.base.platinumtreasure.activity.PlatinumCancellationsActivity
@@ -35,6 +39,7 @@ import cn.muchinfo.rma.view.eventbus.MessageEvent
 import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
 import cn.muchinfo.rma.view.eventbus.QuoteMessageEvent
 import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.ActivityUtils
 import com.blankj.utilcode.util.LogUtils
 import com.blankj.utilcode.util.LogUtils
+import com.blankj.utilcode.util.PhoneUtils
 import com.blankj.utilcode.util.ToastUtils
 import com.blankj.utilcode.util.ToastUtils
 
 
 import com.qmuiteam.qmui.kotlin.matchParent
 import com.qmuiteam.qmui.kotlin.matchParent
@@ -543,6 +548,106 @@ class SeaKingMainFragment : BaseFragment<SeaKingMainViewModel>() {
                         itemView()
                         itemView()
 
 
                         linearLayout {
                         linearLayout {
+                            visibility = View.GONE
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(context, MyTeamActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }
+                            imageView {
+                                imageResource = R.mipmap.my_team_icon
+                            }.lparams(autoSize(50), autoSize(50)) {
+                                marginStart = autoSize(60)
+                            }
+
+                            textView {
+                                text = "我的团队"
+                                textSizeAuto = 36
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(29)
+                            }
+
+                            emptyView()
+
+                            textView {
+                                visibility = View.GONE
+                                text = "99"
+                                textColorInt = R.color.p_global_write_color
+                                textSizeAuto = 15
+                                setPadding(
+                                    autoSize(10),
+                                    autoSize(6),
+                                    autoSize(10),
+                                    autoSize(6)
+                                )
+                                backgroundDrawable =
+                                    createRoundRectDrawable("#FFA127", 45)
+                            }.lparams(wrapContent, wrapContent) {
+                                marginEnd = autoSize(20)
+                            }
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(40), autoSize(40)) {
+                                marginEnd = autoSize(49)
+                            }
+                        }.lparams(matchParent, autoSize(140))
+
+                        itemView()
+
+                        linearLayout {
+                            visibility = View.GONE
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(context, MyTeamActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }
+                            imageView {
+                                imageResource = R.mipmap.my_reward_icon
+                            }.lparams(autoSize(50), autoSize(50)) {
+                                marginStart = autoSize(60)
+                            }
+
+                            textView {
+                                text = "我的奖励"
+                                textSizeAuto = 36
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(29)
+                            }
+
+                            emptyView()
+
+                            textView {
+                                visibility = View.GONE
+                                text = "99"
+                                textColorInt = R.color.p_global_write_color
+                                textSizeAuto = 15
+                                setPadding(
+                                    autoSize(10),
+                                    autoSize(6),
+                                    autoSize(10),
+                                    autoSize(6)
+                                )
+                                backgroundDrawable =
+                                    createRoundRectDrawable("#FFA127", 45)
+                            }.lparams(wrapContent, wrapContent) {
+                                marginEnd = autoSize(20)
+                            }
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(40), autoSize(40)) {
+                                marginEnd = autoSize(49)
+                            }
+                        }.lparams(matchParent, autoSize(140))
+
+                        itemView()
+
+                        linearLayout {
                             onThrottleFirstClick {
                             onThrottleFirstClick {
                                 val intent = Intent()
                                 val intent = Intent()
                                 if (GlobalDataCollection.instance?.bankAccountSignData?.bankid.isNullOrEmpty()) {
                                 if (GlobalDataCollection.instance?.bankAccountSignData?.bankid.isNullOrEmpty()) {
@@ -643,6 +748,92 @@ class SeaKingMainFragment : BaseFragment<SeaKingMainViewModel>() {
                             }
                             }
                         }.lparams(matchParent, autoSize(140))
                         }.lparams(matchParent, autoSize(140))
 
 
+                        itemView()
+
+                        linearLayout {
+                            visibility = View.GONE
+                            gravity = Gravity.CENTER_VERTICAL
+                            onThrottleFirstClick {
+                                val intent = Intent()
+                                intent.setClass(context, MyTeamActivity::class.java)
+                                ActivityUtils.startActivity(intent)
+                            }
+                            imageView {
+                                imageResource = R.mipmap.my_integral_icon
+                            }.lparams(autoSize(50), autoSize(50)) {
+                                marginStart = autoSize(60)
+                            }
+
+                            textView {
+                                text = "我的积分"
+                                textSizeAuto = 36
+                                textColorInt = R.color.rma_black_33
+                            }.lparams(wrapContent, wrapContent) {
+                                marginStart = autoSize(29)
+                            }
+
+                            emptyView()
+
+                            textView {
+                                visibility = View.GONE
+                                text = "99"
+                                textColorInt = R.color.p_global_write_color
+                                textSizeAuto = 15
+                                setPadding(
+                                    autoSize(10),
+                                    autoSize(6),
+                                    autoSize(10),
+                                    autoSize(6)
+                                )
+                                backgroundDrawable =
+                                    createRoundRectDrawable("#FFA127", 45)
+                            }.lparams(wrapContent, wrapContent) {
+                                marginEnd = autoSize(20)
+                            }
+
+                            imageView {
+                                imageResource = R.mipmap.rma_more
+                            }.lparams(autoSize(40), autoSize(40)) {
+                                marginEnd = autoSize(49)
+                            }
+                        }.lparams(matchParent, autoSize(140))
+
+                        linearLayout {
+                            visibility = View.GONE
+                            onThrottleFirstClick {
+                                 if (ActivityCompat.checkSelfPermission(
+                                         context,
+                                         Manifest.permission.CALL_PHONE
+                                     ) != PackageManager.PERMISSION_GRANTED
+                                 ) {
+                                     // TODO: Consider calling
+                                     //    ActivityCompat#requestPermissions
+                                     // here to request the missing permissions, and then overriding
+                                     //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
+                                     //                                          int[] grantResults)
+                                     // to handle the case where the user grants the permission. See the documentation
+                                     // for ActivityCompat#requestPermissions for more details.
+                                     return@onThrottleFirstClick
+                                 }
+                                PhoneUtils.call("0755-36856253")
+                            }
+                            gravity = Gravity.CENTER_VERTICAL
+
+                            emptyView()
+
+                            textView {
+                                text = "如有疑问请联系客服电话"
+                                textSizeAuto = 29
+                                textColorInt = R.color.rma_hint_text_color_ccc
+                            }.lparams(wrapContent, wrapContent)
+
+                            textView {
+                                text = "0755-36856253"
+                                textSizeAuto = 29
+                                textColorStr = "#FFA127"
+                            }.lparams(wrapContent, wrapContent)
+                        }.lparams(matchParent, autoSize(80))
+
                     }.lparams(matchParent, matchParent)
                     }.lparams(matchParent, matchParent)
                 }.lparams(matchParent, matchParent)
                 }.lparams(matchParent, matchParent)
             }
             }

+ 77 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/integral/IntegralViewHolder.kt

@@ -0,0 +1,77 @@
+package cn.muchinfo.rma.view.base.main.integral
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.ScoreLogData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+class IntegralViewHolder(private val activity : AppCompatActivity) : BaseViewHolder<ScoreLogData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.createtime
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(110),4f)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        //提货单号
+                        data.bindOptional(context){
+                            text = it?.logid
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(110),4f)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        //提货金额
+                        data.bindOptional(context){
+                            text = NumberUtils.roundNum(it?.relatedamount,2)
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(110),3f)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        //奖励积分
+                         data.bindOptional(context){
+                            text = it?.scorevalue
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, autoSize(110),3f)
+            }.lparams(matchParent, autoSize(110))
+
+            itemView()
+
+        }.lparams(matchParent, wrapContent)
+    }
+
+}

+ 216 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/integral/MyIntegralActivity.kt

@@ -0,0 +1,216 @@
+package cn.muchinfo.rma.view.base.main.integral
+
+import android.os.Bundle
+import android.view.Gravity
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.BrokerRewardLogData
+import cn.muchinfo.rma.global.data.ScoreLogData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.main.reward.RewardViewHolder
+import com.blankj.utilcode.util.TimeUtils
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.dialog.showDataSelectDialog
+import mtp.polymer.com.autowidget.utils.TaskUiModel
+import org.jetbrains.anko.*
+import java.text.SimpleDateFormat
+
+/**
+ * 我的积分页面
+ */
+class MyIntegralActivity : BaseActivity<MyIntegralViewModel>(){
+
+    val startTime: MutableLiveData<String> = MutableLiveData()//历史委托查询起始日期
+    val endTime: MutableLiveData<String> = MutableLiveData()//历史委托查询结束日期
+
+    /**
+     * 初始化查询起始和结束日期
+     */
+    fun initTime() {
+        startTime.postValue(GlobalDataCollection.instance?.oneMonth() ?: "")
+        endTime.postValue(TimeUtils.getNowString(SimpleDateFormat("yyyy-MM-dd")))
+    }
+
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+
+    //我的奖励viewholder
+    private val integralAdapter: BaseAdapter<ScoreLogData, IntegralViewHolder> =
+        BaseAdapter { _, _ -> IntegralViewHolder(this) }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            initTime()
+            viewModel.queryIntegral()
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            //页面标题
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "我的积分"
+                }
+            }
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                //起始日期选择
+                linearLayout {
+                    onThrottleFirstClick {
+                        showDataSelectDialog {
+                            startTime.postValue(this)
+                        }
+                    }
+                    backgroundResource = R.drawable.rma_time_click_bg
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        startTime.bindOptional(context) {
+                            text = it
+                        }
+                        text = "起始日期"
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(18)
+                    }
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_search_by_time
+                    }.lparams(autoSize(38), autoSize(38)) {
+                        marginEnd = autoSize(20)
+                    }
+
+                }.lparams(autoSize(324), autoSize(67)) {
+                    marginStart = autoSize(36)
+                }
+
+                //结束日期选择
+                linearLayout {
+                    onThrottleFirstClick {
+                        showDataSelectDialog {
+                            endTime.postValue(this)
+                        }
+                    }
+                    backgroundResource = R.drawable.rma_time_click_bg
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        endTime.bindOptional(context) {
+                            text = it
+                        }
+                        text = "结束日期"
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(18)
+                    }
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_search_by_time
+                    }.lparams(autoSize(38), autoSize(38)) {
+                        marginEnd = autoSize(20)
+                    }
+                }.lparams(autoSize(324), autoSize(67)) {
+                    marginStart = autoSize(12)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+                        viewModel.loadingDialogStatus.postValue(TaskUiModel.inFlight())
+                        viewModel.queryIntegral(begindate = startTime.value ?: "",enddate = endTime.value ?: "")
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundDrawable = createCommonBottomRoundBg(color = "#2481DD", corner = 5)
+                    text = "查询"
+                    textSizeAuto = 31
+                    textColorInt = R.color.white
+                }.lparams(autoSize(144), autoSize(67)) {
+                    marginStart = autoSize(12)
+                }
+            }.lparams(matchParent, autoSize(100))
+
+            linearLayout {
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT
+                    textView {
+                        text = "时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(100),4f)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "提货单号"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(100),4f)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "提货金额"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(100),3f)
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "奖励积分"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, autoSize(100),3f)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(false)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        viewModel.queryIntegral(begindate = startTime.value ?: "",enddate = endTime.value ?: "")
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = integralAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.integralDataList.bindOptional(context) {
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    integralAdapter.setNewData(it)
+                }
+            }
+        }
+    }
+
+}

+ 46 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/integral/MyIntegralViewModel.kt

@@ -0,0 +1,46 @@
+package cn.muchinfo.rma.view.base.main.integral
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.ScoreLogData
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.base.BaseViewModel
+import mtp.polymer.com.autowidget.utils.TaskUiModel
+
+/**
+ * 我的积分viewmodel
+ */
+class MyIntegralViewModel : BaseViewModel(){
+
+    /**
+     * 加载状态控制
+     */
+    val loadingDialogStatus: MutableLiveData<TaskUiModel> = MutableLiveData()
+
+
+    /**
+     * 我的积分数据
+     */
+    val integralDataList : MutableLiveData<List<ScoreLogData>> = MutableLiveData()
+
+
+    fun queryIntegral(begindate : String = "",enddate : String = ""){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            if (begindate.isNotEmpty()){
+                put("begindate",begindate)
+            }
+            if (enddate.isNotEmpty()){
+                put("enddate",enddate)
+            }
+            put("lastnum","10")
+        }
+
+        MyApplication.getInstance()?.accountManager?.queryScoreLog(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                integralDataList.postValue(respData)
+            }
+        }
+    }
+
+}

+ 243 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/MyRewardActivity.kt

@@ -0,0 +1,243 @@
+package cn.muchinfo.rma.view.base.main.reward
+
+import android.content.Intent
+import android.os.Bundle
+import android.view.Gravity
+import android.view.View
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.BrokerRewardLogData
+import cn.muchinfo.rma.global.data.MyTeamData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import cn.muchinfo.rma.view.base.main.addressmanagement.AddAddressManagementActivity
+import cn.muchinfo.rma.view.base.main.team.TeamMemberViewHolder
+import com.blankj.utilcode.util.ActivityUtils
+import com.blankj.utilcode.util.TimeUtils
+import com.sunfusheng.marqueeview.MarqueeView
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.dialog.showDataSelectDialog
+import mtp.polymer.com.autowidget.utils.TaskUiModel
+import org.jetbrains.anko.*
+import java.text.SimpleDateFormat
+
+/**
+ * 我的奖励页面
+ */
+class MyRewardActivity : BaseActivity<MyRewardViewModel>(){
+
+    val startTime: MutableLiveData<String> = MutableLiveData()//历史委托查询起始日期
+    val endTime: MutableLiveData<String> = MutableLiveData()//历史委托查询结束日期
+
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+
+    //我的奖励viewholder
+    private val rewardAdapter: BaseAdapter<BrokerRewardLogData, RewardViewHolder> =
+        BaseAdapter { _, _ -> RewardViewHolder(this) }
+    /**
+     * 初始化查询起始和结束日期
+     */
+    fun initTime() {
+        startTime.postValue(GlobalDataCollection.instance?.oneMonth() ?: "")
+        endTime.postValue(TimeUtils.getNowString(SimpleDateFormat("yyyy-MM-dd")))
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            initTime()
+            viewModel.queryRewardList()
+            background = resources.getDrawable(R.color.main_hit_bg_color)
+            //页面标题
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "我的奖励"
+                }
+                // 新增收货地址
+                commonMenuButton(R.mipmap.qhj_tanhao_icon) {
+                    val intent = Intent()
+                    intent.setClass(context,RewardRuleActivity::class.java)
+                    ActivityUtils.startActivity(intent)
+                }
+            }
+            linearLayout {//跑马灯
+                inflateLayout<MarqueeView>(R.layout.marqueeview) {
+
+                }
+            }.lparams(matchParent, wrapContent)
+
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                //起始日期选择
+                linearLayout {
+                    onThrottleFirstClick {
+                        showDataSelectDialog {
+                            startTime.postValue(this)
+                        }
+                    }
+                    backgroundResource = R.drawable.rma_time_click_bg
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        startTime.bindOptional(context) {
+                            text = it
+                        }
+                        text = "起始日期"
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(18)
+                    }
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_search_by_time
+                    }.lparams(autoSize(38), autoSize(38)) {
+                        marginEnd = autoSize(20)
+                    }
+
+                }.lparams(autoSize(324), autoSize(67)) {
+                    marginStart = autoSize(36)
+                }
+
+                //结束日期选择
+                linearLayout {
+                    onThrottleFirstClick {
+                        showDataSelectDialog {
+                            endTime.postValue(this)
+                        }
+                    }
+                    backgroundResource = R.drawable.rma_time_click_bg
+                    gravity = Gravity.CENTER_VERTICAL
+                    textView {
+                        endTime.bindOptional(context) {
+                            text = it
+                        }
+                        text = "结束日期"
+                        textColorInt = R.color.rma_hint_text_color_ccc
+                        textSizeAuto = 31
+                    }.lparams(wrapContent, wrapContent) {
+                        marginStart = autoSize(18)
+                    }
+
+                    emptyView()
+
+                    imageView {
+                        imageResource = R.mipmap.rma_search_by_time
+                    }.lparams(autoSize(38), autoSize(38)) {
+                        marginEnd = autoSize(20)
+                    }
+                }.lparams(autoSize(324), autoSize(67)) {
+                    marginStart = autoSize(12)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+                        viewModel.loadingDialogStatus.postValue(TaskUiModel.inFlight())
+                        viewModel.queryRewardList(begindate = startTime.value ?: "",enddate = endTime.value ?: "")
+                    }
+                    gravity = Gravity.CENTER
+                    backgroundDrawable = createCommonBottomRoundBg(color = "#2481DD", corner = 5)
+                    text = "查询"
+                    textSizeAuto = 31
+                    textColorInt = R.color.white
+                }.lparams(autoSize(144), autoSize(67)) {
+                    marginStart = autoSize(12)
+                }
+            }.lparams(matchParent, autoSize(110))
+
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.LEFT
+                    textView {
+                        text = "推广账户"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(15)
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
+                        text = "时间"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(100),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "奖励类型"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(100),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "金额"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(100),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        text = "奖励金额"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, autoSize(100),1f)
+            }.lparams(matchParent, autoSize(100))
+
+            statusLayout(contentBlock = {
+
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(false)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+                        viewModel.queryRewardList(begindate = startTime.value ?: "",enddate = endTime.value ?: "")
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = rewardAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.rewardDataList.bindOptional(context) {
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    rewardAdapter.setNewData(it)
+                }
+            }
+        }
+    }
+
+}

+ 46 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/MyRewardViewModel.kt

@@ -0,0 +1,46 @@
+package cn.muchinfo.rma.view.base.main.reward
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.BrokerRewardLogData
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.base.BaseViewModel
+import mtp.polymer.com.autowidget.utils.TaskUiModel
+
+/**
+ * 我的奖励viewmodel
+ */
+class MyRewardViewModel : BaseViewModel(){
+
+    /**
+     * 加载状态控制
+     */
+    val loadingDialogStatus: MutableLiveData<TaskUiModel> = MutableLiveData()
+
+    /**
+     * 我的奖励列表
+     */
+    val rewardDataList : MutableLiveData<List<BrokerRewardLogData>> = MutableLiveData()
+
+    /**
+     * 查询我的奖励
+     */
+    fun queryRewardList(begindate : String = "",enddate : String = ""){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
+            if (begindate.isNotEmpty()){
+                put("begindate",begindate)
+            }
+            if (enddate.isNotEmpty()){
+                put("enddate",enddate)
+            }
+        }
+
+        MyApplication.getInstance()?.accountManager?.queryBrokerRewardLog(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                rewardDataList.postValue(respData)
+            }
+        }
+    }
+
+}

+ 238 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/RewardRuleActivity.kt

@@ -0,0 +1,238 @@
+package cn.muchinfo.rma.view.base.main.reward
+
+import android.os.Bundle
+import android.view.Gravity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import org.jetbrains.anko.*
+
+/**
+ * #DAEDFF 线颜色
+ * 奖励规则页面
+ */
+class RewardRuleActivity : BaseActivity<MyRewardViewModel>(){
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+            background = resources.getDrawable(R.color.white)
+            //页面标题
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "奖励规则"
+                }
+            }
+
+            linearLayout {
+                background = resources.getDrawable(R.color.qhj_rule_bg_color)
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(96))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "推广类型"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(96),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(96))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "奖励类型"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(96),3f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(96))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "一级奖励"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(96),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(96))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "二级奖励"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(96),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(96))
+
+            }.lparams(matchParent, autoSize(96)){
+                marginStart = autoSize(13)
+                marginEnd = autoSize(13)
+                topMargin = autoSize(18)
+            }
+            view {
+                background = resources.getDrawable(R.color.qhj_rule_line_color)
+            }.lparams(matchParent, autoSize(1)){
+                marginStart = autoSize(13)
+                marginEnd = autoSize(13)
+            }
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "注册"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "固定金额(元)"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),3f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "5.00"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "--"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+            }.lparams(matchParent, autoSize(120)){
+                marginStart = autoSize(13)
+                marginEnd = autoSize(13)
+            }
+
+            view {
+                background = resources.getDrawable(R.color.qhj_rule_line_color)
+            }.lparams(matchParent, autoSize(1)){
+                marginStart = autoSize(13)
+                marginEnd = autoSize(13)
+            }
+
+            linearLayout {
+                background = resources.getDrawable(R.color.white)
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "消费"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "固定金额比例(%)"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),3f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "0.5"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        text = "0.3"
+                        textSizeAuto = 31
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(120),2f)
+
+                view {
+                    background = resources.getDrawable(R.color.qhj_rule_line_color)
+                }.lparams(autoSize(1), autoSize(120))
+            }.lparams(matchParent, autoSize(120)){
+                marginStart = autoSize(13)
+                marginEnd = autoSize(13)
+            }
+
+            view {
+                background = resources.getDrawable(R.color.qhj_rule_line_color)
+            }.lparams(matchParent, autoSize(1)){
+                marginStart = autoSize(13)
+                marginEnd = autoSize(13)
+            }
+        }
+    }
+
+}

+ 99 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/reward/RewardViewHolder.kt

@@ -0,0 +1,99 @@
+package cn.muchinfo.rma.view.base.main.reward
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.BrokerRewardLogData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 我的奖励viewholder
+ * @property activity AppCompatActivity
+ * @constructor
+ */
+class RewardViewHolder(private val activity : AppCompatActivity) : BaseViewHolder<BrokerRewardLogData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                verticalLayout {
+                    gravity = Gravity.LEFT
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.srcusername
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(25)
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
+                        data.bindOptional(context){
+                            text = it?.createtime
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(140),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER
+                    textView {
+                        data.bindOptional(context){
+                            if (it?.rewardtype == "1"){
+                                text = "推广"
+                            }else if (it?.rewardtype == "2"){
+                                text = "消费1级"
+                            }else if (it?.rewardtype == "3"){
+                                text = "消费2级"
+                            }
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(140),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        data.bindOptional(context){
+                            text = NumberUtils.roundNum(it?.srcamount,2)
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent)
+                }.lparams(0, autoSize(140),1f)
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL or Gravity.RIGHT
+                    textView {
+                        data.bindOptional(context){
+                            text = NumberUtils.roundNum(it?.rewardamount,2)
+                        }
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+                }.lparams(0, autoSize(140),1f)
+            }.lparams(matchParent, autoSize(140))
+
+            itemView()
+
+        }.lparams(matchParent, wrapContent)
+
+    }
+
+}

+ 10 - 0
RMA/app/src/main/res/layout/marqueeview.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.sunfusheng.marqueeview.MarqueeView
+    android:id="@+id/hor_scrollview"
+    android:layout_width="match_parent"
+    app:mvInterval="3000"
+    app:mvAnimDuration="1000"
+    app:mvDirection="right_to_left"
+    android:layout_height="30dp"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"/>

二进制
RMA/app/src/main/res/mipmap-xhdpi/my_integral_icon.png


二进制
RMA/app/src/main/res/mipmap-xhdpi/my_reward_icon.png


二进制
RMA/app/src/main/res/mipmap-xhdpi/my_team_icon.png


二进制
RMA/app/src/main/res/mipmap-xhdpi/qhj_tanhao_icon.png


+ 2 - 0
RMA/app/src/main/res/values/colors.xml

@@ -98,4 +98,6 @@
     <color name="qhj_pick_color">#BD7859</color>
     <color name="qhj_pick_color">#BD7859</color>
     <color name="qhj_update_image_bg">#F5F7F7</color>
     <color name="qhj_update_image_bg">#F5F7F7</color>
     <color name="qhj_pay_success_color">#3CC56D</color>
     <color name="qhj_pay_success_color">#3CC56D</color>
+    <color name="qhj_rule_bg_color">#E7F7FF</color>
+    <color name="qhj_rule_line_color">#DAEDFF</color>
 </resources>
 </resources>