Commit cdb945d7 authored by qipeng's avatar qipeng

Merge branch 'album' of http://192.168.0.204/panyongping/uni-pdtravel into album

parents 2a2fd209 6a43bfba
...@@ -175,14 +175,63 @@ ...@@ -175,14 +175,63 @@
{{item}} {{item}}
</text> </text>
</view> </view>
<view style="flex: 1;overflow-y: scroll;"> <view style="flex:1;overflow-y: scroll;">
<!-- 现场取件 --> <!-- 现场取件 -->
<view> <view v-if="active==0">
<view class="live-top">
<view class="live-top-list">
<text>
选择城市
</text>
<view>
重庆市渝中区
<u-icon name="arrow-right" color="#666666"></u-icon>
</view>
</view>
<view class="live-top-list">
<text>
经营主体
</text>
<view>
重庆索道北广场
<u-icon name="arrow-right" color="#666666"></u-icon>
</view>
</view>
<view class="live-top-list">
<text>
详细地址
</text>
<view>
重庆市渝中区
</view>
</view>
</view>
<view class="live-bottom">
<text>确认</text>
</view>
</view> </view>
<!-- 邮寄到家 --> <!-- 邮寄到家 -->
<view> <view v-else>
<view class="mail-top">
<view>
原地址
</view>
<view>
重庆市渝北区恒大御都会A组团2栋5-6
</view>
<view>
<text>潘永坪</text>
<text>15808046328</text>
</view>
</view>
<view class="mail-middle">
</view>
<view class="mail-bottom">
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -382,5 +431,46 @@ export default { ...@@ -382,5 +431,46 @@ export default {
text:last-child{ text:last-child{
margin-left: 80rpx; margin-left: 80rpx;
} }
text.on{
color: $red;
}
}
.live-top{
background: #ffffff;
}
.live-top-list{
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 40rpx;
border-bottom: 1px solid #eeeeee;
>view{
display: flex;
}
text{
color: #666666;
}
}
.live-bottom{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 128rpx;
display: flex;
align-items: center;
background: #ffffff;
z-index: 1;
text{
display: inline-block;
width: 100%;
text-align: center;
height: 88rpx;
line-height: 88rpx;
background: $red;
border-radius: 44rpx;
color: #ffffff;
font-size: 32rpx;
}
} }
</style> </style>
\ No newline at end of file
...@@ -7,23 +7,23 @@ ...@@ -7,23 +7,23 @@
</view> </view>
<view class="middle"> <view class="middle">
<view v-if="active==0" class="contact-list" v-for="(item,index) in 8" :key="index"> <view v-if="active==0" class="contact-list" v-for="(item,index) in contactList" :key="index">
<view class="contact-name"> <view class="contact-name">
<text>姓名:潘永坪</text> <text>姓名:{{item.name}}</text>
<text>15808046328</text> <text>{{item.phone?item.phone.substr(0,3)+"****"+item.phone.substr(7,4):""}}</text>
</view> </view>
<view class="contact-id"> <view class="contact-id">
证件号:500109198808199110 证件号:{{item.credentialNumber?item.credentialNumber.substr(0,3)+"****"+item.credentialNumber.substr(item.credentialNumber.length-4,4):"无"}}
</view> </view>
<view class="contact-edit"> <view class="contact-edit">
<view> <view>
<u-icon name='file-text' color='#666666' size='56'></u-icon> <u-icon name='file-text' color='#666666' size='48'></u-icon>
编辑 编辑
</view> </view>
<view> <view @click="clickDele(item)">
<u-icon name='trash' color='#666666' size='56'></u-icon> <u-icon name='trash' color='#666666' size='48'></u-icon>
删除 删除
</view> </view>
</view> </view>
...@@ -47,11 +47,11 @@ ...@@ -47,11 +47,11 @@
</label> </label>
</view> </view>
<view> <view>
<u-icon name='file-text' color='#666666' size='56'></u-icon> <u-icon name='file-text' color='#666666' size='48'></u-icon>
编辑 编辑
</view> </view>
<view> <view>
<u-icon name='trash' color='#666666' size='56'></u-icon> <u-icon name='trash' color='#666666' size='48'></u-icon>
删除 删除
</view> </view>
</view> </view>
...@@ -62,25 +62,84 @@ ...@@ -62,25 +62,84 @@
<text v-if="active==0">新增联系人</text> <text v-if="active==0">新增联系人</text>
<text v-else>新增地址</text> <text v-else>新增地址</text>
</view> </view>
<u-modal :show="showModal" @confirm="confirmDele" @cancel="showModal=false" showCancelButton title="确认删除该联系人" ></u-modal>
<editContacts ref="editContacts" :editContactData="editContactData" :credential='productIfo.credential'></editContacts>
</view> </view>
</template> </template>
<script> <script>
import editContacts from './components/editContacts' //编辑联系人弹窗
export default { export default {
data() { data() {
return { return {
active:0,//导航下标 active:0,//导航下标
tabList:['联系人','收货地址']//导航标题 tabList:['联系人','收货地址'],//导航标题
contactList:[],//联系人列表
showModal: false, //确认弹窗显示隐藏
contactName:'',//删除联系人的Id
contactopenid:'',//删除联系人的openid
} }
}, },
onLoad(option) { onLoad(option) {
this.getContactList()
}, },
methods: { methods: {
//---导航点击 //---导航点击
tabClick(index){ tabClick(index){
this.active=index this.active=index
},
//---初始化联系人列表
getContactList() {
let data = {
openid:uni.getStorageSync('openid')||''
}
this.$request('wechatUser/contact/findContactList', data).then(res => {
if (res.code == '00') {
this.contactList = res.data||[]
//由于数据结构变化,重新组装数据
this.contactList.forEach(item=>{
if(item.contactVos.length>0){
item.credentialNumber=item.contactVos[0].credentialNumber
item.credentialType=item.contactVos[0].credentialType
}
})
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
//---点击删除
clickDele(item) {
this.showModal = true
this.contactName=item.name
this.contactopenid=item.openid
},
//---确认删除
confirmDele(){
let data={
name:this.contactName,//联系人姓名
openid:this.contactopenid//联系人openid
}
this.$request('wechatUser/contact/deleteContact', data).then((res) => {
if (res.code == '00') {
uni.showToast({
title:'删除成功',
icon:'none'
})
this.showModal = false
this.getContactList()
} else {
uni.showToast({
title:res.message,
icon:'none'
})
}
}).catch(() => {
this.showModal = false
})
} }
} }
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment