add_image.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. {extend name="default/base/base_member" /}
  2. {block name="member_main"}
  3. <div class="dsm-flow-layout">
  4. <div class="dsm-flow-container">
  5. <div class="title"><a href="{:url('Memberevaluate/index')}" class="dsm-btn-mini fr"><i class="iconfont">&#xe74e;</i>{$Think.lang.return_space|raw}</a>
  6. <h3>{$Think.lang.merchandise_carry_share_order}</h3>
  7. </div>
  8. <div class="alert">
  9. <h4>{$Think.lang.picture_upload_request}:</h4>
  10. {$Think.lang.picture_format_description}
  11. </div>
  12. <form id="add_form" action="{:url('Memberevaluate/add_image_save')}" method="post">
  13. <input type="hidden" name="geval_id" value="{$geval_info.geval_id}">
  14. <div class=" dsm-default-form">
  15. <h3>{$Think.lang.evaluation_information}</h3>
  16. <dl>
  17. <dt>{$Think.lang.commodity_information}:</dt>
  18. <dd>
  19. <div>
  20. <a href="{:url('Goods/index',['goods_id'=>$geval_info.geval_goodsid])}" target="_blank"><img src="{:goods_cthumb($geval_info.geval_goodsimage)}" onload="javascript:ResizeImage(this,44,44);"/></a>
  21. <a href="{:url('Goods/index',['goods_id'=>$geval_info.geval_goodsid])}" target="_blank">{$geval_info.geval_goodsname}</a>
  22. </div>
  23. </dd>
  24. </dl>
  25. <dl>
  26. <dt>{$Think.lang.commodity_rating}:</dt>
  27. <dd>
  28. <div class="raty" style="display:inline-block;"
  29. data-score="{$geval_info.geval_scores}"></div>
  30. </dd>
  31. </dl>
  32. <dl>
  33. <dt>{$Think.lang.comment_details}:</dt>
  34. <dd>{$geval_info.geval_content}</dd>
  35. </dl>
  36. <h3 class="mt20">{$Think.lang.upload_share_pictures}</h3>
  37. <div class="evaluation-image">
  38. <ul>
  39. {for start="0" end="5" }
  40. <li>
  41. <div class="upload-thumb">
  42. <div dstype="image_item" style="display:none;"><img src="">
  43. <input type="hidden" dstype="input_image" name="evaluate_image[]" value="">
  44. <a href="javascript:;" dstype="del" class="del" title="{$Think.lang.remove}">X</a>
  45. </div>
  46. </div>
  47. <div class="upload-btn">
  48. <a href="javascript:void(0);">
  49. <span><input type="file" hidefocus="true" size="1" class="input-file" name="file"></span>
  50. <p>{$Think.lang.image_upload}</p>
  51. </a>
  52. </div>
  53. </li>
  54. {/for}
  55. </ul>
  56. </div>
  57. <div class="bottom">
  58. <input id="btn_submit" class="submit" type="submit" value="{$Think.lang.confirm_submission}">
  59. </div>
  60. </div>
  61. </form>
  62. </div>
  63. <div class="dsm-flow-item">
  64. {if $store_info.is_platform_store}
  65. <div class="dsm-evaluation-store">
  66. <div class="title">{$Think.lang.member_evaluation_storeinfotitle}</div>
  67. <div class="store-name"> {$store_info.store_name}</div>
  68. <div class="store-info">
  69. {if !$store_info.is_platform_store}
  70. <dl class="all-rate">
  71. <dt>{$Think.lang.comprehensive_score}:</dt>
  72. <dd>
  73. <div class="rating"><span style="width:{$store_info.store_credit_percent}%"></span></div>
  74. <em>{$store_info.store_credit_average}</em>{$Think.lang.credit_unit}</dd>
  75. </dl>
  76. <div class="detail-rate">
  77. <h5><strong>{$Think.lang.member_evaluation_storeevalstat}</strong>{$Think.lang.compare_with_industry}</h5>
  78. <ul>
  79. {foreach name="store_info.store_credit" item="val"}
  80. <li>
  81. <span>{$val.text}</span><span class="credit">{$val.credit}{$Think.lang.credit_unit}</span>
  82. {present name="val.percent_class" && present name="val.percent_text"}
  83. <span class="{$val.percent_class}"><i></i>{$val.percent_text}<em>{$val.percent}</em></span>
  84. {/present}
  85. </li>
  86. {/foreach}
  87. </ul>
  88. </div>
  89. {/if}
  90. {if $store_info.store_qq || $store_info.store_ww}
  91. <dl class="messenger">
  92. <dt>{$Think.lang.contact_information}:</dt>
  93. <dd><span member_id="{$store_info.member_id}"></span>
  94. {if $store_info.store_qq}
  95. <a target="_blank" href="{$Think.HTTP_TYPE}wpa.qq.com/msgrd?v=3&uin={$store_info.store_qq}&site=qq&menu=yes" title="QQ: {$store_info.store_qq}"><img border="0" src="{$Think.HTTP_TYPE}wpa.qq.com/pa?p=2:{$store_info.store_qq}:52" style=" vertical-align: middle;"/></a>
  96. {/if}
  97. {if $store_info.store_ww}
  98. <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&amp;uid={$store_info.store_ww}&site=cntaobao&s=1&charset=utf-8" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid={$store_info.store_ww}&site=cntaobao&s=2&charset=utf-8" alt="{$Think.lang.ds_message_me}" style=" vertical-align: middle;"/></a>
  99. {/if}
  100. </dd>
  101. </dl>
  102. {/if}
  103. {if $store_info.store_phone}
  104. <dl class="messenger">
  105. <dt>{$Think.lang.store_phone_number}:</dt>
  106. <dd>{$store_info.store_phone}</dd>
  107. </dl>
  108. {/if}
  109. <dl class="no-border">
  110. <dt>{$Think.lang.company_name}:</dt>
  111. <dd>{$store_info.store_company_name}</dd>
  112. </dl>
  113. <dl >
  114. <dt>{$Think.lang.location_space|raw}:</dt>
  115. <dd>{$store_info.store_address}</dd>
  116. </dl>
  117. </div>
  118. </div>
  119. {/if}
  120. </div>
  121. </div>
  122. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.raty/jquery.raty.min.js"></script>
  123. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/fileupload/jquery.iframe-transport.js" charset="utf-8"></script>
  124. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/fileupload/jquery.ui.widget.js" charset="utf-8"></script>
  125. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/js/fileupload/jquery.fileupload.js" charset="utf-8"></script>
  126. <script type="text/javascript">
  127. $(document).ready(function(){
  128. $('.raty').raty({
  129. path: "{$Think.PLUGINS_SITE_ROOT}/js/jquery.raty/img",
  130. readOnly: true,
  131. score: function() {
  132. return $(this).attr('data-score');
  133. }
  134. });
  135. $('#add_form').validate({
  136. submitHandler: function (form) {
  137. ds_ajaxpost('add_form', 'url', "{:url('Memberevaluate/index')}")
  138. }
  139. });
  140. //图片上传
  141. $(".input-file").fileupload({
  142. dataType: 'json',
  143. url: "{:url('Snsalbum/swfupload')}",
  144. formData: "",
  145. add: function(e, data) {
  146. data.formData = {category_id:{$ac_id}}
  147. data.submit();
  148. },
  149. done: function (e, data) {
  150. if(data.result.state) {
  151. $item = $(this).parents('li');
  152. $item.find('img').attr('src', data.result.file_url);
  153. $item.find('[dstype="input_image"]').val(data.result.file_name);
  154. var file_id = $item.find('[dstype="del"]').attr('data-file-id');
  155. album_pic_del(file_id);
  156. $item.find('[dstype="del"]').attr('data-file-id', data.result.file_id);
  157. $item.find('[dstype="image_item"]').show();
  158. } else {
  159. layer.msg(data.result.message);
  160. }
  161. }
  162. });
  163. $('[dstype="del"]').on('click', function() {
  164. album_pic_del($(this).attr('data-file-id'));
  165. $item = $(this).parent();
  166. $item.find('[dstype="input_image"]').val('');
  167. $item.hide();
  168. });
  169. function album_pic_del(file_id) {
  170. $.getJSON("{:url('Snsalbum/album_pic_del')}",{id: + file_id}, function(result){
  171. layer.msg(result.message);
  172. })
  173. }
  174. });
  175. </script>
  176. {/block}