7.16
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="items">
|
||||
<view class="item-top">
|
||||
<view class="item-top" @click="choiceAddress">
|
||||
<view class="user-info">
|
||||
<view class="user-name">{{ item.address_realname }}</view>
|
||||
<view class="user-pnone">{{ item.address_mob_phone | phoneFormat }}</view>
|
||||
@@ -35,17 +35,15 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
/**
|
||||
* address
|
||||
* @description 地址
|
||||
* @property {Object} item 地址信息
|
||||
* @property {String} state 是否选择地址 choise
|
||||
*/
|
||||
export default {
|
||||
name: 'address-item',
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
props: ['item', 'current'],
|
||||
mounted() {
|
||||
// console.log(this.item);
|
||||
},
|
||||
props: ['item', 'current', 'state'],
|
||||
filters: {
|
||||
phoneFormat(value) {
|
||||
return value.replace(/^(\d{3})\d*(\d{4})$/, '$1****$2');
|
||||
@@ -74,6 +72,15 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
choiceAddress() {
|
||||
if(this.state) {
|
||||
this.$store.commit('updateAddress', this.item);
|
||||
this.$u.route({
|
||||
type: 'navigateBack',
|
||||
url: '/pageC/cart/ConfirmOrder',
|
||||
})
|
||||
}
|
||||
},
|
||||
showToast(message, type) {
|
||||
this.$refs.uToast.show({
|
||||
title: message,
|
||||
|
||||
Reference in New Issue
Block a user