admin
2022-05-05 355fe96b2a4c7821256d9e8828d2cb9539904878
功能完善
42个文件已修改
2个文件已添加
1560 ■■■■ 已修改文件
android/app/src/main/AndroidManifest.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/MyApplication.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/entity/eventbus/UpdateConfig.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/ui/MainActivity.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/ui/SplashActivity.java 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/ui/common/BrowserActivity.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/AppConfigUtil.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/SettingUtil.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/api/HttpApiUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/videos/DrawVideoHBManager.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/values/strings.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/library-ad/src/main/java/com/demo/library_ad/AdUtil.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/library-common/build.gradle 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/library-flutter/src/main/java/com/demo/library_flutter/message/DataMethodChannel.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/assets/imgs/common/ic_empty.png 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/assets/imgs/common/ic_network_error.png 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/assets/imgs/task/icon_task_sign_notify.png 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/assets/imgs/task/icon_task_sign_notify_checked.png 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/api/gold_corn_api.dart 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/api/user_api.dart 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/home.dart 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/main.dart 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/mine.dart 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/common/browser.dart 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/add_team.dart 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/balance.dart 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/gold_corn.dart 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/invite_friends.dart 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/login.dart 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/person_info.dart 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/settings.dart 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/mine/team.dart 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/task.dart 238 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/widget/base_ui.dart 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/widget/nav.dart 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/widget/refresh_listview.dart 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/ui/widget/verification_box.dart 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/utils/config_util.dart 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/utils/setting_util.dart 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/utils/ui_constant.dart 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/utils/ui_utils.dart 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/lib/utils/user_util.dart 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/pubspec.lock 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flutter_module/pubspec.yaml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/AndroidManifest.xml
@@ -107,6 +107,11 @@
<!--            </intent-filter>-->
<!--        </activity>-->
        <activity
            android:name="com.yalantis.ucrop.UCropActivity"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
    </application>
android/app/src/main/java/com/yeshi/makemoney/video/app/MyApplication.java
@@ -23,10 +23,15 @@
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import com.yeshi.makemoney.video.R;
import com.yeshi.makemoney.video.app.entity.eventbus.UpdateConfig;
import com.yeshi.makemoney.video.app.utils.AppConfigUtil;
import com.yeshi.makemoney.video.app.utils.Constant;
import com.yeshi.makemoney.video.app.utils.SettingUtil;
import com.yeshi.makemoney.video.app.utils.UserUtil;
import com.yeshi.makemoney.video.app.utils.api.HttpApiUtil;
import com.yeshi.makemoney.video.app.utils.ui.JumpPageUtil;
import org.greenrobot.eventbus.EventBus;
import java.util.Iterator;
import java.util.LinkedHashMap;
@@ -57,13 +62,21 @@
        super.onCreate();
        application = this;
        MultiDex.install(this);
        if (UserUtil.isAgreeUserProtocol(application) || Constant.DEBUG) {
            init(application, null);
        }
//        if (UserUtil.isAgreeUserProtocol(application) || Constant.DEBUG) {
//            init(application, new InitListener() {
//                @Override
//                public void onFinish() {
//                    SettingUtil.initSettings(getApplicationContext());
//                }
//            });
//        }
    }
    public static void init(Application application, InitListener initListener) {
        if (inited) {
            if(initListener!=null) {
                initListener.onFinish();
            }
            return;
        }
@@ -137,6 +150,8 @@
                    initListener.onFinish();
                }
            });
        } else {
            initListener.onFinish();
        }
    }
@@ -188,6 +203,52 @@
                        }
                    return HttpApiUtil.getRequestParams(application.getApplicationContext(), ps);
                }
                @Override
                public String getConfig(String key) {
                    AppConfigUtil.ConfigKey configKey = null;
                    try {
                        configKey = AppConfigUtil.ConfigKey.valueOf(key);
                    } catch (Exception e) {
                    }
                    if (configKey == null) {
                        EventBus.getDefault().post(new UpdateConfig());
                        return null;
                    }
                    return AppConfigUtil.getConfig(configKey, application);
                }
                @Override
                public Boolean getSetting(String key) {
                    SettingUtil.SettingKey settingKey = null;
                    try {
                        settingKey = SettingUtil.SettingKey.valueOf(key);
                    } catch (Exception e) {
                    }
                    if (settingKey == null) {
                        return null;
                    }
                    return SettingUtil.getSetting(settingKey, application);
                }
                @Override
                public void setSetting(String key, boolean b) {
                    SettingUtil.SettingKey settingKey = null;
                    try {
                        settingKey = SettingUtil.SettingKey.valueOf(key);
                    } catch (Exception e) {
                    }
                    if (settingKey == null) {
                        return;
                    }
                    SettingUtil.saveSetting(settingKey, b, application);
                }
            });
            //UI接口
            new UIMethodChannel(engine.getDartExecutor().getBinaryMessenger(), application.getApplicationContext(), new UIMethodChannel.DataListener() {
android/app/src/main/java/com/yeshi/makemoney/video/app/entity/eventbus/UpdateConfig.java
New file
@@ -0,0 +1,4 @@
package com.yeshi.makemoney.video.app.entity.eventbus;
public class UpdateConfig {
}
android/app/src/main/java/com/yeshi/makemoney/video/app/ui/MainActivity.java
@@ -14,6 +14,7 @@
import com.demo.lib.common.dialog.DialogUtil;
import com.demo.lib.common.util.FragmentSwitchHelperV2;
import com.demo.lib.common.util.common.StringUtils;
import com.demo.library_ad.AdUtil;
import com.demo.library_flutter.FlutterCommonActivity;
import com.demo.library_flutter.FlutterMineFragment;
import com.demo.library_flutter.FlutterRecommendFragment;
@@ -21,20 +22,26 @@
import com.idlefish.flutterboost.containers.FlutterBoostFragment;
import com.jaeger.library.StatusBarUtil;
import com.yeshi.makemoney.video.R;
import com.yeshi.makemoney.video.app.MyApplication;
import com.yeshi.makemoney.video.app.entity.eventbus.UpdateConfig;
import com.yeshi.makemoney.video.app.push.PushOpenClickActivity;
import com.yeshi.makemoney.video.app.ui.dialog.ExitDialog;
import com.yeshi.makemoney.video.app.ui.main.DYNewsFragment;
import com.yeshi.makemoney.video.app.ui.main.HomeFragment;
import com.yeshi.makemoney.video.app.ui.main.MineFragment;
import com.yeshi.makemoney.video.app.ui.main.NovelFragment;
import com.yeshi.makemoney.video.app.utils.AppConfigUtil;
import com.yeshi.makemoney.video.app.utils.api.BasicTextHttpResponseHandler;
import com.yeshi.makemoney.video.app.utils.api.HttpApiUtil;
import org.apache.http.Header;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import androidx.fragment.app.Fragment;
@@ -107,6 +114,7 @@
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        EventBus.getDefault().register(this);
        mAQuery = new AQuery(this);
        rg_nav = findViewById(R.id.rg_nav);
        initFragment();
@@ -215,4 +223,43 @@
        super.onResume();
        PushOpenClickActivity.resumeJumpActivity(this);
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }
    @Subscribe
    public void onEventMainThread(UpdateConfig changeInfo) {
        HttpApiUtil.getConfig(getApplicationContext(), new BasicTextHttpResponseHandler() {
            @Override
            public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
                if (jsonObject != null) {
                    if (jsonObject.getInt("code") == 0) {
                        JSONObject data = jsonObject.getJSONObject("data");
                        JSONObject ad = data.optJSONObject("ad");
                        for (Iterator<String> its = data.keys(); its.hasNext(); ) {
                            String key = its.next();
                            AppConfigUtil.ConfigKey configKey = null;
                            try {
                                configKey = AppConfigUtil.ConfigKey.valueOf(key);
                            } catch (Exception e) {
                            }
                            if (configKey != null) {
                                //保存配置文件
                                AppConfigUtil.saveConfig(configKey, data.optString(configKey.name()), getApplicationContext());
                            }
                        }
                        //保存广告配置
                        AdUtil.saveAdConfig(getApplicationContext(), ad);
                    }
                }
            }
        });
    }
}
android/app/src/main/java/com/yeshi/makemoney/video/app/ui/SplashActivity.java
@@ -15,6 +15,7 @@
import com.yeshi.makemoney.video.app.ui.dialog.UserProtocolDialog;
import com.yeshi.makemoney.video.app.utils.AppConfigUtil;
import com.yeshi.makemoney.video.app.utils.Constant;
import com.yeshi.makemoney.video.app.utils.SettingUtil;
import com.yeshi.makemoney.video.app.utils.UserUtil;
import com.demo.library_ad.AdUtil;
import com.demo.library_ad.SplashAdUtil;
@@ -27,8 +28,11 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.yeshi.makemoney.video.app.utils.api.HttpApiUtil;
import com.yeshi.makemoney.video.app.utils.api.BasicTextHttpResponseHandler;
import java.util.Iterator;
import static android.content.pm.PackageManager.PERMISSION_DENIED;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
@@ -143,22 +147,7 @@
        MyApplication.init(MyApplication.application, new MyApplication.InitListener() {
            @Override
            public void onFinish() {
                toMainActivity();
            }
        });
//        if (1 > 0) {
//            vg_ad.postDelayed(new Runnable() {
//                @Override
//                public void run() {
//                    toMainActivity();
//                }
//            },3000);
//
//            return;
//        }
                SettingUtil.initSettings(getApplicationContext());
        int delayMs = 1;
        vg_ad.postDelayed(new Runnable() {
            @Override
@@ -168,14 +157,23 @@
                    @Override
                    public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
                        if (jsonObject != null) {
                            if (jsonObject.getBoolean("IsPost")) {
                                JSONObject data = jsonObject.getJSONObject("Data");
                                JSONObject ad = data.optJSONObject("adNew");
                                //浏览器外跳协议
                                AppConfigUtil.saveBrowserJumpOutProtocolPrefix(getApplicationContext(), data.optString("jumpAppProtocolPrefix"));
                                //保存联系客服,注销链接
                                AppConfigUtil.saveConcatUsLink(getApplicationContext(), data.optString("contactUsLink"));
                                AppConfigUtil.saveUnRegisterLink(getApplicationContext(), data.optString("unRegisterLink"));
                                    if (jsonObject.getInt("code") == 0) {
                                        JSONObject data = jsonObject.getJSONObject("data");
                                        JSONObject ad = data.optJSONObject("ad");
                                        for (Iterator<String> its = data.keys(); its.hasNext(); ) {
                                            String key = its.next();
                                            AppConfigUtil.ConfigKey configKey = null;
                                            try {
                                                configKey = AppConfigUtil.ConfigKey.valueOf(key);
                                            } catch (Exception e) {
                                            }
                                            if (configKey != null) {
                                                //保存配置文件
                                                AppConfigUtil.saveConfig(configKey, data.optString(configKey.name()), getApplicationContext());
                                            }
                                        }
                                        //保存广告配置
                                AdUtil.saveAdConfig(getApplicationContext(), ad);
                                MyApplication.initAd(MyApplication.application, new MyApplication.InitListener() {
                                    @Override
@@ -189,9 +187,12 @@
                                    }
                                });
                                return;
                            }
                        }
                                    } else {
                        loadSplashAd();
                                    }
                                } else {
                                    loadSplashAd();
                                }
                    }
@@ -206,6 +207,8 @@
            }
        }, delayMs);
    }
        });
    }
    /**
@@ -213,7 +216,7 @@
     */
    private void loadSplashAd() {
        AdUtil.AD_TYPE splashType = AdUtil.getAdType(getApplicationContext(), "");
        AdUtil.AD_TYPE splashType = AdUtil.getAdType(getApplicationContext(), "splashAd");
        if (splashType == null) {
            vg_ad.postDelayed(new Runnable() {
                @Override
android/app/src/main/java/com/yeshi/makemoney/video/app/ui/common/BrowserActivity.java
@@ -69,15 +69,6 @@
                if (url.startsWith("weixin://") || url.startsWith("alipay://")) {
                } else if (!url.startsWith("http")) {
                    if (jumpOutProtocolSet != null) {
                        for (String prefix : jumpOutProtocolSet) {
                            if (url.startsWith(prefix)) {
                                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                                startActivity(intent);
                                return true;
                            }
                        }
                    }
                    return true;
                }
                return super.shouldOverrideUrlLoading(view, url);
@@ -200,8 +191,6 @@
    private String wholeTitle;
    private Set<String> jumpOutProtocolSet;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -221,7 +210,6 @@
        progressBar.setProgressDrawable(this.getResources()
                .getDrawable(R.drawable.color_progressbar));
        initX5WebView();
        jumpOutProtocolSet = AppConfigUtil.getBrowserJumpOutProtocolPrefix(getApplicationContext());
        webview.loadUrl(getIntent().getStringExtra("url"));
        wholeTitle = getIntent().getStringExtra("title");
        if (!StringUtils.isEmpty(wholeTitle)) {
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/AppConfigUtil.java
@@ -13,28 +13,20 @@
public class AppConfigUtil {
    /**
     * 浏览器外跳协议
     *
     * @param context
     * @param content
     */
    public static void saveBrowserJumpOutProtocolPrefix(Context context, String content) {
        saveConfig("jumpAppProtocolPrefix", content, context);
    public enum ConfigKey {
        kefu,
        unRegister,
        privacyComplain,
        helpLink
    }
    public static Set<String> getBrowserJumpOutProtocolPrefix(Context context) {
        try {
            String config = getConfig("jumpAppProtocolPrefix", context);
            if (!StringUtils.isEmpty(config)) {
                Type type = new TypeToken<Set<String>>() {
                }.getType();
                return new Gson().fromJson(config, type);
    public static void saveConfig(ConfigKey key, String value, Context context) {
        saveConfig(key.name(), value, context);
            }
        } catch (Exception e) {
            e.getMessage();
        }
        return new HashSet<>();
    public static String getConfig(ConfigKey key, Context context) {
        return getConfig(key.name(), context);
    }
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/SettingUtil.java
New file
@@ -0,0 +1,72 @@
package com.yeshi.makemoney.video.app.utils;
import android.content.Context;
import android.content.SharedPreferences;
import com.bytedance.sdk.dp.DPSdk;
import com.bytedance.sdk.dp.DPUpdate;
import com.demo.library_ad.AdUtil;
import cn.jpush.android.api.JPushInterface;
public class SettingUtil {
    public enum SettingKey {
        //推送免打扰
        pushUnDisturb(false),
        //广告推荐
        adRecommend(true),
        //内容推荐
        contentRecommend(true);
        private boolean defaultValue;
        private SettingKey(boolean defaultValue) {
            this.defaultValue = defaultValue;
        }
        public boolean isDefaultValue() {
            return defaultValue;
        }
    }
    public static void saveSetting(SettingKey key, boolean value, Context context) {
        SharedPreferences.Editor editor = context.getSharedPreferences("settings", Context.MODE_PRIVATE).edit();
        editor.putBoolean(key.name(), value);
        editor.commit();
        initSetting(key, value, context);
    }
    //初始化设置,在应用初始化完成后调用
    public static void initSettings(Context context) {
        for (SettingKey key : SettingKey.values()) {
            boolean value = getSetting(key, context);
            initSetting(key, value, context);
        }
    }
    private static void initSetting(SettingKey key, boolean value, Context context) {
        if (key == SettingKey.adRecommend) {
            AdUtil.setPersonalRecommend(value);
        } else if (key == SettingKey.contentRecommend) {
            //穿山甲内容个性化
            DPUpdate.setPersonalRec(value);
        } else if (key == SettingKey.pushUnDisturb) {
            if (value) {
                JPushInterface.setSilenceTime(context, 21, 0, 9, 0);
            } else {
                JPushInterface.setSilenceTime(context, 0, 0, 0, 1);
            }
        }
    }
    public static boolean getSetting(SettingKey key, Context context) {
        SharedPreferences share = context.getSharedPreferences("settings", Context.MODE_PRIVATE);
        return share.getBoolean(key.name(), key.isDefaultValue());
    }
}
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/api/HttpApiUtil.java
@@ -66,7 +66,7 @@
    public static void getConfig(Context context, BasicTextHttpResponseHandler handler) {
        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
        commonPostWithFailture(context, BASE_URL + "xxx/xxx", params, handler);
        commonPostWithFailture(context, BASE_URL + "config/getConfig", params, handler);
    }
android/app/src/main/java/com/yeshi/makemoney/video/app/utils/videos/DrawVideoHBManager.java
@@ -23,6 +23,7 @@
import com.yeshi.makemoney.video.app.entity.goldcorn.GoldCornTaskInfo;
import com.yeshi.makemoney.video.app.ui.dialog.GoldCornDoubleDialog;
import com.yeshi.makemoney.video.app.ui.subview.CircleProgressView;
import com.yeshi.makemoney.video.app.utils.AppConfigUtil;
import com.yeshi.makemoney.video.app.utils.UserUtil;
import com.yeshi.makemoney.video.app.utils.api.BasicTextHttpResponseHandler;
import com.yeshi.makemoney.video.app.utils.api.HttpApiUtil;
@@ -210,9 +211,21 @@
            return;
        }
        //TODO 去看广告
        LoadingDialogUtil.show(mActivity);
        RewardAdUtil.loadAD(AdUtil.AD_TYPE.csj, "948550219", mActivity, new RewardAdUtil.RewardAdListener() {
        AdUtil.AD_TYPE type = AdUtil.getAdType(mContext, "rewardAd");
        if (type == null) {
            Toast.makeText(mContext, "广告配置文件加载失败,请稍后再试", Toast.LENGTH_SHORT).show();
            return;
        }
        String pid = null;
        if (type == AdUtil.AD_TYPE.csj) {
            pid = mContext.getResources().getString(R.string.ad_csj_pid_reward);
        } else {
            pid = mContext.getResources().getString(R.string.ad_gdt_pid_reward);
        }
        RewardAdUtil.loadAD(type, pid, mActivity, new RewardAdUtil.RewardAdListener() {
            @Override
            public void onADLoad() {
                Log.i(TAG, "onADLoad");
@@ -247,7 +260,6 @@
            public void onReward() {
                Log.i(TAG, "onReward");
                reward = true;
            }
            @Override
@@ -342,6 +354,10 @@
        resetDubleTimer();
        VideoGoldCornUtil.setVideoPlayCircle(leftCircle, mContext);
        setTotalGoldCornText(oldCircle, leftCircle);
        //弹框消失
        if (mDialog != null) {
            DialogUtil.dismiss(mDialog);
        }
    }
android/app/src/main/res/values/strings.xml
@@ -3,15 +3,19 @@
    <string name="umeng_key">625d3bd430a4f67780a84e5c</string>
    <string name="wx_app_id">wx123123</string>
    <string name="ad_gdt_appid"></string>
    <string name="ad_gdt_appid">1200542155</string>
    <string name="ad_csj_appid">5290972</string>
    <!--开屏广告 -->
    <string name="ad_csj_pid_splash"></string>
    <string name="ad_csj_pid_splash">887773595</string>
    <!--开屏广告 -->
    <string name="ad_gdt_pid_splash"></string>
    <string name="ad_gdt_pid_splash">8083637453353404</string>
    <!--激励视频广告 -->
    <string name="ad_csj_pid_reward">948550219</string>
    <string name="ad_gdt_pid_reward">8003432463255488</string>
    <string name="webview_java_interface_name">yestv</string>
</resources>
android/library-ad/src/main/java/com/demo/library_ad/AdUtil.java
@@ -3,12 +3,23 @@
import android.content.Context;
import android.content.SharedPreferences;
import com.bytedance.sdk.openadsdk.TTAdConfig;
import com.bytedance.sdk.openadsdk.TTAdSdk;
import com.demo.lib.common.util.common.StringUtils;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.qq.e.comm.managers.GDTAdSdk;
import com.qq.e.comm.managers.setting.GlobalSetting;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public class AdUtil {
@@ -70,8 +81,32 @@
        String config = share.getString("config", "");
        if (!StringUtils.isEmpty(config)) {//万一没设置起就用广点通
            try {
                Type type = new TypeToken<List<TypeProbability>>() {
                }.getType();
                JSONObject object = new JSONObject(config);
                return AD_TYPE.valueOf(object.optJSONObject(positionName).optString("type"));
                JSONArray array = object.optJSONArray(positionName);
                if (array == null) {
                    return null;
                }
                List<TypeProbability> typeList = new Gson().fromJson(array.toString(), type);
                int count = 0;
                Map<AD_TYPE, int[]> map = new HashMap<>();
                for (TypeProbability probability : typeList) {
                    int olcCount = count;
                    count += probability.getWeight();
                    map.put(probability.getType(), new int[]{olcCount, count});
                }
                int random = (int) (Math.random() * count);
                for (Iterator<AD_TYPE> its = map.keySet().iterator(); its.hasNext(); ) {
                    AD_TYPE t = its.next();
                    int[] space = map.get(t);
                    if (space[0] <= random && random < space[1]) {
                        return t;
                    }
                }
                return null;
            } catch (JSONException e) {
                e.printStackTrace();
            } catch (Exception e1) {
@@ -81,4 +116,58 @@
        return null;
    }
    /**
     * 设置个性化推荐广告
     *
     * @param recommend
     */
    public static void setPersonalRecommend(boolean recommend) {
        setPersonalRecommendCSJ(recommend);
        //广点通个性化广告关闭
        GlobalSetting.setPersonalizedState(recommend ? 0 : 1);
    }
    //穿山甲
    private static void setPersonalRecommendCSJ(boolean recommend) {
        String content = "";
        try {
            JSONArray jsonArray = new JSONArray();
            JSONObject personalObject = new JSONObject();
            personalObject.put("name", "personal_ads_type");
            personalObject.put("value", recommend ? "1" : "0");
            jsonArray.put(personalObject);
            content = jsonArray.toString();
        } catch (Exception e) {
            e.printStackTrace();
        }
        TTAdConfig ttAdConfig = new TTAdConfig.Builder()
                .data(content)
                .build();
        TTAdSdk.updateAdConfig(ttAdConfig);
    }
    class TypeProbability {
        AD_TYPE type;
        int weight;
        public AD_TYPE getType() {
            return type;
        }
        public void setType(AD_TYPE type) {
            this.type = type;
        }
        public int getWeight() {
            return weight;
        }
        public void setWeight(int weight) {
            this.weight = weight;
        }
    }
}
android/library-common/build.gradle
@@ -25,6 +25,8 @@
    api 'com.github.youlookwhat:ByRecyclerView:1.3.0'
    api 'org.greenrobot:eventbus:3.1.1'
}
android {
android/library-flutter/src/main/java/com/demo/library_flutter/message/DataMethodChannel.java
@@ -53,6 +53,29 @@
                        SharedPreferences sharedPreferences = context.getSharedPreferences("flutter", Context.MODE_PRIVATE);
                        result.success(sharedPreferences.getString("adConfig", ""));
                        break;
                    case "getConfig": {
                        String key = call.arguments + "";
                        String value = dataListener.getConfig(key);
                        result.success(value);
                    }
                    break;
                    case "getSetting": {
                        String key = call.arguments + "";
                        Boolean value = dataListener.getSetting(key);
                        result.success(value);
                    }
                    break;
                    case "setSetting": {
                        Map<String, Object> params = (Map<String, Object>) call.arguments;
                        String key = params.get("key") + "";
                        boolean value = (Boolean) params.get("value");
                        dataListener.setSetting(key, value);
                        result.success(true);
                    }
                    break;
                    case "getBaseRequestParams":
                        //获取请求参数
                        Map<String, String> params = (Map<String, String>) call.arguments;
@@ -73,5 +96,13 @@
    public interface DataListener {
        public Map<String, String> getBaseRequestParams(Map<String, String> params);
        public String getConfig(String key);
        //获取设置
        public Boolean getSetting(String key);
        //设置
        public void setSetting(String key, boolean b);
    }
}
flutter_module/assets/imgs/common/ic_empty.png

flutter_module/assets/imgs/common/ic_network_error.png

flutter_module/assets/imgs/task/icon_task_sign_notify.png

flutter_module/assets/imgs/task/icon_task_sign_notify_checked.png

flutter_module/lib/api/gold_corn_api.dart
@@ -78,14 +78,14 @@
      params["uid"] = uid;
    }
    var result = await HttpUtil.baseRequest(
        context, "/api/v1/goldcorn/getSignInInfo", params, () {
    });
        context, "/api/v1/goldcorn/getSignInInfo", params, () {});
    if (result.success) {
      return result.data;
    }
    return null;
  }
  ///签到
  static Future<Map<String, dynamic>?> signIn(BuildContext context) async {
    Map<String, dynamic> params = {};
    params["uid"] = await UserUtil.getUid();
@@ -99,4 +99,33 @@
    }
    return null;
  }
  ///设置签到提醒
  static Future<Map<String, dynamic>?> setSignInNotify(
      BuildContext context, bool notify) async {
    Map<String, dynamic> params = {};
    params["uid"] = await UserUtil.getUid();
    params["notify"] = notify;
    var result = await HttpUtil.baseRequest(
        context, "/api/v1/goldcorn/setSignInNotify", params, () {});
    if (result.success) {
      return result.data;
    }
    return null;
  }
  ///获取任务列表
  static Future<Map<String, dynamic>?> getTaskList(BuildContext context) async {
    Map<String, dynamic> params = {};
    var uid = await UserUtil.getUid();
    if (uid != null) {
      params["uid"] = uid;
    }
    var result = await HttpUtil.baseRequest(
        context, "/api/v1/goldcorn/getTaskList", params, () {});
    if (result.success) {
      return result.data;
    }
    return null;
  }
}
flutter_module/lib/api/user_api.dart
@@ -77,6 +77,23 @@
    return null;
  }
  ///登录
  static Future<Map<String, dynamic>?> loginByWX(
      BuildContext context, String code) async {
    Map<String, dynamic> params = {};
    params["code"] = code;
    var result =
        await HttpUtil.baseRequest(context, "/api/v1/user/loginWX", params, () {
      showLoading(context);
    }, notifyError: true);
    dismissDialog(context);
    if (result.success) {
      return result.data;
    }
    return null;
  }
  static Future<Map<String, dynamic>?> loginByEmail(
      BuildContext context, String email, String pwd) async {
    Map<String, dynamic> params = {};
@@ -128,6 +145,51 @@
    return null;
  }
  ///绑定微信
  static Future<Map<String, dynamic>?> bindWX(
      BuildContext context, String code) async {
    Map<String, dynamic> params = {};
    params["code"] = code;
    params["uid"] = await UserUtil.getUid();
    var result =
        await HttpUtil.baseRequest(context, "/api/v1/user/bindWX", params, () {
      showLoading(context);
    }, notifyError: true);
    dismissDialog(context);
    if (result.success) {
      return result.data;
    }
    return null;
  }
  ///绑定电话
  static Future<Map<String, dynamic>?> bindPhone(
      BuildContext context, String? phone, String? vcode, String? token) async {
    Map<String, dynamic> params = {};
    if (phone != null) {
      params["phone"] = phone;
    }
    if (vcode != null) {
      params["vcode"] = vcode;
    }
    if (token != null) {
      params["token"] = token;
    }
    params["uid"] = await UserUtil.getUid();
    var result = await HttpUtil.baseRequest(
        context, "/api/v1/user/bindPhone", params, () {
      showLoading(context);
    }, notifyError: true);
    dismissDialog(context);
    if (result.success) {
      return result.data;
    }
    return null;
  }
  ///获取用户信息
  static Future<Map<String, dynamic>?> getUserInfo(
      BuildContext context, String uid) async {
flutter_module/lib/home.dart
@@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:makemoney/ui/widget/ad_express.dart';
import 'package:makemoney/ui/widget/button.dart';
import 'package:makemoney/utils/ui_utils.dart';
import 'mine.dart';
@@ -21,14 +22,7 @@
        backgroundColor: Colors.transparent,
        body: Container(
          padding: EdgeInsets.all(20),
          child: MyFillButton(
            "测试点击",
            10,
            height: 50,
            onClick: () {
              ToastUtil.toast("测试", context);
            },
          ),
          child: DrawVideoWidget("123456"),
        ));
  }
}
flutter_module/lib/main.dart
@@ -6,6 +6,7 @@
import 'package:flutter/services.dart';
import 'package:flutter_boost/flutter_boost.dart';
import 'package:makemoney/home.dart';
import 'package:makemoney/ui/mine/msg.dart';
import 'package:makemoney/ui/mine/my_boss.dart';
import 'package:makemoney/utils/share_preference.dart';
import 'package:makemoney/utils/ui_constant.dart';
@@ -42,7 +43,9 @@
void _runLocal() {
  runApp(getBasePage(
    TaskPage(title: ""),
    MinePage(
      title: "",
    ),
  ));
}
@@ -170,6 +173,15 @@
          ));
    },
    "MsgPage": (RouteSettings settings, String? uniqueId) {
      return _getSimpleRoute(
          settings,
          uniqueId,
          MsgPage(
            title: "",
          ));
    },
    'BrowserPage': (RouteSettings settings, String? uniqueId) {
      if (settings.arguments == null) {
        return null;
@@ -197,6 +209,7 @@
    return MaterialApp(
      home: home,
      debugShowCheckedModeBanner: true,
      theme: ThemeData(primaryColor: ColorConstant.theme),
      ///必须加上builder参数,否则showDialog等会出问题
      builder: (_, __) {
@@ -277,6 +290,10 @@
      {
        return TaskPage(title: "");
      }
    case "MsgPage":
      {
        return MsgPage(title: "");
      }
  }
  return Container();
flutter_module/lib/mine.dart
@@ -8,6 +8,7 @@
import 'package:makemoney/api/user_api.dart';
import 'package:makemoney/model/team/team_info_model.dart';
import 'package:makemoney/ui/widget/ad_express.dart';
import 'package:makemoney/utils/config_util.dart';
import 'package:makemoney/utils/ui_utils.dart';
import 'package:share_plus/share_plus.dart';
@@ -222,24 +223,26 @@
                                    _teamInfoModel == null
                                        ? 0
                                        : _teamInfoModel!.firstTeamCount!,
                                    "直接队员", () {
                                    "队员", () {
                                  jumpPage("TeamPage", params: {"first": true});
                                }),
                                // const SizedBox(
                                //   width: 35,
                                // ),
                                // userContent(
                                //     _teamInfoModel == null
                                //         ? 0
                                //         : _teamInfoModel!.secondTeamCount!,
                                //     "间接队员", () {
                                //   jumpPage("TeamPage",
                                //       params: {"first": false});
                                // }),
                                const SizedBox(
                                  width: 35,
                                ),
                                userContent(
                                    _teamInfoModel == null
                                        ? 0
                                        : _teamInfoModel!.secondTeamCount!,
                                    "间接队员", () {
                                  jumpPage("TeamPage",
                                      params: {"first": false});
                                }),
                                const SizedBox(
                                  width: 35,
                                ),
                                userContent(msgCount, "消息", () {},
                                userContent(msgCount, "消息", () {
                                  jumpPage("MsgPage");
                                },
                                    color: msgCount > 0
                                        ? COLOR_HIGHLIGHT
                                        : COLOR_CONTENT),
@@ -396,23 +399,25 @@
                                      "assets/imgs/mine/ic_fun_help.png",
                                      "帮助中心",
                                      27, () {
                                    jumpPage("AdvicePage", needLogin: false);
                                    ConfigUtil.getConfig(context, "helpLink")
                                        .then((value) {
                                      jumpPage("BrowserPage",
                                          params: {
                                            "url": value,
                                            "title": "帮助中心"
                                          },
                                          needLogin: false);
                                    });
                                  }),
                                  functionWidget(
                                      "assets/imgs/mine/ic_fun_kefu.png",
                                      "在线客服",
                                      28.5, () {
                                    MySharedPreferences.getInstance()
                                        .getString("contactUsLink")
                                    ConfigUtil.getConfig(context, "kefu")
                                        .then((value) {
                                      if (!StringUtil.isNullOrEmpty(value)) {
                                        jumpPage("BrowserPage",
                                            params: {
                                              "url": value,
                                              "title": "在线客服"
                                            },
                                          params: {"url": value, "title": "客服"},
                                            needLogin: false);
                                      }
                                    });
                                  }),
                                  functionWidget(
flutter_module/lib/ui/common/browser.dart
@@ -19,8 +19,7 @@
  _BrowserPageState createState() => _BrowserPageState(title, url);
}
class _BrowserPageState extends State<BrowserPage>
    with SingleTickerProviderStateMixin {
class _BrowserPageState extends State<BrowserPage> {
  String title = "";
  String? url;
  double progress = 0;
@@ -31,7 +30,7 @@
  void initState() {
    super.initState();
    if (Platform.isAndroid) {
      WebView.platform = SurfaceAndroidWebView();
      WebView.platform = AndroidWebView();
    }
  }
@@ -68,7 +67,19 @@
                  back: () {
                    _back();
                  },
                  rightIcon: const Icon(Icons.refresh,size: 30,),
                  leftWidget: const Padding(
                      padding: EdgeInsets.only(left: 5, right: 10),
                      child: Icon(
                        Icons.close_rounded,
                        size: 30,
                      )),
                  leftWidgetClick: () {
                    popPage(context);
                  },
                  rightIcon: const Icon(
                    Icons.refresh,
                    size: 30,
                  ),
                  rightClick: (){
                    if(_webViewController!=null){
                      _webViewController!.reload();
@@ -79,7 +90,8 @@
                  height: 1,
                  child: LinearProgressIndicator(
                    backgroundColor: Colors.white,
                    valueColor: const AlwaysStoppedAnimation(ColorConstant.theme),
                    valueColor:
                        const AlwaysStoppedAnimation(ColorConstant.theme),
                    value: progress,
                  ),
                ),
flutter_module/lib/ui/mine/add_team.dart
@@ -3,6 +3,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:makemoney/api/http.dart';
import 'package:makemoney/api/team_api.dart';
import 'package:makemoney/model/user/user_info.dart';
import 'package:makemoney/ui/widget/button.dart';
@@ -11,6 +12,7 @@
import 'package:makemoney/utils/ui_utils.dart';
import '../../utils/ui_constant.dart';
import '../../ui/widget/nav.dart';
import 'package:pin_code_fields/pin_code_fields.dart';
import '../../utils/pageutils.dart';
import 'advice_submit.dart';
@@ -39,12 +41,11 @@
class _AddTeamPageState extends State<AddTeamPage>
    with SingleTickerProviderStateMixin {
  final VerificationBoxController _controller = VerificationBoxController();
  final TextEditingController _controller = TextEditingController();
  @override
  void initState() {
    super.initState();
    _controller.text = "123123";
  }
  BoxDecoration getItemDecoration(Color bgColor, Color shadowColor) {
@@ -61,11 +62,16 @@
        ]);
  }
  double? itemWidth;
  @override
  Widget build(BuildContext context) {
    itemWidth = itemWidth ??
        (MediaQuery.of(context).size.width - 60 * 2 - 10 * 5 - 1) / 6;
    return Scaffold(
        resizeToAvoidBottomInset: false,
        backgroundColor: Color(0xFFFFFFFF),
        resizeToAvoidBottomInset: true,
        backgroundColor: const Color(0xFFFFFFFF),
        body: Flex(
          direction: Axis.vertical,
          children: [
@@ -86,15 +92,67 @@
                      TextSpan(text: "金币。"),
                    ]),
                    textAlign: TextAlign.center,
                    style: TextStyle(fontSize: 13, color: ColorConstant.theme),
                    style: TextStyle(
                        fontSize: 13,
                        color: ColorConstant.theme,
                        fontWeight: FontWeight.bold),
                  ),
                  SizedBox(
                  const SizedBox(
                    height: 40,
                  ),
                  Container(
                      alignment: Alignment.center,
                      child: VerificationBox(6, _controller)),
                  SizedBox(
                      child:
                          // VerificationBox(
                          //   6,
                          //   _controller,
                          //   width: MediaQuery.of(context).size.width - 60 * 2,
                          // )
                          PinCodeTextField(
                        appContext: context,
                        length: 6,
                        obscureText: false,
                        animationType: AnimationType.fade,
                        textStyle: const TextStyle(
                            color: ColorConstant.theme,
                            fontSize: 24,
                            fontWeight: FontWeight.bold),
                        cursorColor: ColorConstant.theme,
                        controller: _controller,
                        pinTheme: PinTheme(
                          activeColor: Colors.transparent,
                          selectedColor: Colors.transparent,
                          inactiveColor: Colors.transparent,
                          inactiveFillColor: const Color(0xFFEFEFEF),
                          activeFillColor: const Color(0xFFEFEFEF),
                          selectedFillColor: const Color(0xFFEFEFEF),
                          shape: PinCodeFieldShape.box,
                          borderRadius: BorderRadius.circular(13),
                          fieldHeight: itemWidth! * 1.25,
                          fieldWidth: itemWidth,
                          borderWidth: 0,
                        ),
                        animationDuration: const Duration(milliseconds: 100),
                        backgroundColor: Colors.transparent,
                        enableActiveFill: true,
                        onCompleted: (v) {
                          print("Completed");
                        },
                        onChanged: (value) {
                          print(value);
                          setState(() {
                            // currentText = value;
                          });
                        },
                        beforeTextPaste: (text) {
                          print("Allowing to paste $text");
                          //if you return true then it will show the paste confirmation dialog. Otherwise if false, then nothing will happen.
                          //but you can show anything you want here, like your pop up saying wrong paste format or etc
                          return true;
                        },
                      )),
                  const SizedBox(
                    height: 46,
                  ),
                  MyFillButton(
@@ -103,8 +161,9 @@
                    height: 42,
                    fontSize: 15,
                    onClick: () {
                      print("内容:${_controller.text}");
                      if (_controller.text.length < 6) {
                        return;
                      }
                      TeamApiUtil.getUserByInviteCode(context, _controller.text)
                          .then((value) {
                        if (value == null) {
@@ -188,17 +247,17 @@
                alignment: Alignment.center,
                child: Container(
                    width: dialogWidth,
                    height: 240,
                    height: 350,
                    child: Stack(children: [
                      Container(
                        margin: const EdgeInsets.only(top: 30),
                        margin: const EdgeInsets.only(top: 30, bottom: 110),
                        decoration: const BoxDecoration(
                            borderRadius: BorderRadius.all(Radius.circular(15)),
                            color: Colors.white),
                        alignment: Alignment.topCenter,
                      ),
                      Padding(
                          padding: EdgeInsets.only(left: 10, right: 10),
                          padding: const EdgeInsets.only(left: 10, right: 10),
                          child: Column(
                            mainAxisAlignment: MainAxisAlignment.start,
                            crossAxisAlignment: CrossAxisAlignment.center,
@@ -214,7 +273,7 @@
                                    fontWeight: FontWeight.bold),
                              ),
                              //内容
                              SizedBox(
                              const SizedBox(
                                height: 15,
                              ),
                              const Text(
@@ -224,7 +283,7 @@
                                    fontSize: 18,
                                    fontWeight: FontWeight.bold),
                              ),
                              SizedBox(
                              const SizedBox(
                                height: 35,
                              ),
                              //------按钮区域--------
@@ -248,6 +307,18 @@
                                    }
                                  });
                                },
                              ),
                              const SizedBox(
                                height: 28,
                              ),
                              InkWell(
                                onTap: () {
                                  dismissDialog(context);
                                },
                                child: Image.asset(
                                  "assets/imgs/common/icon_dialog_close.png",
                                  height: 30,
                                ),
                              )
                            ],
                          ))
flutter_module/lib/ui/mine/balance.dart
@@ -3,11 +3,13 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:makemoney/api/extract_api.dart';
import 'package:makemoney/api/user_api.dart';
import 'package:makemoney/model/user/extract_money_model.dart';
import 'package:makemoney/ui/widget/button.dart';
import 'package:makemoney/ui/widget/dialog.dart';
import 'package:makemoney/utils/ui_constant.dart';
import 'package:makemoney/utils/ui_utils.dart';
import 'package:makemoney/utils/wx_util.dart';
import '../../ui/widget/nav.dart';
@@ -44,6 +46,19 @@
  @override
  void initState() {
    super.initState();
    WXAuthUtil.init(context, (s) {
      UserApiUtil.bindWX(context, s).then((value) {
        if (value == null) {
          return;
        }
        if (value["code"] == 0) {
          ToastUtil.toast("微信绑定成功", context);
          _getExtractInfo();
          return;
        }
        ToastUtil.toast(value["msg"], context);
      });
    });
    _getExtractInfo();
    _getExtractDenominationList();
  }
@@ -148,7 +163,7 @@
                                Image.asset(
                                    "assets/imgs/mine/ic_balance_bg.png"),
                                Container(
                                    margin: EdgeInsets.only(
                                    margin: const EdgeInsets.only(
                                        left: 20, top: 14, bottom: 10),
                                    child: Column(
                                      crossAxisAlignment:
@@ -161,7 +176,7 @@
                                              color: Colors.white,
                                              fontSize: 12),
                                        ),
                                        SizedBox(
                                        const SizedBox(
                                          height: 5,
                                        ),
                                        Text.rich(TextSpan(
@@ -218,8 +233,13 @@
                      //绑定微信
                      !_needBindWX
                          ? Container()
                          : Container(
                              padding: const EdgeInsets.fromLTRB(13, 10, 5, 10),
                          : InkWell(
                              onTap: () {
                                WXAuthUtil.startAuth(context);
                              },
                              child: Container(
                                padding:
                                    const EdgeInsets.fromLTRB(13, 10, 5, 10),
                              margin: const EdgeInsets.only(top: 12),
                              decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(13),
@@ -248,7 +268,7 @@
                                  )
                                ],
                              ),
                            ),
                              )),
                      const SizedBox(
                        height: 12,
                      ),
flutter_module/lib/ui/mine/gold_corn.dart
@@ -183,10 +183,8 @@
                                  topLeft: Radius.circular(13),
                                  topRight: Radius.circular(13)),
                            )),
                        Padding(
                            padding: EdgeInsets.only(
                                bottom: DimenUtil.getOnePixel(context)),
                            child: Row(
                        Padding(padding:const EdgeInsets.only(bottom:0), child:
                        Row(
                              children: [
                                Expanded(flex: 1, child: getNavItem("金币记录", 0)),
                                Expanded(flex: 1, child: getNavItem("折算记录", 1)),
@@ -235,7 +233,7 @@
                      topRight: Radius.circular(13)),
                  boxShadow: [
                      BoxShadow(
                          color: Color(0xFF989898),
                          color: const Color(0x80989898),
                          offset: Offset((index == 0 ? 2 : -2), 0))
                    ])
              : null,
@@ -309,6 +307,11 @@
    _refreshController.refreshCompleted();
    _refreshController.loadComplete();
    if (result == null && _page == 1&&_recordList.isEmpty) {
      _refreshController.apiError!();
    }
    if (result == null || result["code"] != 0) {
      //页码回滚
      if (_page > 1) {
@@ -383,7 +386,8 @@
          onTap();
        },
        child: Padding(
            padding: const EdgeInsets.only(top: 20, left: 16, right: 16, bottom: 5),
            padding:
                const EdgeInsets.only(top: 20, left: 16, right: 16, bottom: 5),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              crossAxisAlignment: CrossAxisAlignment.center,
flutter_module/lib/ui/mine/invite_friends.dart
@@ -111,7 +111,7 @@
                                  "assets/imgs/mine/ic_invite_friends_bg.png",
                                  width: MediaQuery.of(context).size.width)),
                          Padding(
                              padding: EdgeInsets.only(top: 10),
                              padding: const EdgeInsets.only(top: 30),
                              child: SizedBox(
                                  height: 0.7466 *
                                      MediaQuery.of(context).size.width *
flutter_module/lib/ui/mine/login.dart
@@ -7,6 +7,8 @@
import 'package:flutter/services.dart';
import 'package:fluwx_no_pay/fluwx_no_pay.dart' as fluwx;
import 'package:makemoney/ui/mine/add_team.dart';
import 'package:makemoney/utils/config_util.dart';
import 'package:makemoney/utils/wx_util.dart';
import '../../api/user_api.dart';
import 'package:html/dom.dart' as dom;
import '../../api/http.dart';
@@ -22,6 +24,7 @@
import '../../utils/user_util.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import '../widget/nav.dart';
import 'add_team.dart';
class LoginPage extends StatefulWidget {
  //阿里云一键登录
@@ -55,7 +58,6 @@
  TextEditingController? phoneController = TextEditingController();
  TextEditingController? codeController = TextEditingController();
  String phone = "";
  String code = "";
  Timer? timer;
  //重新发送验证码倒计时
@@ -64,38 +66,24 @@
  @override
  void initState() {
    super.initState();
    fluwx
        .registerWxApi(
            appId: "wx420b62b9213e0fc9",
            universalLink: "https://your.univerallink.com/link/")
        .then((value) {
      print("微信初始化完成:$value");
      fluwx.weChatResponseEventHandler.listen((res) {
        print("微信回调:${res.errCode} -  ${res.errStr}");
        if (res is fluwx.WeChatAuthResponse) {
          fluwx.WeChatAuthResponse response = res;
          print("微信授权结束:${response.code}");
        }
      });
    WXAuthUtil.init(context, (s) {
      _loginWX(s);
    });
    if (widget.bindPhone) {
      wxLogin = false;
    }
    reSendSMSTimeLeft = -1;
    //初始化微信登录监听
    fluwx.weChatResponseEventHandler.distinct((a, b) => a == b).listen((res) {
      if (res is fluwx.WeChatAuthResponse) {
        int errCode = res.errCode;
        if (errCode == 0) {
          String? code = res.code;
          //TODO 把微信登录返回的code传给后台,剩下的事就交给后台处理
        } else if (errCode == -4) {
          //showToast("用户拒绝授权");
        } else if (errCode == -2) {
          // showToast("用户取消授权");
        }
  void _loginWX(code) {
    UserApiUtil.loginByWX(context, code).then((value) {
      if (value!["code"] == 0) {
        UserInfo user = UserInfo.fromJson(value["data"]);
        _loginSuccess(user);
      } else {
        ToastUtil.toast(value["msg"], context);
      }
    });
  }
@@ -232,10 +220,8 @@
                                : Container()
                          ]))),
              //用户协议与隐私政策
              Row(children: [
                Container(
                  width: 25,
                ),
              Row( mainAxisAlignment: MainAxisAlignment.center, children: [
                RoundCheckBox(
                  value: checked,
                  onChanged: (value) {
@@ -244,9 +230,8 @@
                    });
                  },
                ),
                Expanded(
                    child: HtmlWidget(
                        "<p>登录即表明同意&nbsp;<a href='${Constant.PROTOCOL_URL}'>用户协议</a>&nbsp;和&nbsp;<a href='${Constant.PRIVACY_URL}'>隐私政策</a>&nbsp;</p>",
             HtmlWidget(
                        "<p>${widget.bindPhone ? "绑定" : "登录"}即表明同意&nbsp;<a href='${Constant.PROTOCOL_URL}'>用户协议</a>&nbsp;和&nbsp;<a href='${Constant.PRIVACY_URL}'>隐私政策</a>&nbsp;</p>",
                        textStyle: const TextStyle(color: Color(0xFF999999)),
                        onTapUrl: (url) {
                  String? title = "";
@@ -265,7 +250,8 @@
                      (data) {});
                  return true;
                })),
                }),
                const SizedBox(width: 10,)
              ])
            ]),
            //关闭按钮
@@ -299,7 +285,18 @@
                                      width: 14,
                                    ))),
                      InkWell(
                          onTap: () {},
                          onTap: () {
                            ConfigUtil.getConfig(context, "helpLink")
                                .then((value) {
                              if (value == null) {
                                return;
                              }
                              NavigatorUtil.navigateToNextPage(
                                  context,
                                  BrowserPage(title: "帮助中心", url: value),
                                      (data) {});
                            });
                          },
                          child: const Text(
                            "帮助",
                            style: TextStyle(
@@ -315,8 +312,12 @@
        ? Column(mainAxisAlignment: MainAxisAlignment.center, children: [
            InkWell(
                onTap: () {
                  print("微信授权登录开始");
                  UserUtil.loginWX();
                  if (!checked) {
                    ToastUtil.toast("请同意用户协议与隐私政策", context);
                    return;
                  }
                  WXAuthUtil.startAuth(context);
                },
                child: Container(
                  height: 42,
@@ -478,8 +479,8 @@
              ),
              Container(height: 35),
              MyFillButton(
                "登录",
                10,
                widget.bindPhone ? "绑定手机号" : "登录",
                13,
                height: 45,
                color: const Color(0xFFFF2B4B),
                fontSize: 17,
@@ -496,8 +497,25 @@
                    return;
                  }
                  UserApiUtil.loginByPhone(context, phoneController!.value.text,
                          codeController!.value.text, "")
                  if (widget.bindPhone) {
                    UserApiUtil.bindPhone(context, phoneController!.value.text,
                            codeController!.value.text, null)
                        .then((value) {
                      print("结果: $value");
                      if (value!["code"] == 0) {
                        ToastUtil.toast("绑定成功", context);
                        popPage(context);
                        return;
                      } else {
                        ToastUtil.toast(value["msg"], context);
                      }
                    });
                  } else {
                    UserApiUtil.loginByPhone(
                            context,
                            phoneController!.value.text,
                            codeController!.value.text,
                            "")
                      .then((value) {
                    print("结果: $value");
                    if (value!["code"] == 0) {
@@ -507,6 +525,7 @@
                      ToastUtil.toast(value["msg"], context);
                    }
                  });
                  }
                },
              ),
            ],
@@ -523,7 +542,7 @@
        } else if (name == "QQ登录") {
          qqLogin();
        } else if (name == "微信登录") {
          UserUtil.loginWX();
          WXAuthUtil.startAuth(context);
        }
      },
      child: Container(
flutter_module/lib/ui/mine/person_info.dart
@@ -7,6 +7,7 @@
import 'package:makemoney/ui/widget/images_widget.dart';
import 'package:makemoney/utils/pageutils.dart';
import 'package:makemoney/utils/string_util.dart';
import 'package:makemoney/utils/wx_util.dart';
import '../../api/user_api.dart';
import '../../model/user/user_info.dart';
@@ -59,6 +60,20 @@
  @override
  void initState() {
    super.initState();
    WXAuthUtil.init(context, (s) {
      UserApiUtil.bindWX(context, s).then((value) {
        if (value == null) {
          return;
        }
        if (value["code"] == 0) {
          ToastUtil.toast("微信绑定成功", context);
          getUserInfo();
          return;
        }
        ToastUtil.toast(value["msg"], context);
      });
    });
    getUserInfo();
  }
@@ -184,7 +199,8 @@
                                            ? "未添加"
                                            : _user!.phone!,
                                    onClick: () {
                                      if (_user!.phone == null) {
                                      if (StringUtil.isNullOrEmpty(
                                          _user!.phone)) {
                                        //手机号绑定
                                        NavigatorUtil.navigateToNextPage(
                                            context,
@@ -205,7 +221,11 @@
                                        ? "去授权"
                                        : _user!.wxNickName!,
                                    onClick: () {
                                      //TODO 微信授权
                                      if (!StringUtil.isNullOrEmpty(
                                          _user!.wxNickName)) {
                                        return;
                                      }
                                      WXAuthUtil.startAuth(context);
                                    },
                                    canIn: StringUtil.isNullOrEmpty(
                                        _user!.wxNickName))
flutter_module/lib/ui/mine/settings.dart
@@ -52,7 +52,8 @@
class _SettingPageState extends State<SettingPage>
    with SingleTickerProviderStateMixin {
  bool msg = false;
  bool ad = false;
  bool ad = true;
  bool content = true;
  bool login = false;
  String cacheSize = "0B";
@@ -72,12 +73,20 @@
    SettingUtil.isEnablePush().then((value) {
      setState(() {
        msg = value;
        msg = value!;
      });
    });
    SettingUtil.isEnableRecommendAd().then((value) {
      ad = value;
      setState(() {
        ad = value!;
      });
    });
    SettingUtil.isEnableRecommendContent().then((value) {
      setState(() {
        content = value!;
      });
    });
  }
@@ -120,7 +129,6 @@
        UserUtil.getUid();
        // popPage(context);
      });
    } else {
      ToastUtil.toast(map["msg"], context);
    }
@@ -152,11 +160,11 @@
                content: "关闭后,内容数量将不变,但内容相关度会降低",
                marginTop: 0,
                marginBottom: 1,
                checked: ad,
                checked: content,
                changed: (bool value) {
                  SettingUtil.setRecommendAd(value).then((value1) {
                  SettingUtil.setRecommendContent(value).then((value1) {
                    setState(() {
                      ad = value;
                      content = value;
                    });
                  });
                }),
@@ -213,8 +221,9 @@
                title: "账户注销",
                content: "",
                onClick: () {
    MySharedPreferences.getInstance().getString("unRegisterLink").then((value) {
                  MySharedPreferences.getInstance()
                      .getString("unRegisterLink")
                      .then((value) {
                    if (!StringUtil.isNullOrEmpty(value)) {
                      NavigatorUtil.navigateToNextPage(context,
                          BrowserPage(title: "账户注销", url: value!), (data) {});
@@ -225,7 +234,9 @@
                title: "隐私投诉",
                content: "",
                onClick: () {
    MySharedPreferences.getInstance().getString("feedBackLink").then((value) {
                  MySharedPreferences.getInstance()
                      .getString("feedBackLink")
                      .then((value) {
                    if (!StringUtil.isNullOrEmpty(value)) {
                      NavigatorUtil.navigateToNextPage(context,
                          BrowserPage(title: "隐私投诉", url: value!), (data) {});
flutter_module/lib/ui/mine/team.dart
@@ -3,9 +3,12 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:makemoney/api/msg_api.dart';
import 'package:makemoney/api/team_api.dart';
import 'package:makemoney/model/msg/app_notify_msg_model.dart';
import 'package:makemoney/model/team/team_member_list_vo.dart';
import 'package:makemoney/ui/mine/invite_friends.dart';
import 'package:makemoney/ui/widget/base_ui.dart';
import 'package:makemoney/ui/widget/button.dart';
import 'package:makemoney/ui/widget/images_widget.dart';
import 'package:makemoney/ui/widget/refresh_listview.dart';
@@ -56,6 +59,7 @@
      level = widget.first ? 0 : 1;
    });
    _refresh();
    _getNotify();
  }
  BoxDecoration getItemDecoration(Color bgColor, Color shadowColor) {
@@ -97,6 +101,13 @@
    _refreshController.refreshCompleted();
    _refreshController.loadComplete();
    if (result == null &&
        _page == 1 &&
        (_teamList == null || _teamList!.isEmpty)) {
      _refreshController.apiError!();
    }
    if (result == null || result["code"] != 0) {
      //页码回滚
      if (_page > 1) {
@@ -139,6 +150,16 @@
    }
  }
  AppNotifyMsgModel? _notifyMsg;
  void _getNotify() async {
    AppNotifyMsgModel? notifyMsgModel =
        await MsgApiUtil.getNotifyMsg(context, "team");
    setState(() {
      _notifyMsg = notifyMsgModel;
    });
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
@@ -152,21 +173,30 @@
                height: 20,
              ),
              rightClick: () {
                NavigatorUtil.navigateToNextPage(context, InviteFriendsPage(title: ""), (data) { });
                NavigatorUtil.navigateToNextPage(
                    context, InviteFriendsPage(title: ""), (data) {});
              },
            ),
            Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
              Expanded(flex: 1, child: getNavItem("直接队员", 0)),
              Container(
                width: 1,
                height: 20,
                color: const Color(0xFFE0E0E0),
              ),
              Expanded(flex: 1, child: getNavItem("间接队员", 1)),
            ]),
            // Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
            //   Expanded(flex: 1, child: getNavItem("直接队员", 0)),
            //   Container(
            //     width: 1,
            //     height: 20,
            //     color: const Color(0xFFE0E0E0),
            //   ),
            //   Expanded(flex: 1, child: getNavItem("间接队员", 1)),
            // ]),
            //通知消息
            _notifyMsg == null
                ? Container()
                : NotifyWidget(_notifyMsg!.content!,
                    textColor: const Color(0xFFFF8316),
                    bgColor: const Color(0xFFF5EBA4),
                    paddingRight: 0),
            Expanded(
                child: Container(
              color: Color(0xFFF0F0F0),
              color: const Color(0xFFF0F0F0),
              child: RefreshListView(
                refreshController: _refreshController,
                refresh: () {
@@ -194,12 +224,22 @@
                                height: 44,
                                fontSize: 15,
                                onClick: () {
                                  NavigatorUtil.navigateToNextPage(context, InviteFriendsPage(title: ""), (data) { });
                                  NavigatorUtil.navigateToNextPage(context,
                                      InviteFriendsPage(title: ""), (data) {});
                                },
                              )),
                          InkWell(
                              onTap: () {
                                print("跳转帮助");
                                ConfigUtil.getConfig(context, "helpLink")
                                    .then((value) {
                                  if (value == null) {
                                    return;
                                  }
                                  NavigatorUtil.navigateToNextPage(
                                      context,
                                      BrowserPage(title: "帮助中心", url: value),
                                      (data) {});
                                });
                              },
                              child: const Padding(
                                  padding: EdgeInsets.all(10),
@@ -277,7 +317,7 @@
                height: 45,
              )),
          const SizedBox(
            width: 5,
            width: 12,
          ),
          Expanded(
              child: Container(
@@ -315,7 +355,7 @@
                  _teamList![index].todayGoldCorn == 0
              ? Container()
              : Column(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.end,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    const Text(
flutter_module/lib/ui/task.dart
@@ -4,11 +4,19 @@
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:makemoney/api/gold_corn_api.dart';
import 'package:makemoney/api/msg_api.dart';
import 'package:makemoney/model/goldcorn/signin_info_model.dart';
import 'package:makemoney/model/goldcorn/task_list_model.dart';
import 'package:makemoney/model/msg/app_notify_msg_model.dart';
import 'package:makemoney/ui/mine/login.dart';
import 'package:makemoney/ui/widget/base_ui.dart';
import 'package:makemoney/ui/widget/button.dart';
import 'package:makemoney/ui/widget/images_widget.dart';
import 'package:makemoney/ui/widget/refresh_listview.dart';
import 'package:makemoney/utils/pageutils.dart';
import 'package:makemoney/utils/ui_constant.dart';
import 'package:makemoney/utils/ui_utils.dart';
import 'package:makemoney/utils/user_util.dart';
import '../../ui/widget/nav.dart';
@@ -39,7 +47,13 @@
  int selectedIndex = 0;
  bool _notify = true;
  FToast? fToast;
  int _page = 1;
  List<TaskListModel> _taskList = [];
  @override
  void initState() {
@@ -51,7 +65,7 @@
    //初始化
    _signInfo = SigninInfoModel(
        continueSignInDay: 0,
        isSignIned: false,
        isSignIned: true,
        notify: true,
        dayList: [
          DayList(day: "-", goldCorn: 0, state: 2, today: false),
@@ -64,8 +78,11 @@
        ]);
    _getSignInfo();
    _getNotify();
    _getTaskList(1);
  }
  /***签到开始****/
  void _getSignInfo() async {
    Map<String, dynamic>? result = await GoldCornApiUtil.getSignInInfo(context);
    if (result == null) {
@@ -78,10 +95,18 @@
    SigninInfoModel temp = SigninInfoModel.fromJson(result["data"]);
    setState(() {
      _signInfo = temp;
      _notify = _signInfo!.notify!;
    });
  }
  void _signIn() async {
    bool login = await UserUtil.isLogin();
    if (!login) {
      NavigatorUtil.navigateToNextPage(
          context, LoginPage(title: ""), (data) {});
      return;
    }
    Map<String, dynamic>? result = await GoldCornApiUtil.signIn(context);
    if (result == null) {
      return;
@@ -93,6 +118,95 @@
    var data = result["data"];
    showSignSuccessToast(data["goldCorn"], data["continueDay"]);
    _getSignInfo();
  }
  void _setSignInNotify(bool notify) async {
    Map<String, dynamic>? result =
        await GoldCornApiUtil.setSignInNotify(context, notify);
    if (result == null) {
      return;
    }
    if (result["code"] != 0) {
      ToastUtil.toast(result["msg"], context);
      return;
    }
  }
  /***签到结束****/
  AppNotifyMsgModel? _notifyMsg;
  void _getNotify() async {
    AppNotifyMsgModel? notifyMsgModel =
        await MsgApiUtil.getNotifyMsg(context, "task");
    setState(() {
      _notifyMsg = notifyMsgModel;
    });
  }
  //下拉刷新
  void _refresh() {
    if (_refreshController.dataNormal != null) {
      _refreshController.dataNormal!();
    }
    _refreshController.loadComplete();
    _getTaskList(1);
  }
  //获取队员列表
  void _getTaskList(int page) async {
    setState(() {
      _page = page;
    });
    Map<String, dynamic>? result = await GoldCornApiUtil.getTaskList(context);
    _refreshController.refreshCompleted();
    _refreshController.loadComplete();
    if (result == null && _page == 1&&_taskList.isEmpty) {
      _refreshController.apiError!();
    }
    if (result == null || result["code"] != 0) {
      //页码回滚
      if (_page > 1) {
        setState(() {
          _page = _page - 1;
        });
      }
      return;
    }
    //解析数据
    int count = result["data"]["count"];
    List<dynamic> list = result["data"]["list"];
    List<TaskListModel> tempList = [];
    list.forEach((element) {
      tempList.add(TaskListModel.fromJson(element));
    });
    if (_page == 1) {
      setState(() {
        _taskList = tempList;
      });
    } else {
      setState(() {
        _taskList.addAll(tempList);
      });
    }
    //判断数据
    if (_taskList.isEmpty) {
      //空数据
      _refreshController.dataEmpty!();
    } else {
      _refreshController.dataNormal!();
      if (count <= _taskList.length) {
        //没有数据了
        _refreshController.loadNoData();
      }
    }
  }
  @override
@@ -129,10 +243,13 @@
                ),
                //通知消息
                Container(
                _notifyMsg == null
                    ? Container(
                  height: 30,
                  color: Colors.red,
                ),
                      )
                    : NotifyWidget(_notifyMsg!.content!,
                        textColor: Colors.white),
                //签到
                _signInfo == null
                    ? Container()
@@ -141,17 +258,23 @@
                        decoration: BoxDecoration(
                            color: Colors.white,
                            borderRadius: BorderRadius.circular(13)),
                        padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
                        padding: const EdgeInsets.fromLTRB(4, 20, 4, 10),
                        child: Column(
                          mainAxisSize: MainAxisSize.min,
                          children: [
                            Row(
                              crossAxisAlignment: CrossAxisAlignment.end,
                              children: [
                                SizedBox(
                                  width: 6,
                                ),
                                const Text(
                                  "签到领金币",
                                  style: TextStyle(
                                      color: ColorConstant.theme, fontSize: 15),
                                      color: ColorConstant.theme,
                                      fontSize: 15,
                                      fontWeight: FontWeight.bold,
                                      height: 1),
                                ),
                                const SizedBox(
                                  width: 5,
@@ -166,7 +289,8 @@
                                              "${_signInfo!.continueSignInDay}",
                                          style: const TextStyle(
                                              color: ColorConstant.theme,
                                              fontSize: 12)),
                                              fontSize: 12,
                                              fontWeight: FontWeight.bold)),
                                      const TextSpan(text: "天")
                                    ])),
                                Expanded(child: Container()),
@@ -178,12 +302,33 @@
                                const SizedBox(
                                  width: 5,
                                ),
                                Image.asset(
                                  _signInfo!.notify!
                                InkWell(
                                    onTap: () {
                                      UserUtil.isLogin().then((value) {
                                        if (!value) {
                                          NavigatorUtil.navigateToNextPage(
                                              context,
                                              LoginPage(title: ""),
                                              (data) {});
                                          return;
                                        }
                                        setState(() {
                                          _notify = !_notify;
                                        });
                                        _setSignInNotify(_notify);
                                      });
                                    },
                                    child: Padding(
                                        padding: const EdgeInsets.only(top: 10),
                                        child: Image.asset(
                                          _notify
                                      ? "assets/imgs/task/icon_task_sign_notify_checked.png"
                                      : "assets/imgs/task/icon_task_sign_notify.png",
                                  height: 12,
                                )
                                          width: 22,
                                        ))),
                                const SizedBox(
                                  width: 6,
                                ),
                              ],
                            ),
                            Row(
@@ -193,7 +338,10 @@
                            const SizedBox(
                              height: 20,
                            ),
                            MyFillButton(
                            Padding(
                                padding:
                                    const EdgeInsets.only(left: 6, right: 6),
                                child: MyFillButton(
                              "立即签到",
                              10,
                              fontSize: 15,
@@ -205,9 +353,10 @@
                                if (_signInfo!.isSignIned!) {
                                  return;
                                }
                                _signIn();
                              },
                            )
                                ))
                          ],
                        ),
                      ),
@@ -225,7 +374,7 @@
                                fontSize: 10, color: Color(0xFF666666)),
                          ),
                          const SizedBox(
                            height: 5,
                            height: 8,
                          ),
                          // Row(
                          //   children: [
@@ -236,18 +385,22 @@
                          Expanded(
                              child: Container(
                            alignment: Alignment.topCenter,
                            margin: EdgeInsets.only(bottom: 10),
                            margin: const EdgeInsets.only(bottom: 10),
                            decoration: BoxDecoration(
                                color: Colors.white,
                                borderRadius: BorderRadius.circular(13)),
                            child: RefreshListView(
                              enablePullDown: false,
                              refresh: () {
                                _refresh();
                              },
                              enablePullUp: false,
                              refreshController: _refreshController,
                              loadTextColor: const Color(0xFFFF8316),
                              content: ListView.builder(
                                itemCount: 5,
                                padding: const EdgeInsets.only(top: 12),
                                itemCount: _taskList.length,
                                itemBuilder: (BuildContext context, int index) {
                                  return getItemView(index, () {});
                                  return getItemView(_taskList[index], () {});
                                },
                              ),
                            ),
@@ -358,7 +511,7 @@
                height: 55 * _sizeUnit!,
                // padding: EdgeInsets.only(left: 10,right: 10),
                child: Stack(children: [
                  day.today!
                  day.today! && !_signInfo!.isSignIned!
                      ? Image.asset(
                          "assets/imgs/task/ic_task_sign_day_item_hb_today.png")
                      : Padding(
@@ -441,12 +594,13 @@
        ));
  }
  Widget getItemView(int index, GestureTapCallback onTap) {
    return Padding(
        padding: const EdgeInsets.only(top: 20, left: 16, right: 16, bottom: 5),
  Widget getItemView(TaskListModel task, GestureTapCallback onTap) {
    return Container(
        padding:
            const EdgeInsets.only(top: 10, left: 16, right: 16, bottom: 10),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Container(
              width: 40,
@@ -462,47 +616,51 @@
                  ],
                ),
              ),
              child: Container(
                margin: const EdgeInsets.all(2),
                decoration: BoxDecoration(
                  color: const Color(0xFFFFF8AE),
                  borderRadius: BorderRadius.circular(40),
              child: CommonImage(task.icon!),
                ),
              ),
            ),
            SizedBox(
            const SizedBox(
              width: 10,
            ),
            Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(
                  "浏览推荐视频",
                  style: TextStyle(color: Color(0xFF454545), fontSize: 12),
                  task.name!,
                  style: TextStyle(
                      color: Color(0xFF454545), fontSize: 12, height: 1.2),
                ),
                Text(
                  "今日进度(1/3)",
                  style: TextStyle(
                  task.process!,
                  style: const TextStyle(
                      color: Color(0xFF7F7F7F), fontSize: 9, height: 1.5),
                ),
                Text.rich(TextSpan(
                    style: TextStyle(color: Color(0xFFFF8316), fontSize: 9),
                    style:
                        TextStyle(color: const Color(0xFFFF8316), fontSize: 9),
                    children: [
                      TextSpan(text: "+"),
                      TextSpan(text: "8888", style: TextStyle(fontSize: 10)),
                      TextSpan(text: "金币/人 (需手动领取)"),
                      const TextSpan(text: "+"),
                      TextSpan(
                          text: "${task.price}",
                          style: TextStyle(fontSize: 10)),
                      TextSpan(text: task.priceUnit),
                    ])),
              ],
            ),
            Expanded(child: Container()),
            MyOutlineButton(
              "去完成",
              task.actionName!,
              20,
              width: 62,
              height: 25,
              fontSize: 12,
              textColor: ColorConstant.theme,
              color: ColorConstant.theme,
              onClick: () {
                if (false == task.active!) {
                  return;
                }
                jumpAppPage(task.jumpType!, null);
              },
            )
          ],
        ));
flutter_module/lib/ui/widget/base_ui.dart
@@ -1,2 +1,27 @@
import 'package:flutter/cupertino.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter/material.dart';
import 'package:marquee/marquee.dart';
Widget NotifyWidget(String text, {required Color textColor, Color? bgColor,double? paddingLeft,double? paddingRight }) {
  return Container(
    height: 30,
    alignment: Alignment.center,
    color: bgColor ?? Colors.transparent,
    padding:  EdgeInsets.only(left: paddingLeft ?? 10, right: paddingRight ?? 10, top: 5, bottom: 5),
    child: Row(
      children: [
        Icon(
          Icons.volume_up_outlined,
          color: textColor,
          size: 15,
        ),
        SizedBox(width: 5,),
        Expanded(
            child: Marquee(
          text: text,
          style: TextStyle(fontSize: 12, color: textColor),
        ))
      ],
    ),
  );
}
flutter_module/lib/ui/widget/nav.dart
@@ -18,8 +18,10 @@
class TopNavBar extends StatelessWidget {
  final String title;
  GestureTapCallback? back;
  GestureTapCallback? leftWidgetClick;
  String? rightText;
  String? leftText;
  Widget? leftWidget;
  Icon? rightIcon;
  Image? rightImage;
  GestureTapCallback? rightClick;
@@ -32,6 +34,8 @@
      this.back,
      this.rightText,
      this.rightIcon,
      this.leftWidget,
      this.leftWidgetClick,
      this.rightImage,
      this.leftText = "",
      this.rightClick,
@@ -126,7 +130,18 @@
                                leftText!,
                                style: const TextStyle(fontSize: 16),
                              )
                            : Container()
                            : Container(),
                        leftWidget == null
                            ? Container()
                            : InkWell(
                                onTap: () {
                                  if (leftWidgetClick == null) {
                                    return;
                                  }
                                  leftWidgetClick!();
                                },
                                child: leftWidget!,
                              )
                      ]),
                ))
          ],
flutter_module/lib/ui/widget/refresh_listview.dart
@@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:makemoney/ui/widget/button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
typedef OnRefresh = void Function();
@@ -157,12 +158,15 @@
        : SmartRefresher(
            enablePullDown: widget.enablePullDown!,
            enablePullUp: widget.enablePullUp!,
            header: const WaterDropHeader(
              complete: Text(
                "刷新完成",
                style: TextStyle(color: Color(0xFFB8AFB5)),
              ),
            ),
            header:
            MaterialClassicHeader(),
            // const WaterDropHeader(
            //   complete: Text(
            //     "刷新完成",
            //     style: TextStyle(color: Color(0xFFB8AFB5)),
            //   ),
            // ),
            footer: CustomFooter(
              builder: (BuildContext context, LoadStatus? mode) {
                Widget body;
@@ -207,8 +211,8 @@
                "assets/imgs/common/ic_empty.png",
              ),
              const Text(
                "暂无数据     ",
                style: TextStyle(color: Color(0xFFF698C9), fontSize: 18),
                "~空空如也~",
                style: TextStyle(color: Color(0xFF999999), fontSize: 18),
              )
            ],
          ),
@@ -216,25 +220,36 @@
  }
  Widget errorView() {
    return InkWell(
        onTap: () {
          _onRefresh();
        },
        child: Container(
    return Container(
          alignment: Alignment.center,
          // color: Colors.yellow,
          child: Stack(
            alignment: Alignment.bottomCenter,
            children: [
              Image.asset("assets/imgs/common/ic_network_error.png",
                  width: MediaQuery.of(context).size.width * 2 / 5),
              const Text(
                "网络异常,点击重新加载",
                style: TextStyle(color: Color(0xFFF698C9), fontSize: 18),
              width: MediaQuery.of(context).size.width * 3 / 5),
          const Positioned(
              bottom: 50,
              left: 0,
              right: 0,
              child: Text(
                "网络请求出错",
                textAlign: TextAlign.center,
                style: TextStyle(fontSize: 15, color: Color(0xFF999999)),
              )),
          MyFillButton(
            "点击重新加载",
            18,
            width: 170,
            height: 36,
            fontSize: 15,
            onClick: () {
              _onRefresh();
            },
              )
            ],
          ),
        ));
    );
  }
  @override
flutter_module/lib/ui/widget/verification_box.dart
@@ -9,9 +9,10 @@
///SOS雷达扫描View
class VerificationBox extends StatefulWidget {
  final int length;
  final double width;
  final VerificationBoxController controller;
  VerificationBox(this.length, this.controller);
  VerificationBox(this.length, this.controller, {required this.width});
  @override
  _VerificationBoxState createState() => _VerificationBoxState();
@@ -19,7 +20,7 @@
class _VerificationBoxState extends State<VerificationBox>
    with WidgetsBindingObserver {
  TextEditingController _controller = TextEditingController();
  final TextEditingController _controller = TextEditingController();
  String content = "";
  final FocusNode _focusNode = FocusNode();
  bool isKeyboardActived = false;
@@ -27,8 +28,8 @@
  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance!.addObserver(this);
    widget.controller.controller = _controller;
    _controller.addListener(() {
      setState(() {
        print("listener:");
@@ -44,18 +45,20 @@
        }
      });
    });
    WidgetsBinding.instance!.addObserver(this);
  }
  @override
  void dispose() {
    super.dispose();
    WidgetsBinding.instance!.removeObserver(this);
    isKeyboardActived = false;
    _focusNode.unfocus();
  }
  @override
  void didChangeMetrics() {
    print("didChangeMetrics isKeyboardActived:$isKeyboardActived");
    super.didChangeMetrics();
    WidgetsBinding.instance!.addPostFrameCallback((_) {
      // 当前是安卓系统并且在焦点聚焦的情况下
@@ -75,6 +78,7 @@
  Widget build(BuildContext context) {
    return GestureDetector(
        onTap: () {
          print("点击事件,输入框获取焦点:${_focusNode.hasFocus}");
          FocusScope.of(context).requestFocus(_focusNode);
        },
        child: Stack(
@@ -91,8 +95,8 @@
                          RegExp("[a-zA-Z]|[0-9]")),
                      LengthLimitingTextInputFormatter(widget.length),
                    ],
                    style: TextStyle(fontSize: 1, color: Colors.transparent),
                    decoration: InputDecoration(
                    style: const TextStyle(fontSize: 1, color: Colors.transparent),
                    decoration: const InputDecoration(
                        border: InputBorder.none,
                        focusedBorder: InputBorder.none,
                        focusColor: Colors.transparent),
@@ -100,10 +104,12 @@
                    focusNode: _focusNode,
                    autofocus: false,
                    controller: _controller)),
            Row(
            SizedBox(
                width: widget.width,
                child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: getItems(),
            )
                ))
          ],
        ));
  }
@@ -118,10 +124,13 @@
  }
  Widget getItem(int index) {
    double width = (widget.width - 10 * widget.length - 1) / widget.length;
    //TODO 传入宽度计算
    return Container(
      alignment: Alignment.center,
      width: 36,
      height: 45,
      width: width,
      height: width * 1.25,
      decoration: BoxDecoration(
          color: const Color(0xFFEFEFEF),
          borderRadius: BorderRadius.circular(13)),
@@ -139,10 +148,10 @@
class VerificationBoxController {
  VerificationBoxController();
  TextEditingController? _controller = null;
  TextEditingController? _controller;
  set controller(TextEditingController? controller) {
    this._controller = controller;
    _controller = controller;
  }
  String get text => (_controller == null ? "" : _controller!.text);
flutter_module/lib/utils/config_util.dart
@@ -1,35 +1,15 @@
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:makemoney/utils/share_preference.dart';
import '../../api/config_api.dart';
import '../api/http.dart';
import 'package:shared_preferences/shared_preferences.dart';
class ConfigUtil {
  ///保存配置信息
  static void saveConfig(Map<String, dynamic> map) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    await prefs.setString("config_value", jsonEncode(map));
  }
  static Future<String?> getConfig(BuildContext context, String key) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    String? result = prefs.getString("config_value");
    if (result != null) {
      Map<String, dynamic> map = jsonDecode(result);
      return map[key];
    } else {
      //重新请求
      ConfigApiUtil.getConfig(context).then((value) {
        if (value == null) {
          return;
        }
        if (value["code"] == 0) {
          saveConfig(value["data"]);
        }
      });
    }
    return null;
    String? value = await dataMethodChannel.invokeMethod("getConfig", key);
    return value;
  }
}
@@ -54,3 +34,5 @@
}
enum SharePlatform { all, wx, wxcircle, qq, qqzone, sina }
flutter_module/lib/utils/setting_util.dart
@@ -1,46 +1,46 @@
import 'package:makemoney/utils/share_preference.dart';
import 'package:shared_preferences/shared_preferences.dart';
class SettingUtil {
  //设置推送
  static Future<bool> setPush(bool enable) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return await prefs.setBool("setting_push", enable);
    await _setSetting("pushUnDisturb", enable);
    return true;
  }
  ///是否允许推送
  static Future<bool> isEnablePush() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    bool? result = prefs.getBool("setting_push");
    result ??= true;
    return result;
  static Future<bool?> isEnablePush() async {
    return await _getSetting("pushUnDisturb");
  }
  //设置推荐广告
  static Future<bool> setRecommendAd(bool enable) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return await prefs.setBool("setting_recommend_ad", enable);
     await _setSetting("adRecommend", enable);
     return true;
  }
  ///是否允许推荐广告
  static Future<bool> isEnableRecommendAd() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    bool? result = prefs.getBool("setting_recommend_ad");
    result ??= true;
    return result;
  static Future<bool?> isEnableRecommendAd() async {
    return await _getSetting("adRecommend");
  }
  //设置推荐广告
  static Future<bool> setLocationSpan(int second) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return await prefs.setInt("setting_location_span", second);
  //设置推荐内容
  static Future<bool> setRecommendContent(bool enable) async {
     await _setSetting("contentRecommend", enable);
    return true;
  }
  ///是否允许推荐广告
  static Future<int> getLocationSpan() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    int? result = prefs.getInt("setting_location_span");
    result ??= 30;
    return result;
  ///是否允许推荐内容
  static Future<bool?> isEnableRecommendContent() async {
    return await _getSetting("contentRecommend");
  }
  static _setSetting(String key, bool value) async {
    await dataMethodChannel
        .invokeMethod("setSetting", {"key": key, "value": value});
  }
  static Future<bool?> _getSetting(String key) async {
    return await dataMethodChannel.invokeMethod("getSetting", key);
  }
}
flutter_module/lib/utils/ui_constant.dart
@@ -10,7 +10,7 @@
class Constant {
  static const bool NATIVE=false;
  static const bool NATIVE=true;
  static const String IOS_APP_ID =
      "1615734087";
flutter_module/lib/utils/ui_utils.dart
@@ -27,6 +27,16 @@
  uiMethodChannel.invokeMethod("setStatusBarDark");
}
//跳转页面
jumpAppPage(String type, Map<String, dynamic>? params) {
  Map<String, dynamic> ps = {"type": type};
  if (params != null) {
    ps["params"] = params;
  }
  //跳转应用界面
  uiMethodChannel.invokeMethod("jumpAppPage", ps);
}
///包裹整个页面,下拉刷新,,上拉加载的默认配置
Widget getBasePage(Widget widget) {
  return RefreshConfiguration(
flutter_module/lib/utils/user_util.dart
@@ -35,14 +35,7 @@
    return prefs.setBool("agree_protocol", true);
  }
  ///微信登录
  static void loginWX() async {
    fluwx
        .sendWeChatAuth(scope: "snsapi_userinfo", state: "wechat_sdk_demo_test")
        .then((value) {
      print("微信授权登录回调:$value");
    });
  }
  ///QQ登录
  static Future<Map> loginQQ() async {
flutter_module/pubspec.lock
@@ -141,6 +141,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.0"
  fading_edge_scrollview:
    dependency: transitive
    description:
      name: fading_edge_scrollview
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.1"
  fake_async:
    dependency: transitive
    description:
@@ -255,7 +262,7 @@
      name: fluwx_no_pay
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.8.1"
    version: "3.8.5"
  fwfh_text_style:
    dependency: transitive
    description:
@@ -304,6 +311,13 @@
      name: image_picker
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.8.5"
  image_picker_android:
    dependency: transitive
    description:
      name: image_picker_android
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.8.4+11"
  image_picker_for_web:
    dependency: transitive
@@ -312,6 +326,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.1.6"
  image_picker_ios:
    dependency: transitive
    description:
      name: image_picker_ios
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.8.4+11"
  image_picker_platform_interface:
    dependency: transitive
    description:
@@ -340,6 +361,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.0.1"
  marquee:
    dependency: "direct dev"
    description:
      name: marquee
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.2.1"
  matcher:
    dependency: transitive
    description:
@@ -452,6 +480,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.7.0"
  pin_code_fields:
    dependency: "direct dev"
    description:
      name: pin_code_fields
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "7.4.0"
  platform:
    dependency: transitive
    description:
@@ -514,42 +549,42 @@
      name: share_plus
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.1.0"
    version: "4.0.4"
  share_plus_linux:
    dependency: transitive
    description:
      name: share_plus_linux
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.4"
    version: "3.0.0"
  share_plus_macos:
    dependency: transitive
    description:
      name: share_plus_macos
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.2"
    version: "3.0.0"
  share_plus_platform_interface:
    dependency: transitive
    description:
      name: share_plus_platform_interface
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.1"
    version: "3.0.2"
  share_plus_web:
    dependency: transitive
    description:
      name: share_plus_web
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.4"
    version: "3.0.0"
  share_plus_windows:
    dependency: transitive
    description:
      name: share_plus_windows
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.3"
    version: "3.0.0"
  shared_preferences:
    dependency: "direct dev"
    description:
flutter_module/pubspec.yaml
@@ -28,13 +28,13 @@
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  cupertino_icons: ^1.0.4
dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^1.0.0
  cupertino_icons: ^1.0.3
  flutter_lints: ^1.0.4
  cupertino_icons: ^1.0.4
  permission_handler: ^9.0.2
@@ -51,7 +51,7 @@
  webview_flutter: ^2.8.0
  flutter_widget_from_html_core: ^0.8.3
  flutter_widget_from_html_core: ^0.8.5+1
  #时间日期选择
  flutter_datetime_picker: ^1.5.1
@@ -59,11 +59,11 @@
  qr_flutter: ^4.0.0
  #分享组件
  share_plus: ^3.0.4
  path_provider: ^2.0.6
  share_plus: ^4.0.4
  path_provider: ^2.0.9
  #微信登录
  fluwx_no_pay: ^3.8.1
  fluwx_no_pay: ^3.8.5
  event_bus: ^2.0.0
@@ -96,7 +96,7 @@
  cached_network_image: ^3.2.0
  #图片选择
  image_picker: ^0.8.4+9
  image_picker: ^0.8.5
  #图片裁剪
  image_cropper: ^1.5.0
@@ -105,6 +105,12 @@
  #保存图片到相册
  image_gallery_saver: ^1.7.1
  #跑马灯
  marquee: ^2.2.1
  #验证码输入
  pin_code_fields: ^7.4.0
  flutter_boost:
    git:
      url: 'https://github.com/alibaba/flutter_boost.git'