<template>
|
<view class="container">
|
<view v-if="orders.length>0" class="orders-list d-flex flex-column w-100" style="padding: 20rpx; padding-bottom: 0;">
|
<view class="order-item" v-for="(item, index) in orders" :key="index" style="margin-bottom: 30rpx;">
|
<list-cell :hover="false">
|
<view class="w-100 d-flex align-items-center">
|
<view @tap="copy(item.id)" class="flex-fill d-flex flex-column" style="width: 60%;">
|
<view class="font-size-lg text-color-base" style="margin-bottom: 20rpx;">
|
{{ item.mobile }}
|
</view>
|
<view style="display: flex;">
|
<view class="font-size-sm text-color-assist taskid-show">任务编号:{{ item.id }}</view>
|
<view style="color: #919293;">复制</view>
|
</view>
|
|
</view>
|
<view class="font-size-lg text-color-primary" style="font-size: 14px;">
|
{{ getSmsStatus(item.sendstatus) }}
|
</view>
|
</view>
|
</list-cell>
|
<list-cell :hover="false" last>
|
<view class="w-100 d-flex flex-column">
|
<view class="w-100 text-truncate font-size-lg text-color-base" style="margin-bottom: 20rpx;">
|
{{ item.smscontent}}
|
</view>
|
<view class="d-flex justify-content-between align-items-center" style="margin-bottom: 30rpx;">
|
<view class="font-size-sm text-color-assist">
|
{{item.sendtime}}
|
</view>
|
<view class="d-flex font-size-sm text-color-base align-items-center">
|
<view style="margin-right: 10rpx;">共{{ item.succedcount }}条短信</view>
|
<!-- <view class="font-size-lg">¥{{ item.amount }}</view> -->
|
</view>
|
</view>
|
<view class="d-flex align-items-center justify-content-end">
|
<!-- <view style="margin-right: 10rpx;">
|
<button type="primary" plain size="mini">查看回复</button>
|
</view> -->
|
|
</view>
|
</view>
|
</list-cell>
|
</view>
|
</view>
|
<view v-else>
|
<gray-empty img="empty" text="无数据" />
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import listCell from '@/components/list-cell/list-cell'
|
import comUtils from '@/utils/ComUtils.js'
|
export default {
|
components: {
|
listCell
|
},
|
data() {
|
return {
|
orders: []
|
}
|
},
|
computed: {
|
|
},
|
onLoad() {
|
this.getSendHistory();
|
},
|
async onReachBottom() {
|
|
},
|
async onPullDownRefresh() {
|
|
},
|
methods: {
|
copy(taskid) {
|
uni.setClipboardData({
|
data: taskid,
|
success: function() {
|
uni.showToast({
|
title: '复制成功',
|
icon: 'none'
|
});
|
}
|
});
|
|
},
|
getSendHistory() {
|
let memberInfo = uni.getStorageSync('smsmemberinfo');
|
if (memberInfo == null) {
|
return;
|
}
|
uni.showLoading({
|
title: '加载中'
|
})
|
this.$http.post('/smsapi/SmsBusiness/GetSmsSend', {
|
Memberid: memberInfo.id
|
}).then(e => {
|
this.orders = e.result;
|
uni.hideLoading()
|
}).catch(function(err) {
|
uni.hideLoading()
|
console.log(err);
|
})
|
},
|
getSmsStatus(status) {
|
return comUtils.getSmsStatus(status);
|
},
|
detail(id) {
|
uni.navigateTo({
|
url: '/pages/orders/detail?id=' + id
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.taskid-show {
|
text-overflow: ellipsis;
|
overflow: hidden;
|
white-space: nowrap;
|
width: 80%;
|
}
|
</style>
|