ソースを参照

chore: 简化小商场代码。

Junling Bu 6 年 前
コミット
5cd86f69fb

+ 0 - 33
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java

@@ -285,39 +285,6 @@ public class WxGoodsController {
 	}
 
 	/**
-	 * 新品首发页面的横幅
-	 *
-	 * @return 新品首发页面的横幅
-	 */
-	@GetMapping("new")
-	public Object newGoods() {
-		Map<String, String> bannerInfo = new HashMap<>();
-		bannerInfo.put("url", "");
-		bannerInfo.put("name", SystemConfig.getNewBannerTitle());
-		bannerInfo.put("imgUrl", SystemConfig.getNewImageUrl());
-
-		Map<String, Object> data = new HashMap<>();
-		data.put("bannerInfo", bannerInfo);
-		return ResponseUtil.ok(data);
-	}
-
-	/**
-	 * 人气推荐页面的横幅
-	 *
-	 * @return 人气推荐页面的横幅
-	 */
-	@GetMapping("hot")
-	public Object hotGoods() {
-		Map<String, String> bannerInfo = new HashMap<>();
-		bannerInfo.put("url", "");
-		bannerInfo.put("name", SystemConfig.getHotBannerTitle());
-		bannerInfo.put("imgUrl", SystemConfig.getHotImageUrl());
-		Map<String, Object> data = new HashMap<>();
-		data.put("bannerInfo", bannerInfo);
-		return ResponseUtil.ok(data);
-	}
-
-	/**
 	 * 商品详情页面“大家都在看”推荐商品
 	 *
 	 * @param id, 商品ID

+ 0 - 2
litemall-wx/config/api.js

@@ -25,8 +25,6 @@ module.exports = {
   GoodsList: WxApiRoot + 'goods/list', //获得商品列表
   GoodsCategory: WxApiRoot + 'goods/category', //获得分类数据
   GoodsDetail: WxApiRoot + 'goods/detail', //获得商品的详情
-  GoodsNew: WxApiRoot + 'goods/new', //新品
-  GoodsHot: WxApiRoot + 'goods/hot', //热门
   GoodsRelated: WxApiRoot + 'goods/related', //商品详情页的关联商品(大家都在看)
 
   BrandList: WxApiRoot + 'brand/list', //品牌列表

+ 2 - 13
litemall-wx/pages/hotGoods/hotGoods.js

@@ -5,8 +5,8 @@ var app = getApp();
 Page({
   data: {
     bannerInfo: {
-      'imgUrl': '',
-      'name': ''
+      'imgUrl': 'http://yanxuan.nosdn.127.net/8976116db321744084774643a933c5ce.png',
+      'name': '大家都在买的'
     },
     categoryFilter: false,
     filterCategory: [],
@@ -18,16 +18,6 @@ Page({
     page: 1,
     size: 100
   },
-  getBanner: function() {
-    let that = this;
-    util.request(api.GoodsHot).then(function(res) {
-      if (res.errno === 0) {
-        that.setData({
-          bannerInfo: res.data.bannerInfo,
-        });
-      }
-    });
-  },
   getCategoryList: function() {
     var that = this;
 
@@ -65,7 +55,6 @@ Page({
   },
   onLoad: function(options) {
     // 页面初始化 options为页面跳转所带来的参数
-    this.getBanner();
     this.getGoodsList();
   },
   onReady: function() {

+ 2 - 13
litemall-wx/pages/newGoods/newGoods.js

@@ -5,8 +5,8 @@ var app = getApp();
 Page({
   data: {
     bannerInfo: {
-      'imgUrl': '',
-      'name': ''
+      'imgUrl': 'http://yanxuan.nosdn.127.net/8976116db321744084774643a933c5ce.png',
+      'name': '大家都在买的'
     },
     categoryFilter: false,
     filterCategory: [],
@@ -18,16 +18,6 @@ Page({
     page: 1,
     size: 100
   },
-  getBanner: function() {
-    let that = this;
-    util.request(api.GoodsNew).then(function(res) {
-      if (res.errno === 0) {
-        that.setData({
-          bannerInfo: res.data.bannerInfo,
-        });
-      }
-    });
-  },
   getGoodsList: function() {
     var that = this;
 
@@ -50,7 +40,6 @@ Page({
   },
   onLoad: function(options) {
     // 页面初始化 options为页面跳转所带来的参数
-    this.getBanner();
     this.getGoodsList();
   },
   onReady: function() {

+ 0 - 2
renard-wx/config/api.js

@@ -24,8 +24,6 @@ module.exports = {
   GoodsList: WxApiRoot + 'goods/list', //获得商品列表
   GoodsCategory: WxApiRoot + 'goods/category', //获得分类数据
   GoodsDetail: WxApiRoot + 'goods/detail', //获得商品的详情
-  GoodsNew: WxApiRoot + 'goods/new', //新品
-  GoodsHot: WxApiRoot + 'goods/hot', //热门
   GoodsRelated: WxApiRoot + 'goods/related', //商品详情页的关联商品(大家都在看)
 
   BrandList: WxApiRoot + 'brand/list', //品牌列表

+ 2 - 13
renard-wx/pages/hotGoods/hotGoods.js

@@ -5,8 +5,8 @@ var app = getApp();
 Page({
   data: {
     bannerInfo: {
-      'imgUrl': '',
-      'name': ''
+      'imgUrl': 'http://yanxuan.nosdn.127.net/8976116db321744084774643a933c5ce.png',
+      'name': '大家都在买的'
     },
     categoryFilter: false,
     filterCategory: [],
@@ -18,16 +18,6 @@ Page({
     page: 1,
     size: 100
   },
-  getBanner: function() {
-    let that = this;
-    util.request(api.GoodsHot).then(function(res) {
-      if (res.errno === 0) {
-        that.setData({
-          bannerInfo: res.data.bannerInfo,
-        });
-      }
-    });
-  },
   getCategoryList: function() {
     var that = this;
 
@@ -65,7 +55,6 @@ Page({
   },
   onLoad: function(options) {
     // 页面初始化 options为页面跳转所带来的参数
-    this.getBanner();
     this.getGoodsList();
   },
   onReady: function() {

+ 2 - 14
renard-wx/pages/newGoods/newGoods.js

@@ -5,8 +5,8 @@ var app = getApp();
 Page({
   data: {
     bannerInfo: {
-      'imgUrl': '',
-      'name': ''
+      'imgUrl': 'http://yanxuan.nosdn.127.net/8976116db321744084774643a933c5ce.png',
+      'name': '大家都在买的'
     },
     categoryFilter: false,
     filterCategory: [],
@@ -20,21 +20,9 @@ Page({
   },
 
   onPullDownRefresh() {
-    this.getBanner();
     this.getGoodsList();
     wx.stopPullDownRefresh() //停止下拉刷新
   },
-
-  getBanner: function() {
-    let that = this;
-    util.request(api.GoodsNew).then(function(res) {
-      if (res.errno === 0) {
-        that.setData({
-          bannerInfo: res.data.bannerInfo,
-        });
-      }
-    });
-  },
   getGoodsList: function() {
     var that = this;
     util.request(api.GoodsList, {