init
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="w_32 h_32 m-l-14" @click.stop="logistics">
|
||||
<image class="w100 h100" src="/static/truck-line.svg" mode="scaleToFill" />
|
||||
</view>
|
||||
<su-popup :show="show" round="10" @close="close">
|
||||
<view class="steps">
|
||||
<view class="colse flex-center ju-flex-end"
|
||||
><uni-icons class="m-r-50" type="closeempty" color="#333333" size="20" @click="close" />
|
||||
</view>
|
||||
<uni-steps :options="list" active-color="#007AFF" :active="0" direction="column" />
|
||||
</view>
|
||||
</su-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import { getExpressTrackList } from '@/sheep/api/index/index';
|
||||
let props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
code: {
|
||||
type: Number,
|
||||
default: 1, //1:商城订单 2:AI店铺订单 3:AI店铺赠送订单
|
||||
}
|
||||
});
|
||||
let show = ref(false);
|
||||
let list = ref([]);
|
||||
const logistics = () => {
|
||||
// 获取物流信息并显示弹窗
|
||||
getData();
|
||||
show.value = true;
|
||||
};
|
||||
const close = () => {
|
||||
show.value = false;
|
||||
};
|
||||
const getData = async () => {
|
||||
console.log(props.data);
|
||||
let { data, code } = await getExpressTrackList({
|
||||
id: props.data.id,
|
||||
code: props.code,
|
||||
});
|
||||
if (code !== 0) return;
|
||||
list.value = [];
|
||||
data.forEach((item) => {
|
||||
let obj = {
|
||||
title: item.content,
|
||||
desc: item.time,
|
||||
};
|
||||
list.value.push(obj);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.steps {
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
min-height: 500rpx;
|
||||
padding: 30rpx;
|
||||
padding-left: 15rpx;
|
||||
padding-top: 60rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
.colse {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user