xuxueyang
2024-07-26 2d5090c2b215a5ea7e489d4b50fbf30aae569324
components/common-address-select/common-address-select.vue
@@ -7,7 +7,9 @@
         </view>
         <view class="name">{{address.name || '-'}}<span class="tel">{{address.tel || '-'}}</span>
         </view>
         <view class="address">{{address.schoolAreaStr || ''}} {{address.blockStr || ''}} {{address.room || ''}} {{address.address || ''}}</view>
      <view class="address">{{ address.schoolAreaStr || '' }} {{ address.blockStr || '' }} {{ address.room || '' }}
        {{ address.address || '' }}
      </view>
      </view>
      <view class="right-icon" style="padding-top: 16rpx;">
         <uni-icons type="right" size="18" color="#B3B3B3"></uni-icons>
@@ -21,6 +23,7 @@
   import {
      mapState
   } from 'vuex'
   export default {
      computed: {
         ...mapState({
@@ -34,16 +37,15 @@
      },
      name:"common-address-select",
      data() {
         return {
         };
    return {};
      },
      async onShow(){
  async mounted() {
    await this.init()
      },
      methods:{
         async init(){
            //获取默认地址并且填充
            if(!this.address.id){
      if (!this.address.id && this.currentInfo.id) {
               this.$message.showLoading()
               const {data} = await this.$http.request('get','/api/address/default/detail')
               this.$message.hideLoading()
@@ -85,12 +87,14 @@
         font-size: 32rpx;
         color: #000000;
         margin-left: 6rpx;
         .tel{
            margin-left: 6rpx;
            font-size: 28rpx;
            color: #666666;
         }
      }
      .address{
         font-size: 24rpx;
         color: #666666;
@@ -102,6 +106,7 @@
      }
      
   }
   .right-icon{
      margin-left: auto;
      margin-right: 0rpx;