个人中心账户信息功能开发
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<view class="orders" v-if="orders.length > 0">
|
||||
<view class="orders-item" v-for="(item, index) in orders" :key="index">
|
||||
<view class="orders-flex">
|
||||
<view class="no nowrap">
|
||||
<view class="no nowrap" @click="copyNo(item.order_no)">
|
||||
<text class="orders-tag" v-if="!item.is_my">客户</text>
|
||||
<text class="orders-tag order-tag-my" v-else>个人</text>
|
||||
{{item.order_no}}
|
||||
@@ -30,13 +30,14 @@
|
||||
<view class="state">{{item.status.text}}</view>
|
||||
</view>
|
||||
<view class="orders-content">
|
||||
<view class="orders-content-item">
|
||||
<view class="orders-content-item orders-content-bottom" @click="item.is_show_type = !item.is_show_type">
|
||||
<label>业务类型</label>
|
||||
<view class="nowrap orders-content-type">
|
||||
<text v-for="(itemType, indexType) in item.item_type" :key="indexType" v-if="itemType.number > 0">{{itemType.title}}x{{itemType.number}}</text>
|
||||
</view>
|
||||
<uni-icons class="orders-content-icon" :type="item.is_show_type ? 'top': 'bottom'" size="14" color="gray"></uni-icons>
|
||||
</view>
|
||||
<view class="orders-content-block">
|
||||
<view class="orders-content-block" v-show="item.is_show_type">
|
||||
<view class="item-flex" v-for="(citem, cindex) in item.items" :key="cindex">
|
||||
<view class="item-flex-title">{{citem.institution.title}}({{citem.business_type.title}})</view>
|
||||
<view class="item-flex-value">¥{{citem.price}}</view>
|
||||
@@ -52,7 +53,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="orders-flex">
|
||||
<view class="user">
|
||||
<view class="user" @click="makePhone(item.user.username)">
|
||||
<image class="user-cover" :src="item.user.avatar" mode="aspectFill"></image>
|
||||
<view class="user-name">{{item.user.nickname}}</view>
|
||||
</view>
|
||||
@@ -168,6 +169,9 @@
|
||||
status: this.tabType
|
||||
}).then(res => {
|
||||
let { data } = res;
|
||||
data.map(val => {
|
||||
val.is_show_type = false
|
||||
})
|
||||
this.orders = data
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
@@ -270,6 +274,24 @@
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 复制订单号码
|
||||
copyNo(no){
|
||||
uni.setClipboardData({
|
||||
data : no,
|
||||
success : res => {
|
||||
uni.showToast({
|
||||
title: '订单号已复制',
|
||||
icon : 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 拨打电话
|
||||
makePhone(phone){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -302,6 +324,15 @@
|
||||
label{
|
||||
color: #999999;
|
||||
}
|
||||
&.orders-content-bottom{
|
||||
padding-right: 40rpx;
|
||||
position: relative;
|
||||
.orders-content-icon{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&-type{
|
||||
text{
|
||||
|
||||
Reference in New Issue
Block a user