|
@@ -35,6 +35,7 @@ import com.core.utils.CommonUtil;
|
|
|
import com.core.utils.IntentUtils;
|
|
import com.core.utils.IntentUtils;
|
|
|
import com.core.utils.ToastUtil;
|
|
import com.core.utils.ToastUtil;
|
|
|
import com.modular.appmessages.R;
|
|
import com.modular.appmessages.R;
|
|
|
|
|
+import com.modular.apputils.widget.VeriftyDialog;
|
|
|
import com.module.recyclerlibrary.ui.refresh.BaseRefreshLayout;
|
|
import com.module.recyclerlibrary.ui.refresh.BaseRefreshLayout;
|
|
|
import com.module.recyclerlibrary.ui.refresh.webempty.EmptyRefreshLayout;
|
|
import com.module.recyclerlibrary.ui.refresh.webempty.EmptyRefreshLayout;
|
|
|
import com.umeng.socialize.ShareAction;
|
|
import com.umeng.socialize.ShareAction;
|
|
@@ -182,6 +183,29 @@ public class MessageWebActivity extends BaseActivity {
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onPause() {
|
|
|
|
|
+ if (mVeriftyDialog != null) {
|
|
|
|
|
+ mVeriftyDialog.dismiss();
|
|
|
|
|
+ mVeriftyDialog = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ super.onPause();
|
|
|
|
|
+ }
|
|
|
|
|
+ private VeriftyDialog mVeriftyDialog;
|
|
|
|
|
+ private void showPlyEnd() {
|
|
|
|
|
+ mVeriftyDialog = new VeriftyDialog.Builder(this)
|
|
|
|
|
+ .setCanceledOnTouchOutside(false)
|
|
|
|
|
+ .setContent("微信支付需要在浏览器上打开,是否确认跳转?")
|
|
|
|
|
+ .build(new VeriftyDialog.OnDialogClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void result(boolean clickSure) {
|
|
|
|
|
+ if (clickSure){
|
|
|
|
|
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
|
|
|
|
+ startActivity(intent);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
protected boolean loadUrlViewClient(WebView view, String url) {
|
|
protected boolean loadUrlViewClient(WebView view, String url) {
|
|
|
if (needCookie) {
|
|
if (needCookie) {
|
|
|
synCookies(ct, url);
|
|
synCookies(ct, url);
|
|
@@ -192,13 +216,12 @@ public class MessageWebActivity extends BaseActivity {
|
|
|
|| url.startsWith("alipays://") //支付宝
|
|
|| url.startsWith("alipays://") //支付宝
|
|
|
|| url.startsWith("mailto://") //邮件
|
|
|| url.startsWith("mailto://") //邮件
|
|
|
|| url.startsWith("tel://")//电话
|
|
|| url.startsWith("tel://")//电话
|
|
|
- || url.contains("https://wx.tenpay.com")//微信支付
|
|
|
|
|
|| url.startsWith("dianping://")) {
|
|
|| url.startsWith("dianping://")) {
|
|
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
|
|
startActivity(intent);
|
|
startActivity(intent);
|
|
|
return true;
|
|
return true;
|
|
|
} else if (url.contains("https://wx.tenpay.com")) {
|
|
} else if (url.contains("https://wx.tenpay.com")) {
|
|
|
-
|
|
|
|
|
|
|
+ showPlyEnd();
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|