Commit 03e5e97e authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 9481a1f4
...@@ -249,6 +249,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, ...@@ -249,6 +249,9 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
openAlipayApp(vipBean.payToModel2SecondAlipayAppid) openAlipayApp(vipBean.payToModel2SecondAlipayAppid)
} }
} }
3 -> {
openWxApp()
}
} }
} }
} }
...@@ -812,12 +815,12 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, ...@@ -812,12 +815,12 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private fun openWxApp() { private fun openWxApp() {
// AppConfig.enterAlipay = true // AppConfig.enterAlipay = true
try { try {
val appId = "wxdafe24fe177a5661" // 填移动应用(App)的 AppId,非小程序的 AppID val appId = wxAppId // 填移动应用(App)的 AppId,非小程序的 AppID
val api: IWXAPI = WXAPIFactory.createWXAPI(context, appId) val api: IWXAPI = WXAPIFactory.createWXAPI(context, appId)
val req = WXLaunchMiniProgram.Req() val req = WXLaunchMiniProgram.Req()
req.userName = "gh_439c32026e1b" // 填小程序原始id req.userName = "gh_439c32026e1b" // 填小程序原始id
req.path = req.path =
"/pages/loading?testApp1=mcg1&testApp2=mcg2" ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。 "/pages/loading?" + "app_uid=" + UserManager.getInstance().userID + "&package_app=" + Constant.MINTS_PKG_NAME+ "&source_type=android"
req.miniprogramType = req.miniprogramType =
WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE // 可选打开 开发版,体验版和正式版 WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE // 可选打开 开发版,体验版和正式版
api.sendReq(req) api.sendReq(req)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:text="欢迎使用爱都安居" android:text="欢迎使用"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" /> android:textStyle="bold" />
......
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