Esempio n. 1
0
 /**
  * 组菜-可做菜
  *
  * @param selectedKeys
  */
 public static void onEventGarnishRecipe(String selectedKeys, String count) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_GARNISH_KEY_INGREDIENT, selectedKeys);
   keys.put(LOG_ZHUGE.EV_GARNISH_KEY_RECIPE_COUNT, count);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_GARNISH_RECIPE, new JSONObject(keys));
 }
Esempio n. 2
0
 public static void onEventDishRecommendBanner(String name) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_DISH_RECOMMEND_KEY_NAME, name);
   ZhugeSDK.getInstance()
       .onEvent(
           BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_RECOMMEND_BANNER, new JSONObject(keys));
 }
Esempio n. 3
0
 public static void onEventSearchTag(String tag) {
   LogGather.setLogMarker(LogGather.MARK.DURATION_EVENT, LOG_ZHUGE.EV_SEARCH_DO);
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_SEARCH_DO_KEY_HOT_TAG, tag);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_SEARCH_DO, new JSONObject(keys));
 }
Esempio n. 4
0
 public static void onEventSearchResult(String name, int pos) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_SEARCH_DO_KEY_USER_INPUT, name);
   keys.put(LOG_ZHUGE.EV_SEARCH_KEY_POSITION, pos);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_SEARCH_RESULT, new JSONObject(keys));
 }
Esempio n. 5
0
 public static void onEventDishOrderDetailCancel(String reason) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put("取消原因", reason);
   ZhugeSDK.getInstance()
       .onEvent(
           BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_ORDER_DETAIL_CANCEL, new JSONObject(keys));
 }
Esempio n. 6
0
 public static void onEventDishPayListDo(String payName, String msg) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put("支付类型", payName);
   keys.put("支付状态", msg);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_PAY_DO, new JSONObject(keys));
 }
Esempio n. 7
0
 public static void onEventDishOrderDetailPay(String msg) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put("支付状态", msg);
   ZhugeSDK.getInstance()
       .onEvent(
           BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_ORDER_DETAIL_PAY, new JSONObject(keys));
 }
Esempio n. 8
0
 /** 上传菜谱-发布 */
 public static void onEventPublish(boolean success, String message) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_PUBLISH_KEY_STATE, success);
   keys.put(LOG_ZHUGE.EV_PUBLISH_KEY_MSG, message);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_PUBLISH_DO, new JSONObject(keys));
 }
Esempio n. 9
0
 public static void onEventSearchSuggestion(String name, int pos) {
   LogGather.setLogMarker(LogGather.MARK.DURATION_EVENT, LOG_ZHUGE.EV_SEARCH_DO);
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_SEARCH_DO_KEY_USER_INPUT, name);
   keys.put(LOG_ZHUGE.EV_SEARCH_KEY_POSITION, pos);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_SEARCH_SUGGESTION, new JSONObject(keys));
 }
Esempio n. 10
0
 /**
  * 标签-分类-项-点击
  *
  * @param type
  * @param name
  */
 public static void onEventTagSelect(String type, String name) {
   setLogMarker(MARK.DURATION_EVENT, LOG_ZHUGE.EV_TAG_RECIPE);
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_TAG_SELECT_KEY_TYPE, type);
   keys.put(LOG_ZHUGE.EV_TAG_KEY_NAME, name);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_TAG_SELECT, new JSONObject(keys));
 }
Esempio n. 11
0
  /**
   * 标签-首页
   *
   * @param tag
   */
  public static void onEventTagRecommend(String tag) {
    setLogMarker(MARK.DURATION_EVENT, LOG_ZHUGE.EV_TAG_RECIPE);

    Map<String, Object> keys = new HashMap<String, Object>();
    keys.put(LOG_ZHUGE.EV_TAG_KEY_NAME, tag);
    ZhugeSDK.getInstance()
        .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_TAG_RECOMMEND, new JSONObject(keys));
  }
Esempio n. 12
0
 /**
  * 组菜-搜索
  *
  * @param keyword
  * @param success
  */
 public static void onEventGarnishSearch(String keyword, String selectedKeys, boolean success) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_GARNISH_KEY_INGREDIENT, selectedKeys);
   keys.put(LOG_ZHUGE.EV_GARNISH_SEARCH_KEY_INPUT, keyword);
   keys.put(LOG_ZHUGE.EV_GARNISH_SEARCH_KEY_STATE, success);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_GARNISH_SEARCH, new JSONObject(keys));
 }
Esempio n. 13
0
 public static void onEventDishOrderCheckDo(String msg) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put("创建订单状态", msg);
   ZhugeSDK.getInstance()
       .onEvent(
           BaseApp.getApplication(),
           LOG_ZHUGE.EV_DISH_ORDER_CHECK_DO_CREATE,
           new JSONObject(keys));
 }
Esempio n. 14
0
 /**
  * 晒厨艺-打分
  *
  * @param score
  */
 public static void onEventCookShowScore(String name, Integer score, boolean success, String msg) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_COOKSHOW_KEY_NAME, name);
   keys.put(LOG_ZHUGE.EV_COOKSHOW_SCORE_NUMBER, score);
   keys.put(LOG_ZHUGE.EV_COOKSHOW_KEY_STATE, success);
   keys.put(LOG_ZHUGE.EV_COOKSHOW_KEY_MSG, msg);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_COOKSHOW_SCORE, new JSONObject(keys));
 }
Esempio n. 15
0
 public static void onEventLoginReqVerityCode(String phone, String msg) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put("手机号", phone);
   keys.put("时间", System.currentTimeMillis());
   keys.put("接口状态", msg);
   ZhugeSDK.getInstance()
       .onEvent(
           BaseApp.getApplication(), LOG_ZHUGE.EV_LOGIN_REQ_VERITY_CODE, new JSONObject(keys));
 }
Esempio n. 16
0
  /**
   * 收藏
   *
   * @param type
   * @param favorable
   */
  public static void onEventFav(String type, Favorable favorable) {
    if (favorable != null) {
      if (FavoriteApi.TYPE_PARTY.equals(type)) {
        if (favorable instanceof Party) {
          Map<String, Object> keys = new HashMap<String, Object>();
          keys.put(LOG_ZHUGE.EV_PARTY_KEY_NAME, ((Party) favorable).getTitle());
          keys.put(LOG_ZHUGE.EV_PARTY_KEY_STATE, favorable.isFav());
          ZhugeSDK.getInstance()
              .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_PARTY_FAV, new JSONObject(keys));
        }
      } else if (FavoriteApi.TYPE_RECIPE.equals(type)) {
        if (favorable instanceof Food) {
          if (favorable.isFav()) {
            // 添加收藏
            Map<String, String> keys = new HashMap<String, String>();
            keys.put(LogConstant.KEY_NAME, ((Food) favorable).title);
            MobclickAgent.onEvent(
                BaseApp.getApplication(), LogConstant.UBS_RECIPELIST_DO_LIKE_COUNT, keys);
          } else {
            // 取消收藏
            Map<String, String> keys = new HashMap<String, String>();
            keys.put(LogConstant.KEY_NAME, ((Food) favorable).title);
            MobclickAgent.onEvent(
                BaseApp.getApplication(), LogConstant.UBS_RECIPELIST_DO_UNLIKE_COUNT, keys);
          }

          Map<String, Object> keys = new HashMap<String, Object>();
          keys.put(LOG_ZHUGE.EV_RECIPE_KEY_NAME, ((Food) favorable).title);
          keys.put(LOG_ZHUGE.EV_RECIPE_KEY_STATE, favorable.isFav());
          ZhugeSDK.getInstance()
              .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_RECIPE_FAV, new JSONObject(keys));
        }
      } else if (FavoriteApi.TYPE_TOPIC.equals(type)) {
        if (favorable instanceof Topic) {
          Map<String, Object> keys = new HashMap<String, Object>();
          keys.put(LOG_ZHUGE.EV_TOPIC_KEY_NAME, ((Topic) favorable).getTitle());
          keys.put(LOG_ZHUGE.EV_TOPIC_KEY_STATE, favorable.isFav());
          ZhugeSDK.getInstance()
              .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_TOPIC_FAV, new JSONObject(keys));
        }
      }
    }
  }
Esempio n. 17
0
 /**
  * 晒厨艺-发布
  *
  * @param success
  * @param msg
  */
 public static void onEventCookShowPublish(boolean success, String msg) {
   if (success) {
     MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.COOK_ACTION_PUBLISH);
   }
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put(LOG_ZHUGE.EV_COOKSHOW_KEY_STATE, success);
   keys.put(LOG_ZHUGE.EV_COOKSHOW_KEY_MSG, msg);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_COOKSHOW_PUBLISH, new JSONObject(keys));
 }
Esempio n. 18
0
 /**
  * 评论
  *
  * @param type
  * @param data
  * @param success
  */
 public static void onEventComment(String type, Object data, boolean success) {
   if (data != null) {
     if (CommentApi.TYPE_EVENTS.equals(type)) {
       if (data instanceof Party) {
         Map<String, Object> keys = new HashMap<String, Object>();
         keys.put(LOG_ZHUGE.EV_PARTY_KEY_NAME, ((Party) data).getTitle());
         keys.put(LOG_ZHUGE.EV_PARTY_KEY_STATE, success);
         ZhugeSDK.getInstance()
             .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_PARTY_COMMENT, new JSONObject(keys));
       }
     } else if (CommentApi.TYPE_TOPIC.equals(type)) {
       if (data instanceof String) {
         Map<String, Object> keys = new HashMap<String, Object>();
         keys.put(LOG_ZHUGE.EV_TOPIC_KEY_NAME, data);
         keys.put(LOG_ZHUGE.EV_TOPIC_KEY_STATE, success);
         ZhugeSDK.getInstance()
             .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_TOPIC_COMMENT, new JSONObject(keys));
       }
     } else if (CommentApi.TYPE_RECIPE.equals(type)) {
       if (data instanceof String) {
         Map<String, Object> keys = new HashMap<String, Object>();
         keys.put(LOG_ZHUGE.EV_RECIPE_KEY_NAME, data);
         keys.put(LOG_ZHUGE.EV_RECIPE_KEY_STATE, success);
         ZhugeSDK.getInstance()
             .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_RECIPE_COMMENT, new JSONObject(keys));
       }
     } else if (CommentApi.TYPE_COOKING.equals(type)) {
       String title = "";
       if (data instanceof CookShow) {
         title = ((CookShow) data).getTitle();
       } else if (data instanceof String) {
         title = (String) data;
       }
       Map<String, Object> keys = new HashMap<String, Object>();
       keys.put(LOG_ZHUGE.EV_COOKSHOW_KEY_NAME, title);
       keys.put(LOG_ZHUGE.EV_COOKSHOW_KEY_STATE, success);
       ZhugeSDK.getInstance()
           .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_COOKSHOW_COMMENT, new JSONObject(keys));
     }
   }
 }
Esempio n. 19
0
  /** 晒厨艺-入口 */
  public static void onEventCookShowIn() {
    Object from = getLogMarker(MARK.FROM);
    if (from != null) {
      Map<String, Object> keys = new HashMap<String, Object>();
      keys.put(LOG_ZHUGE.EV_COOKSHOW_GOIN_KEY_FROM, from);
      ZhugeSDK.getInstance()
          .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_COOKSHOW_GOIN, new JSONObject(keys));

      if ("功能快捷区".equals(from)) {
        MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.RECOMMEND_COOKSHOW_CLICK);
      } else if ("首页晒厨艺".equals(from)) {
        MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.COOK_RECOMMEND_DO);
      }
    }
  }
Esempio n. 20
0
  /** 上传菜谱-入口 */
  public static void onEventPublishIn() {
    Object from = getLogMarker(MARK.FROM);
    if (from != null) {
      Map<String, Object> keys = new HashMap<String, Object>();
      keys.put(LOG_ZHUGE.EV_PUBLISH_GOIN_KEY_FROM, from);
      ZhugeSDK.getInstance()
          .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_PUBLISH_GOIN, new JSONObject(keys));

      if ("快捷区".equals(from)) {
        MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.RECOMMEND_NEW_RECIPE_CLICK);
      } else if ("我的菜谱".equals(from)) {
        MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.NEW_RECIPE_MYRECIPE_ENTER);
      } else if ("精品菜谱".equals(from)) {
        MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.NEW_RECIPE_RECOMMEND_ENTER);
      }
    }
  }
Esempio n. 21
0
  /** 组菜-入口 */
  public static void onEventGarnishIn() {
    Object from = getLogMarker(MARK.FROM);
    if (from != null) {
      Map<String, Object> keys = new HashMap<String, Object>();
      keys.put(LOG_ZHUGE.EV_GARNISH_GOIN_KEY_FROM, from);
      ZhugeSDK.getInstance()
          .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_GARNISH_GOIN, new JSONObject(keys));

      if ("快捷区".equals(from)) {
        MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.RECOMMEND_GARNISH_CLICK);
      } else if ("厨房".equals(from)) {
        Map<String, String> map = new HashMap<String, String>();
        map.put(LogConstant.KEY_TO, LogConstant.TO_INSPIRE_SEARCH);
        MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.UBS_KITCHEN_ENTER_COUNT, map);
      }
    }
  }
Esempio n. 22
0
  /**
   * 组菜-搜索结果点击
   *
   * @param name
   * @param itemPos
   */
  public static void onEventGarnishSearchResult(
      String keyword, String selectedKeys, String name, int itemPos) {
    Map<String, Object> keys = new HashMap<String, Object>();
    keys.put(LOG_ZHUGE.EV_GARNISH_SEARCH_KEY_INPUT, keyword);
    keys.put(LOG_ZHUGE.EV_GARNISH_KEY_INGREDIENT, selectedKeys);
    keys.put(LOG_ZHUGE.EV_GARNISH_SEARCH_RESULT_KEY_NAME, name);
    keys.put(LOG_ZHUGE.EV_GARNISH_SEARCH_RESULT_KEY_POSITION, itemPos);
    ZhugeSDK.getInstance()
        .onEvent(
            BaseApp.getApplication(), LOG_ZHUGE.EV_GARNISH_SEARCH_RESULT, new JSONObject(keys));

    Map<String, String> map = new HashMap<String, String>();
    map.put(LogConstant.KEY_FROM, LogConstant.FROM_INGREIDENT_SEARCH);
    map.put(LogConstant.KEY_NAME, name);
    map.put(LogConstant.KEY_INDEX, itemPos + "");
    MobclickAgent.onEvent(
        BaseApp.getApplication(), LogConstant.UBS_KITCHEN_GUIDEDSEARCH_ADD_COUNT, map);
  }
Esempio n. 23
0
 /** 我-我的菜谱 */
 public static void onEventMyRecipe() {
   MobclickAgent.onEvent(BaseApp.getApplication(), LogConstant.NEW_RECIPE_HOME_MYRECIPE);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_MY_RECIPE, new JSONObject());
 }
Esempio n. 24
0
 /** 我-我的厨艺 */
 public static void onEventMyCookShow() {
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_MY_COOK_SHOW, new JSONObject());
 }
Esempio n. 25
0
 /** 我-订单-退款 */
 public static void onEventMyOrderRefund() {
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_MY_ORDER_REUND, new JSONObject());
 }
Esempio n. 26
0
 /** 我-订单-待评价 */
 public static void onEventMyOrderNoEvaluate() {
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_MY_ORDER_NO_EVALUATE, new JSONObject());
 }
Esempio n. 27
0
 public static void onEventDishOrderListDetail() {
   ZhugeSDK.getInstance().onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_ORDER_LIST_DETAIL);
 }
Esempio n. 28
0
 public static void onEventDishOrderListGot(String msg) {
   Map<String, Object> keys = new HashMap<String, Object>();
   keys.put("状态", msg);
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_ORDER_LIST_GOT, new JSONObject(keys));
 }
Esempio n. 29
0
 public static void onEventDishOrderListEvaluate() {
   ZhugeSDK.getInstance().onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_ORDER_LIST_EVALUTE);
 }
Esempio n. 30
0
 public static void onEventDishShopCartGoRestaurant() {
   ZhugeSDK.getInstance()
       .onEvent(BaseApp.getApplication(), LOG_ZHUGE.EV_DISH_SHOP_CART_GO_RESTAURANT);
 }