setting.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_main"}
  3. <div class="dssc-form-default">
  4. <form method="post" enctype="multipart/form-data" id="my_store_form" >
  5. <dl>
  6. <dt>{$Think.lang.store_setting_grade}{$Think.lang.ds_colon}</dt>
  7. <dd>
  8. <p>{$store_grade.storegrade_name}</p>
  9. </dd>
  10. </dl>
  11. <dl>
  12. <dt>{$Think.lang.store_name}:</dt>
  13. <dd>
  14. <input type="text" value="{$store_info.store_name}" name="store_name" class="text w400">
  15. </dd>
  16. </dl>
  17. <dl>
  18. <dt>{$Think.lang.store_setting_store_zy}{$Think.lang.ds_colon}</dt>
  19. <dd>
  20. <textarea name="store_mainbusiness" rows="2" class="textarea w400" maxlength="50" >{$store_info.store_mainbusiness}</textarea>
  21. <p class="hint">{$Think.lang.store_create_store_zy_hint}</p>
  22. </dd>
  23. </dl>
  24. <dl>
  25. <dt>{$Think.lang.store_qr_code}:</dt>
  26. <dd>
  27. <p><img src="{:store_qrcode($store_info.store_id)}" title="{$Think.lang.place_origin}{:url('Store/goods_all',['store_id'=>$store_info.store_id])}"></p>
  28. <p class="hint">{$Think.lang.generate_new_qr_code}</p>
  29. </dd>
  30. </dl>
  31. {if $miniprogram_code!=''}
  32. <dl>
  33. <dt>{$Think.lang.store_code}:</dt>
  34. <dd>
  35. <p><img src="{$miniprogram_code}" width="148"></p>
  36. <p class="hint">{$Think.lang.generate_new_applet}</p>
  37. </dd>
  38. </dl>
  39. {/if}
  40. <dl>
  41. <dt>{$Think.lang.store_setting_change_label}{$Think.lang.ds_colon}</dt>
  42. <dd>
  43. <div class="dssc-upload-thumb store-logo">
  44. <p>
  45. <img src="{notempty name='store_info.store_logo'}{:ds_get_pic(ATTACH_STORE.'/'.session('store_id'),$store_info.store_logo)}{/notempty}" id="img_store_logo" />
  46. </p>
  47. </div>
  48. <div class="dssc-upload-btn">
  49. <a href="javascript:void(0);">
  50. <span><input type="file" hidefocus="true" size="1" class="input-file" name="store_logo" id="store_logo" /></span>
  51. <p><i class="iconfont">&#xe733;</i>{$Think.lang.image_upload}</p>
  52. </a>
  53. </div>
  54. <p class="hint">{$Think.lang.store_setting_label_tip|raw}</p>
  55. </dd>
  56. </dl>
  57. <dl>
  58. <dt>{$Think.lang.store_setting_change_banner}{$Think.lang.ds_colon}</dt>
  59. <dd>
  60. <div class="dssc-upload-thumb store-banner">
  61. <p>
  62. <img src="{notempty name='store_info.store_banner'}{:ds_get_pic(ATTACH_STORE.'/'.session('store_id'),$store_info.store_banner)}{/notempty}" id="img_store_banner" />
  63. </p>
  64. </div>
  65. <div class="dssc-upload-btn"> <a href="javascript:void(0);"><span>
  66. <input type="file" hidefocus="true" size="1" class="input-file" name="store_banner" id="store_banner" />
  67. </span>
  68. <p><i class="iconfont">&#xe733;</i>{$Think.lang.image_upload}</p>
  69. </a> </div>
  70. <p class="hint">{$Think.lang.store_setting_banner_tip|raw}</p>
  71. </dd>
  72. </dl>
  73. <dl>
  74. <dt>{$Think.lang.store_setting_change_avatar}{$Think.lang.ds_colon} </dt>
  75. <dd>
  76. <div class="dssc-upload-thumb store-avatar">
  77. <p>
  78. <img src="{notempty name='store_info.store_avatar'}{:ds_get_pic(ATTACH_STORE.'/'.session('store_id'),$store_info.store_avatar)}{/notempty}" id="img_store_avatar" />
  79. </p>
  80. </div>
  81. <div class="dssc-upload-btn">
  82. <a href="javascript:void(0);">
  83. <span><input type="file" hidefocus="true" size="1" class="input-file" name="store_avatar" id="store_avatar" /></span>
  84. <p><i class="iconfont">&#xe733;</i>{$Think.lang.image_upload}</p>
  85. </a>
  86. </div>
  87. <p class="hint">{$Think.lang.store_setting_sign_tip|raw}</p>
  88. </dd>
  89. </dl>
  90. <dl>
  91. <dt>{$Think.lang.conversion_code_generate}{$Think.lang.ds_colon}</dt>
  92. <dd>
  93. <input class="w50 text" name="store_vrcode_prefix" type="text" maxlength="3" value="{$store_info.store_vrcode_prefix}" />
  94. <span></span>
  95. <p class="hint">{$Think.lang.conversion_code_generate_interpretation}</p>
  96. </dd>
  97. </dl>
  98. <dl>
  99. <dt>QQ{$Think.lang.ds_colon}</dt>
  100. <dd>
  101. <input class="w200 text" name="store_qq" type="text" id="store_qq" value="{$store_info.store_qq}" />
  102. </dd>
  103. </dl>
  104. <dl>
  105. <dt>{$Think.lang.store_setting_wangwang}{$Think.lang.ds_colon}</dt>
  106. <dd>
  107. <input class="text w200" name="store_ww" type="text" id="store_ww" value="{$store_info.store_ww}" />
  108. </dd>
  109. </dl>
  110. <dl>
  111. <dt>{$Think.lang.store_phone}{$Think.lang.ds_colon}</dt>
  112. <dd>
  113. <input class="text w200" name="store_phone" maxlength="20" type="text" id="store_phone" value="{$store_info.store_phone}" />
  114. </dd>
  115. </dl>
  116. <dl>
  117. <dt>{$Think.lang.store_setting_seo_keywords}{$Think.lang.ds_colon}</dt>
  118. <dd>
  119. <p>
  120. <input class="text w400" name="seo_keywords" type="text" value="{$store_info.store_keywords}" />
  121. </p>
  122. <p class="hint">{$Think.lang.store_setting_seo_keywords_help}</p>
  123. </dd>
  124. </dl>
  125. <dl>
  126. <dt>{$Think.lang.store_setting_seo_description}{$Think.lang.ds_colon}</dt>
  127. <dd>
  128. <p>
  129. <textarea name="seo_description" rows="3" class="textarea w400" id="remark_input" >{$store_info.store_description}</textarea>
  130. </p>
  131. <p class="hint">{$Think.lang.store_setting_seo_description_help}</p>
  132. </dd>
  133. </dl>
  134. <div class="bottom">
  135. <input type="submit" class="submit" value="{$Think.lang.store_goods_class_submit}" />
  136. </div>
  137. </form>
  138. </div>
  139. <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/ajaxfileupload.js"></script>
  140. <script>
  141. $(function () {
  142. var url = '{:url("Sellersetting/store_image_upload")}';
  143. $('#my_store_form').find('input[type="file"]').unbind().change(function () {
  144. var id = $(this).attr('id');
  145. ajaxFileUpload(url, id);
  146. });
  147. });
  148. function ajaxFileUpload(url, id)
  149. {
  150. $(document).off('change', "#store_banner").on('change', function () {
  151. $.ajaxFileUpload({
  152. url: url,
  153. secureuri: false,
  154. fileElementId: id,
  155. dataType: 'json',
  156. data: {id: id},
  157. success: function (data)
  158. {
  159. if (data.error) {
  160. alert(data.error);
  161. } else {
  162. $("#img_" + id).attr('src', data.file_path);
  163. }
  164. },
  165. error: function (data, status, e)
  166. {
  167. console.error(data);
  168. }
  169. })
  170. return false;
  171. });
  172. }
  173. </script>
  174. {/block}