| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <view class="address-index flex-common-css box-border-box iPhone-bottom">
- <Nav title="地址管理"></Nav>
-
-
- <view v-if="list.length === 0" class="scroll-view-css">
- <EnBlank :customSrc='true'>
- <template v-slot:blankImg>
- <image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
- </template>
- </EnBlank>
- </view>
- <view v-else class="scroll-view-css box-border-box p-24">
- <view class="list-box box-border-box p-24" v-for="(item,i) in list" :key="i" @click.stop="to(1,item)">
- <view class=" mb-8 display-flex">
- <view class="fs-34 fw-500 mr-10 w-556">
- <span v-if="item.is_default == 1" class="list-box-only fs-24 fc-FF7F00 text-align-center">默认</span>
- {{item.school_name}}{{item.dorm_name}}{{item.address}}
- </view>
- </view>
- <view class="w-520 fs-26 fc-9 align-items-center">
- <view class="fs-24 fc-9 mr-24">{{item.consignee}}</view>
- <view class="fs-24 fc-9">{{item.phone}}</view>
- </view>
-
- <image src="@/static/img/common/edit.png" mode=""></image>
-
- </view>
- </view>
-
- <view class="box-border-box p-24 bgc-f" @click="to(2)">
- <view class="add-box text-align-center fs-34 fc-f">新增地址</view>
- </view>
- </view>
- </template>
- <script>
- import {getAddressList} from '@/api/member.js'
- import EnBlank from "@/components/en-utils/en-blank/en-blank";
- import tools from "@/service/tools.js";
- export default {
- components:{EnBlank,},
- data(){
- return{
- list:[],
- }
- },
- onShow() {
- this.list = [];
- this.getList();
- },
- methods:{
- getList(){
- getAddressList().then((res)=>{
- if(res.code === 1){
- this.list = res.data;
- }
- })
- },
-
- to(type,item){
- if(type === 1){
- uni.navigateTo({
- url:"pages-address/edit-add?id=" + item.id
- })
- }else{
- uni.navigateTo({
- url:"pages-address/edit-add"
- })
- }
- },
- },
- }
- </script>
- <style scoped lang="scss">
- .address-index{
- .w-556{
- width: 556rpx;
- }
- .w-520{
- width: 570rpx;
- }
- .add-box{
- width: 100%;
- height: 80rpx;
- line-height: 80rpx;
- background-color: #2F80ED;
- border-radius: 200rpx;
-
- }
- .list-box{
- background: #FFFFFF;
- border-radius: 20rpx;
- margin-bottom: 24rpx;
- position: relative;
-
- image{
- width: 48rpx;
- height: 48rpx;
- position: absolute;
- top: 42rpx;
- right: 40rpx;
- }
- .del-icon{
- position: absolute;
- top: 45rpx;
- right: 0;
- }
- .list-box-only{
- padding: 0 8rpx;
- height: 34rpx;
- line-height: 34rpx;
- border-radius: 8rpx;
- border: 2rpx solid #FE9E11;
- margin-right: 8rpx;
- }
- }
-
- }
- </style>
|