vote-notice - 副本.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <view class="vote-notice-page">
  3. <!-- 主体内容区 -->
  4. <view class="notice-content">
  5. <view class="notice-title">业主投票须知</view>
  6. <view class="notice-list">
  7. <view class="notice-item">
  8. <view class="item-num">1.</view>
  9. <view class="item-text">1户1票,多投无效。</view>
  10. </view>
  11. <view class="notice-item">
  12. <view class="item-num">2.</view>
  13. <view class="item-text">需持证业主身份证后四位提交投票(用于身份核验,确保投票有效性)。</view>
  14. </view>
  15. <view class="notice-item">
  16. <view class="item-num">3.</view>
  17. <view class="item-text">征求意见共有4个选项(续签、公开招标、弃权、其他),<span class="text-warning">只能选择一个选项进行投票</span>,多选视为无效票。</view>
  18. </view>
  19. <view class="notice-item">
  20. <view class="item-num">4.</view>
  21. <view class="item-text">
  22. 根据《中华人民共和国民法典》相关规定:
  23. <view class="law-rule">
  24. <view class="result-desc">
  25. 1. 依据《中华人民共和国民法典》第二百七十八条(业主共同决定事项)、第九百四十七条第一款(物业服务合同终止与续签)规定;<br>
  26. </view>
  27. <view class="result-desc">
  28. 2. 表决生效条件:需经专有部分面积占比三分之二以上的业主且人数占比三分之二以上的业主参与表决;<br>
  29. </view>
  30. <view class="result-desc">
  31. 3. 结果判定:<br>
  32. - 若经参与专有部分面积过半数的业主且参与表决人数过半数的业主同意,则表明广大业主同意与原物业公司续签合同;<br>
  33. - 反之,由业主委员会(物业管理委员会)牵头公开招标确定优质物业公司。
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 底部确认按钮(带倒计时) -->
  40. <view
  41. class="confirm-btn"
  42. @click="handleConfirm"
  43. :class="{ disabled: !isBtnActive }"
  44. :disabled="!isBtnActive"
  45. >
  46. {{ isBtnActive ? '已阅读并理解投票须知' : `请阅读须知(${countDown}秒)` }}
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. name: 'VoteNotice',
  54. data() {
  55. return {
  56. countDown: 3, // 倒计时秒数
  57. isBtnActive: false, // 按钮是否可点击
  58. timer: null // 定时器对象
  59. }
  60. },
  61. onLoad() {
  62. // 页面加载后启动倒计时
  63. this.startCountDown();
  64. },
  65. onUnload() {
  66. // 页面卸载时清除定时器,防止内存泄漏
  67. if (this.timer) {
  68. clearInterval(this.timer);
  69. }
  70. },
  71. methods: {
  72. // 启动倒计时
  73. startCountDown() {
  74. // 初始状态按钮不可点击
  75. this.isBtnActive = false;
  76. // 启动定时器
  77. this.timer = setInterval(() => {
  78. this.countDown--;
  79. // 倒计时结束
  80. if (this.countDown <= 0) {
  81. clearInterval(this.timer);
  82. this.isBtnActive = true; // 激活按钮
  83. this.countDown = 0; // 确保显示为0
  84. }
  85. }, 1000); // 每秒执行一次
  86. },
  87. // 返回上一页
  88. handleBack() {
  89. uni.navigateBack({ delta: 1 });
  90. },
  91. // 确认已阅读(仅在按钮激活时可触发)
  92. handleConfirm() {
  93. if (!this.isBtnActive) return;
  94. // 存储已阅读状态
  95. uni.setStorageSync('hasReadVoteNotice', 'true');
  96. // 跳转至投票页面(替换为实际路径)
  97. uni.reLaunch({
  98. url: '/pages/vote'
  99. });
  100. }
  101. }
  102. }
  103. </script>
  104. <style scoped>
  105. /* 基础样式与之前保持一致,新增以下样式 */
  106. .confirm-btn {
  107. width: 100%;
  108. height: 45px;
  109. line-height: 45px;
  110. text-align: center;
  111. background-color: #2d8cf0;
  112. color: #fff;
  113. border-radius: 6px;
  114. font-size: 16px;
  115. font-weight: 500;
  116. margin-top: 20px;
  117. /* 禁止选中文字 */
  118. user-select: none;
  119. -webkit-user-select: none;
  120. }
  121. /* 按钮禁用状态样式 */
  122. .confirm-btn.disabled {
  123. background-color: #c0c4cc;
  124. color: #fff;
  125. cursor: not-allowed;
  126. }
  127. /* 其他原有样式保持不变 */
  128. .vote-notice-page {
  129. width: 100%;
  130. min-height: 100vh;
  131. background-color: #fff;
  132. /* padding-bottom: 30px; */
  133. }
  134. .nav-bar {
  135. display: flex;
  136. align-items: center;
  137. justify-content: space-between;
  138. height: 45px;
  139. padding: 0 15px;
  140. background-color: #fff;
  141. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  142. }
  143. .nav-back {
  144. width: 40px;
  145. height: 40px;
  146. display: flex;
  147. align-items: center;
  148. justify-content: center;
  149. }
  150. .nav-title {
  151. font-size: 16px;
  152. font-weight: 500;
  153. color: #333;
  154. }
  155. .nav-empty {
  156. width: 40px;
  157. height: 40px;
  158. }
  159. .notice-content {
  160. width: 100%;
  161. margin: auto;
  162. background-color: #fff;
  163. border-radius: 8px;
  164. padding: 20px 15px;
  165. }
  166. .notice-title {
  167. font-size: 18px;
  168. font-weight: 600;
  169. color: #222;
  170. text-align: center;
  171. margin-bottom: 25px;
  172. padding-bottom: 15px;
  173. border-bottom: 1px solid #eee;
  174. }
  175. .notice-list {
  176. margin-bottom: 30px;
  177. }
  178. .notice-item {
  179. display: flex;
  180. margin-bottom: 10px;
  181. line-height: 1.6;
  182. align-items: baseline;
  183. }
  184. .item-num {
  185. width: 10px;
  186. height: 10px;
  187. /* border-radius: 50%;
  188. background-color: #2d8cf0; */
  189. color: #333;
  190. font-size: 14px;
  191. display: flex;
  192. align-items: center;
  193. justify-content: center;
  194. margin-right: 12px;
  195. flex-shrink: 0;
  196. }
  197. .item-text {
  198. font-size: 15px;
  199. color: #444;
  200. flex: 1;
  201. }
  202. .text-warning {
  203. color: #f56c6c;
  204. font-weight: 500;
  205. }
  206. .law-rule {
  207. margin-top: 8px;
  208. padding-left: 15px;
  209. font-size: 14px;
  210. color: #555;
  211. border-left: 2px solid #eee;
  212. }
  213. .result-desc {
  214. margin-top: 5px;
  215. /* padding-left: 15px; */
  216. }
  217. </style>