dizhilist.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. <view class="textView" @click="addrSelect(item)">
  8. <text class="nameph">{{item.name}} {{item.phone}}</text>
  9. <text class="addrV">{{item.address}}</text>
  10. <text class="addrcity">{{item.area}}</text>
  11. </view>
  12. <uni-icons custom-prefix="custom-icon" color="slateblue" type="compose" size="28" @click="editdizhi(item.id)"></uni-icons>
  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. console.log(r);
  52. this.addrList=r.data.data;
  53. },failc=>{
  54. //console.log('getadvertis----',failc)
  55. })
  56. },
  57. }
  58. }
  59. </script>
  60. <style>
  61. .contentV{
  62. width: 100%;
  63. position: relative;
  64. height: 90vh;
  65. }
  66. .slot-image {
  67. margin-right: 20rpx;
  68. margin-left: 20rpx;
  69. width: 30px;
  70. }
  71. .itemView{
  72. margin: 30rpx;
  73. padding-top: 20rpx;
  74. padding-bottom: 20rpx;
  75. display: flex;
  76. flex-direction: row;
  77. align-items: center;
  78. justify-content:flex-start;
  79. border-bottom-width: 2rpx;
  80. border-bottom-style:outset;
  81. border-bottom-color:lightgray;
  82. }
  83. .textView{
  84. display: flex;
  85. flex-direction: column;
  86. width: 88%;
  87. margin-left: 20rpx;
  88. }
  89. .addrV{
  90. font-size: 30rpx;
  91. color: black;
  92. }
  93. .addrcity{
  94. font-size: 26rpx;
  95. color: darkgray;
  96. }
  97. .nameph{
  98. font-size: 30rpx;
  99. color: darkslategray;
  100. font-weight: bold;
  101. }
  102. .addbtV{
  103. position: fixed;
  104. width: 100%;
  105. height: 120rpx;
  106. bottom: 0rpx;
  107. left: 0;
  108. background-color: whitesmoke;
  109. }
  110. .addbt{
  111. margin-left: 10%;
  112. margin-top: 20rpx;
  113. text-align: center;
  114. font-size: 36rpx;
  115. width: 80%;
  116. height: 80rpx;
  117. line-height: 80rpx;
  118. background-color: #40AE36;
  119. color: white;
  120. box-shadow: 0rpx 0rpx 10rpx 0rpx #40AE36;
  121. border-radius: 10rpx;
  122. }
  123. </style>