qiuzhu.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. function qiuzhu_init() {
  2. $('#btnQZ').on('click', function () {
  3. $("#notPlay").toggle();
  4. /*点击隐藏*/
  5. /*展示*/
  6. $('#play')[0].style.display = '';
  7. });
  8. }
  9. function help() {
  10. $('#zqBack_help').on('click', function () {
  11. if ($('#titlteZs')[0].style.display == 'none') {
  12. $('#notitle').toggle();
  13. $('#titlteZs')[0].style.display = '';
  14. } else {
  15. $('#notitle')[0].style.display = '';
  16. $('#titlteZs')[0].style.display = 'none';
  17. }
  18. })
  19. }
  20. function shValue(v) {
  21. $('#qzHS').append($('<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">\n' +
  22. ' <div class="weui-media-box__bd">\n' +
  23. ' <div style="display: flex; flex-direction: row; justify-content: space-between;">\n' +
  24. ' <p class="weui-media-box__desc">业主1号</p>\n' +
  25. ' <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
  26. ' </div>\n' +
  27. ' <div class="weui-cell ">\n' +
  28. ' <div class="weui-cell__bd">\n' +
  29. ' <textarea class="weui-textarea" rows="1" readonly >' + v.replyContent + '</textarea>\n' +
  30. ' <div class="weui-textarea-counter"></div>\n' +
  31. ' </div>\n' +
  32. ' </div>\n' +
  33. ' </div>\n' +
  34. ' </a>\n<br />'));
  35. }
  36. function timestampToTime(timestamp) {
  37. var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  38. var Y = date.getFullYear() + '/';
  39. var M = ((date.getMonth() + 1) < 10) ? ('0' + (date.getMonth() + 1) + '/') : ((date.getMonth() + 1) + '/');
  40. var D = (date.getDate() < 10) ? ('0' + date.getDate() + ' ') : (date.getDate() + ' ');
  41. var h = (date.getHours() < 10) ? ('0' + date.getHours() + ':') : (date.getHours() + ':');
  42. var m = (date.getMinutes() < 10) ? ('0' + date.getMinutes() + ':') : (date.getMinutes() + ':');
  43. var s = (date.getSeconds() < 10) ? ('0' + date.getSeconds()) : (date.getSeconds());
  44. return Y + M + D + h + m + s;
  45. }
  46. function family_init() {
  47. /*$('#family').on('click',function () {
  48. $('#familyDisplay')[0].style.display == '';
  49. alert($('#familyDisplay')[0].style.display == 'none')
  50. if($('#familyDisplay')[0].style.display == 'none'){
  51. $('#notPlay').toggle();
  52. }else{
  53. $('#familyDisplay')[0].style.display == '';
  54. $('#notPlay')[0].style.display == 'none';
  55. }
  56. })*/
  57. }
  58. function submit_back() {
  59. $('#back').on('click', function () {
  60. if ($('#notPlay')[0].style.display = 'none') {
  61. $('#notPlay')[0].style.display = '';
  62. $('#play').toggle();
  63. }
  64. })
  65. }