1
0
hyq 6 роки тому
батько
коміт
60568f93da
50 змінених файлів з 548 додано та 208 видалено
  1. 10 1
      kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java
  2. 1 1
      kmall-admin/src/main/java/com/kmall/admin/controller/GoodsGalleryController.java
  3. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/GoodsGalleryDao.java
  4. 11 0
      kmall-admin/src/main/java/com/kmall/admin/entity/AdEntity.java
  5. 11 0
      kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java
  6. 10 0
      kmall-admin/src/main/java/com/kmall/admin/entity/GoodsGalleryEntity.java
  7. 10 0
      kmall-admin/src/main/java/com/kmall/admin/entity/OrderEntity.java
  8. 10 0
      kmall-admin/src/main/java/com/kmall/admin/entity/OrderProcessRecordEntity.java
  9. 10 0
      kmall-admin/src/main/java/com/kmall/admin/entity/StoreEntity.java
  10. 2 0
      kmall-admin/src/main/java/com/kmall/admin/service/GoodsGalleryService.java
  11. 4 0
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsGalleryServiceImpl.java
  12. 24 2
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java
  13. 3 3
      kmall-admin/src/main/resources/conf/common.properties
  14. 6 0
      kmall-admin/src/main/resources/mybatis/mapper/AdDao.xml
  15. 20 0
      kmall-admin/src/main/resources/mybatis/mapper/GoodsGalleryDao.xml
  16. 1 0
      kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml
  17. 38 9
      kmall-admin/src/main/resources/mybatis/mapper/OrderProcessRecordDao.xml
  18. 1 0
      kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml
  19. 3 0
      kmall-admin/src/main/webapp/WEB-INF/page/shop/ad.html
  20. 28 0
      kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html
  21. 17 0
      kmall-admin/src/main/webapp/js/common.js
  22. 1 0
      kmall-admin/src/main/webapp/js/shop/ad.js
  23. 21 2
      kmall-admin/src/main/webapp/js/shop/goods.js
  24. 8 6
      kmall-admin/src/main/webapp/js/shop/order.js
  25. 10 0
      kmall-api/src/main/java/com/kmall/api/entity/AdVo.java
  26. 10 0
      kmall-api/src/main/java/com/kmall/api/entity/GoodsGalleryVo.java
  27. 2 1
      kmall-api/src/main/resources/mybatis/mapper/ApiAdMapper.xml
  28. 2 1
      kmall-api/src/main/resources/mybatis/mapper/ApiGoodsGalleryMapper.xml
  29. 5 4
      wx-mall/app.js
  30. 55 12
      wx-mall/pages/auth/btnAuth/btnAuth.js
  31. 8 2
      wx-mall/pages/cart/cart.js
  32. 1 1
      wx-mall/pages/cart/cart.wxml
  33. 1 0
      wx-mall/pages/cart/cart.wxss
  34. 9 2
      wx-mall/pages/catalog/catalog.js
  35. 1 1
      wx-mall/pages/category/category.wxml
  36. 1 0
      wx-mall/pages/category/category.wxss
  37. 8 1
      wx-mall/pages/goods/goods.js
  38. 15 0
      wx-mall/pages/goods/goods.wxss
  39. 2 2
      wx-mall/pages/hotGoods/hotGoods.wxml
  40. 2 1
      wx-mall/pages/hotGoods/hotGoods.wxss
  41. 39 33
      wx-mall/pages/index/index.js
  42. 1 1
      wx-mall/pages/index/index.wxml
  43. 1 0
      wx-mall/pages/index/index.wxss
  44. 38 36
      wx-mall/pages/ucenter/index/index.js
  45. 4 3
      wx-mall/pages/ucenter/index/index.wxml
  46. 11 9
      wx-mall/pages/ucenter/index/index.wxss
  47. 1 1
      wx-mall/pages/ucenter/order/order.wxml
  48. 9 13
      wx-mall/pages/ucenter/order/order.wxss
  49. 59 59
      wx-mall/services/user.js
  50. 1 1
      wx-mall/utils/util.js

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

@@ -1,6 +1,8 @@
 package com.kmall.admin.controller;
 
 import com.kmall.admin.entity.GoodsEntity;
+import com.kmall.admin.entity.GoodsGalleryEntity;
+import com.kmall.admin.service.GoodsGalleryService;
 import com.kmall.admin.service.GoodsService;
 import com.kmall.common.utils.PageUtils;
 import com.kmall.common.utils.Query;
@@ -25,6 +27,8 @@ import java.util.Map;
 public class GoodsController {
     @Autowired
     private GoodsService goodsService;
+    @Autowired
+    private GoodsGalleryService goodsGalleryService;
 
     /**
      * 查看列表
@@ -51,7 +55,12 @@ public class GoodsController {
     @RequiresPermissions("goods:info")
     public R info(@PathVariable("id") Integer id) {
         GoodsEntity goods = goodsService.queryObject(id);
-
+        if(goods != null) {
+            GoodsGalleryEntity goodsGalleryEntity =goodsGalleryService.queryVideoObjectByGoodId(goods.getId());
+            if(goodsGalleryEntity != null){
+                goods.setVideoUrl(goodsGalleryEntity.getImgUrl());
+            }
+        }
         return R.ok().put("goods", goods);
     }
 

+ 1 - 1
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsGalleryController.java

@@ -91,7 +91,7 @@ public class GoodsGalleryController {
      */
     @RequestMapping("/queryAll")
     public R queryAll(@RequestParam Map<String, Object> params) {
-
+        params.put("fileType","0");
         List<GoodsGalleryEntity> list = goodsGalleryService.queryList(params);
 
         return R.ok().put("list", list);

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/GoodsGalleryDao.java

@@ -14,4 +14,6 @@ import java.util.Map;
  */
 public interface GoodsGalleryDao extends BaseDao<GoodsGalleryEntity> {
     int deleteByGoodsId(Long goodsId);
+
+    GoodsGalleryEntity queryVideoObjectByGoodId(Long goodId);
 }

+ 11 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/AdEntity.java

@@ -40,6 +40,17 @@ public class AdEntity implements Serializable {
     //位置名称
     private String adPositionName;
 
+    //排序
+    private Integer sortOrder;
+
+    public Integer getSortOrder() {
+        return sortOrder;
+    }
+
+    public void setSortOrder(Integer sortOrder) {
+        this.sortOrder = sortOrder;
+    }
+
     /**
      * 设置:主键
      */

+ 11 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java

@@ -127,6 +127,17 @@ public class GoodsEntity implements Serializable {
 
     private Date tstm;
 
+    //视频地址
+    private String videoUrl;
+
+    public String getVideoUrl() {
+        return videoUrl;
+    }
+
+    public void setVideoUrl(String videoUrl) {
+        this.videoUrl = videoUrl;
+    }
+
     public String getSku() {
         return sku;
     }

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/GoodsGalleryEntity.java

@@ -34,6 +34,16 @@ public class GoodsGalleryEntity implements Serializable {
     // 删除标识
     private Integer isDelete = 0;
 
+    //文件类型:0:图片;1:视频
+    private String fileType;
+
+    public String getFileType() {
+        return fileType;
+    }
+
+    public void setFileType(String fileType) {
+        this.fileType = fileType;
+    }
 
     public String getGoodsName() {
         return goodsName;

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/OrderEntity.java

@@ -117,6 +117,16 @@ public class OrderEntity implements Serializable {
 
     private String isCustomsSend;
 
+    private String buyerPayCheck;
+
+    public String getBuyerPayCheck() {
+        return buyerPayCheck;
+    }
+
+    public void setBuyerPayCheck(String buyerPayCheck) {
+        this.buyerPayCheck = buyerPayCheck;
+    }
+
     public String getIsPaymentSend() {
         return isPaymentSend;
     }

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/OrderProcessRecordEntity.java

@@ -119,6 +119,16 @@ public class OrderProcessRecordEntity implements Serializable {
      */
     private Date tstm;
 
+    private String payTransactionId;
+
+    public String getPayTransactionId() {
+        return payTransactionId;
+    }
+
+    public void setPayTransactionId(String payTransactionId) {
+        this.payTransactionId = payTransactionId;
+    }
+
     /**
      * 设置:
      */

+ 10 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/StoreEntity.java

@@ -72,6 +72,16 @@ public class StoreEntity implements Serializable {
 
     private Date modTime;
 
+    private Date tstm;
+
+    public Date getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
     /**
      * 设置:主键
      */

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/service/GoodsGalleryService.java

@@ -69,4 +69,6 @@ public interface GoodsGalleryService {
      * @return 删除条数
      */
     int deleteBatch(Integer[] ids);
+
+    GoodsGalleryEntity queryVideoObjectByGoodId(Long goodId);
 }

+ 4 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsGalleryServiceImpl.java

@@ -27,6 +27,10 @@ public class GoodsGalleryServiceImpl implements GoodsGalleryService {
     }
 
     @Override
+    public GoodsGalleryEntity queryVideoObjectByGoodId(Long goodId){
+        return goodsGalleryDao.queryVideoObjectByGoodId(goodId);
+    }
+    @Override
     public List<GoodsGalleryEntity> queryList(Map<String, Object> map) {
         return goodsGalleryDao.queryList(map);
     }

+ 24 - 2
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java

@@ -156,8 +156,18 @@ public class GoodsServiceImpl implements GoodsService {
         Long id = goods.getId();
 
         // 添加商品轮播图
-        for (GoodsGalleryEntity galleryEntity : galleryEntityList) {
+        for (int i=0;i<galleryEntityList.size();i++) {
+            GoodsGalleryEntity galleryEntity =galleryEntityList.get(i);
             galleryEntity.setGoodsId(id);
+            galleryEntity.setSortOrder((i+1));
+            galleryEntity.setFileType("0");//图片
+            goodsGalleryDao.save(galleryEntity);
+        }
+        if(org.apache.commons.lang.StringUtils.isNotEmpty(goods.getVideoUrl())){
+            GoodsGalleryEntity galleryEntity = new GoodsGalleryEntity();
+            galleryEntity.setGoodsId(id);
+            galleryEntity.setSortOrder(0);
+            galleryEntity.setFileType("1");//视频
             goodsGalleryDao.save(galleryEntity);
         }
 
@@ -289,10 +299,22 @@ public class GoodsServiceImpl implements GoodsService {
 
         // 修改商品轮播图
         goodsGalleryDao.deleteByGoodsId(goods.getId());
-        for (GoodsGalleryEntity galleryEntity : galleryEntityList) {
+        for (int i=0;i<galleryEntityList.size();i++) {
+            GoodsGalleryEntity galleryEntity =galleryEntityList.get(i);
             galleryEntity.setGoodsId(goods.getId());
+            galleryEntity.setSortOrder((i+1));
+            galleryEntity.setFileType("0");//图片
             goodsGalleryDao.save(galleryEntity);
         }
+        if(org.apache.commons.lang.StringUtils.isNotEmpty(goods.getVideoUrl())){
+            GoodsGalleryEntity galleryEntity = new GoodsGalleryEntity();
+            galleryEntity.setGoodsId(goods.getId());
+            galleryEntity.setSortOrder(0);
+            galleryEntity.setFileType("1");//视频
+            galleryEntity.setImgUrl(goods.getVideoUrl());
+            goodsGalleryDao.save(galleryEntity);
+        }
+
 
         // 修改商品参数
         List<GoodsAttributeEntity> attributeEntityList = goods.getAttributeEntityList();

+ 3 - 3
kmall-admin/src/main/resources/conf/common.properties

@@ -6,7 +6,7 @@
 #前海电商apikey
 #yunpian.sms.apikey=3084e52ffff6adb96a67995b43edfb93
 #生产apikey
-yunpian.sms.apikey=6968bd2d54ceaba25d6211301831059f
+yunpian.sms.apikey=928c373d-9481-4ce2-817a-a28863766a4f
 
 #url
 yunpian.sms.url=https://sms.yunpian.com/v2/sms/single_send.json
@@ -15,7 +15,7 @@ yunpian.sms.url=https://sms.yunpian.com/v2/sms/single_send.json
 
 ##########  身份证认证配置 ##########
 #apikey
-id.card.apikey=111
+id.card.apikey=6a4e3f16f85843cb9575b14cf93aeded
 
 #url
-id.card.url=https://111
+id.card.url=https://idenauthen.market.alicloudapi.com

+ 6 - 0
kmall-admin/src/main/resources/mybatis/mapper/AdDao.xml

@@ -13,6 +13,7 @@
         <result property="content" column="content"/>
         <result property="endTime" column="end_time"/>
         <result property="enabled" column="enabled"/>
+        <result property="sortOrder" column="sort_order"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.AdEntity">
@@ -23,6 +24,7 @@
 			name,
 			link,
 			image_url,
+			sort_order,
 			content,
 			end_time,
 			enabled
@@ -38,6 +40,7 @@
         mall_ad.name,
         mall_ad.link,
         mall_ad.image_url,
+        mall_ad.sort_order,
         mall_ad.content,
         mall_ad.end_time,
         mall_ad.enabled,
@@ -75,6 +78,7 @@
 			`name`,
 			`link`,
 			`image_url`,
+			`sort_order`,
 			`content`,
 			`end_time`,
 			`enabled`)
@@ -84,6 +88,7 @@
 			#{name},
 			#{link},
 			#{imageUrl},
+			#{sortOrder},
 			#{content},
 			#{endTime},
 			#{enabled})
@@ -97,6 +102,7 @@
             <if test="name != null">`name` = #{name},</if>
             <if test="link != null">`link` = #{link},</if>
             <if test="imageUrl != null">`image_url` = #{imageUrl},</if>
+            <if test="sortOrder != null">`sort_order` = #{sortOrder},</if>
             <if test="content != null">`content` = #{content},</if>
             <if test="endTime != null">`end_time` = #{endTime},</if>
             <if test="enabled != null">`enabled` = #{enabled}</if>

+ 20 - 0
kmall-admin/src/main/resources/mybatis/mapper/GoodsGalleryDao.xml

@@ -7,6 +7,7 @@
         <result property="id" column="id"/>
         <result property="goodsId" column="goods_id"/>
         <result property="imgUrl" column="img_url"/>
+        <result property="fileType" column="file_type"/>
         <result property="imgDesc" column="img_desc"/>
         <result property="sortOrder" column="sort_order"/>
     </resultMap>
@@ -17,16 +18,29 @@
         `goods_id`,
         `img_url`,
         `img_desc`,
+        `file_type`,
         `sort_order`
         from mall_goods_gallery
         where id = #{id}
     </select>
+    <select id="queryVideoObjectByGoodId" resultType="com.kmall.admin.entity.GoodsGalleryEntity">
+        select
+        `id`,
+        `goods_id`,
+        `img_url`,
+        `img_desc`,
+        `file_type`,
+        `sort_order`
+        from mall_goods_gallery
+        where goods_id = #{goodId} and file_type = 1 and sort_order = 0
+    </select>
 
     <select id="queryList" resultType="com.kmall.admin.entity.GoodsGalleryEntity">
         select
         mall_goods_gallery.id,
         mall_goods_gallery.goods_id,
         mall_goods_gallery.img_url,
+        mall_goods_gallery.file_type,
         mall_goods_gallery.img_desc,
         mall_goods_gallery.sort_order,
         mall_goods.name goods_name
@@ -39,6 +53,9 @@
         <if test="goodsId != null">
             AND mall_goods_gallery.goods_id = #{goodsId}
         </if>
+        <if test="fileType != null">
+            AND mall_goods_gallery.file_type = #{fileType}
+        </if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}
@@ -68,11 +85,13 @@
         insert into mall_goods_gallery(
         `goods_id`,
         `img_url`,
+        `file_type`,
         `img_desc`,
         `sort_order`)
         values(
         #{goodsId},
         #{imgUrl},
+        #{fileType},
         #{imgDesc},
         #{sortOrder})
     </insert>
@@ -82,6 +101,7 @@
         <set>
             <if test="goodsId != null">`goods_id` = #{goodsId},</if>
             <if test="imgUrl != null">`img_url` = #{imgUrl},</if>
+            <if test="fileType != null">`file_type` = #{fileType},</if>
             <if test="imgDesc != null">`img_desc` = #{imgDesc},</if>
             <if test="sortOrder != null">`sort_order` = #{sortOrder}</if>
         </set>

+ 1 - 0
kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml

@@ -51,6 +51,7 @@
         <result property="isPaymentSend" column="is_payment_send"/>
         <result property="isEleOrderSend" column="is_ele_order_send"/>
         <result property="isCustomsSend" column="is_customs_send"/>
+        <result column="buyer_pay_check" property="buyerPayCheck"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.OrderEntity">

+ 38 - 9
kmall-admin/src/main/resources/mybatis/mapper/OrderProcessRecordDao.xml

@@ -30,14 +30,15 @@
         <result property="shipmentSuccTime" column="shipment_succ_time"/>
         <result property="processContent" column="process_content"/>
         <result property="tstm" column="tstm"/>
+		<result property="payTransactionId" column="pay_transaction_id"/>
     </resultMap>
 
 	<select id="queryObject" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
 		select
-			`id`,
-			`order_sn`,
-			`user_id`,
-			`order_biz_type`,
+			r.`id`,
+			r.`order_sn`,
+			r.`user_id`,
+			r.`order_biz_type`,
 			`add_order_start_time`,
 			`add_order_succ_time`,
 			`is_add_order_send`,
@@ -59,15 +60,43 @@
 			`shipment_start_time`,
 			`shipment_succ_time`,
 			`process_content`,
-			`tstm`
-		from mall_order_process_record
+			r.`tstm`,
+			o.pay_transaction_id
+		from mall_order_process_record r inner join mall_order o on r.order_sn = o.order_sn
 		where id = #{id}
 	</select>
 
 	<select id="queryObjectByOrderSn" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">
-		select *
-		from mall_order_process_record
-		where order_sn = #{orderSn}
+		select
+		r.`id`,
+		r.`order_sn`,
+		r.`user_id`,
+		r.`order_biz_type`,
+		`add_order_start_time`,
+		`add_order_succ_time`,
+		`is_add_order_send`,
+		`pay_start_time`,
+		`pay_succ_time`,
+		`payment_start_time`,
+		`payment_succ_time`,
+		`is_payment_send`,
+		`ele_order_start_time`,
+		`ele_order_succ_time`,
+		`is_ele_order_send`,
+		`waybill_start_time`,
+		`waybill_succ_time`,
+		`logistics_no`,
+		`customs_start_time`,
+		`customs_succ_time`,
+		`invt_no`,
+		`is_customs_send`,
+		`shipment_start_time`,
+		`shipment_succ_time`,
+		`process_content`,
+		r.`tstm`,
+		o.pay_transaction_id
+		from mall_order_process_record r inner join mall_order o on r.order_sn = o.order_sn
+		where r.order_sn = #{orderSn}
 	</select>
 
 	<select id="queryList" resultType="com.kmall.admin.entity.OrderProcessRecordEntity">

+ 1 - 0
kmall-admin/src/main/resources/mybatis/mapper/StoreDao.xml

@@ -21,6 +21,7 @@
 		<result column="create_time" property="createTime"/>
 		<result column="moder_sn" property="moderSn"/>
 		<result column="mod_time" property="modTime"/>
+		<result column="tstm" property="tstm"/>
     </resultMap>
 
 	<select id="queryObject" resultType="com.kmall.admin.entity.StoreEntity">

+ 3 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/ad.html

@@ -80,6 +80,9 @@
             <Form-item label="结束时间" prop="endTime">
                 <Date-picker v-model="ad.endTime" placeholder="结束时间"></Date-picker>
             </Form-item>
+            <Form-item label="排序" prop="content">
+                <i-input v-model="ad.sortOrder" placeholder="排序"/>
+            </Form-item>
             <Form-item label="状态" prop="enabled">
                 <Radio-group v-model="ad.enabled">
                     <Radio label="0">

+ 28 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html

@@ -228,6 +228,34 @@
                             <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.videoUrl" placeholder="主视频" readonly/>
+                        </Form-item>
+                    </i-col>
+                    <i-col span="4">
+                        <Form-item :label-width="1">
+                            <Upload style="width: 300px;" action="../sys/oss/upload" :format="['mp4']"
+                                    max-size="2048"
+                                    :on-success="handleSuccessListVideoUrl" :on-format-error="handleVideoFormatError"
+                                    :show-upload-list="false"
+                                    :on-exceeded-size="handleVideoMaxSize">
+                                <i-button icon="ios-cloud-upload-outline">本地上传</i-button>
+                            </Upload>
+                        </Form-item>
+                    </i-col>
+                    <i-col span="4">
+                        <Form-item :label-width="1">
+                            <i-button icon="eye" @click="eyeImageListVideoUrl">预览视频</i-button>
+                        </Form-item>
+                    </i-col>
+                </Row>
+                <Row>
+                    <i-col span="16" style="margin-top: -30px;">
+                            <span style="margin-left: 140px;color: red;font-size: 12px;">* 视频不能超过10M,视频时限20秒内,支持mp4视频格式</span>
+                    </i-col>
+                </Row>
                 <!--</i-form>-->
             </Tab-Pane>
             <Tab-Pane label="海关信息" name="name2">

+ 17 - 0
kmall-admin/src/main/webapp/js/common.js

@@ -130,6 +130,23 @@ function eyeImage(url) {
         }, anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机
     });
 };
+function eyeVideo(url) {
+    if (!url) {
+        iview.Message.error('请先上传视频');
+        return;
+    }
+    var loadstr='<video width="100%" height="100%"  controls="controls" autobuffer="autobuffer"  ' +
+        'autoplay="autoplay" loop="loop" style="position:fixed!important;top:0;left:0;"><source src="'+url+'" type="video/mp4"></source></video>';
+
+    layer.open({
+        type:1,
+        title: "预览",
+        area: ['730px', '460px'],
+        shade: 0,
+        closeBtn: 1,
+        content: loadstr,
+    });
+};
 
 /**
  * 预览图片

+ 1 - 0
kmall-admin/src/main/webapp/js/shop/ad.js

@@ -18,6 +18,7 @@ $(function () {
                 return transDate(value);
             }
             },
+            {label: '排序', name: 'sortOrder', index: 'sortOrder', width: 80},
             {
                 label: '状态', name: 'enabled', index: 'enabled', width: 80, formatter: function (value) {
                 return value === 0 ?

+ 21 - 2
kmall-admin/src/main/webapp/js/shop/goods.js

@@ -115,7 +115,7 @@ var vm = new Vue({
         uploadList: [],
         imgName: '',
         visible: false,
-        goods: {primaryPicUrl: '', listPicUrl: '', categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0, isHot: 0, categoryName: '', retailPrice: '', marketPrice: '', goodsRate: '', sortOrder: '' },
+        goods: {primaryPicUrl: '', listPicUrl: '',videoUrl:'', categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0, isHot: 0, categoryName: '', retailPrice: '', marketPrice: '', goodsRate: '', sortOrder: '' },
         ruleValidate: {
             /*name: [
                 {required: true, message: '名称不能为空', trigger: 'blur'}
@@ -183,7 +183,7 @@ var vm = new Vue({
             vm.showList = false;
             vm.title = "新增";
             vm.uploadList = [];
-            vm.goods = {primaryPicUrl: '', listPicUrl: '', categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0, isHot: 0, categoryName: '', retailPrice: '', marketPrice: '', goodsRate: '', sortOrder: '' };
+            vm.goods = {primaryPicUrl: '', listPicUrl: '',videoUrl:'',  categoryId: '', isOnSale: 1, isAppExclusive: 0, isLimited: 0, isHot: 0, categoryName: '', retailPrice: '', marketPrice: '', goodsRate: '', sortOrder: '' };
             $('#goodsDesc').editable('setHTML', '');
             vm.getCategory();
             vm.macros = [];
@@ -545,6 +545,25 @@ var vm = new Vue({
         },
         eyeImage: function (e) {
             eyeImage($(e.target).attr('src'));
+        },
+        eyeImageListVideoUrl: function (e) {
+            var url = vm.goods.videoUrl;
+            eyeVideo(url);
+        },
+        handleVideoFormatError: function (file) {
+            this.$Notice.warning({
+                title: '文件格式不正确',
+                desc: '文件 ' + file.name + ' 格式不正确,请上传 mp4 格式的图片。'
+            });
+        },
+        handleVideoMaxSize: function (file) {
+            this.$Notice.warning({
+                title: '超出文件大小限制',
+                desc: '文件 ' + file.name + ' 太大,不能超过 10M。'
+            });
+        },
+        handleSuccessListVideoUrl: function (res, file) {
+            vm.goods.videoUrl = file.response.url;
         }
     },
     mounted() {

+ 8 - 6
kmall-admin/src/main/webapp/js/shop/order.js

@@ -65,13 +65,13 @@ $(function () {
             },
             {
                 label: '订付人核验', name: 'buyerPayCheck', index: 'buyer_pay_check', width: 80,
-                formatter: function (value) {
+                formatter: function (value) {//订购人支付人校验,0:未知,1:一致,2:不一致,3:校验异常
                     if (value == '0') {
-                        return '一致';
+                        return '未知';
                     } else if (value == '1') {
-                        return '一致';
+                        return '一致';
                     } else if (value == '2') {
-                        return '未知';
+                        return '不一致';
                     }
                     return "-";
                 }
@@ -134,8 +134,10 @@ $(function () {
                         if (row.orderStatus == 0) {
                             htmlStr += '<button class="btn btn-outline btn-danger" onclick="vm.cancelUpdate(' + row.id + ')"><i class="fa fa-times-circle-o"></i>&nbsp;取消</button>&nbsp;';
                         }
-                        if (row.isPaymentSend == 0 || row.isEleOrderSend == 0  || row.isCustomsSend == 0 || row.buyerPayCheck != 0) {
-                            htmlStr += '<button class="btn btn-outline btn-danger" onclick="vm.refundUpdate(' + row.id + ')"><i class="fa fa-times-circle-o"></i>&nbsp;退款</button>&nbsp;';
+                        if (row.orderStatus == 201) {
+                            if (row.isPaymentSend == 0 || row.isEleOrderSend == 0 || row.isCustomsSend == 0 || row.buyerPayCheck != 0) {
+                                htmlStr += '<button class="btn btn-outline btn-danger" onclick="vm.refundUpdate(' + row.id + ')"><i class="fa fa-times-circle-o"></i>&nbsp;退款</button>&nbsp;';
+                            }
                         }
                     }
                     return htmlStr;

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

@@ -31,6 +31,16 @@ public class AdVo implements Serializable {
     //状态
     private Integer enabled;
 
+    private Integer sortOrder;
+
+    public Integer getSortOrder() {
+        return sortOrder;
+    }
+
+    public void setSortOrder(Integer sortOrder) {
+        this.sortOrder = sortOrder;
+    }
+
     public Integer getId() {
         return id;
     }

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

@@ -21,6 +21,16 @@ public class GoodsGalleryVo implements Serializable {
     private String img_desc;
     //排序
     private Integer sort_order;
+    //文件类型:0:图片;1:视频
+    private String file_type;
+
+    public String getFile_type() {
+        return file_type;
+    }
+
+    public void setFile_type(String file_type) {
+        this.file_type = file_type;
+    }
 
     public Integer getId() {
         return id;

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

@@ -14,6 +14,7 @@
         <result property="content" column="content"/>
         <result property="end_time" column="endTime"/>
         <result property="enabled" column="enabled"/>
+        <result property="sortOrder" column="sort_order"/>
     </resultMap>
 
     <select id="queryObject" resultMap="adMap">
@@ -43,7 +44,7 @@
                 order by ${sidx} ${order}
             </when>
             <otherwise>
-                order by id desc
+                order by sort_order
             </otherwise>
         </choose>
         <if test="offset != null and limit != null">

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

@@ -8,6 +8,7 @@
         <result property="id" column="id"/>
         <result property="goods_id" column="goods_id"/>
         <result property="img_url" column="img_url"/>
+        <result property="file_type" column="file_type"/>
         <result property="img_desc" column="img_desc"/>
         <result property="sort_order" column="sort_order"/>
     </resultMap>
@@ -35,7 +36,7 @@
                 order by ${sidx} ${order}
             </when>
             <otherwise>
-                order by img_url asc
+                order by sort_order asc
             </otherwise>
         </choose>
         <if test="offset != null and limit != null">

+ 5 - 4
wx-mall/app.js

@@ -6,10 +6,10 @@ App({
   onLaunch: function () {
     var that = this;
     //获取用户的登录信息
-    user.checkLogin().then(res => {
-    }).catch(() => {
-      user.loginByWeixin();
-    });
+    // user.checkLogin().then(res => {
+    // }).catch(() => {
+    //   user.loginByWeixin();
+    // });
 
     // 设备信息
     wx.getSystemInfo({
@@ -17,6 +17,7 @@ App({
         that.globalData.systemInfo = res;
       }
     });
+    console.log("that.globalData.systemInfo:"+that.globalData.systemInfo);
   },
   globalData: {
     systemInfo: '',

+ 55 - 12
wx-mall/pages/auth/btnAuth/btnAuth.js

@@ -29,18 +29,61 @@ Page({
 
   bindGetUserInfo: function (e) {
     let that = this;
-    console.log(e.detail.userInfo)
-    console.log(this.data.navUrl)
-    user.loginByWeixin();
-    if (that.data.navUrl && that.data.navUrl == '/pages/index/index') {
-      wx.switchTab({
-        url: that.data.navUrl,
-      })
-    } else if (that.data.navUrl) {
-      wx.redirectTo({
-        url: that.data.navUrl,
-      })
-    }
+    // console.log(e.detail.userInfo)
+    // console.log(that.data.navUrl);
+    wx.login({
+      success: function (res) {
+        if (res.code) {
+          wx.getUserInfo({
+            withCredentials: true,
+            success: function (succRes) {
+              // console.log(res);
+              //登录远程服务器
+              wx.request({
+                url: api.AuthLoginByWeixin,
+                data: {
+                  code: res.code, userInfo: succRes, storeId: wx.getStorageSync('storeId')
+                },
+                method: 'POST',
+                header: {
+                  'Content-Type': 'application/json'
+                },
+                success: function (wxRes) {
+                  if (wxRes.data.errno === 0) {
+                    //存储用户信息
+                    wx.setStorageSync('userInfo', wxRes.data.data.userInfo);
+                    wx.setStorageSync('token', wxRes.data.data.token);
+                    wx.setStorageSync('userId', wxRes.data.data.userId);
+
+                    if (that.data.navUrl && that.data.navUrl == '/pages/index/index') {
+                      wx.switchTab({
+                        url: that.data.navUrl,
+                      });
+                    } else if (that.data.navUrl) {
+                      wx.redirectTo({
+                        url: that.data.navUrl,
+                      });
+                    }
+                    console.log("登录成功");
+                  }
+                },
+                fail: function (err) {
+                  console.log("failed");
+                }
+              });
+            },
+            fail: function (err) {
+              console.log("重新认证");
+            }
+          });
+        } else {
+          console.log("failed");
+        }
+      },
+      fail: function (err) {
+        console.log("failed");
+      }
+    });
 
   },
   onReady: function () {

+ 8 - 2
wx-mall/pages/cart/cart.js

@@ -46,8 +46,14 @@ Page({
   },
   onShow: function () {
     // 页面显示
-    this.getCartList();
-    this.getFootprintList();
+    if (wx.getStorageSync('userInfo') || wx.getStorageSync('token')) {
+      this.getCartList();
+      this.getFootprintList();
+    } else {
+      wx.navigateTo({
+        url: '/pages/auth/btnAuth/btnAuth',
+      })
+    }
   },
   onHide: function () {
     // 页面隐藏

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

@@ -233,7 +233,7 @@
       <view class="b">
         <block wx:for="{{footprintList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="unique">
           <navigator wx:if="{{iitem.retail_price > 0}}" class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.goods_id}}">
-            <image class="img2" src="{{iitem.list_pic_url}}" background-size="cover"></image>
+            <image class="img2" src="{{iitem.list_pic_url}}" ></image>
             <text class="name">{{iitem.name}}</text>
             <view class="price" data-goods-id="{{iitem.goods_id}}" catchtap='addCart' >¥{{iitem.retail_price}}
               <image data-goods-id="{{iitem.goods_id}}" catchtap='addCart' class="cart" src="/static/images/cart.png" background-size="cover"></image>

+ 1 - 0
wx-mall/pages/cart/cart.wxss

@@ -457,6 +457,7 @@ page {
   margin-top: 10rpx;
   width: 302rpx;
   height: 302rpx;
+  background-size:202rpx 202rpx;
 }
 
 .a-guess .item .name {

+ 9 - 2
wx-mall/pages/catalog/catalog.js

@@ -96,9 +96,16 @@ Page({
     this.setData({
       goodsBizType: app.globalData.appGoodsBizType
     });
+
     // 页面显示
-    this.getFootCart();
-    this.getCatalog();
+    if (wx.getStorageSync('userInfo') || wx.getStorageSync('token')) {
+      this.getFootCart();
+      this.getCatalog();
+    } else {
+      wx.navigateTo({
+        url: '/pages/auth/btnAuth/btnAuth',
+      })
+    }
   },
   onHide: function () {
     // 页面隐藏

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

@@ -68,7 +68,7 @@
             <view class="item {{iindex % 2 == 0 ? 'item-b' : '' }}">
 
               <navigator url="../goods/goods?id={{iitem.id}}&&currentIndex={{navIndex}}">
-                <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
+                <image class="img" src="{{iitem.list_pic_url}}"></image>
                 <text class="name">{{iitem.name}}</text>
               </navigator>
 

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

@@ -104,6 +104,7 @@ color: transparent;
 .cate-item .item .img{
   width: 302rpx;
   height: 302rpx;
+  background-size: 202rpx 202rpx;
 }
 
 .cate-item .item .name{

+ 8 - 1
wx-mall/pages/goods/goods.js

@@ -30,7 +30,9 @@ Page({
     showNavList: false,
     stockNum: 0,
     cartNumber: 0,
-    defaultFreight: 0
+    autoplay: false,
+    defaultFreight: 0,
+    current: 0,//banner当前的index
   },
   toggleNav() {
     this.setData({
@@ -201,6 +203,7 @@ Page({
   },
   onReady: function () {
     let that = this;
+    this.videoContext = wx.createVideoContext('myVideo');
     // 页面渲染完成
     // wx.setClipboardData({
     //     data: '/pages/goods/goods?id=' + that.data.id,
@@ -261,6 +264,10 @@ Page({
       openAttr: false
     })
   },
+  changeProperty: function (e) {
+    var propertyName = e.currentTarget.dataset.propertyName;
+    console.log(propertyName);
+  },
   closeAttrOrCollect: function () {
     let that = this;
     //添加或是取消收藏

+ 15 - 0
wx-mall/pages/goods/goods.wxss

@@ -12,6 +12,20 @@
   height: 750rpx;
 }
 
+.imageClass{
+  background-size:600rpx 600rpx;
+}
+.weui-cells{
+  margin-top: 80rpx;
+  text-align: left;
+}
+.weui-label{
+  width: 5em;
+}
+
+.page-body-button {
+  margin-bottom: 30rpx;
+}
 .service-policy {
   width: 750rpx;
   height: 73rpx;
@@ -503,6 +517,7 @@
 .related-goods .item .img {
   width: 311.45rpx;
   height: 311.45rpx;
+  background-size:211rpx 211rpx;
 }
 
 .related-goods .item .name {

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

@@ -51,7 +51,7 @@
   </view>
   <view class="brand-info">
     <view class="name">
-      <image class="img" src="{{bannerInfo.img_url}}" background-size="cover"></image>
+      <image class="img" src="{{bannerInfo.img_url}}"></image>
       <view class="info-box">
         <view class="info">
           <text class="txt">{{bannerInfo.name}}</text>
@@ -82,7 +82,7 @@
         <view class="item {{iindex % 2 == 0 ? 'item-b' : '' }}">
 
           <navigator url="../goods/goods?id={{iitem.id}}">
-            <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
+            <image class="img" src="{{iitem.list_pic_url}}" ></image>
             <text class="name">{{iitem.name}}</text>
           </navigator>
 

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

@@ -151,9 +151,10 @@ page{
 }
 
 .cate-item .item .img{
-    margin-top: 10rpx;
+  margin-top: 10rpx;
   width: 302rpx;
   height: 302rpx;
+  background-size:202rpx 202rpx;
 }
 
 .cate-item .item .name{

+ 39 - 33
wx-mall/pages/index/index.js

@@ -16,7 +16,8 @@ Page({
     groupBanner: {},
     storeName: '',
     showPop: false,//活动弹窗
-    couponVo: {}
+    couponVo: {},
+    storeId: ''
   },
   showCouponPop() {
     let that = this;
@@ -70,8 +71,7 @@ Page({
   },
   onLoad: function (options) {
     let that = this;
-    wx.setStorageSync("navUrl", "/pages/index/index")
-    that.syncStore();
+    wx.setStorageSync("navUrl", "/pages/index/index");
   },
   onReady: function () {
     // 页面渲染完成
@@ -79,8 +79,14 @@ Page({
   onShow: function () {
     // 页面显示
     let that = this;
-    wx.setStorageSync("navUrl", "/pages/index/index")
-    that.syncStore();
+    wx.setStorageSync("navUrl", "/pages/index/index");
+    if (wx.getStorageSync('userInfo') || wx.getStorageSync('token')) {
+      that.syncStore();
+    } else {
+      wx.navigateTo({
+        url: '/pages/auth/btnAuth/btnAuth',
+      })
+    }
   },
   onHide: function () {
     // 页面隐藏
@@ -132,37 +138,36 @@ Page({
   syncStore: function () {
     let that = this;
     if (!wx.getStorageSync('storeId')) {
-      util.getLocation((lng, lat) => {
-        wx.setStorageSync('location', JSON.stringify({ lng, lat }));
-        util.request(api.NearbyList, { longitude: lng, latitude: lat }).then((res) => {
-          let nlist = res.data;
-          if (!nlist.length) {
-            wx.removeStorageSync('nearStoreList');
-            wx.removeStorageSync('storeId');
-            wx.removeStorageSync('storeVo');
-            that.setData({
-              storeName: '附近暂无门店'
-            })
-          } else {
-            that.setData({
-              storeName: nlist[0].storeName
-            })
-            that.chooseStore(nlist[0].id)
-            wx.setStorageSync('nearStoreList', JSON.stringify(nlist));
-            wx.setStorageSync('storeVo', JSON.stringify(nlist[0]));
-          }
-          that.reLoad();
-        })
-      })
-    } else if (wx.getStorageSync('storeVo')
-      && wx.getStorageSync('storeVo').length > 0) {
+        util.getLocation((lng, lat) => {
+          wx.setStorageSync('location', JSON.stringify({ lng, lat }));
+          util.request(api.NearbyList, { longitude: lng, latitude: lat }).then((res) => {
+            let nlist = res.data;
+            if (!nlist.length) {
+              wx.removeStorageSync('nearStoreList');
+              wx.removeStorageSync('storeId');
+              wx.removeStorageSync('storeVo');
+              that.setData({
+                storeName: '附近暂无门店'
+              })
+            } else {
+              that.setData({
+                storeName: nlist[0].storeName,
+                storeId: nlist[0].id
+              })
+              that.chooseStore(nlist[0].id);
+              wx.setStorageSync('nearStoreList', JSON.stringify(nlist));
+              wx.setStorageSync('storeVo', JSON.stringify(nlist[0]));
+            }
+          })
+        });
+    } else {
       var storeVo = JSON.parse(wx.getStorageSync('storeVo'));
       that.chooseStore(storeVo.id);
       that.setData({
-        storeName: storeVo.storeName
-      })
-      that.reLoad();
-    }
+        storeName: storeVo.storeName,
+        storeId: storeVo.id
+      });
+      }
   },
   // 更新门店Id
   chooseStore: function (storeId) {
@@ -170,6 +175,7 @@ Page({
     util.request(api.ChooseStoreId, { storeId: storeId }, 'POST').then(function (res) {
       if (res.errno === 0) {
         wx.setStorageSync('storeId', storeId);
+        that.reLoad();
       }
     });
   },

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

@@ -160,7 +160,7 @@
     <view class="b">
       <view class="item" wx:for="{{hotGoods}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
         <navigator url="/pages/goods/goods?id={{item.id}}">
-          <image class="img" src="{{item.list_pic_url}}" background-size="cover"></image>
+          <image class="img" src="{{item.list_pic_url}}"></image>
         </navigator>
         <view class="right">
           <view class="text">

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

@@ -280,6 +280,7 @@
   float: left;
   width: 240rpx;
   height: 240rpx;
+  background-size: 140rpx 140rpx;
 }
 
 .a-popular .b .right {

+ 38 - 36
wx-mall/pages/ucenter/index/index.js

@@ -22,38 +22,40 @@ Page({
     let that = this;
     let userInfo = wx.getStorageSync('userInfo');
     let token = wx.getStorageSync('token');
-
     // 页面显示
     if (userInfo && token) {
       app.globalData.userInfo = userInfo;
       app.globalData.token = token;
-    }
-
-    this.setData({
-      userInfo: app.globalData.userInfo,
-    });
-    util.request(api.getCurUser, {
-      userInfo: app.globalData.userInfo
-    }, 'POST').then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          curUser: res.data
-        });
-      }
-    });
-    // 查询骑手信息
-    util.request(api.UcenterIndex, {}).then(function (res) {
-      if (res.errno === 0) {
-        if (res.data.countMap.orders > 0){
+      this.setData({
+        userInfo: app.globalData.userInfo,
+      });
+      util.request(api.getCurUser, {
+        userInfo: app.globalData.userInfo
+      }, 'POST').then(function (res) {
+        if (res.errno === 0) {
           that.setData({
-            unPayNum: res.data.countMap.unPayNum,
-            unPaymentNum: res.data.countMap.unPaymentNum,
-            unTakeNum: res.data.countMap.unTakeNum,
-            unEvalNum: res.data.countMap.unEvalNum
+            curUser: res.data
           });
         }
-      }
-    });
+      });
+      // 查询骑手信息
+      util.request(api.UcenterIndex, {}).then(function (res) {
+        if (res.errno === 0) {
+          if (res.data.countMap.orders > 0) {
+            that.setData({
+              unPayNum: res.data.countMap.unPayNum,
+              unPaymentNum: res.data.countMap.unPaymentNum,
+              unTakeNum: res.data.countMap.unTakeNum,
+              unEvalNum: res.data.countMap.unEvalNum
+            });
+          }
+        }
+      });
+    } else {
+      wx.navigateTo({
+        url: '/pages/auth/btnAuth/btnAuth',
+      })
+    }
   },
   onHide: function () {
     // 页面隐藏
@@ -67,17 +69,17 @@ Page({
       url: '../../auth/newuser/newuser'
     })
   },
-  goLogin(){
-    user.loginByWeixin().then(res => {
-      this.setData({
-        userInfo: res.data.data.userInfo
-      });
-      app.globalData.userInfo = res.data.data.userInfo;
-      app.globalData.token = res.data.token;
-    }).catch((err) => {
-      console.log(err)
-    });
-  },
+  // goLogin(){
+  //   user.loginByWeixin().then(res => {
+  //     this.setData({
+  //       userInfo: res.data.data.userInfo
+  //     });
+  //     app.globalData.userInfo = res.data.data.userInfo;
+  //     app.globalData.token = res.data.token;
+  //   }).catch((err) => {
+  //     console.log(err)
+  //   });
+  // },
   allOrder() {
     wx.navigateTo({
       url: '/pages/ucenter/order/order'

+ 4 - 3
wx-mall/pages/ucenter/index/index.wxml

@@ -1,14 +1,15 @@
 <view class="container">
-  <view class="userinfo" bindtap="goLogin">
+  <view class="userinfo">
     <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="item-all" bindtap='allOrder'>
       <text class="txt">全部订单</text>
       <text class="txt2">查看全部订单 ></text>

+ 11 - 9
wx-mall/pages/ucenter/index/index.wxss

@@ -31,19 +31,20 @@ page {
   display: block;
   width: 140rpx;
   height: 140rpx;
-  margin: 40rpx;
+  margin: 35rpx;
   /* margin-top: 80rpx; */
   border-radius: 50%;
   /* box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); */
 }
 
 .user-box {
-  position: absolute;
   /* left: 120px; */
-  top: 130px;
+  top: 120px;
   display: flex;
   width: 750rpx;
-  height: 77px;
+  height: 40rpx;
+  line-height: 40rpx;
+  text-align: center;
   flex-direction: column;
   align-items: center;
 }
@@ -65,7 +66,8 @@ page {
   background: #fff;
   display: flex;
   margin-bottom: 5rpx;
-  
+  z-index: 9999;
+  position:relative;
 }
 .item-all .txt {
   font-size: 26rpx;
@@ -110,7 +112,7 @@ page {
   height: 30rpx;
   line-height: 30rpx;
   text-align: center;
-  top: 416rpx;
+  top: 427rpx;
   left: 120rpx;
   background-color: #ff8902;
   color: #fff;
@@ -127,7 +129,7 @@ page {
   height: 30rpx;
   line-height: 30rpx;
   text-align: center;
-  top: 416rpx;
+  top: 427rpx;
   left: 265rpx;
   background-color: #ff8902;
   color: #fff;
@@ -140,7 +142,7 @@ page {
   height: 30rpx;
   line-height: 30rpx;
   text-align: center;
-  top: 416rpx;
+  top: 427rpx;
   left: 416rpx;
   background-color: #ff8902;
   color: #fff;
@@ -153,7 +155,7 @@ page {
   height: 30rpx;
   line-height: 30rpx;
   text-align: center;
-  top: 416rpx;
+  top: 427rpx;
   left: 570rpx;
   background-color: #ff8902;
   color: #fff;

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

@@ -71,7 +71,7 @@
         维权申请中
         </text>
       </view> -->
-      <view class="list-cell-check" wx:if="{{item.buyerPayCheck == 1}}">
+      <view class="list-cell-check" wx:if="{{item.buyerPayCheck == 2}}">
       <image src="../../../static/images/service-jg.png" class="search-icon-shop2"></image>
         <text class='names'>
         您的订付人身份证姓名不一致

+ 9 - 13
wx-mall/pages/ucenter/order/order.wxss

@@ -140,15 +140,13 @@ page {
   font-size:14px;
 }
 .list-cell-check {
-  position:relative;
-  display:flex;
-  align-items:center;
-  height:30rpx;
-  bottom:8px;
-  left:230px;
-  line-height: 30rpx;
-  margin-bottom:10px;
-
+  position: relative;
+  display: flex;
+  align-items:flex-end;
+  height: 30rpx;
+  bottom: 8rpx;
+  justify-content:flex-end;
+  width: 98%;
 }
 .list-cell-check .names{
   font-size:12px;
@@ -157,10 +155,8 @@ page {
 }
 
 .search-icon-shop2 {
-  width:28rpx;
-  height:28rpx;
-  margin-bottom:-24rpx;
-  vertical-align:middle;
+  width:30rpx;
+  height:30rpx;
 }
 .search-icon-shop3 {
   width:28rpx;

+ 59 - 59
wx-mall/services/user.js

@@ -19,7 +19,7 @@ function loginByWeixin() {
       wx.request({
         url: api.AuthLoginByWeixin,
         data: {
-          code: code, userInfo: userInfoRes,storeId:wx.getStorageSync('storeId')
+          code: code, userInfo: userInfoRes, storeId: wx.getStorageSync('storeId')
         },
         method: 'POST',
         header: {
@@ -49,83 +49,83 @@ function loginByWeixin() {
  * 判断用户是否登录
  */
 function checkLogin() {
-      return new Promise(function (resolve, reject) {
-        if (!wx.getStorageSync('userInfo') || !wx.getStorageSync('token')) {
-
-          checkSession().then(() => {
-            resolve(true);
-          }).catch(() => {
-            reject(false);
-          });
+  return new Promise(function (resolve, reject) {
+    if (!wx.getStorageSync('userInfo') || !wx.getStorageSync('token')) {
 
-        } else {
-          reject(false);
-        }
+      checkSession().then(() => {
+        resolve(true);
+      }).catch(() => {
+        reject(false);
       });
+
+    } else {
+      reject(false);
     }
+  });
+}
 
 /**
  * 调用微信登录
  */
 function login() {
-      return new Promise(function (resolve, reject) {
-        wx.login({
-          success: function (res) {
-            if (res.code) {
-              //登录远程服务器
-              resolve(res);
-            } else {
-              reject(res);
-            }
-          },
-          fail: function (err) {
-            reject(err);
-          }
-        });
-      });
-    }
+  return new Promise(function (resolve, reject) {
+    wx.login({
+      success: function (res) {
+        if (res.code) {
+          //登录远程服务器
+          resolve(res);
+        } else {
+          reject(res);
+        }
+      },
+      fail: function (err) {
+        reject(err);
+      }
+    });
+  });
+}
 
 function getUserInfo() {
-      return new Promise(function (resolve, reject) {
-        wx.getUserInfo({
-          withCredentials: true,
-          success: function (res) {
-            resolve(res);
-          },
-          fail: function (err) {
-            reject(err);
-            wx.navigateTo({
-              url: '/pages/auth/btnAuth/btnAuth',
-            })
-          }
+  return new Promise(function (resolve, reject) {
+    wx.getUserInfo({
+      withCredentials: true,
+      success: function (res) {
+        resolve(res);
+      },
+      fail: function (err) {
+        reject(err);
+        wx.navigateTo({
+          url: '/pages/auth/btnAuth/btnAuth',
         })
-      });
-    }
+      }
+    })
+  });
+}
 
 /**
  * 检查微信会话是否过期
  */
 function checkSession() {
-      return new Promise(function (resolve, reject) {
-        wx.checkSession({
-          success: function () {
-            resolve(true);
-          },
-          fail: function () {
-            reject(false);
-          }
-        })
-      });
-    }
+  return new Promise(function (resolve, reject) {
+    wx.checkSession({
+      success: function () {
+        resolve(true);
+      },
+      fail: function () {
+        reject(false);
+      }
+    })
+  });
+}
 
 
 module.exports = {
-      loginByWeixin,
-      checkLogin,
-      checkSession,
-      login,
-      getUserInfo,
-    };
+  loginByWeixin,
+  checkLogin,
+  checkSession,
+  login,
+  getUserInfo,
+};
 
 
 

+ 1 - 1
wx-mall/utils/util.js

@@ -66,8 +66,8 @@ function request(url, data = {}, method = "GET") {
       success: function (res) {
         // console.log("res" + res);
         // console.log("res.statusCode" + res.statusCode);
+        // console.log("res.statusCode" + res.data.errno);
         if (res.statusCode == 200) {
-
           if (res.data.errno == 401) {
             //需要登录后才可以操作
             return user.loginByWeixin().then(loginRes => {