Commit c76658d4 authored by mengcuiguang2's avatar mengcuiguang2

添加微信支付

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