| | |
| | | @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)
|
| | |
| | | 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(),
|
| | |
| | |
|
| | | if (goodsList != null && goodsList.size() > 0)
|
| | | goodsList.parallelStream().forEach(goods -> {
|
| | |
|
| | | if (goods != null) {
|
| | | // 获取详情
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = null;
|
| | | try {
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | throw new SpecialException(1, "跳转参数非JSON格式");
|
| | | }
|
| | |
|
| | | |
| | | |
| | | if (!StringUtil.isNullOrEmpty(jumpType)) {
|
| | | List<JumpDetailV2> listByType = jumpDetailV2Service.listByType(jumpType);
|
| | | if (listByType != null && listByType.size() > 0) {
|
| | |
| | | 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);
|
| | |
| | | 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);
|
| | |
| | | blockJsonMap.put("bottomPicture", special.getBottomPicture());
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | // 品牌券
|
| | | // >=1.5.40后的版本可以用
|
| | |
| | | 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;
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | 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))
|
| | |
| | | return StringUtil.Md5(signStr).toUpperCase();
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 获取店铺下前4个商品、店铺介绍
|
| | | *
|
| | |
| | | return taoBaoShopDTO;
|
| | | }
|
| | |
|
| | |
|
| | | public static int RANK_TYPE_TIME = 1;// 实时
|
| | | public static int RANK_TYPE_DAY = 2;// 全天榜
|
| | | public static int RANK_TYPE_HOT = 3;// 热推榜
|
| | |
| | | * @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;
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | 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"
|
| | |
| | | maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
|
| | | timeToLiveSeconds="120" overflowToDisk="true"
|
| | | memoryStoreEvictionPolicy="LRU" />
|
| | |
|
| | |
|
| | |
|
| | | </ehcache>
|
| | |
| | | <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" />
|
| | | <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; } }
|
| | | .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; }
|
| | | .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>
|
| | |
| | | </head>
|
| | |
|
| | | <body class="displayNone">
|
| | | <div id="allwai" class="allwai font3" style="background-color: #FDD757;">
|
| | | <div id="allwai" class="allwai font3"
|
| | | style="background-color: #FDD757;">
|
| | |
|
| | | <!--图片列表-->
|
| | | <div style="width: 100%; padding-bottom: 5rem; overflow: scroll;">
|
| | |
| | |
|
| | | <!--循环添加-->
|
| | | <div v-for="item in imglist" style="width: 100%; height: auto;">
|
| | | <img v-bind:src="item" class="imgstyle animt_img" onclick="return false"/>
|
| | | <img v-bind:src="item" class="imgstyle animt_img"
|
| | | onclick="return false" />
|
| | | </div>
|
| | |
|
| | | </div>
|
| | | </div>
|
| | |
|
| | | <!--APP下载卡片-->
|
| | | <div v-if="inapp=='false'||inapp==false" class="homeappwai fboxRow Ycenter">
|
| | | <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>
|
| | | <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");
|
| | |
|
| | |
| | | el: "#allwai",
|
| | | data: imgdata,
|
| | | //创建完毕
|
| | | created: function () { $("body").removeClass("displayNone"); },
|
| | | created : function() {
|
| | | $("body").removeClass("displayNone");
|
| | | },
|
| | | //数据节点渲染完毕
|
| | | updated: function () { var num_all = $('img').length; console.log("图片总张数:"+num_all); },
|
| | | 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"); }
|
| | | if (urldata.id) {
|
| | | imgdata.id = urldata.id;
|
| | | } else {
|
| | | doui.showToast("未获取到攻略id");
|
| | | }
|
| | | //是否在app内部打开
|
| | | if (urldata.inApp) { imgdata.inapp = urldata.inApp; }
|
| | | |
| | | |
| | | if (urldata.inApp) {
|
| | | imgdata.inapp = urldata.inApp;
|
| | | }
|
| | |
|
| | | //======================== 数据请求 ================================
|
| | | imglistGet();
|
| | | function imglistGet ()
|
| | | {
|
| | | function imglistGet() {
|
| | | doui.showLoading("获取攻略");
|
| | | //发送数据准备 |
| | | var myurl = "../../api/h5/v1/strategy/strategyPicture";
|
| | |
| | | id: imgdata.id,
|
| | | });
|
| | | //发起请求
|
| | | $.get({ url:myurl, data:{id: imgdata.id}, success: function(res){
|
| | | $.get({
|
| | | url : myurl,
|
| | | data : {
|
| | | id : imgdata.id
|
| | | },
|
| | | success : function(res) {
|
| | | res=JSON.parse(res);
|
| | | doui.hideLoading();
|
| | | if (res.code != 0) { doui.showToast(res.msg); }
|
| | | //向图片组中添加数据
|
| | | else { imgdata.imglist = res.data; }
|
| | | }}); |
| | | if (res.code != 0) {
|
| | | doui.showToast(res.msg);
|
| | | }
|
| | | |
| | | |
| | | //向图片组中添加数据
|
| | | else {
|
| | | imgdata.imglist = res.data;
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | </script>
|
| | |
|
| | | </html>
|