|
|
@@ -4,7 +4,7 @@
|
|
|
* @Author: dream
|
|
|
* @Date: 2021-03-26 14:15:06
|
|
|
* @LastEditors: dream
|
|
|
- * @LastEditTime: 2021-03-31 15:42:04
|
|
|
+ * @LastEditTime: 2021-03-31 15:55:52
|
|
|
-->
|
|
|
<template>
|
|
|
<view class="address-list-main" :style="{paddingBottom: `${pagePaddingBottom}px`}">
|
|
|
@@ -21,12 +21,13 @@
|
|
|
<text class="u-m-l-24 u-font-22 u-line-32">设为默认地址</text>
|
|
|
</u-checkbox>
|
|
|
<view class="u-flex u-row-right">
|
|
|
- <view class="oper-icon iph-icon-del"></view>
|
|
|
- <view class="oper-icon u-m-l-62 iph-icon-update"></view>
|
|
|
+ <view class="oper-icon iph-icon-del" @click="delAddress(item)"></view>
|
|
|
+ <view class="oper-icon u-m-l-62 iph-icon-update" @click="toEditAddress(item)"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
+ <iph-empty :show="!addressList.length" :type="3" :marginTop="344" />
|
|
|
<iph-fixed-bottom @getHeight="getFooterHeight">
|
|
|
<navigator class="footer iph-bg-fff" url="./add">
|
|
|
<button class="add-address-btn">添加收货地址</button>
|
|
|
@@ -37,8 +38,9 @@
|
|
|
|
|
|
<script>
|
|
|
import iphFixedBottom from '@/components/iphFixedBottom.vue'
|
|
|
+import IphEmpty from '@/components/iphEmpty.vue'
|
|
|
export default {
|
|
|
- components: { iphFixedBottom },
|
|
|
+ components: { iphFixedBottom, IphEmpty },
|
|
|
name: 'addressList',
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -59,6 +61,27 @@ export default {
|
|
|
methods: {
|
|
|
getFooterHeight (val) {
|
|
|
this.pagePaddingBottom = val
|
|
|
+ },
|
|
|
+ delAddress (val) {
|
|
|
+ console.log(val)
|
|
|
+ uni.showModal({
|
|
|
+ title: '确定删除收货地址?',
|
|
|
+ cancelColor: '#007AFF',
|
|
|
+ confirmColor: '#007AFF',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ console.log('用户点击确定')
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ toEditAddress (item) {
|
|
|
+ console.log(item)
|
|
|
+ uni.navigateTo({
|
|
|
+ url: './add'
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|