Browse Source

取值调整

qng 3 năm trước cách đây
mục cha
commit
7e6714b6a0

+ 2 - 2
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java

@@ -412,8 +412,8 @@ public class GoodsController {
                 if(null==entryList){
                 if(null==entryList){
                     throw new RRException("文件夹内无图片信息,请检查后重试");
                     throw new RRException("文件夹内无图片信息,请检查后重试");
                 }
                 }
-                if(entryList.size()>30){
-                    throw new RRException("最多上传30张图片");
+                if(entryList.size()>100){
+                    throw new RRException("最多上传100张图片");
                 }
                 }
             for(ZipEntry entry : entryList){
             for(ZipEntry entry : entryList){
                 if (entry.isDirectory()) {
                 if (entry.isDirectory()) {

+ 5 - 7
kmall-api/src/main/java/com/kmall/api/api/ApiIndexController.java

@@ -16,10 +16,7 @@ import org.apache.http.HttpResponse;
 import org.apache.http.util.EntityUtils;
 import org.apache.http.util.EntityUtils;
 import org.apache.log4j.Logger;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 import javax.servlet.http.HttpUtils;
 import javax.servlet.http.HttpUtils;
 import java.util.ArrayList;
 import java.util.ArrayList;
@@ -58,16 +55,17 @@ public class ApiIndexController extends ApiBaseAction {
      */
      */
     @IgnoreAuth
     @IgnoreAuth
     @GetMapping("index")
     @GetMapping("index")
-    public Object index() {
+    public Object index(@RequestParam Long storeId) {
         Map<String, Object> resultObj = Maps.newHashMap();
         Map<String, Object> resultObj = Maps.newHashMap();
         // init
         // init
         Long userId = getUserId();
         Long userId = getUserId();
-        Long storeId = getStoreId();
+        //Long storeId = getStoreId();
+        Long storeIdNew = storeId;
         //
         //
         Map param = Maps.newHashMap();
         Map param = Maps.newHashMap();
 //        param.put("ad_position_ids", new Integer[]{1, 2, 3});
 //        param.put("ad_position_ids", new Integer[]{1, 2, 3});
         param.put("ad_position_ids", new Integer[]{1});//用户注册
         param.put("ad_position_ids", new Integer[]{1});//用户注册
-        param.put("storeId",storeId);
+        param.put("storeId",storeIdNew);
         List<AdVo> adVos = apiAdService.queryList(param);
         List<AdVo> adVos = apiAdService.queryList(param);
         //
         //
         List<AdVo> banner = new ArrayList();
         List<AdVo> banner = new ArrayList();

+ 3 - 1
wx-mall/pages/index/index.js

@@ -628,7 +628,9 @@ Page({
       title: '加载中...',
       title: '加载中...',
     })
     })
     let that = this;
     let that = this;
-    util.request(api.IndexUrl).then(function(res) {
+    util.request(api.IndexUrl,
+      {storeId: wx.getStorageSync('storeId')}
+      ).then(function(res) {
       if (res.errno === 0) {
       if (res.errno === 0) {
         // console.log(res.data.banner);
         // console.log(res.data.banner);
         that.setData({
         that.setData({