xuxueyang
2024-08-09 fb14fa911bde1ed360fe89a1c41d74b158db9ab5
components/common-address-select/common-address-select.vue
@@ -7,7 +7,10 @@
      </view>
      <view class="name">{{ address.name || '-' }}<span class="tel">{{ address.tel || '-' }}</span>
      </view>
      <view class="address">{{ address.schoolAreaStr || '' }} {{ address.blockStr || '' }} {{ address.room || '' }}
         <view class="address">
            {{ address['province'] || '' }}{{ address['city'] && ('/' + address['city']) || '' }}{{
       address['region'] && ('/' + address['region']) || ''
     }}
        {{ address.address || '' }}
      </view>
    </view>
@@ -47,11 +50,15 @@
      //获取默认地址并且填充
      if (!this.address.id && this.currentInfo.id) {
        this.$message.showLoading()
        const {data} = await this.$http.request('get', '/api/address/default/detail')
               const {
                  data
               } = await this.$http.request('get', '/api/address/default/detail')
        this.$message.hideLoading()
        if (data) {
          //提交更新默认地址
          this.$store.commit('setDefaultAddress', {...data})
                  this.$store.commit('setDefaultAddress', {
                     ...data
                  })
        }
      }
@@ -78,9 +85,9 @@
</script>
<style lang="scss">
.location-select {
  .info {
    // margin-bottom: 16rpx;
    .name {
      font-weight: 400;