123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <template>
- <view class="container">
- <view class="express-box">
- <view class="top-text">
- <img class='logo' :src="expressList.result.logo" alt="">
- <text class="top-com" v-if="expressList.result.deliverystatus=='0'">揽件中</text>
- <text class="top-com" v-if="expressList.result.deliverystatus=='1'">运输中</text>
- <text class="top-com" v-if="expressList.result.deliverystatus=='2'">派件中</text>
- <text class="top-com" v-if="expressList.result.deliverystatus=='3'">已签收</text>
- </view>
- <view class="top-text">
- <text>国内承运物流:</text>
- <text class="top-com">{{expressList.result.expName}}</text>
- </view>
- <view class="top-text">
- <text>运单号:</text>
- <text>{{expressList.result.number }}</text>
- <view class="fz" @click="copy(expressList.result.number)">
- 复制
- </view>
- </view>
- <view class="top-text">
- <text>联系电话:</text>
- <text>{{expressList.result.expPhone }}</text>
- <view class="bh" @click="bh(expressList.result.expPhone)">
- 拨打
- </view>
- </view>
- <view class="express-body">
- <uni-steps :options="expressList.result.list" active-color="#007AFF" :active="active" direction="column">
- </uni-steps>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- express
- } from '@/api/order.js';
- import uniSteps from '@/components/uni-steps/uni-steps.vue';
- export default {
- components: {
- uniSteps
- },
- data() {
- return {
- id: '',
- expressList: [],
- active: 0
- }
- },
- onLoad(option) {
- this.id = option.id
- },
- onShow() {
- this.loadData()
- },
- methods: {
- loadData() {
- express({
- id: this.id,
- }).then(({
- data
- }) => {
- this.expressList = data.express;
- console.log(this.expressList, '000000')
- })
- },
- copy(e) {
- uni.setClipboardData({
- data: e,
- success: () => { //复制成功的回调函数
- uni.showToast({ //提示
- title: "复制快递单号成功"
- })
- }
- })
- },
- bh(e) {
- uni.makePhoneCall({
- phoneNumber: e, //电话号码
- success: function(e) {
- console.log(e);
- },
- fail: function(e) {
- console.log(e);
- }
- })
- }
- },
- }
- </script>
- <style lang="scss">
- .container {
- .logo {
- border-radius: 10rpx;
- margin: 10rpx;
- width: 60rpx;
- }
- .fz {
- text-align: center;
- width: 110rpx;
- border-radius: 30rpx;
- padding: 8rpx;
- color: #FFFFFF;
- background-color: #f75022;
- }
- .bh {
- text-align: center;
- width: 110rpx;
- border-radius: 30rpx;
- padding: 8rpx;
- color: #FFFFFF;
- background-color: #1090ff;
- }
- .express-box {
- letter-spacing: 8rpx;
- padding: 30rpx;
- border-bottom-left-radius: 40rpx;
- border-bottom-right-radius: 40rpx;
- height: 320rpx;
- background-color: #FFFFFF;
- .top-text {
- width: 100%;
- height: 60rpx;
- background: #FFFFFF;
- padding-left: 20rpx;
- font-size: $font-base;
- border-radius: $border-radius-sm;
- display: flex;
- align-items: center;
- .top-com {
- margin-right: 10rpx;
- }
- }
- .express-body {
- margin-top: 80rpx;
- background: #FFFFFF;
- border-radius: $border-radius-sm;
- padding: 20rpx 10rpx 20rpx 0;
- }
- }
- }
- </style>
|