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

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :加入话费支付结果弹窗
parent eba5811b
...@@ -277,7 +277,7 @@ interface RounterApi { ...@@ -277,7 +277,7 @@ interface RounterApi {
fun getIntentToPaySkill(): Intent fun getIntentToPaySkill(): Intent
@RounterUri(Constant.scheme + "://paysucess") @RounterUri(Constant.scheme + "://paysucess")
fun getIntentPaySuccessSkill(): Intent fun getIntentPaySuccessSkill(@RounterParam("pay_type") pay_type: String): Intent
@RounterUri(Constant.scheme + "://recharge") @RounterUri(Constant.scheme + "://recharge")
fun getIntentRecharge(): Intent fun getIntentRecharge(): Intent
......
...@@ -441,6 +441,7 @@ public class JumpUtils { ...@@ -441,6 +441,7 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!"); Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
} }
} }
public static void ToPaySkillJump() { public static void ToPaySkillJump() {
try { try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentToPaySkill(); Intent intent = RounterBus.getRounter(RounterApi.class).getIntentToPaySkill();
...@@ -450,15 +451,27 @@ public class JumpUtils { ...@@ -450,15 +451,27 @@ public class JumpUtils {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!"); Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!");
} }
} }
public static void PaySuceessJump() { public static void PaySuceessJump() {
try { try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentPaySuccessSkill(); Intent intent = RounterBus.getRounter(RounterApi.class).getIntentPaySuccessSkill("");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
AppContext.get().startActivity(intent); AppContext.get().startActivity(intent);
} catch (Exception e) { } catch (Exception e) {
Utils.showToast(AppContext.get(), "该版本暂不支持,请更新版本!"); 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() { public static void RechargeJump() {
try { try {
Intent intent = RounterBus.getRounter(RounterApi.class).getIntentRecharge(); Intent intent = RounterBus.getRounter(RounterApi.class).getIntentRecharge();
......
...@@ -7,19 +7,29 @@ import com.zxhl.cms.common.base.BaseActivity ...@@ -7,19 +7,29 @@ import com.zxhl.cms.common.base.BaseActivity
import com.zxhl.cms.utils.JumpUtils import com.zxhl.cms.utils.JumpUtils
import kotlinx.android.synthetic.main.layout_pay_suc.* import kotlinx.android.synthetic.main.layout_pay_suc.*
class PaySuccessActivity:BaseActivity() { class PaySuccessActivity : BaseActivity() {
var type = ""
override fun onClick(v: View?) { override fun onClick(v: View?) {
} }
override fun before() { override fun before() {
super.before() super.before()
setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent)) setStatusBarBackground(AppContext.get().resources.getColor(R.color.transparent))
} }
override fun layoutID(): Int { override fun layoutID(): Int {
return R.layout.layout_pay_suc return R.layout.layout_pay_suc
} }
override fun init() { 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 { id_tv_btn_order?.setOnClickListener {
JumpUtils.MyOrderJump("") JumpUtils.MyOrderJump("")
finish() finish()
......
...@@ -277,7 +277,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity ...@@ -277,7 +277,7 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
SettingPreference.setOutTradeNo("") SettingPreference.setOutTradeNo("")
showResultLoading(true) showResultLoading(true)
finish() finish()
JumpUtils.PaySuceessJump() JumpUtils.PaySuceessJump("2")
} }
override fun verifyOrderFail(errorMsg: String) { override fun verifyOrderFail(errorMsg: String) {
......
...@@ -36,7 +36,6 @@ class JgqQyAdapter : BaseRecyclerAdapter<JgqQyEntity, JgqQyAdapter.ViewHolder> { ...@@ -36,7 +36,6 @@ class JgqQyAdapter : BaseRecyclerAdapter<JgqQyEntity, JgqQyAdapter.ViewHolder> {
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val bean = mList[position] val bean = mList[position]
Glide.with(mContext!!).load(bean.icon) Glide.with(mContext!!).load(bean.icon)
.apply(RequestOptions.bitmapTransform(CircleCrop())) .apply(RequestOptions.bitmapTransform(CircleCrop()))
.into(holder?.id_icon!!) .into(holder?.id_icon!!)
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
android:id="@+id/id_tv_desc_tips"
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_img_back2" 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