| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <template>
- <Popup ref="popRef" mode="center" closeOnClickOverlay>
- <template #content>
- <view class="content">
- <view class="content_success">
- <image src="/static/shop/success.png" class="img"></image>
- <trans _t="warehouse_tips"></trans>
- </view>
- </view>
- </template>
- <template #footer>
- <slot name="footer">
- <view class="footer">
- <view class="submit_btn submit_shop" @click="toShop">
- <trans _t="返回首页" />
- </view>
- <view class="submit_btn" @click="seeOrder">
- <trans _t="查看包裹" />
- </view>
- </view>
- </slot>
- </template>
- </Popup>
- </template>
- <script setup>
- import { ref } from "vue";
- import Popup from "@/components/popup.vue";
- import { t } from "@/locale";
- import { useTabbarStore } from "@/store";
- const useTabbar = useTabbarStore();
- const popRef = ref(null);
- const emit = defineEmits(["complete", "close", "open"]);
- const orderid = ref(null);
- const open = (id) => {
- popRef.value && popRef.value.open();
- console.log(id);
- orderid.value = id;
- emit("open");
- };
- const close = () => {
- emit("close");
- popRef.value && popRef.value.close();
- };
- const toShop = () => {
- uni.switchTab({ url: "/pages/index/index" });
- useTabbar.getPageCur("index");
- };
- const seeOrder = () => {
- uni.navigateTo({
- url: `/pages/dashboard/parcel_detail?orderid=${orderid.value}&isOrder=true`,
- });
- };
- defineExpose({ open, close });
- </script>
- <style lang="less" scoped>
- @import url("@/style.less");
- :deep(.conts) {
- width: 70vw;
- }
- .content {
- flex: 1;
- .flex_center();
- &_success {
- .flex_center();
- flex-direction: column;
- gap: 20rpx;
- }
- .img {
- width: 90rpx;
- height: 90rpx;
- }
- }
- .footer {
- .hor(space-between);
- column-gap: 20rpx;
- .submit_btn {
- height: 76rpx;
- padding: 16rpx 30rpx;
- background-color: var(--black);
- color: var(--light);
- .flex_center();
- border-radius: 16rpx;
- .size(24rpx);
- &.submit_shop {
- background-color: var(--bg);
- border: 1rpx solid var(--black);
- color: var(--black);
- }
- }
- }
- </style>
|