Administrator 2 years ago
parent
commit
d602db23fb

+ 10 - 0
.idea/misc.xml

@@ -60,10 +60,16 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_input_frame.xml" value="0.347" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_input_second_pwd.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_item_num_frame.xml" value="0.3605" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_limited_time_purchase.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_mine_copy.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_mine_withdraw_button.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_mine_withdraw_copy.xml" value="0.3605" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_outer_sale.xml" value="0.3605" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_paying_gray.xml" value="0.308" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_recommend.xml" value="0.308" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_red_select_refund.xml" value="0.3605" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_search_background.xml" value="0.308" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/bg_time_black.xml" value="0.308" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/brand_selector.xml" value="0.3845" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/classification_selector.xml" value="0.3845" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/home_select_color_home.xml" value="0.3845" />
@@ -71,7 +77,10 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/ic_launcher_background.xml" value="0.3845" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/mine_selector.xml" value="0.3845" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/purchase_order_selector.xml" value="0.3845" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/reporteventdispatch_spinner_bg.xml" value="0.3605" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/select_backgrund.xml" value="0.3605" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/drawable/selector_track.xml" value="0.347" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_add_shipping_address.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_collection_detail.xml" value="0.3185121846943138" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_details_first.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/activity_edit_password.xml" value="0.3828125" />
@@ -99,6 +108,7 @@
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_commodity_recommend.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_inner_dou_sale.xml" value="0.3185121846943138" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_inner_sale.xml" value="0.3185121846943138" />
+        <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_limited_time.xml" value="0.33133817870884996" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_order_outer.xml" value="0.3059836808703536" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_out_sale.xml" value="0.3185121846943138" />
         <entry key="..\:/AndroidWorkPlace/XiangLian/app/src/main/res/layout/item_recommend.xml" value="0.3185121846943138" />

+ 2 - 2
app/src/main/java/com/hdl/xl/ui/activitys/ActivityCollectionDetail.kt

@@ -35,8 +35,8 @@ class ActivityCollectionDetail : BaseActivity(), View.OnClickListener {
 
             if ("fragmentCollect" == type) {
                 linearZhuanshou.visibility = View.VISIBLE
-            }else if ("fragmentConsignment"==type){
-
+            } else if ("fragmentConsignment" == type) {
+                linearConsignment.visibility = View.VISIBLE
             } else {
                 linearNoStart.visibility = View.VISIBLE
             }

+ 0 - 151
app/src/main/java/com/hdl/xl/ui/activitys/ActivityLimitedTimePurchase.kt

@@ -1,151 +0,0 @@
-package com.hdl.xl.ui.activitys
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.os.Handler
-import android.os.Message
-import android.util.Log
-import android.view.View
-import androidx.databinding.DataBindingUtil
-import androidx.recyclerview.widget.LinearLayoutManager
-import com.laike.basekt.BaseActivity
-import com.laike.basekt.coremodel.datemodel.client.HttpRetrofitRequest
-import com.laike.basekt.coremodel.datemodel.client.RxSchedulers
-import com.laike.basekt.extension.startKtActivityOrForResult
-import com.laike.basekt.utils.StatusBarCommon
-import com.hdl.xl.R
-import com.hdl.xl.bean.CommodityBean
-import com.hdl.xl.databinding.ActivityLimitedTimePurchaseBinding
-import com.hdl.xl.service.HttpApi_xie
-import com.hdl.xl.ui.adapter.LimitedTimeAdapter
-import com.scwang.smartrefresh.layout.SmartRefreshLayout
-
-/**
- * @Description:限时购
- * @Author: wuxing
- * @Date: 2021/1/26 16:42
- */
-class ActivityLimitedTimePurchase : BaseActivity(), View.OnClickListener {
-    var mBinding: ActivityLimitedTimePurchaseBinding? = null
-    var commodityBean: MutableList<CommodityBean> = arrayListOf()
-    var mAdapter = LimitedTimeAdapter()
-    var curPage=0
-    var leftTime=0L
-    var handler = Handler()
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        leftTime=intent.getLongExtra("limit_time",0L)
-        mBinding =
-            DataBindingUtil.setContentView(mActivity, R.layout.activity_limited_time_purchase)
-        mBinding?.run {
-            clickListener = this@ActivityLimitedTimePurchase
-            layoutTitle.setPadding(0, StatusBarCommon.findStatusBarHeight(mActivity), 0, 0)
-
-            handler.postDelayed(update_thread, 1000)
-
-            recycleView.layoutManager = LinearLayoutManager(mActivity)
-            recycleView.adapter = mAdapter
-
-            smartRefreshLayout.setOnRefreshListener {
-                curPage=0
-                mAdapter.getData().clear()
-                mAdapter.notifyDataSetChanged()
-                searchLimitBuy(smartRefreshLayout)
-            }
-            smartRefreshLayout.setOnLoadMoreListener {
-                searchLimitBuy(smartRefreshLayout)
-            }
-            smartRefreshLayout.autoRefresh()
-
-            mAdapter.addOnItemClickListener { view, entity, position ->
-                var bundle = Bundle()
-                bundle.putInt("type", 1)
-                startKtActivityOrForResult<ActivityDetailsFirst>(bundle = bundle)
-            }
-        }
-    }
-
-    var update_thread: Runnable = object : Runnable {
-        override fun run() {
-            leftTime--
-            Log.e("", "leftTime=$leftTime")
-            if (leftTime > 0) {
-                //倒计时效果展示
-                val formatLongToTimeStr = formatLongToTimeStr(leftTime)
-                mBinding?.limitedTime?.text = formatLongToTimeStr
-                //每一秒执行一次
-                handler.postDelayed(this, 1000)
-            } else { //倒计时结束
-                //处理业务流程
-
-                //发送消息,结束倒计时
-                val message = Message()
-                message.what = 1
-                handlerStop.sendMessage(message)
-            }
-        }
-    }
-    val handlerStop: Handler = object : Handler() {
-        override fun handleMessage(msg: Message) {
-            when (msg.what) {
-                1 -> {
-                    leftTime = 0
-                    handler.removeCallbacks(update_thread)
-                }
-            }
-            super.handleMessage(msg)
-        }
-    }
-
-    fun formatLongToTimeStr(l: Long): String {
-        var hour = 0
-        var minute = 0
-        var second = 0
-        second = l.toInt()
-        if (second > 60) {
-            minute = second / 60 //取整
-            second %= 60 //取余
-        }
-        if (minute > 60) {
-            hour = minute / 60
-            minute %= 60
-        }
-        return  ""+hour + "时" + minute + "分" + second + "秒"
-    }
-
-    override fun onDestroy() {
-        super.onDestroy()
-        leftTime = 0
-        handler.removeCallbacks(update_thread)
-    }
-
-    @SuppressLint("CheckResult")
-    fun searchLimitBuy(smartRefreshLayout: SmartRefreshLayout) {
-        curPage++
-        HttpRetrofitRequest.retrofit(HttpApi_xie::class.java)
-            .searchMiaoSha(curPage,10)
-            .compose(RxSchedulers.applySchedulers())
-            .subscribe({
-                smartRefreshLayout.finishRefresh()
-                smartRefreshLayout.finishLoadMore()
-                if (it.code==200){
-                    it.data?.let { it1 -> mAdapter.addDataAll(it1) }
-                    mAdapter.notifyDataSetChanged()
-                }
-            },{
-                smartRefreshLayout.finishRefresh()
-                smartRefreshLayout.finishLoadMore()
-                Log.e("searchLimitBuy",it.message.toString())
-            })
-
-    }
-
-    override fun onClick(v: View?) {
-        when (v?.id) {
-            R.id.go_back -> {
-                finish()
-            }
-        }
-    }
-
-}

+ 0 - 26
app/src/main/java/com/hdl/xl/ui/adapter/LimitedTimeAdapter.kt

@@ -1,26 +0,0 @@
-package com.hdl.xl.ui.adapter
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.databinding.DataBindingUtil
-import com.laike.basekt.BaseRecyclerViewAdapterKt
-import com.hdl.xl.R
-import com.hdl.xl.bean.MiaoshaBean
-import com.hdl.xl.ui.adapter.holder.LimitedTimeHolder
-
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2020/7/7 11:26
- */
-class LimitedTimeAdapter : BaseRecyclerViewAdapterKt<MiaoshaBean, LimitedTimeHolder>() {
-    override fun onCreateView(parent: ViewGroup, viewType: Int): LimitedTimeHolder =
-        LimitedTimeHolder(
-            DataBindingUtil.inflate(
-                LayoutInflater.from(mContext),
-                R.layout.item_limited_time,
-                parent,
-                false
-            ), this
-        )
-}

+ 0 - 28
app/src/main/java/com/hdl/xl/ui/adapter/holder/LimitedTimeHolder.kt

@@ -1,28 +0,0 @@
-package com.hdl.xl.ui.adapter.holder
-
-import android.graphics.Paint
-import com.bumptech.glide.Glide
-import com.laike.basekt.BaseRecyclerViewHolderKt
-import com.hdl.xl.bean.MiaoshaBean
-import com.hdl.xl.databinding.ItemLimitedTimeBinding
-import com.hdl.xl.ui.adapter.LimitedTimeAdapter
-
-/**
- * @Description:
- * @Author: xieshenghua
- * @Date: 2020/7/7 11:28
- */
-class LimitedTimeHolder(
-    var mBinding: ItemLimitedTimeBinding,
-    var mAdapter: LimitedTimeAdapter
-) : BaseRecyclerViewHolderKt<MiaoshaBean, ItemLimitedTimeBinding>(mBinding, mAdapter) {
-    override fun setDataBinding(entity: MiaoshaBean, position: Int) {
-        mBinding?.run {
-            bean=entity
-            lastPrice.paint.flags= Paint.STRIKE_THRU_TEXT_FLAG
-            Glide.with(mContext).load(entity.image).into(ivPhoto)
-        }
-    }
-
-    override fun onDataBindingClickListener(entity: MiaoshaBean, position: Int) {}
-}

+ 5 - 0
app/src/main/res/drawable/bg_paying_gray.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#999999"/>
+    <corners android:radius="14dp" />
+</shape>

+ 17 - 1
app/src/main/res/layout/activity_collection_detail.xml

@@ -524,8 +524,24 @@
                 android:textColor="@color/white"
                 android:textSize="30sp" />
 
-
             <TextView
+                android:id="@+id/paying_button"
+                android:visibility="gone"
+                android:layout_width="wrap_content"
+                android:layout_height="45dp"
+                android:layout_marginRight="15dp"
+                android:background="@drawable/bg_paying_gray"
+                android:gravity="center"
+                android:orientation="vertical"
+                android:paddingLeft="17dp"
+                android:paddingTop="3dp"
+                android:paddingRight="17dp"
+                android:paddingBottom="3dp"
+                android:text="该藏品正在支付"
+                android:textColor="@color/white"
+                android:textSize="16sp" />
+            <TextView
+                android:id="@+id/liji_buy"
                 android:layout_width="wrap_content"
                 android:layout_height="45dp"
                 android:layout_marginRight="15dp"

+ 0 - 90
app/src/main/res/layout/item_limited_time.xml

@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
-
-    <data>
-        <variable
-            name="bean"
-            type="com.hdl.xl.bean.MiaoshaBean" />
-
-    </data>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical">
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="95dp"
-            android:background="@color/picture_color_white"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"
-            android:paddingLeft="11dp"
-            android:paddingRight="11dp">
-
-            <androidx.cardview.widget.CardView
-                android:layout_width="70dp"
-                android:layout_height="70dp"
-                app:cardCornerRadius="6dp">
-
-                <androidx.appcompat.widget.AppCompatImageView
-                    android:id="@+id/iv_photo"
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:src="@mipmap/xyj" />
-            </androidx.cardview.widget.CardView>
-
-            <LinearLayout
-                android:layout_width="0dp"
-                android:layout_height="70dp"
-                android:layout_marginLeft="10dp"
-                android:layout_weight="1"
-                android:orientation="vertical">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="0dp"
-                    android:layout_weight="1"
-                    android:text="@{bean.name}"
-                    android:textColor="#000"
-                    android:textSize="14sp" />
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@{`¥`+bean.price}"
-                    android:textColor="#FF4430"
-                    android:textSize="13sp" />
-
-                <TextView
-                    android:id="@+id/last_price"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@{`¥`+bean.del_price}"
-                    android:textColor="#666666"
-                    android:textSize="13sp" />
-            </LinearLayout>
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:background="@drawable/bg_limited_time_purchase"
-                android:text="马上抢"
-                android:textColor="#fff"
-                android:textSize="12sp"
-                android:paddingLeft="12dp"
-                android:paddingRight="12dp"
-                android:paddingTop="3dp"
-                android:paddingBottom="3dp"
-                android:layout_marginTop="25dp"/>
-
-
-        </LinearLayout>
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:background="#F2F2F2"/>
-    </LinearLayout>
-
-
-</layout>