420版本

This commit is contained in:
2026-01-13 11:42:04 +08:00
parent 2491213ca6
commit f67f062bfe
307 changed files with 1235 additions and 567 deletions
@@ -60,6 +60,9 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import cn.shangyu.gdxzExpert.activity.PayCourseActivity;
import cn.shangyu.gdxzExpert.activity.PublicConsultationActivity;
import cn.shangyu.gdxzExpert.activity.UniappPayCourseActivity;
import io.dcloud.feature.sdk.Interface.IUniMP;
import io.dcloud.feature.sdk.DCSDKInitConfig;
import io.dcloud.feature.sdk.DCUniMPSDK;
@@ -129,6 +132,13 @@ public class BaseApplication extends Application {
public static final String APP_KEY = "5431747048793";
// 全局 UniMP 缓存,全页面共享
private static HashMap<String, IUniMP> mUniMPCaches = new HashMap<>();
//自动触发打开 uniapp mp 开关
public static boolean auto_show_unimp = false;
public static long auto_show_unimp_timestamp = 0l;
public static int auto_show_unimp_error_times = 0;
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
@@ -365,6 +375,10 @@ public class BaseApplication extends Application {
if (currentActivity instanceof BaseActivity) {
((BaseActivity) currentActivity).handleCheckToken(callback);
}
} else if(event.equals("getNewToken")){
if (currentActivity instanceof BaseActivity) {
((BaseActivity) currentActivity).handleCheckToken(callback);
}
} else if(event.equals("goHomeSearch")){
if (currentActivity != null) {
Intent intentv = new Intent(currentActivity, cn.shangyu.gdxzExpert.activity.PublicSearchActivity.class);
@@ -375,8 +389,9 @@ public class BaseApplication extends Application {
intentv.setType("video");
}else if (msgValue.equals("zhinan")) {
intentv.setType("drug");
}else if (msgValue.equals("ppt")) {
intentv.setType("course");
}
currentActivity.startActivity(intentv);
}
} else if(event.equals("buyPointPage")) {
@@ -384,6 +399,22 @@ public class BaseApplication extends Application {
Intent intentv = new Intent(currentActivity, cn.shangyu.gdxzExpert.pointsmall.BuyIntegerActivty.class);
currentActivity.startActivity(intentv);
}
} else if(event.equals("payPptPage")) {
if (currentActivity != null) {
LogUtil.i("payPptPage", msgValue);
JSONObject jsonObject = new JSONObject(msgValue);
// 获取值
Integer price = jsonObject.getInt("price");
String providername = jsonObject.getString("providername");
// String order_id = jsonObject.getString("order_id");
String trade_no = jsonObject.getString("trade_no");
Intent intent = new Intent(currentActivity, UniappPayCourseActivity.class);
intent.putExtra("providername", providername);
intent.putExtra("money", price + "");
intent.putExtra("order_id", trade_no);
currentActivity.startActivity(intent);
}
}
}catch (Exception e){
LogUtil.e("处理uniapp事件时出错: " + e.getMessage());