familyMember.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="common_page adffc" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title="家庭成员" bgColor="#FFFFFF"></cus-header>
  4. <div class="add">
  5. <div class="btn adfacjc" @tap="handleAdd">
  6. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/af9133fd-e15e-454d-9152-e4629fd0ce28.png"></image>
  7. <text>添加</text>
  8. </div>
  9. </div>
  10. <template v-if="list.length">
  11. <div class="list">
  12. <up-list @scrolltolower="scrolltolower" style="height: 100%;">
  13. <up-list-item v-for="(item, index) in list" :key="index">
  14. <div class="box adfacjb">
  15. <div class="box-left adfac" @tap="handleEdit(item,index)">
  16. <div class="box-left-edit">
  17. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/10/09/7799f9f2-1dca-4af3-980b-7f6def10e22f.png"></image>
  18. </div>
  19. <div class="box-left-info">
  20. <div class="box-left-info-top adfac">
  21. <div class="name">{{'张琳琳'}}</div>
  22. <image class="sex" v-if="item.sex==2" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/b6d1fcb3-55ba-4104-b8cd-756b963a4da8.png"></image>
  23. <image class="sex" v-else-if="item.sex==1" src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/12/a1899fd0-c468-48d9-b554-2f17b75a4157.png"></image>
  24. <div class="age" :class="{'women':item.sex==2,'man':item.sex==1}">{{46}}岁</div>
  25. </div>
  26. <div class="box-left-info-bottom">
  27. 身份证 {{'340123**********09'}}
  28. </div>
  29. </div>
  30. </div>
  31. <div class="box-right" @tap="handleDelete(item,index)">
  32. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/09/23/ebdf1327-3eeb-4797-8840-cb1ec4840d9a.png"></image>
  33. </div>
  34. </div>
  35. </up-list-item>
  36. </up-list>
  37. </div>
  38. </template>
  39. <template v-else>
  40. <div class="empty">暂无家庭成员,请添加</div>
  41. </template>
  42. </view>
  43. </template>
  44. <script setup name="">
  45. import CusHeader from '@/components/CusHeader/index.vue'
  46. import { ref } from 'vue'
  47. const list = ref([{sex:1},{sex:2},{sex:2}])
  48. const handleAdd = () => {
  49. uni.navigateTo({
  50. url:'/pagesMy/familyMemberVindicate'
  51. })
  52. }
  53. const handleEdit = (item,index) => {
  54. uni.navigateTo({
  55. url:'/pagesMy/familyMemberVindicate?member='+encodeURIComponent(JSON.stringify(item))
  56. })
  57. }
  58. const handleDelete = (item,index) => {
  59. uni.showModal({
  60. title:'温馨提示',
  61. content:`是否确认删除家庭成员【${item.name||'张琳琳'}】?`,
  62. success: (res) => {
  63. if(res.confirm){
  64. }
  65. }
  66. })
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. .common_page{
  71. padding-bottom: 60rpx;
  72. .add{
  73. margin-top: 20rpx;
  74. background: #FFFFFF;
  75. border-radius: 20rpx 20rpx 0 0;
  76. padding: 30rpx 24rpx 20rpx;
  77. .btn{
  78. width: 100%;
  79. background: rgba(112,207,82,0.08);
  80. border-radius: 24rpx;
  81. border: 1rpx dotted #70CF52;
  82. padding: 21rpx 0;
  83. image{
  84. width: 36rpx;
  85. height: 36rpx;
  86. }
  87. text{
  88. font-family: PingFang-SC, PingFang-SC;
  89. font-weight: bold;
  90. font-size: 28rpx;
  91. color: #70CF52;
  92. line-height: 40rpx;
  93. margin-left: 18rpx;
  94. letter-spacing: 2rpx;
  95. }
  96. }
  97. }
  98. .list{
  99. flex: 1;
  100. overflow: auto;
  101. background: #FFFFFF;
  102. border-radius: 0 0 20rpx 20rpx;
  103. padding: 0 24rpx;
  104. .box{
  105. padding: 37rpx 0;
  106. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #F2F2F2;
  107. &-left{
  108. width: calc(100% - 76rpx);
  109. &-edit{
  110. width: 36rpx;
  111. height: 36rpx;
  112. image{
  113. width: 100%;
  114. height: 100%;
  115. }
  116. }
  117. &-info{
  118. width: calc(100% - 36rpx);
  119. padding-left: 20rpx;
  120. box-sizing: border-box;
  121. &-top{
  122. .name{
  123. font-family: PingFang-SC, PingFang-SC;
  124. font-weight: bold;
  125. font-size: 32rpx;
  126. color: #151B29;
  127. line-height: 32rpx;
  128. }
  129. .sex{
  130. width: 44rpx;
  131. height: 32rpx;
  132. margin-left: 16rpx;
  133. }
  134. .age{
  135. border-radius: 13rpx;
  136. font-family: PingFangSC, PingFang SC;
  137. font-weight: 400;
  138. font-size: 20rpx;
  139. line-height: 24rpx;
  140. padding: 4rpx 10rpx;
  141. margin-left: 13rpx;
  142. &.women{
  143. background: rgba(244,101,122,0.14);
  144. color: #F4657A;
  145. }
  146. &.man{
  147. background: rgba(5,169,254,0.12);
  148. color: #05A9FE;
  149. }
  150. }
  151. }
  152. &-bottom{
  153. font-family: PingFangSC, PingFang SC;
  154. font-weight: 400;
  155. font-size: 24rpx;
  156. color: #989998;
  157. line-height: 24rpx;
  158. margin-top: 23rpx;
  159. }
  160. }
  161. }
  162. &-right{
  163. width: 36rpx;
  164. height: 36rpx;
  165. image{
  166. width: 100%;
  167. height: 100%;
  168. }
  169. }
  170. }
  171. }
  172. .empty{
  173. margin-top: 300rpx;
  174. text-align: center;
  175. font-size: 32rpx;
  176. color: #666666;
  177. }
  178. }
  179. </style>