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

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :加入话费支付结果弹窗
parent eba5811b
......@@ -277,7 +277,7 @@ interface RounterApi {
fun getIntentToPaySkill(): Intent
@RounterUri(Constant.scheme + "://paysucess")
fun getIntentPaySuccessSkill(): Intent
fun getIntentPaySuccessSkill(@RounterParam("pay_type") pay_type: String): Intent
@RounterUri(Constant.scheme + "://recharge")
fun getIntentRecharge(): Intent
......
......@@ -441,6 +441,7 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
public static void ToPaySkillJump() {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentToPaySkill();
......@@ -450,15 +451,27 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
public static void PaySuceessJump() {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentPaySuccessSkill();
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentPaySuccessSkill("");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
AppContext.get().startActivity(intent);
} catch (Exception e) {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
public static void PaySuceessJump(String pay_type) {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentPaySuccessSkill(pay_type);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
AppContext.get().startActivity(intent);
} catch (Exception e) {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
}
}
public static void RechargeJump() {
try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentRecharge();
......
......@@ -7,19 +7,29 @@ import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.utils.JumpUtils
import kotlinx.android.synthetic.main.layout_pay_suc.*
class PaySuccessActivity:BaseActivity() {
class PaySuccessActivity : BaseActivity() {
var type = ""
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.layout_pay_suc
}
override fun init() {
type = intent?.data?.getQueryParameter("pay_type") ?: ""
if (type.equals("2")) {
id_tv_desc_tips.text = "支付成功\n话费充值将在72小时到账!"
} else {
id_tv_desc_tips.text = "恭喜您\n本次交易成功!"
}
id_tv_btn_order?.setOnClickListener {
JumpUtils.MyOrderJump("")
finish()
......
......@@ -277,7 +277,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
SettingPreference.setOutTradeNo("")
showResultLoading(true)
finish()
JumpUtils.PaySuceessJump()
JumpUtils.PaySuceessJump("2")
}
override fun verifyOrderFail(errorMsg: String) {
......
......@@ -36,7 +36,6 @@ 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!!)
......
......@@ -32,6 +32,7 @@
android:textStyle="bold" />
<TextView
android:id="@+id/id_tv_desc_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/id_img_back2"
......
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