Kaynağa Gözat

add complaint and goods

huanggang 7 yıl önce
ebeveyn
işleme
1311177868

+ 97 - 0
data/resource/mobile/ugc/css/complaint.css

@@ -0,0 +1,97 @@
+html,
+body,
+div,
+p {
+  margin: 0;
+  padding: 0; }
+
+html {
+  background: #f1f0f5;
+  min-height: 100%; }
+
+body {
+  min-height: 100%;
+  font-family: PingFang SC Light,'Heiti SC';
+  font-size: 26px; }
+
+.prompt {
+  color: #b2b1b6;
+  padding: 28px;
+  line-height: 34px; }
+
+.grup {
+  position: relative; }
+
+.grup:after {
+  content: '';
+  position: absolute;
+  left: 0;
+  top: 0;
+  height: 2px;
+  width: 100%;
+  background: #f7f7f7; }
+
+.grup:before {
+  content: '';
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  height: 2px;
+  width: 100%;
+  background: #f7f7f7; }
+
+.grup .cell {
+  position: relative;
+  height: 79px;
+  line-height: 79px;
+  font-size: 28px;
+  padding-left: 28px;
+  background: #fff;
+  color: #272727; }
+
+.grup .cell.active {
+  background: url(../images/right.png) 680px #fff no-repeat;
+  background-size: 40px 30px;
+  color: #e94943; }
+
+.grup .cell:after {
+  position: absolute;
+  content: '';
+  left: 28px;
+  bottom: 0;
+  height: 2px;
+  width: 722px;
+  background: #f7f7f7; }
+
+.submit_btn {
+  width: 722px;
+  height: 80px;
+  margin: 60px auto;
+  background: #e94943;
+  text-align: center;
+  color: #fff;
+  font-size: 30px;
+  line-height: 80px;
+  border-radius: 10px; }
+
+.shade {
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.2);
+  display: none; }
+
+.shade .loading {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  width: 50px;
+  height: 50px;
+  margin-top: -25px;
+  margin-left: -25px;
+  background: url("../images/loading.gif") no-repeat;
+  background-size: 100%; }
+
+/*# sourceMappingURL=complaint.css.map */

+ 39 - 5
data/resource/mobile/ugc/css/main.css

@@ -257,12 +257,17 @@ input, textarea {
   left: 0; }
 .comment .pro .pro_title {
   display: table-cell;
-  width: 50%;
+  width: 30%;
   text-align: left; }
 .comment .pro .reading {
   display: table-cell;
-  width: 50%;
+  width: 58%;
   text-align: right; }
+.comment .pro .complaint {
+  display: table-cell;
+  width: 12%;
+  text-align: right;
+  color: #999999; }
 .comment .comment_list .br {
   width: 750px;
   height: 1px;
@@ -896,6 +901,27 @@ article {
 .recommend_goods .goods_item {
   margin-bottom: 30px;
   padding-bottom: 30px; }
+.recommend_goods .goods_item .badge, .recommend_goods .goods_item .badge_null, .recommend_goods .goods_item .badge_hot, .recommend_goods .goods_item .badge_new, .recommend_goods .goods_item .badge_low, .recommend_goods .goods_item .badge_limit {
+  position: absolute;
+  left: 10px;
+  top: 10px;
+  width: 49px;
+  height: 35px;
+  border-radius: 50px;
+  font-size: 18px;
+  color: #fff;
+  text-align: center;
+  padding: 10px 4px; }
+.recommend_goods .goods_item .badge_null {
+  background: #9B9B9B; }
+.recommend_goods .goods_item .badge_hot {
+  background: #BD10E0; }
+.recommend_goods .goods_item .badge_new {
+  background: #000000; }
+.recommend_goods .goods_item .badge_low {
+  background: #F5A623; }
+.recommend_goods .goods_item .badge_limit {
+  background: #FF4E4E; }
 .recommend_goods .goods_item:after {
   content: '';
   width: 100%;
@@ -922,11 +948,19 @@ article {
   font-size: 26px;
   margin-bottom: 10px; }
 .recommend_goods .goods_item .goods_desc .goods_pro {
-  font-size: 20px;
+  font-size: 22px;
   color: #A0A0A0;
-  margin-bottom: 35px; }
+  margin-bottom: 30px; }
 .recommend_goods .goods_item .goods_desc .goods_price {
-  font-size: 26px;
+  font-size: 30px;
+  color: #FF4E4E; }
+.recommend_goods .goods_item .goods_desc .goods_price .shoppe {
+  color: #9B9B9B;
+  font-size: 20px;
+  padding-left: 20px;
+  position: relative;
+  bottom: 5px; }
+.recommend_goods .goods_item .goods_desc .goods_price .shoppe .bonus_price {
   color: #FF4E4E; }
 .recommend_goods .goods_item .recommend {
   line-height: 26px;

BIN
data/resource/mobile/ugc/images/right.png


+ 13 - 2
mobile/control/special.php

@@ -405,6 +405,9 @@ class tpl_ugc
                         <div class=\"pro\">
                             <div class=\"pro_title\">评论</div>
                             <div class=\"reading\">阅读量 {$clicks}</div>
+                            <div class=\"complaint\">
+                                <a href=\"#\">投诉</a>
+                            </div>
                         </div>
                         <div class=\"comment_list\"></div>
                       </div>";
@@ -472,16 +475,24 @@ class tpl_ugc
         } else {
             $url = BASE_SITE_URL . "/mshop/goods_detail?goods_id={$goods_id}";
         }
-
+//            <span class="badge_null">已经售罄</span>
+//            <span class="badge_hot">人气热卖</span>
+//            <span class="badge_new">熊猫新品</span>
+//            <span class="badge_low">好物低价</span>
+//            <span class="badge_limit">限时特价</span>
         $str = "<div class=\"recommend_goods\">
                     <div class=\"goods_item\">
                         <a href=\"{$url}\">
+                            <span class=\"badge_new\">熊猫新品</span>
                             <div class=\"goods\">
                                 <div class=\"goods_img\"><img src=\"{$summary['goods_image_url']}\" alt=\"熊猫美妆\"></div>
                                 <div class=\"goods_desc\">
                                     <p class=\"goods_title\">{$summary['goods_mobile_name']}</p>
                                     <p class=\"goods_pro\">{$summary['goods_jingle']}</p>
-                                    <p class=\"goods_price\">¥{$summary['goods_price']}</p>
+                                    <p class=\"goods_price\">
+                                        ¥{$summary['goods_price']}
+                                        <span class=\"shoppe\">专柜价 205 / 红包抵<span class=\"bonus_price\">169.6</span>元</span>
+                                    </p>
                                 </div>
                             </div>";
         if(!empty($recoment))

+ 108 - 0
mobile/templates/default/ugc/complaint.php

@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>投诉</title>
+    <meta name="viewport" content="width=750,user-scalable=no,target-densitydpi=device-dpi">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="stylesheet" href="<?php echo RESOURCE_SITE_URL; ?>/mobile/ugc/css/complaint.css?<?php echo bonus_version(); ?>">
+</head>
+<body data-special_id="">
+    <div class="maincontent">
+        <p class="prompt">请选择投诉原因</p>
+        <div class="grup">
+            <div class="cell" data-option="欺诈">欺诈</div>
+            <div class="cell" data-option="色情">色情</div>
+            <div class="cell" data-option="诱导行为">诱导行为</div>
+            <div class="cell" data-option="不实信息">不实信息</div>
+            <div class="cell" data-option="违法犯罪">违法犯罪</div>
+            <div class="cell" data-option="骚扰">骚扰</div>
+            <div class="cell" data-option="违规声明原创">违规声明原创</div>
+            <div class="cell" data-option="未经授权的文章内容">未经授权的文章内容</div>
+            <div class="cell" data-option="其他">其他</div>
+        </div>
+        <p class="prompt">个人/企业等民事主体被诽谤侮辱、人身权或知识产权等被侵犯请选择"侵犯"投诉。</p>
+        <div class="grup">
+            <div class="cell" data-option="侵犯">侵犯(冒充他人、侵犯名誉等)</div>
+        </div>
+        <div class="submit_btn">确定</div>
+        <div class="shade">
+            <div class="loading"></div>
+        </div>
+    </div>
+    <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/mobile/bonus/js/zepto.min.js?<?php echo bonus_version(); ?>"></script>
+    <script type="text/javascript">
+        $(function(){
+
+            var host = (function () {
+                return window.location.protocol + "//" + window.location.host;
+            })();
+
+            var specialId = (function(){
+                return special_id = $('body').attr('data-special_id');
+            })();
+
+            var Complaint = function(){
+                var complaint_list = [];
+                this.set_option = function(cell){
+                    complaint_list.push(cell);
+                };
+                this.remove_option = function(cell){
+                    for(var i=0; i<complaint_list.length; i++) {
+                        if(complaint_list[i] == cell) {
+                            complaint_list.splice(i, 1);
+                            break;
+                        }
+                    }
+                };
+                this.get_options = function(){
+                    return complaint_list.join(',');
+                };
+            };
+
+            var complaint = new Complaint();
+
+           $('.cell').on('touchstart',function(){
+               var option = $(this).attr('data-option');
+               if($(this).hasClass('active')) {
+                   $(this).removeClass('active');
+                   complaint.remove_option(option);
+               }
+               else{
+                   $(this).addClass('active');
+                   complaint.set_option(option);
+               }
+           });
+           $('.submit_btn').on('touchstart',function () {
+               $('.shade').show();
+               var options = complaint.get_options();
+               if(options.length <= 0)
+               {
+                   $('.shade').hide();
+                   alert('请选择您的投诉原因');
+                   return;
+               }
+               var url = host + '/mobile/index.php?act=member_ugc&op=complaint&client_type=ajax&special_id=' + specialId + '&options=' + encodeURI(complaint.get_options());
+               $.ajax({
+                   type: "get",
+                   async: false,
+                   url: url,
+                   dataType: "jsonp",
+                   jsonp: "callback",
+                   jsonpCallback: "flightHandler",
+                   success: function(data){
+                       $('.shade').hide();
+                       if (data.code !== 200) {
+                           alert(data.message);
+                       }
+                       else {
+                           alert('投诉成功!');
+                           window.history.go(-1);
+                       }
+                   }
+               });
+           });
+        });
+    </script>
+</body>
+</html>