1
0
Переглянути джерело

小程序管理前后端修改

hyq 6 роки тому
батько
коміт
cb6462a59d
39 змінених файлів з 1133 додано та 244 видалено
  1. 29 1
      kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java
  2. 30 4
      kmall-api/src/main/java/com/kmall/api/api/ApiIndexController.java
  3. 21 18
      kmall-api/src/main/java/com/kmall/api/api/ApiPayController.java
  4. 4 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiOrderGoodsMapper.java
  5. 3 0
      kmall-api/src/main/java/com/kmall/api/dao/ApiOrderMapper.java
  6. 1 0
      kmall-api/src/main/java/com/kmall/api/entity/CartVo.java
  7. 10 0
      kmall-api/src/main/java/com/kmall/api/entity/OrderVo.java
  8. 48 0
      kmall-api/src/main/java/com/kmall/api/entity/UserVo.java
  9. 5 0
      kmall-api/src/main/java/com/kmall/api/service/ApiOrderGoodsService.java
  10. 56 10
      kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java
  11. 10 7
      kmall-api/src/main/java/com/kmall/api/service/ApiPayService.java
  12. 9 0
      kmall-api/src/main/resources/mybatis/mapper/ApiOrderGoodsMapper.xml
  13. 21 0
      kmall-api/src/main/resources/mybatis/mapper/ApiOrderMapper.xml
  14. 2 1
      wx-mall/app.json
  15. 5 2
      wx-mall/app.wxss
  16. 66 91
      wx-mall/pages/cart/cart.js
  17. 1 1
      wx-mall/pages/cart/cart.json
  18. 37 3
      wx-mall/pages/cart/cart.wxml
  19. 6 0
      wx-mall/pages/catalog/catalog.js
  20. 3 0
      wx-mall/pages/catalog/catalog.wxml
  21. 2 2
      wx-mall/pages/catalog/catalog.wxss
  22. 5 0
      wx-mall/pages/index/index.wxml
  23. 1 1
      wx-mall/pages/pay/pay.js
  24. 213 28
      wx-mall/pages/shopping/checkout/checkout.js
  25. 266 32
      wx-mall/pages/shopping/checkout/checkout.wxml
  26. 163 7
      wx-mall/pages/shopping/checkout/checkout.wxss
  27. 1 1
      wx-mall/pages/ucenter/index/index.json
  28. 22 8
      wx-mall/pages/ucenter/index/index.wxml
  29. 28 16
      wx-mall/pages/ucenter/index/index.wxss
  30. 15 5
      wx-mall/pages/ucenter/order/order.js
  31. 18 4
      wx-mall/pages/ucenter/order/order.wxml
  32. 32 2
      wx-mall/pages/ucenter/order/order.wxss
  33. BIN
      wx-mall/static/images/service-dw.png
  34. BIN
      wx-mall/static/images/service-ptsp.png
  35. BIN
      wx-mall/static/images/service-sc.png
  36. BIN
      wx-mall/static/images/service-sfz.png
  37. BIN
      wx-mall/static/images/service-tg.png
  38. BIN
      wx-mall/static/images/service-yhj.png
  39. BIN
      wx-mall/static/images/service-zj.png

+ 29 - 1
kmall-api/src/main/java/com/kmall/api/api/ApiCartController.java

@@ -43,6 +43,8 @@ public class ApiCartController extends ApiBaseAction {
     private ApiUserCouponService apiUserCouponService;
     @Autowired
     private ApiOrderGoodsService apiOrderGoodsService;
+    @Autowired
+    private ApiUserService apiUserService;
 
     /**
      * 获取购物车中的数据
@@ -103,6 +105,7 @@ public class ApiCartController extends ApiBaseAction {
         BigDecimal checkedGoodsAmount = new BigDecimal(0.00);
         List<CartVo> cart00List = new ArrayList<>();
         List<CartVo> cart02List = new ArrayList<>();
+        List<CartVo> cart10List = new ArrayList<>();
         List<CartVo> cart11List = new ArrayList<>();
         for (CartVo cartItem : cartList) {
             goodsCount += cartItem.getNumber();
@@ -125,6 +128,10 @@ public class ApiCartController extends ApiBaseAction {
                 CartVo cartVo02= cartItem;
                 cart02List.add(cartVo02);
             }
+            if(Dict.orderBizType.item_10.getItem().equalsIgnoreCase(cartItem.getGoodsBizType())){
+                CartVo cartVo10= cartItem;
+                cart10List.add(cartVo10);
+            }
             if(Dict.orderBizType.item_11.getItem().equalsIgnoreCase(cartItem.getGoodsBizType())){
                 CartVo cartVo11= cartItem;
                 cart11List.add(cartVo11);
@@ -149,6 +156,7 @@ public class ApiCartController extends ApiBaseAction {
 
         resultObj.put("cart00List", cart00List);//{'cartList':{'type': '保税备货','data':{}}}
         resultObj.put("cart02List", cart02List);
+        resultObj.put("cart10List", cart10List);
         resultObj.put("cart11List", cart11List);
         resultObj.put("cartList", cartList);
         //
@@ -318,7 +326,22 @@ public class ApiCartController extends ApiBaseAction {
             cartInfo.setGoods_specification_ids(goodsVo.getGoods_specification_ids());
             cartInfo.setChecked(1);
             cartInfo.setGoodsBizType(goodsVo.getOrderBizType());
-            cartService.save(cartInfo);
+
+            Map map = new HashMap();
+            map.put("user_id",loginUser.getId());
+            map.put("goods_id",goodsVo.getGoods_id());
+            map.put("product_id",goodsVo.getProduct_id());
+            map.put("number",goodsVo.getNumber());
+            List<CartVo> list= cartService.queryList(map);
+            if(list != null && list.size() > 0){
+                for (CartVo vo:list) {
+                    cartInfo.setId(vo.getId());
+                    cartService.update(cartInfo);
+                }
+            }else{
+                cartService.save(cartInfo);
+            }
+
         }
         return toResponsSuccess("添加成功");
     }
@@ -561,6 +584,11 @@ public class ApiCartController extends ApiBaseAction {
                 resultObj.put("addressVo", addressEntityList.get(0));
             }
         }
+        UserVo userVo = apiUserService.queryObject(loginUser.getId());
+        if(userVo != null){
+            resultObj.put("idNo", userVo.getIdNo());
+            resultObj.put("userName", userVo.getUsername());
+        }
         return toResponsSuccess(resultObj);
     }
 

+ 30 - 4
kmall-api/src/main/java/com/kmall/api/api/ApiIndexController.java

@@ -1,14 +1,15 @@
 package com.kmall.api.api;
 
+import com.alibaba.fastjson.JSONObject;
 import com.kmall.api.annotation.IgnoreAuth;
-import com.kmall.api.entity.AdVo;
-import com.kmall.api.entity.CartVo;
-import com.kmall.api.entity.ChannelVo;
-import com.kmall.api.entity.GoodsVo;
+import com.kmall.api.annotation.LoginUser;
+import com.kmall.api.entity.*;
 import com.kmall.api.service.*;
 import com.kmall.api.util.ApiBaseAction;
+import org.apache.log4j.Logger;
 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;
 
@@ -25,6 +26,7 @@ import java.util.Map;
 @RestController
 @RequestMapping("/api/index")
 public class ApiIndexController extends ApiBaseAction {
+    protected Logger log = Logger.getLogger(ApiIndexController.class);
     @Autowired
     private ApiAdService apiAdService;
     @Autowired
@@ -35,6 +37,8 @@ public class ApiIndexController extends ApiBaseAction {
     private ApiCartService cartService;
     @Autowired
     private ApiOrderService apiOrderService;
+    @Autowired
+    private ApiUserService apiUserService;
 
     /**
      * app首页
@@ -113,4 +117,26 @@ public class ApiIndexController extends ApiBaseAction {
         resultObj.put("countMap", countMap);
         return toResponsSuccess(resultObj);
     }
+
+    @PostMapping("idCardRealName")
+    public Object idCardRealName(@LoginUser UserVo loginUser) {
+        JSONObject jsonParam = getJsonRequest();
+
+        Long userId = getUserId();
+        String idNo = jsonParam.getString("idNo");
+        String username = jsonParam.getString("userName");
+        // TODO: 2018/10/18 实名验证
+
+        UserVo userVo = new UserVo();
+        userVo.setUsername(username);
+        userVo.setIdNo(idNo);
+        userVo.setId(userId);
+        try {
+            apiUserService.update(userVo);
+        }catch (Exception e){
+            log.error("系统异常",e);
+            return toResponsFail("系统异常");
+        }
+        return toResponsMsgSuccess("实名绑定成功");
+    }
 }

+ 21 - 18
kmall-api/src/main/java/com/kmall/api/api/ApiPayController.java

@@ -54,24 +54,28 @@ public class ApiPayController extends ApiBaseAction {
      * 获取支付的请求参数
      */
     @GetMapping("pay_prepay")
-    public Object payPrepay(@LoginUser UserVo loginUser, Long orderId) {
+    public Object payPrepay(@LoginUser UserVo loginUser, Long[] orderIds) {
         //
-//        List<Long> orderIdList=new ArrayList<>();
-//        List<OrderVo> orderList=new ArrayList<>();
-//        for(int i=0;i<orderIds.length;i++){
-//            orderIdList.add(orderIds[i]);
-//            OrderVo orderInfo = orderService.queryObject(orderIds[i]);
-//        }
-        OrderVo orderInfo = orderService.queryObject(orderId);
-
-        if (null == orderInfo) {
-            return toResponsObject(400, "订单已取消", "");
+        List<Long> orderIdList=new ArrayList<>();
+        String merchOrderSn = "";
+        for(int i=0;i<orderIds.length;i++){
+            orderIdList.add(orderIds[i]);
         }
+        List<OrderVo> orderVoList = orderService.queryObjectByIdList(orderIdList);
+
+        for (OrderVo orderInfo:orderVoList) {
+            if (null == orderInfo) {
+                return toResponsObject(400, "订单号为"+orderInfo.getOrder_sn()+"的订单已取消", "");
+            }
 
-        if (orderInfo.getPay_status() != 0 && orderInfo.getPay_status() != 1) {
-            return toResponsObject(400, "订单已支付,请不要重复操作", "");
+            if (orderInfo.getPay_status() != 0 && orderInfo.getPay_status() != 1) {
+                return toResponsObject(400, "订单号为"+orderInfo.getOrder_sn()+"的订单已支付,请不要重复操作", "");
+            }
+            merchOrderSn = orderInfo.getMerchOrderSn();
         }
 
+
+
         String nonceStr = CharUtil.getRandomString(32);
 
         //https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_7&index=3
@@ -85,12 +89,11 @@ public class ApiPayController extends ApiBaseAction {
             parame.put("mch_id", WxPayPropertiesBuilder.instance().getMchId());// 商家账号。
             String randomStr = CharUtil.getRandomNum(18).toUpperCase();
             parame.put("nonce_str", randomStr);// 随机字符串
-            parame.put("out_trade_no", orderInfo.getOrder_sn());// 商户订单编号
-            Map orderGoodsParam = new HashMap();
-            orderGoodsParam.put("order_id", orderId);
+            parame.put("out_trade_no", merchOrderSn);// 商户订单编号
             parame.put("body", "商城-支付");// 商品描述
+
             //订单的商品
-            List<OrderGoodsVo> orderGoods = orderGoodsService.queryList(orderGoodsParam);
+            List<OrderGoodsVo> orderGoods = orderGoodsService.queryListByIds(orderIdList);
             if (null != orderGoods) {
                 String body = "商城-";
                 for (OrderGoodsVo goodsVo : orderGoods) {
@@ -134,7 +137,7 @@ public class ApiPayController extends ApiBaseAction {
                 if (result_code.equalsIgnoreCase("FAIL")) {
                     return toResponsFail("支付失败," + err_code_des);
                 } else if (result_code.equalsIgnoreCase("SUCCESS")) {
-                    apiPayService.payPrepay(resultObj, resultUn, nonceStr, orderInfo);
+                    apiPayService.payPrepay(resultObj, resultUn, nonceStr, orderVoList);
                     return toResponsObject(0, "微信统一订单下单成功", resultObj);
                 }
             }

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

@@ -2,8 +2,11 @@ package com.kmall.api.dao;
 
 import com.kmall.api.entity.OrderGoodsVo;
 import com.kmall.common.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
+
 /**
  * 
  * 
@@ -13,5 +16,6 @@ import org.springframework.stereotype.Component;
  */
 @Component
 public interface ApiOrderGoodsMapper extends BaseDao<OrderGoodsVo> {
+    List<OrderGoodsVo> queryListByIds(@Param("orderIdList")List<Long> orderIdList);
 	
 }

+ 3 - 0
kmall-api/src/main/java/com/kmall/api/dao/ApiOrderMapper.java

@@ -5,6 +5,7 @@ import com.kmall.common.dao.BaseDao;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -31,4 +32,6 @@ public interface ApiOrderMapper extends BaseDao<OrderVo> {
      * @return
      */
     Map queryUcenterMap(Map<String, Object> map);
+
+    List<OrderVo> queryObjectByIdList(@Param("orderIdList")List<Long> orderIdList);
 }

+ 1 - 0
kmall-api/src/main/java/com/kmall/api/entity/CartVo.java

@@ -49,6 +49,7 @@ public class CartVo implements Serializable {
 
 
     private String sku;
+
     private String goodsBizType;
 
     private String goodsBizTypeName;

+ 10 - 0
kmall-api/src/main/java/com/kmall/api/entity/OrderVo.java

@@ -155,6 +155,16 @@ public class OrderVo implements Serializable {
 
     private Date tstm;
 
+    private String merchOrderSn;
+
+    public String getMerchOrderSn() {
+        return merchOrderSn;
+    }
+
+    public void setMerchOrderSn(String merchOrderSn) {
+        this.merchOrderSn = merchOrderSn;
+    }
+
     public String getSku() {
         return sku;
     }

+ 48 - 0
kmall-api/src/main/java/com/kmall/api/entity/UserVo.java

@@ -55,6 +55,54 @@ public class UserVo implements Serializable {
 
     private Date tstm;
 
+    public String getIdNo() {
+        return idNo;
+    }
+
+    public void setIdNo(String idNo) {
+        this.idNo = idNo;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public Date getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     public String getUserLevel() {
         return userLevel;
     }

+ 5 - 0
kmall-api/src/main/java/com/kmall/api/service/ApiOrderGoodsService.java

@@ -49,4 +49,9 @@ public class ApiOrderGoodsService {
         orderGoodsDao.deleteBatch(ids);
     }
 
+
+    public List<OrderGoodsVo> queryListByIds(List<Long> orderIdList){
+        return orderGoodsDao.queryListByIds(orderIdList);
+    }
+
 }

+ 56 - 10
kmall-api/src/main/java/com/kmall/api/service/ApiOrderService.java

@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 
@@ -73,7 +74,6 @@ public class ApiOrderService {
         return apiOrderMapper.queryTotal(map);
     }
 
-
     public void save(OrderVo order) {
         apiOrderMapper.save(order);
     }
@@ -119,6 +119,21 @@ public class ApiOrderService {
 
         Integer userCouponId = jsonParam.getInteger("userCouponId");
         String formId = jsonParam.getString("formId");
+        String idNo = jsonParam.getString("idNo");
+        String userName = jsonParam.getString("userName");
+        String postscript00 = jsonParam.getString("postscript00");
+        String postscript02 = jsonParam.getString("postscript02");
+        String postscript10 = jsonParam.getString("postscript10");
+        String postscript11 = jsonParam.getString("postscript11");
+
+
+        // TODO: 2018/10/18 实名认证身份证信息,认证成功更新到用户表
+        UserVo userVo = new UserVo();
+        userVo.setId(loginUser.getId());
+        userVo.setIdNo(idNo);
+        userVo.setUsername(userName);
+        apiUserMapper.update(userVo);
+
         //获取要购买的商品
         Map param = new HashMap();
         param.put("user_id", loginUser.getId());
@@ -146,33 +161,60 @@ public class ApiOrderService {
             productVos.add(productInfo);
         }
         List<OrderVo> orderInfoList = new ArrayList();
+        OrderVo order00 = null;
+        OrderVo order02 = null;
+        OrderVo order10 = null;
+        OrderVo order11 = null;
+        String merchOrderSn = "EMATO"+new SimpleDateFormat("yyyyMMddhhmmss").format(new Date());
         //订单按业务类型进行分单
         for (CartVo goodsItem : checkedGoodsList) {
-            OrderVo order00 = new OrderVo();
-            OrderVo order02 = new OrderVo();
-            OrderVo order10 = new OrderVo();
-            OrderVo order11 = new OrderVo();
+            //订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
             if(Dict.orderBizType.item_00.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
                 order00 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
-                order00.setOrderBizType(goodsItem.getGoodsBizType());//订单业务类型:00:保税备货, 02:保税展示补货,10:保税展示跨境,11:普通商品
-                orderInfoList.add(order00);
+                order00.setOrderBizType(goodsItem.getGoodsBizType());
+                order00.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript00)) {
+                    order00.setPostscript(postscript00);
+                }
             }
             if(Dict.orderBizType.item_02.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
                 order02 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
                 order02.setOrderBizType(goodsItem.getGoodsBizType());
-                orderInfoList.add(order02);
+                order02.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript02)) {
+                    order02.setPostscript(postscript02);
+                }
             }
             if(Dict.orderBizType.item_10.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
                 order10 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
                 order10.setOrderBizType(goodsItem.getGoodsBizType());
-                orderInfoList.add(order10);
+                order10.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript10)) {
+                    order10.setPostscript(postscript10);
+                }
             }
             if(Dict.orderBizType.item_11.getItem().equalsIgnoreCase(goodsItem.getGoodsBizType())){
                 order11 = setOrderVo(loginUser,jsonParam,storeId,checkedGoodsList,goodsItem.getGoodsBizType());
                 order11.setOrderBizType(goodsItem.getGoodsBizType());
-                orderInfoList.add(order11);
+                order11.setMerchOrderSn(merchOrderSn);
+                if(org.apache.commons.lang.StringUtils.isNotEmpty(postscript11)) {
+                    order11.setPostscript(postscript11);
+                }
             }
         }
+        if(order00!=null){
+            orderInfoList.add(order00);
+        }
+        if(order02!=null){
+            orderInfoList.add(order02);
+        }
+        if(order10!=null){
+            orderInfoList.add(order10);
+        }
+        if(order11!=null){
+            orderInfoList.add(order11);
+        }
+
         //开启事务,插入订单信息和订单商品
         if(orderInfoList != null && orderInfoList.size() > 0) {
             apiOrderMapper.saveBatch(orderInfoList);
@@ -525,4 +567,8 @@ public class ApiOrderService {
         }
         return FeiGeUtils.printMsg(sn, content, "1");
     }
+
+    public List<OrderVo> queryObjectByIdList(List<Long> orderIdList){
+        return apiOrderMapper.queryObjectByIdList(orderIdList);
+    }
 }

+ 10 - 7
kmall-api/src/main/java/com/kmall/api/service/ApiPayService.java

@@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -38,7 +39,7 @@ public class ApiPayService {
 
 
     @Transactional
-    public void payPrepay(Map<Object, Object> resultObj, Map<String, Object> resultUn, String nonceStr, OrderVo orderInfo) {
+    public void payPrepay(Map<Object, Object> resultObj, Map<String, Object> resultUn, String nonceStr, List<OrderVo> orderVoList) {
         String prepay_id = MapUtils.getString("prepay_id", resultUn);
         // 先生成paySign 参考https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=7_7&index=5
         //resultObj.put("appId", ResourceUtil.getConfigByName("wx.appId"));
@@ -50,12 +51,14 @@ public class ApiPayService {
         //String paySign = WechatUtil.arraySign(resultObj, ResourceUtil.getConfigByName("wx.paySignKey"));
         String paySign = WechatUtil.arraySign(resultObj, WxPayPropertiesBuilder.instance().getPaySignKey());
         resultObj.put("paySign", paySign);
-        // 业务处理
-        orderInfo.setPay_id(prepay_id);
-        orderInfo.setPay_status(1); // 付款中
-        orderService.update(orderInfo);
-        // 保存form_id
-        formIdsService.save(orderInfo.getUser_id(), prepay_id, 1);
+        for (OrderVo orderInfo: orderVoList) {
+            // 业务处理
+            orderInfo.setPay_id(prepay_id);
+            orderInfo.setPay_status(1); // 付款中
+            orderService.update(orderInfo);
+            // 保存form_id
+            formIdsService.save(orderInfo.getUser_id(), prepay_id, 1);
+        }
     }
 
     @Transactional

+ 9 - 0
kmall-api/src/main/resources/mybatis/mapper/ApiOrderGoodsMapper.xml

@@ -177,4 +177,13 @@
         </foreach>
     </delete>
 
+
+    <select id="queryListByIds" resultMap="orderGoodsMap">
+        select a.*
+        from mall_order_goods a
+        where a.order_id in
+        <foreach collection="orderIdList" item="orderId" open="(" close=")" separator=",">
+            #{orderId}
+        </foreach>
+    </select>
 </mapper>

+ 21 - 0
kmall-api/src/main/resources/mybatis/mapper/ApiOrderMapper.xml

@@ -62,6 +62,7 @@
         <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
         <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
         <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
+        <result column="merch_order_sn" property="merchOrderSn" jdbcType="VARCHAR" />
     </resultMap>
 
     <select id="queryObject" resultMap="orderMap">
@@ -199,6 +200,9 @@
         <if test="merchSn != null" >
             merch_sn,
         </if>
+        <if test="merchOrderSn != null" >
+            merch_order_sn,
+        </if>
         <if test="orderBizType != null" >
             order_biz_type,
         </if>
@@ -270,6 +274,9 @@
         <if test="merchSn != null" >
             #{merchSn,jdbcType=VARCHAR},
         </if>
+        <if test="merchOrderSn != null" >
+            #{merchOrderSn,jdbcType=VARCHAR},
+        </if>
         <if test="orderBizType != null" >
             #{orderBizType,jdbcType=CHAR},
         </if>
@@ -300,6 +307,15 @@
 		)
 	</insert>
 
+    <select id="queryObjectByIdList" resultMap="orderMap">
+        select a.*
+        from mall_order a
+        where a.id in
+        <foreach collection="orderIdList" item="orderId" open="(" close=")" separator=",">
+            #{orderId}
+        </foreach>
+    </select>
+
     <insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
         insert into mall_order
         (
@@ -342,6 +358,7 @@
         `coupon_name`,
         `comment_count`,
          merch_sn,
+        merch_order_sn,
          order_biz_type,
          pay_transaction_id,
          pay_mobile,
@@ -390,6 +407,7 @@
             #{orderInfo.coupon_name},
             #{orderInfo.comment_count},
             #{orderInfo.merchSn,jdbcType=VARCHAR},
+            #{orderInfo.merchOrderSn,jdbcType=VARCHAR},
             #{orderInfo.orderBizType,jdbcType=CHAR},
             #{orderInfo.payTransactionId,jdbcType=VARCHAR},
             #{orderInfo.payMobile,jdbcType=VARCHAR},
@@ -446,6 +464,9 @@
             <if test="merchSn != null" >
                 merch_sn = #{merchSn,jdbcType=VARCHAR},
             </if>
+            <if test="merchOrderSn != null" >
+                merch_order_sn = #{merchOrderSn,jdbcType=VARCHAR},
+            </if>
             <if test="orderBizType != null" >
                 order_biz_type = #{orderBizType,jdbcType=CHAR},
             </if>

+ 2 - 1
wx-mall/app.json

@@ -48,7 +48,8 @@
     "pages/map/map",
     "pages/auth/btnAuth/btnAuth",
     "pages/ucenter/wuliu/wuliu",
-    "pages/ucenter/wuliuwebview/wuliuwebview"
+    "pages/ucenter/wuliuwebview/wuliuwebview",
+    "pages/ucenter/idCard/idCard"
   ],
   "window": {
     "backgroundTextStyle": "dark",

+ 5 - 2
wx-mall/app.wxss

@@ -110,11 +110,11 @@ view, text {
 }
 
 .list-cell-bd .list-label {
-  font-size: 1em;
+  font-size: 24rpx;
 }
 
 .list-cell-bd .list-label-desc {
-  font-size: 0.9em;
+  font-size: 24rpx;
   color: #9b9b9b;
   padding-top: 5px;
 }
@@ -125,6 +125,9 @@ view, text {
   text-align: right;
   color: #999;
 }
+.list-cell-ft .txt {
+  font-size: 24rpx;
+}
 
 .list-cell-ft.router::after {
   content: " ";

+ 66 - 91
wx-mall/pages/cart/cart.js

@@ -8,8 +8,10 @@ Page({
   data: {
     cartGoods00: [],//保税仓数据
     cartGoods02: [],//保税展示数据
-    cartGoods11: [],//现场速递数据
+    cartGoods10: [],//现场速递数据
+    cartGoods11: [],//普通商品
     cartGoods: [],
+    goodsBizTypeList: ['保税仓','保税展示','现场速递','普通商品'],
     goodsBizType: '',//货品业务类型
     footprintList: [],
     cartTotal: {
@@ -21,6 +23,7 @@ Page({
     checkedAllStatus: true,
     checkedTypeStatus00: true,
     checkedTypeStatus02: true,
+    checkedTypeStatus10: true,
     checkedTypeStatus11: true,
     couponInfoList: [],
     openAttr: false,
@@ -48,28 +51,46 @@ Page({
     // 页面关闭
 
   },
+  setCommonData(res) {
+    let that = this;
+    that.setData({
+      cartGoods: res.data.cartList,
+      cartGoods00: res.data.cart00List,
+      cartGoods02: res.data.cart02List,
+      cartGoods10: res.data.cart10List,
+      cartGoods11: res.data.cart11List,
+      cartTotal: res.data.cartTotal,
+      couponInfoList: res.data.couponInfoList
+    });
+  },
+  setCheckedData() {
+    let that = this;
+    that.setData({
+      checkedAllStatus: that.isCheckedAll(),
+      checkedTypeStatus00: that.isCheckedTypeStatus00(),
+      checkedTypeStatus02: that.isCheckedTypeStatus02(),
+      checkedTypeStatus10: that.isCheckedTypeStatus10(),
+      checkedTypeStatus11: that.isCheckedTypeStatus11()
+    });
+  },
+  setCheckedAllData() {
+    let that = this;
+    that.setData({
+      checkedAllStatus: that.isCheckedAll(),
+      checkedTypeStatus00: that.isCheckedAll(),
+      checkedTypeStatus02: that.isCheckedAll(),
+      checkedTypeStatus10: that.isCheckedAll(),
+      checkedTypeStatus11: that.isCheckedAll()
+    });
+  },
   getCartList: function () {//获取购物车数据
     let that = this;
     util.request(api.CartList).then(function (res) {
       if (res.errno === 0) {
-        that.setData({
-          cartGoods: res.data.cartList,
-          cartGoods00: res.data.cart00List,
-          cartGoods02: res.data.cart02List,
-          cartGoods11: res.data.cart11List,
-          cartTotal: res.data.cartTotal,
-          couponInfoList: res.data.couponInfoList
-        });
+        that.setCommonData(res);
       }
       //数据渲染选中
-      that.setData({
-        checkedAllStatus: that.isCheckedAll()
-      });
-      that.setData({
-        checkedTypeStatus00: that.isCheckedTypeStatus00(),
-        checkedTypeStatus02: that.isCheckedTypeStatus02(),
-        checkedTypeStatus11: that.isCheckedTypeStatus11()
-      });
+      that.setCheckedData();
     });
   },
   isCheckedAll: function () {
@@ -102,6 +123,16 @@ Page({
       }
     });
   },
+  isCheckedTypeStatus10: function () {
+    //判断该业务类型的购物车商品是否已全选
+    return this.data.cartGoods10.every(function (element, index, array) {
+      if (element.checked == true) {
+        return true;
+      } else {
+        return false;
+      }
+    });
+  },
   isCheckedTypeStatus11: function () {
     //判断该业务类型的购物车商品是否已全选
     return this.data.cartGoods11.every(function (element, index, array) {
@@ -126,22 +157,9 @@ Page({
       isChecked: that.data.cartGoods[itemIndex].checked ? 0 : 1
     }, 'POST').then(function (res) {
       if (res.errno === 0) {
-        console.log(res.data);
-        that.setData({
-          cartGoods: res.data.cartList,
-          cartGoods00: res.data.cart00List,
-          cartGoods02: res.data.cart02List,
-          cartGoods11: res.data.cart11List,
-          cartTotal: res.data.cartTotal,
-          couponInfoList: res.data.couponInfoList
-        });
+        that.setCommonData(res);
       }
-      that.setData({
-        checkedAllStatus: that.isCheckedAll(),
-        checkedTypeStatus00: that.isCheckedTypeStatus00(),
-        checkedTypeStatus02: that.isCheckedTypeStatus02(),
-        checkedTypeStatus11: that.isCheckedTypeStatus11()
-      });
+      that.setCheckedData();
     });
 
   },
@@ -165,25 +183,9 @@ Page({
       isChecked: that.isCheckedAll() ? 0 : 1
     }, 'POST').then(function (res) {
       if (res.errno === 0) {
-        console.log(res.data);
-        that.setData({
-          cartGoods: res.data.cartList,
-          cartGoods00: res.data.cart00List,
-          cartGoods02: res.data.cart02List,
-          cartGoods11: res.data.cart11List,
-          cartTotal: res.data.cartTotal,
-          couponInfoList: res.data.couponInfoList
-        });
+        that.setCommonData(res);
       }
-
-      that.setData({
-        checkedAllStatus: that.isCheckedAll()
-      });
-      that.setData({
-        checkedTypeStatus00: that.isCheckedAll(),
-        checkedTypeStatus02: that.isCheckedAll(),
-        checkedTypeStatus11: that.isCheckedAll()
-      });
+      that.setCheckedAllData();
     });
   },
   checkedAllGoodType: function (e) {
@@ -196,6 +198,9 @@ Page({
     if (goodsBizType == '02') {
       isCheckedTypeStatu = that.isCheckedTypeStatus02();
     }
+    if (goodsBizType == '10') {
+      isCheckedTypeStatu = that.isCheckedTypeStatus10();
+    }
     if (goodsBizType == '11') {
       isCheckedTypeStatu = that.isCheckedTypeStatus11();
     }
@@ -204,18 +209,9 @@ Page({
       goodsBizType: goodsBizType
     }, 'POST').then(function (res) {
       if (res.errno === 0) {
-        console.log(res.data);
-        //渲染数据
-        that.setData({
-          cartGoods: res.data.cartList,
-          cartGoods00: res.data.cart00List,
-          cartGoods02: res.data.cart02List,
-          cartGoods11: res.data.cart11List,
-          cartTotal: res.data.cartTotal,
-          couponInfoList: res.data.couponInfoList,
-          goodsBizType: goodsBizType
-        });
+        that.setCommonData(res);
       }
+
       if (goodsBizType == '00') {
           that.setData({
             checkedTypeStatus00: that.isCheckedTypeStatus00()
@@ -226,6 +222,11 @@ Page({
           checkedTypeStatus02: that.isCheckedTypeStatus02()
         });
       }
+      if (goodsBizType == '10') {
+        that.setData({
+          checkedTypeStatus10: that.isCheckedTypeStatus10()
+        });
+      }
       if (goodsBizType == '11') {
         that.setData({
           checkedTypeStatus11: that.isCheckedTypeStatus11()
@@ -255,14 +256,7 @@ Page({
           })
         }
 
-        that.setData({
-          cartGoods: res.data.cartList,
-          cartGoods00: res.data.cart00List,
-          cartGoods02: res.data.cart02List,
-          cartGoods11: res.data.cart11List,
-          cartTotal: res.data.cartTotal,
-          couponInfoList: res.data.couponInfoList
-        });
+        that.setCommonData(res);
       } else {
         // util.showErrorToast(res.errmsg);
         wx.showModal({
@@ -276,13 +270,7 @@ Page({
           cartGoods: that.data.cartGoods
         });
       }
-
-      that.setData({
-        checkedAllStatus: that.isCheckedAll(),
-        checkedTypeStatus00: that.isCheckedTypeStatus00(),
-        checkedTypeStatus02: that.isCheckedTypeStatus02(),
-        checkedTypeStatus11: that.isCheckedTypeStatus11()
-      });
+      that.setCheckedData();
     });
   },
   cutNumber: function (event) {
@@ -344,22 +332,9 @@ Page({
             cartId: cartId
           }, 'POST').then(function (res) {
             if (res.errno === 0) {
-              that.setData({
-                cartGoods: res.data.cartList,
-                cartGoods00: res.data.cart00List,
-                cartGoods02: res.data.cart02List,
-                cartGoods11: res.data.cart11List,
-                cartTotal: res.data.cartTotal,
-                couponInfoList: res.data.couponInfoList
-              });
+              that.setCommonData(res);
             }
-
-            that.setData({
-              checkedAllStatus: that.isCheckedAll(),
-              checkedTypeStatus00: that.isCheckedTypeStatus00(),
-              checkedTypeStatus02: that.isCheckedTypeStatus02(),
-              checkedTypeStatus11: that.isCheckedTypeStatus11()
-            });
+            that.setCheckedData();
           });
           console.log('用户点击确定')
         }

+ 1 - 1
wx-mall/pages/cart/cart.json

@@ -1,3 +1,3 @@
 {
-    "backgroundColor": "#f4f4f4"
+  "navigationBarTitleText": "购物车"
 }

+ 37 - 3
wx-mall/pages/cart/cart.wxml

@@ -26,7 +26,6 @@
     <view class="list">
       <view class="group-item">
         <view class="goods">
-          
           <view wx:if="{{cartGoods00.length != 0}}" class="checkbox-biz-type {{checkedTypeStatus00 ? 'checked' : ''}}" bindtap="checkedAllGoodType" data-goods-Biz-Type="00"><text class="title-name">保税仓</text></view>
           <view class="item" wx:for="{{cartGoods}}" wx:if="{{item.goodsBizType == 00}}" wx:key="{{item.id}}">
             <view class="checkbox {{item.checked ? 'checked' : ''}}" bindtap="checkedItem" data-item-index="{{index}}"></view>
@@ -97,9 +96,9 @@
           </view>
 
    
-          <view wx:if="{{cartGoods11.length != 0}}" class="checkbox-biz-type {{checkedTypeStatus11 ? 'checked' : ''}}" bindtap="checkedAllGoodType" data-goods-Biz-Type="11"><text class="title-name">现场速递</text></view>
+          <view wx:if="{{cartGoods10.length != 0}}" class="checkbox-biz-type {{checkedTypeStatus10 ? 'checked' : ''}}" bindtap="checkedAllGoodType" data-goods-Biz-Type="10"><text class="title-name">现场速递</text></view>
 
-          <view class="item" wx:for="{{cartGoods}}" wx:if="{{item.goodsBizType == 11}}" wx:key="{{item.id}}">
+          <view class="item" wx:for="{{cartGoods}}" wx:if="{{item.goodsBizType == 10}}" wx:key="{{item.id}}">
             <view class="checkbox {{item.checked ? 'checked' : ''}}" bindtap="checkedItem" data-item-index="{{index}}"></view>
             <view class="cart-goods">
               <navigator url="/pages/goods/goods?id={{item.goods_id}}">
@@ -131,6 +130,41 @@
               </view>
             </view>
           </view>
+   
+
+          <view wx:if="{{cartGoods11.length != 0}}" class="checkbox-biz-type {{checkedTypeStatus11 ? 'checked' : ''}}" bindtap="checkedAllGoodType" data-goods-Biz-Type="11"><text class="title-name">普通商品</text></view>
+
+          <view class="item" wx:for="{{cartGoods}}" wx:if="{{item.goodsBizType == 11}}" wx:key="{{item.id}}">
+            <view class="checkbox {{item.checked ? 'checked' : ''}}" bindtap="checkedItem" data-item-index="{{index}}"></view>
+            <view class="cart-goods">
+              <navigator url="/pages/goods/goods?id={{item.goods_id}}">
+                <image class="img" src="{{item.list_pic_url}}"></image>
+              </navigator>
+              <view class="info">
+                <view class="t">
+                  <navigator url="/pages/goods/goods?id={{item.goods_id}}">
+                    <text class="name">{{item.goods_name}}</text>
+                  </navigator>
+                  <view class="goods-do">
+                    <text class="price">¥{{item.retail_price}}</text>
+                    <text class="org-price line-through">¥{{item.market_price}}</text>
+                  </view>
+                </view>
+                <view class="attr">{{null==item.goods_specification_name_value?"":item.goods_specification_name_value}}
+                </view>
+                <view class="number-item">
+                  <view class="selnum">
+                    <view class="cut" data-goods-id="{{item.id}}" data-item-index="{{index}}" data-product-id="{{item.product_id}}" bindtap="cutNumber"></view>
+                    <input value="{{item.number}}" class="number" disabled="true" type="number" />
+                    <view class="add" data-goods-id="{{item.id}}" data-item-index="{{index}}" data-product-id="{{item.product_id}}" bindtap="addNumber"></view>
+                  </view>
+                </view>
+                <view class="handle">
+                  <image catchtap="deleteCart" data-cart-id="{{item.id}}" data-goods-name="{{item.goods_name}}" class="del" src="/static/images/del-address.png"></image>
+                </view>
+              </view>
+            </view>
+          </view>
 
           
           </view>

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

@@ -249,6 +249,12 @@ Page({
         });
         this.getGoodsList();
         break;
+      case 'ordActivity':
+        that.setData({
+          'goodsBizType': '11'
+        });
+        this.getGoodsList();
+        break;
       case 'sellSort':
         let tmpSortOrder = 'asc';
         if (this.data.currentSortOrder == 'asc') {

+ 3 - 0
wx-mall/pages/catalog/catalog.wxml

@@ -66,6 +66,9 @@
       <view class="item by-price {{goodsBizType == '10' ? 'active' : ''}}" bindtap="openSortFilter" id="groupActivity">
         <text class="txt">现场速递</text>
       </view>
+      <view class="item by-price {{goodsBizType == '11' ? 'active' : ''}}" bindtap="openSortFilter" id="ordActivity">
+        <text class="txt">普通商品</text>
+      </view>
     </view>
   </view>
   <view class="catalog">

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

@@ -140,8 +140,8 @@ page {
   display: block;
   float: left;
   height: 246rpx;
-  width: 170rpx;
-  margin-right: 34rpx;
+  /* width: 170rpx; */
+  margin-right: 54rpx;
 }
 
 .catalog .bd .item.last {

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

@@ -47,6 +47,11 @@
       <image src="../../static/images/service-ziti.png" background-size="cover"></image>
       <text>现场速递</text>
     </navigator>
+    <navigator class="itemb" bindtap="goCatalog" data-goods-Biz-Type="11">
+      <image src="../../static/images/service-ptsp.png" background-size="cover"></image>
+      <text>普通商品</text>
+    </navigator>
+
   </view>
   <!-- <view class="m-menu">
     <navigator class="item" url="{{item.url}}" wx:for="{{channel}}" wx:key="{{item.id}}">

+ 1 - 1
wx-mall/pages/pay/pay.js

@@ -38,7 +38,7 @@ Page({
     //   url: '/pages/payResult/payResult?status=1&orderId=' + that.data.orderId,
     // })
     // todo
-    util.request(api.PayPrepayId, { orderId: that.data.orderId, payType: 1 }).then(function (res) {
+    util.request(api.PayPrepayId, { orderIds: that.data.orderIds, payType: 1 }).then(function (res) {
       if (res.errno === 0) {
         let payParam = res.data;
         wx.requestPayment({

+ 213 - 28
wx-mall/pages/shopping/checkout/checkout.js

@@ -10,6 +10,7 @@ Page({
     addressVo: {},
     checkedCoupon: [],
     couponList: [],
+    goodsBizTypeList: ['00','02','10','11'],
     goodsTotalPrice: 0.00, //商品总价
     freightPrice: 0.00,    //快递费
     couponPrice: 0.00,     //优惠券的价格
@@ -18,14 +19,26 @@ Page({
     userCouponId: 0,
     fullCutCouponId: 0,
     fullCutCouponDec: 0, //满减优惠券
+    goodsTotalByType00: 0,
+    goodsTotalByType02: 0,
+    goodsTotalByType10: 0,
+    goodsTotalByType11: 0, 
     postscript: "",
+    postscript00: '',
+    postscript02: '',
+    postscript10: '',
+    postscript11: '',
     checkStore: false,
     storeVo: {},
     delivery_date: '',
     delivery_remark: '尽快送达',
     multiArray: [],
     multiIndex: [0, 0],
-    timeArray:util.getNowTimeArray()
+    timeArray: util.getNowTimeArray(),
+    idNo: '',
+    userName: '',
+    idNoM: '',
+    idNoDisabled: false
   },
   bindMultiPickerColumnChange: function (e) {
     let that = this;
@@ -71,6 +84,13 @@ Page({
       'multiArray[0]': dateArray,
       'multiArray[1]': that.data.timeArray,
     })
+  }, 
+  formatidcard(idcard) {
+    if (idcard.length == 15) {
+      return idcard.replace(/(\d{6})\d{6}(\d{3})/, "$1******$2");
+    } else {
+      return idcard.replace(/(\d{5})\d{6}(\d{6})/, "$1******$2");
+    }
   },
   getCheckoutInfo: function () {
     let that = this;
@@ -88,14 +108,69 @@ Page({
           freightPrice: res.data.freightPrice,
           goodsTotalPrice: res.data.goodsTotalPrice,
           orderTotalPrice: res.data.orderTotalPrice,
-          fullCutCouponDec: res.data.fullCutCouponDec
+          fullCutCouponDec: res.data.fullCutCouponDec,
+          userName: res.data.userName,
+          idNo: res.data.idNo
         });
 
         if (that.data.addressVo != null && null == that.data.addressVo.id){
           that.setData({
             addressVo: res.data.addressVo
           });
+        } 
+        that.setData({
+          idNoM: that.formatidcard(that.data.idNo)
+        });
+        if(that.data.idNo){
+          that.setData({
+            idNoDisabled: true
+          });
+        }
+        let num00 = 0;
+        let num02 = 0;
+        let num10 = 0;
+        let num11 = 0;
+        
+        let goodsTotalPrice00 = 0;
+        let goodsTotalPrice02 = 0;
+        let goodsTotalPrice10 = 0;
+        let goodsTotalPrice11 = 0;
+        for (var i = 0; i < that.data.checkedGoodsList.length; i++) {
+          if ('00' == that.data.checkedGoodsList[i].goodsBizType) {
+            num00 = num00 + that.data.checkedGoodsList[i].number;
+            goodsTotalPrice00 = goodsTotalPrice00 + 
+              (that.data.checkedGoodsList[i].retail_price * that.data.checkedGoodsList[i].number);
+          }
+          if ('02' == that.data.checkedGoodsList[i].goodsBizType) {
+            num02 = num02 + that.data.checkedGoodsList[i].number;
+            goodsTotalPrice02 = goodsTotalPrice02 +
+              (that.data.checkedGoodsList[i].retail_price * that.data.checkedGoodsList[i].number);
+          }
+          if ('10' == that.data.checkedGoodsList[i].goodsBizType) {
+            num10 = num10 + that.data.checkedGoodsList[i].number;
+            goodsTotalPrice10 = goodsTotalPrice10 +
+              (that.data.checkedGoodsList[i].retail_price * that.data.checkedGoodsList[i].number);
+          }
+          if ('11' == that.data.checkedGoodsList[i].goodsBizType) {
+            num11 = num11 + that.data.checkedGoodsList[i].number;
+            goodsTotalPrice11 = goodsTotalPrice11 +
+              (that.data.checkedGoodsList[i].retail_price * that.data.checkedGoodsList[i].number);
+          }
         }
+        that.setData({
+          goodsTotalByType00: num00,
+          goodsTotalByType02: num02,
+          goodsTotalByType10: num10,
+          goodsTotalByType11: num11,
+          goodsTotalPrice00: goodsTotalPrice00,
+          goodsTotalPrice02: goodsTotalPrice02,
+          goodsTotalPrice10: goodsTotalPrice10,
+          goodsTotalPrice11: goodsTotalPrice11
+        });
+        // console.log(that.data.goodsTotalByType00);
+        // console.log(that.data.goodsTotalByType02);
+        // console.log(that.data.goodsTotalByType10);
+        // console.log(that.data.goodsTotalByType11);
 
         // 选择优惠券
         if (that.data.userCouponId && that.data.couponList.length > 0) {
@@ -135,32 +210,84 @@ Page({
     })
   },
   bindPostscriptBlur(e) {
-    let postscript = e.detail.value;
-    this.setData({
-      postscript: postscript
-    });
+    let goodsType = e.target.dataset.goodsType;
+    if (goodsType == '00') {
+      this.setData({
+        postscript00: e.detail.value
+      });
+    }
+    if (goodsType == '02') {
+      this.setData({
+        postscript02: e.detail.value
+      });
+    }
+    if (goodsType == '10') {
+      this.setData({
+        postscript10: e.detail.value
+      });
+    }
+    if (goodsType == '11') {
+      this.setData({
+        postscript11: e.detail.value
+      });
+    }
   },
   submitOrder: function (e) {
-    console.log(e.detail.formId);
+    // console.log(e.detail.formId);
 
     if (!this.data.addressVo) {
       util.showErrorToast('请选择收货地址');
       return false;
     }
 
+    if (!e.detail.value.idNo) {
+      util.showErrorToast('身份证号不能为空');
+      return false;
+    }
+
+    if (!e.detail.value.userName) {
+      util.showErrorToast('姓名不能为空');
+      return false;
+    }
+    if (this.data.idNoM == '') {
+      this.setData({
+        idNo: e.detail.value.idNo,
+        userName: e.detail.value.userName
+      });
+    }
+    if (!this.checkIdcard(this.data.idNo)){
+        wx.showModal({
+          title: '提示信息',
+          content: '请输入正确的身份证号',
+          showCancel: false
+        });
+      return false;
+    }
+
     // if (!this.data.checkStore || !this.data.checkStore) {
     //   util.showErrorToast('超过门店配送范围');
     //   return false;
     // }
 
     let that = this;
+    // console.log(that.data.postscript00);
+    // console.log(that.data.postscript02);
+    // console.log(that.data.postscript10);
+    // console.log(that.data.postscript11);
+
     util.request(api.OrderSubmit, {
       checkedAddress: that.data.addressVo,
       userCouponId: that.data.userCouponId,
       fullCutCouponId: that.data.fullCutCouponId,
-      postscript: that.data.postscript,
+      postscript00: that.data.postscript00,
+      postscript02: that.data.postscript02,
+      postscript10: that.data.postscript10,
+      postscript11: that.data.postscript11,
       delivery_date: that.data.delivery_date,
-      delivery_remark: that.data.delivery_remark
+      delivery_remark: that.data.delivery_remark,
+      idNo: that.data.idNo,
+      userName: that.data.userName
+
     }, 'POST').then(function (res) {
       if (res.errno === 0) {
         let actualPrice = that.data.actualPrice;
@@ -168,8 +295,6 @@ Page({
         for (let i = 0; i < res.data.orderInfo.length; i++){
           orderIds[i] = res.data.orderInfo[i].id;
         }
-        console.log(actualPrice);
-        console.log(orderIds);
         wx.redirectTo({
           url: '/pages/pay/pay?orderIds=' + orderIds + '&actualPrice=' + actualPrice
         })
@@ -180,7 +305,6 @@ Page({
           content: res.errmsg,
           showCancel: false
         });
-        // util.showErrorToast(res.errmsg);
       }
     });
   },
@@ -191,22 +315,18 @@ Page({
       checkedAddress: that.data.addressVo,
       storeId: wx.getStorageSync('storeId')
     }, 'POST').then(function (res) {
-      // if (res.errno === 0) {
-      //   that.setData({
-      //     storeVo: res.data,
-      //     checkStore: true
-      //   });
-      // } else if (res.errno === 1) {
-      //   console.log(res.errmsg);
-      //   util.showErrorToast(res.errmsg);
-      //   that.setData({
-      //     checkStore: false
-      //   });
-      // }
-      that.setData({
-        storeVo: res.data,
-        checkStore: true
-      });
+      if (res.errno === 0) {
+        that.setData({
+          storeVo: res.data,
+          checkStore: true
+        });
+      } else{
+        console.log(res.errmsg);
+        // util.showErrorToast(res.errmsg);
+        that.setData({
+          checkStore: false
+        });
+      }
     });
   },
   onLoad: function (options) {
@@ -231,5 +351,70 @@ Page({
   onUnload: function () {
     // 页面关闭
 
+  },
+  // 校验身份证号
+//校验码校验
+checkCode: function (val) {
+    var p = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+    var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
+    var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
+    var code = val.substring(17);
+    if (p.test(val)) {
+      var sum = 0;
+      for (var i = 0; i < 17; i++) {
+        sum += val[i] * factor[i];
+      }
+      if (parity[sum % 11] == code.toUpperCase()) {
+        return true;
+      }
+    }
+    return false;
+  },
+  //省份校验
+  checkProv: function (val) {
+    var pattern = /^[1-9][0-9]/;
+    var provs = { 11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古", 21: "辽宁", 22: "吉林", 23: "黑龙江 ", 31: "上海", 32: "江苏", 33: "浙江", 34: "安徽", 35: "福建", 36: "江西", 37: "山东", 41: "河南", 42: "湖北 ", 43: "湖南", 44: "广东", 45: "广西", 46: "海南", 50: "重庆", 51: "四川", 52: "贵州", 53: "云南", 54: "西藏 ", 61: "陕西", 62: "甘肃", 63: "青海", 64: "宁夏", 65: "新疆", 71: "台湾", 81: "香港", 82: "澳门" };
+    if (pattern.test(val)) {
+      if (provs[val]) {
+        return true;
+      }
+    }
+    return false;
+  },
+  //出生日期码校验
+  checkDate: function (val) {
+    var pattern = /^(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)$/;
+    if (pattern.test(val)) {
+      var year = val.substring(0, 4);
+      var month = val.substring(4, 6);
+      var date = val.substring(6, 8);
+      var date2 = new Date(year + "-" + month + "-" + date);
+      if (date2 && date2.getMonth() == (parseInt(month) - 1)) {
+        return true;
+      }
+    }
+    return false;
+  },
+  checkIdcard: function (val) {
+    if (this.checkCode(val)) {
+      var date = val.substring(6, 14);
+      if (this.checkDate(date)) {
+        if (this.checkProv(val.substring(0, 2))) {
+          return true;
+        }
+      }
+    }
+    // this.isError("请输入正确身份证号");
+    return false;
+  },
+// 通过身份证号获取出生日期和性别
+getBirthAndSex: function (idCard) {
+    var that = this;
+    var info = {};
+    var birth = (idCard.length === 18) ? idCard.slice(6, 14) : idCard.slice(6, 12);
+    var order = (idCard.length === 18) ? idCard.slice(-2, -1) : idCard.slice(-1);
+    info.birthDay = (idCard.length === 18) ? ([birth.slice(0, 4), birth.slice(4, 6), birth.slice(-2)]).join('-') : (['19' + birth.slice(0, 2), birth.slice(2, 4), birth.slice(-2)]).join('-');
+    info.sex = (order % 2 === 0 ? 2 : 0);
+    return info;
   }
 })

+ 266 - 32
wx-mall/pages/shopping/checkout/checkout.wxml

@@ -21,77 +21,311 @@
       </view>
     </view>
   </view>
+  
+  
+  <form bindsubmit="submitOrder" report-submit='true'>
   <view class="list-group" style="margin-top: 5px;">
+    
     <view class="list-cell">
-      <view class="list-cell-hd">
-        <image style="width: 20px;height:20px;" src="/static/images/cart-time.png"></image>
-      </view>
       <view class="list-cell-bd">
-        <view style="padding-left:10px;" class="list-label">送达时间</view>
+        <view class="list-label">身份证号:</view>
       </view>
-      <picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}" class="list-cell-ft router">
-        <view class="red-txt">{{delivery_date}}</view>
-        <text class="red-txt">{{delivery_remark}}</text>
-      </picker>
-    </view >
+      <view class="list-cell-ft">
+        <view class="input-box">
+          <input name="idNo" class="keywrod" 
+          value='{{idNoM}}' disabled='{{idNoDisabled}}'  bindblur="bindPostscriptBlur" placeholder="必填"  />
+        </view>
+      </view>
+    </view>
+    
     <view class="list-cell">
       <view class="list-cell-bd">
-        <view class="list-label">商品合计</view>
+        <view class="list-label">姓名:</view>
       </view>
       <view class="list-cell-ft">
-        <text class="txt">¥{{goodsTotalPrice}}</text>
+        <view class="input-box">
+          <input name="userName" class="keywrod" value='{{userName}}'  disabled='{{idNoDisabled}}' bindblur="bindPostscriptBlur" placeholder="必填"   />
+        </view>
+      </view>
+    </view>
+    <text class='id-card-txt'>身份证信息用于跨境商品入境申报,请输入购买者姓名和身份证号码一致的身份证信息确保正常清关;姓名需要与身份证信息一致。</text>
+  </view>
+  
+<view class="{{goodsTotalByType11==0 && goodsTotalByType10==0 && goodsTotalByType02==0 && goodsTotalByType00!=0 ?'goods-items-all-end':'goods-items-all'}}"  wx:if="{{goodsTotalByType00!=0}}">
+  <view class='item-view'><text class="biz-type">保税仓</text></view>
+  <view class="goods-items">
+    <view class="item" wx:for="{{checkedGoodsList}}" wx:if="{{item.goodsBizType==00}}" wx:key="{{item.id}}">
+      <view class="img">
+        <image src="{{item.list_pic_url}}"></image>
+      </view>
+      <view class="info">
+        <view class="t">
+          <view class="name">         
+          {{item.goods_name}}</view>
+          <text class="number">x{{item.number}}</text>
+        </view>
+        <!-- <view class="m">{{null==item.goods_specification_name_value?"":item.goods_specification_name_value}}</view> -->
+        <view class="b">¥{{item.retail_price}}</view>
+      </view>
+  </view>
+  
+      
+    <!-- <view class="list-cell-checked" bindtap="selectCoupon" wx:if="{{couponList.length > 0}}">
+      <view class="list-cell-checked-bd">
+        <text wx:if="{{checkedCoupon.id > 0}}" class="name">优惠券:{{checkedCoupon.coupon_name}}</text>
+        <text wx:if="{{!checkedCoupon}}" class="name">优惠券:未选择</text>
+      </view>
+      <view class="list-cell-checked-ft router">
+        <text wx:if="{{checkedCoupon.id > 0}}" class="money red-txt">-¥{{checkedCoupon.type_money}}</text>
+        <text wx:if="{{!checkedCoupon}}" class="txt">{{couponList.length}}张</text>
+      </view>
+    </view> -->
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-bd">
+        <view class="list-label">配送方式</view>
+      </view>
+      <view class="list-cell-checked-ft">
+        <text class="txt">{{freightPrice==0?'快递免邮': '¥'+freightPrice}}</text>
+      </view>
+    </view>
+    <view class="list-cell-checked" wx:if="{{fullCutCouponDec!=0}}">
+      <view class="list-cell-checked-bd">
+        <view class="list-label">满减</view>
+      </view>
+      <view class="list-cell-checked-ft">
+        <text class="red-txt">-¥{{fullCutCouponDec}}</text>
+      </view>
+    </view>
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-hd">
+        <view class="list-label">留言:</view>
+        <!-- <textarea class='textra' name='postscript' maxlength="60" bindblur="bindPostscriptBlur" placeholder="请输入留言信息" /> -->
+      <view class="list-cell-checked-ft">
+        <view class="textra">
+          <input name="postscript00" data-goods-type="00" class="keywrod" bindblur="bindPostscriptBlur" placeholder="请输入留言信息"  />
+        </view>
+      </view>
       </view>
     </view>
     <view class="list-cell">
       <view class="list-cell-bd">
-        <view class="list-label">配送费</view>
+        <view class="list-label">商品合计</view>
       </view>
       <view class="list-cell-ft">
-        <text class="txt">¥{{freightPrice}}</text>
+        <text class="txt">共{{goodsTotalByType00}}件商品  小计¥{{goodsTotalPrice00}}</text>
+      </view>
+    </view>      
+  </view>
+  </view>
+
+  <view class="{{goodsTotalByType11==0 && goodsTotalByType10==0 && goodsTotalByType02!=0?'goods-items-all-end':'goods-items-all'}}" wx:if="{{goodsTotalByType02!=0}}">
+    <view class='item-view'><text class="biz-type">保税展示</text></view>
+    <view class="goods-items">
+      <view class="item" wx:for="{{checkedGoodsList}}" wx:if="{{item.goodsBizType==02}}" wx:key="{{item.id}}">
+        <view class="img">
+          <image src="{{item.list_pic_url}}"></image>
+        </view>
+        <view class="info">
+          <view class="t">
+            <view class="name">         
+            {{item.goods_name}}</view>
+            <text class="number">x{{item.number}}</text>
+          </view>
+          <!-- <view class="m">{{null==item.goods_specification_name_value?"":item.goods_specification_name_value}}</view> -->
+          <view class="b">¥{{item.retail_price}}</view>
+        </view>
+    </view>
+  
+    <!-- <view class="list-cell-checked" bindtap="selectCoupon" wx:if="{{couponList.length > 0}}">
+      <view class="list-cell-checked-bd">
+        <text wx:if="{{checkedCoupon.id > 0}}" class="name">优惠券:{{checkedCoupon.coupon_name}}</text>
+        <text wx:if="{{!checkedCoupon}}" class="name">优惠券:未选择</text>
+      </view>
+      <view class="list-cell-checked-ft router">
+        <text wx:if="{{checkedCoupon.id > 0}}" class="money red-txt">-¥{{checkedCoupon.type_money}}</text>
+        <text wx:if="{{!checkedCoupon}}" class="txt">{{couponList.length}}张</text>
+      </view>
+    </view> -->
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-bd">
+        <view class="list-label">配送方式</view>
+      </view>
+      <view class="list-cell-checked-ft">
+        <text class="txt">{{freightPrice==0?'快递免邮': '¥'+freightPrice}}</text>
       </view>
     </view>
-    <view class="list-cell">
-      <view class="list-cell-bd">
+    <view class="list-cell-checked" wx:if="{{fullCutCouponDec!=0}}">
+      <view class="list-cell-checked-bd">
         <view class="list-label">满减</view>
       </view>
-      <view class="list-cell-ft">
+      <view class="list-cell-checked-ft">
         <text class="red-txt">-¥{{fullCutCouponDec}}</text>
       </view>
     </view>
-    <view class="list-cell" bindtap="selectCoupon" wx:if="{{couponList.length > 0}}">
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-hd">
+        <view class="list-label">留言:</view>
+        <view class="list-cell-checked-ft">
+          <view class="textra">
+            <input name="postscript02" data-goods-type="02" class="keywrod" bindblur="bindPostscriptBlur" placeholder="请输入留言信息"  />
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="list-cell">
       <view class="list-cell-bd">
+        <view class="list-label">商品合计</view>
+      </view>
+      <view class="list-cell-ft">
+        <text class="txt">共{{goodsTotalByType02}}件商品  小计¥{{goodsTotalPrice02}}</text>
+      </view>
+    </view>
+  </view>
+  </view>
+
+  <view class="{{goodsTotalByType11==0 && goodsTotalByType10!=0 ?'goods-items-all-end':'goods-items-all'}}" wx:if="{{goodsTotalByType10!=0}}">
+    <view class='item-view'><text class="biz-type">现场速递</text></view>
+    <view class="goods-items">
+      <view class="item" wx:for="{{checkedGoodsList}}" wx:if="{{item.goodsBizType==10}}" wx:key="{{item.id}}">
+        <view class="img">
+          <image src="{{item.list_pic_url}}"></image>
+        </view>
+        <view class="info">
+          <view class="t">
+            <view class="name">         
+            {{item.goods_name}}</view>
+            <text class="number">x{{item.number}}</text>
+          </view>
+          <!-- <view class="m">{{null==item.goods_specification_name_value?"":item.goods_specification_name_value}}</view> -->
+          <view class="b">¥{{item.retail_price}}</view>
+        </view>
+    </view>      
+    <!-- <view class="list-cell-checked" bindtap="selectCoupon" wx:if="{{couponList.length > 0}}">
+      <view class="list-cell-checked-bd">
         <text wx:if="{{checkedCoupon.id > 0}}" class="name">优惠券:{{checkedCoupon.coupon_name}}</text>
         <text wx:if="{{!checkedCoupon}}" class="name">优惠券:未选择</text>
       </view>
-      <view class="list-cell-ft router">
+      <view class="list-cell-checked-ft router">
         <text wx:if="{{checkedCoupon.id > 0}}" class="money red-txt">-¥{{checkedCoupon.type_money}}</text>
         <text wx:if="{{!checkedCoupon}}" class="txt">{{couponList.length}}张</text>
       </view>
+    </view> -->
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-bd">
+        <view class="list-label">配送方式</view>
+      </view>
+      <view class="list-cell-checked-ft">
+        <text class="txt">{{freightPrice==0?'快递免邮': '¥'+freightPrice}}</text>
+      </view>
+    </view>
+    <!-- <view class="list-cell-checked" wx:if="{{fullCutCouponDec!=0}}">
+      <view class="list-cell-checked-bd">
+        <view class="list-label">满减</view>
+      </view>
+      <view class="list-cell-checked-ft">
+        <text class="red-txt">-¥{{fullCutCouponDec}}</text>
+      </view>
+    </view> -->
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-hd">
+        <view class="list-label">留言:</view>
+        
+        <view class="list-cell-checked-ft">
+          <view class="textra">
+            <input name="postscript10" data-goods-type="10" class="keywrod" bindblur="bindPostscriptBlur" placeholder="请输入留言信息"  />
+          </view>
+        </view>
+      </view>
     </view>
     <view class="list-cell">
-      <view class="list-cell-hd">
-        <view class="list-label">留言</view>
-        <textarea style="margin-left: 15px;height:20px" maxlength="60" bindblur="bindPostscriptBlur" placeholder="请输入留言信息" />
+      <view class="list-cell-bd">
+        <view class="list-label">商品合计</view>
+      </view>
+      <view class="list-cell-ft">
+        <text class="txt">共{{goodsTotalByType10}}件商品  小计¥{{goodsTotalPrice10}}</text>
       </view>
     </view>
   </view>
+  </view>
 
-  <view class="goods-items">
-    <view class="item" wx:for="{{checkedGoodsList}}" wx:key="{{item.id}}">
-      <view class="img">
-        <image src="{{item.list_pic_url}}"></image>
+  <view class="{{goodsTotalByType11!=0?'goods-items-all-end':'goods-items-all'}}" wx:if="{{goodsTotalByType11!=0}}">
+    <view class='item-view'><text class="biz-type">普通商品</text></view>
+    <view class="goods-items">
+      <view class="item" wx:for="{{checkedGoodsList}}" wx:if="{{item.goodsBizType==11}}" wx:key="{{item.id}}">
+        <view class="img">
+          <image src="{{item.list_pic_url}}"></image>
+        </view>
+        <view class="info">
+          <view class="t">
+            <view class="name">         
+            {{item.goods_name}}</view>
+            <text class="number">x{{item.number}}</text>
+          </view>
+          <!-- <view class="m">{{null==item.goods_specification_name_value?"":item.goods_specification_name_value}}</view> -->
+          <view class="b">¥{{item.retail_price}}</view>
+        </view>
+    </view>      
+    <!-- <view class="list-cell-checked" bindtap="selectCoupon" wx:if="{{couponList.length > 0}}">
+      <view class="list-cell-checked-bd">
+        <text wx:if="{{checkedCoupon.id > 0}}" class="name">优惠券:{{checkedCoupon.coupon_name}}</text>
+        <text wx:if="{{!checkedCoupon}}" class="name">优惠券:未选择</text>
       </view>
-      <view class="info">
-        <view class="t">
-          <view class="name">{{item.goods_name}}</view>
-          <text class="number">x{{item.number}}</text>
+      <view class="list-cell-checked-ft router">
+        <text wx:if="{{checkedCoupon.id > 0}}" class="money red-txt">-¥{{checkedCoupon.type_money}}</text>
+        <text wx:if="{{!checkedCoupon}}" class="txt">{{couponList.length}}张</text>
+      </view>
+    </view> -->
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-bd">
+        <view class="list-label">配送方式</view>
+      </view>
+      <view class="list-cell-checked-ft">
+        <text class="txt">{{freightPrice==0?'快递免邮': '¥'+freightPrice}}</text>
+      </view>
+    </view>
+    <view class="list-cell-checked" wx:if="{{fullCutCouponDec!=0}}">
+      <view class="list-cell-checked-bd">
+        <view class="list-label">满减</view>
+      </view>
+      <view class="list-cell-checked-ft">
+        <text class="red-txt">-¥{{fullCutCouponDec}}</text>
+      </view>
+    </view>
+    <view class="list-cell-checked">
+      <view class="list-cell-checked-hd">
+        <view class="list-label">留言:</view>
+        
+        <view class="list-cell-checked-ft">
+          <view class="textra">
+            <input name="postscript11" data-goods-type="11" class="keywrod" bindblur="bindPostscriptBlur" placeholder="请输入留言信息"  />
+          </view>
         </view>
-        <view class="m">{{null==item.goods_specification_name_value?"":item.goods_specification_name_value}}</view>
-        <view class="b">¥{{item.retail_price}}</view>
+      </view>
+    </view>
+    <view class="list-cell">
+      <view class="list-cell-bd">
+        <view class="list-label">商品合计</view>
+      </view>
+      <view class="list-cell-ft">
+        <text class="txt">共{{goodsTotalByType11}}件商品  小计¥{{goodsTotalPrice11}}</text>
       </view>
     </view>
   </view>
-  <form bindsubmit="submitOrder" report-submit='true'>
+</view>
+
+<!-- 
+    <view class="list-cell">
+      
+      <view class="list-cell-bd">
+        <view  class="list-label">送达时间</view>
+      </view>
+      <picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}" class="list-cell-ft router">
+        <view class="red-txt">{{delivery_date}}</view>
+        <text class="red-txt">{{delivery_remark}}</text>
+      </picker>
+    </view > -->
+
+
     <view class="order-total">
       <view class="l">实付:¥{{actualPrice}}</view>
       <button class="r" form-type="submit" wx:if="{{!isEditCart}}">去付款</button>

+ 163 - 7
wx-mall/pages/shopping/checkout/checkout.wxss

@@ -86,21 +86,21 @@ page {
 }
 
 .goods-items {
-  margin-top: 20rpx;
+  /* margin-top: 20rpx; */
   width: 100%;
   height: auto;
   overflow: hidden;
   background: #fff;
   padding-left: 31.25rpx;
-  margin-bottom: 120rpx;
+  /* margin-bottom: 120rpx; */
 }
 
 .goods-items .item {
-  height: 192rpx;
+  /* height: 192rpx; */
   padding-right: 31.25rpx;
   display: flex;
   align-items: center;
-  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
+  /* border-bottom: 1px solid rgba(0, 0, 0, 0.15); */
 }
 
 .goods-items .item.no-border {
@@ -133,13 +133,14 @@ page {
   height: 33rpx;
   line-height: 33rpx;
   margin-bottom: 10rpx;
-  font-size: 30rpx;
+  font-size: 24rpx;
   color: #333;
 }
 
 .goods-items .t .name {
   float: left;
   width: 450rpx;
+  font-size: 24rpx;
 }
 
 .goods-items .t .number {
@@ -153,7 +154,7 @@ page {
   overflow: hidden;
   line-height: 29rpx;
   margin-bottom: 25rpx;
-  font-size: 25rpx;
+  font-size: 24rpx;
   color: #666;
 }
 
@@ -161,7 +162,7 @@ page {
   height: 41rpx;
   overflow: hidden;
   line-height: 41rpx;
-  font-size: 30rpx;
+  font-size: 24rpx;
   color: #333;
 }
 
@@ -197,3 +198,158 @@ page {
   font-size: 30rpx;
   border-radius: 0;
 }
+
+.input-box {
+  position: relative;
+  float: left;
+  flex: 1;
+  height: 50rpx;
+  line-height: 50rpx;
+  padding: 0 10rpx;
+  background: white;
+  color: rgb(104, 103, 103);
+  width: 480rpx;
+  text-align: left;
+  border: 1px solid #dddbdb;
+  font-size: 25rpx;
+}
+.id-card-txt{
+  font-size:22rpx;
+  margin-left: 20rpx;
+  color: #a5a3a3;
+}
+
+.biz-type{
+  font-size:26rpx;
+  padding-right: 10rpx;
+  color: white;
+  background-color: red;
+  font-weight: bold;
+}
+
+
+.list-cell-checked {
+  padding: 10px 15px;
+  position: relative;
+  display: flex;
+  align-items: center;
+}
+
+.list-cell-checked:first-of-type::before {
+  display: none;
+}
+
+.list-cell-checked::before {
+  content: " ";
+  position: absolute;
+  top: 0;
+  right: 0;
+  height: 1px;
+  border-top: 1px solid #d9d9d9;
+  color: #d9d9d9;
+  transform-origin: 0 0;
+  transform: scaleY(0.5);
+  left: 15px;
+}
+
+.list-cell-checked-hd {
+  display: flex;
+  align-items: center;
+}
+.list-cell-checked-hd .list-label {
+  font-size: 24rpx;
+}
+
+.list-cell-checked-bd {
+  flex: 1;
+  font-size: 24rpx;
+}
+
+.list-cell-checked-bd .name {
+  font-size: 24rpx;
+}
+.list-cell-checked-bd .list-label {
+  font-size: 24rpx;
+  width: 100%;
+}
+
+.list-cell-checked-bd .list-label-desc {
+  font-size: 24rpx;
+  color: #9b9b9b;
+  padding-top: 5px;
+}
+
+.list-cell-checked-ft {
+  padding-right: 13px;
+  position: relative;
+  text-align: right;
+  color: #999;
+  font-size: 24rpx;
+}
+.list-cell-checked-ft .txt {
+  font-size: 24rpx;
+}
+
+
+.list-cell-checked-ft.router::after {
+  content: " ";
+  display: inline-block;
+  height: 6px;
+  width: 6px;
+  border-width: 2px 2px 0 0;
+  border-color: #c8c8cd;
+  border-style: solid;
+  transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
+  top: -2px;
+  position: absolute;
+  top: 50%;
+  margin-top: -4px;
+  right: 2px;
+  font-size: 24rpx;
+}
+.goods-items-all {
+  margin-top: 10rpx;
+  width: 730rpx;
+  height: auto;
+  overflow: hidden;
+  background: #fff;
+  margin-bottom: 10rpx;
+  margin-left:10rpx;
+}
+.goods-items-all .item-view {
+  width: 100%;
+  height: auto;
+  overflow: hidden;
+  padding-left: 46.25rpx;
+}
+
+.goods-items-all-end {
+  margin-top: 10rpx;
+  width: 730rpx;
+  height: auto;
+  overflow: hidden;
+  background: #fff;
+  /* padding-left: 31.25rpx; */
+  margin-bottom: 140rpx;
+  margin-left:10rpx;
+}
+.goods-items-all-end .item-view {
+  width: 100%;
+  height: auto;
+  overflow: hidden;
+  padding-left: 46.25rpx;
+}
+.textra{
+  position: relative;
+  float: left;
+  flex: 1;
+  height: 50rpx;
+  line-height: 50rpx;
+  padding: 0 10rpx;
+  background: white;
+  color: rgb(104, 103, 103);
+  width: 480rpx;
+  text-align: left;
+  /* border: 1px solid #dddbdb; */
+  font-size: 25rpx;
+}

+ 1 - 1
wx-mall/pages/ucenter/index/index.json

@@ -1,3 +1,3 @@
 {
-  "backgroundColor": "#f4f4f4"
+  "navigationBarTitleText": "我的"
 }

+ 22 - 8
wx-mall/pages/ucenter/index/index.wxml

@@ -1,11 +1,14 @@
 <view class="container">
   <view class="userinfo" bindtap="goLogin">
+    <text class="txt-info">温馨提示:支付购买前需自行查看跨境额度是否超出,否则会出货失败</text>
+
     <image class="userinfo-avatar" src="{{userInfo.avatarUrl}}" wx:if="{{userInfo.avatarUrl}}" background-size="cover"></image>
+  </view>
+  
     <view class='user-box'>
       <view class="userinfo-nickname">{{userInfo.nickName}}</view>
       <view class="userlevel" wx:if="{{userInfo.nickName!='点击头像登录'}}">{{curUser.userLevel}}</view>
     </view>
-  </view>
   <view class="order-menu">
     <view class="item">
       <navigator url="/pages/ucenter/order/order?tabIndex=1" class="a">
@@ -39,19 +42,22 @@
   <view class="user-menu">
     <view class="item">
       <navigator url="/pages/ucenter/coupon/coupon" class="a">
-        <text class="icon coupon"></text>
-        <text class="txt">优惠券</text>
+        <!-- <text class="icon coupon"></text> -->
+        <image src="../../../static/images/service-yhj.png" class="icon"></image>
+        <text class="txt">我的优惠券</text>
       </navigator>
     </view>
     <view class="item">
       <navigator url="/pages/ucenter/collect/collect" class="a">
-        <text class="icon collect"></text>
+        <!-- <text class="icon collect"></text> -->
+        <image src="../../../static/images/service-sc.png" class="icon"></image>
         <text class="txt">我的收藏</text>
       </navigator>
     </view>
     <view class="item">
       <navigator url="/pages/ucenter/footprint/footprint" class="a">
-        <text class="icon security"></text>
+        <!-- <text class="icon security"></text> -->
+        <image src="../../../static/images/service-zj.png" class="icon"></image>
         <text class="txt">我的足迹</text>
       </navigator>
     </view>
@@ -63,23 +69,31 @@
     </view> -->
     <view class="item">
       <navigator url="/pages/ucenter/address/address" class="a">
-        <text class="icon address"></text>
+        <!-- <text class="icon address"></text> -->
+        <image src="../../../static/images/service-dw.png" class="icon"></image>
         <text class="txt">地址管理</text>
       </navigator>
     </view>
     <view class="item">
       <navigator url="/pages/ucenter/group/group" class="a">
-        <text class="icon group"></text>
+        <!-- <text class="icon group"></text> -->
+        <image src="../../../static/images/service-tg.png" class="icon"></image>
         <text class="txt">我的团购</text>
       </navigator>
     </view>
     <view class="item">
+      <navigator url="/pages/ucenter/idCard/idCard" class="a">
+        <image src="../../../static/images/service-sfz.png" class="icon"></image>
+        <text class="txt">身份证实名</text>
+      </navigator>
+    </view>
+    <view class="item">
       <navigator url="/pages/ucenter/feedback/feedback" class="a">
         <text class="icon feedback"></text>
         <text class="txt">意见反馈</text>
       </navigator>
     </view>
-    <view class="item item-bottom">
+    <view class="item item">
       <navigator url="/pages/ucenter/help/help" class="a">
         <text class="icon help"></text>
         <text class="txt">帮助中心</text>

+ 28 - 16
wx-mall/pages/ucenter/index/index.wxss

@@ -12,35 +12,40 @@ page {
 }
 
 .userinfo {
-  background: url(https://meiping123.oss-cn-shenzhen.aliyuncs.com/upload/20171005/151134891a6a54.jpeg);
+  /* background: url(https://meiping123.oss-cn-shenzhen.aliyuncs.com/upload/20171005/151134891a6a54.jpeg); */
+  
+  background: white;
   background-size: 750rpx auto;
   margin-bottom: 10rpx;
   /* position: relative; */
   display: flex;
   width: 750rpx;
-  height: 320rpx;
+  height: 350rpx;
   flex-direction: column;
-  align-items: left;
+  align-items: center;
 }
 
 .userinfo-avatar {
-  position: absolute;
-  margin-left: 20rpx;
+  /* position: absolute; */
+  /* margin-left: 20rpx; */
   display: block;
   width: 160rpx;
   height: 160rpx;
   margin: 40rpx;
-  margin-top: 80rpx;
+  /* margin-top: 80rpx; */
   border-radius: 50%;
-  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
+  /* box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); */
 }
 
 .user-box {
-  height: 77px;
-  width: 200px;
   position: absolute;
-  left: 120px;
-  top: 70px;
+  /* left: 120px; */
+  top: 130px;
+  display: flex;
+  width: 750rpx;
+  height: 77px;
+  flex-direction: column;
+  align-items: center;
 }
 
 .userinfo-nickname {
@@ -49,7 +54,7 @@ page {
 }
 
 .userlevel {
-  font-size: 18px;
+  font-size: 16px;
   color: red;
 }
 
@@ -86,7 +91,7 @@ page {
   height: 30rpx;
   line-height: 30rpx;
   text-align: center;
-  top: 345rpx;
+  top: 366rpx;
   left: 120rpx;
   background-color: #ff8902;
   color: #fff;
@@ -176,8 +181,8 @@ page {
 .user-menu .icon {
   margin: 0 auto;
   display: block;
-  height: 52.803rpx;
-  width: 52.803rpx;
+  height: 53.803rpx;
+  width: 53.803rpx;
   margin-bottom: 16rpx;
 }
 
@@ -251,7 +256,7 @@ page {
   height: 24rpx;
   width: 100%;
   font-size: 24rpx;
-  color: #333;
+  color: rgb(136, 135, 135);
 }
 
 .logout {
@@ -263,3 +268,10 @@ page {
   color: #333;
   font-size: 30rpx;
 }
+.txt-info{
+  display: block;
+  font-size: 15px;
+  color: red;
+  height: 40rpx;
+  border-radius: 50%;
+}

+ 15 - 5
wx-mall/pages/ucenter/order/order.js

@@ -9,7 +9,8 @@ Page({
         page: 1,
         size: 10,
         tabList: ['全部', '待付款', '待收货', '待评价'],
-        tabIndex: 0
+        tabIndex: 0,
+        orderIds:[]
         // markers: [{
         //   iconPath: "/static/images/rider.png",
         //   id: 0,
@@ -60,7 +61,7 @@ Page({
             if (res.errno === 0) {
                 let orderList = res.data.data;
                 that.setData({
-                    orderList: orderList
+                  orderList: that.data.orderList.concat(orderList)
                 });
                 //获取待付款倒计时
                 that.data.orderList.forEach((item, num) => {
@@ -71,14 +72,23 @@ Page({
             }
         });
     },
-    payOrder(event) {
+  payOrder(event) {
         wx.redirectTo({
-            url: '/pages/pay/pay?orderId=' + event.target.dataset.orderId
+          url: '/pages/pay/pay?orderIds=' + event.target.dataset.orderId
                 + '&actualPrice=' + event.target.dataset.actualPrice
         })
     },
     againBuy(event) {
-        let orderId = event.target.dataset.orderId;
+      let orderId = event.target.dataset.orderId;
+      // let goodType = event.target.dataset.goodType;
+      // if (goodType!= '00'){
+      //   wx.showModal({
+      //     title: '提示信息',
+      //     content: '非保税仓商品不允许再来一单,需门店扫描二维码进行购买',
+      //     showCancel: false
+      //   });
+      //   return;
+      // }
         util.request(api.CartAddByOrder, {orderId: orderId}).then(function (res) {
             if (res.errno === 0) {
                 wx.switchTab({

+ 18 - 4
wx-mall/pages/ucenter/order/order.wxml

@@ -2,14 +2,28 @@
   <view class="tab-bar">
     <view wx:for="{{tabList}}" wx:key="{{index}}" bindtap="toggleTab" data-index="{{index}}" class="tab-bar-item {{ index == tabIndex ? 'active' : '' }}">{{ item }}</view>
   </view>
-
+  <view style='height:40rpx;margin-left:20rpx;margin-top:-10rpx;padding-bottom: 10rpx;'>
+    <text style='font-size:24rpx;color:red;'>
+      * 非保税仓商品不允许再来一单,需门店扫描二维码进行购买
+    </text>
+  </view>
   <view class="orders" wx:if="{{orderList[0].id > 0}}">
     <view class="list-group" wx:for="{{orderList}}" wx:key="{{index}}">
       <navigator class="list-cell" url="../orderDetail/orderDetail?id={{item.id}}">
         <view class="list-cell-bd">
           <view class="list-label" style="color: #FE7200;">
-            {{item.order_status_text}}
-            <text class="add_time">{{item.add_time}}{{orderList[0].id}}</text>
+            
+            <image wx:if="{{item.orderBizType==00}}" src="../../../static/images/service-bao.png" class="search-icon-shop" bindtap="scanGoodsCode"></image>
+            <text class="biz-type" wx:if="{{item.orderBizType==00}}"> 保税仓 </text>
+            <image wx:if="{{item.orderBizType==02}}" src="../../../static/images/service-zs.png" class="search-icon-shop" bindtap="scanGoodsCode"></image>
+            <text class="biz-type" wx:if="{{item.orderBizType==02}}">保税展示</text>
+            <image wx:if="{{item.orderBizType==10}}" src="../../../static/images/service-ziti.png" class="search-icon-shop" bindtap="scanGoodsCode"></image>
+            <text class="biz-type" wx:if="{{item.orderBizType==10}}">现场速递</text>
+            <image wx:if="{{item.orderBizType==11}}" src="../../../static/images/service-ptsp.png" class="search-icon-shop" bindtap="scanGoodsCode"></image>
+            <text class="biz-type" wx:if="{{item.orderBizType==11}}">普通商品</text> 
+            
+            <!-- <text class="add_time">{{item.add_time}}{{orderList[0].id}}</text> -->
+            <text class="add_time">{{item.order_status_text}}</text>
           </view>
         </view>
         <view class="list-cell-ft router">
@@ -46,7 +60,7 @@
 
       <view class="list-cell">
         <view class="btn-box">
-          <button class="btn" data-order-id="{{item.id}}" catchtap="againBuy">再来一单</button>
+          <button class="{{item.orderBizType==00?'btn':'btn-disabel'}}" data-order-id="{{item.id}}" data-goods-type="{{item.orderBizType}}" catchtap="{{item.orderBizType==00?'againBuy':''}}">再来一单</button>
           <button class="btn" data-actual-price="{{item.actual_price}}" data-order-id="{{item.id}}" data-order-index="{{index}}" catchtap="payOrder" wx:if="{{item.handleOption.pay && item.dateformat}}">去付款 {{item.dateformat.min}}{{item.dateformat?':':''}}{{item.dateformat.sec}}</button>
         </view>
       </view>

+ 32 - 2
wx-mall/pages/ucenter/order/order.wxss

@@ -12,8 +12,9 @@ page {
 
 .add_time{
   font-size: 0.9em;
-  color: #9b9b9b;
-  padding-left: 80rpx;
+  color: red;
+  padding-left: 430rpx;
+
 }
 
 .order-details-cell{
@@ -66,6 +67,18 @@ page {
   padding: 10rpx 20rpx;
   background-color: #fff;
 }
+.btn-box .btn-disabel{
+  border: 1px solid rgb(150, 149, 149);
+  color: rgb(136, 135, 134);
+  border-radius: 30rpx;
+  font-size: 1em;
+  display: inline-block;
+  margin-left: 20rpx;
+  line-height: 1.6;
+  padding: 10rpx 20rpx;
+  background-color: #fff;
+  
+}
 .tab-bar{
   height: 8vh;
   display: flex;
@@ -82,3 +95,20 @@ page {
   color: #FF5778;
   border-bottom: 1px solid #FF5778;
 }
+
+.biz-type{
+  font-size:25rpx;
+  padding-left: 10rpx;
+  /* color: white; */
+  /* background-color: red; */
+  font-weight: bold;
+  height: 40rpx;
+}
+
+.search-icon-shop {
+  width: 40rpx;
+  height: 40rpx;
+  /* margin-left: 15rpx;
+  margin-top: 20rpx; */
+  margin-bottom: -8rpx;
+}

BIN
wx-mall/static/images/service-dw.png


BIN
wx-mall/static/images/service-ptsp.png


BIN
wx-mall/static/images/service-sc.png


BIN
wx-mall/static/images/service-sfz.png


BIN
wx-mall/static/images/service-tg.png


BIN
wx-mall/static/images/service-yhj.png


BIN
wx-mall/static/images/service-zj.png