Commit e19aa26e authored by maxiaoliang's avatar maxiaoliang

修改

parent 2935aad1
......@@ -124,7 +124,7 @@ public class NetConfig {
public static class User {
public static final String URL_USER_DEVICE_LOGIN = "app/v1/auth/tourist-login";
public static final String URL_USER_GET_USERINFO_ = "app/v1/game/box/user";
public static final String URL_USER_GET_USERINFO_ = "app/v1/game/xiaoxiang/user";
public static final String URL_PAY_CONFIG = "app/v2/location/user/pay-config";//獲取配置列表
public static final String URL_PAY_ORDER = "app/v2/location/user/pay";//請求支付訂單
......@@ -223,7 +223,8 @@ public class NetConfig {
public static final String HOME_BOX_DUO_SELECT_LOTTERY_CARD = "app/v5/game/box/lotteryCardNum";//选择抽取
public static final String HOME_BOX_FIVE_LOTTERY_CARD = "app/v4/game/box/lotteryFiveCard";//5连抽奖-道具卡版本
public static final String HOME_BOX_LOTTERY_TEST = "app/v1/game/box/lotteryTest";//盲盒抽取 - 试玩(单抽)
public static final String HOME_BOX_ORDER = "app/v1/game/box/order";//用户订单
//public static final String HOME_BOX_ORDER = "app/v1/game/box/order";//用户订单
public static final String HOME_BOX_ORDER = "app/v1/game/xiaoxiang/user/order";//用户订单
public static final String HOME_BOX_RECOVER = "app/v2/game/box/recover";//回收物品
public static final String HOME_BOX_SHIPPING = "app/v5/game/box/getShipping";//用户仓库 - 获取运费
public static final String HOME_BOX_SHOP_COST = "app/v4/game/box/getShipping";//用户仓库 - 商城购买获取费用
......@@ -277,6 +278,7 @@ public class NetConfig {
}
public static class FlashSale{
public static final String HOME_FLASH_SALE_SKILL = "app/v1/game/xiaoxiang/skill";//秒杀时间表
public static final String HOME_FLASH_SALE_BEGIN_SKILL = "app/v1/game/xiaoxiang/skill";//开始秒杀
public static final String HOME_FLASH_SALE_SKILL_LIST = "app/v1/game/xiaoxiang/skill/list";//秒杀商品列表
}
......
......@@ -377,7 +377,15 @@ interface IHomeApi {
//秒杀时间表
@GET(NetConfig.FlashSale.HOME_FLASH_SALE_SKILL)
fun getskill(): Observable<Response<List<SkillEntity>>>
//秒杀商品列表
@POST(NetConfig.FlashSale.HOME_FLASH_SALE_SKILL_LIST)
fun getskillGoodsList( @Query("durationId") durationId: String?): Observable<Response<List<SkillGoodsEntity>>>
fun getskillGoodsList(@Query("durationId") durationId: String?): Observable<Response<List<SkillGoodsEntity>>>
//开始秒杀
@POST(NetConfig.FlashSale.HOME_FLASH_SALE_BEGIN_SKILL)
fun beginskill(
@Query("durationId") durationId: String?,
@Query("id") id: String?
): Observable<Response<ToSkillInfoEntity>>
}
\ No newline at end of file
package com.zxhl.cms.net.model.box
import com.zxhl.cms.net.model.qy.CardEntity
class ShopOrderEntity {
var id: String? = ""
var orderNo: String? = ""//订单单号
......@@ -17,5 +19,7 @@ class ShopOrderEntity {
var discount: String = "0"//优惠价格
var userAddressId: String? = ""
var orderStatus: Int? = 0//订单状态:0待发货;1已发货;2已签收;3其他
var orderType: String? = ""
var goodsList: List<GoodList>? = null
var equitCard: List<CardEntity>? = null
}
\ No newline at end of file
......@@ -8,7 +8,8 @@ class SkillGoodsEntity : Serializable {
var goodsId: String? = ""
var goodsType: String? = ""
var skillPrice: String? = ""
var store: String? = ""
var store: Int? = 0
var currentStore: Int? = 0
var status: String? = ""
var sort: String? = ""
var card: CardEntity? = null
......@@ -29,5 +30,7 @@ class CardEntity : Serializable{
var purchaseTime: String? = ""
var status: String? = ""
var productCode: String? = ""
var eqText: String? = ""
var icon: String? = ""
}
package com.zxhl.cms.net.model.qy
class ToSkillInfoEntity {
var outTradeNo:String?=""
var sKillResult:Boolean?=false
var msg:String?=""
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ public class UserInfo implements Serializable {
public String headimgurl;
public String headImage;
public String nickname;
public String phone;
public String memberEndTime;
public String sex;
public String invite_code;
......@@ -44,5 +45,6 @@ public class UserInfo implements Serializable {
public Boolean isNewUserV3;
public String discount;//优惠价
public String discount2;//折扣价
public Boolean member;
}
......@@ -270,4 +270,7 @@ interface RounterApi {
@RounterUri(Constant.scheme + "://abuoutus")
fun getIntentAboutUs(): Intent
@RounterUri(Constant.scheme + "://topayskill")
fun getIntentToPaySkill(): Intent
}
\ No newline at end of file
......@@ -429,4 +429,13 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
public static void ToPaySkillJump() {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentToPaySkill();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
AppContext.get().startActivity(intent);
} catch (Exception e) {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
}
......@@ -33,5 +33,6 @@
<color name="color_4C84FF">#4C84FF</color>
<color name="color_4c84ff">#4C84FF</color>
<color name="color_6998ff">#6998FF</color>
<color name="color_e09a9a">#E09A9A</color>
</resources>
\ No newline at end of file
......@@ -172,7 +172,77 @@
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".activity.MyOrderActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="myorder"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".box.activity.WareHouseActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="warehouse"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".box.activity.ReceiveAddressActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="receiveaddress"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".box.activity.OrderDetailActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="orderdetail"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".activity.ToPaySkillGoodsActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="topayskill"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".activity.SettingActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="setting"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".activity.OpenMemberOrderActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
......@@ -184,7 +254,6 @@
android:scheme="xxsq" />
</intent-filter>
</activity>
</application>
......
package com.zxbw.modulemain.activity
import android.content.Intent
import android.text.TextUtils
import android.util.Log
import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import com.zxbw.modulemain.R
......@@ -12,22 +15,28 @@ import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.net.model.qy.SkillEntity
import com.zxhl.cms.net.model.qy.SkillGoodsEntity
import com.zxhl.cms.net.model.qy.ToSkillInfoEntity
import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.utils.OnRecycleItemClickListener
import kotlinx.android.synthetic.main.activity_layout_flash_sale.*
class FlashSaleActivity:BaseActivity(),FlashSaleContract.View,OnRecycleItemClickListener<SkillEntity> {
private var mPresenter:FlashSalePresenter?=null
private var mAdapter:FlashSaleAdapter?=null
private var mDiscountAdapter:MoreDiscountAdapter?=null
private var mTimeAdapter: TimeAdapter?=null
private var durationId:String?=""
class FlashSaleActivity : BaseActivity(), FlashSaleContract.View,
OnRecycleItemClickListener<SkillEntity> {
private var mPresenter: FlashSalePresenter? = null
private var mAdapter: FlashSaleAdapter? = null
private var mDiscountAdapter: MoreDiscountAdapter? = null
private var mTimeAdapter: TimeAdapter? = null
private var durationId: String? = ""
private var skillGoodsEntity: SkillGoodsEntity? = null
override fun onClick(v: View?) {
}
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
}
override fun layoutID(): Int {
return R.layout.activity_layout_flash_sale
}
......@@ -36,18 +45,24 @@ class FlashSaleActivity:BaseActivity(),FlashSaleContract.View,OnRecycleItemClick
id_img_back?.setOnClickListener {
finish()
}
mPresenter= FlashSalePresenter(this)
mAdapter= FlashSaleAdapter(this)
mTimeAdapter= TimeAdapter(this,this)
mDiscountAdapter= MoreDiscountAdapter(this)
id_rl_time?.layoutManager=GridLayoutManager(this,4)
id_rl_time?.adapter=mTimeAdapter
id_rl_more_discount?.layoutManager=GridLayoutManager(this,3)
id_rl_more_discount?.adapter=mDiscountAdapter
id_rl_flash_sale_top?.layoutManager=GridLayoutManager(this,3)
id_rl_flash_sale_top?.adapter=mAdapter
mPresenter = FlashSalePresenter(this)
mAdapter = FlashSaleAdapter(
this,
OnRecycleItemClickListener<SkillGoodsEntity> { view, position, data ->
skillGoodsEntity = data
mPresenter?.beginSkill(durationId, data?.id)
})
mTimeAdapter = TimeAdapter(this, this)
mDiscountAdapter = MoreDiscountAdapter(this)
id_rl_time?.layoutManager = GridLayoutManager(this, 4)
id_rl_time?.adapter = mTimeAdapter
id_rl_more_discount?.layoutManager = GridLayoutManager(this, 3)
id_rl_more_discount?.adapter = mDiscountAdapter
id_rl_flash_sale_top?.layoutManager = GridLayoutManager(this, 3)
id_rl_flash_sale_top?.adapter = mAdapter
mPresenter?.getFlashSaleData()
//
//
}
......@@ -55,8 +70,18 @@ class FlashSaleActivity:BaseActivity(),FlashSaleContract.View,OnRecycleItemClick
mTimeAdapter?.clear()
mTimeAdapter?.appendToList(result)
mTimeAdapter?.notifyDataSetChanged()
durationId=result?.get(1)?.id
mPresenter?.getSkillGoodsList("08")
if(!result.isNullOrEmpty()){
for(i in result.indices){
if(TextUtils.equals(result[i].status,"1")){
mTimeAdapter?.setPosition(i)
durationId = result?.get(i)?.id
getGoodsList()
}
}
}
}
override fun setSkillListResult(result: List<SkillGoodsEntity>?) {
......@@ -65,12 +90,25 @@ class FlashSaleActivity:BaseActivity(),FlashSaleContract.View,OnRecycleItemClick
mAdapter?.notifyDataSetChanged()
}
override fun onItemClick(view: View?, position: Int, data: SkillEntity?) {
showToast("点击"+data?.startTime)
durationId=data?.startTime
override fun toskill(boolean: Boolean, result: ToSkillInfoEntity?) {
mPresenter?.getSkillGoodsList(durationId)
// JumpUtils.ToPaySkillJump()
val intent = Intent(this, ToPaySkillGoodsActivity::class.java)
intent.putExtra("skillgoods", skillGoodsEntity)
startActivity(intent)
if (boolean) {
}
}
override fun onItemClick(view: View?, position: Int, data: SkillEntity?) {
durationId = data?.id
getGoodsList()
}
fun getGoodsList(){
fun getGoodsList() {
mPresenter?.getSkillGoodsList(durationId)
}
}
\ No newline at end of file
......@@ -41,7 +41,7 @@ class LoginActivity : WxImpl(), LoginContract.View {
private var SECONDS: Long = 0
private var isShowPsw: Boolean = false
private var ifAgree: Boolean = false
override fun layoutID(): Int {
return R.layout.activity_login
}
......@@ -59,10 +59,19 @@ class LoginActivity : WxImpl(), LoginContract.View {
id_tv_yinsi?.setOnClickListener {
JumpUtils.webJump("隐私政策", NetConfig.H5.WEB_URL_PRIVACY)
}
id_ll_agree?.setOnClickListener {
if (!ifAgree) {
ifAgree = true
id_img_agree?.setImageResource(R.drawable.icon_gouxuan)
} else {
ifAgree = false
id_img_agree?.setImageResource(R.drawable.icon_weigouxuan)
}
}
TYPE = CODE
mHandler = WeakHandler()
mPresenter = LoginPresenter(this)
// id_activity_login_wx?.setOnClickListener(this)
// id_activity_login_wx?.setOnClickListener(this)
id_activity_login_switch_type?.setOnClickListener(this)
id_activity_login_edit_phone_getcode?.setOnClickListener(this)
id_activity_login_btn?.setOnClickListener(this)
......@@ -251,6 +260,10 @@ class LoginActivity : WxImpl(), LoginContract.View {
}
fun checkNullAndLogin() {
if(!ifAgree){
showToast("请勾选同意后再进行登录")
return
}
val phone = id_activity_login_edit_phone?.text.toString().trim { it <= ' ' }
mLoading.setLoading(getString(R.string.login_ing))
mLoading.show()
......@@ -264,6 +277,8 @@ class LoginActivity : WxImpl(), LoginContract.View {
mLoading.setResult(false, "验证码不能为空", 1000)
return
}
mPresenter?.codeLogin(phone, code)
} else {
val password = id_activity_login_edit_password?.text.toString().trim { it <= ' ' }
......
package com.zxbw.modulemain.activity
import android.text.TextUtils
import android.util.Log
import android.view.View
import com.zxbw.modulemain.R
import com.zxbw.modulemain.fragment.MagicBoxOrderFragment
import com.zxbw.modulemain.fragment.ShopOrderListFragment
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.FragmentAdapter
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.common.base.BaseFragment
import io.reactivex.Observable
import kotlinx.android.synthetic.main.activity_layout_my_order.*
//我的订单
class MyOrderActivity : BaseActivity() {
var type:String?=""
val createTitles = ArrayList<String>().apply {
//add(AppContext.get().getString(R.string.shop_order))
add(AppContext.get().getString(R.string.magic_box_order))
}
val createFragments: Array<BaseFragment> = arrayOf(
// ShopOrderListFragment.newInstance(),
MagicBoxOrderFragment.newInstance()
)
override fun onClick(v: View?) {
}
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
}
override fun layoutID(): Int {
return R.layout.activity_layout_my_order
}
override fun init() {
type = intent?.data?.getQueryParameter("type") ?: ""
Log.e("MXL","type:"+type)
initVeiwPager()
id_img_back?.setOnClickListener {
finish()
}
}
fun initVeiwPager() {
val adapter = FragmentAdapter(supportFragmentManager)
order_viewPager?.adapter = adapter
for (i in createFragments.indices) {
adapter?.addFrag(createFragments[i], createTitles[i])
}
adapter?.notifyDataSetChanged()
id_fragment_order_tab?.setViewPager(order_viewPager)
id_fragment_order_tab?.overScrollMode = View.OVER_SCROLL_NEVER
if(TextUtils.equals(type,"1")){
order_viewPager?.currentItem=1
}
}
override fun onDestroy() {
super.onDestroy()
}
}
\ No newline at end of file
package com.zxbw.modulemain.activity
import android.text.TextUtils
import android.view.View
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.request.RequestOptions
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.Constant
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.net.SettingPreference
import com.zxhl.cms.utils.JumpUtils
import kotlinx.android.synthetic.main.activity_layout_setting.*
class SettingActivity : BaseActivity() {
override fun onClick(v: View?) {
}
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
}
override fun layoutID(): Int {
return R.layout.activity_layout_setting
}
override fun init() {
val user = SettingPreference.getUserInfoData()
if (user == null) {
return
}
id_tv_user_number?.text = user.nickname
id_tv_number?.text=user.phone
id_tv_version_code?.text = "V${Constant.Param.vn}"
if (!TextUtils.isEmpty(user.headImage)) {
Glide.with(this).load(user.headImage)
.apply(RequestOptions.bitmapTransform(CircleCrop()))
.error(R.drawable.icon_default_user_img)
.into(id_img_user_head)
} else {
id_img_user_head.setImageResource(R.drawable.icon_head_defalt)
}
id_ll_tuichui_denglu?.setOnClickListener {
SettingPreference.saveToken("")
SettingPreference.saveUserInfo(null)
finish()
JumpUtils.loginJump()
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.activity
import android.graphics.Paint
import android.os.Handler
import android.util.Log
import android.view.View
import com.zxbw.modulemain.R
import com.zxbw.modulemain.contract.CardDetailContract
import com.zxbw.modulemain.presenter.CardDetailPresenter
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.Constant
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.net.model.qy.SkillGoodsEntity
import com.zxhl.cms.net.model.uc.AliPayEntity
import com.zxhl.cms.net.model.uc.PayResultEntity
import com.zxhl.cms.pay.alipay.AlipayServer
import com.zxhl.cms.utils.EventUtils
import com.zxhl.cms.utils.MainLooper
import com.zxhl.cms.utils.RxBus
import com.zxhl.cms.widget.LoadingDialog
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import kotlinx.android.synthetic.main.activity_layout_to_pay_skill_goods.*
class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
private var mPayPresenter: CardDetailPresenter? = null
private var mLoading: LoadingDialog? = null
private var pay_type: Int? = RightsDetailActivity.ALI_PAY
private var payResultObservable: Observable<PayResultEntity>? = null
var goodsID:String?=""
override fun onClick(v: View?) {
}
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
}
override fun layoutID(): Int {
return R.layout.activity_layout_to_pay_skill_goods
}
override fun init() {
val skillGoodsEntity: SkillGoodsEntity =
intent.getSerializableExtra("skillgoods") as SkillGoodsEntity
initPay()
goodsID=skillGoodsEntity.goodsId
setDataView(skillGoodsEntity)
id_ll_skill_pay?.setOnClickListener {
topay()
}
}
fun setDataView(entity: SkillGoodsEntity) {
id_title_name?.text =
"${entity?.card?.brand}${entity?.card?.category}${entity?.card?.goodsName}"
id_tv_goods_name?.text =
"${entity?.card?.brand}${entity?.card?.category}${entity?.card?.goodsName}"
id_tv_goods?.text =
"${entity?.card?.brand}${entity?.card?.category}${entity?.card?.goodsName}"
id_tv_price?.text = "${entity.skillPrice}"
id_tv_yuanjia?.text = "${entity.card?.originPrice}"
id_tv_yuanjia?.getPaint()?.setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中划线
id_tv_skill_price?.text = "${entity.skillPrice}"
id_tv_lisheng?.text = "立省 ¥ ${entity.card?.costPrice}"
id_img_icon?.setLoadImageUrl("${entity.card?.icon}", true)
}
fun initPay(){
mPayPresenter= CardDetailPresenter(this)
mLoading = LoadingDialog.getLoadingDialog(
this,
getString(com.zxhl.cms.R.string.wait_ing),
false,
false
)
payResultObservable = RxBus.get().register(Constant.PAY_RESULT, PayResultEntity::class.java)
payResultObservable?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(Consumer<PayResultEntity> { obj ->
MainLooper?.get()?.postDelayed(Runnable {
mHandler?.removeCallbacksAndMessages(null)
}, 1000)
Log.d("qqbs", "verifyPay:${obj.txt}")
//println("verifyPay payResultObservable------------------------------- order:${obj.txt}")
if (obj.isPaySuc) {
// EventUtils.onEvent("pay_page_pay_query_order", "付款成功")
mPayPresenter?.verifyPay(obj.txt, obj.payType)
} else {
//支付宝支付
if (obj.payType == 1) {
if (obj.payStatus == "6001") {
EventUtils.onEvent("zfb_pay_cancel")
} else {
EventUtils.onEvent("zfb_pay_error", obj.payStatus + " msg:" + obj.txt)
}
} else {
EventUtils.onEvent("wx_pay_error", obj.txt)
}
showResultLoading(false)
}
}, Consumer<Throwable> { })
}
private var mHandler: Handler = Handler {
when (it.what) {
0 -> {
if (mLoading != null) {
mLoading?.setResult(false, "取消支付", 1000)
}
}
}
false
}
fun topay() {
mLoading?.setLoading("请稍后...")
mLoading?.show()
mPayPresenter?.requestRightsAliPay(goodsID.toString(), pay_type.toString(), "")
}
override fun requestOrderSuc(result: AliPayEntity) {
AlipayServer.payV2(this, result.wakeup!!)
}
override fun requestOrderFail(errorMsg: String) {
showResultLoading(false)
}
override fun verifyOrderSuc(order: String) {
showResultLoading(true)
}
override fun verifyOrderFail(errorMsg: String) {
showResultLoading(false)
}
private fun showResultLoading(isPaySuc: Boolean) {
if (isPaySuc) {
mLoading?.setResult(true, "支付成功", 1000)
} else {
mLoading?.setResult(false, "支付失败", 1000)
}
}
override fun onDestroy() {
super.onDestroy()
if (payResultObservable != null)
RxBus.get().unregister(Constant.PAY_RESULT, payResultObservable!!)
}
}
\ No newline at end of file
package com.zxbw.modulemain.adapter
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.ShopOrderEntity
import com.zxhl.cms.utils.Utils
//魔盒订单adapter
class BoxOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, BoxOrderAdapter.ViewHolder> {
private var mContext: Context? = null
constructor(
content: Context?
) : super() {
mContext = content
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
holder.img_order_no_copy?.setOnClickListener {
copy(holder.id_tv_order_no?.text.toString())
}
holder.id_tv_total_price?.text = "¥${bean.cash}"
// var mPrice = bean.cash?.toDouble()?.plus(bean.discount?.toDouble())
holder.id_tv_pricedesc?.text = "总价:¥${bean.totalPrice}|优惠:¥${bean.discount}|运费:¥${bean.freight}|"
holder.id_tv_order_no?.text = bean.orderNo
holder.id_tv_pay_time?.text = bean.payTime
var mAdapter: ItemOrderAdapter? = ItemOrderAdapter(mContext)
holder.id_rl_order_item?.layoutManager =
LinearLayoutManager(mContext)
holder.id_rl_order_item?.adapter = mAdapter
mAdapter?.clear()
mAdapter?.appendToList(bean.equitCard)
mAdapter?.notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.items_layout_box_order, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var id_tv_total_price: TextView?
var id_tv_pricedesc: TextView?
var id_tv_order_no: TextView?
var id_tv_pay_time: TextView?
var img_order_no_copy: ImageView?
var id_rl_order_item: RecyclerView?
constructor(
itemView: View
) : super(itemView) {
id_tv_total_price = itemView.findViewById<TextView>(R.id.id_tv_total_price)
id_tv_pricedesc = itemView.findViewById<TextView>(R.id.id_tv_pricedesc)
id_tv_order_no = itemView.findViewById<TextView>(R.id.id_tv_order_no)
id_tv_pay_time = itemView.findViewById<TextView>(R.id.id_tv_pay_time)
img_order_no_copy = itemView.findViewById<ImageView>(R.id.img_order_no_copy)
id_rl_order_item = itemView.findViewById<RecyclerView>(R.id.id_rl_order_item)
}
}
fun copy(string: String) {
//获取剪贴板管理器:
val cm: ClipboardManager =
mContext?.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
// 创建普通字符型ClipData
val mClipData: ClipData =
ClipData.newPlainText("Label", string)
// 将ClipData内容放到系统剪贴板里。
cm.setPrimaryClip(mClipData)
Utils.showToast(mContext, "已复制到剪切板")
}
}
\ No newline at end of file
......@@ -17,14 +17,18 @@ import com.zxbw.modulemain.activity.CardDetailActivity
import com.zxbw.modulemain.activity.SkillPayActivity
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.qy.RightsDetailEntity
import com.zxhl.cms.net.model.qy.SkillGoodsEntity
import com.zxhl.cms.utils.OnRecycleItemClickListener
class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter.ViewHolder> {
private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<SkillGoodsEntity>
constructor(
content: Activity?
content: Activity?,
listener: OnRecycleItemClickListener<SkillGoodsEntity>
) : super() {
this.listener = listener
mContext = content
}
......@@ -36,8 +40,8 @@ class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter.
}else{
}
holder.goumai_progress?.max=100
holder.goumai_progress?.progress=10
holder.goumai_progress?.max=bean.store!!
holder.goumai_progress?.progress=bean.currentStore!!
holder.id_tv_name?.text="${bean.card?.brand}${bean.card?.category}${bean.card?.goodsName}"
holder.id_tv_sale_price?.text="${bean.skillPrice}"
holder.id_tv_yuanjia?.text="${bean.card?.originPrice}"
......@@ -46,8 +50,11 @@ class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter.
val intent = Intent(mContext, SkillPayActivity::class.java)
intent.putExtra("skillgoods", bean)
mContext?.startActivity(intent)
}
holder.id_tv_qianggou?.setOnClickListener {
listener.onItemClick(it,position,bean)
}
}
override fun getItemCount(): Int {
......
package com.zxbw.modulemain.adapter
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.GoodList
import com.zxhl.cms.net.model.qy.CardEntity
import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.utils.Utils
import com.zxhl.cms.widget.RecycleImageView
class ItemOrderAdapter : BaseRecyclerAdapter<CardEntity, ItemOrderAdapter.ViewHolder> {
private var mContext: Context? = null
constructor(
content: Context?
) : super() {
mContext = content
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
// if (!TextUtils.isEmpty(bean.trackingNo)) {
// holder.id_tv_courier_no?.text = bean.trackingNo
// holder.id_img_copy?.visibility = View.VISIBLE
// } else {
// holder.id_tv_courier_no?.text = "正在打包中…"
// holder.id_img_copy?.visibility = View.GONE
// }
holder.id_img_copy?.setOnClickListener {
copy(holder.id_tv_courier_no?.text.toString())
}
// holder.id_img_query?.setOnClickListener {
// if(!TextUtils.equals(bean.trackingNo,"正在打包中")){
// JumpUtils.webJump("","https://m.kuaidi100.com/app/query/?com=&nu="+bean.trackingNo+"&coname=xymh")
// }
//
// }
// if (bean.orderStatus == 0) {
// holder.id_tv_status?.text = "待发货"
// } else if (bean.orderStatus == 1) {
// holder.id_tv_status?.text = "已发货"
// } else {
// holder.id_tv_status?.text = "已签收"
// }
// holder.id_tv_goods_name?.text = bean.productName
// holder.id_img_goods?.setLoadImageUrl(bean.mainImage, false)
// holder.id_tv_nums?.text = "x ${bean.amount}"
// holder.id_tv_sale_price?.text = "¥ ${bean.salePriceStr}"
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.items_order_layout, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var id_img_goods: RecycleImageView?
var id_tv_goods_name: TextView?
var id_tv_pay_price: TextView?
var id_tv_status: TextView?
var id_tv_courier_no: TextView?
var id_tv_sale_price: TextView?
var id_tv_nums: TextView?
var id_img_copy: ImageView?
var id_img_query: TextView?
constructor(
itemView: View
) : super(itemView) {
id_tv_goods_name = itemView.findViewById<TextView>(R.id.id_tv_goods_name)
id_tv_pay_price = itemView.findViewById<TextView>(R.id.id_tv_pay_price)
id_tv_status = itemView.findViewById<TextView>(R.id.id_tv_status)
id_tv_courier_no = itemView.findViewById<TextView>(R.id.id_tv_courier_no)
id_tv_sale_price = itemView.findViewById<TextView>(R.id.id_tv_sale_price)
id_tv_nums = itemView.findViewById<TextView>(R.id.id_tv_nums)
id_img_copy = itemView.findViewById<ImageView>(R.id.id_img_copy)
id_img_query = itemView.findViewById<TextView>(R.id.id_img_query)
id_img_goods = itemView.findViewById<RecycleImageView>(R.id.id_img_goods)
}
}
fun copy(string: String) {
//获取剪贴板管理器:
val cm: ClipboardManager =
mContext?.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
// 创建普通字符型ClipData
val mClipData: ClipData =
ClipData.newPlainText("Label", string)
// 将ClipData内容放到系统剪贴板里。
cm.setPrimaryClip(mClipData)
Utils.showToast(mContext, "已复制到剪切板")
}
}
\ No newline at end of file
package com.zxbw.modulemain.adapter
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.ShopOrderEntity
import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.utils.Utils
import com.zxhl.cms.widget.RecycleImageView
class ShopOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, ShopOrderAdapter.ViewHolder> {
private var mContext: Context? = null
constructor(
content: Context?
) : super() {
mContext = content
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
if (!TextUtils.isEmpty(bean.goodsList?.get(0)?.trackingNo)) {
holder.id_tv_courier_no?.text = bean.goodsList?.get(0)?.trackingNo
holder.id_img_copy?.visibility = View.VISIBLE
} else {
holder.id_tv_courier_no?.text = "生成中…"
holder.id_img_copy?.visibility = View.GONE
}
holder.id_img_copy?.setOnClickListener {
copy(holder.id_tv_courier_no?.text.toString())
}
holder.img_order_no_copy?.setOnClickListener {
copy(holder.id_tv_order_no?.text.toString())
}
holder.id_tv_total_price?.text = "¥${bean.cash}"
var mPrice = bean.cash?.toDouble()?.plus(bean.discount?.toDouble())
holder.id_tv_pricedesc?.text = "总价:¥${mPrice}|优惠:¥${bean.discount}|运费:¥${bean.freight}|"
if (bean.orderStatus == 0) {
holder.id_tv_status?.text = "待发货"
} else if (bean.orderStatus == 1) {
holder.id_tv_status?.text = "已发货"
} else {
holder.id_tv_status?.text = "已签收"
}
holder.id_img_query?.setOnClickListener {
if(!TextUtils.equals(bean.trackingNo,"正在打包中")){
JumpUtils.webJump("","https://m.kuaidi100.com/app/query/?com=&nu="+bean.trackingNo+"&coname=xymh")
}
}
holder.id_tv_goods_name?.text = bean.goodsList?.get(0)?.productName
holder.id_img_goods?.setLoadImageUrl(bean.goodsList?.get(0)?.mainImage, false)
holder.id_tv_nums?.text = "x ${bean.goodsList?.get(0)?.amount}"
holder.id_tv_sale_price?.text = "¥ ${bean.goodsList?.get(0)?.salePriceStr}"
holder.id_tv_order_no?.text = bean.orderNo
holder.id_tv_pay_time?.text = bean.payTime
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_shop_order, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var id_img_goods: RecycleImageView?
var id_tv_goods_name: TextView?
var id_tv_pay_price: TextView?
var id_tv_status: TextView?
var id_tv_courier_no: TextView?
var id_tv_sale_price: TextView?
var id_tv_nums: TextView?
var id_tv_total_price: TextView?
var id_tv_pricedesc: TextView?
var id_tv_order_no: TextView?
var id_tv_pay_time: TextView?
var id_img_copy: ImageView?
var img_order_no_copy: ImageView?
var id_img_query: TextView?
constructor(
itemView: View
) : super(itemView) {
id_tv_goods_name = itemView.findViewById<TextView>(R.id.id_tv_goods_name)
id_tv_pay_price = itemView.findViewById<TextView>(R.id.id_tv_pay_price)
id_tv_status = itemView.findViewById<TextView>(R.id.id_tv_status)
id_tv_courier_no = itemView.findViewById<TextView>(R.id.id_tv_courier_no)
id_tv_sale_price = itemView.findViewById<TextView>(R.id.id_tv_sale_price)
id_tv_nums = itemView.findViewById<TextView>(R.id.id_tv_nums)
id_tv_total_price = itemView.findViewById<TextView>(R.id.id_tv_total_price)
id_tv_pricedesc = itemView.findViewById<TextView>(R.id.id_tv_pricedesc)
id_tv_order_no = itemView.findViewById<TextView>(R.id.id_tv_order_no)
id_tv_pay_time = itemView.findViewById<TextView>(R.id.id_tv_pay_time)
id_img_copy = itemView.findViewById<ImageView>(R.id.id_img_copy)
img_order_no_copy = itemView.findViewById<ImageView>(R.id.img_order_no_copy)
id_img_goods = itemView.findViewById<RecycleImageView>(R.id.id_img_goods)
id_img_query = itemView.findViewById<TextView>(R.id.id_img_query)
}
}
fun copy(string: String) {
//获取剪贴板管理器:
val cm: ClipboardManager =
mContext?.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
// 创建普通字符型ClipData
val mClipData: ClipData =
ClipData.newPlainText("Label", string)
// 将ClipData内容放到系统剪贴板里。
cm.setPrimaryClip(mClipData)
Utils.showToast(mContext, "已复制到剪切板")
}
}
\ No newline at end of file
package com.zxbw.modulemain.adapter
import android.app.Activity
import android.graphics.Color
import android.text.TextUtils
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
......@@ -15,21 +18,33 @@ import com.zxhl.cms.utils.OnRecycleItemClickListener
class TimeAdapter : BaseRecyclerAdapter<SkillEntity, TimeAdapter.ViewHolder> {
private var mContext: Activity? = null
private var pos = -1
private val listener: OnRecycleItemClickListener<SkillEntity>
private val mSelectColor: Int
private val mUnSelectColor: Int
constructor(
content: Activity?,
listener: OnRecycleItemClickListener<SkillEntity>
) : super() {
mContext = content
this.listener = listener
mSelectColor = AppContext.get().resources.getColor(R.color.white)
mUnSelectColor = AppContext.get().resources.getColor(R.color.color_e09a9a)
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
holder.id_ll_item?.setOnClickListener {
listener.onItemClick(it, position, bean)
Log.e("MXL","Pos:"+pos)
if(position==pos){
holder.id_tv_time?.setTextColor(mSelectColor)
holder.id_tv_status_desc?.setTextColor(mSelectColor)
}else{
holder.id_tv_time?.setTextColor(mUnSelectColor)
holder.id_tv_status_desc?.setTextColor(mUnSelectColor)
}
// holder.id_ll_item?.setOnClickListener {
//
// }
holder.id_tv_time?.text="${bean.startTime}"
holder.id_tv_status_desc?.text="${bean.statusDesc}"
}
......@@ -41,7 +56,10 @@ class TimeAdapter : BaseRecyclerAdapter<SkillEntity, TimeAdapter.ViewHolder> {
return size
}
}
fun setPosition(pos: Int) {
this.pos = pos
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
......@@ -49,7 +67,7 @@ class TimeAdapter : BaseRecyclerAdapter<SkillEntity, TimeAdapter.ViewHolder> {
)
}
class ViewHolder : RecyclerView.ViewHolder {
inner class ViewHolder : RecyclerView.ViewHolder {
var id_ll_item: LinearLayout?
var id_tv_status_desc: TextView?
var id_tv_time: TextView?
......@@ -62,6 +80,14 @@ class TimeAdapter : BaseRecyclerAdapter<SkillEntity, TimeAdapter.ViewHolder> {
itemView.findViewById<LinearLayout>(R.id.id_ll_item)
id_tv_time = itemView.findViewById<TextView>(R.id.id_tv_time)
id_tv_status_desc = itemView.findViewById<TextView>(R.id.id_tv_status_desc)
id_ll_item?.setOnClickListener {
val pos = adapterPosition
if (pos >= 0 && pos < mList.size) {
setPosition(pos)
notifyDataSetChanged()
listener.onItemClick(it, position, mList[pos])
}
}
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.activity
import android.content.Intent
import android.text.TextUtils
import android.util.Log
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import com.zxbw.modulemain.R
import com.zxbw.modulemain.box.adapter.AddressAdapter
import com.zxbw.modulemain.box.contract.ReceiveAddressContract
import com.zxbw.modulemain.box.presenter.ReceiveAddressPresenter
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.Constant
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.net.model.box.AddressEntity
import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.utils.OnRecycleItemClickListener
import com.zxhl.cms.utils.RxBus
import com.zxhl.cms.widget.LoadingDialog
import kotlinx.android.synthetic.main.activity_layout_receive_address.*
class ReceiveAddressActivity : BaseActivity(), ReceiveAddressContract.View,
OnRecycleItemClickListener<AddressEntity> {
private var mPresenter: ReceiveAddressPresenter? = null
private var mAdapter: AddressAdapter? = null
private var isDefault: String? = ""
private var order: String? = ""
private var id: String? = ""
private var mLoading: LoadingDialog? = null
override fun onClick(v: View?) {
}
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.white))
}
override fun layoutID(): Int {
return R.layout.activity_layout_receive_address
}
override fun init() {
mLoading = LoadingDialog.getLoadingDialog(
mActivity,
getString(com.zxhl.cms.R.string.wait_ing),
false,
false
)
isDefault = intent?.data?.getQueryParameter("isDefault") ?: ""
order = intent.getStringExtra("order")
id = intent.getStringExtra("id")
Log.e("MXL","ID"+id)
id_img_back?.setOnClickListener {
finish()
}
id_tv_add_address?.setOnClickListener {
JumpUtils.EditAddressReslutJump("", "", "", "", "", "0")
}
mPresenter = ReceiveAddressPresenter(this)
mPresenter?.getAddress(isDefault)
mAdapter = AddressAdapter(this, this)
id_rl_address?.layoutManager = LinearLayoutManager(this)
id_rl_address?.adapter = mAdapter
}
override fun onResume() {
super.onResume()
mPresenter?.getAddress(isDefault)
}
override fun setAddressData(reslut: List<AddressEntity>?) {
mAdapter?.clear()
mAdapter?.appendToList(reslut)
mAdapter?.notifyDataSetChanged()
}
override fun delSucess() {
if (mLoading != null) {
mLoading?.dismiss()
}
mPresenter?.getAddress(isDefault)
}
override fun onItemClick(view: View?, position: Int, data: AddressEntity?) {
when (view?.id) {
R.id.id_img_del -> {
mLoading?.show()
mLoading?.setLoading("正在删除")
if(id.equals(data?.id)){
Log.e("MXL","删除了刚才的id"+id)
RxBus.get().post(Constant.CHOSSEE_ADDRESS_RESULT, 1)
}
mPresenter?.delAddress(data)
}
}
if (!TextUtils.isEmpty(order)) {
when (view?.id) {
R.id.id_rl_item -> {
var intent: Intent = Intent()
intent.putExtra("address", data)
setResult(1001, intent)
finish()
}
}
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.activity
import android.view.View
import com.zxbw.modulemain.R
import com.zxbw.modulemain.fragment.TobePickUpFragment
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.FragmentAdapter
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.common.base.BaseFragment
import kotlinx.android.synthetic.main.activity_layout_warehouse.*
class WareHouseActivity:BaseActivity() {
val createTitles = ArrayList<String>().apply {
add(AppContext.get().getString(R.string.to_be_picked_up))
add(AppContext.get().getString(R.string.finished))
}
val createFragments: Array<BaseFragment> = arrayOf(
TobePickUpFragment.newInstance()
// FinishedFragment.newInstance()
)
override fun onClick(v: View?) {
}
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
}
override fun layoutID(): Int {
return R.layout.activity_layout_warehouse
}
override fun init() {
initVeiwPager()
id_img_back?.setOnClickListener {
finish()
}
}
fun initVeiwPager() {
val adapter = FragmentAdapter(supportFragmentManager)
viewPager?.adapter = adapter
for (i in createFragments.indices) {
adapter.addFrag(createFragments[i], createTitles[i])
}
adapter.notifyDataSetChanged()
id_fragment_ware_house_tab?.setViewPager(viewPager)
id_fragment_ware_house_tab?.overScrollMode = View.OVER_SCROLL_NEVER
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.adapter
import android.content.Context
import android.content.Intent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.AddressEntity
import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.utils.OnRecycleItemClickListener
class AddressAdapter : BaseRecyclerAdapter<AddressEntity, AddressAdapter.ViewHolder> {
private var mContext: Context? = null
private val listener: OnRecycleItemClickListener<AddressEntity>
constructor(
content: Context?,
listener: OnRecycleItemClickListener<AddressEntity>
) : super() {
this.listener = listener
mContext = content
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
holder.item_user_address_name?.text = bean.username + bean.mobile
holder.item_user_address?.text = bean.region + bean.address
if (bean.defaultAddress.equals("1")) {
holder.item_img_address_moren?.visibility = View.VISIBLE
} else {
holder.item_img_address_moren?.visibility = View.GONE
}
holder.item_img_edit?.setOnClickListener {
JumpUtils.EditAddressReslutJump(
bean.id,
bean.username,
bean.mobile,
bean.region,
bean.address,
bean.defaultAddress
)
}
holder.item_img_del?.setOnClickListener {
listener.onItemClick(it, position, bean)
}
holder.item_rl?.setOnClickListener {
listener.onItemClick(it, position, bean)
}
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_address, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var item_img_address_moren: ImageView?
var item_user_address_name: TextView?
var item_user_address: TextView?
var item_img_edit: ImageView?
var item_img_del: ImageView?
var item_rl: RelativeLayout?
constructor(
itemView: View
) : super(itemView) {
item_img_address_moren = itemView.findViewById<ImageView>(R.id.id_img_address_moren)
item_img_edit = itemView.findViewById<ImageView>(R.id.id_img_bianji)
item_img_del = itemView.findViewById<ImageView>(R.id.id_img_del)
item_user_address_name = itemView.findViewById<TextView>(R.id.id_tv_user_address_name)
item_user_address = itemView.findViewById<TextView>(R.id.id_tv_user_address)
item_rl = itemView.findViewById<RelativeLayout>(R.id.id_rl_item)
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.GoodList
import com.zxhl.cms.widget.RecycleImageView
class OrderAdapter : BaseRecyclerAdapter<GoodList, OrderAdapter.ViewHolder> {
private var mContext: Context? = null
constructor(
content: Context?
) : super() {
mContext = content
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
holder?.item_order_img?.setLoadImageUrl(bean.mainImage, false)
holder?.item_order_name?.text = bean.productName
holder?.item_order_num?.text = "x ${bean.amount}"
holder?.id_tv_sale_price?.text="¥ ${bean.salePriceStr}"
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_order, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var item_order_img: RecycleImageView?
var item_order_name: TextView?
var item_order_num: TextView?
var id_tv_sale_price: TextView?
constructor(
itemView: View
) : super(itemView) {
item_order_img = itemView.findViewById<RecycleImageView>(R.id.id_img_order_goods)
item_order_name = itemView.findViewById<TextView>(R.id.id_tv_order_name)
item_order_num = itemView.findViewById<TextView>(R.id.id_tv_num)
id_tv_sale_price = itemView.findViewById<TextView>(R.id.id_tv_sale_price)
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.adapter
import android.content.Context
import android.content.Intent
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.*
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.DepotEntity
import com.zxhl.cms.utils.OnRecycleItemClickListener
import com.zxhl.cms.widget.RecycleImageView
class PickUpAdapter : BaseRecyclerAdapter<DepotEntity, RecyclerView.ViewHolder> {
private var mContext: Context? = null
private val listener: OnRecycleItemClickListener<Boolean>
private val CONTENT = 1000
private val LOADMORE = 1001
private val checkStatus: MutableMap<Int, Boolean> = HashMap()
private var type: Int? = 0
//更改集合内部存储的状态
fun initCheck(flag: Boolean) {
for (i in 0 until mList.size) {
//更改指定位置的数据
checkStatus.put(i, flag)
}
}
constructor(
content: Context?,
listener: OnRecycleItemClickListener<Boolean>
) : super() {
mContext = content
this.listener = listener
initCheck(false)
}
fun setTihuo(type: Int?) {
this.type = type
notifyDataSetChanged()
}
override fun getItemCount(): Int {
val size = mList.size
if (size > 0) {
return if (isLoadMore) {
mList.size + 1
} else {
mList.size
}
} else {
return size
}
}
override fun getItemViewType(position: Int): Int {
if (isLoadMore) {
if (position == mList.size) {
return LOADMORE
} else {
return CONTENT
}
} else {
return CONTENT
}
}
private var isAllSelect = false
fun setAllSelect(isAllSelect: Boolean) {
this.isAllSelect = isAllSelect
}
private var isCancelAllSelect = false
fun setCancelAllSelect(isCancelAllSelect: Boolean) {
this.isCancelAllSelect = isCancelAllSelect
if (isCancelAllSelect) {
initCheck(false)
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
if (holder is ViewHolder) {
var bean = mList[position]
if (type == 0) {
holder.item_tv_xuni_good_tihuo?.visibility = View.GONE
} else {
holder.item_tv_xuni_good_tihuo?.visibility = View.VISIBLE
}
holder.item_img_choose?.isChecked = checkStatus[position] ?: false
holder.item_tv_xuni_good_tihuo?.setOnClickListener {
// val intent = Intent(mContext, GoodsReceiveActivity::class.java)
// intent.putExtra("goodsbean", bean)
// mContext?.startActivity(intent)
}
if (bean.boxId.equals("-2")) {
holder.item_img_xinren?.visibility = View.VISIBLE
} else {
holder.item_img_xinren?.visibility = View.GONE
}
if (isAllSelect) {
holder.item_img_choose?.isChecked = true
}
if (isCancelAllSelect) {
holder.item_img_choose?.isChecked = false
if (position == (mList.size - 1)) {
isCancelAllSelect = false
}
}
holder.item_img_goods?.setLoadImageUrl(bean.products?.mainImage, false)
holder.item_tv_good_name?.text = bean.products?.productName
holder.item_tv_good_price?.text = bean.amountSpent
} else if (holder is LoadMoreHolder) {
Glide.with(AppContext.get()).asGif().load(R.drawable.load_more).into(holder.mImg)
}
}
private var isLoadMore = true
fun setLoadMore(isBoolean: Boolean) {
isLoadMore = isBoolean
}
fun getLoadMore(): Boolean = isLoadMore
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
if (isLoadMore) {
if (viewType == LOADMORE) {
return LoadMoreHolder(
LayoutInflater.from(mContext).inflate(R.layout.item_load_more, parent, false)
)
} else {
return ViewHolder(
LayoutInflater.from(mContext)
.inflate(R.layout.item_layout_pick_up, parent, false)
)
}
} else {
return ViewHolder(
LayoutInflater.from(mContext)
.inflate(R.layout.item_layout_pick_up, parent, false)
)
}
}
inner class ViewHolder : RecyclerView.ViewHolder {
var item_rl: RelativeLayout?
var item_img_choose: CheckBox?
var item_img_goods: RecycleImageView?
var item_tv_good_name: TextView?
var item_tv_good_price: TextView?
var item_tv_xuni_good_tihuo: Button?
var item_img_xinren: ImageView?
constructor(itemView: View) : super(itemView) {
item_tv_good_name = itemView.findViewById<TextView>(R.id.id_goods_name)
item_tv_good_price = itemView.findViewById<TextView>(R.id.id_tv_good_price)
item_img_choose = itemView.findViewById<CheckBox>(R.id.id_img_choose)
item_rl = itemView.findViewById<RelativeLayout>(R.id.id_rl_item)
item_img_goods = itemView.findViewById<RecycleImageView>(R.id.id_goods_img)
item_tv_xuni_good_tihuo = itemView.findViewById<Button>(R.id.id_tv_tihuo)
item_img_xinren = itemView.findViewById<ImageView>(R.id.id_img_xiren)
item_img_choose?.setOnCheckedChangeListener { compoundButton, b ->
val pos = adapterPosition
if (pos >= 0 && pos < mList.size) {
if (b) {
item_img_choose?.setBackgroundResource(R.drawable.icon_xuanzhong)
} else {
item_img_choose?.setBackgroundResource(R.drawable.icon_xuanze)
}
checkStatus.put(position, b)
listener.onItemClick(item_rl, position, b)
}
}
item_rl?.setOnClickListener {
item_img_choose?.isChecked = !(item_img_choose?.isChecked ?: false)
// notifyItemChanged(adapterPosition)
}
}
}
class LoadMoreHolder : RecyclerView.ViewHolder {
val mImg: ImageView
constructor(itemView: View) : super(itemView) {
mImg = itemView.findViewById(R.id.id_item_more_img)
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.contract
import com.zxhl.cms.net.model.box.OrderEntity
class OrderDetailContract {
interface View {
fun setOrderData(result: OrderEntity?)
fun creatOrderSucces()
}
interface Presenter {
fun getShipping(depotIds: String,addressId:String?)
fun createOrder(addressId: String?, depotIds: String?, orderNotes: String?, outTradeNo: String?)
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.contract
import com.zxhl.cms.net.model.box.AddressEntity
class ReceiveAddressContract {
interface View {
fun setAddressData(reslut: List<AddressEntity>?)
fun delSucess()
}
interface Presenter {
fun getAddress(isDefault: String?)
fun delAddress(entity: AddressEntity?)
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.contract
import com.zxhl.cms.net.model.box.AppInEntity
import com.zxhl.cms.net.model.box.DepotEntity
import com.zxhl.cms.net.model.box.NoticeEntity
class WareHouseContract {
interface View {
fun setWareHouseData(boolean: Boolean,reslut: List<DepotEntity>?)
fun setLoadMore(isBoolean: Boolean)
fun recoverSuccess()
fun loadError()
fun setAppInfo(reslut: AppInEntity?)
fun setNotice(reslut:NoticeEntity?)
}
interface Presenter {
fun getDepot(status: Int?, type: Int?,boolean:Boolean)
fun clearPage()
fun recoverGoods(depotIds:String,recovertype:String)
fun getAppInfo()
fun getNotice()
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.presenter
import android.util.Log
import com.zxbw.modulemain.box.contract.OrderDetailContract
import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.box.OrderEntity
class OrderDetailPresenter : OrderDetailContract.Presenter {
private val mView: OrderDetailContract.View
constructor(mView: OrderDetailContract.View) {
this.mView = mView
}
override fun getShipping(depotIds: String,addressId:String?) {
ApiClient.homeApi.getShipping(depotIds,addressId)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<OrderEntity>() {
override fun onSuccess(result: OrderEntity?) {
mView.setOrderData(result)
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
Log.e("MXL","c"+code+errorMsg+e)
}
})
}
override fun createOrder(
addressId: String?,
depotIds: String?,
orderNotes: String?,
outTradeNo: String?
) {
ApiClient.homeApi.createOrder(addressId,depotIds,orderNotes,outTradeNo)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<Any>() {
override fun onSuccess(result: Any?) {
mView.creatOrderSucces()
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
Log.e("MXL","c"+code+errorMsg+e)
}
})
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.presenter
import com.zxbw.modulemain.box.contract.ReceiveAddressContract
import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.box.AddressEntity
class ReceiveAddressPresenter : ReceiveAddressContract.Presenter {
private val mView: ReceiveAddressContract.View
constructor(mView: ReceiveAddressContract.View) {
this.mView = mView
}
override fun getAddress(isDefault: String?) {
ApiClient.homeApi.getAddress(isDefault ?: "")
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<AddressEntity>>() {
override fun onSuccess(result: List<AddressEntity>?) {
if (result != null) {
mView.setAddressData(result)
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
override fun delAddress(entity: AddressEntity?) {
ApiClient.homeApi.delAddress(entity)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<Any>() {
override fun onSuccess(result: Any?) {
if (result != null) {
mView.delSucess()
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.presenter
import android.util.Log
import com.zxbw.modulemain.box.contract.WareHouseContract
import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.box.AppInEntity
import com.zxhl.cms.net.model.box.DepotEntity
import com.zxhl.cms.net.model.box.NoticeEntity
class WareHousePresenter : WareHouseContract.Presenter {
private val mView: WareHouseContract.View
constructor(mView: WareHouseContract.View) {
this.mView = mView
}
private var page: Int = 1
private val size: Int = 10
override fun getDepot(status: Int?, type: Int?, ifRefresh: Boolean) {
if (ifRefresh) {
clearPage()
}
ApiClient.homeApi.getDepot(page, size, status ?: 0, type ?: 0)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<DepotEntity>>() {
override fun onSuccess(result: List<DepotEntity>?) {
if ((result?.size ?: 0) < size) {
mView.setLoadMore(false)
} else {
mView.setLoadMore(true)
page++
}
if (result != null) {
mView.setWareHouseData(ifRefresh, result)
} else {
mView.setWareHouseData(false, null)
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.loadError()
// Log.e("MXL", "c" + code + errorMsg + e)
}
})
}
override fun clearPage() {
page = 1
}
override fun recoverGoods(depotIds: String, recover_type: String) {
ApiClient.homeApi.recoverGoods(depotIds, recover_type)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<Any>() {
override fun onSuccess(result: Any?) {
mView.recoverSuccess()
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
Log.e("MXL", "c" + code + errorMsg + e)
}
})
}
override fun getAppInfo() {
ApiClient.homeApi.getAppInfo()
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<AppInEntity>() {
override fun onSuccess(result: AppInEntity?) {
if (result != null) {
mView.setAppInfo(result)
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
override fun getNotice() {
ApiClient.homeApi.getNotice()
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<NoticeEntity>() {
override fun onSuccess(result: NoticeEntity?) {
mView.setNotice(result)
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
}
\ No newline at end of file
package com.zxbw.modulemain.contract
import com.zxhl.cms.net.model.box.NoticeEntity
import com.zxhl.cms.net.model.box.ShopOrderEntity
class BoxOrderContract {
interface View {
fun setOrderListData(boolean: Boolean,reslut: List<ShopOrderEntity>?)
fun setEmptyView(isEmpty: Boolean)
fun setNotice(reslut: NoticeEntity?)
}
interface Presenter {
fun getOrderList(ifRefresh:Boolean)
fun getNotice()
}
}
\ No newline at end of file
......@@ -2,15 +2,18 @@ package com.zxbw.modulemain.contract
import com.zxhl.cms.net.model.qy.SkillEntity
import com.zxhl.cms.net.model.qy.SkillGoodsEntity
import com.zxhl.cms.net.model.qy.ToSkillInfoEntity
class FlashSaleContract {
interface View {
fun setData(result:List<SkillEntity>?)
fun setSkillListResult(result: List<SkillGoodsEntity>?)
fun toskill(boolean: Boolean,result: ToSkillInfoEntity?)
}
interface Presenter {
fun getFlashSaleData()
fun getSkillGoodsList(durationId:String?)
fun beginSkill(durationId: String?,id:String?)
}
}
\ No newline at end of file
package com.zxbw.modulemain.contract
import com.zxhl.cms.net.model.box.ShopOrderEntity
import com.zxhl.cms.net.model.shop.ShopListEntity
class ShopOrderListContract {
interface View {
fun setShopOrderListData(boolean: Boolean,reslut: List<ShopOrderEntity>?)
fun setLoadMore(isBoolean: Boolean)
fun setEmptyView(isEmpty: Boolean)
}
interface Presenter {
fun getShopOrderList(ifRefresh:Boolean)
fun clearPage()
}
}
\ No newline at end of file
package com.zxbw.modulemain.fragment
import android.text.TextUtils
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxbw.modulemain.adapter.BoxOrderAdapter
import com.zxbw.modulemain.contract.BoxOrderContract
import com.zxbw.modulemain.presenter.BoxOrderPresenter
import com.zxhl.cms.common.base.BaseFragment
import com.zxhl.cms.net.model.box.NoticeEntity
import com.zxhl.cms.net.model.box.ShopOrderEntity
import com.zxhl.cms.utils.Utils
import kotlinx.android.synthetic.main.fragment_layout_magic_box_order.*
class MagicBoxOrderFragment:BaseFragment(), BoxOrderContract.View {
private var mPresenter: BoxOrderPresenter? = null
private var mAdapter: BoxOrderAdapter?=null
override fun layoutID(): Int {
return R.layout.fragment_layout_magic_box_order
}
override fun init(view: View?) {
mPresenter = BoxOrderPresenter(this)
mAdapter= BoxOrderAdapter(mActivity)
box_order_recyclerView.layoutManager= LinearLayoutManager(mActivity)
box_order_recyclerView.adapter=mAdapter
mPresenter?.getOrderList(true)
mPresenter?.getNotice()
refreshLayout.setColorSchemeColors(resources.getColor(R.color.color_3A95FD))
refreshLayout?.setOnRefreshListener {
mPresenter?.getOrderList(true)
}
box_order_recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState)
}
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
if (Utils.isSlideToBottom(recyclerView)) {
if ((mAdapter?.list?.size ?: 0) > 0) {
mPresenter?.getOrderList(false)
}
}
}
})
}
companion object {
fun newInstance() = MagicBoxOrderFragment()
}
override fun setOrderListData(isRefresh: Boolean, reslut: List<ShopOrderEntity>?) {
if (isRefresh) {
mAdapter?.clear()
}
setEmptyView(false)
val start = mAdapter?.getItemCount() ?: 0
mAdapter?.appendToList(reslut)
if (isRefresh) {
mAdapter?.notifyDataSetChanged()
} else {
val end = mAdapter?.getItemCount() ?: 0
mAdapter?.notifyItemRangeChanged(start, end)
}
}
override fun setEmptyView(isEmpty: Boolean) {
refreshLayout?.isRefreshing = false
if (isEmpty) {
id_order_empty.visibility = View.VISIBLE
} else {
id_order_empty.visibility = View.GONE
}
}
override fun setNotice(reslut: NoticeEntity?) {
if(!TextUtils.isEmpty(reslut?.orderNotice)){
id_ll_notice?.visibility=View.VISIBLE
id_tv_order_notice?.text=reslut?.orderNotice
}else{
id_ll_notice?.visibility=View.GONE
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.fragment
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R
import com.zxbw.modulemain.adapter.ShopOrderAdapter
import com.zxbw.modulemain.contract.ShopOrderListContract
import com.zxbw.modulemain.presenter.ShopOrderListPresenter
import com.zxhl.cms.common.base.BaseFragment
import com.zxhl.cms.net.model.box.ShopOrderEntity
import com.zxhl.cms.utils.Utils
import kotlinx.android.synthetic.main.fragment_shop_order.*
/**
* @author (wangXuewei)
* @datetime 2022-03-02 18:28 GMT+8
* @detail :
*/
class ShopOrderListFragment : BaseFragment(), ShopOrderListContract.View {
private var mPresenter: ShopOrderListPresenter? = null
private var mAdapter: ShopOrderAdapter?=null
override fun layoutID(): Int {
return R.layout.fragment_shop_order
}
override fun init(view: View?) {
mPresenter = ShopOrderListPresenter(this)
mAdapter= ShopOrderAdapter(mActivity)
recyclerView.layoutManager=LinearLayoutManager(mActivity)
recyclerView.adapter=mAdapter
mPresenter?.getShopOrderList(true)
refreshLayout.setColorSchemeColors(resources.getColor(R.color.color_3A95FD))
refreshLayout?.setOnRefreshListener {
mPresenter?.getShopOrderList(true)
}
recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
super.onScrollStateChanged(recyclerView, newState)
}
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
if (Utils.isSlideToBottom(recyclerView)) {
if ((mAdapter?.list?.size ?: 0) > 0) {
mPresenter?.getShopOrderList(false)
}
}
}
})
}
companion object {
fun newInstance() = ShopOrderListFragment()
}
override fun setShopOrderListData(isRefresh: Boolean, reslut: List<ShopOrderEntity>?) {
if (isRefresh) {
mAdapter?.clear()
}
setEmptyView(false)
val start = mAdapter?.getItemCount() ?: 0
mAdapter?.appendToList(reslut)
if (isRefresh) {
mAdapter?.notifyDataSetChanged()
} else {
val end = mAdapter?.getItemCount() ?: 0
mAdapter?.notifyItemRangeChanged(start, end)
}
}
override fun setLoadMore(isBoolean: Boolean) {
}
override fun setEmptyView(isEmpty: Boolean) {
refreshLayout?.isRefreshing = false
if (isEmpty) {
id_order_empty.visibility = View.VISIBLE
} else {
id_order_empty.visibility = View.GONE
}
}
}
\ No newline at end of file
......@@ -6,12 +6,17 @@ import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.request.RequestOptions
import com.zxbw.modulemain.R
import com.zxbw.modulemain.view.DialogUtils
import com.zxhl.cms.common.NetConfig
import com.zxhl.cms.common.base.BaseFragment
import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.SettingPreference
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.utils.AdCallback
import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.utils.UserDataUtils
import com.zxhl.cms.utils.Utils
import kotlinx.android.synthetic.main.fragment_layout_user_center.*
/**
......@@ -26,14 +31,17 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
//JumpUtils.CardVoucherJump("猫眼")
}
id_img_setting?.setOnClickListener {
JumpUtils.SettingJump()
}
id_ll_aboutus?.setOnClickListener {
JumpUtils.AbuoutUsJump()
// JumpUtils.webJump("关于我们", NetConfig.H5.WEB_URL_ABOUT_US)
// JumpUtils.webJump("关于我们", NetConfig.H5.WEB_URL_ABOUT_US)
}
id_ll_login_out?.setOnClickListener {
showToast("1")
DialogUtils.showDeleteUserIdTips(mActivity) {
deleteUser()
}
}
id_ll_xieyi_zhengze?.setOnClickListener {
JumpUtils.webJump("隐私政策", NetConfig.H5.WEB_URL_PRIVACY)
......@@ -42,10 +50,11 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
JumpUtils.webJump("用户协议", NetConfig.H5.WEB_URL_USER)
}
id_ll_my_warehouse?.setOnClickListener {
JumpUtils.WareHouseJump()
}
id_ll_shangwu_hezuo?.setOnClickListener {
//JumpUtils.WithdrawalJump()
JumpUtils.MyOrderJump("")
}
}
......@@ -65,13 +74,24 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
override fun onResult(code: Int, result: String?) {
updateView()
}
fun updateView(){
fun updateView() {
val user = SettingPreference.getUserInfoData()
if (user == null) {
return
}
id_tv_user_number?.text = user.nickname
id_tv_user_type?.text = "普通用户"
id_tv_user_number?.text = user.phone
if (user.member) {
id_tv_user_type?.visibility = View.GONE
id_img_vip?.visibility = View.VISIBLE
id_ll_trip?.visibility = View.GONE
id_tv_kaitong?.visibility = View.GONE
} else {
id_tv_user_type?.text = "普通用户"
id_img_vip?.visibility = View.GONE
id_ll_trip?.visibility = View.VISIBLE
id_tv_kaitong?.visibility = View.VISIBLE
}
if (!TextUtils.isEmpty(user.headImage)) {
Glide.with(this).load(user.headImage)
.apply(RequestOptions.bitmapTransform(CircleCrop()))
......@@ -81,4 +101,25 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
id_img_user_head.setImageResource(R.drawable.icon_head_defalt)
}
}
fun deleteUser() {
ApiClient.homeApi.getLoginOut()
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<Any>() {
override fun onSuccess(result: Any?) {
if (result != null) {
SettingPreference.saveToken("")
SettingPreference.saveUserInfo(null)
//JumpUtils.loginJump()
mActivity.finish()
Utils.onExit(mActivity)
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
}
\ No newline at end of file
package com.zxbw.modulemain.presenter
import com.zxbw.modulemain.contract.BoxOrderContract
import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.box.NoticeEntity
import com.zxhl.cms.net.model.box.ShopOrderEntity
class BoxOrderPresenter : BoxOrderContract.Presenter {
private val mView: BoxOrderContract.View
constructor(mView: BoxOrderContract.View) {
this.mView = mView
}
private var page: Int = 1
private val size: Int = 10
private var isMore = false
override fun getOrderList(ifRefresh: Boolean) {
if (ifRefresh) {
page = 1
isMore = false
} else if (isMore) {
return
}
isMore = true
ApiClient.homeApi.getOrder(page, size)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<ShopOrderEntity>>() {
override fun onSuccess(result: List<ShopOrderEntity>?) {
if (result != null) {
if (!result.isNullOrEmpty()) {
if (result.size <= size) {
page++
isMore = false
} else {
isMore = true
}
mView.setOrderListData(ifRefresh, result)
} else {
if (page == 1) {
mView.setEmptyView(true)
}
}
} else {
mView.setEmptyView(true)
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
// Log.d("wxw", "goodsListError " + code + " errorMsg " + errorMsg)
// mView.setEmptyView(true)
}
})
}
override fun getNotice() {
ApiClient.homeApi.getNotice()
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<NoticeEntity>() {
override fun onSuccess(result: NoticeEntity?) {
mView.setNotice(result)
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.qy.SkillEntity
import com.zxhl.cms.net.model.qy.SkillGoodsEntity
import com.zxhl.cms.net.model.qy.ToSkillInfoEntity
class FlashSalePresenter : FlashSaleContract.Presenter {
private val mView: FlashSaleContract.View
......@@ -39,4 +40,18 @@ class FlashSalePresenter : FlashSaleContract.Presenter {
}
})
}
//开始秒杀
override fun beginSkill(durationId: String?, id: String?) {
ApiClient.homeApi.beginskill(durationId, id).compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<ToSkillInfoEntity>() {
override fun onSuccess(result: ToSkillInfoEntity?) {
mView?.toskill(true, result)
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView?.toskill(false, null)
}
})
}
}
\ No newline at end of file
package com.zxbw.modulemain.presenter
import com.zxbw.modulemain.contract.ShopOrderListContract
import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.box.ShopOrderEntity
class ShopOrderListPresenter : ShopOrderListContract.Presenter {
private val mView: ShopOrderListContract.View
constructor(mView: ShopOrderListContract.View) {
this.mView = mView
}
private var page: Int = 1
private val size: Int = 10
private var isMore = false
override fun getShopOrderList(ifRefresh: Boolean) {
if (ifRefresh) {
page = 1
isMore = false
} else if (isMore) {
return
}
isMore = true
ApiClient.homeApi.getBoxOrderShop(page, size)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<ShopOrderEntity>>() {
override fun onSuccess(result: List<ShopOrderEntity>?) {
if (result != null) {
if(!result.isNullOrEmpty()){
if (result.size <= size) {
page++
isMore = false
} else {
isMore = true
}
mView.setShopOrderListData(ifRefresh, result)
}else{
if(page==1){
mView.setEmptyView(true)
}
}
}else{
mView.setEmptyView(true)
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
// Log.d("wxw", "goodsListError " + code + " errorMsg " + errorMsg)
// mView.setEmptyView(true)
}
})
}
override fun clearPage() {
page = 1
}
}
\ No newline at end of file
......@@ -373,5 +373,28 @@ object DialogUtils {
mDialog.setCancelable(true)
mDialog.show()
}
//显示删除用户提示弹窗
fun showDeleteUserIdTips(context: Activity?, deleteListener: View.OnClickListener) {
if (context == null) return
val mDialog = Dialog(context, R.style.CenterCompatDialogTheme)
val mDialogView =
showBottomDialog(
R.layout.dialog_layout_delete_id_tips,
context,
mDialog,
0,
Gravity.CENTER
)
mDialogView.findViewById<TextView>(R.id.id_btn_cancel).setOnClickListener {
mDialog.dismiss()
}
mDialogView.findViewById<TextView>(R.id.id_btn_ok).setOnClickListener {
mDialog.dismiss()
deleteListener.onClick(it)
}
mDialog.setCanceledOnTouchOutside(false)
mDialog.setCancelable(false)
mDialog.show()
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ff4c84ff" />
<corners android:radius="3dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffeaf0ff" />
<corners android:radius="5dp" />
<item android:name="android:shadowColor">#ffededed</item>
<item android:name="android:shadowDx">0</item>
<item android:name="android:shadowDy">1</item>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffeaf0ff" />
<corners android:radius="5dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:endColor="#ff4c84ff"
android:startColor="#ff83baff"
android:type="linear"
android:useLevel="true" />
<corners android:radius="19dp" />
<item android:name="android:shadowColor">#b33f75e8</item>
<item android:name="android:shadowDx">0</item>
<item android:name="android:shadowDy">1</item>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#ffff2e31" />
<solid android:color="#ffffe3e3" />
<corners android:radius="15dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FF2E31" />
<corners android:radius="25dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#ff666666" />
<solid android:color="#ffffffff" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#ff666666" />
<solid android:color="#ffffffff" />
<corners android:radius="15dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#f0f0f0" />
<solid android:color="#ffffff" />
<corners android:radius="5dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fffff8ef" />
<corners android:radius="5dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffff2e31" />
<corners android:radius="18dp" />
</shape>
\ No newline at end of file
......@@ -42,6 +42,7 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="24dp"
android:layout_marginRight="16dp"
android:visibility="gone"
android:layout_marginBottom="20dp">
<ImageView
......@@ -80,6 +81,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="24dp"
android:layout_marginRight="16dp">
<ImageView
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:background="@color/white">
<ImageView
android:id="@+id/id_img_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:padding="15dp"
android:src="@drawable/icon_fanhui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="12dp"
android:includeFontPadding="false"
android:text="我的订单"
android:textColor="@color/color_333333"
android:textSize="18sp" />
</RelativeLayout>
<com.zxhl.cms.widget.TabPagerIndicator
android:id="@+id/id_fragment_order_tab"
android:layout_width="match_parent"
android:layout_height="40dp"
app:defaultTabTextColor="@color/color_051a27"
app:defaultTabTextHorizontalPadding="12dp"
app:defaultTabTextSize="18sp"
app:indicatorColor="@color/transparent"
android:visibility="gone"
app:indicatorCornerRadius="2dp"
app:indicatorIndent="5dp"
app:indicatorInterpolation="smart"
app:indicatorMarginTop="41dp"
app:indicatorThickness="3dp"
app:titleOffset="auto_center"
/>
<androidx.viewpager.widget.ViewPager
android:id="@+id/order_viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F6F6F6"
android:fitsSystemWindows="true">
<RelativeLayout
android:id="@+id/id_rl_address_title"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white">
<ImageView
android:id="@+id/id_img_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:padding="15dp"
android:src="@drawable/icon_fanhui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:includeFontPadding="false"
android:text="收货地址"
android:textColor="@color/color_333333"
android:textStyle="bold" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_rl_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/id_rl_address_title"
android:paddingBottom="70dp"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_alignParentBottom="true"
android:background="@color/white">
<TextView
android:id="@+id/id_tv_add_address"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_ff2e31_r25"
android:gravity="center"
android:text="新增收货地址"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F3F4F5">
<RelativeLayout
android:id="@+id/id_rl_title"
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="@color/white">
<ImageView
android:id="@+id/id_img_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:padding="16dp"
android:src="@drawable/icon_fanhui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="15dp"
android:text="设置"
android:textColor="@color/color_333333"
android:textSize="16sp"
android:textStyle="bold" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/id_rl_title"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#EBEBEB" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/id_img_user_head"
android:layout_width="58dp"
android:layout_height="58dp"
android:layout_marginTop="15dp"
android:src="@drawable/icon_head_defalt" />
<TextView
android:id="@+id/id_tv_user_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="13dp"
android:textColor="@color/color_666666"
android:textSize="16sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#EBEBEB" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@color/white"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/color_333333"
android:textSize="16sp"
android:text="手机号码" />
<TextView
android:id="@+id/id_tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/color_999999"
android:textSize="14sp"
android:text="123455" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#EBEBEB" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/color_333333"
android:textSize="16sp"
android:text="版本" />
<TextView
android:id="@+id/id_tv_version_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/color_999999"
android:textSize="14sp"
android:text="v1.0" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/id_ll_tuichui_denglu"
android:layout_width="match_parent"
android:layout_height="58dp"
android:layout_alignParentBottom="true"
android:gravity="center"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="退出登录"
android:textSize="16sp"
android:textColor="@color/color_333333"/>
</LinearLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F8F8F8"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="68dp"
android:background="@color/white">
<ImageView
android:id="@+id/id_img_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:padding="15dp"
android:src="@drawable/icon_fanhui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="12dp"
android:includeFontPadding="false"
android:text="@string/ware_house"
android:textColor="@color/color_333333"
android:textSize="18sp" />
</RelativeLayout>
<com.zxhl.cms.widget.TabPagerIndicator
android:id="@+id/id_fragment_ware_house_tab"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
app:defaultTabTextColor="@color/color_051a27"
app:defaultTabTextHorizontalPadding="12dp"
app:defaultTabTextSize="18sp"
app:indicatorColor="@color/transparent"
app:indicatorCornerRadius="2dp"
app:indicatorIndent="5dp"
app:indicatorInterpolation="smart"
app:indicatorMarginTop="41dp"
app:indicatorThickness="3dp"
app:titleOffset="auto_center"
android:visibility="gone"/>
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
......@@ -373,14 +373,24 @@
android:textSize="11sp" />
<LinearLayout
android:id="@+id/id_ll_agree"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/id_img_agree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_weigouxuan" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:text="登录或注册即代表你同意"
android:textColor="@color/color_999999"
android:textSize="11sp" />
......@@ -389,7 +399,7 @@
android:id="@+id/id_tv_yonghu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《省点花用户协议》"
android:text="《小象省钱用户协议》"
android:textColor="#B28A17"
android:textSize="11sp" />
......@@ -404,7 +414,7 @@
android:id="@+id/id_tv_yinsi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《省点花隐私政策》"
android:text="《小象省钱隐私政策》"
android:textColor="#B28A17"
android:textSize="11sp" />
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="40dp"
android:background="@drawable/shape_ffffff_r10"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="温馨提示"
android:textColor="@color/color_333333"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="账号一旦注销,您将无法登录、使用该账号,无法再以此账号继续使用平台的产品与服务,平台会有30天缓冲期,在缓冲期内仍可以登录使用该帐号,如要取消注销请联系在线客服进行处理,超过30天缓冲期将无法取消注销操作。"
android:textColor="@color/color_666666"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/id_btn_cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="暂不注销"
android:textColor="@color/color_333333"
android:textSize="15sp"
android:textStyle="bold" />
<View
android:layout_width="1dp"
android:layout_height="16dp"
android:background="#DEDEDE" />
<TextView
android:id="@+id/id_btn_ok"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="立即注销"
android:textColor="@color/color_ff2e31"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F6F6F6"
android:orientation="vertical">
<LinearLayout
android:id="@+id/id_ll_notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/shape_eaf0ff_r5"
android:visibility="gone">
<TextView
android:id="@+id/id_tv_order_notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="5dp"
android:textColor="#2669FF"
android:textSize="12sp" />
</LinearLayout>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/box_order_recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/id_order_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="160dp"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:src="@drawable/icon_kong" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="订单空空如也"
android:textColor="@color/color_999999"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -79,7 +79,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="7dp"
android:text="156****12453"
android:textColor="#452608"
android:textSize="16sp" />
......@@ -96,6 +95,7 @@
android:textColor="@color/white"
android:textSize="10sp" />
<ImageView
android:id="@+id/id_img_vip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/mark_vip"
......@@ -120,6 +120,7 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/id_ll_trip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/id_ll_member"
......@@ -190,6 +191,7 @@
android:layout_weight="1" />
<TextView
android:id="@+id/id_tv_kaitong"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
......@@ -391,10 +393,8 @@
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/id_ll_login_out"
android:id="@+id/id_ll_aboutus"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -405,16 +405,18 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:src="@drawable/icon_yonghuzhuxiao" />
android:src="@drawable/icon_guanyuwomen" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用户注销"
android:text="关于我们"
android:textColor="@color/color_333333"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/id_ll_xieyi_zhengze"
android:layout_width="0dp"
......@@ -488,9 +490,8 @@
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/id_ll_aboutus"
android:id="@+id/id_ll_login_out"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
......@@ -501,16 +502,17 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:src="@drawable/icon_guanyuwomen" />
android:src="@drawable/icon_yonghuzhuxiao" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="关于我们"
android:text="用户注销"
android:textColor="@color/color_333333"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
......
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F6F6F6">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/id_order_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:visibility="gone"
android:layout_gravity="center_horizontal"
android:layout_marginTop="160dp"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:src="@drawable/icon_kong" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="订单空空如也,快去商城下单吧"
android:textColor="@color/color_999999"
android:textSize="13sp" />
</LinearLayout>
</FrameLayout>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -4,6 +4,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<RelativeLayout
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center">
<ImageView
android:id="@+id/id_item_more_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment