1
0
Quellcode durchsuchen

小程序二期第二阶段需求

yangbo vor 3 Jahren
Ursprung
Commit
d340fe7f45

+ 10 - 1
kmall-api/src/main/java/com/kmall/api/api/ApiAuthController.java

@@ -16,6 +16,7 @@ import org.apache.commons.collections.MapUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.log4j.Logger;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -189,6 +190,10 @@ public class ApiAuthController extends ApiBaseAction {
                 userVo.setUser_level_id(1);
                 userService.save(userVo);
             }
+            userInfo = new UserInfo();
+            userInfo.setAvatarUrl(userVo.getAvatar());
+            userInfo.setNickName(userVo.getNickname());
+            userInfo.setGender(userVo.getGender());
         }
         Long userId = null;
         if(userVo != null) {
@@ -212,6 +217,7 @@ public class ApiAuthController extends ApiBaseAction {
             return toResponsFail("登录失败");
         }
 
+
         resultObj.put("token", token);
         resultObj.put("userInfo", userInfo);
         resultObj.put("userId", userId);
@@ -242,7 +248,10 @@ public class ApiAuthController extends ApiBaseAction {
             tokenEntity = UserTokenCache.getUserInfoByToken(token);
         }
         if(isRefusedLogin!=null){
-            if(storeId != null && isRefusedLogin.equalsIgnoreCase("true")){
+//            if(storeId != null && isRefusedLogin.equalsIgnoreCase("true")){
+//                tokenEntity = UserTokenCache.getStoreByTokenByRefused(token);
+//            }
+            if(isRefusedLogin.equalsIgnoreCase("true")){
                 tokenEntity = UserTokenCache.getStoreByTokenByRefused(token);
             }
         }

+ 43 - 0
kmall-api/src/main/java/com/kmall/api/api/ApiGoodsController.java

@@ -2,6 +2,7 @@ package com.kmall.api.api;
 
 import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Maps;
+import com.google.common.html.HtmlEscapers;
 import com.kmall.api.annotation.IgnoreAuth;
 import com.kmall.api.annotation.LoginUser;
 import com.kmall.api.dto.GoodsDetailDto;
@@ -129,6 +130,48 @@ public class ApiGoodsController extends ApiBaseAction {
         if(info == null){
             return toResponsFail("此商品不存在");
         }
+        String before = "<p><strong>商品名称:</strong></p><p>" + info.getName() + "</p>" +
+                "<p><strong>品牌:</strong></p><p>" + info.getBrand() + "</p>" +
+                "<p><strong>规格:</strong></p><p>" + info.getCiq_prod_model() + "</p>" +
+                "<p><strong>原产国:</strong></p><p>" + info.getOri_cnt_code() + "</p>";
+
+        before = "<table width=\"100%\" style=\"background-color: rgb(255, 255, 255);\">" +
+                "  <tbody>" +
+                "    <tr>" +
+                "      <td><strong>商品名称:<br></strong></td>" +
+                "" +
+                "      <td>" + info.getName() + "<br></td>" +
+                "    </tr>" +
+                "" +
+                "    <tr>" +
+                "      <td><strong>品牌:<br></strong></td>" +
+                "" +
+                "      <td>" + info.getBrand() + "<br></td>" +
+                "    </tr>" +
+                "" +
+                "    <tr>" +
+                "      <td><strong>规格:<br></strong></td>" +
+                "" +
+                "      <td>" + info.getCiq_prod_model() + "<br></td>" +
+                "    </tr>" +
+                "" +
+                "    <tr>" +
+                "      <td><strong>原产国:<br></strong></td>" +
+                "" +
+                "      <td>" + info.getOri_cnt_name() + "<br></td>" +
+                "    </tr>" +
+                "  </tbody>" +
+                "</table>";
+        info.setGoods_desc(before + Optional.ofNullable(info.getGoods_desc()).orElse(""));
+
+
+        // 拼接一些信息,拼接两张图片
+//        if (storeId != null && storeId.equals(161L)) {
+        String append = "<img src=\"http://183.3.221.143/group1/M00/00/00/twPdj2FSz-aAMtt5AAM6G2PblKo403.jpg\"/>" +
+                "<br/>" +
+                "<img src=\"http://183.3.221.143/group1/M00/00/00/twPdj2FSz-GAFAyOADF8O8pniQs256.jpg\"/>";
+        info.setGoods_desc(Optional.ofNullable(info.getGoods_desc()).orElse("") + append);
+//        }
         GoodsDetailDto detailDto = new GoodsDetailDto();
         detailDto.setId(id);
         detailDto.setMerchSn(merchSn);

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

@@ -79,6 +79,11 @@ public class ApiIndexController extends ApiBaseAction {
             }
         }
         resultObj.put("banner", banner);
+        String tipMsg = "国庆期间不发货,介意者勿拍";
+        if (Long.valueOf(161L).equals(storeId)) {
+            tipMsg = "部分商品外包装有瑕疵且国庆期间不发货,介意者勿拍";
+        }
+        resultObj.put("tipMsg", tipMsg);
         //
         param = Maps.newHashMap();
         param.put("sidx", "sort_order ");

+ 40 - 0
kmall-api/src/main/java/com/kmall/api/entity/GoodsVo.java

@@ -23,6 +23,14 @@ public class GoodsVo implements Serializable {
     private String name;
     //品牌Id
     private Integer brand_id;
+    //品牌
+    private String brand;
+    //规格
+    private String ciq_prod_model;
+    //原产国代码
+    private String ori_cnt_code;
+    //原产国
+    private String ori_cnt_name;
     //商品库存
     private Integer goods_number;
     //关键字
@@ -132,6 +140,38 @@ public class GoodsVo implements Serializable {
      */
     private String isGoodsShareStock;
 
+    public String getCiq_prod_model() {
+        return ciq_prod_model;
+    }
+
+    public void setCiq_prod_model(String ciq_prod_model) {
+        this.ciq_prod_model = ciq_prod_model;
+    }
+
+    public String getOri_cnt_code() {
+        return ori_cnt_code;
+    }
+
+    public void setOri_cnt_code(String ori_cnt_code) {
+        this.ori_cnt_code = ori_cnt_code;
+    }
+
+    public String getOri_cnt_name() {
+        return ori_cnt_name;
+    }
+
+    public void setOri_cnt_name(String ori_cnt_name) {
+        this.ori_cnt_name = ori_cnt_name;
+    }
+
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
     public String getIsGoodsShareStock() {
         return isGoodsShareStock;
     }

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

@@ -10,6 +10,10 @@
         <result property="goods_sn" column="goods_sn"/>
         <result property="name" column="name"/>
         <result property="brand_id" column="brand_id"/>
+        <result property="brand" column="brand"/>
+        <result property="ciq_prod_model" column="ciq_prod_model"/>
+        <result property="ori_cnt_code" column="ori_cnt_code"/>
+        <result property="ori_cnt_name" column="ori_cnt_name"/>
         <result property="goods_number" column="goods_number"/>
         <result property="keywords" column="keywords"/>
         <result property="goods_brief" column="goods_brief"/>
@@ -69,6 +73,9 @@
 		select a.id,
         a.goods_sn,
         a.name,
+		a.brand,
+		a.ciq_prod_model,
+		a.ori_cnt_code,
         a.goods_number,
         a.keywords,
         a.goods_brief,
@@ -102,8 +109,12 @@
         a.sku,
         a.id,
         psr1.category_id,
+        a.brand,
+        a.ciq_prod_model,
+        a.ori_cnt_code,
         a.goods_sn,
         a.name,
+        cnc.name ori_cnt_name,
         psr1.brand_id,
         a.goods_number,
         a.keywords,
@@ -146,6 +157,7 @@
         LEFT JOIN mall_store s ON s.id = psr1.store_id
         LEFT JOIN third_merchant_biz mb on s.third_party_merch_code = mb.third_party_merch_code
 	    LEFT JOIN third_merchant_biz mb2 ON a.third_party_merch_code = mb2.third_party_merch_code
+	    LEFT JOIN sys_cus_nation_code cnc on a.ori_cnt_code = cnc.code
         where a.id = #{id} and psr1.store_id = #{storeId}
     </select>
 

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

@@ -36,7 +36,9 @@ Page({
           success: function (res) {
             if (res.errno === 0) {
               //存储用户信息
-              wx.setStorageSync('userInfo', res.data.userInfo);
+              if (res.data.userInfo) {
+                wx.setStorageSync('userInfo', res.data.userInfo);
+              }
               wx.setStorageSync('token', res.data.token);
               wx.setStorageSync('userId', res.data.userId);
               that.getCouponList();

+ 3 - 1
wx-mall/pages/auth/btnAuth/btnAuth.js

@@ -46,7 +46,9 @@ Page({
                 success: function (wxRes) {
                   if (wxRes.data.errno === 0) {
                     //存储用户信息
-                    wx.setStorageSync('userInfo', wxRes.data.data.userInfo);
+                    if (wxRes.data.data.userInfo) {
+                      wx.setStorageSync('userInfo', wxRes.data.data.userInfo);
+                    }
                     wx.setStorageSync('token', wxRes.data.data.token);
                     wx.setStorageSync('userId', wxRes.data.data.userId);
 

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

@@ -3,7 +3,7 @@
     <view class="activity-box" bindtap="hideSwitchAttrPop">
       <view class="item {{checkCart == '00' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultActivity">
         <view class="unpay-num" wx:if="{{total00>0}}">{{total00}}</view>
-        <text class="txt">保税直营</text>
+        <text class="txt">跨境电商</text>
       </view>
       <view class="item by-price {{checkCart == '11' ? 'active' : ''}}" bindtap="openSortFilter" id="ordActivity">
         <view class="unpay-num2" wx:if="{{total11>0}}">{{total11}}</view>

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

@@ -452,6 +452,7 @@ page {
   overflow: hidden;
   border-top: 1rpx solid #f4f4f4;
   margin-top: 20rpx;
+  background-color: #f4f4f4;
 }
 
 .a-guess .b .item {
@@ -465,6 +466,20 @@ page {
   text-align: center;
 }
 
+.a-guess .b .item {
+  
+  float: left;
+  background: #fff;
+  width: 350rpx;
+  padding-bottom: 33.333rpx;
+  /* border: 1rpx solid #2b2828; */
+  height: auto;
+  overflow: hidden;
+  text-align: center;
+  border-radius: 30rpx;
+  margin: 5rpx;
+  }
+
 .a-guess .b .item-b {
   border-right: 1rpx solid #f4f4f4;
 }
@@ -477,16 +492,20 @@ page {
 }
 
 .a-guess .item .name {
+  font-weight: bold;
+  overflow: hidden;
+  text-overflow: ellipsis;
   display: block;
   width: 365.625rpx;
   height: 80rpx;
   padding: 0 20rpx;
   margin: 11.5rpx 0 22rpx 0;
   text-align: center;
-  font-size: 26rpx;
+  font-size: 29rpx;
   color: #333;
 }
 
+
 .a-guess .item .price {
   display: block;
   width: 365.625rpx;
@@ -494,6 +513,7 @@ page {
   text-align: center;
   font-size: 30rpx;
   color: #b4282d;
+  font-weight: bold;
 }
 
 .a-guess .item .price .cart {

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

@@ -58,7 +58,7 @@
   <view class="activity">
     <view class="activity-box">
       <view class="item {{goodsBizType == '00' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultActivity">
-        <text class="txt">保税仓</text>
+        <text class="txt">跨境电商</text>
       </view>
       <!-- <view class="item by-sell {{goodsBizType == '02' ? 'active' : ''}}" bindtap="openSortFilter" id="discountActivity">
         <text class="txt">保税展示</text>
@@ -84,7 +84,7 @@
         <image lazy-load="true" class="image" wx:if="{{currentCategory.wap_banner_url}}" src="{{currentCategory.wap_banner_url}}?x-oss-process=image/resize,h_500"></image>
         <view class="txt">{{currentCategory.front_name?currentCategory.front_name:""}}</view>
       </view>
-      <view class="hd" wx:if="{{currentCategory}}">
+      <view class="hd" wx:if="{{currentCategory && currentCategory.subCategoryList.length > 0}}">
         <text class="line"></text>
         <text class="txt">{{currentCategory.name?currentCategory.name:""}}分类</text>
         <text class="line"></text>
@@ -96,7 +96,7 @@
         </navigator>
       </view>
 
-      <view class="hd" wx:if="{{currentCategory}}">
+      <view class="hd" wx:if="{{currentCategory  && currentCategory.subCategoryList.length > 0}}">
         <text class="line"></text>
         <text class="txt">{{currentCategory.name?currentCategory.name:""}}品牌</text>
         <text class="line"></text>

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

@@ -312,10 +312,13 @@ margin-top: 36rpx;
 }
 
 .cate-item .item .right .name {
+  font-weight: bold;
   display: block;
   color: #333;
   line-height: 50rpx;
-  font-size: 26rpx;
+  font-size: 30rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
 }
 
 .cate-item .item .right .desc {
@@ -337,6 +340,7 @@ margin-top: 36rpx;
   line-height: 50rpx;
   font-size:35rpx;
   display: inline;
+  font-weight: bold;
 }
 
 .cate-item .item .right .goods-do .org-price {

+ 12 - 8
wx-mall/pages/goods/goods.wxml

@@ -104,11 +104,11 @@
     </view> -->
     <view class="goods-info" bindtouchstart='touchStart2' bindtouchend='touchEnd2'>
       <view class="c" bindtap="hideSwitchAttrPop">
+        <text class="name">{{goods.name?goods.name:""}}</text>
         <view class="goods-do">
-          <text class="price">{{goods.retail_price?"¥"+goods.retail_price:"¥0"}}</text>
-          <text class="org-price line-through">{{goods.market_price?"¥"+goods.market_price:""}}</text>
+          <text class="price">{{goods.retail_price?"¥"+goods.retail_price:"¥0"}}(含税)</text>
+          <text class="org-price line-through">零售价:{{goods.market_price?"¥"+goods.market_price:""}}</text>
         </view>
-        <text class="name">{{goods.name?goods.name:""}}</text>
         <!-- <text class="desc">{{goods.goods_brief?goods.goods_brief:""}}</text> -->
         <!-- <view class="brand" wx:if="{{brand.name}}">
           <navigator url="../brandDetail/brandDetail?id={{brand.id}}">
@@ -118,7 +118,7 @@
         <!-- <view class="brand">
           <text>发货地:深圳前海保税仓</text>
         </view> -->
-        <view style='margin-top:20px;'>
+        <view style='margin-top:7px;'>
           <text class="desc">快递:{{defaultFreight==0?"免邮":defaultFreight+"元"}}</text>
           <text class="desc2">销量:{{goods.sell_volume==null?0:goods.sell_volume}}</text>
         </view>
@@ -136,7 +136,7 @@
       <image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
     </view>
 
-    <view class="section-nav section-attr" wx:if="{{detailStoreCampMinusList.length>0}}" bindtap="switchCampMinusPop" bindtouchstart='touchStart2' bindtouchend='touchEnd2'>
+    <view class="section-nav nav1001 section-attr" wx:if="{{detailStoreCampMinusList.length>0}}" bindtap="switchCampMinusPop" bindtouchstart='touchStart2' bindtouchend='touchEnd2'>
       <view class="t">
         <view style='float:left'>促销</view>
         <view class='ticket-border' wx:for="{{detailStoreCampMinusList}}" wx:key="{{item.campMinusId}}">
@@ -146,9 +146,13 @@
       <image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
     </view>
 
-    <view class="section-nav section-attr" bindtap="switchAttrPop" wx:if="{{stockNum >0}}" bindtouchstart='touchStart2' bindtouchend='touchEnd2'>
+    <view class="section-nav nav1002 section-attr" bindtap="switchAttrPop" wx:if="{{stockNum >0}}" bindtouchstart='touchStart2' bindtouchend='touchEnd2'>
       <view class="t">{{checkedSpecText=="请选择规格数量"?"请选择规格数量":"已选:【"+checkedSpecText+"】"}}</view>
-      <image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
+      <image class="i" src="../../static/images/address_right.png" background-size="cover" style="height: 0;"></image>
+    </view>
+
+    <view class="section-nav nav1003 section-attr" wx:if="{{stockNum >0}}">
+      <view class="t">发货地:【前海保税仓发货】</view>
     </view>
 
     <!-- <view class="crash-goods" wx:if="{{crashList.length > 0}}" bindtap="hideSwitchAttrPop">
@@ -283,7 +287,7 @@
       <view class="info">
         <view class="c">
           <view class="p">价格:¥{{goods.retail_price}}</view>
-          <view class="a" wx:if="{{productList.length>0}}">已选择:{{checkedSpecText}}</view>
+          <view class="a" wx:if="{{productList.length>0}}"><text>已选择:{{checkedSpecText}}</text></view>
           <view class="a">库存{{stockNum}}件</view>
         </view>
       </view>

+ 43 - 13
wx-mall/pages/goods/goods.wxss

@@ -360,12 +360,26 @@
   margin-left: 31.25rpx;
 }
 
-.section-nav .i {
-  float: right;
-  width: 52rpx;
-  height: 52rpx;
-  margin-right: 16rpx;
-  margin-top: 28rpx;
+.section-nav .t {
+  float: left;
+  width: 600rpx;
+  height: 108rpx;
+  line-height: 108rpx;
+  font-size: 29rpx;
+  color: #333;
+  margin-left: 31.25rpx;
+}
+
+.section-nav .nav1001 {
+
+}
+
+.section-nav.nav1002 {
+  border-radius: 0 0 30rpx 30rpx;
+}
+
+.section-nav.nav1003 {
+  border-radius: 30rpx 30rpx 30rpx 30rpx;
 }
 
 .section-act .t {
@@ -415,6 +429,7 @@
   padding-left: 30rpx;
   background: #fff;
   margin: 20rpx 0;
+  border-radius: 30rpx;
 }
 
 .comments .h {
@@ -422,7 +437,7 @@
   line-height: 100.5rpx;
   width: 718.75rpx;
   padding-right: 16rpx;
-  border-bottom: 1px solid #d9d9d9;
+  /* border-bottom: 1px solid #d9d9d9; */
 }
 
 .comments .h .t {
@@ -578,6 +593,7 @@
   /* padding: 0 31.25rpx 25rpx 31.25rpx; */
   padding: 0 3rpx 2rpx 3rpx;
   background: #fff;
+  border-radius: 30rpx 30rpx 0 0;
 }
 
 .detail image {
@@ -714,13 +730,15 @@
 .related-goods .b .item {
   float: left;
   background: #fff;
-  width: 375rpx;
+  width: 367rpx;
   height: auto;
   overflow: hidden;
   text-align: center;
   padding: 15rpx 31.25rpx;
   border-right: 1px solid #f4f4f4;
   border-bottom: 1px solid #f4f4f4;
+  border-radius: 30rpx;
+  margin: 5rpx;
 }
 
 .related-goods .item .img {
@@ -732,10 +750,13 @@
 .related-goods .item .name {
   display: block;
   width: 311.45rpx;
+  height: 104rpx;
   margin: 11.5rpx 0 15rpx 0;
   text-align: center;
   font-size: 30rpx;
   color: #333;
+  overflow: hidden;
+  text-overflow: ellipsis;
 }
 
 .related-goods .item .price {
@@ -743,6 +764,7 @@
   text-align: center;
   font-size: 30rpx;
   color: #b4282d;
+  font-weight: bold;
 }
 
 .related-goods .item .price .cart{
@@ -843,11 +865,13 @@
   border: 1px solid #eb6064;
   background: #eb6064;
   float: left;
-  height: 100rpx;
-  line-height: 96rpx;
+  height: 90rpx;
+  line-height: 90rpx;
   flex: 1;
   text-align: center;
   color: #fff;
+  border-radius: 66rpx;
+  margin: 6rpx;
 }
 @import "../../lib/wxParse/wxParse.wxss";
 
@@ -865,11 +889,13 @@
   border: 1px solid #b4282d;
   background: #b4282d;
   float: left;
-  height: 100rpx;
-  line-height: 96rpx;
+  height: 90rpx;
+  line-height: 90rpx;
   flex: 1;
   text-align: center;
   color: #fff;
+  border-radius: 66rpx;
+  margin: 6rpx;
 }
 .bottom-btn .r-disable2 {
   border: 1px solid #c57477;
@@ -955,10 +981,14 @@
   color: #333;
   height: 40rpx;
   line-height: 40rpx;
-  width: 260px;
+  width: 206px;
   display:block;
   word-break: break-all;
   word-wrap: break-word;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+
 }
 
 .spec-con {

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

@@ -138,12 +138,14 @@ page{
 .cate-item .b .item{
   float: left;
   background: #fff;
-  width: 375rpx;
+  width: 366rpx;
   padding-bottom: 33.333rpx;
   border-bottom: 1rpx solid #f4f4f4;
   height: auto;
   overflow: hidden;
   text-align: center;
+  border-radius: 30rpx;
+  margin: 5rpx;
 }
 
 .cate-item .imglist {
@@ -181,6 +183,8 @@ page{
   text-align: center;
   font-size: 26rpx;
   color: #333;
+  overflow: hidden;
+  text-overflow: ellipsis;
 }
 
 .cate-item .item .price{
@@ -190,6 +194,7 @@ page{
   text-align: center;
   font-size: 30rpx;
   color: #b4282d;
+  font-weight: bold;
 }
 .cate-item .item .price .cart{
   margin-left: 20rpx;

+ 14 - 4
wx-mall/pages/index/index.js

@@ -16,6 +16,7 @@ Page({
     groupBanner: {},
     storeName: '',
     showPop: false, //活动弹窗
+    showMenu: false, //菜单
     couponVo: {},
     storeId: '',
     page: 1,
@@ -23,6 +24,8 @@ Page({
     list: [],
     openAttr: false,
     isMapShow: '', //第三方商户是否启用地图显示
+    isShowTip: true, //是否显示顶部提示
+    tipMsg: '', //是否显示顶部提示
     isStartLocation: null, // 是否授权地理位置获取权限
     isSystemLocation: null // 手机系统设置中定位是否开启
   },
@@ -137,7 +140,8 @@ Page({
     console.log('isShareIndexEntry-0:', wx.getStorageSync('isShareIndexEntry'))
     console.log('isShareGoodEntry-0:', wx.getStorageSync('isShareGoodEntry'))
     console.log('isDirectEntry-0:', wx.getStorageSync('isDirectEntry'))
-
+    let storeId = wx.getStorageSync('storeId');
+    
     wx.getLocation({
       success: function(location) {
         // do nothing
@@ -521,8 +525,12 @@ Page({
                         // console.log(wxRes)
                         if (wxRes.data.errno === 0) {
                           //存储用户信息
-                          wx.setStorageSync('userInfo', wxRes.data.data.userInfo);
-                          wx.setStorageSync('token', wxRes.data.data.token);
+                          if (wxRes.data.data.userInfo) {
+                            wx.setStorageSync('userInfo', wxRes.data.data.userInfo);
+                          }
+                          if (wxRes.data.data.token) {
+                            wx.setStorageSync('token', wxRes.data.data.token);
+                          }
                           wx.setStorageSync('userId', wxRes.data.data.userId);
                           wx.setStorageSync('isRefusedLogin', 'false');//允许授权
                           console.log("checkLoginTokenByUpd() loginSaveToken token失效,更新token,登录成功");
@@ -655,7 +663,9 @@ Page({
           // floorGoods: res.data.categoryList,
           banner: res.data.banner,
           // groupBanner: res.data.groupBanner,
-          channel: res.data.channel
+          channel: res.data.channel,
+          tipMsg: res.data.tipMsg
+
         });
 
         //当切换了门店地图(mapIndexStoreId);或由用户分享进入的商品详情页,再切换进入的首页(isShareGoodEntry:true)

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

@@ -1,2 +1,2 @@
 {
-  "navigationBarTitleText": "前海电商跨境"}
+  "navigationBarTitleText": "e码头全球购"}

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

@@ -27,6 +27,10 @@
     </view>
     <image src="../../static/images/service-scan-code-gray-1.png" class="search-icon-shop" bindtap="scanGoodsCode"></image>
   </view>
+  
+  <view class="tip-header" wx:if="{{isShowTip}}">
+    <text class="animate tip-text">{{tipMsg}}</text>
+  </view>
 
   <swiper class="banner" indicator-dots="true" autoplay="true" interval="15000" duration="750">
       <swiper-item wx:for="{{banner}}" wx:key="{{item.id}}">
@@ -38,7 +42,7 @@
       </swiper-item>
     </swiper>
 
-  <view class="m-menu">
+  <view class="m-menu" wx:if="{{showMenu}}">
     <navigator class="itemb" bindtap="goCatalog" data-goods-Biz-Type="00">
       <image src="../../static/images/service-cross-border.png" background-size="cover"></image>
       <text>跨境购</text>

+ 60 - 3
wx-mall/pages/index/index.wxss

@@ -45,6 +45,53 @@
    z-index: 98;
 }
 
+.tip-header {
+  position: fixed;
+  width: 750rpx;
+  top: 131rpx;
+  height: 40rpx;
+  display: flex;
+  justify-content: left;
+  align-items: left;
+  background-color: #fff;
+  z-index: 98;
+}
+
+.animate {
+  padding-left: 20px;
+  font-size: 12px;
+  color: #000;
+  display: inline-block;
+  white-space: nowrap;
+  animation: 10s wordsLoop linear infinite normal;
+}
+
+.tip-text {
+  color: red;
+}
+
+@keyframes wordsLoop {
+  0% {
+      transform: translateX(200px);
+      -webkit-transform: translateX(200px);
+  }
+  100% {
+      transform: translateX(-100%);
+      -webkit-transform: translateX(-100%);
+  }
+}
+
+@-webkit-keyframes wordsLoop {
+  0% {
+      transform: translateX(200px);
+      -webkit-transform: translateX(200px);
+  }
+  100% {
+      transform: translateX(-100%);
+      -webkit-transform: translateX(-100%);
+  }
+}
+
 .current-store {
   text-align: left;
   position: relative;
@@ -72,6 +119,8 @@
   z-index: 99;
 }
 
+
+
 .search-header .input-box {
   position: relative;
   margin-top: 16rpx;
@@ -83,6 +132,7 @@
   padding: 0 20rpx;
   background: #f4f4f4;
   color: #999;
+  border-radius: 15px;
 }
 
 
@@ -132,7 +182,7 @@
   width: 710rpx;
   height: 365rpx;
   background-color: #fff;
-  padding-top: 130rpx;
+  padding-top: 170rpx;
   justify-content: center;
   margin: 0 auto;
   border-radius: 15rpx;
@@ -202,7 +252,7 @@
   align-items: center;
   background: #fff;
   justify-content: space-between;
-  border-radius: 15rpx;
+  border-radius: 30rpx;
   box-shadow: 3px 3px 7px rgb(224, 221, 221);
 }
 
@@ -232,7 +282,7 @@
   height: 254rpx;
   width: 710rpx;
   background: #fff;
-  border-radius: 15rpx;
+  border-radius: 30rpx;
   box-shadow: 3px 3px 7px rgb(224, 221, 221);
 }
 
@@ -288,6 +338,7 @@
   color: #333;
   line-height: 50rpx;
   font-size: 33rpx;
+  border-radius: 15px;
   /* font-weight: bolder; */
 }
 
@@ -572,6 +623,12 @@ margin-bottom:10%;
   color: #333;
 }
 
+.a-section .item .name {
+  font-weight: bold;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+
 .good-grid .item .price {
   display: block;
   width: 365.625rpx;

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

@@ -81,14 +81,14 @@
       <!-- </navigator> -->
     </view>
     
-    <view class="item" bindtap='crossBoundaryQuotaQuery' wx:if="{{isQueryCrossQuotal==1&&userInfo.nickName!='点击头像登录'}}">
+    <!-- <view class="item" bindtap='crossBoundaryQuotaQuery' wx:if="{{isQueryCrossQuotal==1&&userInfo.nickName!='点击头像登录'}}"> -->
       <!-- <navigator url="/pages/ucenter/idCard/idCard" class="a"> -->
-      <view class="a">
-        <image src="../../../static/images/edcx.png" class="icon"></image>
-        <text class="txt">跨境额度查询</text>
-      </view>
+      <!-- <view class="a"> -->
+        <!-- <image src="../../../static/images/edcx.png" class="icon"></image> -->
+        <!-- <text class="txt">跨境额度查询</text> -->
+      <!-- </view> -->
       <!-- </navigator> -->
-    </view>
+    <!-- </view> -->
     <view class="item" bindtap='checkFootLogin'>
       <!-- <navigator url="/pages/ucenter/footprint/footprint" class="a"> -->
       <view class="a">

+ 9 - 3
wx-mall/pages/ucenter/userLogin/userLogin.js

@@ -203,8 +203,12 @@ Page({
    */
   setLoginUserInfo: function (loginMobUpdRes){
     var that = this;
-    wx.setStorageSync('userInfo', loginMobUpdRes.data.userInfo);
-    wx.setStorageSync('token', loginMobUpdRes.data.token);
+    if (loginMobUpdRes.data.userInfo) {
+      wx.setStorageSync('userInfo', loginMobUpdRes.data.userInfo);
+    }
+    if (loginMobUpdRes.data.token) {
+      wx.setStorageSync('token', loginMobUpdRes.data.token);
+    }
     wx.setStorageSync('userId', loginMobUpdRes.data.userId);
 
     if (that.data.paramView == 'goodsView') {
@@ -324,7 +328,9 @@ Page({
                 success: function (wxRes) {
                   if (wxRes.data.errno === 0) {
                     //存储用户信息到缓存
-                    wx.setStorageSync('userInfo', wxRes.data.data.userInfo);
+                    if (wxRes.data.data.userInfo) {
+                      wx.setStorageSync('userInfo', wxRes.data.data.userInfo);
+                    }
                     wx.setStorageSync('token', wxRes.data.data.token);
                     wx.setStorageSync('userId', wxRes.data.data.userId);
 

+ 11 - 5
wx-mall/project.config.json

@@ -5,29 +5,35 @@
     "es6": true,
     "enhance": true,
     "postcss": true,
+    "preloadBackgroundData": false,
     "minified": true,
     "newFeature": true,
     "coverView": true,
     "nodeModules": true,
     "autoAudits": true,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
     "uglifyFileName": true,
     "checkInvalidKey": true,
     "checkSiteMap": true,
     "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "lazyloadPlaceholderEnable": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
     },
-    "useIsolateContext": false,
+    "enableEngineNative": false,
+    "useIsolateContext": true,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
-    "showES6CompileOption": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true
+    "showES6CompileOption": false
   },
   "compileType": "miniprogram",
   "libVersion": "2.10.0",

+ 6 - 2
wx-mall/services/user.js

@@ -28,8 +28,12 @@ function loginByWeixin() {
         success: function (res) {
           if (res.data.errno === 0) {
             //存储用户信息
-            wx.setStorageSync('userInfo', res.data.data.userInfo);
-            wx.setStorageSync('token', res.data.data.token);
+            if (res.data.data.userInfo) {
+              wx.setStorageSync('userInfo', res.data.data.userInfo);
+            }
+            if (res.data.data.token) {
+              wx.setStorageSync('token', res.data.data.token);
+            }
             wx.setStorageSync('userId', res.data.data.userId);
             resolve(res);
           } else {