Procházet zdrojové kódy

Merge branch 'master' of hyq/kmall-pt into master

黄亚琴 před 6 roky
rodič
revize
5752ab77e1
46 změnil soubory, kde provedl 626 přidání a 97 odebrání
  1. 15 3
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java
  2. 6 1
      kmall-admin/src/main/webapp/WEB-INF/page/shop/ad.html
  3. 19 4
      kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html
  4. 3 3
      kmall-api/src/main/java/com/kmall/api/api/ApiAddressController.java
  5. 6 0
      kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java
  6. 4 0
      kmall-api/src/main/java/com/kmall/api/api/ApiCouponController.java
  7. 14 2
      kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java
  8. 32 1
      kmall-api/src/main/java/com/kmall/api/api/ApiRegionController.java
  9. 2 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiCartMapper.java
  10. 4 0
      kmall-api/src/main/java/com/kmall/api/service/ApiCartService.java
  11. 7 1
      kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java
  12. 4 0
      kmall-api/src/main/resources/mybatis/mapper/ApiCartMapper.xml
  13. 1 1
      kmall-api/src/main/resources/mybatis/mapper/ApiGoodsMapper.xml
  14. 119 0
      kmall-common/kmall-common.iml
  15. 1 1
      kmall-common/pom.xml
  16. 30 0
      kmall-common/src/main/java/com/kmall/common/service/SysRegionService.java
  17. 53 0
      kmall-common/src/main/java/com/kmall/common/service/impl/SysRegionServiceImpl.java
  18. 147 0
      kmall-framework/kmall-framework.iml
  19. 1 1
      wx-mall/app.json
  20. 1 1
      wx-mall/app.wxss
  21. 1 1
      wx-mall/pages/brandDetail/brandDetail.wxss
  22. 18 3
      wx-mall/pages/cart/cart.js
  23. 2 2
      wx-mall/pages/cart/cart.wxml
  24. 15 2
      wx-mall/pages/cart/cart.wxss
  25. 4 6
      wx-mall/pages/catalog/catalog.js
  26. 1 1
      wx-mall/pages/catalog/catalog.wxss
  27. 12 9
      wx-mall/pages/category/category.js
  28. 1 1
      wx-mall/pages/category/category.wxss
  29. 6 3
      wx-mall/pages/goods/goods.js
  30. 2 1
      wx-mall/pages/goods/goods.wxml
  31. 14 3
      wx-mall/pages/goods/goods.wxss
  32. 1 1
      wx-mall/pages/hotGoods/hotGoods.wxss
  33. 5 0
      wx-mall/pages/index/index.js
  34. 1 1
      wx-mall/pages/index/index.wxss
  35. 1 1
      wx-mall/pages/newGoods/newGoods.wxss
  36. 1 1
      wx-mall/pages/search/search.wxss
  37. 1 7
      wx-mall/pages/shopping/checkout/checkout.js
  38. 11 9
      wx-mall/pages/ucenter/addressAdd/addressAdd.js
  39. 7 1
      wx-mall/pages/ucenter/coupon/coupon.js
  40. 3 2
      wx-mall/pages/ucenter/coupon/coupon.wxml
  41. 1 0
      wx-mall/pages/ucenter/coupon/coupon.wxss
  42. 29 14
      wx-mall/pages/ucenter/idCard/idCard.js
  43. 4 2
      wx-mall/pages/ucenter/idCard/idCard.wxml
  44. 9 0
      wx-mall/pages/ucenter/idCard/idCard.wxss
  45. 6 6
      wx-mall/pages/ucenter/index/index.wxss
  46. 1 1
      wx-mall/pages/ucenter/orderDetail/orderDetail.wxml

+ 15 - 3
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java

@@ -317,17 +317,29 @@ public class GoodsServiceImpl implements GoodsService {
 
         // 修改产品
         ProductEntity product = productDao.queryObjectBySn(goods.getGoodsSn());
+
+        GoodsSpecificationEntity goodsSpecification = new GoodsSpecificationEntity();
         // 保税商品,普通货物暂不添加商品规格
         if (!Dict.orderBizType.item_11.getItem().equals(goods.getGoodsBizType())) {
             // 添加商品规格
-            GoodsSpecificationEntity goodsSpecification = goodsSpecificationDao.queryByGoodsId(goods.getId());
+            goodsSpecification = goodsSpecificationDao.queryByGoodsId(goods.getId());
             goodsSpecification.setValue(goods.getCiqProdModel());
             goodsSpecificationDao.update(goodsSpecification);
+        }
 
+        if(product == null){
+            product = new ProductEntity();
+            product.setGoodsSn(goods.getGoodsSn());
             product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
+            product.setGoodsSpecificationIds(goodsSpecification.getSpecificationId()+"");
+            product.setGoodsId(goods.getId());
+            product.setGoodsNumber(goods.getGoodsNumber());
+            product.setGoodsDefault(0);
+            return productDao.save(product);
+        }else{
+            product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
+            return productDao.update(product);
         }
-
-        return productDao.update(product);
     }
 
     @Override

+ 6 - 1
kmall-admin/src/main/webapp/WEB-INF/page/shop/ad.html

@@ -46,7 +46,7 @@
             <Form-item label="链接" prop="link">
                 <i-input v-model="ad.link" placeholder="链接"/>
             </Form-item>
-            <Row>
+            <Row style="height: 30px">
                 <i-col span="16">
                     <Form-item label="图片" prop="imageUrl">
                         <i-input v-model="ad.imageUrl" placeholder="图片" readonly/>
@@ -69,6 +69,11 @@
                     </Form-item>
                 </i-col>
             </Row>
+            <Row>
+                <i-col span="16" style="margin-top: -20px;">
+                    <span style="margin-left: 80px;color: red;font-size: 12px;">尺寸建议750*280像素以内,大小2M以下</span>
+                </i-col>
+            </Row>
             <Form-item label="内容" prop="content">
                 <i-input type="textarea" v-model="ad.content" placeholder="内容"/>
             </Form-item>

+ 19 - 4
kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html

@@ -103,18 +103,22 @@
         <i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="140">
         <Tabs value="name1">
             <Tab-Pane label="通用信息" name="name1">
+                <Row>
+                    <i-col span="16" style="margin-top: -10px;">
+                        <span style="margin-left: 140px;color: red;font-size: 12px;">* 修改商品二级分类将清空商品参数列表</span>
+                    </i-col>
+                </Row>
                 <!--<i-form ref="formValidate" :model="goods" :rules="ruleValidate" :label-width="80">-->
-                <span style="margin-left: 142px; font-size: 12px; color: red;">修改商品二级分类将清空商品参数列表</span>
-                    <Form-item label="商品类型" prop="categoryId">
+                    <Form-item label="商品类型" prop="categoryId" style="height: 30px;">
                         <!--<i-input v-model="goods.categoryName" @on-click="categoryTree" icon="eye" readonly="readonly" placeholder="商品类型"/>-->
                         <i-select v-model="goods.attributeCategory" placeholder="商品分类" filterable @on-change="changeCategories"
-                                  label-in-value style="width: 268px;">
+                                  label-in-value style="width: 268px;height: 30px;">
                             <i-option v-for="category in categories" :value="category.id"
                                       :key="category.id">{{category.name}}
                             </i-option>
                         </i-select>
                         <i-select v-model="goods.categoryId" placeholder="商品二级分类" filterable @on-change="getAttributes"
-                                  label-in-value style="width: 268px;">
+                                  label-in-value style="width: 268px;height: 30px;">
                             <i-option v-for="category in categoriesTwo" :value="category.id"
                                       :key="category.id">{{category.name}}
                             </i-option>
@@ -192,6 +196,11 @@
                         </i-col>
                     </Row>
                     <Row>
+                        <i-col span="16" style="margin-top: -30px;">
+                            <span style="margin-left: 140px;color: red;font-size: 12px;">* 尺寸建议200x200(正方形模式)像素以内,大小2M以下</span>
+                        </i-col>
+                    </Row>
+                    <Row>
                         <i-col span="16">
                             <Form-item label="商品列表图" prop="listPicUrl">
                                 <i-input v-model="goods.listPicUrl" placeholder="商品列表图" readonly/>
@@ -214,6 +223,11 @@
                             </Form-item>
                         </i-col>
                     </Row>
+                    <Row>
+                        <i-col span="16" style="margin-top: -30px;">
+                            <span style="margin-left: 140px;color: red;font-size: 12px;">* 尺寸建议200x200(正方形模式)像素以内,大小2M以下</span>
+                        </i-col>
+                    </Row>
                 <!--</i-form>-->
             </Tab-Pane>
             <Tab-Pane label="海关信息" name="name2">
@@ -323,6 +337,7 @@
                     <Modal title="查看图片" v-model="visible">
                         <img :src="imgName" v-if="visible" style="width: 100%"/>
                     </Modal>
+                    <span style="color: red;font-size: 12px;">* 商品详情轮播图,尺寸建议750x750(正方形模式)像素以内,大小2M以下</span>
                 </template>
                 <div id="goodsDesc"></div>
             </Tab-Pane>

+ 3 - 3
kmall-api/src/main/java/com/kmall/api/api/ApiAddressController.java

@@ -184,9 +184,9 @@ public class ApiAddressController extends ApiBaseAction {
         }
         double distance = CommonUtil.getDistance(storeVo.getLatitude().doubleValue(), storeVo.getLongitude().doubleValue(),
                 addressVo.getLatitude().doubleValue(), addressVo.getLongitude().doubleValue());
-        if (storeVo.getCoverRadius().compareTo(new BigDecimal(distance)) < 0) {
-            return toResponsFail("当前地址距离门店过远,无法配送,抱歉!");
-        }
+//        if (storeVo.getCoverRadius().compareTo(new BigDecimal(distance)) < 0) {
+//            return toResponsFail("当前地址距离门店过远,无法配送,抱歉!");
+//        }
         //
         storeVo.setDistance(new BigDecimal(distance));
         return toResponsSuccess(storeVo);

+ 6 - 0
kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java

@@ -252,6 +252,9 @@ public class ApiCartController extends ApiBaseAction {
         List<CartVo> cartInfoList = cartService.queryList(cartParam);
         CartVo cartInfo = null != cartInfoList && cartInfoList.size() > 0 ? cartInfoList.get(0) : null;
         if (null == cartInfo) {
+            if(productInfo.getStock_num() <= 0){
+                return toResponsFail("库存不足");
+            }
             //添加规格名和值
             cartInfo = new CartVo();
 
@@ -272,6 +275,9 @@ public class ApiCartController extends ApiBaseAction {
             cartInfo.setStockNum(productInfo.getStock_num());
             cartService.save(cartInfo);
         } else {
+            if(number + cartInfo.getNumber() > productInfo.getStock_num()){
+                return toResponsFail("商品选购数量(含购物车已加购数量)已超过库存");
+            }
             cartInfo.setNumber(cartInfo.getNumber() + number);
             cartInfo.setGoodsBizType(goodsInfo.getGoodsBizType());//业务类型
             cartInfo.setStockNum(productInfo.getStock_num());

+ 4 - 0
kmall-api/src/main/java/com/kmall/api/api/ApiCouponController.java

@@ -149,6 +149,10 @@ public class ApiCouponController extends ApiBaseAction {
         //
         String phone = jsonParam.getString("phone");
         String smscode = jsonParam.getString("smscode");
+        UserVo userVo = apiUserService.queryByMobile(phone);
+        if(userVo != null){
+            return toResponsFail("该手机号已绑定");
+        }
         // 校验短信码
         SysSmsLogEntity smsLogVo = sysSmsLogService.querySmsCodeByUserId(loginUser.getId());
         if (null != smsLogVo && !smsLogVo.getSmsCode().equals(smscode) || smsLogVo.getSendStatus() == 0) {

+ 14 - 2
kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java

@@ -99,7 +99,13 @@ public class ApiGoodsController extends ApiBaseAction {
         param.put("goods_id", goodsId);
         param.put("store_id", getStoreId());
         List<ProductVo> productEntityList = productService.queryList(param);
-        //
+
+        CartVo cartVo = cartService.queryObjectByGoodsIdAndUserId(goodsId,getUserId());
+        if(cartVo == null){
+            resultObj.put("cartNumber", 0);
+        }else{
+            resultObj.put("cartNumber", cartVo.getNumber());
+        }
         resultObj.put("goodsVo", goodsVo);
         resultObj.put("specificationList", goodsSpecificationEntityList);
         resultObj.put("productList", productEntityList);
@@ -592,7 +598,13 @@ public class ApiGoodsController extends ApiBaseAction {
             params.put("is_group", true);
         }
         params.put("goodsBizType", goodsBizType);
-        params.put("category_parent_id", categoryId);
+        CategoryVo categoryVo = categoryService.queryObject(categoryId);
+        if(categoryVo != null){
+            if(categoryVo.getSort_order()!= null && categoryVo.getSort_order()== 0){
+            }else{
+                params.put("category_parent_id", categoryId);
+            }
+        }
         //查询列表数据
         Query query = new Query(params);
         List<GoodsVo> goodsList = goodsService.queryCatalogProductList(query);

+ 32 - 1
kmall-api/src/main/java/com/kmall/api/api/ApiRegionController.java

@@ -3,10 +3,14 @@ package com.kmall.api.api;
 import com.kmall.api.annotation.IgnoreAuth;
 import com.kmall.common.cache.RegionCacheUtil;
 import com.kmall.api.entity.RegionVo;
+import com.kmall.common.dao.SysRegionDao;
 import com.kmall.common.entity.SysRegionEntity;
 import com.kmall.api.service.ApiTopicService;
 import com.kmall.api.util.ApiBaseAction;
+import com.kmall.common.security.session.JedisSessionDAO;
+import com.kmall.common.service.SysRegionService;
 import com.kmall.common.utils.StringUtils;
+import com.kmall.common.utils.redis.JedisUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -27,13 +31,40 @@ import java.util.Map;
 public class ApiRegionController extends ApiBaseAction {
     @Autowired
     private ApiTopicService topicService;
+    @Autowired
+    private SysRegionService sysRegionService;
+    // session 在redis过期时间是30分钟30*60
+    private static int expireTime = 1800;
 
     /**
      */
     @IgnoreAuth
     @GetMapping("list")
     public Object list(Integer parentId) {
-        List<SysRegionEntity> regionEntityList = RegionCacheUtil.getChildrenByParentId(parentId);
+        List<SysRegionEntity> regionEntityList = new ArrayList();
+        Map<String,Object> queryListMap = new HashMap<>();
+        Map<String, Object> listMap = JedisUtil.getObjectMap("sysRegionEntityList");
+        if(listMap == null){
+            List<SysRegionEntity> sysRegionEntityList= sysRegionService.queryList(new HashMap<String, Object>());
+            queryListMap.put("sysRegionEntityList",sysRegionEntityList);
+            JedisUtil.setObjectMap("sysRegionEntityList", queryListMap, expireTime);
+            for (SysRegionEntity areaVo : sysRegionEntityList) {
+                if (null != areaVo.getParentId() && parentId.equals(areaVo.getParentId())) {
+                    regionEntityList.add(areaVo);
+                }
+            }
+        }else{
+            Map<byte[], byte[]> map = new HashMap<byte[], byte[]>();
+            for (Map.Entry<String, Object> e : listMap.entrySet()) {
+                List<Object> objectList =  (List<Object>)listMap.get(e.getKey());
+                for (Object o:objectList){
+                    SysRegionEntity sysRegionEntity = (SysRegionEntity)o;
+                    if (null != sysRegionEntity.getParentId() && parentId.equals(sysRegionEntity.getParentId())) {
+                        regionEntityList.add(sysRegionEntity);
+                    }
+                }
+            }
+        }
         List<RegionVo> regionVoList = new ArrayList();
         if (null != regionEntityList && regionEntityList.size() > 0) {
             for (SysRegionEntity sysRegionEntity : regionEntityList) {

+ 2 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiCartMapper.java

@@ -25,4 +25,6 @@ public interface ApiCartMapper extends BaseDao<CartVo> {
     List<CartVo> queryCartByGoodsBizType(@Param("goodsBizType") String goodsBizType);
 
     List<CartVo> queryValidCartList(Map<String, Object> map);
+
+    CartVo queryObjectByGoodsIdAndUserId(@Param("goods_id")Long goods_id,@Param("user_id")Long user_id);
 }

+ 4 - 0
kmall-api/src/main/java/com/kmall/api/service/ApiCartService.java

@@ -34,6 +34,10 @@ public class ApiCartService {
         return cartDao.queryObject(id);
     }
 
+    public CartVo queryObjectByGoodsIdAndUserId(Long goods_id,Long user_id) {
+        return cartDao.queryObjectByGoodsIdAndUserId(goods_id,user_id);
+    }
+
 
     public List<CartVo> queryList(Map<String, Object> map) {
         return cartDao.queryList(map);

+ 7 - 1
kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java

@@ -97,7 +97,7 @@ public class ApiOrderService {
         //订单的商品
         List<OrderGoodsVo> goodsList = apiOrderGoodsMapper.queryList(orderGoodsParam);
         for (OrderGoodsVo orderGoodsVo : goodsList) {
-            ProductVo productInfo = apiProductMapper.queryObjectByStoreId(orderGoodsVo.getProduct_id(), order.getStore_id());
+            ProductVo productInfo = apiProductMapper.queryByStoreId(orderGoodsVo.getProduct_id(), order.getStore_id());
             productInfo.setStock_num(productInfo.getStock_num() + orderGoodsVo.getNumber());
             productInfo.minusSellVolume();
             apiProductMapper.updateStockNum(productInfo);
@@ -131,6 +131,12 @@ public class ApiOrderService {
     public Map submit(JSONObject jsonParam, UserVo loginUser, Long storeId) {
         Map resultObj = new HashMap();
 
+        AddressVo addressVo = jsonParam.getObject("checkedAddress", AddressVo.class);
+        if (addressVo == null) {
+            resultObj.put("errno", 400);
+            resultObj.put("errmsg", "地址不能为空");
+            return resultObj;
+        }
         String formId = jsonParam.getString("formId");
         String idNo = jsonParam.getString("idNo");
         String userName = jsonParam.getString("userName");

+ 4 - 0
kmall-api/src/main/resources/mybatis/mapper/ApiCartMapper.xml

@@ -42,6 +42,10 @@
         select
         <include refid="Base_Column_List" /> from mall_cart where goods_biz_type = #{goodsBizType}
     </select>
+    <select id="queryObjectByGoodsIdAndUserId" resultMap="cartMap">
+        SELECT * FROM `mall_cart` where goods_id =#{goods_id} and user_id =#{user_id}
+    </select>
+
     <select id="queryList" resultMap="cartMap">
         select a.*,
         b.list_pic_url as list_pic_url,

+ 1 - 1
kmall-api/src/main/resources/mybatis/mapper/ApiGoodsMapper.xml

@@ -58,7 +58,7 @@
     </sql>
 
     <select id="queryObject" resultMap="goodsMap">
-		select <include refid="Base_Column_List" />
+		select *
         from mall_goods
 		where id = #{value}
 	</select>

+ 119 - 0
kmall-common/kmall-common.iml

@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.17" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.9.1" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun.oss:aliyun-sdk-oss:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jdom:jdom:1.1" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" level="project" />
+    <orderEntry type="library" name="Maven: com.qcloud:cos_api:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20140107" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
+    <orderEntry type="library" name="Maven: jstl:jstl:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.15" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.15" level="project" />
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.15" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:17.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.19" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.19" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.19" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.logback-extensions:logback-ext-spring:0.1.5" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.6.3" level="project" />
+    <orderEntry type="library" name="Maven: org.mariadb.jdbc:mariadb-java-client:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.39" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.0.28" level="project" />
+    <orderEntry type="module-library">
+      <library name="Maven: com.alibaba:jconsole:1.8.0">
+        <CLASSES>
+          <root url="jar://D:/Program Files/Java/jdk1.8.0_131/lib/jconsole.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="Maven: com.alibaba:tools:1.8.0">
+        <CLASSES>
+          <root url="jar://D:/Program Files/Java/jdk1.8.0_131/lib/tools.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.30" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.github.axet:kaptcha:0.0.9" level="project" />
+    <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity-tools:2.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-digester:commons-digester:1.8" level="project" />
+    <orderEntry type="library" name="Maven: taglibs:standard:1.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.23" level="project" />
+  </component>
+</module>

+ 1 - 1
kmall-common/pom.xml

@@ -22,10 +22,10 @@
         <poi.version>3.15</poi.version>
         <xmlbeans.version>2.6.0</xmlbeans.version>
         <guava.version>17.0</guava.version>
+        <bouncycastle.version>1.45</bouncycastle.version>
     </properties>
 
     <dependencies>
-
         <dependency>
             <groupId>com.qiniu</groupId>
             <artifactId>qiniu-java-sdk</artifactId>

+ 30 - 0
kmall-common/src/main/java/com/kmall/common/service/SysRegionService.java

@@ -0,0 +1,30 @@
+package com.kmall.common.service;
+
+import com.kmall.common.entity.SysLogEntity;
+import com.kmall.common.entity.SysRegionEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * @author Scott
+ * @email
+ * @date 2017-03-08 10:40:56
+ */
+public interface SysRegionService {
+
+    SysRegionEntity queryObject(Long id);
+
+    List<SysRegionEntity> queryList(Map<String, Object> map);
+
+    int queryTotal(Map<String, Object> map);
+
+    void save(SysRegionEntity regionEntity);
+
+    void update(SysRegionEntity regionEntity);
+
+    void delete(Long id);
+
+    void deleteBatch(Long[] ids);
+}

+ 53 - 0
kmall-common/src/main/java/com/kmall/common/service/impl/SysRegionServiceImpl.java

@@ -0,0 +1,53 @@
+package com.kmall.common.service.impl;
+
+import com.kmall.common.dao.SysRegionDao;
+import com.kmall.common.entity.SysRegionEntity;
+import com.kmall.common.service.SysRegionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+
+@Service("sysRegionService")
+public class SysRegionServiceImpl implements SysRegionService {
+	@Autowired
+	private SysRegionDao regionDao;
+	
+	@Override
+	public SysRegionEntity queryObject(Long id){
+		return regionDao.queryObject(id);
+	}
+	
+	@Override
+	public List<SysRegionEntity> queryList(Map<String, Object> map){
+		return regionDao.queryList(map);
+	}
+	
+	@Override
+	public int queryTotal(Map<String, Object> map){
+		return regionDao.queryTotal(map);
+	}
+	
+	@Override
+	public void save(SysRegionEntity sysRegionEntity){
+		regionDao.save(sysRegionEntity);
+	}
+	
+	@Override
+	public void update(SysRegionEntity sysRegionEntity){
+		regionDao.update(sysRegionEntity);
+	}
+	
+	@Override
+	public void delete(Long id){
+		regionDao.delete(id);
+	}
+	
+	@Override
+	public void deleteBatch(Long[] ids){
+		regionDao.deleteBatch(ids);
+	}
+	
+}

+ 147 - 0
kmall-framework/kmall-framework.iml

@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <descriptors>
+          <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
+        </descriptors>
+        <webroots>
+          <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
+        </webroots>
+        <sourceRoots />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="kmall-common" />
+    <orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.17" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.9.1" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun.oss:aliyun-sdk-oss:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jdom:jdom:1.1" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" level="project" />
+    <orderEntry type="library" name="Maven: com.qcloud:cos_api:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20140107" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.5.0" level="project" />
+    <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:3.15" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.15" level="project" />
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.15" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:17.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
+    <orderEntry type="module" module-name="kmall-api" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.6" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.6" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.4.0" level="project" />
+    <orderEntry type="module" module-name="kmall-admin" />
+    <orderEntry type="module" module-name="kmall-schedule" />
+    <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.2.3" level="project" />
+    <orderEntry type="module" module-name="kmall-gen" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.0" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.9" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.19" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.19" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.19" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.logback-extensions:logback-ext-spring:0.1.5" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.6.3" level="project" />
+    <orderEntry type="library" name="Maven: org.mariadb.jdbc:mariadb-java-client:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.39" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.0.28" level="project" />
+    <orderEntry type="module-library">
+      <library name="Maven: com.alibaba:jconsole:1.8.0">
+        <CLASSES>
+          <root url="jar://D:/Program Files/Java/jdk1.8.0_131/lib/jconsole.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="Maven: com.alibaba:tools:1.8.0">
+        <CLASSES>
+          <root url="jar://D:/Program Files/Java/jdk1.8.0_131/lib/tools.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.30" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.github.axet:kaptcha:0.0.9" level="project" />
+    <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity-tools:2.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-digester:commons-digester:1.8" level="project" />
+    <orderEntry type="library" name="Maven: jstl:jstl:1.2" level="project" />
+    <orderEntry type="library" name="Maven: taglibs:standard:1.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.23" level="project" />
+  </component>
+</module>

+ 1 - 1
wx-mall/app.json

@@ -55,7 +55,7 @@
   "window": {
     "backgroundTextStyle": "dark",
     "navigationBarBackgroundColor": "#fff",
-    "navigationBarTitleText": "中网跨境商",
+    "navigationBarTitleText": "中网跨境商",
     "navigationBarTextStyle": "black",
     "enablePullDownRefresh": false
   },

+ 1 - 1
wx-mall/app.wxss

@@ -268,7 +268,7 @@ view, text {
 .fast-nav {
   position: fixed;
   right: 20rpx;
-  bottom: 130rpx;
+  bottom: 180rpx;
   z-index: 9999;
   display: flex;
   flex-direction: column;

+ 1 - 1
wx-mall/pages/brandDetail/brandDetail.wxss

@@ -96,7 +96,7 @@ page{
   overflow: hidden;
   margin: 11.5rpx 0 22rpx 0;
   text-align: center;
-  font-size: 30rpx;
+  font-size: 26rpx;
   color: #333;
 }
 

+ 18 - 3
wx-mall/pages/cart/cart.js

@@ -32,7 +32,10 @@ Page({
     checkedSpecText: '请选择规格数量',
     number: 1,
     isAdd: true,
-    mobile: ''
+    mobile: '',
+    retailPrice: '',
+    stockNum: 0,
+    cartNumber: 0,
   },
   onLoad: function (options) {
     // 页面初始化 options为页面跳转所带来的参数
@@ -90,9 +93,13 @@ Page({
   getCartList: function () {//获取购物车数据
     let that = this;
     util.request(api.CartList).then(function (res) {
+      wx.showLoading({
+        title: '加载中...',
+      });
       if (res.errno === 0) {
         that.setCommonData(res);
       }
+      wx.hideLoading();
       //数据渲染选中
       that.setCheckedData();
     });
@@ -409,6 +416,9 @@ Page({
   //购物车增加
   addCart: function (e) {
     let that = this;
+    that.setData({
+      number:1
+    });
     var goodsId = e.currentTarget.dataset.goodsId;
     util.request(api.GoodsSku, { goodsId: goodsId }).then(function (res) {
       if (res.errno === 0 && null != res.data) {
@@ -416,7 +426,9 @@ Page({
           goodsVo: res.data.goodsVo,
           specificationList: res.data.specificationList,
           productList: res.data.productList,
-          openAttr: !that.data.openAttr
+          openAttr: !that.data.openAttr,
+          stockNum: res.data.productList[0].stock_num,
+          cartNumber: res.data.cartNumber
         });
         //
         let _specificationList = res.data.specificationList;
@@ -474,7 +486,10 @@ Page({
         that.getCartList();
         that.getFootprintList();
       } else {
-        util.showErrorToast(res.errmsg)
+        wx.showToast({
+          title: res.errmsg,
+          icon: 'none'
+        })
       }
     });
   },

+ 2 - 2
wx-mall/pages/cart/cart.wxml

@@ -248,7 +248,7 @@
                 <image class="img" src="{{goodsVo.list_pic_url}}"></image>
                 <view class="info">
                   <view class="c">
-                    <view class="p">价格:¥{{checkedProduct[0].retail_price}}</view>
+                    <view class="p">价格:¥{{goodsVo.retail_price}}</view>
                     <view class="a" wx:if="{{productList.length>0}}">已选择:{{checkedSpecText}}</view>
                   </view>
                 </view>
@@ -267,7 +267,7 @@
                   <view class="selnum">
                     <view class="cut" bindtap="cutNumber2">-</view>
                     <input value="{{number}}" class="number" disabled="true" type="number" />
-                    <view class="add" bindtap="addNumber2">+</view>
+                    <view class="{{number+cartNumber>= stockNum? 'addEnabel':'addCart'}}" bindtap="{{number+cartNumber>= stockNum ? '':'addNumber2'}}">+</view>
                   </view>
                 </view>
               </view>

+ 15 - 2
wx-mall/pages/cart/cart.wxss

@@ -466,7 +466,7 @@ page {
   padding: 0 20rpx;
   margin: 11.5rpx 0 22rpx 0;
   text-align: center;
-  font-size: 30rpx;
+  font-size: 26rpx;
   color: #333;
 }
 
@@ -707,4 +707,17 @@ page {
   font-size: 22rpx;
   width: 70rpx;
   padding-left: 10rpx;
-}
+}
+.addCart {
+  width: 93.75rpx;
+  height: 100%;
+  text-align: center;
+  line-height: 65rpx;
+}
+.addEnabel {
+  width: 93.75rpx;
+  height: 100%;
+  text-align: center;
+  line-height: 65rpx;
+  color: #ccc;
+}

+ 4 - 6
wx-mall/pages/catalog/catalog.js

@@ -60,9 +60,6 @@ Page({
   getCatalog: function () {
     //CatalogList
     let that = this;
-    wx.showLoading({
-      title: '加载中...',
-    });
     util.request(api.CatalogList).then(function (res) {
       if (that.data.currentCategory && that.data.currentCategory.id > 0) {
         that.setData({
@@ -74,7 +71,6 @@ Page({
           currentCategory: res.data.currentCategory
         });
       }
-      wx.hideLoading();
       that.getCategoryData();
     });
     util.request(api.GoodsCount).then(function (res) {
@@ -137,6 +133,9 @@ Page({
     that.getGoodsList();
   },
   getGoodsList() {
+    wx.showLoading({
+      title: '加载中...',
+    });
     var that = this;
     if (that.data.currentCategory){
       util.request(api.CatalogProductList, {
@@ -154,6 +153,7 @@ Page({
               goodsList: res.data.data,
               filterCategory: res.data.filterCategory
             });
+            wx.hideLoading();
           }
         });
     }
@@ -220,8 +220,6 @@ Page({
         that.getFootCart();
         goodsList.forEach(function (val, index, arr) {
           res.data.cartList.forEach(function (cartVal, cartIndex, cartArr) {
-            console.log(val.product_id);
-            console.log(cartVal.product_id);
             if (val.product_id == cartVal.product_id) {
               val.cart_num = cartVal.number;
               goodsList[index] = val;

+ 1 - 1
wx-mall/pages/catalog/catalog.wxss

@@ -69,7 +69,7 @@ page {
 
 .catalog .nav .item.active {
   color: #ab2b2b;
-  font-size: 36rpx;
+  font-size: 30rpx;
   border-left: 6rpx solid #ab2b2b;
 }
 

+ 12 - 9
wx-mall/pages/category/category.js

@@ -172,15 +172,18 @@ Page({
         // 页面隐藏
     },
     getGoodsList: function () {
-        var that = this;
-      util.request(api.GoodsList, { categoryId: that.data.id, goodsBizType: that.data.goodsBizType, page: that.data.page, size: that.data.size})
-            .then(function (res) {
-              let goodsList = that.data.goodsList.concat(res.data.data);
-                that.setData({
-                    goodsList: goodsList,
-              });
-              console.log(that.data.goodsList);
-            });
+      wx.showLoading({
+        title: '加载中...',
+      });
+      var that = this;
+      util.request(api.GoodsList, { categoryId: that.data.id, goodsBizType: that.data.goodsBizType, page: that.data.page, size:   that.data.size })
+        .then(function (res) {
+          let goodsList = that.data.goodsList.concat(res.data.data);
+          that.setData({
+            goodsList: goodsList,
+          });
+          wx.hideLoading();
+        });
     },
     onUnload: function () {
         // 页面关闭

+ 1 - 1
wx-mall/pages/category/category.wxss

@@ -113,7 +113,7 @@ color: transparent;
   margin: 11.5rpx 0 22rpx 0;
   text-align: center;
   padding: 0 20rpx;
-  font-size: 30rpx;
+  font-size: 26rpx;
   color: #333;
 }
 .cate-item .item .price{

+ 6 - 3
wx-mall/pages/goods/goods.js

@@ -44,6 +44,9 @@ Page({
     });
   },
   getGoodsInfo: function () {
+    wx.showLoading({
+      title: '加载中...',
+    });
     let that = this;
     util.request(api.GoodsDetail, { id: that.data.id, referrer: this.data.referrer }).then(function (res) {
       if (res.errno === 0) {
@@ -61,6 +64,7 @@ Page({
           cartNumber: res.data.cartNumber,
           defaultFreight: res.data.defaultFreight
         });
+        wx.hideLoading();
 
         if (res.data.userHasCollect == 1) {
           that.setData({
@@ -364,10 +368,9 @@ Page({
             }
           } else {
             wx.showToast({
-              image: '/static/images/icon_error.png',
               title: _res.errmsg,
-              mask: true
-            });
+              icon: 'none'
+            })
           }
         });
 

+ 2 - 1
wx-mall/pages/goods/goods.wxml

@@ -54,7 +54,7 @@
           <text class="org-price line-through">{{goods.market_price?"¥"+goods.market_price:""}}</text>
         </view>
         <text class="name">{{goods.name?goods.name:""}}</text>
-        <text class="desc">{{goods.goods_brief?goods.goods_brief:""}}</text>
+        <!-- <text class="desc">{{goods.goods_brief?goods.goods_brief:""}}</text> -->
         <!-- <view class="brand" wx:if="{{brand.name}}">
           <navigator url="../brandDetail/brandDetail?id={{brand.id}}">
             <text>{{brand.name}}</text>
@@ -62,6 +62,7 @@
         </view> -->
         <view>
           <text class="desc">快递:{{defaultFreight==0?"免邮":"元"}}</text>
+          <text class="desc2">销量:{{goods.sell_volume==null?0:goods.sell_volume}}</text>
         </view>
       </view>
     </view>

+ 14 - 3
wx-mall/pages/goods/goods.wxss

@@ -35,7 +35,7 @@
 
 .goods-info {
   width: 750rpx;
-  height: 246rpx;
+  height: 210rpx;
   overflow: hidden;
   background: #fff;
 }
@@ -51,14 +51,14 @@
 
 .goods-info .c text {
   display: block;
-  width: 687.5rpx;
+  /* width: 687.5rpx; */
   text-align: left;
   font-weight: bolder;
 }
 
 .goods-info .name {
   height: 41rpx;
-  margin-bottom: 5.208rpx;
+  margin-bottom: 10rpx;
   font-size: 30rpx;
   line-height: 41rpx;
   margin-top: 10rpx;
@@ -70,8 +70,19 @@
   font-size: 24rpx;
   line-height: 36rpx;
   color: #999;
+  width: 200rpx;
 }
+.desc2{
+  position:absolute;
+  right:220rpx;
+  top:880rpx;
+  height: 43rpx;
+  margin-bottom: 41rpx;
+  font-size: 24rpx;
+  line-height: 36rpx;
+  color: #999;
 
+}
 .goods-info .goods-do {
   text-align:left;
 }

+ 1 - 1
wx-mall/pages/hotGoods/hotGoods.wxss

@@ -163,7 +163,7 @@ page{
   padding: 0 20rpx;
   margin: 11.5rpx 0 22rpx 0;
   text-align: center;
-  font-size: 30rpx;
+  font-size: 26rpx;
   color: #333;
 }
 

+ 5 - 0
wx-mall/pages/index/index.js

@@ -226,6 +226,11 @@ Page({
           });
           that.setData({ hotGoods: hotGoods });
         }, that);
+      } else {
+        wx.showToast({
+          title: res.errmsg,
+          icon: 'none'
+        })
       }
     });
   },

+ 1 - 1
wx-mall/pages/index/index.wxss

@@ -305,7 +305,7 @@
   display: block;
   color: #333;
   line-height: 50rpx;
-  font-size: 30rpx;
+  font-size: 26rpx;
 }
 
 .a-popular .b .desc {

+ 1 - 1
wx-mall/pages/newGoods/newGoods.wxss

@@ -163,7 +163,7 @@ page{
   overflow: hidden;
   margin: 11.5rpx 0 22rpx 0;
   text-align: center;
-  font-size: 30rpx;
+  font-size: 26rpx;
   color: #333;
 }
 

+ 1 - 1
wx-mall/pages/search/search.wxss

@@ -299,7 +299,7 @@ page {
   text-align: center;
   overflow: hidden;
   padding: 0 20rpx;
-  font-size: 30rpx;
+  font-size: 26rpx;
   color: #333;
 }
 

+ 1 - 7
wx-mall/pages/shopping/checkout/checkout.js

@@ -103,7 +103,7 @@ Page({
         that.setData({
           checkedGoodsList: res.data.checkedGoodsList,
           actualPrice: res.data.actualPrice,
-          // addressVo: res.data.addressVo,
+          addressVo: res.data.addressVo,
           checkedCoupon: res.data.checkedCoupon,
           couponList: res.data.couponList,
           fullCutCouponId: res.data.fullCutCouponId,
@@ -118,12 +118,6 @@ Page({
           userName: res.data.userName,
           idNo: res.data.idNo
         });
-
-        if (res.data.addressVo){
-          that.setData({
-            addressVo: res.data.addressVo
-          });
-        } 
         if (that.data.idNo) {
           that.setData({
             idNoM: that.formatidcard(that.data.idNo)

+ 11 - 9
wx-mall/pages/ucenter/addressAdd/addressAdd.js

@@ -89,14 +89,16 @@ Page({
   },
   chooseRegion() {
     let that = this;
-    this.setData({
-      openSelectRegion: !this.data.openSelectRegion
+    that.setData({
+      openSelectRegion: !that.data.openSelectRegion
     });
+    console.log(that.data.openSelectRegion);
 
     //设置区域选择数据
-    let address = this.data.address;
+    let address = that.data.address;
+    console.log(address);
     if (address.provinceId > 0 && address.cityId > 0 && address.countyId > 0) {
-      let selectRegionList = this.data.selectRegionList;
+      let selectRegionList = that.data.selectRegionList;
       selectRegionList[0].id = address.provinceId;
       selectRegionList[0].name = address.provinceName;
       selectRegionList[0].parent_id = 1;
@@ -109,14 +111,14 @@ Page({
       selectRegionList[2].name = address.countyName;
       selectRegionList[2].parent_id = address.cityId;
 
-      this.setData({
+      that.setData({
         selectRegionList: selectRegionList,
         regionType: 3
       });
 
-      this.getRegionList(address.cityId);
+      that.getRegionList(address.cityId);
     } else {
-      this.setData({
+      that.setData({
         selectRegionList: [
           { id: 0, name: '省份', parent_id: 1, type: 1 },
           { id: 0, name: '城市', parent_id: 1, type: 2 },
@@ -124,10 +126,10 @@ Page({
         ],
         regionType: 1
       })
-      this.getRegionList(1);
+      that.getRegionList(1);
     }
 
-    this.setRegionDoneStatus();
+    that.setRegionDoneStatus();
 
   },
   onLoad: function (options) {

+ 7 - 1
wx-mall/pages/ucenter/coupon/coupon.js

@@ -8,7 +8,7 @@ var app = getApp();
 Page({
   data: {
     couponList: [],
-    couponNumber: '',
+    couponNumber: ''
   },
   bindCouponNumberInput: function (e) {
     this.setData({
@@ -73,5 +73,11 @@ Page({
     wx.switchTab({
       url: url,
     });
+  },
+  clearData: function () {
+    let that = this;
+    that.setData({
+      couponNumber: ''
+    });
   }
 })

+ 3 - 2
wx-mall/pages/ucenter/coupon/coupon.wxml

@@ -1,8 +1,9 @@
 <view class="container">
   <view class="coupon-form">
     <view class="input-box">
-      <input class="coupon-sn" placeholder="请输入优惠码" bindinput="bindCouponNumberInput" />
-      <image class="clear-icon" src="/static/images/clear.png"></image>
+      <input class="coupon-sn" value="{{couponNumber}}" placeholder="请输入优惠码" bindinput="bindCouponNumberInput" />
+        <view bindtap="clearData"><image class="clear-icon" src="/static/images/clear-fb.png"></image>
+      </view>
     </view>
     <button class="add-btn" bindtap="exchangeCoupon">兑换</button>
   </view>

+ 1 - 0
wx-mall/pages/ucenter/coupon/coupon.wxss

@@ -48,6 +48,7 @@ page {
   right: 30rpx;
   width: 28rpx;
   height: 28rpx;
+  z-index:9999;
 }
 
 .add-btn {

+ 29 - 14
wx-mall/pages/ucenter/idCard/idCard.js

@@ -7,6 +7,7 @@ Page({
     curUser: {},
     idNoM: '',
     idNo: '',
+    currentIdNo: '',
     userName: ''
   },
   onLoad: function (options) {
@@ -41,6 +42,7 @@ Page({
           that.setData({
             idNoM: that.formatidcard(res.data.idNo),
             idNo: res.data.idNo,
+            currentIdNo: res.data.idNo,
             userName: res.data.username
           });
         }
@@ -57,30 +59,38 @@ Page({
   saveIdCard: function (e) {
     let that = this;
     if (!e.detail.value.idNo) {
-      util.showErrorToast('身份证号不能为空');
+      wx.showToast({
+        title: '身份证号不能为空',
+        icon: 'none'
+      });
       return false;
     }
 
     if (!e.detail.value.username) {
-      util.showErrorToast('姓名不能为空');
+      wx.showToast({
+        title: '姓名不能为空',
+        icon: 'none'
+      });
       return false;
     }
     if (that.data.idNoM != that.formatidcard(e.detail.value.idNo)) {
       that.setData({
         idNo: e.detail.value.idNo
       });
-    }
-    if (that.data.userName != e.detail.value.username) {
+    } else {
       that.setData({
-        userName: e.detail.value.username
-      });
+        idNo: that.data.currentIdNo
+      });      
     }
+    that.setData({
+      userName: e.detail.value.username
+    });
+    console.log(that.data.idNo);
 
     if (!that.checkIdcard(that.data.idNo)) {
-      wx.showModal({
-        title: '提示信息',
-        content: '请输入正确的身份证号',
-        showCancel: false
+      wx.showToast({
+        title: '请输入正确的身份证号',
+        icon: 'none'
       });
       return false;
     }
@@ -101,14 +111,19 @@ Page({
         //   url: '/pages/ucenter/index/index'
         // });
       } else {
-        wx.showModal({
-          title: '提示信息',
-          content: res.errmsg,
-          showCancel: false
+        wx.showToast({
+          title: res.errmsg,
+          icon: 'none'
         });
       }
     });
   },
+  clearData: function () {
+    let that = this;
+    that.setData({
+      idNoM: ''
+    });
+  },
   formatidcard(idcard) {
     if (idcard.length == 15) {
       return idcard.replace(/(\d{6})\d{6}(\d{3})/, "$1******$2");

+ 4 - 2
wx-mall/pages/ucenter/idCard/idCard.wxml

@@ -4,11 +4,13 @@
     <text class='id-card-txt'>身份证信息用于跨境商品入境申报,请输入购买者姓名和身份证号码一致的身份证信息确保正常清关;姓名需要与身份证信息一致。</text>
       <view class="form-item">
         <label>身份证号:</label>
-        <input class="input" bindinput="bindinputUserName" name='idNo' placeholder="身份证" value="{{idNoM}}" auto-focus/>
+        <input class="input" name='idNo' placeholder="身份证" value="{{idNoM}}" auto-focus/>
+        <view bindtap="clearData"><image class="clear-icon" src="/static/images/clear-fb.png"></image>
+      </view>
       </view>
       <view class="form-item">
         <label>姓名:</label>
-        <input class="input" bindinput="bindinputTelNumber" name='username' value="{{curUser.username}}" placeholder="姓名" />
+        <input class="input" name='username' value="{{curUser.username}}" placeholder="姓名" />
       </view>
     </view>
 

+ 9 - 0
wx-mall/pages/ucenter/idCard/idCard.wxss

@@ -188,4 +188,13 @@ page {
   font-size:22rpx;
   margin-left: 20rpx;
   color: #a5a3a3;
+}
+
+.clear-icon{
+  position: absolute;
+  top:110rpx;
+  right:30rpx;
+  width:32rpx;
+  height:32rpx;
+  z-index:9999;
 }

+ 6 - 6
wx-mall/pages/ucenter/index/index.wxss

@@ -29,8 +29,8 @@ page {
   /* position: absolute; */
   /* margin-left: 20rpx; */
   display: block;
-  width: 160rpx;
-  height: 160rpx;
+  width: 140rpx;
+  height: 140rpx;
   margin: 40rpx;
   /* margin-top: 80rpx; */
   border-radius: 50%;
@@ -54,13 +54,13 @@ page {
 }
 
 .userlevel {
-  font-size: 16px;
+  font-size: 14px;
   color: red;
 }
 .item-all {
   width: 100%;
-  height: 50rpx;
-  line-height: 50rpx;
+  height: 60rpx;
+  line-height: 60rpx;
   overflow: hidden;
   background: #fff;
   display: flex;
@@ -305,7 +305,7 @@ page {
 }
 .txt-info{
   display: block;
-  font-size: 15px;
+  font-size: 12px;
   color: red;
   height: 40rpx;
   border-radius: 50%;

+ 1 - 1
wx-mall/pages/ucenter/orderDetail/orderDetail.wxml

@@ -54,7 +54,7 @@
   </view>
   <view class="order-info">
     <view class="item-a"><image src="../../../static/images/service-hsdz.png" class="icon"></image> {{orderInfo.consignee}}     {{orderInfo.mobile}}</view>
-    <view class="item-b2">收货地址:{{orderInfo.address}}</view>
+    <view class="item-b2">收货地址:{{orderInfo.province}}{{orderInfo.city}}{{orderInfo.district}}{{orderInfo.address}}</view>
   </view>
 
   <view class="list-group goods-info">