|
|
@@ -4,29 +4,110 @@
|
|
|
* @Author: dream
|
|
|
* @Date: 2021-03-26 14:15:06
|
|
|
* @LastEditors: dream
|
|
|
- * @LastEditTime: 2021-03-26 14:15:55
|
|
|
+ * @LastEditTime: 2021-03-31 15:42:04
|
|
|
-->
|
|
|
<template>
|
|
|
- <view>Address List</view>
|
|
|
+ <view class="address-list-main" :style="{paddingBottom: `${pagePaddingBottom}px`}">
|
|
|
+ <block v-for="(item, index) in addressList" :key="index">
|
|
|
+ <view class="address-card iph-bg-fff u-m-b-16">
|
|
|
+ <view class="u-flex">
|
|
|
+ <view class="default-tip" v-if="item.isDefault">默认</view>
|
|
|
+ <view class="u-flex-1 u-font-30 u-line-42 text-weight-500">{{item.name}}</view>
|
|
|
+ <view class="u-font-28 u-line-40 text-weight-500">{{item.phone}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="address u-border-bottom u-m-t-16 u-p-b-32 u-line-1">{{item.address}}</view>
|
|
|
+ <view class="u-flex u-row-between u-m-t-18">
|
|
|
+ <u-checkbox v-model="item.isDefault" shape="circle" icon-size="28" :label-disabled="false">
|
|
|
+ <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>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ <iph-fixed-bottom @getHeight="getFooterHeight">
|
|
|
+ <navigator class="footer iph-bg-fff" url="./add">
|
|
|
+ <button class="add-address-btn">添加收货地址</button>
|
|
|
+ </navigator >
|
|
|
+ </iph-fixed-bottom>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import iphFixedBottom from '@/components/iphFixedBottom.vue'
|
|
|
export default {
|
|
|
+ components: { iphFixedBottom },
|
|
|
name: 'addressList',
|
|
|
data () {
|
|
|
return {
|
|
|
-
|
|
|
+ pagePaddingBottom: 0,
|
|
|
+ addressList: [{
|
|
|
+ isDefault: true,
|
|
|
+ name: '周科钧',
|
|
|
+ phone: '137*****033',
|
|
|
+ address: '浙江省杭州市滨江区滨康路619号德邦电子3幢509慕玛披萨电子3幢509慕玛披萨'
|
|
|
+ }, {
|
|
|
+ isDefault: false,
|
|
|
+ name: '周科钧',
|
|
|
+ phone: '137*****033',
|
|
|
+ address: '浙江省杭州市滨江区滨康路619号德邦电子3幢509慕玛披萨电子3幢509慕玛披萨'
|
|
|
+ }]
|
|
|
}
|
|
|
},
|
|
|
- onLoad () {
|
|
|
-
|
|
|
- },
|
|
|
methods: {
|
|
|
-
|
|
|
+ getFooterHeight (val) {
|
|
|
+ this.pagePaddingBottom = val
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
+.address-list-main {
|
|
|
+ .address-card {
|
|
|
+ padding: 32px;
|
|
|
+ .default-tip {
|
|
|
+ margin-right: 16px;
|
|
|
+ padding: 0 8px;
|
|
|
+ border-radius: 4px;
|
|
|
+ line-height: 26px;
|
|
|
+ font-size: 18px;
|
|
|
+ color: $iph-standby-text;
|
|
|
+ background-color: $u-type-primary;
|
|
|
+ }
|
|
|
+ .address {
|
|
|
+ color: $iph-desc-text;
|
|
|
+ }
|
|
|
+ .oper-icon {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ }
|
|
|
+ /deep/ .u-checkbox {
|
|
|
+ width: 100%;
|
|
|
+ .u-checkbox__label {
|
|
|
+ padding: 0;
|
|
|
+ width: 100%;
|
|
|
+ color: $iph-base-text;
|
|
|
+ }
|
|
|
+ .u-checkbox__icon-wrap--circle {
|
|
|
+ width: 28px !important;
|
|
|
+ height: 28px !important;
|
|
|
+ line-height: 44px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .footer {
|
|
|
+ padding: 24px;
|
|
|
+ .add-address-btn {
|
|
|
+ padding: 22px 0;
|
|
|
+ font-size: 32px;
|
|
|
+ line-height: 44px;
|
|
|
+ color: $iph-standby-text;
|
|
|
+ background-color: $u-type-primary;
|
|
|
+ border-radius: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|