Commit c4f34198 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :1.0.9
[实现方案] :
parent b4779318
......@@ -75,8 +75,9 @@ android {
zhihu{}
bilibili{}
baidu{}
baidu{}
bilibili{}
bilibili2{}
baichuan{}
kuaishou{}
weibo{}
zhihu{}
......@@ -84,6 +85,7 @@ android {
source1{}
mbt{}
baichuan{}
huafei_h5{}
}
productFlavors.all {
......
PACKAGE_NAME=com.zxhl.shop
VERSION_CODE=9
VERSION_NAME=1.0.8
\ No newline at end of file
VERSION_CODE=10
VERSION_NAME=1.0.9
\ No newline at end of file
......@@ -839,7 +839,7 @@ object PhoneUtils {
params.put(Constant.Device.carrier, SettingPreference.getCarrier())
// params.put(Constant.Device.ip, SettingPreference.getIp())
// params.put("uid", "26455150")
// params.put("uid", "26635075")
// params.put("zygt", "hzwz")
// params.put("tgtk", "1")
return params
......
......@@ -25,7 +25,7 @@ class PaySuccessActivity : BaseActivity() {
override fun init() {
type = intent?.data?.getQueryParameter("pay_type") ?: ""
if (type.equals("2")) {
id_tv_desc_tips.text = "支付成功\n话费充值将在72小时到账!"
id_tv_desc_tips.text = "支付成功\n话费充值将在72小时到账!"
} else {
id_tv_desc_tips.text = "恭喜您\n本次交易成功!"
}
......
......@@ -41,17 +41,17 @@ import kotlinx.android.synthetic.main.activity_layout_recharge.id_rl_h5_pay_view
class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity.ProductDetail>,
RechargeContract.View {
private var mAdapter: RechargeAdapter? = null
private var mOperatorAdapter:OperatorAdapter?=null
private var mOperatorAdapter: OperatorAdapter? = null
private var mPresenter: RechargePresenter? = null
private var couponsentity: CouponsEntity? = null
private var mLoading: LoadingDialog? = null
private var pay_type: Int? = RightsDetailActivity.H5_PAY
private var payResultObservable: Observable<PayResultEntity>? = null
private var mobileOp:String?=""
private var selectPrice:String?=""
private var mobileOp: String? = ""
private var selectPrice: String? = ""
var goodsID: String? = ""
var couponId: String? = ""
private var position:Int?=-1
private var position: Int? = -1
override fun onClick(v: View?) {
when (v) {
id_tv_select_coupons -> {
......@@ -87,14 +87,16 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
}
val user = SettingPreference.getUserInfoData()
initPay()
mOperatorAdapter= OperatorAdapter(this, OnRecycleItemClickListener<MobileOpEntity> { view, position, data ->
mobileOp=data.value
mOperatorAdapter = OperatorAdapter(
this,
OnRecycleItemClickListener<MobileOpEntity> { view, position, data ->
mobileOp = data.value
})
id_rl_yunyingshang?.layoutManager=GridLayoutManager(this,3)
id_rl_yunyingshang?.adapter=mOperatorAdapter
})
id_rl_yunyingshang?.layoutManager = GridLayoutManager(this, 3)
id_rl_yunyingshang?.adapter = mOperatorAdapter
var result = SettingPreference.getConfig()
if(!result?.mobileOpList.isNullOrEmpty()){
if (!result?.mobileOpList.isNullOrEmpty()) {
mOperatorAdapter?.clear()
mOperatorAdapter?.appendToList(result?.mobileOpList)
mOperatorAdapter?.notifyDataSetChanged()
......@@ -106,7 +108,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
id_rl_recharge?.layoutManager = GridLayoutManager(this, 3)
id_rl_recharge?.adapter = mAdapter
mPresenter?.getFetchCard()
mPresenter?.getPayList("mobileFee")
// mPresenter?.getPayList("mobileFee")
id_edit_user_phone?.setText(user.nickname.toString())
id_tv_select_coupons?.setOnClickListener(this)
id_tv_chongzhi?.setOnClickListener {
......@@ -195,7 +197,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
showToast("请检查要兑换的手机号")
return
}
if(TextUtils.isEmpty(mobileOp)){
if (TextUtils.isEmpty(mobileOp)) {
showToast("请选择运营商")
return
}
......@@ -295,69 +297,70 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
mAdapter?.notifyDataSetChanged()
if (!result.goodsList.isNullOrEmpty()) {
if (result.goodsList!!.size >= 3) {
useCoupn(0,0)
useCoupn(0, 0)
}
}
}
fun useCoupn(default: Int,price:Int){
if(!mCouponsResult.isNullOrEmpty()){
for(i in mCouponsResult!!){
if(price==200){
if(TextUtils.equals(i.amount,"10.0")){
fun useCoupn(default: Int, price: Int) {
if (!mCouponsResult.isNullOrEmpty()) {
for (i in mCouponsResult!!) {
if (price == 200) {
if (TextUtils.equals(i.amount, "10.0")) {
//判断当有5元券时 帮他选择100元档位且使用当前5元的券
Log.e("MXL","优先使用10元优惠券")
couponsentity=i
Log.e("MXL", "优先使用10元优惠券")
couponsentity = i
setCouponInfo(couponsentity)
break
}
}else{
if(TextUtils.equals(i.amount,"5.0")){
} else {
if (TextUtils.equals(i.amount, "5.0")) {
//判断当有5元券时 帮他选择100元档位且使用当前5元的券
Log.e("MXL","使用5元优惠券")
if(default==0){
Log.e("MXL", "使用5元优惠券")
if (default == 0) {
mAdapter?.setPosition(1)
selectPrice= mAdapter?.getItem(1)?.originalPrice
selectPrice = mAdapter?.getItem(1)?.originalPrice
goodsID = mAdapter?.getItem(1)?.goodsId
memberentity=mAdapter?.getItem(1)
memberentity = mAdapter?.getItem(1)
}
couponsentity=i
couponsentity = i
setCouponInfo(couponsentity)
break
}
}
}
Log.e("MXL","循环结束取到优惠券信息")
if(couponsentity==null){
Log.e("MXL","没有5元的 使用10元券")
if(default==0){
Log.e("MXL", "循环结束取到优惠券信息")
if (couponsentity == null) {
Log.e("MXL", "没有5元的 使用10元券")
if (default == 0) {
mAdapter?.setPosition(2)
selectPrice= mAdapter?.getItem(2)?.originalPrice
selectPrice = mAdapter?.getItem(2)?.originalPrice
goodsID = mAdapter?.getItem(2)?.goodsId
memberentity=mAdapter?.getItem(2)
memberentity = mAdapter?.getItem(2)
}
couponsentity=mCouponsResult!!.get(0)
couponsentity = mCouponsResult!!.get(0)
setCouponInfo(couponsentity)
}
Log.e("MXL","price:"+price+"default:"+default)
Log.e("MXL", "price:" + price + "default:" + default)
// mAdapter?.updateData( couponsentity?.amount.toString())
if(SettingPreference.getShowUseDiscount().equals("0")){
if (SettingPreference.getShowUseDiscount().equals("0")) {
DialogUtils.showHuafeiTips(this)
}
}else{
Log.e("MXL","当前无可用优惠券")
mAdapter?.updateData( "")
if(default==0){
memberentity=mAdapter?.getItem(1)
} else {
Log.e("MXL", "当前无可用优惠券")
mAdapter?.updateData("")
if (default == 0) {
memberentity = mAdapter?.getItem(1)
mAdapter?.setPosition(1)
selectPrice= mAdapter?.getItem(1)?.originalPrice
selectPrice = mAdapter?.getItem(1)?.originalPrice
goodsID = mAdapter?.getItem(1)?.goodsId
}
couponsentity=null
couponsentity = null
setCouponInfo(couponsentity)
......@@ -367,33 +370,35 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
var memberentity: MemberEntity.ProductDetail? = null
override fun onItemClick(view: View?, position: Int, data: MemberEntity.ProductDetail?) {
memberentity = data
selectPrice=data?.originalPrice
selectPrice = data?.originalPrice
goodsID = data?.goodsId
chosseData(position,data)
chosseData(position, data)
}
fun chosseData(position: Int,data: MemberEntity.ProductDetail?){
fun chosseData(position: Int, data: MemberEntity.ProductDetail?) {
when (position) {
0->{
Log.e("MXL","选0")
couponsentity=null
0 -> {
Log.e("MXL", "选0")
couponsentity = null
setCouponInfo(couponsentity)
setBootomPrice(data)
return
}
1->{
Log.e("MXL","选1")
useCoupn(1,100)
1 -> {
Log.e("MXL", "选1")
useCoupn(1, 100)
setBootomPrice(data)
return
}
2->{
Log.e("MXL","选2")
useCoupn(1,200)
2 -> {
Log.e("MXL", "选2")
useCoupn(1, 200)
setBootomPrice(data)
return
}
}
}
fun setBootomPrice(data: MemberEntity.ProductDetail?) {
if (couponsentity == null) {
id_tv_cash?.text = "${data?.cash}"
......@@ -416,7 +421,11 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
} else {
Log.e("MXL", "无优惠券可选")
mAdapter?.updateData("")
id_tv_select_coupons?.text = "无可用优惠券"
if (mCouponsResult.isNullOrEmpty()) {
id_tv_select_coupons?.text = "暂无优惠券"
} else {
id_tv_select_coupons?.text = "未选择优惠券"
}
}
}
......
......@@ -19,23 +19,42 @@ import com.zxhl.cms.widget.RecycleImageView
class ItemVipOrderAdapter :
BaseRecyclerAdapter<RightsDetailEntity, ItemVipOrderAdapter.ViewHolder> {
private var mContext: Activity? = null
private var mType: String? = ""
constructor(
content: Activity?
content: Activity?,
type: String?
) : super() {
mContext = content
mType = type
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var bean = mList[position]
if (mContext?.isDestroyed != true){
Glide.with(mContext!!).load(bean.bgImage).placeholder(R.drawable.img_vip_rights_bg)
.into(holder?.id_img_rights_bg!!)
}
holder.id_img_rights_icon?.setLoadImageUrl(bean.icon, false)
holder.id_tv_vip_goods_name?.text = "${bean.brand} ${bean.category} ${bean.goodsName}"
holder.id_tv_vip_goods_price?.text = "¥${bean.salePrice}"
// holder.id_tv_vip_goods_num?.text = "${bean.salePrice}"
if (mType.equals("8080")) {
if (mContext?.isDestroyed != true) {
holder?.id_img_rights_bg?.setImageResource(R.drawable.img_vip_rights_bg)
Glide.with(mContext!!).asGif().load(R.drawable.img_gif_huafei)
.into(holder.id_img_rights_icon!!)
}
holder.id_tv_vip_goods_name?.text = bean.goodsName
holder.id_tv_huafei_desc?.visibility = View.VISIBLE
holder.id_tv_vip_goods_num?.visibility = View.GONE
} else {
if (mContext?.isDestroyed != true) {
Glide.with(mContext!!).load(bean.bgImage).placeholder(R.drawable.img_vip_rights_bg)
.into(holder?.id_img_rights_bg!!)
Glide.with(mContext!!).load(bean.icon)
.into(holder?.id_img_rights_icon!!)
}
holder.id_tv_vip_goods_name?.text = "${bean.brand} ${bean.category} ${bean.goodsName}"
holder.id_tv_huafei_desc?.visibility = View.GONE
holder.id_tv_vip_goods_num?.visibility = View.VISIBLE
}
}
......@@ -48,19 +67,21 @@ class ItemVipOrderAdapter :
class ViewHolder : RecyclerView.ViewHolder {
var id_img_rights_bg: ImageView?
var id_img_rights_icon: RecycleImageView?
var id_img_rights_icon: ImageView?
var id_tv_vip_goods_name: TextView?
var id_tv_vip_goods_price: TextView?
var id_tv_vip_goods_num: TextView?
var id_tv_huafei_desc: TextView?
constructor(
itemView: View
) : super(itemView) {
id_img_rights_bg = itemView.findViewById<ImageView>(R.id.id_img_rights_bg)
id_img_rights_icon = itemView.findViewById<RecycleImageView>(R.id.id_img_rights_icon)
id_img_rights_icon = itemView.findViewById<ImageView>(R.id.id_img_rights_icon)
id_tv_vip_goods_name = itemView.findViewById<TextView>(R.id.id_tv_vip_goods_name)
id_tv_vip_goods_price = itemView.findViewById<TextView>(R.id.id_tv_vip_goods_price)
id_tv_vip_goods_num = itemView.findViewById<TextView>(R.id.id_tv_vip_goods_num)
id_tv_huafei_desc = itemView.findViewById<TextView>(R.id.id_tv_huafei_desc)
}
}
......
......@@ -36,9 +36,13 @@ class JgqQyAdapter : BaseRecyclerAdapter<JgqQyEntity, JgqQyAdapter.ViewHolder> {
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val bean = mList[position]
Glide.with(mContext!!).load(bean.icon)
.apply(RequestOptions.bitmapTransform(CircleCrop()))
.into(holder?.id_icon!!)
if (bean.rechargeType.equals("2")){
Glide.with(AppContext.get()).asGif().load(R.drawable.img_gif_huafei).into(holder.id_icon!!)
}else{
Glide.with(mContext!!).load(bean.icon)
.apply(RequestOptions.bitmapTransform(CircleCrop()))
.into(holder.id_icon!!)
}
holder.id_name?.text = bean.brand
if(bean.maxDiscount.isNullOrEmpty()||bean.maxDiscount.equals("0")){
holder.id_tv_discount_value?.visibility = View.INVISIBLE
......
......@@ -15,6 +15,7 @@ import com.zxbw.modulemain.R
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseRecyclerAdapter
import com.zxhl.cms.net.model.box.ShopOrderEntity
import com.zxhl.cms.net.model.qy.RightsDetailEntity
import com.zxhl.cms.utils.Utils
//我的订单
......@@ -32,7 +33,7 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
}
override fun getItemViewType(position: Int): Int {
if (mList[position].orderType == "50") {
if (mList[position].orderType == "50" || mList[position].orderType == "8080") {
return VIEW_TYPE_VIP_VIEW
} else if (mList[position].orderType == "51") {
return VIEW_TYPE_CARD_VIEW
......@@ -52,10 +53,10 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
copy(holder.id_tv_order_no?.text.toString())
}
holder.id_tv_total_price?.text = "¥${bean.cash}"
if (bean.orderType=="99"){
if (bean.orderType == "99") {
holder.id_tv_pricedesc?.text =
"总价:|"
}else{
} else {
holder.id_tv_pricedesc?.text =
"总价:¥${bean.totalPrice}|优惠:¥${bean.discount}|运费:¥${bean.freight}|"
}
......@@ -75,9 +76,19 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
}
holder.id_tv_vip_order_no?.text = bean.orderNo
holder.id_tv_vip_pay_time?.text = "付款时间:${bean.payTime}"
holder.id_tv_vip_phone_number?.text = "会员手机号:${bean.phone}"
if (bean.orderType == "8080") {
holder.id_tv_vip_phone_number?.text = "充值手机号:${bean.phone}"
if (bean.equitCard.isNullOrEmpty()) {
val huafeiDetailEntity = RightsDetailEntity()
huafeiDetailEntity.salePrice = bean.cash
huafeiDetailEntity.goodsName = bean.orderNotes
bean.equitCard = listOf(huafeiDetailEntity)
}
} else {
holder.id_tv_vip_phone_number?.text = "会员手机号:${bean.phone}"
}
if (!bean.equitCard.isNullOrEmpty()) {
var mAdapter: ItemVipOrderAdapter? = ItemVipOrderAdapter(mContext)
var mAdapter: ItemVipOrderAdapter? = ItemVipOrderAdapter(mContext, bean.orderType)
holder.id_rl_vip_order_item?.layoutManager =
LinearLayoutManager(mContext)
holder.id_rl_vip_order_item?.adapter = mAdapter
......@@ -150,6 +161,7 @@ class MyOrderAdapter : BaseRecyclerAdapter<ShopOrderEntity, RecyclerView.ViewHol
var id_tv_vip_pay_time: TextView?
var img_vip_order_no_copy: ImageView?
var id_rl_vip_order_item: RecyclerView?
constructor(
itemView: View
) : super(itemView) {
......
......@@ -26,10 +26,12 @@ class RechargePresenter : RechargeContract.Presenter {
.subscribe(object : BaseObserver<List<CouponsEntity>>() {
override fun onSuccess(result: List<CouponsEntity>?) {
mView.setCouponsList(result)
getPayList("mobileFee")
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
mView.setCouponsList(null)
getPayList("mobileFee")
}
})
}
......
......@@ -224,7 +224,7 @@
android:layout_marginTop="10dp"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/img_vip_rights_bg" />
android:src="@drawable/img_vip_rights_pay_bg" />
<LinearLayout
android:layout_width="match_parent"
......
......@@ -69,16 +69,18 @@
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/shape_ffffff_r6"
android:inputType="phone"
android:lines="1"
android:padding="10dp"
android:textColor="@color/color_999999"
android:inputType="phone"
android:textCursorDrawable="@drawable/cursor_color"
android:textSize="16sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_rl_yunyingshang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_rl_yunyingshang"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
......@@ -128,9 +130,9 @@
android:layout_height="wrap_content"
android:layout_below="@+id/id_img_huafei_bg"
android:layout_marginTop="-10dp"
android:paddingBottom="16dp"
android:background="@drawable/shape_ffffff_r6"
android:orientation="vertical">
android:orientation="vertical"
android:paddingBottom="16dp">
<RelativeLayout
android:layout_width="match_parent"
......@@ -244,8 +246,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="虚拟号码(166、167、170、171号段)以及符号、携号
转网的号码无法充值,请勿提交,提交无法售后;"
android:text="虚拟号段号码(166、167、170、171号段)以及副号、携号转网的号码无法充值,请勿提交,提交无法售后;"
android:textColor="#BA7E36"
android:textSize="12sp"
android:textStyle="bold" />
......@@ -263,7 +264,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="【充值范围】:全国移动/联通/电信号码"
android:text="@string/huafei_desc"
android:layout_marginBottom="82dp"
android:textColor="@color/color_999999"
android:textSize="12sp"
android:textStyle="bold" />
......@@ -348,6 +350,7 @@
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<RelativeLayout
android:id="@+id/id_rl_h5_pay_view"
android:layout_width="match_parent"
......
......@@ -29,7 +29,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/id_refresh_view"
......
......@@ -19,7 +19,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.zxhl.cms.widget.RecycleImageView
<ImageView
android:id="@+id/id_img_rights_icon"
android:layout_width="12dp"
android:layout_height="12dp"
......@@ -63,6 +63,15 @@
android:textColor="@color/color_333333"
android:textSize="12sp" />
<TextView
android:id="@+id/id_tv_huafei_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="72小时内到账"
android:visibility="gone"
android:textColor="#D88420"
android:textSize="12sp" />
</LinearLayout>
......
<resources></resources>
<resources>
<string name="huafei_desc">[充值范围]:全国移动/联通/电信号码\n\n[充值方式]:输入手机号进行充值
\n\n[到账时间]:付款成功后,系统会为您发起充值,一般24小时到72小时左右到账,特殊情况3-7天到账,具体充值到账时间以运营商充值结果为准,充值过程无法退款,充值高峰可能出现分批到账或充值失败情况如有异常请咨请咨询人工客服。
\n\n[温馨提示]:
\n1、请务必保证号码正确,因号码错误无法退款;
\n2、请拍下前查询要充值号码的话费余额,如已停机的,请查询欠费多少,以免万.充值后话费还不够,不能正常开机,造成大家不必要的误会,谢谢合作;
\n3、如充值未到账需提供APP的话费齐值记录五面截图,必要时需要提供手机服务密码,以便客服尽快核实处理。
\n4、若订单提交后商品库存不足时,将会为您所提交订单发起退款。</string>
</resources>
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