| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 | 
							- <!DOCTYPE html>
 
- <html>
 
- <head>
 
-     <meta charset="utf-8">
 
-     <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
 
-     <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
 
-     <title></title>
 
-     <link rel="stylesheet" type="text/css" href="../../css/api.css" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/iconfont.css" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/star-rating-svg.css?v=1.2" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/style.css?v=1.2" />
 
-     <style>
 
-         body{}
 
-     	.back-item{
 
-     	  width:100%;
 
-     	  /*padding:10px;*/
 
-     	  text-align:center;
 
-     	  /*border-bottom: 1px solid #e8e8e8;*/
 
-     	  box-sizing: border-box;
 
-     	}
 
-     	.back-item img{
 
-     	  width:20px;
 
-     	}
 
-         textarea{
 
-          width:100%;
 
-          height: 2rem;
 
-          font-size: 0.28rem;
 
-          line-height: 0.38rem;
 
-          padding: 0.5em;
 
-          box-sizing: border-box;
 
-          -webkit-appearance: none;
 
-         }
 
-         .image-list{
 
-            width:100%;
 
-          }
 
-          .feed-btn{
 
-            width:100%;
 
-            position:fixed;
 
-            bottom:0px;
 
-            padding:15px;
 
-            box-sizing:border-box;
 
-          }
 
-         .jq-star {
 
-          	width: 0.35rem !important;
 
-          	height: 0.35rem !important;
 
-          	padding: 0.2rem 0.1rem;
 
-          }
 
-         .m-bottom {
 
-            height: 0.86rem;
 
-            line-height: 0.86rem;
 
-            border-radius: 0.15rem;
 
-         }
 
-         .close_btn {
 
-             position: absolute;
 
-             margin-left: -0.52rem;
 
-             color: #d9251c;
 
-         }
 
-         .image-list .img_item {
 
-             float: left;
 
-         }
 
-     </style>
 
-     <script>
 
-     (function(w, d, m) {
 
-         function r() {
 
-             var t = 100,
 
-                 o = 750,
 
-                 e = d.documentElement.clientWidth || w.innerWidth,
 
-                 n = m.max(m.min(e, 480), 320),
 
-                 h = 50;
 
-             320 >= n && (h = m.floor(n / o * t * .99)),
 
-                 n > 320 && 362 >= n && (h = m.floor(n / o * t * 1)),
 
-                 n > 362 && 375 >= n && (h = m.floor(n / o * t * 1)),
 
-                 n > 375 && (h = m.floor(n / o * t * .97)),
 
-                 d.querySelector("html").style.fontSize = h + "px"
 
-         };
 
-         r();
 
-         w.onresize = function() {
 
-             r()
 
-         }
 
-     })(window, document, Math);
 
-     </script>
 
- </head>
 
- <body>
 
-     <div class="topbar"></div>
 
-     <header class="back-header back-header-bottom">
 
-         <ul>
 
-             <li class="padding-20 back-btn"><img class="back-header-ico" src="../../image/nav_button_back_default.png" /></li>
 
-             <li class="back-header-title">入住反馈</li>
 
-             <li class="more-btn"></li>
 
-         </ul>
 
-     </header>
 
-     <section class="padding-top">
 
-         <div class="back-item" style="padding:10px;">满意度星级评价(完成此项送30圈币)</div>
 
-         <div class="back-item">
 
-             <p>您对酒店的整体满意度</p>
 
-             <div class="my-rating"></div>
 
-         </div>
 
-         <div class="back-item">
 
-             <p>您是否会再次入住或向他人介绍本酒店</p>
 
-             <div class="my-rating1"></div>
 
-         </div>
 
-         <div class="back-item">
 
-             <p>您对酒店设施是否满意</p>
 
-             <div class="my-rating2"></div>
 
-         </div>
 
-         <div class="back-item">
 
-             <p>您对员工的待客礼仪是否满意</p>
 
-             <div class="my-rating3"></div>
 
-         </div>
 
-         <div class="back-item">
 
-             <p>您对我们提供的网上购物的总体评价</p>
 
-             <div class="my-rating4"></div>
 
-         </div>
 
-         <div class="back-item">文字建议与评价(完成此项送20圈币)</div>
 
-         <div class="back-item" style="position:relative;" id="wordCount">
 
-             <textarea row="5" maxlength="300" id="content" placeholder="对我们的酒店设施与服务,您还有什么建议吗?对我们的服务人员您有什么批评或表扬吗?请告诉我们..."></textarea>
 
-             <!-- <span style="position:absolute;right:10px;bottom:10px;"><span id="count-txt">0</span>/300</span> -->
 
-             <span class="wordwrap" style="bottom: -0.32rem;"><var class="word">300</var>/ 300</span>
 
-         </div>
 
-         <div class="h10"></div>
 
-         <div style="font-size: 0.28rem;">添加图片(最多3张)</div>
 
-         <div class="h5"></div>
 
-         <div class="image-list">
 
-             <span></span>
 
-             <img id="select-image" src="../../image/addimg.png" style="width: 0.86rem;" />
 
-         </div>
 
-         </div>
 
-     </section>
 
-     <div class="h20" style="padding-bottom: 1.3rem;"></div>
 
-     <div class="feed-btn more-btn">
 
-         <div class="m-bottom">提 交</div>
 
-     </div>
 
-     <div class="h50"></div>
 
- </body>
 
- <script type="text/javascript" src="../../script/api.js"></script>
 
- <script type="text/javascript" src="../../script/jquery.min.js"></script>
 
- <script type="text/javascript" src="../../script/jquery.tap.js"></script>
 
- <script type="text/javascript" src="../../script/jquery.star-rating-svg.js"></script>
 
- <script type="text/javascript">
 
- var _imgArr = [];
 
- var _store_id = '';
 
- var _tImgArr = [];
 
- var _satisfaction = 0;
 
- var _recommend = 0;
 
- var _facilities = 0;
 
- var _ceremony = 0;
 
- var _shopping = 0;
 
- var _keyid = '';
 
- apiready = function() {
 
-     _keyid = api.pageParam.keyid;
 
-     setFixStatusBar();
 
- };
 
- $(function() {
 
-     var wordCount = $("#wordCount"), textArea = wordCount.find("textarea"), word = wordCount.find(".word");
 
-     statInputNum(textArea, word);
 
- })
 
- $(".more-btn").on("tap", function() {
 
-     if (_satisfaction == 0 || _recommend == 0 || _facilities == 0 || _ceremony == 0 || _shopping == 0) {
 
-         api.toast({ msg: '请完成星级评价!' });
 
-         return false;
 
-     }
 
-     if ($("#content").val() == "") {
 
-         api.toast({ msg: '请填写反馈内容!' });
 
-         return false;
 
-     }
 
-     if ($("#content").val().length < 20) {
 
-         api.toast({ msg: '反馈内容不能少于20个字!' });
 
-         return false;
 
-     }
 
-     _imgArr.splice(0, _imgArr.length);
 
-     $(".image-list .img_item").each(function() {
 
-         var _src = $(this).data("img");
 
-         _imgArr.push(_src);
 
-     });
 
-     toast_loding_show();
 
-     $.ajax({
 
-         url: siteurl + 'v2/store/feedback',//'v1/store/feedback',
 
-         data: {
 
-             store_id: _keyid,
 
-             satisfaction: _satisfaction,
 
-             recommend: _recommend,
 
-             facilities: _facilities,
 
-             ceremony: _ceremony,
 
-             shopping: _shopping,
 
-             content: $("#content").val(),
 
-             member_id: $api.getStorage("memberid"),
 
-             img_list: _imgArr.toString()
 
-         },
 
-         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
 
-         dataType: 'json',
 
-         type: 'post',
 
-         success: function(datas) {
 
-             toast_loding_hide();
 
-             if (datas.result) {
 
-                 // setPoint();
 
-                 api.toast({ msg: "提交成功,感谢您的反馈!" })
 
-                 setTimeCloseWin("feedback");
 
-             } else {
 
-                 errcode(datas, datas.code);
 
-             }
 
-         }
 
-     });
 
-     return false;
 
- })
 
- $(".my-rating").starRating({
 
-     starSize: 23,
 
-     initialRating: 0,
 
-     useFullStars: true,
 
-     activeColor: '#d9251c',
 
-     starShape: 'rounded',
 
-     hoverColor: '#d9251c',
 
-     disableAfterRate: false,
 
-     callback: function(currentRating, $el) {
 
-         _satisfaction = currentRating;
 
-     }
 
- });
 
- $(".my-rating1").starRating({
 
-     starSize: 23,
 
-     initialRating: 0,
 
-     useFullStars: true,
 
-     activeColor: '#d9251c',
 
-     starShape: 'rounded',
 
-     hoverColor: '#d9251c',
 
-     disableAfterRate: false,
 
-     callback: function(currentRating, $el) {
 
-         _recommend = currentRating;
 
-     }
 
- });
 
- $(".my-rating2").starRating({
 
-     starSize: 23,
 
-     initialRating: 0,
 
-     useFullStars: true,
 
-     activeColor: '#d9251c',
 
-     starShape: 'rounded',
 
-     hoverColor: '#d9251c',
 
-     disableAfterRate: false,
 
-     callback: function(currentRating, $el) {
 
-         _facilities = currentRating;
 
-     }
 
- });
 
- $(".my-rating3").starRating({
 
-     starSize: 23,
 
-     initialRating: 0,
 
-     useFullStars: true,
 
-     activeColor: '#d9251c',
 
-     starShape: 'rounded',
 
-     hoverColor: '#d9251c',
 
-     disableAfterRate: false,
 
-     callback: function(currentRating, $el) {
 
-         _ceremony = currentRating;
 
-     }
 
- });
 
- $(".my-rating4").starRating({
 
-     starSize: 23,
 
-     initialRating: 0,
 
-     useFullStars: true,
 
-     activeColor: '#d9251c',
 
-     starShape: 'rounded',
 
-     hoverColor: '#d9251c',
 
-     disableAfterRate: false,
 
-     callback: function(currentRating, $el) {
 
-         _shopping = currentRating;
 
-     }
 
- });
 
- $("#select-image").on("tap", function() {
 
-     if (_tImgArr.length < 3) {
 
-         var has = hasPermission('storage');
 
-     if(!has || !has[0] || !has[0].granted){
 
-         api.confirm({
 
-             title: '提醒',
 
-             msg: "没有获得 存储 权限\n是否前往设置?",
 
-             buttons: ['去设置', '取消']
 
-         }, function (ret, err) {
 
-             var index = ret.buttonIndex;
 
-             if (index == 1) {
 
-                 reqPermission('storage');
 
-             } else {
 
-                api.toast({ msg: '获取存储权限失败...' }); 
 
-             }
 
-         });
 
-         // $(".border-none").removeClass("mask-hidden");
 
-         return false;
 
-     }
 
-         api.getPicture({
 
-             sourceType: 'album',
 
-             encodingType: 'jpg',
 
-             mediaValue: 'pic',
 
-             destinationType: 'url',
 
-             // allowEdit: true,
 
-             quality: 100,
 
-             targetWidth: 600,
 
-             targetHeight: 600,
 
-             saveToPhotoAlbum: false
 
-         }, function(ret, err) {
 
-             if (ret) {
 
-                 upimg(ret.data);
 
-                 // _tImgArr.push(ret.data);
 
-             }
 
-         });
 
-     } else {
 
-         api.toast({ msg: '上传不能超过3张图片' });
 
-     }
 
-     return false;
 
- })
 
- function upimg(files) {
 
-     if (files) {
 
-         api.ajax({
 
-             url: siteurl + 'v2/upload/tmp',//'?do=upfile',
 
-             method: 'post',
 
-             data: {
 
-                 files: {
 
-                     file: files
 
-                 }
 
-             },
 
-             headers: { "X-TOKEN": $api.getStorage("accesstoken") }
 
-         }, function(ret, err) {
 
-             if (ret) {
 
-                 _tImgArr.push(ret.data);
 
-                 create_html(_tImgArr);
 
-             }
 
-         });
 
-     }
 
- }
 
- function create_html(list){
 
-     var html = '';
 
-     for(var i in list){
 
-         html += '<div class="img_item" data-img="'+list[i].file_name+'"><img id="select-image" class="select-image" src="' + list[i].url + '" style="width: 1.6rem;margin-right: 0.2rem;"/><span class="close_btn iconfont icon-guanbi" data-index="'+i+'"></span></div>'
 
-     }
 
-     $(".image-list span").html(html);
 
- }
 
- $(".image-list").on("tap", ".close_btn", function() {
 
-     // console.log(this)
 
-     _tImgArr.splice($(this).data('index')*1, 1);
 
-     create_html(_tImgArr);
 
- });
 
- </script>
 
- </html>
 
 
  |