cm-address-temp.vue 3.4 KB

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