addrlist.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="pages">
  3. <u-navbar
  4. title="收货地址"
  5. @leftClick="leftClick"
  6. :autoBack="true"
  7. :safeAreaInsetTop="true"
  8. >
  9. </u-navbar>
  10. <view class="page-wrap">
  11. <view class="full-btn" @click="newAddr">新增收货地址</view>
  12. <view class="addr u-flex" @click="editAddr(item)" v-for="item in 20" :key="item">
  13. <view class="icon-wrap" v-if="item==1">
  14. <u-icon size="36rpx" :name="staticUrl+'/img/arrows.png'"></u-icon>
  15. </view>
  16. <view class="info u-flex-1">
  17. <view class="up">
  18. <text>张晓霞</text>
  19. <text>182 ****2542</text>
  20. <text class="default" v-if="item==1">默认</text>
  21. </view>
  22. <view class="down">广东省广州市越秀区腾讯大厦32楼3002号</view>
  23. </view>
  24. <u-icon name="edit-pen" color="#333" size="20"></u-icon>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. staticUrl:this.$commonConfig.staticUrl,
  34. }
  35. },
  36. onShow() {
  37. },
  38. onLoad() {
  39. },
  40. methods: {
  41. leftClick(e){
  42. console.log('leftClick',e);
  43. },
  44. newAddr(){
  45. uni.$u.route('/center/addrForm', {type: 'add'});
  46. },
  47. editAddr(item){
  48. uni.$u.route('/center/addrForm', {type: 'edit',id:item.id});
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. page{
  55. background-color: #F5F5F5;
  56. }
  57. </style>
  58. <style lang="scss" scoped>
  59. .addr{
  60. background-color: #fff;
  61. padding: 30rpx;
  62. margin-bottom: 20rpx;
  63. .info{
  64. margin-left: 30rpx;
  65. }
  66. .up{
  67. margin-bottom: 10rpx;
  68. font-size: 32rpx;
  69. font-weight: 600;
  70. text{margin-right: 20rpx;}
  71. .default{
  72. padding: 5rpx 16rpx;
  73. border-radius: 4rpx;
  74. color: #FF3C3F;
  75. background-color: #FFECEC;
  76. font-size: 22rpx
  77. }
  78. }
  79. .down{
  80. font-size: 26rpx;
  81. color: #999;
  82. }
  83. }
  84. </style>