Commit 642edf32 authored by 王雪伟's avatar 王雪伟

Merge remote-tracking branch 'origin/develop_1.0.8' into develop_1.0.8

parents 18108c1a d9ead57c
......@@ -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_URL = "";
public static String BASE_NEW_URL = "";
......@@ -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_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_GOODS_FETCHALL_CARD = "app/v1/game/xiaoxiang/fetchAllCard";//话费券列表
}
public static class FlashSale{
public static final String HOME_FLASH_SALE_SKILL = "app/v1/game/xiaoxiang/skill";//秒杀时间表
......
......@@ -391,5 +391,12 @@ interface IHomeApi {
//关联地址
@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 {
@RounterUri(Constant.scheme + "://paysucess")
fun getIntentPaySuccessSkill(): Intent
@RounterUri(Constant.scheme + "://recharge")
fun getIntentRecharge(): Intent
}
\ No newline at end of file
......@@ -459,4 +459,13 @@ public class JumpUtils {
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 @@
android:scheme="xxsqshop" />
</intent-filter>
</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>
......
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
......@@ -26,7 +26,7 @@ class UserCenterFragment : BaseFragment(), AdCallback<String> {
override fun init(view: View?) {
id_ll_member?.setOnClickListener {
//JumpUtils.CardVoucherJump("猫眼")
JumpUtils.RechargeJump()
}
id_img_kefu?.setOnClickListener {
// 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
This diff is collapsed.
<?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