receivingAddress.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <view class="address-list-page">
  3. <view class="custom-navbar">
  4. <view class="navbar-left" @click="goBack">
  5. <text class="fa fa-angle-left"></text>
  6. </view>
  7. <view class="navbar-center"> 收货地址 </view>
  8. <view class="navbar-right">
  9. <view class="add-btn blick-btn-animation" @click="goAdd">新增</view>
  10. </view>
  11. </view>
  12. <view class="address-card" v-for="item in addressList" :key="item.id">
  13. <view class="left">
  14. <view class="row">
  15. <text class="name">{{ item.name }}</text>
  16. <text class="mobile">{{ item.mobile }}</text>
  17. <text class="default" v-if="item.isDefault">默认</text>
  18. <!-- <image class="edit" src="@/static/icon/edit.png" @click="goEdit(item)" /> -->
  19. </view>
  20. <view class="address two-omit">{{ item.fullAddress }}</view>
  21. </view>
  22. <view class="right">
  23. <image src="@/static/icon/sy_icon_fabiao.png" @click="goEdit(item)" />
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. addressList: [
  33. {
  34. id: 1,
  35. name: "戴驿宸",
  36. mobile: "17788196551",
  37. isDefault: true,
  38. fullAddress: "浙江省 杭州市 滨江区 西兴街道 启悦府",
  39. },
  40. {
  41. id: 2,
  42. name: "戴驿宸",
  43. mobile: "17788196551",
  44. isDefault: false,
  45. fullAddress: "浙江省 杭州市 滨江区 西兴街道 启悦府",
  46. },
  47. {
  48. id: 3,
  49. name: "戴驿宸",
  50. mobile: "17788196551",
  51. isDefault: false,
  52. fullAddress: "浙江省 杭州市 滨江区 西兴街道 启悦府",
  53. },
  54. ],
  55. };
  56. },
  57. methods: {
  58. goBack() {
  59. uni.navigateBack();
  60. },
  61. goAdd() {
  62. uni.navigateTo({ url: "/pages/crowdFunding/addressEdit" });
  63. },
  64. goEdit(item) {
  65. uni.navigateTo({ url: "/pages/crowdFunding/addressEdit?id=" + item.id });
  66. },
  67. },
  68. };
  69. </script>
  70. <style lang="scss">
  71. .address-list-page {
  72. min-height: 100vh;
  73. background: #f6faf6;
  74. /* 自定义导航栏样式 */
  75. .custom-navbar {
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. width: 100%;
  80. height: calc(90rpx + var(--status-bar-height));
  81. padding: 0 20rpx;
  82. padding-top: var(--status-bar-height);
  83. background-color: #ffffff;
  84. position: sticky;
  85. top: 0;
  86. z-index: 100;
  87. .navbar-left {
  88. width: 80rpx;
  89. height: 80rpx;
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. .fa-angle-left {
  94. font-size: 48rpx;
  95. color: #333;
  96. }
  97. }
  98. .navbar-center {
  99. flex: 1;
  100. display: flex;
  101. justify-content: center;
  102. align-items: center;
  103. font-size: 28rpx;
  104. font-weight: bold;
  105. color: #1f1f1f;
  106. }
  107. .navbar-right {
  108. .add-btn {
  109. background: #1f1f1f;
  110. color: #acf934;
  111. border-radius: 32rpx;
  112. padding: 6rpx 32rpx;
  113. display: flex;
  114. align-items: center;
  115. font-size: 28rpx;
  116. }
  117. }
  118. }
  119. .address-card {
  120. background: #fff;
  121. border-radius: 18rpx;
  122. margin: 32rpx;
  123. padding: 32rpx;
  124. padding-right: 0;
  125. display: flex;
  126. align-items: center;
  127. justify-content: space-between;
  128. .left{
  129. height: 100%;
  130. .row {
  131. display: flex;
  132. align-items: center;
  133. margin-bottom: 12rpx;
  134. .name {
  135. font-size: 32rpx;
  136. font-weight: bold;
  137. margin-right: 18rpx;
  138. }
  139. .mobile {
  140. font-size: 32rpx;
  141. margin-right: 18rpx;
  142. }
  143. .default {
  144. font-size: 22rpx;
  145. color: #fff;
  146. background: #1f1f1f;
  147. border-radius: 8rpx;
  148. padding: 2rpx 12rpx;
  149. margin-right: 12rpx;
  150. }
  151. .edit {
  152. width: 32rpx;
  153. height: 32rpx;
  154. margin-left: auto;
  155. }
  156. }
  157. .address {
  158. font-size: 26rpx;
  159. color: #666;
  160. }
  161. }
  162. .right{
  163. width: 100rpx;
  164. height: 100%;
  165. flex-shrink: 0;
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. image{
  170. width: 32rpx;
  171. height: 32rpx;
  172. }
  173. }
  174. }
  175. }
  176. </style>