Commit 18a6d26e authored by maxiaoliang's avatar maxiaoliang

修改

parent 3fb1b7a2
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- 声明程序使用camera和自动对焦功能 --> <!-- 声明程序使用camera和自动对焦功能 -->
<uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" /> <uses-feature android:name="android.hardware.camera.autofocus" />
......
...@@ -9,6 +9,7 @@ class GoodList { ...@@ -9,6 +9,7 @@ class GoodList {
var descImg: String? = "" var descImg: String? = ""
var salePrice: String? = "" var salePrice: String? = ""
var salePriceStr: String? = "" var salePriceStr: String? = ""
var originalPriceDb: String? = ""
var cateName: String? = "" var cateName: String? = ""
var goodsLevel: String? = "" var goodsLevel: String? = ""
var goodsType: String? = "" var goodsType: String? = ""
......
package com.zxhl.cms.net.model.box package com.zxhl.cms.net.model.box
import com.zxhl.cms.net.model.qy.CardEntity import com.zxhl.cms.net.model.qy.RightsDetailEntity
class ShopOrderEntity { class ShopOrderEntity {
var id: String? = "" var id: String? = ""
...@@ -21,5 +22,5 @@ class ShopOrderEntity { ...@@ -21,5 +22,5 @@ class ShopOrderEntity {
var orderStatus: Int? = 0//订单状态:0待发货;1已发货;2已签收;3其他 var orderStatus: Int? = 0//订单状态:0待发货;1已发货;2已签收;3其他
var orderType: String? = "" var orderType: String? = ""
var goodsList: List<GoodList>? = null var goodsList: List<GoodList>? = null
var equitCard: List<CardEntity>? = null var equitCard: List<RightsDetailEntity>? = null
} }
\ No newline at end of file
...@@ -21,4 +21,8 @@ class RightsDetailEntity : Serializable { ...@@ -21,4 +21,8 @@ class RightsDetailEntity : Serializable {
var purchaseTime: String? = "" var purchaseTime: String? = ""
var status: String? = "" var status: String? = ""
var productCode: String? = "" var productCode: String? = ""
var icon: String? = ""
var skillPrice: String? = ""
var eqText: String? = ""
} }
\ No newline at end of file
package com.zxhl.cms.net.model.qy package com.zxhl.cms.net.model.qy
class SkillEntity { class SkillEntity {
var id:String?="" var id: String? = ""
var startTime:String?="" var startTime: String? = ""
var status:String?="" var status: String? = ""
var statusDesc:String?="" var statusDesc: String? = ""
var defaultSelect: Int? = 0
} }
\ 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 java.io.Serializable import java.io.Serializable
class SkillGoodsEntity : Serializable { class SkillGoodsEntity : Serializable {
...@@ -11,26 +12,30 @@ class SkillGoodsEntity : Serializable { ...@@ -11,26 +12,30 @@ class SkillGoodsEntity : Serializable {
var store: Int? = 0 var store: Int? = 0
var currentStore: Int? = 0 var currentStore: Int? = 0
var status: String? = "" var status: String? = ""
var skillStatus: String? = ""
var skillStatusDesc: String? = ""
var sort: String? = "" var sort: String? = ""
var card: CardEntity? = null var card: RightsDetailEntity? = null
} var goods: GoodList? = null
class CardEntity : Serializable{
var id: String? = ""
var brand: String? = ""
var category: String? = ""
var rechargeType: String? = ""
var goodsName: String? = ""
var originPrice: String? = ""
var costPrice: String? = ""
var costDiscount: String? = ""
var salePrice: String? = ""
var skillPrice: String? = ""
var remark: String? = ""
var purchaseTime: String? = ""
var status: String? = ""
var productCode: String? = ""
var eqText: String? = ""
var icon: String? = "" var icon: String? = ""
} }
//
//class CardEntity : Serializable{
// var id: String? = ""
// var brand: String? = ""
// var category: String? = ""
// var rechargeType: String? = ""
// var goodsName: String? = ""
// var originPrice: String? = ""
// var costPrice: String? = ""
// var costDiscount: String? = ""
// var salePrice: String? = ""
// var skillPrice: String? = ""
// var remark: String? = ""
// var purchaseTime: String? = ""
// var status: String? = ""
// var productCode: String? = ""
// var eqText: String? = ""
// var icon: String? = ""
//
//}
...@@ -34,5 +34,7 @@ ...@@ -34,5 +34,7 @@
<color name="color_4c84ff">#4C84FF</color> <color name="color_4c84ff">#4C84FF</color>
<color name="color_6998ff">#6998FF</color> <color name="color_6998ff">#6998FF</color>
<color name="color_e09a9a">#E09A9A</color> <color name="color_e09a9a">#E09A9A</color>
<color name="color_b28a17">#B28A17</color>
<color name="color_ddcb97">#DDCB97</color>
</resources> </resources>
\ No newline at end of file
...@@ -266,7 +266,39 @@ ...@@ -266,7 +266,39 @@
android:scheme="xxsq" /> android:scheme="xxsq" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".activity.ShopOrderActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="shoporder"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".box.activity.EditAddressActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="editaddress"
android:scheme="xxsq" />
</intent-filter>
</activity>
<activity android:name=".box.activity.OrderSuccessActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="ordersuccess"
android:scheme="xxsq" />
</intent-filter>
</activity>
</application> </application>
......
...@@ -4,12 +4,15 @@ import android.content.Intent ...@@ -4,12 +4,15 @@ import android.content.Intent
import android.graphics.Paint import android.graphics.Paint
import android.net.Uri import android.net.Uri
import android.os.Handler import android.os.Handler
import android.text.TextUtils
import android.util.Log import android.util.Log
import android.view.KeyEvent
import android.view.View import android.view.View
import android.webkit.* import android.webkit.*
import com.zxbw.modulemain.R import com.zxbw.modulemain.R
import com.zxbw.modulemain.contract.CardDetailContract import com.zxbw.modulemain.contract.CardDetailContract
import com.zxbw.modulemain.presenter.CardDetailPresenter import com.zxbw.modulemain.presenter.CardDetailPresenter
import com.zxbw.modulemain.view.DialogUtils
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.NetConfig
...@@ -37,6 +40,7 @@ class CardDetailActivity : BaseActivity(), CardDetailContract.View { ...@@ -37,6 +40,7 @@ class CardDetailActivity : BaseActivity(), CardDetailContract.View {
private var pay_type: Int? = RightsDetailActivity.H5_PAY private var pay_type: Int? = RightsDetailActivity.H5_PAY
private var payResultObservable: Observable<PayResultEntity>? = null private var payResultObservable: Observable<PayResultEntity>? = null
var goodsID: String? = "" var goodsID: String? = ""
var type: String? = "0"
override fun onClick(v: View?) { override fun onClick(v: View?) {
} }
...@@ -53,10 +57,18 @@ class CardDetailActivity : BaseActivity(), CardDetailContract.View { ...@@ -53,10 +57,18 @@ class CardDetailActivity : BaseActivity(), CardDetailContract.View {
override fun init() { override fun init() {
val cardbean: RightsDetailEntity = val cardbean: RightsDetailEntity =
intent.getSerializableExtra("cardbean") as RightsDetailEntity intent.getSerializableExtra("cardbean") as RightsDetailEntity
type= intent.getStringExtra("type")
initPay() initPay()
goodsID = cardbean.id goodsID = cardbean.id
id_img_back?.setOnClickListener { id_img_back?.setOnClickListener {
finish() if(TextUtils.equals(type,"1")){
// 在这里,拦截或者监听Android系统的返回键事件。
DialogUtils.showExitSkillBuy(this, View.OnClickListener {
finish()
})
}else{
finish()
}
} }
id_ll_pay?.setOnClickListener { id_ll_pay?.setOnClickListener {
toPay() toPay()
...@@ -303,4 +315,20 @@ class CardDetailActivity : BaseActivity(), CardDetailContract.View { ...@@ -303,4 +315,20 @@ class CardDetailActivity : BaseActivity(), CardDetailContract.View {
id_rights_pay_web_view.loadUrl(NetConfig.H5.WEB_URL_H5_PAY) id_rights_pay_web_view.loadUrl(NetConfig.H5.WEB_URL_H5_PAY)
} }
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if(TextUtils.equals(type,"1")){
// 在这里,拦截或者监听Android系统的返回键事件。
DialogUtils.showExitSkillBuy(this, View.OnClickListener {
finish()
})
}else{
finish()
}
}
return false
}
} }
\ No newline at end of file
...@@ -56,7 +56,7 @@ class CardVoucherActivity:BaseActivity(),CardVoucherContract.View ,OnRecycleItem ...@@ -56,7 +56,7 @@ class CardVoucherActivity:BaseActivity(),CardVoucherContract.View ,OnRecycleItem
} }
override fun onItemClick(view: View?, position: Int, data: RightsDetailEntity?) { override fun onItemClick(view: View?, position: Int, data: RightsDetailEntity?) {
showToast(""+position) // showToast(""+position)
val intent = Intent(mActivity, CardDetailActivity::class.java) val intent = Intent(mActivity, CardDetailActivity::class.java)
intent.putExtra("cardbean", data) intent.putExtra("cardbean", data)
startActivity(intent) startActivity(intent)
......
...@@ -9,6 +9,7 @@ import com.zxbw.modulemain.R ...@@ -9,6 +9,7 @@ import com.zxbw.modulemain.R
import com.zxbw.modulemain.adapter.FlashSaleAdapter import com.zxbw.modulemain.adapter.FlashSaleAdapter
import com.zxbw.modulemain.adapter.MoreDiscountAdapter import com.zxbw.modulemain.adapter.MoreDiscountAdapter
import com.zxbw.modulemain.adapter.TimeAdapter import com.zxbw.modulemain.adapter.TimeAdapter
import com.zxbw.modulemain.box.activity.OrderDetailActivity
import com.zxbw.modulemain.contract.FlashSaleContract import com.zxbw.modulemain.contract.FlashSaleContract
import com.zxbw.modulemain.presenter.FlashSalePresenter import com.zxbw.modulemain.presenter.FlashSalePresenter
import com.zxhl.cms.AppContext import com.zxhl.cms.AppContext
...@@ -29,6 +30,7 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View, ...@@ -29,6 +30,7 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View,
private var mTimeAdapter: TimeAdapter? = null private var mTimeAdapter: TimeAdapter? = null
private var durationId: String? = "" private var durationId: String? = ""
private var skillGoodsEntity: SkillGoodsEntity? = null private var skillGoodsEntity: SkillGoodsEntity? = null
var mChoosList: MutableList<String> = ArrayList()
override fun onClick(v: View?) { override fun onClick(v: View?) {
} }
...@@ -50,19 +52,31 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View, ...@@ -50,19 +52,31 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View,
mAdapter = FlashSaleAdapter( mAdapter = FlashSaleAdapter(
this, this,
OnRecycleItemClickListener<SkillGoodsEntity> { view, position, data -> OnRecycleItemClickListener<SkillGoodsEntity> { view, position, data ->
skillGoodsEntity = data skillGoodsEntity = data
mPresenter?.beginSkill(durationId, data?.id) val user = SettingPreference.getUserInfoData()
if (user.member) {
mPresenter?.beginSkill(durationId, data?.id)
} else {
JumpUtils.MemberOrderJump()
// val intent = Intent(this, SkillPayActivity::class.java)
// intent.putExtra("skillgoods", skillGoodsEntity)
// startActivity(intent)
}
}) })
mTimeAdapter = TimeAdapter(this, this) mTimeAdapter = TimeAdapter(this, this)
mDiscountAdapter = MoreDiscountAdapter(this) mDiscountAdapter = MoreDiscountAdapter(this)
id_rl_time?.layoutManager = GridLayoutManager(this, 4) id_rl_time?.layoutManager = GridLayoutManager(this, 5)
id_rl_time?.adapter = mTimeAdapter id_rl_time?.adapter = mTimeAdapter
id_rl_more_discount?.layoutManager = GridLayoutManager(this, 3) id_rl_more_discount?.layoutManager = GridLayoutManager(this, 3)
id_rl_more_discount?.adapter = mDiscountAdapter id_rl_more_discount?.adapter = mDiscountAdapter
id_rl_flash_sale_top?.layoutManager = GridLayoutManager(this, 3) id_rl_flash_sale_top?.layoutManager = GridLayoutManager(this, 3)
id_rl_flash_sale_top?.adapter = mAdapter id_rl_flash_sale_top?.adapter = mAdapter
mPresenter?.getFlashSaleData() mPresenter?.getFlashSaleData()
mPresenter?.getMoreList("more")
// //
} }
...@@ -73,11 +87,14 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View, ...@@ -73,11 +87,14 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View,
mTimeAdapter?.notifyDataSetChanged() mTimeAdapter?.notifyDataSetChanged()
if (!result.isNullOrEmpty()) { if (!result.isNullOrEmpty()) {
for (i in result.indices) { for (i in result.indices) {
if (TextUtils.equals(result[i].status, "1")) { if (result[i].defaultSelect == 1) {
mTimeAdapter?.setPosition(i) mTimeAdapter?.setPosition(i)
durationId = result?.get(i)?.id durationId = result.get(i)?.id
getGoodsList() getGoodsList()
} }
// if (TextUtils.equals(result[i].status, "9")) {
//
// }
} }
} }
...@@ -97,17 +114,45 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View, ...@@ -97,17 +114,45 @@ class FlashSaleActivity : BaseActivity(), FlashSaleContract.View,
if (boolean) { if (boolean) {
val user = SettingPreference.getUserInfoData() val user = SettingPreference.getUserInfoData()
if (user.member) { if (user.member) {
val intent = Intent(this, ToPaySkillGoodsActivity::class.java) if (TextUtils.equals(skillGoodsEntity?.goodsType, "50")) {
intent.putExtra("skillgoods", skillGoodsEntity) val intent = Intent(this, ToPaySkillGoodsActivity::class.java)
startActivity(intent) intent.putExtra("skillgoods", skillGoodsEntity)
intent.putExtra("type","1")
startActivity(intent)
} else if (TextUtils.equals(skillGoodsEntity?.goodsType, "51")) {
//卡券商品
val intent = Intent(mActivity, CardDetailActivity::class.java)
intent.putExtra("cardbean", skillGoodsEntity?.card)
intent.putExtra("type","1")
startActivity(intent)
} else if (TextUtils.equals(skillGoodsEntity?.goodsType, "99")) {
//实物商品
mChoosList.clear()
mChoosList.add(skillGoodsEntity?.goods?.id.toString())
val intent = Intent(mActivity, ShopOrderActivity::class.java)
intent.putStringArrayListExtra(
"stringList",
mChoosList as java.util.ArrayList<String>?
)
startActivity(intent)
}
} else { } else {
val intent = Intent(this, SkillPayActivity::class.java) JumpUtils.MemberOrderJump()
intent.putExtra("skillgoods", skillGoodsEntity) // val intent = Intent(this, SkillPayActivity::class.java)
startActivity(intent) // intent.putExtra("skillgoods", skillGoodsEntity)
// startActivity(intent)
} }
} }
} }
override fun setMoreResult(result: List<SkillGoodsEntity>?) {
mDiscountAdapter?.clear()
mDiscountAdapter?.appendToList(result)
mDiscountAdapter?.notifyDataSetChanged()
}
override fun onItemClick(view: View?, position: Int, data: SkillEntity?) { override fun onItemClick(view: View?, position: Int, data: SkillEntity?) {
durationId = data?.id durationId = data?.id
getGoodsList() getGoodsList()
......
...@@ -93,9 +93,9 @@ class LoginActivity : WxImpl(), LoginContract.View { ...@@ -93,9 +93,9 @@ class LoginActivity : WxImpl(), LoginContract.View {
// id_activity_login_btn.setBackgroundResource(R.drawable.shape_login_nomal_bg) // id_activity_login_btn.setBackgroundResource(R.drawable.shape_login_nomal_bg)
// } // }
if (p0?.length == 11) { if (p0?.length == 11) {
id_activity_login_edit_phone_getcode?.setTextColor(getResources().getColor(R.color.color_333333)) id_activity_login_edit_phone_getcode?.setTextColor(getResources().getColor(R.color.color_b28a17))
} else { } else {
id_activity_login_edit_phone_getcode?.setTextColor(getResources().getColor(R.color.color_bbbbbb)) id_activity_login_edit_phone_getcode?.setTextColor(getResources().getColor(R.color.color_ddcb97))
} }
} }
...@@ -211,7 +211,7 @@ class LoginActivity : WxImpl(), LoginContract.View { ...@@ -211,7 +211,7 @@ class LoginActivity : WxImpl(), LoginContract.View {
private fun startTimer(count: Long) { private fun startTimer(count: Long) {
isStartTimer = false isStartTimer = false
id_activity_login_edit_phone_getcode?.setTextColor(-0x39393a) id_activity_login_edit_phone_getcode?.setTextColor(getResources().getColor(R.color.color_ddcb97))
id_activity_login_edit_phone_getcode?.isEnabled = false id_activity_login_edit_phone_getcode?.isEnabled = false
Flowable.intervalRange(0, count, 0, 1, TimeUnit.SECONDS).compose(bindToLifecycle()) Flowable.intervalRange(0, count, 0, 1, TimeUnit.SECONDS).compose(bindToLifecycle())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
...@@ -225,7 +225,7 @@ class LoginActivity : WxImpl(), LoginContract.View { ...@@ -225,7 +225,7 @@ class LoginActivity : WxImpl(), LoginContract.View {
if (SECONDS == 0L) { if (SECONDS == 0L) {
isStartTimer = false isStartTimer = false
id_activity_login_edit_phone_getcode?.isEnabled = true id_activity_login_edit_phone_getcode?.isEnabled = true
id_activity_login_edit_phone_getcode?.setTextColor(-0xe0e0e1) id_activity_login_edit_phone_getcode?.setTextColor(getResources().getColor(R.color.color_b28a17))
id_activity_login_edit_phone_getcode?.text = "获取验证码" id_activity_login_edit_phone_getcode?.text = "获取验证码"
} }
}.subscribe() }.subscribe()
......
...@@ -2,11 +2,14 @@ package com.zxbw.modulemain.activity ...@@ -2,11 +2,14 @@ package com.zxbw.modulemain.activity
import android.graphics.Paint import android.graphics.Paint
import android.os.Handler import android.os.Handler
import android.text.TextUtils
import android.util.Log import android.util.Log
import android.view.KeyEvent
import android.view.View import android.view.View
import com.zxbw.modulemain.R import com.zxbw.modulemain.R
import com.zxbw.modulemain.contract.CardDetailContract import com.zxbw.modulemain.contract.CardDetailContract
import com.zxbw.modulemain.presenter.CardDetailPresenter import com.zxbw.modulemain.presenter.CardDetailPresenter
import com.zxbw.modulemain.view.DialogUtils
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.base.BaseActivity import com.zxhl.cms.common.base.BaseActivity
...@@ -23,12 +26,13 @@ import io.reactivex.android.schedulers.AndroidSchedulers ...@@ -23,12 +26,13 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer import io.reactivex.functions.Consumer
import kotlinx.android.synthetic.main.activity_layout_to_pay_skill_goods.* import kotlinx.android.synthetic.main.activity_layout_to_pay_skill_goods.*
class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
private var mPayPresenter: CardDetailPresenter? = null private var mPayPresenter: CardDetailPresenter? = null
private var mLoading: LoadingDialog? = null private var mLoading: LoadingDialog? = null
private var pay_type: Int? = RightsDetailActivity.ALI_PAY private var pay_type: Int? = RightsDetailActivity.ALI_PAY
private var payResultObservable: Observable<PayResultEntity>? = null private var payResultObservable: Observable<PayResultEntity>? = null
var goodsID:String?="" var goodsID: String? = ""
var type: String? = "0"
override fun onClick(v: View?) { override fun onClick(v: View?) {
} }
...@@ -45,12 +49,23 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { ...@@ -45,12 +49,23 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
override fun init() { override fun init() {
val skillGoodsEntity: SkillGoodsEntity = val skillGoodsEntity: SkillGoodsEntity =
intent.getSerializableExtra("skillgoods") as SkillGoodsEntity intent.getSerializableExtra("skillgoods") as SkillGoodsEntity
type = intent.getStringExtra("type")
initPay() initPay()
goodsID=skillGoodsEntity.goodsId goodsID = skillGoodsEntity.goodsId
setDataView(skillGoodsEntity) setDataView(skillGoodsEntity)
id_ll_skill_pay?.setOnClickListener { id_ll_skill_pay?.setOnClickListener {
topay() topay()
} }
id_img_back?.setOnClickListener {
if (TextUtils.equals(type, "1")) {
// 在这里,拦截或者监听Android系统的返回键事件。
DialogUtils.showExitSkillBuy(this, View.OnClickListener {
finish()
})
} else {
finish()
}
}
} }
fun setDataView(entity: SkillGoodsEntity) { fun setDataView(entity: SkillGoodsEntity) {
...@@ -67,8 +82,9 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { ...@@ -67,8 +82,9 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
id_tv_lisheng?.text = "立省 ¥ ${entity.card?.costPrice}" id_tv_lisheng?.text = "立省 ¥ ${entity.card?.costPrice}"
id_img_icon?.setLoadImageUrl("${entity.card?.icon}", true) id_img_icon?.setLoadImageUrl("${entity.card?.icon}", true)
} }
fun initPay(){
mPayPresenter= CardDetailPresenter(this) fun initPay() {
mPayPresenter = CardDetailPresenter(this)
mLoading = LoadingDialog.getLoadingDialog( mLoading = LoadingDialog.getLoadingDialog(
this, this,
getString(com.zxhl.cms.R.string.wait_ing), getString(com.zxhl.cms.R.string.wait_ing),
...@@ -84,7 +100,7 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { ...@@ -84,7 +100,7 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
Log.d("qqbs", "verifyPay:${obj.txt}") Log.d("qqbs", "verifyPay:${obj.txt}")
//println("verifyPay payResultObservable------------------------------- order:${obj.txt}") //println("verifyPay payResultObservable------------------------------- order:${obj.txt}")
if (obj.isPaySuc) { if (obj.isPaySuc) {
// EventUtils.onEvent("pay_page_pay_query_order", "付款成功") // EventUtils.onEvent("pay_page_pay_query_order", "付款成功")
mPayPresenter?.verifyPay(obj.txt, obj.payType) mPayPresenter?.verifyPay(obj.txt, obj.payType)
} else { } else {
//支付宝支付 //支付宝支付
...@@ -101,6 +117,7 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { ...@@ -101,6 +117,7 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
} }
}, Consumer<Throwable> { }) }, Consumer<Throwable> { })
} }
private var mHandler: Handler = Handler { private var mHandler: Handler = Handler {
when (it.what) { when (it.what) {
0 -> { 0 -> {
...@@ -111,11 +128,13 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { ...@@ -111,11 +128,13 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
} }
false false
} }
fun topay() { fun topay() {
mLoading?.setLoading("请稍后...") mLoading?.setLoading("请稍后...")
mLoading?.show() mLoading?.show()
mPayPresenter?.requestRightsAliPay(goodsID.toString(), pay_type.toString(), "") mPayPresenter?.requestRightsAliPay(goodsID.toString(), pay_type.toString(), "")
} }
override fun requestOrderSuc(result: AliPayEntity) { override fun requestOrderSuc(result: AliPayEntity) {
AlipayServer.payV2(this, result.wakeup!!) AlipayServer.payV2(this, result.wakeup!!)
} }
...@@ -131,6 +150,7 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { ...@@ -131,6 +150,7 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
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)
...@@ -138,10 +158,28 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View { ...@@ -138,10 +158,28 @@ class ToPaySkillGoodsActivity : BaseActivity(), CardDetailContract.View {
mLoading?.setResult(false, "支付失败", 1000) mLoading?.setResult(false, "支付失败", 1000)
} }
} }
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!!)
} }
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (TextUtils.equals(type, "1")) {
// 在这里,拦截或者监听Android系统的返回键事件。
DialogUtils.showExitSkillBuy(this, View.OnClickListener {
finish()
})
} else {
finish()
}
}
return false
}
} }
\ No newline at end of file
...@@ -20,6 +20,7 @@ import com.zxhl.cms.common.base.BaseRecyclerAdapter ...@@ -20,6 +20,7 @@ import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.qy.RightsDetailEntity import com.zxhl.cms.net.model.qy.RightsDetailEntity
import com.zxhl.cms.net.model.qy.SkillGoodsEntity import com.zxhl.cms.net.model.qy.SkillGoodsEntity
import com.zxhl.cms.utils.OnRecycleItemClickListener import com.zxhl.cms.utils.OnRecycleItemClickListener
import com.zxhl.cms.widget.RecycleImageView
class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter.ViewHolder> { class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter.ViewHolder> {
private var mContext: Activity? = null private var mContext: Activity? = null
...@@ -34,25 +35,40 @@ class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter. ...@@ -34,25 +35,40 @@ class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter.
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position] var bean = mList[position]
if(TextUtils.equals(bean.skillStatus,"1")||TextUtils.equals(bean.skillStatus,"2")){
if(TextUtils.equals(bean.status,"0")){ holder.id_tv_qianggou?.setBackgroundResource(R.drawable.button_qiang)
}else{ }else{
holder.id_tv_qianggou?.setBackgroundResource(R.drawable.button_bukeqiang)
} }
holder.goumai_progress?.max=bean.store!! holder.goumai_progress?.max=bean.store!!
holder.goumai_progress?.progress=bean.currentStore!! holder.goumai_progress?.progress=bean.currentStore!!
holder.id_tv_name?.text="${bean.card?.brand}${bean.card?.category}${bean.card?.goodsName}" holder.id_tv_status?.text=bean.skillStatusDesc
holder.id_tv_sale_price?.text="${bean.skillPrice}" if(!TextUtils.equals(bean.goodsType,"99")){
holder.id_tv_yuanjia?.text="${bean.card?.originPrice}"
holder.id_img_member_bg?.setLoadImageUrl(bean.icon,false)
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}"
}else{
holder.id_img_member_bg?.setLoadImageUrl(bean.goods?.mainImage,false)
holder.id_tv_name?.text="${bean.goods?.productName}"
holder.id_tv_sale_price?.text="${bean.goods?.salePriceStr}"
holder.id_tv_yuanjia?.text="${bean.goods?.originalPriceDb}"
}
holder.id_tv_yuanjia?.getPaint()?.setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中划线 holder.id_tv_yuanjia?.getPaint()?.setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中划线
// holder.id_ll_item?.setOnClickListener { // holder.id_ll_item?.setOnClickListener {
// val intent = Intent(mContext, SkillPayActivity::class.java) // val intent = Intent(mContext, SkillPayActivity::class.java)
// intent.putExtra("skillgoods", bean) // intent.putExtra("skillgoods", bean)
// mContext?.startActivity(intent) // mContext?.startActivity(intent)
// } // }
holder.id_tv_qianggou?.setOnClickListener { holder.id_ll_item?.setOnClickListener {
listener.onItemClick(it,position,bean) if(TextUtils.equals(bean.status,"1")||TextUtils.equals(bean.status,"2")){
listener.onItemClick(it,position,bean)
}
} }
} }
...@@ -75,7 +91,7 @@ class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter. ...@@ -75,7 +91,7 @@ class FlashSaleAdapter : BaseRecyclerAdapter<SkillGoodsEntity, FlashSaleAdapter.
class ViewHolder : RecyclerView.ViewHolder { class ViewHolder : RecyclerView.ViewHolder {
var id_ll_item: LinearLayout? var id_ll_item: LinearLayout?
var id_img_member_bg: ImageView? var id_img_member_bg: RecycleImageView?
var id_tv_name:TextView? var id_tv_name:TextView?
var id_tv_sale_price:TextView? var id_tv_sale_price:TextView?
var id_tv_yuanjia:TextView? var id_tv_yuanjia:TextView?
......
...@@ -14,12 +14,12 @@ import com.zxbw.modulemain.R ...@@ -14,12 +14,12 @@ import com.zxbw.modulemain.R
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.box.GoodList import com.zxhl.cms.net.model.box.GoodList
import com.zxhl.cms.net.model.qy.CardEntity import com.zxhl.cms.net.model.qy.RightsDetailEntity
import com.zxhl.cms.utils.JumpUtils import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.utils.Utils import com.zxhl.cms.utils.Utils
import com.zxhl.cms.widget.RecycleImageView import com.zxhl.cms.widget.RecycleImageView
class ItemOrderAdapter : BaseRecyclerAdapter<CardEntity, ItemOrderAdapter.ViewHolder> { class ItemOrderAdapter : BaseRecyclerAdapter<RightsDetailEntity, ItemOrderAdapter.ViewHolder> {
private var mContext: Context? = null private var mContext: Context? = null
constructor( constructor(
......
package com.zxbw.modulemain.adapter package com.zxbw.modulemain.adapter
import android.app.Activity import android.app.Activity
import android.content.Intent
import android.text.TextUtils
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.LinearLayout import android.widget.LinearLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.zxbw.modulemain.R import com.zxbw.modulemain.R
import com.zxbw.modulemain.activity.CardDetailActivity
import com.zxbw.modulemain.activity.ShopOrderActivity
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.SkillGoodsEntity
import com.zxhl.cms.utils.JumpUtils
import com.zxhl.cms.widget.RecycleImageView
class MoreDiscountAdapter : BaseRecyclerAdapter<Any, MoreDiscountAdapter.ViewHolder> { class MoreDiscountAdapter : BaseRecyclerAdapter<SkillGoodsEntity, MoreDiscountAdapter.ViewHolder> {
private var mContext: Activity? = null private var mContext: Activity? = null
constructor( constructor(
...@@ -20,15 +28,46 @@ class MoreDiscountAdapter : BaseRecyclerAdapter<Any, MoreDiscountAdapter.ViewHol ...@@ -20,15 +28,46 @@ class MoreDiscountAdapter : BaseRecyclerAdapter<Any, MoreDiscountAdapter.ViewHol
} }
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
holder.id_ll_item?.setOnClickListener { if (!TextUtils.equals(bean.goodsType, "99")) {
holder.id_img_member_bg?.setLoadImageUrl(bean.icon, false)
holder.id_tv_name?.text =
"${bean.card?.brand}${bean.card?.category}${bean.card?.goodsName}"
holder.id_tv_sale_price?.text = "${bean.card?.originPrice}"
holder.id_tv_activity_price?.text = "¥${bean.card?.skillPrice}"
} else {
holder.id_img_member_bg?.setLoadImageUrl(bean.goods?.mainImage, false)
holder.id_tv_name?.text = "${bean.goods?.productName}"
holder.id_tv_sale_price?.text = "${bean.goods?.originalPriceDb}"
holder.id_tv_activity_price?.text = "¥${bean.skillPrice}"
}
holder.id_ll_item?.setOnClickListener {
if (TextUtils.equals(bean.goodsType, "50")) {
JumpUtils.RightsDetailJump(bean.card?.brand, bean.card?.icon)
} else if (TextUtils.equals(bean.goodsType, "51")) {
val intent = Intent(mContext, CardDetailActivity::class.java)
intent.putExtra("cardbean", bean.card)
mContext?.startActivity(intent)
} else if (TextUtils.equals(bean.goodsType, "99")) {
//实物商品
var mChoosList: MutableList<String> = ArrayList()
mChoosList.clear()
mChoosList.add(bean.goods?.id.toString())
val intent = Intent(mContext, ShopOrderActivity::class.java)
intent.putStringArrayListExtra(
"stringList",
mChoosList as java.util.ArrayList<String>?
)
mContext?.startActivity(intent)
}
} }
} }
override fun getItemCount(): Int { // override fun getItemCount(): Int {
return 9 // return 9
} // }
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder( return ViewHolder(
...@@ -39,13 +78,19 @@ class MoreDiscountAdapter : BaseRecyclerAdapter<Any, MoreDiscountAdapter.ViewHol ...@@ -39,13 +78,19 @@ class MoreDiscountAdapter : BaseRecyclerAdapter<Any, MoreDiscountAdapter.ViewHol
class ViewHolder : RecyclerView.ViewHolder { class ViewHolder : RecyclerView.ViewHolder {
var id_ll_item: LinearLayout? var id_ll_item: LinearLayout?
var id_img_member_bg: RecycleImageView?
var id_tv_name: TextView?
var id_tv_sale_price: TextView?
var id_tv_activity_price: TextView?
constructor( constructor(
itemView: View itemView: View
) : super(itemView) { ) : super(itemView) {
id_ll_item = id_ll_item = itemView.findViewById(R.id.id_ll_item)
itemView.findViewById<LinearLayout>(R.id.id_ll_item) id_img_member_bg = itemView.findViewById(R.id.id_img_member_bg)
id_tv_name = itemView.findViewById(R.id.id_tv_name)
id_tv_sale_price = itemView.findViewById(R.id.id_tv_sale_price)
id_tv_activity_price = itemView.findViewById(R.id.id_tv_activity_price)
} }
} }
......
...@@ -48,14 +48,14 @@ class TimeAdapter : BaseRecyclerAdapter<SkillEntity, TimeAdapter.ViewHolder> { ...@@ -48,14 +48,14 @@ class TimeAdapter : BaseRecyclerAdapter<SkillEntity, TimeAdapter.ViewHolder> {
holder.id_tv_time?.text="${bean.startTime}" holder.id_tv_time?.text="${bean.startTime}"
holder.id_tv_status_desc?.text="${bean.statusDesc}" holder.id_tv_status_desc?.text="${bean.statusDesc}"
} }
override fun getItemCount(): Int { // override fun getItemCount(): Int {
val size = mList.size // val size = mList.size
if (size > 4) { // if (size > 4) {
return 4 // return 4
} else { // } else {
return size // return size
} // }
} // }
fun setPosition(pos: Int) { fun setPosition(pos: Int) {
this.pos = pos this.pos = pos
notifyDataSetChanged() notifyDataSetChanged()
......
package com.zxbw.modulemain.box.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.utils.JumpUtils
import com.zxhl.cms.utils.NoDoubleClickListener
import kotlinx.android.synthetic.main.activity_layout_order_success.*
class OrderSuccessActivity : 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_order_success
}
override fun init() {
id_img_back.setOnClickListener {
finish()
}
id_order_detail_btn?.setOnClickListener(object : NoDoubleClickListener() {
override fun onNoDoubleClick(v: View?) {
finish()
JumpUtils.MyOrderJump("")
}
})
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.bean;
import com.contrarywind.interfaces.IPickerViewData;
import java.util.List;
public class JsonBean implements IPickerViewData {
private String name;
private List<CityBean> city;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<CityBean> getCityList() {
return city;
}
public void setCityList(List<CityBean> city) {
this.city = city;
}
// 实现 IPickerViewData 接口,
// 这个用来显示在PickerView上面的字符串,
// PickerView会通过IPickerViewData获取getPickerViewText方法显示出来。
@Override
public String getPickerViewText() {
return this.name;
}
public static class CityBean {
private String name;
private List<String> area;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<String> getArea() {
return area;
}
public void setArea(List<String> area) {
this.area = area;
}
}
}
package com.zxbw.modulemain.box.contract
import com.zxhl.cms.net.model.box.AddressEntity
class EditAddressContract {
interface View {
fun saveSunccess()
}
interface Presenter {
fun editAddress(enity:AddressEntity?)
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.contract
import com.zxhl.cms.net.model.box.OrderEntity
class ShopOrderContract {
interface View {
fun setOrderData(result: OrderEntity?)
fun creatOrderSucces()
}
interface Presenter {
fun createOrder(addressId: String?, depotIds: String?, orderNotes: String?)
fun getShopCost(depotIds: String,addressId:String?)
}
}
\ No newline at end of file
package com.zxbw.modulemain.box.presenter
import com.zxbw.modulemain.box.contract.EditAddressContract
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 EditAddressPresenter : EditAddressContract.Presenter {
private val mView: EditAddressContract.View
constructor(mView: EditAddressContract.View) {
this.mView = mView
}
override fun editAddress(enity: AddressEntity?) {
ApiClient.homeApi.editAddress(enity)
.compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<Any>() {
override fun onSuccess(result: Any?) {
if (result != null) {
mView.saveSunccess()
}
}
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.ShopOrderContract
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 ShopOrderPresenter: ShopOrderContract.Presenter {
private val mView: ShopOrderContract.View
constructor(mView: ShopOrderContract.View) {
this.mView = mView
}
override fun createOrder(
addressId: String?,
depotIds: String?,
orderNotes: String?
) {
ApiClient.homeApi.shopBuyOnly(addressId,depotIds,orderNotes)
.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)
}
})
}
override fun getShopCost(depotIds: String, addressId: String?) {
ApiClient.homeApi.getshopCost(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)
}
})
}
}
\ No newline at end of file
...@@ -9,11 +9,13 @@ class FlashSaleContract { ...@@ -9,11 +9,13 @@ class FlashSaleContract {
fun setData(result:List<SkillEntity>?) fun setData(result:List<SkillEntity>?)
fun setSkillListResult(result: List<SkillGoodsEntity>?) fun setSkillListResult(result: List<SkillGoodsEntity>?)
fun toskill(boolean: Boolean,result: ToSkillInfoEntity?) fun toskill(boolean: Boolean,result: ToSkillInfoEntity?)
fun setMoreResult(result:List<SkillGoodsEntity>?)
} }
interface Presenter { interface Presenter {
fun getFlashSaleData() fun getFlashSaleData()
fun getSkillGoodsList(durationId:String?) fun getSkillGoodsList(durationId:String?)
fun beginSkill(durationId: String?,id:String?) fun beginSkill(durationId: String?,id:String?)
fun getMoreList(durationId: String?)
} }
} }
\ No newline at end of file
...@@ -54,4 +54,17 @@ class FlashSalePresenter : FlashSaleContract.Presenter { ...@@ -54,4 +54,17 @@ class FlashSalePresenter : FlashSaleContract.Presenter {
} }
}) })
} }
override fun getMoreList(durationId: String?) {
ApiClient.homeApi.getskillGoodsList(durationId).compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<SkillGoodsEntity>>() {
override fun onSuccess(result: List<SkillGoodsEntity>?) {
mView.setMoreResult(result)
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
} }
\ No newline at end of file
...@@ -396,5 +396,29 @@ object DialogUtils { ...@@ -396,5 +396,29 @@ object DialogUtils {
mDialog.setCancelable(false) mDialog.setCancelable(false)
mDialog.show() mDialog.show()
} }
//退出挽留弹窗
fun showExitSkillBuy(context: Activity?, listener: View.OnClickListener) {
if (context == null) return
val mDialog = Dialog(context, R.style.CenterCompatDialogTheme)
val mDialogView =
showBottomDialog(
R.layout.dialog_layout_exit_skill_buy,
context,
mDialog,
0,
Gravity.CENTER
)
mDialogView.findViewById<ImageView>(R.id.id_img_ok).setOnClickListener {
listener.onClick(it)
mDialog.dismiss()
}
mDialogView.findViewById<ImageView>(R.id.id_img_cance).setOnClickListener {
mDialog.dismiss()
}
mDialog.setCanceledOnTouchOutside(false)
mDialog.setCancelable(false)
mDialog.show()
}
} }
\ No newline at end of file
<?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_edit_address_title"
android:layout_width="match_parent"
android:layout_height="48dp"
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>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/id_rl_edit_address_title"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="收货人"
android:textColor="@color/color_333333" />
<EditText
android:id="@+id/id_edit_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:background="@null"
android:cursorVisible="true"
android:ellipsize="end"
android:hint="请填写收货人姓名"
android:padding="10dp"
android:singleLine="true"
android:textColor="@color/color_333333"
android:textColorHint="#B0B0B0"
android:textCursorDrawable="@null"
android:textSize="15sp" />
<TextView
android:id="@+id/id_tv_tongxulu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="20dp"
android:drawableLeft="@drawable/icon_tongxunlu"
android:drawablePadding="5dp"
android:text="通讯录"
android:textColor="@color/color_999999"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="手机号码"
android:textColor="@color/color_333333" />
<EditText
android:id="@+id/id_edit_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:background="@null"
android:cursorVisible="true"
android:ellipsize="end"
android:hint="请填写收货人手机号"
android:inputType="number"
android:maxLength="11"
android:padding="10dp"
android:singleLine="true"
android:textColor="@color/color_333333"
android:textColorHint="#B0B0B0"
android:textCursorDrawable="@null"
android:textSize="15sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/id_ll_chosse_city"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="所在地区"
android:textColor="@color/color_333333" />
<TextView
android:id="@+id/id_tv_choose_city"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:ellipsize="end"
android:hint="省市县、乡镇等"
android:padding="10dp"
android:textColor="@color/color_333333"
android:textColorHint="#B0B0B0"
android:textSize="15sp" />
<EditText
android:id="@+id/id_edit_region"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:background="@null"
android:cursorVisible="true"
android:ellipsize="end"
android:hint="省市县、乡镇等"
android:padding="10dp"
android:singleLine="true"
android:textColor="@color/color_333333"
android:textColorHint="#B0B0B0"
android:textCursorDrawable="@null"
android:textSize="15sp"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="60dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text="详细地址"
android:textColor="@color/color_333333" />
<EditText
android:id="@+id/id_edit_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:background="@null"
android:cursorVisible="true"
android:ellipsize="end"
android:hint="精确到小区门牌号"
android:padding="10dp"
android:singleLine="true"
android:textColor="@color/color_333333"
android:textColorHint="#B0B0B0"
android:textCursorDrawable="@null"
android:textSize="15sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:text="设置默认地址"
android:textColor="@color/color_333333"
android:textSize="15sp" />
<ImageView
android:id="@+id/id_img_moren"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:src="@drawable/icon_guan" />
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_alignParentBottom="true"
android:background="@color/white">
<TextView
android:id="@+id/id_tv_save_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>
\ No newline at end of file
<?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"
android:fitsSystemWindows="true"
android:gravity="center_horizontal"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/id_rl_order_success_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:textSize="18sp"
android:textColor="@color/color_333333"
android:textStyle="bold" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="80dp"
android:src="@drawable/icon_order_chenggong" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:drawableRight="@drawable/icon_order_chenggong2"
android:drawablePadding="5dp"
android:text="支付成功"
android:textColor="@color/color_333333"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_order_detail_btn"
android:layout_width="220dp"
android:layout_height="45dp"
android:layout_marginTop="40dp"
android:visibility="visible"
android:background="@drawable/shape_ff2e31_r25"
android:gravity="center"
android:text="查看订单"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
This diff is collapsed.
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="15dp" android:layout_marginBottom="15dp"
android:text="喜马拉雅会员" android:lines="1"
android:maxWidth="200dp"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:text="喜马拉雅vip会员" android:text="喜马拉雅vip会员"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="16sp" android:textSize="16sp"
...@@ -200,11 +202,11 @@ ...@@ -200,11 +202,11 @@
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:includeFontPadding="false"
android:text="喜马拉雅vip会员卡"
android:lines="2"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:includeFontPadding="false"
android:lines="2"
android:text="喜马拉雅vip会员卡"
android:textColor="#BA7E36" android:textColor="#BA7E36"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -291,26 +293,28 @@ ...@@ -291,26 +293,28 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="2dp"
android:text="¥" android:text="¥"
android:textColor="#FDDFA5" android:textColor="#FDDFA5"
android:layout_marginRight="2dp"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/id_tv_skill_price" android:id="@+id/id_tv_skill_price"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="0.0" android:text="0.0"
android:textStyle="bold" android:textColor="#FDDFA5"
android:textSize="20sp" android:textSize="20sp"
android:textColor="#FDDFA5"/> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/id_tv_lisheng" android:id="@+id/id_tv_lisheng"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="立省 ¥ 0.0"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textSize="12sp" android:text="立省 ¥ 0.0"
android:textColor="#FFE8BA"/> android:textColor="#FFE8BA"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<TextView <TextView
......
<?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"
android:gravity="center">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/id_img_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bg_dialog_exit_buy" />
<LinearLayout
android:layout_width="296dp"
android:layout_height="68dp"
android:layout_alignBottom="@+id/id_img_bg"
android:gravity="center">
<ImageView
android:id="@+id/id_img_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:src="@drawable/button_queren" />
<ImageView
android:id="@+id/id_img_cance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/button_quxiao" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/id_ll_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="2dp" android:layout_marginLeft="2dp"
...@@ -13,13 +14,12 @@ ...@@ -13,13 +14,12 @@
android:background="@drawable/beijing_1" android:background="@drawable/beijing_1"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <com.zxhl.cms.widget.RecycleImageView
android:id="@+id/id_img_member_bg" android:id="@+id/id_img_member_bg"
android:layout_width="wrap_content" android:layout_width="88dp"
android:layout_height="wrap_content" android:layout_height="66dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="13dp" android:layout_marginTop="13dp" />
android:src="@drawable/icon_huangse" />
<TextView <TextView
android:id="@+id/id_tv_name" android:id="@+id/id_tv_name"
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:lines="1" android:lines="1"
android:ellipsize="end"
android:text="优酷会员黄…" android:text="优酷会员黄…"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="12sp" /> android:textSize="12sp" />
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
android:textSize="10sp" /> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/id_tv_sale_price"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="2dp" android:layout_marginLeft="2dp"
...@@ -80,15 +82,16 @@ ...@@ -80,15 +82,16 @@
android:src="@drawable/huodongjia" /> android:src="@drawable/huodongjia" />
<TextView <TextView
android:id="@+id/id_tv_activity_price"
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_huodonhua" android:layout_below="@+id/id_huodonhua"
android:layout_centerHorizontal="true"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:text="¥12.9" android:background="@drawable/button_anniu"
android:textSize="10sp"
android:gravity="center" android:gravity="center"
android:text="¥12.9"
android:textColor="@color/white" android:textColor="@color/white"
android:layout_centerHorizontal="true" android:textSize="10sp" />
android:background="@drawable/button_anniu"/>
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
...@@ -13,13 +13,12 @@ ...@@ -13,13 +13,12 @@
android:background="@drawable/beijing_1" android:background="@drawable/beijing_1"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <com.zxhl.cms.widget.RecycleImageView
android:id="@+id/id_img_member_bg" android:id="@+id/id_img_member_bg"
android:layout_width="wrap_content" android:layout_width="88dp"
android:layout_height="wrap_content" android:layout_height="66dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="13dp" android:layout_marginTop="13dp" />
android:src="@drawable/icon_huangse" />
<TextView <TextView
android:id="@+id/id_tv_name" android:id="@+id/id_tv_name"
...@@ -29,6 +28,7 @@ ...@@ -29,6 +28,7 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:ellipsize="end"
android:lines="1" android:lines="1"
android:text="喜马拉雅VIP会…" android:text="喜马拉雅VIP会…"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
......
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