| | |
| | | @Resource
|
| | | private UserActiveLogService userActiveLogService;
|
| | |
|
| | | /**
|
| | | /**s
|
| | | * 首页配置信息
|
| | | *
|
| | | * @param acceptData
|
| | |
| | | */
|
| | | @RequestMapping(value = "getHomeConfig", method = RequestMethod.POST)
|
| | | public void getHomeConfig(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | if (uid != null && uid == 0L)
|
| | | uid = null;
|
| | |
|
| | | AppHomeFloatImg appHomeFloatImg = configService.getAppHomeFloatImg();
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && !Constant.IS_TEST) {
|
| | | appHomeFloatImg = null;
|
| | |
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.yeshi.fanli.dto.dataoke.DaTaoKeGoodsResult;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsService;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
|
| | |
| | | subId = null;
|
| | |
|
| | | TaoBaoGoodsBriefExtra goods = null;
|
| | | List<DaTaoKeDetail> detailList = null;
|
| | | List<DaTaoKeDetailV2> detailList = null;
|
| | | if (cid == 1) {
|
| | | detailList = daTaoKeGoodsService.getCurrentHotSalesRankGoodsList();
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_HOT, null);
|
| | | if (result != null)
|
| | | detailList = result.getGoodsList();
|
| | |
|
| | | } else if (cid == 2) {
|
| | | detailList = daTaoKeGoodsService.getCurrentSalesRankGoodsList(subId);
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_TIME, subId);
|
| | | if (result != null)
|
| | | detailList = result.getGoodsList();
|
| | | } else {
|
| | | detailList = daTaoKeGoodsService.getCurrentDaySalesRankGoodsList(subId);
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_DAY, subId);
|
| | | if (result != null)
|
| | | detailList = result.getGoodsList();
|
| | | }
|
| | |
|
| | | if (detailList == null)
|
| | |
| | | List<TaoBaoGoodsBriefExtra> list = new ArrayList<TaoBaoGoodsBriefExtra>();
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | if (detailList != null)
|
| | | for (DaTaoKeDetail detail : detailList) {
|
| | | for (DaTaoKeDetailV2 detail : detailList) {
|
| | | goods = TaoBaoUtil.getTaoBaoGoodsBriefExtra(TaoBaoUtil.convert(detail), proportion.toString(),
|
| | | null);
|
| | | if (cid == 2)
|
| | |
| | | goods.setSalesType(1);
|
| | | list.add(goods);
|
| | | }
|
| | | |
| | |
|
| | | LogHelper.test("最终商品数据:" + list.size());
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", detailList.size());
|
| | |
| | | * 防止请求频率过高
|
| | | *
|
| | | */
|
| | | // if (Constant.IS_OUTNET) {
|
| | | String key = "linkParse-" + acceptData.getDevice() + "-" + id;
|
| | | // if (Constant.IS_OUTNET) {
|
| | | String key = "linkParse-" + acceptData.getDevice() + "-" + id;
|
| | |
|
| | | String value = redisManager.getCommonString(key);
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | out.print(JsonUtil.loadFalseResult(11, "请求频率限制"));
|
| | | return;
|
| | | }
|
| | | redisManager.cacheCommonString(key, "1", 5);// 5s间隔
|
| | | // }
|
| | | String value = redisManager.getCommonString(key);
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | out.print(JsonUtil.loadFalseResult(11, "请求频率限制"));
|
| | | return;
|
| | | }
|
| | | redisManager.cacheCommonString(key, "1", 5);// 5s间隔
|
| | | // }
|
| | | TaoBaoGoodsBrief goods = null;
|
| | | try {
|
| | | goods = redisManager.getTaoBaoGoodsBrief(Long.parseLong(id));
|
| | |
| | | int pageSize = Constant.PAGE_SIZE;
|
| | | JSONArray array = new JSONArray();
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create();
|
| | | if (Constant.IS_TEST) {
|
| | | if (VersionUtil.greaterThan_1_5_70(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | List<TaoBaoGoodsBrief> goodsList = homeRecommendGoodsService.listGoodsByPage(null, acceptData.getDevice(),
|
| | | imei, idfa, page);
|
| | |
|
| | |
| | | }
|
| | |
|
| | | if (page == 1) {
|
| | | List<TLJBuyGoods> list = tljBuyGoodsService
|
| | | .listByDay(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
|
| | | if (list.size() >= 3)
|
| | | list = list.subList(0, 3);
|
| | | if (list.size() > 0)
|
| | | List<TLJBuyGoods> list = homeRecommendGoodsService.getZiGouLiJianHotGoods(acceptData.getDevice());
|
| | | if (list != null && list.size() > 0)
|
| | | for (int i = list.size() - 1; i >= 0; i--) {
|
| | | TLJBuyGoods goods = list.get(i);
|
| | | TaoBaoGoodsBriefExtra extra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(goods.getGoods(),
|
| | |
| | |
|
| | | TaoBaoGoodsBriefExtra extra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(goods,
|
| | | proportion.toString(), "");
|
| | | |
| | |
|
| | | extra.setRecommend(true);
|
| | | goodsList.add(extra);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | } else if (from != null && from.equals("taolijin_buy")) {
|
| | | noRebateHelpLink=configService.get("zigoulijian_nofanli_help");
|
| | | noRebateHelpLink = configService.get("zigoulijian_nofanli_help");
|
| | | // 查询分享库
|
| | | TLJBuyGoods buyGoods = tljBuyGoodsService.selectByAuctionIdAndDay(goods.getAuctionId(),
|
| | | TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
|
| | |
| | |
|
| | | if (goodsList != null && goodsList.size() > 0)
|
| | | goodsList.parallelStream().forEach(goods -> {
|
| | | if (goods != null) {
|
| | | // 获取详情
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = null;
|
| | | try {
|
| | | taoBaoGoodsBrief = taoBaoGoodsCacheUtil.getCommonTaoBaoGoodsInfo(goods.getAuctionId());
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 获取详情
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = null;
|
| | | try {
|
| | | taoBaoGoodsBrief = taoBaoGoodsCacheUtil.getCommonTaoBaoGoodsInfo(goods.getAuctionId());
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | if (taoBaoGoodsBrief == null) {
|
| | | TaoBaoGoodsBrief newGoods = TaoKeApiUtil.specialConvertCoupon(goods.getAuctionId(), app);
|
| | | goods.setCouponInfo(newGoods.getCouponInfo());
|
| | | goods.setCouponLink(newGoods.getCouponLink());
|
| | | goods.setTkRate(newGoods.getTkRate());
|
| | | taoBaoGoodsBrief = goods;
|
| | | }
|
| | |
|
| | | if (taoBaoGoodsBrief != null) {
|
| | | listExtra.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), ""));
|
| | | }
|
| | | }
|
| | |
|
| | | if (taoBaoGoodsBrief == null) {
|
| | | TaoBaoGoodsBrief newGoods = TaoKeApiUtil.specialConvertCoupon(goods.getAuctionId(), app);
|
| | | goods.setCouponInfo(newGoods.getCouponInfo());
|
| | | goods.setCouponLink(newGoods.getCouponLink());
|
| | | goods.setTkRate(newGoods.getTkRate());
|
| | | taoBaoGoodsBrief = goods;
|
| | | }
|
| | |
|
| | | if (taoBaoGoodsBrief != null) {
|
| | | listExtra.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), ""));
|
| | | }
|
| | |
|
| | | });
|
| | |
|
| | | List<TaoBaoGoodsBrief> listQuality = new ArrayList<TaoBaoGoodsBrief>();
|
| | | // 删除推荐
|
| | | //
|
| | | // try {
|
| | | // List<QualityFactory> listRecommend =
|
| | | // qualityGoodsService.recommendByAuctionId(id);
|
| | | //
|
| | | // if (listRecommend != null && listRecommend.size() > 1) {
|
| | | // for (QualityFactory quality : listRecommend) {
|
| | | //
|
| | | // TaoBaoGoodsBrief taoBaoGoodsBrief = quality.getTaoBaoGoodsBrief();
|
| | | // if (taoBaoGoodsBrief == null) {
|
| | | // continue;
|
| | | // }
|
| | | //
|
| | | // int biz30day = taoBaoGoodsBrief.getBiz30day();
|
| | | // if (biz30day >= 10000) {
|
| | | // double sales = biz30day;
|
| | | // String salesCountMidea = String.format("%.1f", sales / 10000);
|
| | | // taoBaoGoodsBrief.setSalesCount(salesCountMidea + "万");
|
| | | // } else {
|
| | | // taoBaoGoodsBrief.setSalesCount(biz30day + "");
|
| | | // }
|
| | | //
|
| | | // // 改变图片尺寸
|
| | | // String pictUrl = taoBaoGoodsBrief.getPictUrl();
|
| | | // if (!StringUtil.isNullOrEmpty(pictUrl) &&
|
| | | // !pictUrl.contains("320x320")) {
|
| | | // taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize320Img(pictUrl));
|
| | | // }
|
| | | //
|
| | | // listQuality.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief,
|
| | | // proportion.toString(), null));
|
| | | // }
|
| | | // }
|
| | | // } catch (Exception e2) {
|
| | | // e2.printStackTrace();
|
| | | // }
|
| | |
|
| | | // 取偶数个数据
|
| | | if (listExtra.size() % 2 != 0) {
|
| | |
| | | import java.util.ArrayList;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.concurrent.ConcurrentHashMap;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | |
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dto.dataoke.DaTaoKeGoodsResult;
|
| | | import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.service.inter.goods.recommend.HomeRecommendGoodsService;
|
| | | import com.yeshi.fanli.service.inter.goods.recommend.RecommendGoodsDeleteHistoryService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TLJBuyGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private EhCacheCacheManager ehCacheCacheManager;
|
| | |
|
| | | @Resource
|
| | | private TLJBuyGoodsService tljBuyGoodsService;
|
| | |
|
| | | @Override
|
| | | public List<TaoBaoGoodsBrief> listGoodsByPage(Long uid, String device, String imei, String idfa, int page) {
|
| | |
| | | if (fList != null && fList.size() > 0)
|
| | | return fList;
|
| | |
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(type);
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(type, null);
|
| | | List<DaTaoKeDetailV2> list = result.getGoodsList();
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | if (list != null)
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<TLJBuyGoods> getZiGouLiJianHotGoods(String device) {
|
| | |
|
| | | String name = "recommendUserCache";
|
| | | String key = "getZiGouLiJianHotGoods-" + StringUtil.Md5(device);
|
| | | List<TLJBuyGoods> fList = getCacheObjList(name, key, TLJBuyGoods.class);
|
| | | if (fList != null && fList.size() > 0)
|
| | | return fList;
|
| | |
|
| | | List<TLJBuyGoods> list = tljBuyGoodsService
|
| | | .listByDay(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
|
| | | List<TaoBaoGoodsBrief> finalList = new ArrayList<>();
|
| | | Map<Long, TLJBuyGoods> map = new ConcurrentHashMap<>();
|
| | | if (list != null)
|
| | | for (TLJBuyGoods goods : list) {
|
| | | map.put(goods.getGoods().getAuctionId(), goods);
|
| | | finalList.add(goods.getGoods());
|
| | | }
|
| | |
|
| | | finalList = recommendGoodsDeleteHistoryService.filterGoods(device, finalList);
|
| | |
|
| | | if (finalList != null && finalList.size() > 0) {
|
| | | Collections.shuffle(finalList);
|
| | | if (finalList.size() >= 3)
|
| | | finalList = finalList.subList(0, 3);
|
| | | list = new ArrayList<>();
|
| | | for (TaoBaoGoodsBrief goods : finalList) {
|
| | | list.add(map.get(goods.getAuctionId()));
|
| | | }
|
| | | // 缓存
|
| | | if (list.size() > 0) {
|
| | | saveObjList(list, name, key);
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | if (name == null || name.trim().length() == 0) {
|
| | | throw new SpecialException(1, "专题名称不能为空");
|
| | | }
|
| | | |
| | |
|
| | | Integer sex = record.getSex();
|
| | | if (sex == null) {
|
| | | throw new SpecialException(1, "性别不能为空");
|
| | | }
|
| | | |
| | |
|
| | | String params = record.getParams();
|
| | | if (params == null || params.trim().length() == 0 || "null".equalsIgnoreCase(params)) {
|
| | | record.setParams(null);
|
| | |
| | | throw new SpecialException(1, "跳转参数非JSON格式");
|
| | | }
|
| | |
|
| | | |
| | | |
| | | if (!StringUtil.isNullOrEmpty(jumpType)) {
|
| | | List<JumpDetailV2> listByType = jumpDetailV2Service.listByType(jumpType);
|
| | | if (listByType != null && listByType.size() > 0) {
|
| | |
| | | record.setIcon(icon);
|
| | | record.setPicture(picture);
|
| | | record.setSubPicture(subPicture);
|
| | | |
| | |
|
| | | // 排序
|
| | | record.setOrderby(specialMapper.getDefaultMaxOrder(cardId) + 1);
|
| | | record.setOrderMan(specialMapper.getManMaxOrder(cardId) + 1);
|
| | | record.setOrderWoman(specialMapper.getWomanMaxOrder(cardId) + 1);
|
| | | |
| | |
|
| | | record.setCreatetime(new Date());
|
| | | record.setUpdatetime(new Date());
|
| | | specialMapper.insert(record);
|
| | |
|
| | | Special s = new Special();
|
| | | s.setId(record.getId());
|
| | | s.setOrderby(Integer.parseInt(s.getId() + ""));
|
| | | s.setOrderMan(Integer.parseInt(s.getId() + ""));
|
| | | s.setOrderWoman(Integer.parseInt(s.getId() + ""));
|
| | | specialMapper.updateByPrimaryKeySelective(s);
|
| | | } else {
|
| | | // 修改
|
| | | Special resultObj = specialMapper.selectByPrimaryKey(id);
|
| | |
| | | } else {
|
| | | record.setIcon(resultObj.getIcon());
|
| | | }
|
| | | |
| | |
|
| | | record.setOrderby(resultObj.getOrderby());
|
| | | record.setOrderMan(resultObj.getOrderMan());
|
| | | record.setOrderWoman(resultObj.getOrderWoman());
|
| | | record.setCreatetime(resultObj.getCreatetime());
|
| | | |
| | |
|
| | | record.setUpdatetime(new Date());
|
| | | specialMapper.updateByPrimaryKey(record);
|
| | | }
|
| | |
| | | if (exchangeObject == null) {
|
| | | throw new SpecialException(1, "没有找到可交换的位置");
|
| | | }
|
| | | |
| | |
|
| | | resultObj.setOrderby(exchangeObject.getOrderby());
|
| | | exchangeObject.setOrderby(orderby);
|
| | | } else if (Special.SEX_MAN == sex ) {
|
| | | } else if (Special.SEX_MAN == sex) {
|
| | | Integer orderMan = resultObj.getOrderMan();
|
| | | exchangeObject = specialMapper.getOrderByCardID(cardId, moveType, orderMan, sex);
|
| | | if (exchangeObject == null) {
|
| | | throw new SpecialException(1, "没有找到可交换的位置");
|
| | | }
|
| | | |
| | |
|
| | | resultObj.setOrderMan(exchangeObject.getOrderMan());
|
| | | exchangeObject.setOrderMan(orderMan);
|
| | | } else if (Special.SEX_WOMAN == sex ) {
|
| | | } else if (Special.SEX_WOMAN == sex) {
|
| | | Integer orderWoman = resultObj.getOrderWoman();
|
| | | exchangeObject = specialMapper.getOrderByCardID(cardId, moveType, orderWoman, sex);
|
| | | |
| | |
|
| | | if (exchangeObject == null) {
|
| | | throw new SpecialException(1, "没有找到可交换的位置");
|
| | | }
|
| | | |
| | |
|
| | | resultObj.setOrderWoman(exchangeObject.getOrderWoman());
|
| | | exchangeObject.setOrderWoman(orderWoman);
|
| | | } else {
|
| | | throw new SpecialException(1, "sex参数不正确");
|
| | | }
|
| | | |
| | |
|
| | | specialMapper.updateByPrimaryKey(resultObj);
|
| | | specialMapper.updateByPrimaryKey(exchangeObject);
|
| | | }
|
| | |
| | |
|
| | | // 首页-5圆形2排区域
|
| | | JSONObject arcMap = new JSONObject();
|
| | | |
| | |
|
| | | String indexArc = "index_arc";
|
| | | if (VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (VersionUtil.greaterThan_1_5_70(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | indexArc = "index_arc_1.5.7";
|
| | | else if (VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | indexArc = "index_arc_1.5.6";
|
| | |
|
| | | List<Special> listArc = specialMapper.listByPlaceKey(indexArc, sex);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | // 品牌券
|
| | | // >=1.5.40后的版本可以用
|
| | | if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 39)
|
| | |
| | | tljBuyGoodsDao.save(goods);
|
| | | }
|
| | |
|
| | | @Cacheable(value = "commonContentCache", key = "'listByDay'+#day")
|
| | | @Cacheable(value = "commonContentCache", key = "'tljBuy-listByDay'+#day")
|
| | | @Override
|
| | | public List<TLJBuyGoods> listByDay(String day) {
|
| | | return listByDay(day, 10);
|
| | |
| | | @Override
|
| | | public List<DaTaoKeDetailV2> listPreTLJBuyGoods(int page) {
|
| | | if (page == 1) {
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_DAY);
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getRankingList(DaTaoKeApiUtil.RANK_TYPE_DAY, null);
|
| | | List<DaTaoKeDetailV2> goodsList = new ArrayList<>();
|
| | | for (DaTaoKeDetailV2 v2 : result.getGoodsList()) {
|
| | | BigDecimal commision = MoneyBigDecimalUtil
|
| | |
| | | private HistorySearchMapper historySearchMapper;
|
| | |
|
| | | public void addHistorySearch(String searchKey, String bid) {
|
| | | searchKey = searchKey != null && searchKey.length() > 64 ? searchKey.substring(0, 64) : searchKey;
|
| | | HistorySearch historySearch = new HistorySearch();
|
| | | historySearch.setName(searchKey);
|
| | | historySearch.setBusinessId(bid);
|
| | |
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | |
|
| | | /**
|
| | |
| | | * @param page
|
| | | * @return
|
| | | */
|
| | | public List<TaoBaoGoodsBrief> listGoodsByPage(Long uid, String device,String imei,String idfa, int page);
|
| | | public List<TaoBaoGoodsBrief> listGoodsByPage(Long uid, String device, String imei, String idfa, int page);
|
| | |
|
| | | /**
|
| | | * 获取自购立减热门商品
|
| | | * |
| | | * @param device
|
| | | * @return
|
| | | */
|
| | | public List<TLJBuyGoods> getZiGouLiJianHotGoods(String device);
|
| | |
|
| | | }
|
| | |
| | | else
|
| | | return false;
|
| | | }
|
| | | |
| | | |
| | | public static boolean greaterThan_1_5_70(String platform, String versionCode) {
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 45))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 56)))
|
| | | return true;
|
| | | else
|
| | | return false;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | public static boolean smallerThan_1_5_1(String platform, String versionCode) {
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) < 36))
|
| | |
| | | taoBaoShopDTO.setBrandId(item.optString("brand_id"));
|
| | | taoBaoShopDTO.setBrandDes(item.optString("brand_des"));
|
| | | taoBaoShopDTO.setUserType(0);
|
| | | |
| | |
|
| | | // 商品信息
|
| | | taoBaoShopDTO = getDynamicShopGoods(brandId, taoBaoShopDTO);
|
| | | |
| | |
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | return StringUtil.Md5(signStr).toUpperCase();
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 获取店铺下前4个商品、店铺介绍
|
| | | *
|
| | |
| | | if (brandId == null) {
|
| | | return taoBaoShopDTO;
|
| | | }
|
| | | |
| | |
|
| | | int userType = 0;
|
| | | List<TaoBaoGoodsBrief> listGoods = new ArrayList<TaoBaoGoodsBrief>();
|
| | | |
| | | String result = HttpUtil.get("http://www.dataoke.com/brandGoods?id=" + brandId +"&page=1");
|
| | |
|
| | | String result = HttpUtil.get("http://www.dataoke.com/brandGoods?id=" + brandId + "&page=1");
|
| | | JSONObject json = JSONObject.fromObject(result);
|
| | | JSONArray arrayGoods = json.optJSONArray("goods");
|
| | | |
| | |
|
| | | for (int i = 0; i < arrayGoods.size(); i++) {
|
| | | if (i >= 2) {
|
| | | break;
|
| | | }
|
| | | JSONObject itemGoods = arrayGoods.optJSONObject(i);
|
| | | |
| | |
|
| | | TaoBaoGoodsBrief taoBaoGoods = new TaoBaoGoodsBrief();
|
| | | taoBaoGoods.setAuctionId(itemGoods.optLong("goodsid"));
|
| | | taoBaoGoods.setBiz30day(itemGoods.optInt("xiaoliang"));
|
| | |
| | | taoBaoShopDTO.setListGoods(listGoods);
|
| | | return taoBaoShopDTO;
|
| | | }
|
| | | |
| | |
|
| | | public static int RANK_TYPE_TIME = 1;// 实时
|
| | | public static int RANK_TYPE_DAY = 2;// 全天榜
|
| | |
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public static DaTaoKeGoodsResult getRankingList(int type) {
|
| | | public static DaTaoKeGoodsResult getRankingList(int type, Integer cid) {
|
| | | TaoKeAppInfo app = getRandomApp();
|
| | | DaTaoKeGoodsResult daTaoKeGoodsResult = new DaTaoKeGoodsResult();
|
| | | Map<String, String> params = new TreeMap<>();
|
| | | params.put("version", "v1.0.0");
|
| | | params.put("appKey", app.getAppKey());
|
| | | params.put("rankType", type + "");
|
| | | if (cid != null)
|
| | | params.put("cid", cid + "");
|
| | | params.put("sign", getSign(params, app.getAppSecret()));
|
| | | String result = HttpUtil.get("https://openapi.dataoke.com/api/goods/get-ranking-list", params, new HashMap<>());
|
| | | LogHelper.test("getRankingList:" + result);
|
| | | JSONObject json = JSONObject.fromObject(result);
|
| | | if (json != null) {
|
| | | JSONArray array = json.optJSONArray("data");
|
New file |
| | |
| | | package com.yeshi.fanli.util.pinduoduo;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.script.Invocable;
|
| | | import javax.script.ScriptEngine;
|
| | | import javax.script.ScriptEngineManager;
|
| | |
|
| | | import org.jsoup.Jsoup;
|
| | | import org.jsoup.nodes.Document;
|
| | | import org.jsoup.select.Elements;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class PinDuoDuoUtil {
|
| | |
|
| | | public static List<String> getDetailImages(Long id) {
|
| | | List<String> imgList = new ArrayList<>();
|
| | | try {
|
| | | Document doc = Jsoup.connect("http://yangkeduo.com/goods.html?goods_id="+id)
|
| | | .userAgent(
|
| | | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36")
|
| | | .get();
|
| | | Elements els = doc.getElementsByTag("script");
|
| | | for (int i = 0; i < els.size(); i++) {
|
| | | if (els.get(i).html().contains("window.rawData")) {
|
| | | String dataJS = els.get(i).html().replace("window.", "var ");
|
| | | dataJS += "function getData(){return JSON.stringify(rawData);}";
|
| | |
|
| | | ScriptEngineManager manager = new ScriptEngineManager();
|
| | | ScriptEngine engine = manager.getEngineByName("javascript");
|
| | | try {
|
| | | engine.eval(dataJS);
|
| | | if (engine instanceof Invocable) {
|
| | | Invocable in = (Invocable) engine;
|
| | | String jsonStr = in.invokeFunction("getData").toString();
|
| | | JSONObject json = JSONObject.fromObject(jsonStr);
|
| | | JSONArray array = json.optJSONObject("store").optJSONObject("initDataObj")
|
| | | .optJSONObject("goods").optJSONArray("detailGallery");
|
| | | for (int j = 0; j < array.size(); j++) {
|
| | | imgList.add("http:" + array.optJSONObject(j).optString("url"));
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | return imgList;
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | |
| | | <!-- dos拦截 --> |
| | |
|
| | | <!-- dos拦截 -->
|
| | | <cache name="rsCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | |
| | |
|
| | | <!-- 淘客推荐模块商品缓存 -->
|
| | | <cache name="taoKeMaterialCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | <!-- 淘客物料搜索缓存 -->
|
| | | <cache name="searchWuLiaoCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <!-- 9.9/19.9/29.9/49.9模块商品缓存 -->
|
| | | <cache name="quality9K9Cache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | <!-- 精选库商品查询缓存 -->
|
| | | <cache name="qualityCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | <!-- 标签缓存 -->
|
| | | <cache name="labelCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <!-- 淘宝推荐物料id -->
|
| | | <cache name="taobaoMeterialCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <!-- 混合分类查询缓存 -->
|
| | | <cache name="mergeClassCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <!-- 混合分类查询缓存 -->
|
| | | <cache name="helpCenterCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | |
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <!-- 双11缓存 -->
|
| | | <cache name="s11Cache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | |
| | | <!-- 系统自定义券缓存 -->
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <!-- 系统自定义券缓存 -->
|
| | | <cache name="systemCouponCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" /> |
| | | |
| | | <!--品牌缓存 -->
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <!--品牌缓存 -->
|
| | | <cache name="brandCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | |
| | |
|
| | |
|
| | | <!-- 用户商品推荐仓库缓存 -->
|
| | | <cache name="recommendLibraryCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="3600"
|
| | | timeToLiveSeconds="3600" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | | <cache name="recommendUserCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="600"
|
| | | timeToLiveSeconds="600" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | |
|
| | | <!--动态缓存 -->
|
| | | <cache name="dynamicCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | | |
| | | <!-- 通用模板缓存 --> |
| | |
|
| | | <!-- 通用模板缓存 -->
|
| | | <cache name="commonContentCache" maxElementsInMemory="1000"
|
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | |
|
| | |
|
| | | </ehcache>
|
| | |
| | | <!DOCTYPE html>
|
| | | <html>
|
| | | |
| | | <head>
|
| | | <meta charset="utf-8" />
|
| | | <link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
|
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
| | | <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
| | | <title>新手攻略</title>
|
| | | <!--css-->
|
| | | <link rel="stylesheet" type="text/css" href="css/DOUI.min.css"/>
|
| | | <style type="text/css">
|
| | | /*图片效果*/
|
| | | .imgstyle{ width: 100%; height: auto; display: block; }
|
| | | .animt_img{ animation: imgopc 1s; animation-fill-mode: both; animation-timing-function: ease; }
|
| | | @keyframes imgopc{ 0%{ opacity: 0; } 100%{ opacity: 1; } }
|
| | | /*APP下载*/
|
| | | .homeappwai{ width: 94%; height: 3.5rem; padding: 0 3%; position: fixed; left: 0; bottom: 0.5rem; background-color: rgba(0,0,0,0.75); z-index: 50; color: white; }
|
| | | .homeappimg{ width: 2.5rem; height: 2.5rem; margin-right: 0.3rem; }
|
| | | .homeappgo{ width: 4rem; height: 2rem; border-radius: 1rem; background-color: #E5005C; text-decoration: none; color: white; }
|
| | | </style>
|
| | | <!--js-->
|
| | | <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
|
| | | <script src="https://cdn.bootcss.com/vue/2.5.16/vue.min.js"></script>
|
| | | <script src="js/DOUI.min.js" type="text/javascript" charset="utf-8"></script>
|
| | | </head>
|
| | | |
| | | <body class="displayNone">
|
| | | <div id="allwai" class="allwai font3" style="background-color: #FDD757;">
|
| | | |
| | | <!--图片列表-->
|
| | | <div style="width: 100%; padding-bottom: 5rem; overflow: scroll;">
|
| | | <div style="width: 100%;height: auto;">
|
| | | |
| | | <!--循环添加-->
|
| | | <div v-for="item in imglist" style="width: 100%; height: auto;">
|
| | | <img v-bind:src="item" class="imgstyle animt_img" onclick="return false"/>
|
| | | </div>
|
| | | |
| | |
|
| | | <head>
|
| | | <meta charset="utf-8" />
|
| | | <link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
| | | <meta name="viewport"
|
| | | content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
| | | <title>新手攻略</title>
|
| | | <!--css-->
|
| | | <link rel="stylesheet" type="text/css" href="css/DOUI.min.css" />
|
| | | <style type="text/css">
|
| | | /*图片效果*/
|
| | | .imgstyle {
|
| | | width: 100%;
|
| | | height: auto;
|
| | | display: block;
|
| | | }
|
| | |
|
| | | .animt_img {
|
| | | animation: imgopc 1s;
|
| | | animation-fill-mode: both;
|
| | | animation-timing-function: ease;
|
| | | }
|
| | |
|
| | | @
|
| | | keyframes imgopc { 0%{
|
| | | opacity: 0;
|
| | | }
|
| | |
|
| | | 100%{
|
| | | opacity
|
| | | :
|
| | | |
| | | 1;
|
| | | }
|
| | | }
|
| | | /*APP下载*/
|
| | | .homeappwai {
|
| | | width: 94%;
|
| | | height: 3.5rem;
|
| | | padding: 0 3%;
|
| | | position: fixed;
|
| | | left: 0;
|
| | | bottom: 0.5rem;
|
| | | background-color: rgba(0, 0, 0, 0.75);
|
| | | z-index: 50;
|
| | | color: white;
|
| | | }
|
| | |
|
| | | .homeappimg {
|
| | | width: 2.5rem;
|
| | | height: 2.5rem;
|
| | | margin-right: 0.3rem;
|
| | | }
|
| | |
|
| | | .homeappgo {
|
| | | width: 4rem;
|
| | | height: 2rem;
|
| | | border-radius: 1rem;
|
| | | background-color: #E5005C;
|
| | | text-decoration: none;
|
| | | color: white;
|
| | | }
|
| | | </style>
|
| | | <!--js-->
|
| | | <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
|
| | | <script src="https://cdn.bootcss.com/vue/2.5.16/vue.min.js"></script>
|
| | | <script src="js/DOUI.min.js" type="text/javascript" charset="utf-8"></script>
|
| | | </head>
|
| | |
|
| | | <body class="displayNone">
|
| | | <div id="allwai" class="allwai font3"
|
| | | style="background-color: #FDD757;">
|
| | |
|
| | | <!--图片列表-->
|
| | | <div style="width: 100%; padding-bottom: 5rem; overflow: scroll;">
|
| | | <div style="width: 100%; height: auto;">
|
| | |
|
| | | <!--循环添加-->
|
| | | <div v-for="item in imglist" style="width: 100%; height: auto;">
|
| | | <img v-bind:src="item" class="imgstyle animt_img"
|
| | | onclick="return false" />
|
| | | </div>
|
| | |
|
| | | </div>
|
| | | |
| | | <!--APP下载卡片-->
|
| | | <div v-if="inapp=='false'||inapp==false" class="homeappwai fboxRow Ycenter">
|
| | | <img class="homeappimg" src="img/list_load.png"/>
|
| | | <div>不只领优惠券,APP客户端还返利</div>
|
| | | <div class="flex1"></div>
|
| | | <a class="homeappgo fboxRow Xcenter Ycenter" href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate">下载</a>
|
| | | </div>
|
| | | |
| | | </div>
|
| | | </body>
|
| | | |
| | | <script type="text/javascript">
|
| | | |
| | | $("body").addClass("displayNone");
|
| | | |
| | | //======================== 页面数据 ================================
|
| | | //数据请求接口
|
| | | var https = "http://flq.yeshitv.com";
|
| | | |
| | | //图片内容信息
|
| | | var imgdata = {
|
| | | inapp: true, //是否在app内部打开
|
| | | id: null, //攻略id
|
| | | imglist: [], //图片列表
|
| | | };
|
| | | |
| | | //图片数据vue实例化
|
| | | var alldata = new Vue({
|
| | | el: "#allwai",
|
| | | data: imgdata,
|
| | | //创建完毕
|
| | | created: function () { $("body").removeClass("displayNone"); },
|
| | | //数据节点渲染完毕
|
| | | updated: function () { var num_all = $('img').length; console.log("图片总张数:"+num_all); },
|
| | | }); |
| | | |
| | | //获取地址栏传递参数
|
| | | var urldata = doui.urlParamGet();
|
| | | //获取攻略id
|
| | | if (urldata.id) { imgdata.id = urldata.id; }
|
| | | else { doui.showToast("未获取到攻略id"); }
|
| | | //是否在app内部打开
|
| | | if (urldata.inApp) { imgdata.inapp = urldata.inApp; }
|
| | | |
| | | |
| | | |
| | | //======================== 数据请求 ================================
|
| | | imglistGet();
|
| | | function imglistGet ()
|
| | | {
|
| | | doui.showLoading("获取攻略");
|
| | | //发送数据准备 |
| | | var myurl = "../../api/h5/v1/strategy/strategyPicture";
|
| | | var mydata = doui.AjaxData({
|
| | | id: imgdata.id,
|
| | | });
|
| | | //发起请求
|
| | | $.get({ url:myurl, data:{id: imgdata.id}, success: function(res){
|
| | | res=JSON.parse(res);
|
| | |
|
| | | <!--APP下载卡片-->
|
| | | <div v-if="inapp=='false'||inapp==false"
|
| | | class="homeappwai fboxRow Ycenter">
|
| | | <img class="homeappimg" src="img/list_load.png" />
|
| | | <div>不只领优惠券,APP客户端还返利</div>
|
| | | <div class="flex1"></div>
|
| | | <a class="homeappgo fboxRow Xcenter Ycenter"
|
| | | href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate">下载</a>
|
| | | </div>
|
| | |
|
| | | </div>
|
| | | </body>
|
| | |
|
| | | <script type="text/javascript">
|
| | | function copyLink() {
|
| | | var href = window.location.href;
|
| | | yestv.copyText(href);
|
| | | yestv.toast("链接已复制到剪贴板");
|
| | | }
|
| | |
|
| | | try {
|
| | | var array = new Array();
|
| | | array.push({
|
| | | icon : 'http://img.flqapp.com/resource/icon_share.png',
|
| | | name : '复制链接',
|
| | | js : 'copyLink()'
|
| | | });
|
| | | yestv.addMenu(JSON.stringify(array));
|
| | | } catch (e) {
|
| | | }
|
| | |
|
| | | $("body").addClass("displayNone");
|
| | |
|
| | | //======================== 页面数据 ================================
|
| | | //数据请求接口
|
| | | var https = "http://flq.yeshitv.com";
|
| | |
|
| | | //图片内容信息
|
| | | var imgdata = {
|
| | | inapp : true, //是否在app内部打开
|
| | | id : null, //攻略id
|
| | | imglist : [], //图片列表
|
| | | };
|
| | |
|
| | | //图片数据vue实例化
|
| | | var alldata = new Vue({
|
| | | el : "#allwai",
|
| | | data : imgdata,
|
| | | //创建完毕
|
| | | created : function() {
|
| | | $("body").removeClass("displayNone");
|
| | | },
|
| | | //数据节点渲染完毕
|
| | | updated : function() {
|
| | | var num_all = $('img').length;
|
| | | console.log("图片总张数:" + num_all);
|
| | | },
|
| | | });
|
| | |
|
| | | //获取地址栏传递参数
|
| | | var urldata = doui.urlParamGet();
|
| | | //获取攻略id
|
| | | if (urldata.id) {
|
| | | imgdata.id = urldata.id;
|
| | | } else {
|
| | | doui.showToast("未获取到攻略id");
|
| | | }
|
| | | //是否在app内部打开
|
| | | if (urldata.inApp) {
|
| | | imgdata.inapp = urldata.inApp;
|
| | | }
|
| | |
|
| | | //======================== 数据请求 ================================
|
| | | imglistGet();
|
| | | function imglistGet() {
|
| | | doui.showLoading("获取攻略");
|
| | | //发送数据准备
|
| | | var myurl = "../../api/h5/v1/strategy/strategyPicture";
|
| | | var mydata = doui.AjaxData({
|
| | | id : imgdata.id,
|
| | | });
|
| | | //发起请求
|
| | | $.get({
|
| | | url : myurl,
|
| | | data : {
|
| | | id : imgdata.id
|
| | | },
|
| | | success : function(res) {
|
| | | res = JSON.parse(res);
|
| | | doui.hideLoading();
|
| | | if (res.code != 0) { doui.showToast(res.msg); }
|
| | | if (res.code != 0) {
|
| | | doui.showToast(res.msg);
|
| | | }
|
| | | //向图片组中添加数据
|
| | | else { imgdata.imglist = res.data; }
|
| | | }}); |
| | | }
|
| | | |
| | | |
| | | </script>
|
| | | |
| | | else {
|
| | | imgdata.imglist = res.data;
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | </script>
|
| | |
|
| | | </html>
|