cm-address-temp.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template name="address">
  2. <view class="address-template">
  3. <!-- 地址信息 -->
  4. <view class="address-section">
  5. <view class="address-content">
  6. <view class="address-icon">
  7. <text class="iconfont icon-shouhuodizhi1"></text>
  8. </view>
  9. <view class="address-cen">
  10. <view class="top">
  11. <view class="name">{{addressData.receiver ? addressData.receiver : ''}}</view>
  12. <view class="mobile">{{addressData.mobile ? addressData.mobile : ''}}</view>
  13. </view>
  14. <view class="address">
  15. <view class="address-text">
  16. {{addressData.province ? addressData.province : ''}}
  17. {{addressData.city ? addressData.city : ''}}
  18. {{addressData.town ? addressData.town : ''}}
  19. {{addressData.address ? addressData.address : ''}}
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <image src="../../../static/temp/line@3x.png" mode=""></image>
  26. </view>
  27. </template>
  28. <script>
  29. import { mapState, mapMutations } from 'vuex'
  30. export default{
  31. name:'address',
  32. props:{
  33. addressData:{
  34. type:Object
  35. }
  36. },
  37. data() {
  38. return{
  39. initData:''
  40. }
  41. },
  42. created(){
  43. this.initData = this.addressData
  44. },
  45. computed: {
  46. ...mapState(['isManage'])
  47. },
  48. methods:{
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .address-template{
  54. width: 100%;
  55. height: auto;
  56. background: #FFFFFF;
  57. &::after{
  58. content: "";
  59. display: block;
  60. clear: both;
  61. }
  62. // border-top: 1px solid #F8F8F8;
  63. image{
  64. float: left;
  65. width: 100%;
  66. height: 6rpx;
  67. }
  68. }
  69. .address-section {
  70. width: 100%;
  71. height: auto;
  72. float: left;
  73. position: relative;
  74. .address-empty{
  75. width: 100%;
  76. height: 84rpx;
  77. line-height: 84rpx;
  78. color: $color-system;
  79. text-align: center;
  80. font-size: $font-size-26;
  81. font-weight: bold;
  82. background: #fff;
  83. float: left;
  84. .icon-tianjiadizhi{
  85. font-size: 30rpx;
  86. margin: 0 8rpx;
  87. }
  88. }
  89. .address-content {
  90. display: flex;
  91. align-items: center;
  92. padding:20rpx 24rpx;
  93. background: #fff;
  94. }
  95. .icon-shouhuodizhi1 {
  96. flex-shrink: 0;
  97. display: flex;
  98. align-items: center;
  99. justify-content: center;
  100. width: 40rpx;
  101. color: $color-system;
  102. font-size: 46rpx;
  103. margin-right: 10rpx;
  104. }
  105. .address-cen {
  106. width: 100%;
  107. height: auto;
  108. position: relative;
  109. .top{
  110. line-height: 42rpx;
  111. text-align: left;
  112. font-size: $font-size-30;
  113. color: $text-color;
  114. padding-bottom: 8rpx;
  115. display: flex;
  116. float: left;
  117. .name{
  118. margin-right: 48rpx;
  119. }
  120. .mobile{
  121. margin-right: 40rpx;
  122. }
  123. }
  124. .address {
  125. width: 100%;
  126. height: auto;
  127. float: left;
  128. .address-icon{
  129. width: 40rpx;
  130. height: auto;
  131. float: left;
  132. line-height: 40rpx;
  133. }
  134. .address-text{
  135. width: 650rpx;
  136. padding-left: 10rpx;
  137. float: left;
  138. line-height: 40rpx;
  139. font-size: $font-size-28;
  140. color: #666666;
  141. text-align: left;
  142. -o-text-overflow: ellipsis;
  143. text-overflow: ellipsis;
  144. display: -webkit-box;
  145. word-break: break-all;
  146. -webkit-box-orient: vertical;
  147. -webkit-line-clamp: 2;
  148. overflow: hidden;
  149. }
  150. }
  151. }
  152. .icon-xiangyou {
  153. font-size: 32rpx;
  154. color: $text-color;
  155. margin-right: 30rpx;
  156. }
  157. .a-bg {
  158. position: absolute;
  159. left: 0;
  160. bottom: 0;
  161. display: block;
  162. width: 100%;
  163. height: 5rpx;
  164. }
  165. }
  166. </style>