Commit d9ead57c authored by maxiaoliang's avatar maxiaoliang

提交代码

parent cf728904
...@@ -21,7 +21,7 @@ public class NetConfig { ...@@ -21,7 +21,7 @@ public class NetConfig {
} }
// 根据调试选项更新环境 // 根据调试选项更新环境
public static Environment sEnvironment = PRODUCT;// 当前环境 public static Environment sEnvironment = DEV;// 当前环境
public static String BASE_WEB_URL = ""; public static String BASE_WEB_URL = "";
public static String BASE_URL = ""; public static String BASE_URL = "";
public static String BASE_NEW_URL = ""; public static String BASE_NEW_URL = "";
...@@ -275,6 +275,7 @@ public class NetConfig { ...@@ -275,6 +275,7 @@ public class NetConfig {
public static final String XX_GOODS_CONVERT_LINK = "app/v1/game/xiaoxiang/convertLink";//转链 public static final String XX_GOODS_CONVERT_LINK = "app/v1/game/xiaoxiang/convertLink";//转链
public static final String XX_GOODS_ITEM_DETAIL = "app/v1/game/xiaoxiang/itemDetail";//图文详情 public static final String XX_GOODS_ITEM_DETAIL = "app/v1/game/xiaoxiang/itemDetail";//图文详情
public static final String XX_HOME_BANNER = "app/v1/game/xiaoxiang/banner";//Banner public static final String XX_HOME_BANNER = "app/v1/game/xiaoxiang/banner";//Banner
public static final String XX_GOODS_FETCHALL_CARD = "app/v1/game/xiaoxiang/fetchAllCard";//话费券列表
} }
public static class FlashSale{ public static class FlashSale{
public static final String HOME_FLASH_SALE_SKILL = "app/v1/game/xiaoxiang/skill";//秒杀时间表 public static final String HOME_FLASH_SALE_SKILL = "app/v1/game/xiaoxiang/skill";//秒杀时间表
......
...@@ -391,5 +391,12 @@ interface IHomeApi { ...@@ -391,5 +391,12 @@ interface IHomeApi {
//关联地址 //关联地址
@POST(NetConfig.FlashSale.HOME_FLASH_SALE_UPDATE_ORDER_ADDRESS) @POST(NetConfig.FlashSale.HOME_FLASH_SALE_UPDATE_ORDER_ADDRESS)
fun updateAddress(@Query("addressId") addressId: String?,@Query("outTradeNo") outTradeNo: String?): Observable<Response<Any>> fun updateAddress(
@Query("addressId") addressId: String?,
@Query("outTradeNo") outTradeNo: String?
): Observable<Response<Any>>
//获取用户话费券列表
@GET(NetConfig.QY.XX_GOODS_FETCHALL_CARD)
fun getFetchallCard(): Observable<Response<List<SkillEntity>>>
} }
\ No newline at end of file
...@@ -278,4 +278,7 @@ interface RounterApi { ...@@ -278,4 +278,7 @@ interface RounterApi {
@RounterUri(Constant.scheme + "://paysucess") @RounterUri(Constant.scheme + "://paysucess")
fun getIntentPaySuccessSkill(): Intent fun getIntentPaySuccessSkill(): Intent
@RounterUri(Constant.scheme + "://recharge")
fun getIntentRecharge(): Intent
} }
\ No newline at end of file
...@@ -459,4 +459,13 @@ public class JumpUtils { ...@@ -459,4 +459,13 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!"); Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
} }
} }
public static void RechargeJump() {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentRecharge();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
AppContext.get().startActivity(intent);
} catch (Exception e) {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
} }
...@@ -321,6 +321,18 @@ ...@@ -321,6 +321,18 @@
android:scheme="xxsqshop" /> android:scheme="xxsqshop" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".activity.RechargeActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="recharge"
android:scheme="xxsqshop" />
</intent-filter>
</activity>
</application> </application>
......
package com.zxbw.modulemain.activity
import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import com.zxbw.modulemain.R
import com.zxbw.modulemain.adapter.RechargeAdapter
import com.zxbw.modulemain.contract.RechargeContract
import com.zxbw.modulemain.presenter.RechargePresenter
import com.zxhl.cms.AppContext
import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.net.model.qy.RightsDetailEntity
import com.zxhl.cms.utils.OnRecycleItemClickListener
import kotlinx.android.synthetic.main.activity_layout_recharge.*
//话费充值页面
class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<RightsDetailEntity>,
RechargeContract.View {
private var mAdapter: RechargeAdapter? = null
private var mPresenter: RechargePresenter? = null
override fun onClick(v: View?) {
}
override fun before() {
super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
}
override fun layoutID(): Int {
return R.layout.activity_layout_recharge
}
override fun init() {
mPresenter = RechargePresenter(this)
mAdapter = RechargeAdapter(this, this)
id_rl_recharge?.layoutManager = GridLayoutManager(this, 3)
id_rl_recharge?.adapter = mAdapter
mPresenter?.getFetchCard()
}
override fun onItemClick(view: View?, position: Int, data: RightsDetailEntity?) {
}
override fun setData() {
}
}
\ No newline at end of file
package com.zxbw.modulemain.adapter
import android.app.Activity
import android.graphics.Paint
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
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.qy.RightsDetailEntity
import com.zxhl.cms.utils.OnRecycleItemClickListener
class RechargeAdapter : BaseRecyclerAdapter<RightsDetailEntity, RechargeAdapter.ViewHolder> {
private var mContext: Activity? = null
private val listener: OnRecycleItemClickListener<RightsDetailEntity>
constructor(
content: Activity?,
listener: OnRecycleItemClickListener<RightsDetailEntity>
) : super() {
mContext = content
this.listener = listener
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
// var bean = mList[position]
// holder.id_tv_cards_name?.text = "${bean.brand}${bean.goodsName}${bean.category}"
// holder.id_tv_cagte_name?.text = "${bean.category}"
// // holder.id_goods_icon?.setLoadImageUrl(bean.icon,false)
// holder.id_goods_yuan_jia?.text = "${bean.goodsName}"
// holder.id_tv_card_discount?.text = "会员专享${bean.costDiscount}折"
// holder.id_tv_card_price?.text = "${bean.salePrice}"
// holder.id_tv_guanfang_price?.text = "官方价 ¥${bean.originPrice}元"
// holder.id_tv_guanfang_price?.getPaint()?.setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中划线
// holder.id_ll_item?.setOnClickListener {
// listener.onItemClick(it, position, bean)
// }
}
override fun getItemCount(): Int {
return 3
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(AppContext.get())
.inflate(R.layout.item_layout_recharge, parent, false)
)
}
class ViewHolder : RecyclerView.ViewHolder {
var id_ll_item: LinearLayout?
// var id_goods_icon: RecycleImageView?
var id_tv_activity_price_text: TextView?
var id_tv_rmb: TextView?
var id_tv_price: TextView?
var id_tv_orgin_price: TextView?
constructor(
itemView: View
) : super(itemView) {
id_ll_item =
itemView.findViewById<LinearLayout>(R.id.id_ll_item)
id_tv_activity_price_text = itemView.findViewById<TextView>(R.id.id_tv_activity_price_text)
id_tv_rmb = itemView.findViewById<TextView>(R.id.id_tv_rmb)
id_tv_price = itemView.findViewById<TextView>(R.id.id_tv_price)
id_tv_orgin_price = itemView.findViewById<TextView>(R.id.id_tv_orgin_price)
}
}
}
\ No newline at end of file
package com.zxbw.modulemain.contract
class RechargeContract {
interface View {
fun setData()
}
interface Presenter {
fun getFetchCard()
}
}
\ No newline at end of file
...@@ -29,7 +29,7 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> { ...@@ -29,7 +29,7 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
override fun init(view: View?) { override fun init(view: View?) {
id_ll_member?.setOnClickListener { id_ll_member?.setOnClickListener {
//JumpUtils.CardVoucherJump("猫眼") JumpUtils.RechargeJump()
} }
id_img_kefu?.setOnClickListener { id_img_kefu?.setOnClickListener {
JumpUtils.webJump("客服", NetConfig.H5.WEB_URL_CUSTOMER_SERVICE) JumpUtils.webJump("客服", NetConfig.H5.WEB_URL_CUSTOMER_SERVICE)
......
package com.zxbw.modulemain.presenter
import com.zxbw.modulemain.contract.RechargeContract
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.qy.RightsDetailEntity
import com.zxhl.cms.net.model.qy.SkillEntity
class RechargePresenter : RechargeContract.Presenter {
private val mView: RechargeContract.View
constructor(mView: RechargeContract.View) {
this.mView = mView
}
override fun getFetchCard() {
ApiClient.homeApi.getFetchallCard().compose(RxSchedulers.observableIO2Main())
.subscribe(object : BaseObserver<List<SkillEntity>>() {
override fun onSuccess(result: List<SkillEntity>?) {
if (!result.isNullOrEmpty()){
}
}
override fun onFailure(e: Throwable?, code: String?, errorMsg: String?) {
}
})
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size android:width="1dp" />
<solid android:color="@color/color_999999" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#ff999999" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffa3a4a6" />
<corners
android:bottomLeftRadius="11dp"
android:bottomRightRadius="11dp"
android:topLeftRadius="11dp"
android:topRightRadius="11dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#ffcbcbcb" />
<solid android:color="#ffffffff" />
<corners
android:bottomLeftRadius="6dp"
android:bottomRightRadius="6dp"
android:topLeftRadius="6dp"
android:topRightRadius="6dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="#ffedd49d" />
<solid android:color="#fffff9f0" />
<corners
android:bottomLeftRadius="6dp"
android:bottomRightRadius="6dp"
android:topLeftRadius="6dp"
android:topRightRadius="6dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fff6f9ff" />
<corners android:radius="6dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff" />
<corners
android:bottomLeftRadius="6dp"
android:bottomRightRadius="6dp"
android:topLeftRadius="6dp"
android:topRightRadius="6dp" />
</shape>
\ 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="#F3F4F5">
<RelativeLayout
android:id="@+id/id_rl_title"
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="@color/white">
<ImageView
android:id="@+id/id_img_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:padding="16dp"
android:src="@drawable/icon_fanhui" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="15dp"
android:text="话费充值"
android:textColor="@color/color_333333"
android:textSize="16sp"
android:textStyle="bold" />
</RelativeLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/id_rl_title">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="充值手机号"
android:textColor="@color/color_333333"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="(请确保准确无误)"
android:textColor="@color/color_999999"
android:textSize="12sp" />
</LinearLayout>
<EditText
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/shape_ffffff_r6"
android:lines="1"
android:padding="10dp"
android:text="132789"
android:textColor="@color/color_999999"
android:inputType="phone"
android:textCursorDrawable="@drawable/cursor_color"
android:textSize="16sp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/id_img_huafei_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bg_huafei_lijian" />
<TextView
android:id="@+id/id_tv_huafei_jian"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:drawableLeft="@drawable/icon_shengyin"
android:drawablePadding="16dp"
android:text="话费立减金"
android:textColor="#F8E8CC"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/id_tv_huafei_jian"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:text="(可叠加抵扣金使用)"
android:textColor="#D6D6D6"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="30dp"
android:layout_marginRight="10dp"
android:text="支持电信/移动/联通用户"
android:textColor="#D6D6D6"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/id_img_huafei_bg"
android:layout_marginTop="-10dp"
android:background="@drawable/shape_ffffff_r6"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/shape_f6f9ff_r6"
android:padding="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="优惠券"
android:textColor="@color/color_333333"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:drawableRight="@drawable/icon_fanhui_chengse"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:text="您已选择5元优惠券"
android:textColor="#C46B00"
android:textSize="12sp" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/id_rl_recharge"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/icon_dingdanchaxun"
android:drawablePadding="4dp"
android:text="订单查询"
android:textColor="#B4B4B4"
android:textSize="10sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="15dp"
android:layout_marginLeft="32dp"
android:layout_marginRight="32dp"
android:background="#B4B4B4"
android:text="|" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/icon_kefu_new_hui"
android:drawablePadding="4dp"
android:text="客服帮助"
android:textColor="#B4B4B4"
android:textSize="10sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/shape_ffffff_r6"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingBottom="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:text="温馨提示"
android:textColor="@color/color_333333"
android:textSize="16sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_right" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="虚拟号码(166、167、170、171号段)以及符号、携号
转网的号码无法充值,请勿提交,提交无法售后;"
android:textColor="#BA7E36"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="充值量较大,最晚72小时内到账"
android:textColor="#BA7E36"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="【充值范围】:全国移动/联通/电信号码"
android:textColor="@color/color_999999"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_alignParentBottom="true"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="30dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:includeFontPadding="false"
android:text="券后价"
android:textColor="@color/color_666666"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="2dp"
android:includeFontPadding="false"
android:text="¥ "
android:textColor="#BA7E36"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="94.8"
android:textColor="#BA7E36"
android:textSize="28sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="27dp"
android:layout_marginTop="2dp"
android:text="原价 ¥100"
android:textColor="@color/color_999999"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/shape_333333_r20"
android:gravity="center"
android:text="立即充值"
android:textColor="#F8E8CC"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/id_ll_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/shape_cbcbcb_r6"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/id_tv_activity_price_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_a3a4a6_r10"
android:paddingLeft="6dp"
android:paddingTop="2dp"
android:paddingRight="6dp"
android:paddingBottom="2dp"
android:text="活动价"
android:textColor="@color/white"
android:textSize="12sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/id_tv_rmb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textColor="@color/color_333333"
android:textSize="12sp"
android:textStyle="bold" />
<TextView
android:id="@+id/id_tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="49.8"
android:textColor="@color/color_333333"
android:textSize="29sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/id_tv_orgin_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="10dp"
android:text="原价 ¥50"
android:textColor="@color/color_999999"
android:textSize="12sp" />
</LinearLayout>
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