dizhilist.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="contentV">
  3. <customNav :shownav="true" :title="$t('index.shouhuodz')" titledetl=""></customNav>
  4. <view class="contentColumn" style="margin-bottom: 120rpx;">
  5. <view class="" v-for="item in addrList">
  6. <view class="itemView">
  7. <uni-icons custom-prefix="custom-icon" color="slateblue" type="compose" size="28" @click="editdizhi(item.id)"></uni-icons>
  8. <view class="textView" @click="addrSelect(item)">
  9. <text class="addrV">{{item.address}}</text>
  10. <text class="addrcity">{{item.area}}</text>
  11. <text class="nameph">{{item.name}}: {{item.phone}}</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view style="height: 10rpx;"></view>
  17. <view class="addbtV">
  18. <view class="addbt" @click="newdizhi">{{$t('index.xinzengshdz')}}</view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import api from "@/pages/api/api.js"
  24. export default {
  25. data() {
  26. return {
  27. addrList:[],
  28. }
  29. },
  30. onShow() {
  31. this.getaddressList();
  32. },
  33. methods: {
  34. newdizhi(){
  35. uni.navigateTo({
  36. url:'/pages/UserCenter/dizhi/newdizhi?id=-1'
  37. })
  38. },
  39. addrSelect(obj){
  40. uni.setStorageSync("peisongdizhi",obj);
  41. uni.navigateBack();
  42. },
  43. editdizhi(id){
  44. uni.navigateTo({
  45. url:'/pages/UserCenter/dizhi/newdizhi?id='+id
  46. })
  47. },
  48. getaddressList(){
  49. api('getaddressList',{
  50. },r=>{
  51. this.addrList=r.data.data;
  52. },failc=>{
  53. //console.log('getadvertis----',failc)
  54. })
  55. },
  56. }
  57. }
  58. </script>
  59. <style>
  60. .contentV{
  61. width: 100%;
  62. position: relative;
  63. height: 90vh;
  64. }
  65. .slot-image {
  66. margin-right: 20rpx;
  67. margin-left: 20rpx;
  68. width: 30px;
  69. }
  70. .itemView{
  71. margin: 30rpx;
  72. padding-top: 20rpx;
  73. padding-bottom: 20rpx;
  74. display: flex;
  75. flex-direction: row;
  76. align-items: center;
  77. justify-content:flex-start;
  78. border-bottom-width: 2rpx;
  79. border-bottom-style:outset;
  80. border-bottom-color:lightgray;
  81. }
  82. .textView{
  83. display: flex;
  84. flex-direction: column;
  85. width: 88%;
  86. margin-left: 20rpx;
  87. }
  88. .addrV{
  89. font-size: 30rpx;
  90. color: black;
  91. }
  92. .addrcity{
  93. font-size: 26rpx;
  94. color: darkgray;
  95. }
  96. .nameph{
  97. font-size: 28rpx;
  98. color: darkslategray;
  99. }
  100. .addbtV{
  101. position: fixed;
  102. width: 100%;
  103. height: 120rpx;
  104. bottom: 0rpx;
  105. left: 0;
  106. background-color: whitesmoke;
  107. }
  108. .addbt{
  109. margin-left: 10%;
  110. margin-top: 20rpx;
  111. text-align: center;
  112. font-size: 36rpx;
  113. width: 80%;
  114. height: 80rpx;
  115. line-height: 80rpx;
  116. background-color: #00A6FF;
  117. color: white;
  118. box-shadow: 0rpx 0rpx 10rpx 0rpx #00A6FF;
  119. border-radius: 10rpx;
  120. }
  121. </style>