1
This commit is contained in:
parent
011cd2663f
commit
28d9667b4e
File diff suppressed because one or more lines are too long
@ -8,7 +8,9 @@
|
||||
<view class='item' v-for="(item,index) in addressList" :key="index">
|
||||
<view class='address' @click='goOrder(item.address_id)'>
|
||||
<view class='consignee'>收货人:{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
|
||||
<view>收货地址:{{item.province || ''}}{{item.city || ''}}{{item.district || ''}}{{item.street || ''}}{{item.detail || ''}}</view>
|
||||
<view>
|
||||
收货地址:{{item.province || ''}}{{item.city || ''}}{{item.district || ''}}{{item.street || ''}}{{item.detail || ''}}
|
||||
</view>
|
||||
</view>
|
||||
<view class='operation acea-row row-between-wrapper'>
|
||||
<!-- #ifndef MP -->
|
||||
@ -22,7 +24,8 @@
|
||||
</radio>
|
||||
<!-- #endif -->
|
||||
<view class='acea-row row-middle'>
|
||||
<view @click='editAddress(item.address_id)'><text class='iconfont icon-bianji'></text>编辑</view>
|
||||
<view @click='editAddress(item.address_id)'><text class='iconfont icon-bianji'></text>编辑
|
||||
</view>
|
||||
<view @click='delAddress(index)'><text class='iconfont icon-shanchu'></text>删除</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -38,7 +41,8 @@
|
||||
<view>暂无地址</view>
|
||||
</view>
|
||||
<view class='footer acea-row row-between-wrapper'>
|
||||
<view class='addressBnt b-color on' @click='addAddress'><text class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
<view class='addressBnt b-color on' @click='addAddress'><text
|
||||
class='iconfont icon-tianjiadizhi'></text>添加新地址</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -57,7 +61,9 @@
|
||||
// #ifdef H5
|
||||
const jweixin = require('@/plugin/jweixin-module/index.js')
|
||||
// #endif
|
||||
import {getWechatConfig} from '@/api/public.js'
|
||||
import {
|
||||
getWechatConfig
|
||||
} from '@/api/public.js'
|
||||
import {
|
||||
getAddressList,
|
||||
setAddressDefault,
|
||||
@ -65,9 +71,15 @@
|
||||
editAddress,
|
||||
postAddress
|
||||
} from '@/api/user.js';
|
||||
import { mapGetters } from "vuex";
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
import { toLogin } from '@/libs/login.js';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
import {
|
||||
toLogin
|
||||
} from '@/libs/login.js';
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
@ -144,7 +156,8 @@
|
||||
});
|
||||
},
|
||||
fail: function(res) {
|
||||
if (res.errMsg == 'chooseAddress:cancel') return that.$util.Tips({
|
||||
if (res.errMsg == 'chooseAddress:cancel') return that.$util
|
||||
.Tips({
|
||||
title: '取消选择'
|
||||
});
|
||||
},
|
||||
@ -273,9 +286,11 @@
|
||||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' +couponId
|
||||
url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' +
|
||||
pinkId + '&couponId=' + couponId
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除地址
|
||||
*/
|
||||
@ -285,6 +300,11 @@
|
||||
if (address == undefined) return that.$util.Tips({
|
||||
title: '您删除的地址不存在!'
|
||||
});
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您确定要删除当前地址吗?",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
delAddress(address.address_id).then(res => {
|
||||
that.$util.Tips({
|
||||
title: '删除成功',
|
||||
@ -298,6 +318,14 @@
|
||||
title: err
|
||||
});
|
||||
});
|
||||
} else {
|
||||
that.$util.Tips({
|
||||
title: '您已取消!',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 新增地址
|
||||
@ -326,7 +354,8 @@
|
||||
this.pinkId = '';
|
||||
this.couponId = '';
|
||||
uni.redirectTo({
|
||||
url: '/pages/users/order_confirm/index?is_address=1&cartId=' + cartId + '&addressId=' + id + '&pinkId=' +
|
||||
url: '/pages/users/order_confirm/index?is_address=1&cartId=' + cartId + '&addressId=' +
|
||||
id + '&pinkId=' +
|
||||
pinkId + '&couponId=' + couponId
|
||||
})
|
||||
}
|
||||
@ -344,59 +373,72 @@
|
||||
border: 1px solid var(--view-theme) !important;
|
||||
background-color: var(--view-theme) !important;
|
||||
}
|
||||
|
||||
.address-management.fff {
|
||||
background-color: #fff;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.address-management .line {
|
||||
width: 100%;
|
||||
height: 3rpx;
|
||||
}
|
||||
|
||||
.address-management .line image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.address-management .item {
|
||||
background-color: #fff;
|
||||
padding: 0 30rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.address-management .item .address {
|
||||
padding: 30rpx 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.address-management .item .address .consignee {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.address-management .item .address .consignee .phone {
|
||||
margin-left: 25rpx;
|
||||
}
|
||||
|
||||
.address-management .item .operation {
|
||||
height: 83rpx;
|
||||
font-size: 28rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.b-color {
|
||||
background-color: var(--view-theme);
|
||||
}
|
||||
|
||||
.address-management .item .operation .radio text {
|
||||
margin-left: 13rpx;
|
||||
}
|
||||
|
||||
.address-management .item .operation .iconfont {
|
||||
color: #2c2c2c;
|
||||
font-size: 35rpx;
|
||||
vertical-align: -2rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.address-management .item .operation .iconfont.icon-shanchu {
|
||||
margin-left: 40rpx;
|
||||
font-size: 38rpx;
|
||||
}
|
||||
|
||||
.address-management .footer {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
@ -408,6 +450,7 @@
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt {
|
||||
width: 330rpx;
|
||||
height: 76rpx;
|
||||
@ -417,26 +460,32 @@
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt.on {
|
||||
width: 690rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt .iconfont {
|
||||
font-size: 35rpx;
|
||||
margin-right: 8rpx;
|
||||
vertical-align: -1rpx;
|
||||
}
|
||||
|
||||
.address-management .footer .addressBnt.wxbnt {
|
||||
background-color: #fe960f;
|
||||
}
|
||||
|
||||
.noCommodity {
|
||||
text-align: center;
|
||||
border-top: none;
|
||||
margin-top: 15vh;
|
||||
}
|
||||
|
||||
.noCommodity .pictrue {
|
||||
height: 305rpx;
|
||||
}
|
||||
|
||||
.noCommodity view {
|
||||
color: #999;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user