Browse Source

Merge remote-tracking branch 'origin/developer' into developerA

yuwenjun1997 2 years ago
parent
commit
ebb4813fa6

+ 3 - 2
src/main/java/com/caimei/www/controller/unlimited/ArticleController.java

@@ -125,10 +125,11 @@ public class ArticleController extends BaseController {
         if (referer1 != null) {
             referer = referer1.get(0);
         }
+        String subReferer = referer.substring(0, 190);
         source = source(referer);
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String format = dateFormat.format(new Date());
-        articleService.insertRecord(ip,referer,source,format);
+        articleService.insertRecord(ip,subReferer,source,format);
         log.info("文章详情访问来源记录完成========》"+source);
         List<BaseLink> data = articleService.getArticleLabels().getData();
         List<ImageLink> Ads = articleService.getLastestInfoAds().getData();
@@ -232,7 +233,7 @@ public class ArticleController extends BaseController {
     }
 
     private String source(String link) {
-        if (link.contains("www.baidu.com")) {
+        if (link.contains("baidu.com")) {
             return "1";
         }
         if (link.contains("www.so.com")) {

+ 3 - 2
src/main/java/com/caimei/www/controller/unlimited/HomeController.java

@@ -65,10 +65,11 @@ public class HomeController extends BaseController {
         if (referer1 != null) {
             referer = referer1.get(0);
         }
+        String subReferer = referer.substring(0, 190);
         source = source(referer);
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String format = dateFormat.format(new Date());
-        homeService.insertRecord(ip,referer,source,format);
+        homeService.insertRecord(ip,subReferer,source,format);
         log.info("首页访问来源记录完成========》"+source);
 		// 获取banner图
 		List<ImageLink> bannerList = homeService.getHomeBanners();
@@ -113,7 +114,7 @@ public class HomeController extends BaseController {
 
 
     private String source(String link) {
-        if (link.contains("www.baidu.com")) {
+        if (link.contains("baidu.com")) {
             return "1";
         }
         if (link.contains("www.so.com")) {

+ 6 - 2
src/main/resources/static/js/product/detail.js

@@ -625,7 +625,9 @@ var productDetail = new Vue({
                 });
             }
             // 计算价格
-            _self.calculatetTtalPrice();
+            if(this.listQuery.userId>0){
+                this.calculatetTtalPrice();
+            }
         },
         calculatetTtalPrice: function () { // 计算配套商品总价格
             var _self = this;
@@ -658,7 +660,9 @@ var productDetail = new Vue({
             }else{
                 _self.isProductChecked = false
             }
-            _self.calculatetTtalPrice();
+            if(this.listQuery.userId>0){
+                this.calculatetTtalPrice();
+            }
         },
         toBuyCoupon:function (coupon) {// 点击购买按钮事件处理
             var _self = this;

+ 1 - 0
src/main/resources/static/js/product/mixins/supportMixins.js

@@ -18,6 +18,7 @@ var supportMixins = function () {
         methods: {
             handleShowPopup(pros,index){
                 this.currentIndex = index;
+                this.handldSku = pros.skus[0];
                 pros.isSkuPopup = !pros.isSkuPopup;
             },
             handleSkuCancel(pros,index){// 取消选择Sku

+ 13 - 6
src/main/resources/templates/product/detail.html

@@ -473,14 +473,21 @@
                                     </span>
                                 </div>
                                 <div class="tr tr-6">
-                                    <template v-if="pros.priceFlag == 1 || (pros.priceFlag==2 && GLOBAL_USER_IDENTITY === 4) || GLOBAL_USER_IDENTITY == 3">
-                                        <div class="checked-box">
-                                           <p>不可选择</p>
-                                        </div>
+                                    <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                        <template v-if="pros.priceFlag == 1 || (pros.priceFlag==2 && GLOBAL_USER_IDENTITY === 4) || GLOBAL_USER_IDENTITY == 3">
+                                            <div class="checked-box">
+                                                <p>不可选择</p>
+                                            </div>
+                                        </template>
+                                        <template v-else>
+                                            <div class="checked-box" @click="checkedSoperv(pros)">
+                                                <input class="check" type="checkbox" @change="" v-model="pros.isChecked">
+                                            </div>
+                                        </template>
                                     </template>
                                     <template v-else>
-                                        <div class="checked-box" @click="checkedSoperv(pros)">
-                                            <input class="check" type="checkbox" @change="" v-model="pros.isChecked">
+                                        <div class="checked-box">
+                                            <p>不可选择</p>
                                         </div>
                                     </template>
                                 </div>