admin
2021-05-17 06a80d5c4b3a971cdc1ca3d91717ec3f6e03a443
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
package com.tejia.lijin.app.ui.recommend;
 
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import androidx.annotation.Nullable;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.JavascriptInterface;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
 
import com.alibaba.baichuan.android.trade.model.AlibcShowParams;
import com.alibaba.baichuan.android.trade.model.OpenType;
import com.alibaba.fastjson.JSON;
import com.google.gson.Gson;
import com.tejia.lijin.app.util.Constant;
import com.umeng.analytics.MobclickAgent;
import com.wpc.library.DeviceUuidFactory;
import com.wpc.library.util.GetManifestDataUtil;
import com.wpc.library.util.MobileUtil;
import com.wpc.library.util.NetUtils;
import com.wpc.library.util.common.PackageUtils2;
import com.wpc.library.util.common.StringUtils;
import com.wpc.library.util.security.MD5Utils;
import com.tejia.lijin.app.BuXinConstant;
import com.tejia.lijin.app.R;
import com.tejia.lijin.app.ui.BaseActivity;
import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog;
import com.tejia.lijin.app.util.JumpActivityUtil;
import com.tejia.lijin.app.util.user.UserUtil;
 
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
 
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
 
/**
 * 9.9/19.9/29.9/49.9精选包邮
 */
public class ChoicenessFreightFreeActivity extends BaseActivity implements View.OnClickListener {
    private TextView tv_top_bar_left;
    private TextView tv_top_bar_middle;
    private WebView webView;
    private ProgressBar choicenessfreightfree_ProgressBar;
    private FrameLayout choicenessfreightfree_linear;//弹窗布局
    private FrameLayout choicenessfreightfree_button;//半透明背景
    private ListView choicenessfreightfree_listview;//listview
 
    private LinearLayout ll_no_net, ll_recommend_content, ll_no_data, ll_request_failture;
 
    private boolean sign = false;//标记 标题右边图片
    private JSONArray mJsonArray;//传过来的 参数的值为json字符串:
    private ArrayList<HashMap<String, String>> mList = new ArrayList<>();
    private ChoicenessFreightFreeAdapter dapter;
    ShapeLoadingDialog pd = null;
 
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_choicenessfreightfree);
//        TopStatusSettings.setStatusViewAndDeepColor(this);//设置状态栏
        inint();
        setListeners();
        setWebView();
        setProgressBar();
 
        titlesign(sign);
        String Data = getIntent().getStringExtra("data");
        try {
//            mJsonArray = new JSONArray("    [{\n" +
//                    " \"name\": \"9块9\",\n" +
//                    " \"url\": \"https://blog.csdn.net\"\n" +
//                    " },\n" +
//                    " {\n" +
//                    " \"name\": \"19块9\",\n" +
//                    " \"url\": \"https://uniapp.dcloud.io\"\n" +
//                    " }, {\n" +
//                    " \"name\": \"29块9\",\n" +
//                    " \"url\": \"http://elife.bm001.com/esj\"\n" +
//                    " }, {\n" +
//                    " \"name\": \"49块9\",\n" +
//                    " \"url\": \"https://baike.so.com/doc/663437-702310.html\"\n" +
//                    " }\n" +
//                    "]");
            mJsonArray = new JSONArray(Data);
            setJsonArray(mJsonArray != null ? mJsonArray : null);
        } catch (JSONException e) {
            e.printStackTrace();
            mJsonArray = null;
        }
        if (pd == null) {
            pd = new ShapeLoadingDialog.Builder(this).build();
        }
        //设置状态栏
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            Window window = getWindow();
            //设置状态栏颜色为白色
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                window.setStatusBarColor(getResources().getColor(R.color.white));
            }
            //设置状态栏文字颜色及图标为深色
            getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }
    }
 
    private void setJsonArray(JSONArray mJsonArray) throws JSONException {
        if (mJsonArray != null) {
            for (int i = 0; i < mJsonArray.length(); i++) {
                JSONObject obj = (JSONObject) mJsonArray.get(i);
                HashMap<String, String> map = new HashMap<>();
                map.put("name", obj.optString("name"));
                map.put("url", obj.optString("url"));
                if (i == 0) {
                    choicenessfreightfree_ProgressBar.setVisibility(View.VISIBLE);
                    tv_top_bar_middle.setText(obj.optString("name"));
                    webView.loadUrl(obj.optString("url"));
                    map.put("boolean", "true");
                } else {
                    map.put("boolean", "false");
                }
                mList.add(map);
            }
 
            dapter = new ChoicenessFreightFreeAdapter(getApplication(), mList);
            choicenessfreightfree_listview.setAdapter(dapter);
        }
 
        choicenessfreightfree_listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                mList.get(position).put("boolean", "true");
                for (int i = 0; i < mList.size(); i++) {
                    if (i != position) {
                        mList.get(i).put("boolean", "false");
                    }
                }
                dapter.notifyDataSetChanged();
                choicenessfreightfree_ProgressBar.setVisibility(View.VISIBLE);
                tv_top_bar_middle.setText(mList.get(position).get("name"));
                webView.loadUrl(mList.get(position).get("url") + "");
                sign = false;
                titlesign(sign);
                choicenessfreightfree_linear.setVisibility(View.GONE);
            }
        });
    }
 
    private void setProgressBar() {
        choicenessfreightfree_ProgressBar.setMax(100);
        choicenessfreightfree_ProgressBar.setProgressDrawable(this.getResources().getDrawable(R.drawable.color_progressbar));
    }
 
    private void setWebView() {
        WebSettings webSettings = webView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        webSettings.setDomStorageEnabled(true);
        webSettings.setUseWideViewPort(true);
        webSettings.setLoadWithOverviewMode(true);
        webSettings.setTextZoom(100);
        webView.setDrawingCacheEnabled(true);
        webView.addJavascriptInterface(new JavaInterface(), "yestv");
        webView.setWebChromeClient(new WebChromeClient() {
            @Override
            public void onReceivedTitle(WebView view, String title) {
//                if (null != title && !StringUtils.isEmpty(title.trim())) {//设置网页标题 进标题栏
////                    tv_top_bar_middle.setText(title);
//                }
            }
 
            @Override
            public void onProgressChanged(WebView webView, int i) {
                if (i == 100) {
                    choicenessfreightfree_ProgressBar.setVisibility(View.GONE);
                } else {
                    if (View.INVISIBLE == choicenessfreightfree_ProgressBar.getVisibility()) {
                        choicenessfreightfree_ProgressBar.setVisibility(View.VISIBLE);
                    }
                    choicenessfreightfree_ProgressBar.setProgress(i);
                }
                super.onProgressChanged(webView, i);
            }
        });
        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                //该方法在Build.VERSION_CODES.LOLLIPOP以前有效,从Build.VERSION_CODES.LOLLIPOP起,建议使用shouldOverrideUrlLoading(WebView, WebResourceRequest)} instead
                //返回false,意味着请求过程里,不管有多少次的跳转请求(即新的请求地址),均交给webView自己处理,这也是此方法的默认处理
                //返回true,说明你自己想根据url,做新的跳转,比如在判断url符合条件的情况下,我想让webView加载http://www.baidu.com
                return false;
            }
 
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
                //返回false,意味着请求过程里,不管有多少次的跳转请求(即新的请求地址),均交给webView自己处理,这也是此方法的默认处理
                //返回true,说明你自己想根据url,做新的跳转,比如在判断url符合条件的情况下,我想让webView加载http://www.baidu.com
                return false;
            }
 
            @Override
            public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
                super.onReceivedError(view, errorCode, description, failingUrl);
                if (errorCode == -5 && description.equals("net::ERR_PROXY_CONNECTION_FAILED")) {//网络链接异常 有网络链接但获取不到数据
                    requestState(2);
                }
            }
        });
    }
 
 
    private void inint() {
        tv_top_bar_left = findViewById(R.id.tv_top_bar_left);
        tv_top_bar_middle = findViewById(R.id.tv_top_bar_middle);
        webView = findViewById(R.id.choicenessfreightfree_web);
        choicenessfreightfree_listview = findViewById(R.id.choicenessfreightfree_listview);
        choicenessfreightfree_ProgressBar = findViewById(R.id.choicenessfreightfree_ProgressBar);
        choicenessfreightfree_linear = findViewById(R.id.choicenessfreightfree_linear);
        choicenessfreightfree_button = findViewById(R.id.choicenessfreightfree_button);
 
        ll_no_net = findViewById(R.id.ll_no_net);
        ll_no_data = findViewById(R.id.ll_no_data);
        ll_request_failture = findViewById(R.id.ll_request_failture);
 
 
        choicenessfreightfree_linear.setVisibility(View.GONE);
        choicenessfreightfree_button.setOnClickListener(this);
 
        findViewById(R.id.tv_net_setting).setOnClickListener(this);
        findViewById(R.id.tv_refresh).setOnClickListener(this);
    }
 
    /**
     * 设置监听
     */
    private void setListeners() {
        tv_top_bar_middle.setOnClickListener(this);
        tv_top_bar_left.setOnClickListener(this);
    }
 
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_top_bar_left://返回
                finish();
                break;
            case R.id.tv_top_bar_middle://点击标题 选择包邮种类
                if (sign) {
                    sign = false;
                    choicenessfreightfree_linear.setVisibility(View.GONE);
                } else {
                    sign = true;
                    choicenessfreightfree_linear.setVisibility(View.VISIBLE);
                }
                titlesign(sign);
                break;
            case R.id.choicenessfreightfree_button:
                sign = false;
                titlesign(sign);
                choicenessfreightfree_linear.setVisibility(View.GONE);
                break;
            case R.id.tv_net_setting:
                startActivity(new Intent(Settings.ACTION_SETTINGS));
                break;
            case R.id.tv_refresh:
                startActivity(new Intent(Settings.ACTION_SETTINGS));
                break;
            default:
 
                break;
        }
    }
 
    /**
     * 改变标题右边小箭头图标
     *
     * @param sign
     */
    private void titlesign(boolean sign) {
        Drawable drawable = getResources().getDrawable(sign ? R.drawable.sign_up : R.drawable.sign_below);//R.mipmap.work_shouqi_jiantou);
        drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
        tv_top_bar_middle.setCompoundDrawables(null, null, drawable, null);
        tv_top_bar_middle.setCompoundDrawablePadding(20);
    }
 
    /**
     * 拦截返回 返回webview的上一级
     *
     * @param keyCode
     * @param event
     * @return
     */
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK)) {
            if (webView.canGoBack()) {
                webView.goBack(); // goBack()表示返回WebView的上一页面
                return true;
            } else {
                finish();
            }
        }
        return super.onKeyDown(keyCode, event);
    }
 
 
    @Override
    protected void onResume() {
        super.onResume();
        if (NetUtils.getNetworkState(this).equalsIgnoreCase(NetUtils.NETWORK_NONE)) {
            requestState(3);
            Toast.makeText(this, "网络未连接,请检测网络设置", Toast.LENGTH_SHORT).show();
        }
 
//        else if (NetUtils.isNetConnected(this)) {
//            requestState(2);
//            Toast.makeText(this, "网络连接异常,请检测网络设置", Toast.LENGTH_SHORT).show();
//        }
    }
 
    /**
     * 请求状态 0 数据正常展示;1 返回数据为空;2 网络请求失败;3 没有连接网络
     *
     * @param state
     */
    private void requestState(int state) {
//        ll_recommend_content.setVisibility(state == 0 ? View.VISIBLE : View.GONE);
        ll_no_data.setVisibility(state == 1 ? View.VISIBLE : View.GONE);
        ll_request_failture.setVisibility(state == 2 ? View.VISIBLE : View.GONE);
        ll_no_net.setVisibility(state == 3 ? View.VISIBLE : View.GONE);
    }
 
 
    class JavaInterface {
 
        @JavascriptInterface
        public String getUid() {
            return getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0");
        }
 
        @JavascriptInterface
        public void setTitle(final String title) {
//            tv_top_bar_middle.setText(title);
            tv_top_bar_middle.post(new Runnable() {
                @Override
                public void run() {
                    if (null != title && !StringUtils.isEmpty(title.trim())) {
//                        tv_top_bar_middle.setText(title);
                    }
                }
            });
        }
 
        @JavascriptInterface
        public String getVersion() {
            return PackageUtils2.getVersionCode(ChoicenessFreightFreeActivity.this) + "";
        }
 
        @JavascriptInterface
        public void toast(String str) {
            Toast.makeText(ChoicenessFreightFreeActivity.this, str, Toast.LENGTH_LONG).show();
        }
 
        @JavascriptInterface
        public String getSign(String str) {
            return MD5Utils.getMD532(str + "@?,223Hbb88lll");
        }
 
 
        @JavascriptInterface
        public void jumpGoodsSplash(long id) {
            Intent intent = new Intent(ChoicenessFreightFreeActivity.this, GoodsDetailActivity.class);
            intent.putExtra("goodsId", id + "");
            intent.putExtra("goodsType", Constant.GOODS_TYPE_TB);
            startActivity(intent);
        }
 
 
        @JavascriptInterface
        public void jumpBaiChuan(String tbClientInfo, String url, String auctionId) {
            AlibcShowParams alibcShowParams = new AlibcShowParams();
            alibcShowParams.setOpenType(OpenType.Native);
            JumpActivityUtil.jumpBaiChuan(ChoicenessFreightFreeActivity.this,
                    tbClientInfo, url, auctionId, alibcShowParams);
        }
 
        @JavascriptInterface
        public void jumpSearch(String key) {
            Intent intent = new Intent(ChoicenessFreightFreeActivity.this, SearchActivity.class);
            intent.putExtra("key", key);
            startActivity(intent);
        }
 
        @JavascriptInterface
        public void jumpGoodsDetail(long id) {
            Intent intent = new Intent(ChoicenessFreightFreeActivity.this, GoodsDetailBrowerActivity.class);
            intent.putExtra("id", id + "");
            intent.putExtra("isTrolley", true);
            startActivity(intent);
        }
 
 
        @JavascriptInterface
        public void jumpPage(String pageClassName, String paramJson) {
            Intent intent = null;
            JSONObject param = null;
            try {
                if (StringUtils.isEmpty(paramJson)) {
                    param = null;
                } else {
                    param = new JSONObject(paramJson);
                }
                if (StringUtils.isEmpty(pageClassName)) {
                    return;
                } else {
                    intent = new Intent(ChoicenessFreightFreeActivity.this, Class.forName(JumpActivityUtil.filterActivityName(pageClassName)));
                }
            } catch (JSONException e) {
                param = null;
                e.printStackTrace();
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            }
            if (null != param) {
                @SuppressWarnings("unchecked")
                Iterator<String> its = param.keys();
                while (its.hasNext()) {
                    String key = its.next();
                    String value = param.optString(key);
                    intent.putExtra(key, value);
//                    Log.e("mResult", "key--" + key);
//                    Log.e("mResult", "value--" + value);
                }
            }
            startActivity(intent);
        }
 
        @JavascriptInterface
        public void jumpPageWithFinishCurrentPage(String pageClassName, String paramJson) {
            Intent intent = null;
            JSONObject param = null;
            try {
                if (StringUtils.isEmpty(paramJson)) {
                    param = null;
                } else {
                    param = new JSONObject(paramJson);
                }
                if (StringUtils.isEmpty(pageClassName)) {
                    return;
                } else {
                    intent = new Intent(ChoicenessFreightFreeActivity.this, Class.forName(JumpActivityUtil.filterActivityName(pageClassName)));
                }
            } catch (JSONException e) {
                param = null;
                e.printStackTrace();
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            }
            if (null != param) {
                @SuppressWarnings("unchecked")
                Iterator<String> its = param.keys();
                while (its.hasNext()) {
                    String key = its.next();
                    String value = param.optString(key);
                    intent.putExtra(key, value);
                }
            }
            startActivity(intent);
            ChoicenessFreightFreeActivity.this.finish();
        }
 
        @JavascriptInterface
        public void login() {
            UserUtil.jumpLogin(ChoicenessFreightFreeActivity.this);
        }
 
 
        @JavascriptInterface
        public String getRequestBaseParams(String json) {
            LinkedHashMap<String, String> params = new LinkedHashMap<>();
            int version = PackageUtils2.getVersionCode(ChoicenessFreightFreeActivity.this);
            long time = System.currentTimeMillis();
            String deviceType = MobileUtil.getSystemModel();
            if (!StringUtils.isEmpty(json)) {
                JSONObject jsonObject = null;
                try {
                    jsonObject = new JSONObject(json);
                    Iterator<String> iterator = jsonObject.keys();
                    while (iterator.hasNext()) {
                        String key = iterator.next();
                        params.put(key, jsonObject.optString(key));
                    }
                } catch (JSONException e) {
 
                }
            }
            params.put("packages", getPackageName());
            params.put("Version", version + "");
            params.put("appkey", BuXinConstant.TAO_BAO_KE_KEY);
            params.put("platform", "android");
            params.put("uid", getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""));
            params.put("apiversion", "1");
            params.put("channel", GetManifestDataUtil.getAppMetaData(ChoicenessFreightFreeActivity.this, "UMENG_CHANNEL"));
            String imei = MobileUtil.getIMEI(ChoicenessFreightFreeActivity.this);
            if (!StringUtils.isEmpty(imei))
                params.put("imei", imei);
            params.put("osVersion", MobileUtil.getSystemVersion());
            params.put("network", NetUtils.getNetworkState(ChoicenessFreightFreeActivity.this));
            params.put("deviceType", StringUtils.isEmpty(deviceType) ? "" : deviceType);
            params.put("time", time + "");
            params.put("Device", new DeviceUuidFactory(ChoicenessFreightFreeActivity.this).getDeviceUuid() + "");
            Iterator<String> its = params.keySet().iterator();
            List<String> list = new ArrayList<>();
            while (its.hasNext()) {
                String key = its.next();
                Object value = params.get(key);
                list.add(key + "=" + value);
            }
            Collections.sort(list);
            String sign = "";
            for (String str : list) {
                sign += str + "&";
            }
            params.put("sign", MD5Utils.getMD532(sign + "buXiNjie2017!"));
            Gson gson = new Gson();
            String str = gson.toJson(params);
//            Log.e("mResult", str);
            return str;
        }
 
        @JavascriptInterface
        public void hideLoading() {
            tv_top_bar_middle.post(new Runnable() {
                @Override
                public void run() {
                    if (pd != null && pd.isShowing())
                        pd.dismiss();
                }
            });
 
        }
 
        @JavascriptInterface
        public void showLoading() {
            tv_top_bar_middle.post(new Runnable() {
                @Override
                public void run() {
                    if (pd == null) {
                        pd = new ShapeLoadingDialog.Builder(ChoicenessFreightFreeActivity.this).build();
                    }
                    pd.show();
                }
            });
 
        }
 
        @JavascriptInterface
        public void finishPage() {
            tv_top_bar_middle.post(new Runnable() {
                @Override
                public void run() {
                    finish();
                }
            });
        }
 
        @JavascriptInterface
        public void umEventCount(String eventId, String paramsJSON) {
            Map map = JSON.parseObject(paramsJSON);
            MobclickAgent.onEventObject(ChoicenessFreightFreeActivity.this, eventId, map);
        }
 
        @JavascriptInterface
        public void umEventCompute(String eventId, String paramsJSON, int du) {
            Map map = JSON.parseObject(paramsJSON);
            MobclickAgent.onEventValue(ChoicenessFreightFreeActivity.this, eventId, map, du);
        }
 
 
    }
}