Commit c76658d4 authored by mengcuiguang2's avatar mengcuiguang2

添加微信支付

parent 2a45c2f4
......@@ -13,8 +13,8 @@ android {
applicationId "com.duben.infinitefunjia"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 2
versionName "1.0.1"
versionCode 3
versionName "1.0.2"
flavorDimensions "default"
// dex突破65535的限制
......@@ -119,6 +119,7 @@ android {
productFlavors {
facai {}
home {}
yingyongbao {}
}
productFlavors.all {
......
......@@ -184,8 +184,8 @@ class VipPresenter : BasePresenter<VipView>() {
fun getVipPayParams(payChannel: String, pid: String,isInstallAlipay:Boolean) {
val vo = HashMap<String, Any>()
// vo["payChannel"] = payChannel
vo["payChannel"] = "ALIPAY"
vo["payChannel"] = payChannel
// vo["payChannel"] = "ALIPAY"
vo["pid"] = pid
vo["isInstallAlipay"] = isInstallAlipay
AppHttpManager.getInstance(loanApplication)
......@@ -207,8 +207,8 @@ class VipPresenter : BasePresenter<VipView>() {
val code: Int = baseResponse.getStatus()
when (code) {
200 -> {
// view.getVipPayParamsSuc(payChannel, baseResponse.data)
view.getVipPayParamsSuc("ALIPAY", baseResponse.data)
view.getVipPayParamsSuc(payChannel, baseResponse.data)
// view.getVipPayParamsSuc("ALIPAY", baseResponse.data)
}
else -> {
view.showToast(baseResponse.getMessage())
......
......@@ -160,30 +160,30 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
* 设置content样式
*/
private fun setVipContent(bean: VipBean.ListBean) {
// if (bean.isAlipay && bean.isWeixin) {
// ll_vip_alipay.visibility = View.VISIBLE
// ll_vip_wx.visibility = View.VISIBLE
// payType = WEIXIN_PAY
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
// } else if (bean.isAlipay && !bean.isWeixin) {
// ll_vip_alipay.visibility = View.VISIBLE
// ll_vip_wx.visibility = View.GONE
// payType = ALIPAY
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
// } else if (!bean.isAlipay && bean.isWeixin) {
// ll_vip_alipay.visibility = View.GONE
// ll_vip_wx.visibility = View.VISIBLE
// payType = WEIXIN_PAY
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
// }
if (bean.isAlipay && bean.isWeixin) {
ll_vip_alipay.visibility = View.VISIBLE
ll_vip_wx.visibility = View.VISIBLE
payType = WEIXIN_PAY
iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
} else if (bean.isAlipay && !bean.isWeixin) {
ll_vip_alipay.visibility = View.VISIBLE
ll_vip_wx.visibility = View.GONE
payType = ALIPAY
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
} else if (!bean.isAlipay && bean.isWeixin) {
ll_vip_alipay.visibility = View.GONE
ll_vip_wx.visibility = View.VISIBLE
payType = WEIXIN_PAY
iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
}
// ll_vip_alipay.visibility = View.VISIBLE
// ll_vip_wx.visibility = View.GONE
// payType = ALIPAY
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
if (!TextUtils.isEmpty(bean.remarks)) {
......@@ -681,8 +681,16 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
override fun onPageSelected(position: Int) {
if(data!=null&&data.size>0){
if(!TextUtils.isEmpty(data[position].avatar)){
GlideUtils.loadBlurImageView(mContext, data[position].avatar, iv_blur)
}
if(!TextUtils.isEmpty(data[position].title)){
tv_banner_title.text = String.format("《%1s》", data[position].title)
}
}
}
override fun onPageScrollStateChanged(state: Int) {}
......
......@@ -35,9 +35,9 @@ RELEASE_SHARESDK_KEY=396ef0a56a387
RELEASE_SHARESDK_SECRET=87ccb6a70ed788f7cdaa88f5a4ace07e
#weixin
WEIXIN_APP_PAY_ID ="wx7412076ce1c5b1bb"
WEIXIN_APP_ID =wx7412076ce1c5b1bb
WEIXIN_APP_SECRET =a0f1b31059dc4127282a0468ef349b21
WEIXIN_APP_PAY_ID ="wxbf4f8779563887e0"
WEIXIN_APP_ID =wxbf4f8779563887e0
WEIXIN_APP_SECRET =392f6c2baec1bef3e07d4e5304392ebf
#ditu
RELEASE_MAP_KEY=e43edf1fc38bd7695e36516048830cef
......
......@@ -16,8 +16,8 @@
<Tumblr Enable="false" />
<Email Enable="false" />
<ShortMessage Enable="false" />
<Wechat AppId="wx7412076ce1c5b1bb" AppSecret="a0f1b31059dc4127282a0468ef349b21" userName="gh_afb25ac019c9" path="pages/index/index.html?id=1" WithShareTicket="true" MiniprogramType="0" />
<WechatMoments AppId="wx7412076ce1c5b1bb" AppSecret="a0f1b31059dc4127282a0468ef349b21" />
<Wechat AppId="wxbf4f8779563887e0" AppSecret="392f6c2baec1bef3e07d4e5304392ebf" userName="gh_afb25ac019c9" path="pages/index/index.html?id=1" WithShareTicket="true" MiniprogramType="0" />
<WechatMoments AppId="wxbf4f8779563887e0" AppSecret="392f6c2baec1bef3e07d4e5304392ebf" />
<QQ Enable="false" />
<Instapaper Enable="false" />
<Pocket Enable="false" />
......
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