Commit 3c84d046 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :加入盲盒类型和会员支付页
parent 9fdfaddb
...@@ -160,6 +160,6 @@ public interface IUserInfoApi { ...@@ -160,6 +160,6 @@ public interface IUserInfoApi {
* @return * @return
*/ */
@POST(NetConfig.User.URL_PAY_RIGHTS_ORDER) @POST(NetConfig.User.URL_PAY_RIGHTS_ORDER)
Observable<Response<AliPayEntity>> aliPayRights(@Query("goodsId") String goodsId, @Query("payType") String payType,@Query("phone") String phone); Observable<Response<AliPayEntity>> aliPayRights(@Query("goodsId") String goodsId, @Query("payType") String payType, @Query("phone") String phone,@Query("rechargeType") String rechargeType);
} }
package com.zxhl.cms.net.model.box package com.zxhl.cms.net.model.box
class TabEntity { class TabEntity {
var name: String? = "" var use: String = ""
var name: String = ""
var id: String? = "" var id: String? = ""
var value: String? = "" var value: String = ""
} }
\ No newline at end of file
package com.zxhl.cms.net.model.qy package com.zxhl.cms.net.model.qy
import com.zxhl.cms.net.model.box.GoodList
import com.zxhl.cms.net.model.box.HomeBoxListEntity
import java.io.Serializable import java.io.Serializable
/** /**
...@@ -49,5 +51,37 @@ class TbGoodsItemEntity : Serializable { ...@@ -49,5 +51,37 @@ class TbGoodsItemEntity : Serializable {
var coupon_start_time: String? = "" var coupon_start_time: String? = ""
var coupon_end_time: String? = "" var coupon_end_time: String? = ""
var viewType: Int = 3 //BoxEntity============================================S
var id: String? = ""
var boxId: String? = ""
var mainImage: String? = ""
var boxName: String? = ""
var description: String? = ""
var onePrice: Double? =0.0
var fivePrice: Double? =0.0
var totalSalesVolume: String? =""
var goodsList:List<GoodList>?=null
var headImages:List<String>?=null
var otherList:List<HomeBoxListEntity>?=null
var maxPriceStr: String? = ""
var minPriceStr: String? = ""
var onePriceStr: String? = ""
var text: String? = ""
var fiveShow: Int? = 1
var activitiesType: Int? = 0
var activitiesPrice: String? = ""
var activitiesRefreshImage: String? = ""
var activitiesRefreshName: String? = ""
var newUserPrice: String? = ""
var activitiesTimes: Int? = 0
var activitiesRefreshId: String = ""
var activitiesDiscount: String? = ""
var originalPrice: String = ""
var discount: String = ""
var bannerType: String = ""
//BoxEntity============================================E
} }
\ No newline at end of file
...@@ -2,6 +2,8 @@ package com.zxhl.cms.pay ...@@ -2,6 +2,8 @@ package com.zxhl.cms.pay
import android.app.Activity import android.app.Activity
import android.app.Dialog import android.app.Dialog
import android.content.Intent
import android.net.Uri
import android.net.http.SslError import android.net.http.SslError
import android.os.Handler import android.os.Handler
import android.util.Log import android.util.Log
...@@ -51,7 +53,7 @@ object PayDialog : PayContract.View { ...@@ -51,7 +53,7 @@ object PayDialog : PayContract.View {
private var mDialog: Dialog? = null; private var mDialog: Dialog? = null;
private var mPayFunAdapter: PaymentFunAdapter? = null; private var mPayFunAdapter: PaymentFunAdapter? = null;
private var mActivity: Activity? = null
private var mHandler: Handler = Handler { private var mHandler: Handler = Handler {
when (it.what) { when (it.what) {
0 -> { 0 -> {
...@@ -75,6 +77,7 @@ object PayDialog : PayContract.View { ...@@ -75,6 +77,7 @@ object PayDialog : PayContract.View {
if (mDialog == null) { if (mDialog == null) {
mDialog = Dialog(context, R.style.CenterCompatDialogTheme) mDialog = Dialog(context, R.style.CenterCompatDialogTheme)
} }
mActivity = context
mPayCallBack = payCallBack mPayCallBack = payCallBack
val mDialogView = val mDialogView =
CenterDialog.showBottomDialog( CenterDialog.showBottomDialog(
...@@ -311,8 +314,8 @@ object PayDialog : PayContract.View { ...@@ -311,8 +314,8 @@ object PayDialog : PayContract.View {
try { try {
if (url.startsWith("alipays://") //支付宝 if (url.startsWith("alipays://") //支付宝
) { ) {
// val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
// startActivity(intent) mActivity?.startActivity(intent)
return true return true
} }
} catch (e: Exception) { //防止crash (如果手机上没有安装处理某个scheme开头的url的APP, 会导致crash) } catch (e: Exception) { //防止crash (如果手机上没有安装处理某个scheme开头的url的APP, 会导致crash)
......
...@@ -209,6 +209,9 @@ interface RounterApi { ...@@ -209,6 +209,9 @@ interface RounterApi {
@RounterUri(Constant.scheme + "://tb_goods_detail") @RounterUri(Constant.scheme + "://tb_goods_detail")
fun getIntentTbGoodsDetail(): Intent fun getIntentTbGoodsDetail(): Intent
@RounterUri(Constant.scheme + "://member_order")
fun getIntentMemberOrder(): Intent
@RounterUri(Constant.scheme + "://after_login") @RounterUri(Constant.scheme + "://after_login")
fun getIntentAfterLogin( fun getIntentAfterLogin(
@RounterParam("boxid") boxid: String, @RounterParam("boxid") boxid: String,
......
...@@ -63,6 +63,17 @@ public class JumpUtils { ...@@ -63,6 +63,17 @@ public class JumpUtils {
} }
} }
//开会员订单
public static void MemberOrderJump() {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentMemberOrder();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
AppContext.get().startActivity(intent);
} catch (Exception e) {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
public static void AfterLoginJump(String boxid, String needprice, String type, String onePrice, String fivePrice, String newPeople, String page) { public static void AfterLoginJump(String boxid, String needprice, String type, String onePrice, String fivePrice, String newPeople, String page) {
try { try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentAfterLogin(boxid, needprice, type, onePrice, fivePrice, newPeople, page); Intent intent = RounterBus.getRounter(RounterApi.class).getIntentAfterLogin(boxid, needprice, type, onePrice, fivePrice, newPeople, page);
...@@ -369,6 +380,7 @@ public class JumpUtils { ...@@ -369,6 +380,7 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!"); Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
} }
} }
public static void FlashSaleJump() { public static void FlashSaleJump() {
try { try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentFlashSale(); Intent intent = RounterBus.getRounter(RounterApi.class).getIntentFlashSale();
...@@ -378,6 +390,7 @@ public class JumpUtils { ...@@ -378,6 +390,7 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!"); Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
} }
} }
public static void WithdrawalJump() { public static void WithdrawalJump() {
try { try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentWithdrawal(); Intent intent = RounterBus.getRounter(RounterApi.class).getIntentWithdrawal();
......
...@@ -129,6 +129,18 @@ ...@@ -129,6 +129,18 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".activity.OpenMemberOrderActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="member_order"
android:scheme="xxsq" />
</intent-filter>
</activity>
</application> </application>
......
package com.zxbw.modulemain.activity
import android.view.View
import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.net.model.box.AppInEntity
import com.zxhl.cms.net.model.video.MemberEntity
import com.zxhl.cms.pay.PayContract
import com.zxhl.cms.pay.PayPresenter
/**
* @author (wangXuewei)
* @datetime 2022-05-30 14:12 GMT+8
* @detail :
*/
class OpenMemberOrderActivity : BaseActivity(),PayContract.View {
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
}
override fun onClick(v: View?) {
}
override fun layoutID(): Int {
return R.layout.activity_layout_member_order
}
override fun init() {
}
override fun updatePriceList(data: List<MemberEntity.ProductDetail>) {
}
override fun verifyOrderFail(errorMsg: String) {
}
override fun requestOrderSuc() {
}
override fun requestH5OrderSuc(form: String) {
}
override fun verifyOrderSuc(orsder: String) {
}
override fun setCanInvest(boolean: Boolean?) {
}
override fun setOrderNo(order: String?) {
}
override fun setAppInfo(result: AppInEntity?) {
}
}
\ No newline at end of file
package com.zxbw.modulemain.activity package com.zxbw.modulemain.activity
import android.content.Intent
import android.net.Uri
import android.os.Handler import android.os.Handler
import android.text.Html import android.text.Html
import android.util.Log import android.util.Log
import android.view.View import android.view.View
import android.webkit.*
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop import com.bumptech.glide.load.resource.bitmap.CircleCrop
...@@ -16,27 +19,21 @@ import com.zxbw.modulemain.presenter.RightsDetailPresenter ...@@ -16,27 +19,21 @@ import com.zxbw.modulemain.presenter.RightsDetailPresenter
import com.zxbw.modulemain.presenter.RightsPayPresenter import com.zxbw.modulemain.presenter.RightsPayPresenter
import com.zxhl.cms.AppContext import com.zxhl.cms.AppContext
import com.zxhl.cms.common.Constant import com.zxhl.cms.common.Constant
import com.zxhl.cms.common.NetConfig
import com.zxhl.cms.common.base.BaseActivity import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.net.SettingPreference import com.zxhl.cms.net.SettingPreference
import com.zxhl.cms.net.model.box.AppInEntity
import com.zxhl.cms.net.model.qy.JgqQyEntity
import com.zxhl.cms.net.model.qy.RightsDetailEntity import com.zxhl.cms.net.model.qy.RightsDetailEntity
import com.zxhl.cms.net.model.uc.AliPayEntity import com.zxhl.cms.net.model.uc.AliPayEntity
import com.zxhl.cms.net.model.uc.PayResultEntity import com.zxhl.cms.net.model.uc.PayResultEntity
import com.zxhl.cms.net.model.video.MemberEntity import com.zxhl.cms.pay.PayActivity
import com.zxhl.cms.pay.PayContract
import com.zxhl.cms.pay.PayPresenter
import com.zxhl.cms.pay.alipay.AlipayServer import com.zxhl.cms.pay.alipay.AlipayServer
import com.zxhl.cms.utils.EventUtils import com.zxhl.cms.utils.*
import com.zxhl.cms.utils.MainLooper
import com.zxhl.cms.utils.OnRecycleItemClickListener
import com.zxhl.cms.utils.RxBus
import com.zxhl.cms.widget.LoadingDialog import com.zxhl.cms.widget.LoadingDialog
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer import io.reactivex.functions.Consumer
import kotlinx.android.synthetic.main.activity_layout_rights_detail.* import kotlinx.android.synthetic.main.activity_layout_rights_detail.*
import kotlinx.android.synthetic.main.activity_login.* import kotlinx.android.synthetic.main.activity_layout_rights_detail.id_img_back
import me.jessyan.autosize.utils.ScreenUtils import me.jessyan.autosize.utils.ScreenUtils
import java.text.DecimalFormat import java.text.DecimalFormat
...@@ -147,7 +144,6 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa ...@@ -147,7 +144,6 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
mLoading?.setLoading("请稍后...") mLoading?.setLoading("请稍后...")
mLoading?.show() mLoading?.show()
mPayPresenter?.requestRightsAliPay(mRightsData?.id ?: "", pay_type.toString(), phoneNumber) mPayPresenter?.requestRightsAliPay(mRightsData?.id ?: "", pay_type.toString(), phoneNumber)
} }
private var payResultObservable: Observable<PayResultEntity>? = null private var payResultObservable: Observable<PayResultEntity>? = null
...@@ -157,9 +153,10 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa ...@@ -157,9 +153,10 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
const val WECHAT_PAY = 2 //微信支付类型 const val WECHAT_PAY = 2 //微信支付类型
const val MINI_PROGRAM = 11 //微信支付类型 const val MINI_PROGRAM = 11 //微信支付类型
const val MIN_PAY_PROGRAM = 13 //敏付 const val MIN_PAY_PROGRAM = 13 //敏付
const val H5_PAY = 21 //h5支付
} }
private var pay_type: Int? = ALI_PAY private var pay_type: Int? = H5_PAY
private fun initPay() { private fun initPay() {
mLoading = LoadingDialog.getLoadingDialog( mLoading = LoadingDialog.getLoadingDialog(
this, this,
...@@ -193,6 +190,18 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa ...@@ -193,6 +190,18 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
showResultLoading(false) showResultLoading(false)
} }
}, Consumer<Throwable> { }) }, Consumer<Throwable> { })
var result = SettingPreference.getConfig()
if (result != null) {
if (result != null && !result.pay_config_v2.isNullOrEmpty()) {
for (i in result.pay_config_v2!!.indices) {
if (result?.pay_config_v2!![i].open == 1) {
pay_type = result?.pay_config_v2!![i].type
break
}
}
}
}
} }
private var mHandler: Handler = Handler { private var mHandler: Handler = Handler {
...@@ -207,7 +216,22 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa ...@@ -207,7 +216,22 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
} }
override fun requestOrderSuc(result: AliPayEntity) { override fun requestOrderSuc(result: AliPayEntity) {
AlipayServer.payV2(this, result.wakeup!!) if (pay_type == MIN_PAY_PROGRAM) {
SettingPreference.setOutTradeNo(result?.outTradeNo)
JumpUtils.h5Jump("https://api.minpayment.com/pay.do?sendMsg=" + result.wakeup)
} else if (pay_type == H5_PAY) {
SettingPreference.setOutTradeNo(result?.outTradeNo)
if (result.outTradeNo.isNullOrEmpty()) {
EventUtils.onEvent("h5_pay_error")
showResultLoading(false)
} else {
loadH5Pay(result.outTradeNo!!)
}
} else if (pay_type == ALI_PAY) {
AlipayServer.payV2(this, result.wakeup!!)
} else {
showToast("暂不支持")
}
} }
override fun requestOrderFail(errorMsg: String) { override fun requestOrderFail(errorMsg: String) {
...@@ -216,11 +240,14 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa ...@@ -216,11 +240,14 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
override fun verifyOrderSuc(order: String) { override fun verifyOrderSuc(order: String) {
showResultLoading(true) showResultLoading(true)
showToast("成功!")
Log.d("wxw","成功")
} }
override fun verifyOrderFail(errorMsg: String) { override fun verifyOrderFail(errorMsg: String) {
showResultLoading(false) showResultLoading(false)
} }
private fun showResultLoading(isPaySuc: Boolean) { private fun showResultLoading(isPaySuc: Boolean) {
if (isPaySuc) { if (isPaySuc) {
mLoading?.setResult(true, "支付成功", 1000) mLoading?.setResult(true, "支付成功", 1000)
...@@ -228,9 +255,104 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa ...@@ -228,9 +255,104 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
mLoading?.setResult(false, "支付失败", 1000) mLoading?.setResult(false, "支付失败", 1000)
} }
} }
override fun onPause() {
super.onPause()
isPause = true
}
private var isPause = false
override fun onResume() {
super.onResume()
Log.d("wxw","OnResume")
if (isPause) {
Log.d("wxw","1OnResume"+pay_type)
if (pay_type == PayActivity.MIN_PAY_PROGRAM || pay_type == PayActivity.H5_PAY) {
//如果是敏支付或者H5支付
mPayPresenter?.verifyPay(SettingPreference.getOutTradeNo(), pay_type!!)
} else {
Log.d("wxw","2OnResume"+pay_type)
mHandler?.sendEmptyMessageDelayed(0, 2000)
}
}
}
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
if (payResultObservable != null) if (payResultObservable != null)
RxBus.get().unregister(Constant.PAY_RESULT, payResultObservable!!) RxBus.get().unregister(Constant.PAY_RESULT, payResultObservable!!)
} }
private fun loadH5Pay(form: String) {
// id_rights_pay_web_view.visibility = View.VISIBLE
Log.d("wxw", "startTime" + System.currentTimeMillis())
val webSettings = id_rights_pay_web_view.settings
//如果访问的页面中要与Javascript交互,则webview必须设置支持Javascript
webSettings.javaScriptEnabled = true
//设置自适应屏幕,两者合用
webSettings.useWideViewPort = true //将图片调整到适合webview的大小
webSettings.loadWithOverviewMode = true // 缩放至屏幕的大小
//其他细节操作
webSettings.cacheMode = WebSettings.LOAD_NO_CACHE //关闭webview中缓存
webSettings.allowFileAccess = true //设置可以访问文件
webSettings.javaScriptCanOpenWindowsAutomatically = true //支持通过JS打开新窗口
webSettings.loadsImagesAutomatically = true //支持自动加载图片
webSettings.defaultTextEncodingName = "utf-8" //设置编码格式
webSettings.domStorageEnabled = true
webSettings.allowFileAccessFromFileURLs = true;
webSettings.allowUniversalAccessFromFileURLs = true;
id_rights_pay_web_view?.webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
Log.e("WXW", "dURL" + url.toString())
if (url == null) return false
try {
if (url.startsWith("alipays://") //支付宝
) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(intent)
return true
}
} catch (e: Exception) { //防止crash (如果手机上没有安装处理某个scheme开头的url的APP, 会导致crash)
EventUtils.onEvent("h5_open_zfb_error", e.toString())
showResultLoading(false)
return true //没有安装该app时,返回true,表示拦截自定义链接,但不跳转,避免弹出上面的错误页面
}
//处理http和https开头的url
view?.loadUrl(url)
return false
}
override fun onPageFinished(view: WebView?, url: String?) {
Log.e("WXW", "cURL" + url.toString())
Log.d("wxw", "EndTime" + System.currentTimeMillis())
super.onPageFinished(view, url)
if (url?.contains(NetConfig.H5.WEB_URL_H5_PAY) == true) {
id_rights_pay_web_view?.loadUrl("javascript:loadPayHtml('$form')");
}
}
override fun onReceivedError(
view: WebView?,
request: WebResourceRequest?,
error: WebResourceError?
) {
super.onReceivedError(view, request, error)
EventUtils.onEvent("h5_pay_error1", error.toString())
showResultLoading(false)
}
override fun onReceivedHttpError(
view: WebView?,
request: WebResourceRequest?,
errorResponse: WebResourceResponse?
) {
super.onReceivedHttpError(view, request, errorResponse)
EventUtils.onEvent("h5_pay_error2", errorResponse.toString())
showResultLoading(false)
}
}
id_rights_pay_web_view.loadUrl(NetConfig.H5.WEB_URL_H5_PAY)
}
} }
\ No newline at end of file
...@@ -33,7 +33,7 @@ import me.jessyan.autosize.utils.ScreenUtils ...@@ -33,7 +33,7 @@ import me.jessyan.autosize.utils.ScreenUtils
* @datetime 2022-05-24 17:12 GMT+8 * @datetime 2022-05-24 17:12 GMT+8
* @detail : 淘宝商品详情 * @detail : 淘宝商品详情
*/ */
class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View,OnRecycleItemClickListener<TbGoodsItemEntity> {
private var mLoading: LoadingDialog? = null private var mLoading: LoadingDialog? = null
private var mGoodsAdapter: GoodsListAdapter? = null; private var mGoodsAdapter: GoodsListAdapter? = null;
private var mPresenter: TbGoodsDetailPresenter? = null; private var mPresenter: TbGoodsDetailPresenter? = null;
...@@ -60,21 +60,15 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { ...@@ -60,21 +60,15 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View {
// mPresenter?.getGoodsDetail(goodsDetail?.item_id ?: "") // mPresenter?.getGoodsDetail(goodsDetail?.item_id ?: "")
} }
private fun refreshData(){ private fun refreshData() {
mPresenter = TbGoodsDetailPresenter(this) mPresenter = TbGoodsDetailPresenter(this)
mGoodsAdapter = GoodsListAdapter(this, mGoodsAdapter = GoodsListAdapter(this,this)
OnRecycleItemClickListener<TbGoodsItemEntity> { view, position, data ->
var intent = Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.putExtra("goods", data)
intent.setClass(this, TbGoodsDetailActivity().javaClass)
startActivity(intent)
})
id_rcl_recommend_goods_list?.layoutManager = LinearLayoutManager(this) id_rcl_recommend_goods_list?.layoutManager = LinearLayoutManager(this)
id_rcl_recommend_goods_list.adapter = mGoodsAdapter id_rcl_recommend_goods_list.adapter = mGoodsAdapter
id_img_close_btn?.setOnClickListener(this) id_img_close_btn?.setOnClickListener(this)
id_ll_tb_buy_view?.setOnClickListener(this) id_ll_tb_buy_view?.setOnClickListener(this)
id_tv_open_vip_btn?.setOnClickListener(this)
initView() initView()
...@@ -90,8 +84,8 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { ...@@ -90,8 +84,8 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View {
override fun onNewIntent(intent: Intent?) { override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent) super.onNewIntent(intent)
Log.d("wxw","newIntent") Log.d("wxw", "newIntent")
if (intent!=null){ if (intent != null) {
goodsDetail = intent.getSerializableExtra("goods") as TbGoodsItemEntity goodsDetail = intent.getSerializableExtra("goods") as TbGoodsItemEntity
refreshData() refreshData()
} }
...@@ -112,7 +106,7 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { ...@@ -112,7 +106,7 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View {
id_tv_tm_price?.text = goodsDetail?.reserve_price id_tv_tm_price?.text = goodsDetail?.reserve_price
id_tv_tm_buy_price?.text = goodsDetail?.reserve_price id_tv_tm_buy_price?.text = goodsDetail?.reserve_price
id_tv_sale_num?.text = goodsDetail?.volume ?: "0" id_tv_sale_num?.text = goodsDetail?.volume ?: "0"
id_tv_not_vip_desc.text = "会员下单,立省${goodsDetail?.coupon_amount?.toDoubleOrNull() ?: 0}元"
if (goodsDetail?.coupon_amount.isNullOrEmpty()) { if (goodsDetail?.coupon_amount.isNullOrEmpty()) {
id_tv_xx_price?.text = "${goodsDetail?.reserve_price}" id_tv_xx_price?.text = "${goodsDetail?.reserve_price}"
id_tv_vip_buy_price?.text = "${goodsDetail?.reserve_price}" id_tv_vip_buy_price?.text = "${goodsDetail?.reserve_price}"
...@@ -128,6 +122,7 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { ...@@ -128,6 +122,7 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View {
id_tv_xx_price?.text = vipPrice id_tv_xx_price?.text = vipPrice
id_tv_vip_buy_price?.text = vipPrice id_tv_vip_buy_price?.text = vipPrice
} }
if (!goodsDetail?.small_images.isNullOrEmpty()) { if (!goodsDetail?.small_images.isNullOrEmpty()) {
var mPagerAdapter = DetailBannerAdapter(goodsDetail?.small_images!!) var mPagerAdapter = DetailBannerAdapter(goodsDetail?.small_images!!)
id_detail_top_banner.adapter = mPagerAdapter id_detail_top_banner.adapter = mPagerAdapter
...@@ -157,6 +152,9 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { ...@@ -157,6 +152,9 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View {
id_img_close_btn -> { id_img_close_btn -> {
finish() finish()
} }
id_tv_open_vip_btn -> {
JumpUtils.MemberOrderJump()
}
id_ll_tb_buy_view -> { id_ll_tb_buy_view -> {
if (tbLink == "") { if (tbLink == "") {
showToast("未获取到信息,请重试") showToast("未获取到信息,请重试")
...@@ -189,7 +187,7 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { ...@@ -189,7 +187,7 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View {
} }
override fun setTjGoodsList(isRefresh: Boolean, result: List<TbGoodsItemEntity>?) { override fun setTjGoodsList(isRefresh: Boolean, result: List<TbGoodsItemEntity>?) {
if (!result.isNullOrEmpty()){ if (!result.isNullOrEmpty()) {
mGoodsAdapter?.clear() mGoodsAdapter?.clear()
mGoodsAdapter?.appendToList(result) mGoodsAdapter?.appendToList(result)
} }
...@@ -272,4 +270,12 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View { ...@@ -272,4 +270,12 @@ class TbGoodsDetailActivity : BaseActivity(), TbGoodsDetailContract.View {
id_tb_web_view.loadUrl(sortUrl) id_tb_web_view.loadUrl(sortUrl)
} }
override fun onItemClick(view: View?, position: Int, data: TbGoodsItemEntity?) {
var intent = Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.putExtra("goods", data)
intent.setClass(this, TbGoodsDetailActivity().javaClass)
startActivity(intent)
}
} }
\ No newline at end of file
package com.zxbw.modulemain.adapter package com.zxbw.modulemain.adapter
import android.app.Activity import android.app.Activity
import android.graphics.Paint
import android.util.Log import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.RelativeLayout import android.widget.RelativeLayout
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import com.zhpan.indicator.IndicatorView import com.zhpan.indicator.IndicatorView
import com.zxbw.modulemain.R import com.zxbw.modulemain.R
import com.zxbw.modulemain.box.adapter.ItemBoxGoodsAdapter
import com.zxhl.cms.AppContext import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.qy.JgqQyEntity import com.zxhl.cms.net.model.qy.JgqQyEntity
...@@ -31,6 +34,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -31,6 +34,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
private val VIEW_TYPE_QY_VIEW = 1 private val VIEW_TYPE_QY_VIEW = 1
private val VIEW_TYPE_ZERO_VIEW = 2 private val VIEW_TYPE_ZERO_VIEW = 2
private val VIEW_TYPE_GOODS_VIEW = 3 private val VIEW_TYPE_GOODS_VIEW = 3
private val VIEW_TYPE_BOX_VIEW = 4
constructor( constructor(
content: Activity?, content: Activity?,
...@@ -51,10 +55,15 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -51,10 +55,15 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
notifyDataSetChanged() notifyDataSetChanged()
} }
override fun getItemViewType(position: Int): Int { override fun getItemViewType(position: Int): Int {
var realPos = position;
if (mIsShowQyView) {
realPos = position - 1;
}
if (position == 0 && mIsShowQyView) { if (position == 0 && mIsShowQyView) {
return VIEW_TYPE_QY_VIEW return VIEW_TYPE_QY_VIEW
} else if (mList.size > 1 && mList[realPos].bannerType == "blindBox") {
return VIEW_TYPE_BOX_VIEW
} else { } else {
return VIEW_TYPE_GOODS_VIEW return VIEW_TYPE_GOODS_VIEW
} }
...@@ -69,26 +78,26 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -69,26 +78,26 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
} }
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
var viewNum = 0;
if (mIsShowQyView) {
viewNum = 1;
}
if (holder is GoodsViewHolder) { if (holder is GoodsViewHolder) {
var viewNum = 0;
if (mIsShowQyView) {
viewNum = 1;
}
val bean = mList[position - viewNum] val bean = mList[position - viewNum]
holder.id_tv_goods_name?.text = bean.title holder.id_tv_goods_name?.text = bean.title
if (mContext?.isFinishing == false) { if (mContext?.isFinishing == false) {
if(bean.pict_url?.startsWith("//img") == true){ if (bean.pict_url?.startsWith("//img") == true) {
holder.id_item_goods_img?.setLoadImageUrl("https:"+bean.pict_url, 0, 5) holder.id_item_goods_img?.setLoadImageUrl("https:" + bean.pict_url, 0, 5)
}else{ } else {
holder.id_item_goods_img?.setLoadImageUrl(bean.pict_url, 0, 5) holder.id_item_goods_img?.setLoadImageUrl(bean.pict_url, 0, 5)
} }
} }
holder.id_tv_tb_price_value?.text = "淘宝商城价 : ¥${bean.reserve_price}" holder.id_tv_tb_price_value?.text = "淘宝商城价 : ¥${bean.reserve_price}"
if (bean.coupon_amount.isNullOrEmpty()){ if (bean.coupon_amount.isNullOrEmpty()) {
holder.id_tv_yhq_value?.visibility =View.GONE holder.id_tv_yhq_value?.visibility = View.GONE
holder.id_tv_goods_price?.text ="${bean.reserve_price}" holder.id_tv_goods_price?.text = "${bean.reserve_price}"
}else{ } else {
holder.id_tv_yhq_value?.visibility =View.VISIBLE holder.id_tv_yhq_value?.visibility = View.VISIBLE
holder.id_tv_yhq_value?.text = "${bean.coupon_amount}元券" holder.id_tv_yhq_value?.text = "${bean.coupon_amount}元券"
var r_price = bean.reserve_price?.toDoubleOrNull() ?: 0 as Double var r_price = bean.reserve_price?.toDoubleOrNull() ?: 0 as Double
var c_price = bean.coupon_amount?.toDoubleOrNull() ?: 0 as Double var c_price = bean.coupon_amount?.toDoubleOrNull() ?: 0 as Double
...@@ -100,10 +109,10 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -100,10 +109,10 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
) )
} }
if (bean.coupon_info.isNullOrEmpty()){ if (bean.coupon_info.isNullOrEmpty()) {
holder.id_tv_manjian_value?.visibility =View.GONE holder.id_tv_manjian_value?.visibility = View.GONE
}else{ } else {
holder.id_tv_manjian_value?.visibility =View.VISIBLE holder.id_tv_manjian_value?.visibility = View.VISIBLE
holder.id_tv_manjian_value?.text = "${bean.coupon_info}" holder.id_tv_manjian_value?.text = "${bean.coupon_info}"
} }
...@@ -143,13 +152,34 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -143,13 +152,34 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
holder.qy_vp?.postDelayed(Runnable { holder.qy_vp?.postDelayed(Runnable {
holder.qy_vp?.requestLayout() holder.qy_vp?.requestLayout()
}, 100) }, 100)
holder.id_qy_indicator_view?.setSliderGap(60f) holder.id_qy_indicator_view?.setSliderGap(40f)
holder.id_qy_indicator_view?.setupWithViewPager(holder.qy_vp!!) holder.id_qy_indicator_view?.setupWithViewPager(holder.qy_vp!!)
} else { } else {
holder.qy_item_view?.visibility = View.GONE holder.qy_item_view?.visibility = View.GONE
} }
} else if (holder is ZeroViewHolder) { } else if (holder is ZeroViewHolder) {
} else if (holder is BoxViewHolder) {
val bean = mList[position - viewNum]
holder.box_main_img?.setLoadImageUrl(bean.mainImage, 0, 5)
holder.box_name?.text =bean.boxName
holder.box_price?.text =bean.onePriceStr
holder.box_old_price?.text = "¥ ${bean.originalPrice}"
holder.box_old_price?.paint?.flags = Paint.STRIKE_THRU_TEXT_FLAG
var a_price = bean.originalPrice?.toDoubleOrNull() ?: 0 as Double
var b_price = bean.onePriceStr?.toDoubleOrNull() ?: 0 as Double
holder.box_discount_desc?.text = "已减${Utils.getNoMoreThanTwoDigits(Utils.sub(a_price,b_price))}元"
var mAdapter: ItemBoxGoodsAdapter? = ItemBoxGoodsAdapter(mContext)
holder.box_goods_list?.layoutManager = LinearLayoutManager(mContext, RecyclerView.HORIZONTAL, false)
holder.box_goods_list?.adapter = mAdapter
mAdapter?.clear()
mAdapter?.appendToList(bean.goodsList)
holder.box_item_view?.setOnClickListener {
listener.onItemClick(it, position, bean)
}
} }
} }
...@@ -164,6 +194,11 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -164,6 +194,11 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
LayoutInflater.from(AppContext.get()) LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_home_zero_buy_view, parent, false) .inflate(R.layout.item_layout_home_zero_buy_view, parent, false)
) )
} else if (viewType == VIEW_TYPE_BOX_VIEW) {
return BoxViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_box_goods_view, parent, false)
)
} else { } else {
return GoodsViewHolder( return GoodsViewHolder(
LayoutInflater.from(AppContext.get()) LayoutInflater.from(AppContext.get())
...@@ -173,6 +208,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -173,6 +208,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
} }
//商品
class GoodsViewHolder : RecyclerView.ViewHolder { class GoodsViewHolder : RecyclerView.ViewHolder {
var id_rl_goods_item_view: RelativeLayout? var id_rl_goods_item_view: RelativeLayout?
var id_item_goods_img: RecycleImageView? var id_item_goods_img: RecycleImageView?
...@@ -196,6 +232,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -196,6 +232,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
} }
} }
//权益
class QyViewHolder : RecyclerView.ViewHolder { class QyViewHolder : RecyclerView.ViewHolder {
var qy_item_view: RelativeLayout? var qy_item_view: RelativeLayout?
var qy_vp: ViewPager? var qy_vp: ViewPager?
...@@ -210,6 +247,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -210,6 +247,7 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
} }
} }
//零元购
class ZeroViewHolder : RecyclerView.ViewHolder { class ZeroViewHolder : RecyclerView.ViewHolder {
constructor( constructor(
...@@ -218,4 +256,27 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView ...@@ -218,4 +256,27 @@ class HomeRecommendAdapter : BaseRecyclerAdapter<TbGoodsItemEntity, RecyclerView
} }
} }
//盲盒
class BoxViewHolder : RecyclerView.ViewHolder {
var box_item_view: RelativeLayout?
var box_main_img: RecycleImageView?
var box_name: TextView?
var box_discount_desc: TextView?
var box_price: TextView?
var box_old_price: TextView?
var box_goods_list: RecyclerView?
constructor(
itemView: View
) : super(itemView) {
box_item_view = itemView.findViewById<RelativeLayout>(R.id.id_rl_box_item_view)
box_main_img = itemView.findViewById<RecycleImageView>(R.id.id_item_box_main_img)
box_name = itemView.findViewById<TextView>(R.id.id_tv_box_name)
box_discount_desc = itemView.findViewById<TextView>(R.id.id_tv_box_discount_desc)
box_price = itemView.findViewById<TextView>(R.id.id_tv_box_price)
box_old_price = itemView.findViewById<TextView>(R.id.id_tv_box_old_price)
box_goods_list = itemView.findViewById<RecyclerView>(R.id.id_rcl_box_goods_list)
}
}
} }
\ 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 ItemBoxGoodsAdapter : BaseRecyclerAdapter<GoodList, ItemBoxGoodsAdapter.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_goods_img?.setLoadImageUrl(bean.mainImage, false)
// holder.item_goods_name?.text = bean.productName
// holder.item_goods_price?.text = "¥${bean.salePriceStr}"
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_box_goods_item_layout, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var item_goods_img: RecycleImageView?
var item_goods_name: TextView?
var item_goods_price: TextView?
constructor(
itemView: View
) : super(itemView) {
item_goods_img = itemView.findViewById<RecycleImageView>(R.id.id_img_goods)
item_goods_name = itemView.findViewById<TextView>(R.id.id_tv_goods_name)
item_goods_price = itemView.findViewById<TextView>(R.id.id_tv_goods_price)
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.contract package com.zxbw.modulemain.contract
import com.zxhl.cms.net.model.box.TabEntity
import com.zxhl.cms.net.model.qy.JgqQyEntity import com.zxhl.cms.net.model.qy.JgqQyEntity
import com.zxhl.cms.net.model.qy.TbGoodsItemEntity import com.zxhl.cms.net.model.qy.TbGoodsItemEntity
...@@ -19,7 +20,7 @@ class HomeRecommendContract { ...@@ -19,7 +20,7 @@ class HomeRecommendContract {
interface Presenter { interface Presenter {
fun getQyCardList(tabName: String) fun getQyCardList(tabName: String)
fun getTbGoodsList(isRefresh: Boolean, cate: String) fun getTbGoodsList(isRefresh: Boolean,tabEntity: TabEntity)
fun getGuessLikeGoodsList(isRefresh: Boolean) fun getGuessLikeGoodsList(isRefresh: Boolean)
} }
......
...@@ -90,53 +90,39 @@ class HomeFragment : BaseFragment(), HomeContract.View { ...@@ -90,53 +90,39 @@ class HomeFragment : BaseFragment(), HomeContract.View {
positionOffset: Float, positionOffset: Float,
positionOffsetPixels: Int positionOffsetPixels: Int
) { ) {
} }
override fun onPageSelected(position: Int) { override fun onPageSelected(position: Int) {
if (result[position].bannerType.equals("blindBox")) { setHomeTabColor(result[position].bannerType)
id_fragment_home_tab.textSelectColor = Color.parseColor("#333333")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#FC333333")
id_fragment_home_tab.indicatorColor = Color.parseColor("#333333")
toolbar_layout.setContentScrimColor(Color.parseColor("#8B3AFE"))
} else if (result[position].bannerType.equals("H5")) {
id_fragment_home_tab.textSelectColor = Color.parseColor("#333333")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#FC333333")
id_fragment_home_tab.indicatorColor = Color.parseColor("#333333")
toolbar_layout.setContentScrimColor(Color.parseColor("#628E43"))
} else {
id_fragment_home_tab.textSelectColor = Color.parseColor("#FFFFFF")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#FCFFFFFF")
id_fragment_home_tab.indicatorColor = Color.parseColor("#FFFFFF")
toolbar_layout.setContentScrimColor(Color.parseColor("#FFED2E28"))
}
} }
override fun onPageScrollStateChanged(state: Int) { override fun onPageScrollStateChanged(state: Int) {
} }
}) })
if (result[0].bannerType.equals("blindBox")) { setHomeTabColor(result[0].bannerType)
id_fragment_home_tab.textSelectColor = Color.parseColor("#333333")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#66597B")
id_fragment_home_tab.indicatorColor = Color.parseColor("#333333")
toolbar_layout.setContentScrimColor(Color.parseColor("#8B3AFE"))
} else if (result[0].bannerType.equals("H5")) {
id_fragment_home_tab.textSelectColor = Color.parseColor("#333333")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#5C6C52")
id_fragment_home_tab.indicatorColor = Color.parseColor("#333333")
toolbar_layout.setContentScrimColor(Color.parseColor("#628E43"))
} else {
id_fragment_home_tab.textSelectColor = Color.parseColor("#FFFFFF")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#FFDBDB")
id_fragment_home_tab.indicatorColor = Color.parseColor("#FFFFFF")
toolbar_layout.setContentScrimColor(Color.parseColor("#FFED2E28"))
}
} }
indicator_view.setupWithViewPager(id_home_top_banner) indicator_view.setupWithViewPager(id_home_top_banner)
} }
private fun setHomeTabColor(bannerType:String){
if (bannerType.equals("blindBox")) {
id_fragment_home_tab.textSelectColor = Color.parseColor("#FFFFFF")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#FCFFFFFF")
id_fragment_home_tab.indicatorColor = Color.parseColor("#FFFFFF")
toolbar_layout.setContentScrimColor(Color.parseColor("#8B3AFE"))
} else if (bannerType.equals("H5")) {
id_fragment_home_tab.textSelectColor = Color.parseColor("#333333")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#5C6C52")
id_fragment_home_tab.indicatorColor = Color.parseColor("#333333")
toolbar_layout.setContentScrimColor(Color.parseColor("#628E43"))
} else {
id_fragment_home_tab.textSelectColor = Color.parseColor("#FFFFFF")
id_fragment_home_tab.textUnselectColor = Color.parseColor("#FFDBDB")
id_fragment_home_tab.indicatorColor = Color.parseColor("#FFFFFF")
toolbar_layout.setContentScrimColor(Color.parseColor("#FFED2E28"))
}
}
override fun setTabList(result: List<TabEntity>?) { override fun setTabList(result: List<TabEntity>?) {
if (result.isNullOrEmpty()) { if (result.isNullOrEmpty()) {
showToast("加载失败,请重试") showToast("加载失败,请重试")
...@@ -145,7 +131,7 @@ class HomeFragment : BaseFragment(), HomeContract.View { ...@@ -145,7 +131,7 @@ class HomeFragment : BaseFragment(), HomeContract.View {
val adapter = FragmentAdapter(childFragmentManager) val adapter = FragmentAdapter(childFragmentManager)
for (i in 0 until (result.size ?: 0)) { for (i in 0 until (result.size ?: 0)) {
val title = result[i].name ?: "" val title = result[i].name ?: ""
adapter.addFrag(RecommendFragment.newInstance(title), title) adapter.addFrag(RecommendFragment.newInstance(result[i]), title)
} }
viewPager?.adapter = adapter viewPager?.adapter = adapter
id_fragment_home_tab?.setTextSelectSize(Utils.dip2px(20).toFloat()) id_fragment_home_tab?.setTextSelectSize(Utils.dip2px(20).toFloat())
......
...@@ -15,6 +15,7 @@ import com.zxbw.modulemain.adapter.ZeroBuyGoodsListAdapter ...@@ -15,6 +15,7 @@ import com.zxbw.modulemain.adapter.ZeroBuyGoodsListAdapter
import com.zxbw.modulemain.contract.HomeRecommendContract import com.zxbw.modulemain.contract.HomeRecommendContract
import com.zxbw.modulemain.presenter.HomeRecommendPresenter import com.zxbw.modulemain.presenter.HomeRecommendPresenter
import com.zxhl.cms.common.base.BaseFragment import com.zxhl.cms.common.base.BaseFragment
import com.zxhl.cms.net.model.box.TabEntity
import com.zxhl.cms.net.model.qy.JgqQyEntity import com.zxhl.cms.net.model.qy.JgqQyEntity
import com.zxhl.cms.net.model.qy.TbGoodsItemEntity import com.zxhl.cms.net.model.qy.TbGoodsItemEntity
import com.zxhl.cms.utils.JumpUtils import com.zxhl.cms.utils.JumpUtils
...@@ -29,7 +30,7 @@ import kotlinx.android.synthetic.main.fragment_layout_recommend.* ...@@ -29,7 +30,7 @@ import kotlinx.android.synthetic.main.fragment_layout_recommend.*
class RecommendFragment : BaseFragment, HomeRecommendContract.View, class RecommendFragment : BaseFragment, HomeRecommendContract.View,
OnRecycleItemClickListener<TbGoodsItemEntity> { OnRecycleItemClickListener<TbGoodsItemEntity> {
private val title: String private val tabEntity: TabEntity
private var mPresenter: HomeRecommendPresenter? = null private var mPresenter: HomeRecommendPresenter? = null
private var mGoodsAdapter: HomeRecommendAdapter? = null; private var mGoodsAdapter: HomeRecommendAdapter? = null;
...@@ -42,51 +43,52 @@ class RecommendFragment : BaseFragment, HomeRecommendContract.View, ...@@ -42,51 +43,52 @@ class RecommendFragment : BaseFragment, HomeRecommendContract.View,
mGoodsAdapter = HomeRecommendAdapter(activity, this) mGoodsAdapter = HomeRecommendAdapter(activity, this)
mGoodsAdapter?.IsShowQyView(title == "推荐") mGoodsAdapter?.IsShowQyView(tabEntity.name == "推荐")
//底部商品列表 //底部商品列表
id_rcl_goods_list?.layoutManager = LinearLayoutManager(activity) id_rcl_goods_list?.layoutManager = LinearLayoutManager(activity)
id_rcl_goods_list.adapter = mGoodsAdapter id_rcl_goods_list.adapter = mGoodsAdapter
id_refresh_view.setRefreshHeader(ClassicsHeader(activity)) id_refresh_view.setRefreshHeader(ClassicsHeader(activity))
id_refresh_view.setRefreshFooter(ClassicsFooter(activity)) id_refresh_view.setRefreshFooter(ClassicsFooter(activity))
//TODO 测试只加载权益,不加载列表是否有问题
id_refresh_view.setOnRefreshListener { id_refresh_view.setOnRefreshListener {
// it.finishRefresh(2000/*,false*/);//传入false表示加载失败 // it.finishRefresh(2000/*,false*/);//传入false表示加载失败
if (title.equals("猜你喜欢")) { if (tabEntity.name == "猜你喜欢") {
mPresenter?.getGuessLikeGoodsList(true) mPresenter?.getGuessLikeGoodsList(true)
} else { } else {
mPresenter?.getTbGoodsList(true, title) mPresenter?.getTbGoodsList(true, tabEntity)
} }
mPresenter?.getQyCardList(title) mPresenter?.getQyCardList(tabEntity.name)
} }
id_refresh_view.setOnLoadMoreListener { id_refresh_view.setOnLoadMoreListener {
// it.finishLoadMore(2000/*,false*/);//传入false表示加载失败 // it.finishLoadMore(2000/*,false*/);//传入false表示加载失败
if (title.equals("猜你喜欢")) { if (tabEntity.name == "猜你喜欢") {
mPresenter?.getGuessLikeGoodsList(false) mPresenter?.getGuessLikeGoodsList(false)
} else { } else {
mPresenter?.getTbGoodsList(false, title) mPresenter?.getTbGoodsList(false, tabEntity)
} }
} }
if (title.equals("猜你喜欢")) { if (tabEntity.name == "猜你喜欢") {
mPresenter?.getGuessLikeGoodsList(true) mPresenter?.getGuessLikeGoodsList(true)
} else { } else {
mPresenter?.getTbGoodsList(true, title) mPresenter?.getTbGoodsList(true, tabEntity)
} }
mPresenter?.getQyCardList(title) mPresenter?.getQyCardList(tabEntity.name)
} }
companion object { companion object {
fun newInstance(string: String): RecommendFragment { fun newInstance(tab: TabEntity): RecommendFragment {
return RecommendFragment(string) return RecommendFragment(tab)
} }
} }
constructor(title: String) : super() { constructor(tab: TabEntity) : super() {
this.title = title this.tabEntity = tab
} }
constructor() : super() { constructor() : super() {
this.title = "" this.tabEntity = TabEntity()
} }
override fun setQyCardList(result: List<JgqQyEntity>?) { override fun setQyCardList(result: List<JgqQyEntity>?) {
...@@ -96,9 +98,9 @@ class RecommendFragment : BaseFragment, HomeRecommendContract.View, ...@@ -96,9 +98,9 @@ class RecommendFragment : BaseFragment, HomeRecommendContract.View,
} }
override fun setTbGoodsList(isRefresh: Boolean, result: List<TbGoodsItemEntity>?) { override fun setTbGoodsList(isRefresh: Boolean, result: List<TbGoodsItemEntity>?) {
if (isRefresh){ if (isRefresh) {
id_refresh_view.finishRefresh(!result.isNullOrEmpty());//传入false表示加载失败 id_refresh_view.finishRefresh(!result.isNullOrEmpty());//传入false表示加载失败
}else{ } else {
id_refresh_view.finishLoadMore(!result.isNullOrEmpty());//传入false表示加载失败 id_refresh_view.finishLoadMore(!result.isNullOrEmpty());//传入false表示加载失败
} }
...@@ -112,11 +114,16 @@ class RecommendFragment : BaseFragment, HomeRecommendContract.View, ...@@ -112,11 +114,16 @@ class RecommendFragment : BaseFragment, HomeRecommendContract.View,
override fun onItemClick(view: View?, position: Int, data: TbGoodsItemEntity?) { override fun onItemClick(view: View?, position: Int, data: TbGoodsItemEntity?) {
// JumpUtils.TbGoodsDetailJump() // JumpUtils.TbGoodsDetailJump()
var intent = Intent(); if (data?.bannerType.equals("blindBox")){
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) JumpUtils.goodsDetailJump(data?.boxId)
intent.putExtra("goods", data) }else{
intent.setClass(activity!!, TbGoodsDetailActivity().javaClass) var intent = Intent();
activity?.startActivity(intent) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.putExtra("goods", data)
intent.setClass(activity!!, TbGoodsDetailActivity().javaClass)
activity?.startActivity(intent)
}
} }
} }
\ No newline at end of file
...@@ -22,7 +22,7 @@ class CardDetailPresenter : CardDetailContract.Presenter { ...@@ -22,7 +22,7 @@ class CardDetailPresenter : CardDetailContract.Presenter {
override fun requestRightsAliPay(goodsId: String, payType: String, phone: String) { override fun requestRightsAliPay(goodsId: String, payType: String, phone: String) {
ApiClient.userInfoAPi.aliPayRights(goodsId, payType, phone) ApiClient.userInfoAPi.aliPayRights(goodsId, payType, phone,"51")
.compose(RxSchedulers.observableIO2Main()) .compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<AliPayEntity>() { .subscribe(object : BaseObserver<AliPayEntity>() {
override fun onSuccess(result: AliPayEntity?) { override fun onSuccess(result: AliPayEntity?) {
......
...@@ -5,6 +5,7 @@ import com.zxbw.modulemain.contract.HomeRecommendContract ...@@ -5,6 +5,7 @@ import com.zxbw.modulemain.contract.HomeRecommendContract
import com.zxhl.cms.net.ApiClient import com.zxhl.cms.net.ApiClient
import com.zxhl.cms.net.RxSchedulers import com.zxhl.cms.net.RxSchedulers
import com.zxhl.cms.net.callback.BaseObserver import com.zxhl.cms.net.callback.BaseObserver
import com.zxhl.cms.net.model.box.TabEntity
import com.zxhl.cms.net.model.qy.JgqQyEntity import com.zxhl.cms.net.model.qy.JgqQyEntity
import com.zxhl.cms.net.model.qy.TbGoodsEntity import com.zxhl.cms.net.model.qy.TbGoodsEntity
...@@ -38,11 +39,18 @@ class HomeRecommendPresenter : HomeRecommendContract.Presenter { ...@@ -38,11 +39,18 @@ class HomeRecommendPresenter : HomeRecommendContract.Presenter {
private var searchPage = 1; private var searchPage = 1;
private var pageSize = 20; private var pageSize = 20;
override fun getTbGoodsList(isRefresh: Boolean, cate: String) { override fun getTbGoodsList(isRefresh: Boolean, tabEntity: TabEntity) {
if (isRefresh) { if (isRefresh && tabEntity.name == "推荐") {
searchPage = 1; searchPage = 1;
} }
ApiClient.homeApi.getGoodsListSearch(cate, cate, searchPage, pageSize) var cate = ""
var keyword = ""
if (tabEntity.use == "cate") {
cate = tabEntity.value
} else {
keyword = tabEntity.name
}
ApiClient.homeApi.getGoodsListSearch(cate, keyword, searchPage, pageSize)
.compose(RxSchedulers.observableIO2Main()) .compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<TbGoodsEntity>() { .subscribe(object : BaseObserver<TbGoodsEntity>() {
override fun onSuccess(result: TbGoodsEntity?) { override fun onSuccess(result: TbGoodsEntity?) {
...@@ -55,7 +63,6 @@ class HomeRecommendPresenter : HomeRecommendContract.Presenter { ...@@ -55,7 +63,6 @@ class HomeRecommendPresenter : HomeRecommendContract.Presenter {
} }
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) { override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
Log.d("wxw", "code$code")
mView.setTbGoodsList(isRefresh, null) mView.setTbGoodsList(isRefresh, null)
} }
}) })
...@@ -63,9 +70,9 @@ class HomeRecommendPresenter : HomeRecommendContract.Presenter { ...@@ -63,9 +70,9 @@ class HomeRecommendPresenter : HomeRecommendContract.Presenter {
private var guessLikePage = 1; private var guessLikePage = 1;
override fun getGuessLikeGoodsList(isRefresh: Boolean) { override fun getGuessLikeGoodsList(isRefresh: Boolean) {
if (isRefresh) { // if (isRefresh) {
guessLikePage = 1; // guessLikePage = 1;
} // }
ApiClient.homeApi.getGoodsGuessLike(guessLikePage, pageSize) ApiClient.homeApi.getGoodsGuessLike(guessLikePage, pageSize)
.compose(RxSchedulers.observableIO2Main()) .compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<TbGoodsEntity>() { .subscribe(object : BaseObserver<TbGoodsEntity>() {
......
...@@ -39,7 +39,7 @@ class RightsPayPresenter : RightsPayContract.Presenter { ...@@ -39,7 +39,7 @@ class RightsPayPresenter : RightsPayContract.Presenter {
override fun requestRightsAliPay(goodsId: String, payType: String, phone: String) { override fun requestRightsAliPay(goodsId: String, payType: String, phone: String) {
ApiClient.userInfoAPi.aliPayRights(goodsId, payType, phone) ApiClient.userInfoAPi.aliPayRights(goodsId, payType, phone, "50")
.compose(RxSchedulers.observableIO2Main()) .compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<AliPayEntity>() { .subscribe(object : BaseObserver<AliPayEntity>() {
override fun onSuccess(result: AliPayEntity?) { override fun onSuccess(result: AliPayEntity?) {
...@@ -77,10 +77,18 @@ class RightsPayPresenter : RightsPayContract.Presenter { ...@@ -77,10 +77,18 @@ class RightsPayPresenter : RightsPayContract.Presenter {
if (!TextUtils.isEmpty(order)) { if (!TextUtils.isEmpty(order)) {
requestVerify(order ?: "", "", payType) requestVerify(order ?: "", "", payType)
} }
}else if(payType==13){ } else if (payType == 13) {
if (!TextUtils.isEmpty(order)) { if (!TextUtils.isEmpty(order)) {
requestVerify(order ?: "", "", payType) requestVerify(order ?: "", "", payType)
} }
}else if (payType == 21) {
if (!TextUtils.isEmpty(order)) {
requestVerify(order ?: "", "", payType)
} else {
mView?.verifyOrderFail("支付成功后 订单id为null")
}
}else{
mView.verifyOrderFail("支付成功后 开始校验订单异常 e:支付方式异常$payType")
} }
} catch (e: Exception) { } catch (e: Exception) {
mView.verifyOrderFail("支付成功后 开始校验订单异常 e:${e.cause} msg:${e.message}") mView.verifyOrderFail("支付成功后 开始校验订单异常 e:${e.cause} msg:${e.message}")
...@@ -96,7 +104,7 @@ class RightsPayPresenter : RightsPayContract.Presenter { ...@@ -96,7 +104,7 @@ class RightsPayPresenter : RightsPayContract.Presenter {
if (TextUtils.equals("200", result.status)) { if (TextUtils.equals("200", result.status)) {
mView?.verifyOrderSuc(result.payStatus) mView?.verifyOrderSuc(result.payStatus)
} else { } else {
mView?.verifyOrderFail("订单校验请求成功 校验异常${result?.status?:-1}") mView?.verifyOrderFail("订单校验请求成功 校验异常${result?.status ?: -1}")
} }
} }
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="2dp" />
<stroke
android:width="1dp"
android:color="#D8D8D8" />
</shape>
\ No newline at end of file
...@@ -122,17 +122,19 @@ ...@@ -122,17 +122,19 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>
<View <View
android:id="@+id/id_tb_goods_detail_title_sys_bar_view" android:id="@+id/id_tb_goods_detail_title_sys_bar_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" /> android:layout_height="40dp" />
<ImageView <ImageView
android:id="@+id/id_img_close_btn" android:id="@+id/id_img_close_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/id_tb_goods_detail_title_sys_bar_view"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_below="@id/id_tb_goods_detail_title_sys_bar_view"
android:src="@drawable/img_tb_goods_detail_fanhui" /> android:src="@drawable/img_tb_goods_detail_fanhui" />
<!-- 商品价格信息--> <!-- 商品价格信息-->
<RelativeLayout <RelativeLayout
...@@ -320,6 +322,7 @@ ...@@ -320,6 +322,7 @@
android:textSize="12sp" /> android:textSize="12sp" />
<TextView <TextView
android:id="@+id/id_tv_open_vip_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/img_tb_goods_detail_btn_bg" android:background="@drawable/img_tb_goods_detail_btn_bg"
...@@ -372,12 +375,12 @@ ...@@ -372,12 +375,12 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:visibility="invisible"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:drawableTop="@drawable/img_tb_goods_detail_select" android:drawableTop="@drawable/img_tb_goods_detail_select"
android:text="收藏" android:text="收藏"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="10sp" /> android:textSize="10sp"
android:visibility="invisible" />
<LinearLayout <LinearLayout
android:id="@+id/id_ll_tb_buy_view" android:id="@+id/id_ll_tb_buy_view"
...@@ -460,7 +463,7 @@ ...@@ -460,7 +463,7 @@
<WebView <WebView
android:id="@+id/id_tb_web_view" android:id="@+id/id_tb_web_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:visibility="gone" android:layout_height="wrap_content"
android:layout_height="wrap_content" /> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
<RelativeLayout <RelativeLayout
android:id="@+id/id_home_top_banner_view" android:id="@+id/id_home_top_banner_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="260dp"> android:layout_height="280dp"
android:paddingBottom="20dp">
<androidx.viewpager.widget.ViewPager <androidx.viewpager.widget.ViewPager
android:id="@+id/id_home_top_banner" android:id="@+id/id_home_top_banner"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_margin="2.5dp"
android:background="@drawable/shape_d8d8d8_r2"
android:gravity="center"
android:orientation="vertical">
<com.zxhl.cms.widget.RecycleImageView
android:id="@+id/id_img_goods"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_gravity="center" />
<TextView
android:id="@+id/id_tv_goods_name"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:lines="2"
android:textColor="@color/color_333333"
android:textSize="14sp"
android:visibility="gone" />
<TextView
android:id="@+id/id_tv_goods_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="5dp"
android:includeFontPadding="false"
android:textColor="#FF2E31"
android:textSize="15sp"
android:textStyle="bold"
android:visibility="gone" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/id_rl_box_item_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:background="@drawable/shape_ffffff_r10"
android:gravity="center_horizontal"
android:orientation="horizontal">
<com.zxhl.cms.widget.RecycleImageView
android:id="@+id/id_item_box_main_img"
android:layout_width="124dp"
android:layout_height="118dp"
android:layout_gravity="center"
android:layout_margin="10dp"
android:layout_marginEnd="10dp"
android:adjustViewBounds="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_box_jiaobiao"
android:gravity="center"
android:text="限时盲盒"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/id_tv_box_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_toEndOf="@id/id_item_box_main_img"
android:ellipsize="end"
android:layout_marginBottom="7dp"
android:maxLines="2"
android:text="商品名称商品名称品名称商品名称商品名称品名称商"
android:textColor="@color/color_333333"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/id_ll_youhui_view"
android:layout_width="110dp"
android:layout_height="20dp"
android:layout_marginBottom="10dp"
android:layout_below="@id/id_tv_box_name"
android:layout_toEndOf="@id/id_item_box_main_img"
android:background="@drawable/icon_box_youhui_tips"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="18dp"
android:layout_height="20dp"
android:gravity="center"
android:text="减"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/id_tv_box_discount_desc"
android:layout_width="match_parent"
android:layout_height="20dp"
android:gravity="center_vertical"
android:text="已减10元幸运币"
android:textColor="#437EEE"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/id_ll_box_price_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/id_ll_youhui_view"
android:layout_toEndOf="@id/id_item_box_main_img"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:text="¥"
android:textColor="#D81D00"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_tv_box_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:text="0"
android:textColor="#D81D00"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_tv_box_old_price_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="原价 "
android:textColor="@color/color_999999"
android:textSize="10sp" />
<TextView
android:id="@+id/id_tv_box_old_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥ 299"
android:textColor="@color/color_999999"
android:textSize="10sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_rcl_box_goods_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/id_ll_box_price_view"
android:layout_toEndOf="@id/id_item_box_main_img" />
</RelativeLayout>
\ No newline at end of file
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginTop="10dp"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:background="@drawable/shape_ffffff_r10" android:background="@drawable/shape_ffffff_r10"
android:gravity="center_horizontal" android:gravity="center_horizontal"
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" /> android:textStyle="bold" />
<!-- 优惠券-->
<TextView <TextView
android:id="@+id/id_tv_yhq_value" android:id="@+id/id_tv_yhq_value"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
android:text="1元券" android:text="1元券"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp" /> android:textSize="10sp" />
<!--满减-->
<TextView <TextView
android:id="@+id/id_tv_manjian_value" android:id="@+id/id_tv_manjian_value"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp" /> android:textSize="10sp" />
<!-- 淘宝价-->
<TextView <TextView
android:id="@+id/id_tv_tb_price_value" android:id="@+id/id_tv_tb_price_value"
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -117,9 +117,9 @@ ...@@ -117,9 +117,9 @@
android:drawableLeft="@drawable/icon_vip_price" android:drawableLeft="@drawable/icon_vip_price"
android:drawablePadding="3dp" android:drawablePadding="3dp"
android:text="会员到手价" android:text="会员到手价"
android:textStyle="bold"
android:textColor="#F8E8CC" android:textColor="#F8E8CC"
android:textSize="11sp" /> android:textSize="11sp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -18,9 +18,10 @@ ...@@ -18,9 +18,10 @@
android:id="@+id/id_qy_indicator_view" android:id="@+id/id_qy_indicator_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/id_vp_home_jgq_qy_list"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:layout_below="@+id/id_vp_home_jgq_qy_list" android:layout_marginBottom="15dp"
app:vpi_slider_checked_color="#F1352C" app:vpi_slider_checked_color="#F1352C"
app:vpi_slider_normal_color="#E8DFDF" app:vpi_slider_normal_color="#E8DFDF"
app:vpi_slider_radius="3dp" /> app:vpi_slider_radius="3dp" />
......
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