<template>
  <view class="order">
    <view class="order-nav">
      <view
        v-for="(item, index) in navList"
        :key="index"
        class="order-nav-item"
        :class="{ current: tabCurrentIndex === index }"
        @click="tabClick(index)"
      >
        <!-- {{item.text}} -->
        {{ item.orderStatusText }}
      </view>
    </view>
    <swiper
      v-if="showList"
      :current="tabCurrentIndex"
      class="order-swiper"
      duration="300"
      @change="changeTab"
    >
      <swiper-item v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
        <view class="order-swiper-item">
          <scroll-view
            class="list-scroll-content"
            scroll-y
            :show-scrollbar="false"
            :scroll-top="tabScrollTop"
            lower-threshold="120"
            @scrolltolower="pageScroll"
          >
            <empty v-if="tabItem.skuList.length === 0" />

            <order-card
              v-for="(item, index) in tabItem.skuList"
              :key="index"
              :idx="index"
              :order-data="item"
              @option-click="handleGoodsClick"
            />

            <!-- <likeGood/> -->
            <view class="goodsCardList">
              <goods-card v-if="goodsCardState" :goods-list.sync="goodsList" header-type="center" />
            </view>
            <uni-load-more :status="loadingType || !goodsList.length" />
          </scroll-view>
        </view>
      </swiper-item>
    </swiper>

    <uni-popup
      ref="commonPopup"
      :type="currentPopupInfo.type"
      :closeable="currentPopupInfo.closeable"
      :title="currentPopupInfo.title"
      :desc="currentPopupInfo.desc"
    >
      <!-- 请去APP执行相关退款操作！ -->
      <uni-popup-dialog
        v-if="currentPopupState === 0"
        type="base"
        content="请去APP执行相关退款操作！"
        hide-cancel-btn
        message=""
        :duration="2000"
        :before-close="true"
      />
      <!-- 待发货 立即退款 -->
      <view v-if="currentPopupState === 3" class="radio-info">
        <view class="img-succ">
          <image
            class="refund-succ"
            src="https://img.lkbang.net/refund.16da4f31.png"
            mode="widthFix"
          />
        </view>
        <view class="yuan">
          <text>¥{{ currentItems.totalFee }}</text>
        </view>
        <view class="yuan_detail">
          <text>未发秒退，极速到账</text>
        </view>
        <view class="radio-info__button">
          <button @click="handleConfirmRefund">确定退款¥{{ currentItems.totalFee }}</button>
        </view>
      </view>
      <!-- 待发货 退款成功 -->
      <view v-if="currentPopupState === 4" class="radio-info">
        <view class="img">
          <image class="refund" :src="iconAndTips.imageUrl" mode="widthFix" />
        </view>
        <view class="refundSucc">
          <text>{{ iconAndTips.title }}</text>
        </view>
        <view class="refundSucc_detail">
          <text>{{ iconAndTips.tips }}</text>
        </view>
        <view class="radio-info__button">
          <button @click="handleConfirm">确定</button>
        </view>
      </view>
      <!-- 取消订单/申请退款 -->
      <view v-if="currentPopupState === 1" class="radio-info">
        <view class="img-succ">
          <image class="refund-succ" :src="iconAndTips.imageUrl" mode="widthFix" />
        </view>
        <view class="yuan">
          <text>¥{{ iconAndTips.amount }}</text>
        </view>
        <view class="yuan_detail">
          <text>{{ iconAndTips.title }}</text>
        </view>
        <view class="tips">
          <text> {{ iconAndTips.tips }} </text>
        </view>
        <view @touchmove.stop.prevent="disabledScroll">
          <scroll-view scroll-y="true" class="scroll-Y">
            <radio-group class="radio-info__list" @change="handleCandelResonSelect">
              <label
                v-for="(item, index) in reasonList"
                :key="item"
                class="radio-info__item"
                :class="{ active: cancelResonIndex === Number(index) }"
              >
                <text>{{ item.cancelReason }}</text>
                <radio
                  :value="index"
                  color="#EC1500"
                  :checked="cancelResonIndex === Number(index)"
                />
              </label>
            </radio-group>
          </scroll-view>
        </view>
        <view class="radio-info__button">
          <button @click="handleRadioSubmit">确定退款¥{{ iconAndTips.amount }}</button>
        </view>
      </view>
      <!-- 物流信息 -->
      <view
        v-if="
          currentPopupState === 2 &&
            currentItems.expressInfoList &&
            currentItems.expressInfoList.length > 1
        "
        class="radio-info logis-modal"
      >
        <radio-group class="radio-info__list" @change="handleExpressSelect">
          <label
            v-for="(item, index) in currentItems.expressInfoList"
            :key="item"
            class="radio-info__item"
            :class="{ active: expressIndex === Number(index) }"
          >
            <text>{{ item.expressCompanyName }}</text>
            <radio :value="index" color="#EC1500" :checked="expressIndex === Number(index)" />
          </label>
        </radio-group>
        <view class="radio-info__button">
          <button @click="handleRadioSubmit">提交</button>
        </view>
      </view>
      <view v-if="currentPopupState === 5" class="radio-info">
        <radio-group class="radio-info__list" @change="handleCandelResonSelect">
          <label
            v-for="(item, index) in reasonList"
            :key="item"
            class="radio-info__item"
            :class="{ active: cancelResonIndex === Number(index) }"
          >
            <text>{{ item.cancelReason }}</text>
            <radio :value="index" color="#EC1500" :checked="cancelResonIndex === Number(index)" />
          </label>
        </radio-group>
        <view class="radio-info__button">
          <button @click="handleRadioSubmit">提交</button>
        </view>
      </view>
    </uni-popup>
    <couponPop :info="refundInfo" :value="isNote" @child-event="showNote" @confirm="handleClick" />
  </view>
</template>

<script>
import couponPop from "./components/couponPop.vue";
import uniLoadMore from "@/components/uni-load-more/uni-load-more";
import uniPopup from "@/components/uni-popup/uni-popup";
import uniPopupDialog from "@/components/uni-popup/uni-popup-dialog";
import empty from "@/components/empty";
// import orderCard from "@/components/orderCard";
import orderCard from "../../components/orderCard.vue";
import goodsCard from "@/components/goodsCard";
import authApi from "@/api/address.api";
// import likeGood from "@/components/likeGood";
import { getGoodsList } from "@/api/home.api.js";
import { debounce } from "@/utils";
import { paymentConfig } from "@/utils/mpConfig/types";
import { smTrackEvent } from "@/utils/shumei";
const reasonList = [
  {
    cancelReasonType: 1,
    cancelReason: "收货地址填错了"
  },
  {
    cancelReasonType: 2,
    cancelReason: "忘记支付密码/余额不足"
  },
  {
    cancelReasonType: 3,
    cancelReason: "无法正常支付"
  },
  {
    cancelReasonType: 4,
    cancelReason: "不想买了"
  },
  {
    cancelReasonType: 5,
    cancelReason: "其他原因"
  }
];
const popupTypeMap = [
  {
    type: "dialog"
  },
  {
    title: "",
    // desc: "订单一旦取消，无法恢复，金额/积分将原路返还",
    type: "bottom",
    closeable: true
  },
  {
    title: "请选择物流信息",
    type: "bottom",
    closeable: true
  },
  {
    title: "",
    type: "bottom",
    closeable: false
  },
  {
    title: "",
    type: "bottom",
    closeable: false
  },
  {
    title: "请选择原因",
    desc: "订单一旦取消，无法恢复，金额/积分将原路返还",
    type: "bottom",
    closeable: true
  }
];
const orderStatusTxt = {
  11: "等待买家付款",
  21: "等待卖家发货",
  31: "卖家已发货",
  41: "交易完成",
  51: "交易关闭"
};
const orderStatus = [0, 11, 21, 31, 41, 51];
let recGoodsTimer = null;
function isDef(val) {
  return val !== undefined && val !== null && val !== "" && val !== false;
}
export default {
  components: {
    uniLoadMore,
    uniPopup,
    uniPopupDialog,
    empty,
    orderCard,
    goodsCard,
    couponPop
    // likeGood
  },
  data() {
    return {
      currentPopupState: 0,
      reasonList,
      cancelResonIndex: "",
      currentItems: {},
      tabChangeTimer: null,
      expressIndex: "",
      goodsCardState: false,
      loadingType: "loading",
      pageIndex: [1, 1, 1, 1, 1],
      pageSize: 10,
      tabCurrentIndex: 0,
      goodsList: [],
      showList: false,
      tabScrollTop: 0,
      navList: [
        {
          state: 0,
          orderStatusText: "全部",
          loadingType: "loading",
          skuList: []
        },
        {
          state: 1,
          orderStatusText: "待付款",
          loadingType: "loading",
          skuList: []
        },
        {
          state: 2,
          orderStatusText: "待发货",
          loadingType: "loading",
          skuList: []
        },
        {
          state: 3,
          orderStatusText: "待收货",
          loadingType: "loading",
          skuList: []
        },
        {
          state: 4,
          orderStatusText: "已完成",
          loadingType: "loading",
          skuList: []
        }
      ],
      goodsHasNext: true,
      params: {
        pageSize: 10,
        pageNo: 1,
        pageType: 7
      },
      goodsListState: true,
      isNote: false,
      queryNoteFrom: {
        orderNo: ""
      },
      refundInfo: {
        contractInfoList: [],
        noteNeedContract: false,
        content: ""
      },
      iconAndTips: {}
    };
  },
  computed: {
    currentPopupInfo() {
      return popupTypeMap[this.currentPopupState];
    },
    orderNo() {
      return this.currentItems.orderNo;
    },
    orderStatusNo() {
      return orderStatus[this.tabCurrentIndex];
    }
  },
  onShareAppMessage(res) {
    const dataset = res?.target?.dataset?.goods;
    if (dataset) {
      return {
        title: dataset.shareInfo && dataset.shareInfo.shareTitle,
        path: `/pages/product/goodDetail?skuNo=${dataset.goods.goodsId}&count=1`,
        imageUrl: dataset.shareInfo && dataset.shareInfo.shareImgUrl
      };
    }
  },
  onLoad(options) {
    /**
     * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
     * 替换onLoad下代码即可
     */
    if (options.state) {
      this.tabCurrentIndex = +options.state;
    }
    // this.orderCancelList();
  },
  onShow() {
    this.orderList(1);
  },
  onReady() {
    this.showList = true;
  },
  methods: {
    //允许滚动
    disabledScroll() {
      return;
    },
    handelClose() {
      this.$refs["commonPopup"].close();
    },
    handleConfirm() {
      this.handleClickedItems(51);
      this.$refs["commonPopup"].close();
    },
    async handleConfirmRefund() {
      if (!this.orderNo) return;
      const { reasonList, cancelResonIndex } = this;
      const { orderStatus } = this.currentItems;
      const params = {
        orderNo: this.orderNo,
        ...reasonList[cancelResonIndex]
      };
      const [data, error] =
        orderStatus == 21 || orderStatus == 31
          ? await authApi.orderUnfilledCancelV2({ ...params, agreeContract: true })
          : await authApi.orderCancel(params);
      if (data || error.msg === "取消成功") {
        // if (skuList[0].skuSource === 2) {
        //   uni.navigateTo({
        //     url: `/pages/aftersale/refund?orderNo=${this.orderNo}`
        //   });
        //   return;
        // }
        this.iconAndTips = data.iconAndTips;
        this.currentPopupState = 4;
        // uni.showToast({ title: "订单已取消！", icon: "none" });
      }
    },
    handleClick() {
      this.currentPopupState = 1;
      // this.$refs["commonPopup"].open();
      this.orderCancelListV2();
    },
    showNote(val) {
      this.isNote = val;
    },
    async orderQueryNote() {
      this.queryNoteFrom.orderNo = this.currentItems.orderNo;
      const [res] = await authApi.orderQueryNote(this.queryNoteFrom);
      if (res) {
        this.refundInfo = { ...this.refundInfo, ...res };
        // this.refundInfo = {
        //   noteNeedContract: true,
        //   contractInfoList: [
        //     {
        //       contractName: "11",
        //       contractVisitUrl: "tui",
        //       contractId: 789
        //     }
        //   ]
        // };
      }
      // console.log(this.refundInfo);
      this.isNote = true;
    },
    pageScroll() {
      if (this.navList[this.tabCurrentIndex].loadingType === "noMore") {
        if (this.goodsListState) {
          this.getRecListDebounce();
          this.goodsListState = false;
        }
      } else {
        this.pageIndex[this.tabCurrentIndex]++;
        this.orderList();
      }
    },
    //swiper 切换
    changeTab: debounce(function(e) {
      if (e) {
        this.tabCurrentIndex = e.detail.current;
      }
      clearTimeout(recGoodsTimer);
      this.tabScrollTop = 0.1;
      this.$nextTick(() => {
        this.tabScrollTop = 0;
      });
      this.orderList(2);
    }, 100),
    //顶部tab点击
    tabClick(index) {
      if (this.tabChangeTimer) clearTimeout(this.tabChangeTimer);
      this.tabChangeTimer = setTimeout(() => {
        this.tabCurrentIndex = index;
        this.changeTab();
      }, 300);
    },
    handleCandelResonSelect(e) {
      this.cancelResonIndex = +e.detail.value;
    },
    handleExpressSelect(e) {
      this.expressIndex = +e.detail.value;
    },
    handleRadioSubmit() {
      if (this.currentPopupState === 1 || this.currentPopupState === 5) {
        if (isDef(this.cancelResonIndex)) {
          if (this.currentPopupState === 5) {
            this.cancelOrder();
            this.$refs["commonPopup"].close();
          } else {
            this.cancelOrder();
            this.currentPopupState = 4;
          }
        } else {
          uni.showToast({ title: "请选择取消原因！", icon: "none" });
        }
      }
      if (this.currentPopupState === 2) {
        if (isDef(this.expressIndex)) {
          this.toLogisLine();
          this.$refs["commonPopup"].close();
        } else {
          uni.showToast({ title: "请选择物流！", icon: "none" });
        }
        this.toLogisLine();
      }
    },
    handleGoodsClick(eventType, idx, orderData) {
      this.$set(this, "currentItems", { idx, ...orderData });
      switch (eventType) {
        case "cancel":
          this.orderCancelPopup();
          break;
        case "pay":
          this.toPay();
          break;
        case "notify":
          this.orderNotify();
          break;
        case "logis":
          this.orderLogisPopup();
          break;
        case "confirm":
          this.orderConfirmPopup();
          break;
        case "refund":
          this.orderRefundPopup();
          break;
        case "again":
          // TODO
          break;
        default:
          this.currentItems = {};
          this.currentPopupState = 0;
          break;
      }
    },
    handleClickedItems(status) {
      const { currentItems, navList, tabCurrentIndex } = this;
      if (tabCurrentIndex === 0) {
        if (currentItems.isShowRefund) {
          currentItems.isShowRefundAudit = 1;
        } else {
          currentItems.orderStatus = status;
          currentItems.orderStatusText = orderStatusTxt[status];
        }
        navList[tabCurrentIndex]["skuList"][currentItems.idx] = currentItems;
        this.orderList(1);
      } else if (tabCurrentIndex === 2) {
        if (currentItems.isShowRefund) {
          currentItems.isShowRefundAudit = 1;
          navList[tabCurrentIndex]["skuList"][currentItems.idx] = currentItems;
          this.orderList(1);
        }
      } else {
        navList[tabCurrentIndex]["skuList"].splice(currentItems.idx, 1);
      }
      this.$set(this, "navList", navList);
    },
    toPay() {
      const { orderStatus, paymentInProgress } = this.currentItems;
      if (orderStatus === 11 && paymentInProgress) {
        uni.showModal({
          content: "支付中，请勿重复支付",
          confirmColor: "#EC1500",
          confirmText: "知道了",
          showCancel: false
        });
        return;
      }
      // 去支付
      if (!this.orderNo) return;
      uni.navigateTo({
        url: `${paymentConfig.payUrl}?orderNo=${this.orderNo}`
      });
      this.currentItems = {};
    },
    toLogisLine(exp = {}) {
      uni.navigateTo({
        url: `/pages/order/orderStatus?deliveryOrderId=${this.orderNo}&expressCompanyCode=${exp.expressCompanyCode}&deliveryNo=${exp.deliveryNo}`
      });
      this.currentItems = {};
    },
    orderNotify() {
      uni.showToast({
        title: "已提醒卖家尽快发货！",
        icon: "none"
      });
      this.currentItems = {};
    },
    async orderRefundPopup() {
      // 申请退款逻辑
      const { showCashCouponCancelNote, cashCouponCancelNote } = this.currentItems;
      if (showCashCouponCancelNote) {
        // 调是否需要勾选合同接口
        this.refundInfo.cashCouponCancelNote = cashCouponCancelNote;
        this.orderQueryNote();
        return;
      } else {
        this.orderCancelListV2();
        this.currentPopupState = 1;
        this.cancelResonIndex = null;
        // this.$refs["commonPopup"].open();
        // 取消订单但不退款的接口
        // let tips = {
        //   content: cancelNote || "宝贝马上就要发货了，您真的要取消吗？",
        //   confirmText: "仍要取消",
        //   cancelText: "留下商品",
        //   confirmColor: "#EC1500",
        //   cancelColor: "#999999",
        //   success: res => {
        //     if (res.confirm) {
        //       this.orderCancelList();
        //       this.currentPopupState = 1;
        //       this.$refs["commonPopup"].open();
        //     }
        //   }
        // };
        // uni.showModal(tips);
      }
    },
    orderCancelPopup() {
      const { orderStatus, paymentInProgress } = this.currentItems;
      if (orderStatus === 11 && paymentInProgress) {
        uni.showModal({
          content: "订单支付处理中，请稍后再试!",
          confirmColor: "#EC1500",
          confirmText: "知道了",
          showCancel: false
        });
        return;
      }
      this.cancelResonIndex = null;
      this.currentPopupState = 5;
      this.orderCancelList();
      this.$refs["commonPopup"].open();
    },
    orderLogisPopup() {
      if (!this.currentItems.expressInfoList) return;
      if (this.currentItems.expressInfoList.length > 1) {
        this.expressIndex = "";
        this.currentPopupState = 2;
        this.$refs["commonPopup"].open();
      } else {
        this.toLogisLine(this.currentItems.expressInfoList[0]);
      }
    },
    orderConfirmPopup() {
      if (!this.orderNo) return;
      uni.showModal({
        content: "确定该订单已收货吗？",
        confirmColor: "#EC1500",
        success: res => {
          if (!res.confirm) return;
          authApi
            .orderConfirm({
              orderNo: this.orderNo
            })
            .then(() => {
              this.handleClickedItems(41);
            });
        }
      });
    },
    // 接口请求订单列表
    async orderList(clear) {
      if (clear === 1) {
        this.$set(this.pageIndex, this.tabCurrentIndex, 1);
        this.tabScrollTop = 0.1;
        this.$nextTick(() => {
          this.tabScrollTop = 0;
        });
      }
      const { pageIndex, tabCurrentIndex, navList, orderStatusNo, pageSize } = this;
      const params = {
        orderStatus: orderStatusNo,
        pageNo: pageIndex[tabCurrentIndex],
        pageSize
      };
      if (clear === 2) {
        this.params.pageNo = 1;
        this.goodsList = [];
      }
      if (navList[tabCurrentIndex].skuList.length && clear === 2) return;
      const [data] = await authApi.orderList(params);
      this.loadingType = "loading";
      if (data.orderList) {
        const list = navList[tabCurrentIndex].skuList || [];
        this.$set(
          this.navList[tabCurrentIndex],
          "skuList",
          clear ? data.orderList : [...list, ...data.orderList]
        );
      }
      this.loadingType = data.hasNext ? "loading" : "noMore";
      this.$set(this.navList[tabCurrentIndex], "loadingType", data.hasNext ? "loading" : "noMore");
      this.goodsCardState = !data.hasNext;
      if (!data.hasNext && !this.goodsList.length) {
        this.params.pageNo = 1;
        this.goodsList = [];
        this.getRecListDebounce();
      }
    },
    async getRecListDebounce() {
      this.loadingType = "loading";
      if (recGoodsTimer) clearTimeout(recGoodsTimer);
      recGoodsTimer = setTimeout(() => {
        if (this.goodsList.length) {
          this.params.pageNo = this.params.pageNo + 1;
        }
        this.getRecList();
      }, 1000);
    },
    async getRecList() {
      this.loadingType = "loading";
      const [data] = await getGoodsList(this.params);
      if (data.hasNext) {
        this.goodsList = [...this.goodsList, ...data.goodsList];
        this.goodsListState = true;
      } else {
        if (this.params.pageNo > 1) {
          this.params.pageNo--;
        }
      }
      this.goodsHasNext = data.hasNext;
      this.loadingType = data.hasNext ? "more" : "noMore";
    },
    async cancelOrder() {
      if (!this.orderNo) return;
      const { reasonList, cancelResonIndex } = this;
      const { orderStatus } = this.currentItems;
      const params = {
        orderNo: this.orderNo,
        ...reasonList[cancelResonIndex]
      };
      const [data, error] =
        orderStatus == 21 || orderStatus == 31
          ? await authApi.orderUnfilledCancelV2({ ...params, agreeContract: true })
          : await authApi.orderCancel(params);
      if (data || error.msg === "取消成功") {
        // if (skuList[0].skuSource === 2) {
        //   uni.navigateTo({
        //     url: `/pages/aftersale/refund?orderNo=${this.orderNo}`
        //   });
        //   return;
        // }
        this.handleClickedItems(51);
        // uni.showToast({ title: "订单已取消！", icon: "none" });
        if (orderStatus != 21 && orderStatus != 31) {
          // 已付款订单取消时不上报数美
          smTrackEvent({
            eventId: "cancelOrder",
            orderId: this.orderNo
          });
        }
        this.iconAndTips = data.iconAndTips;
        // uni.showToast({ title: "订单已取消！", icon: "none" });
      }
    },
    async orderCancelList() {
      if (this.orderNo) {
        // 订单取消原因查询接口
        const obj = {
          orderNo: this.orderNo
        };
        // 弹窗数据改为接口返回
        const [data] = await authApi.orderCancelList(obj);
        if (data) {
          this.reasonList = data.cancelReasonList;
          // this.iconAndTips = data.iconAndTips;
        }
      }
    },
    async orderCancelListV2() {
      if (this.orderNo) {
        // 订单取消原因查询接口
        const obj = {
          orderNo: this.orderNo
        };
        // 弹窗数据改为接口返回
        const [data, error] = await authApi.orderCancelListV2(obj);
        if (!error) {
          this.reasonList = data.cancelReasonList;
          this.iconAndTips = data.iconAndTips;
          this.$refs["commonPopup"].open();
          return;
        }
        uni.showModal({
          title: "温馨提示",
          content: error.msg || "",
          cancelText: "不授权",
          confirmText: "确定",
          confirmColor: "#ec1500",
          showCancel: false
        });
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.goodsCardList {
  padding: 0 24rpx;
}
.order {
  background: $page-color-base;
  height: 100vh;
  &-swiper {
    height: calc(100% - 40px);
    &-item {
      height: 100%;
      ::v-deep .order-card {
        margin: 0 20rpx 20rpx;
      }
    }
  }

  .list-scroll-content {
    height: 100%;
    // padding: 12rpx 0 0;
  }

  &-nav {
    display: flex;
    height: 80rpx;
    &-item {
      position: relative;
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100%;
      font-size: 26rpx;
      color: #333333;
      &.current {
        color: #ec1500;
        font-weight: bold;
        &:after {
          content: "";
          position: absolute;
          left: 50%;
          bottom: 0;
          transform: translateX(-50%);
          width: 80rpx;
          height: 0;
          border-bottom: 6rpx solid#EC1500;
          border-radius: 3rpx;
        }
      }
    }
  }
}
.scroll-Y {
  height: 400rpx;
}
.radio-info {
  min-height: 580rpx;
  position: relative;
  // .radio-info__list {
  //   max-height: 300rpx;
  //   overflow-y: auto;
  // }
  .close {
    position: absolute;
    right: 38rpx;
    top: 38rpx;
    .close-img {
      width: 44rpx;
      height: 44rpx;
    }
  }
  .yuan {
    font-size: 48rpx;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #323233;
    line-height: 40rpx;
    text-align: center;
    margin-top: 24rpx;
  }
  .yuan_detail {
    font-size: 32rpx;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #323233;
    line-height: 40rpx;
    text-align: center;
    margin-top: 24rpx;
    margin-bottom: 48rpx;
  }
  .refundSucc {
    font-size: 36rpx;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #323233;
    line-height: 40rpx;
    margin-top: 34rpx;
    text-align: center;
  }
  .refundSucc_detail {
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #999999;
    line-height: 20px;
    margin-top: 8rpx;
    margin-bottom: 164rpx;
    text-align: center;
    padding: 0 108rpx;
  }
  .tips {
    width: 686rpx;
    height: 88rpx;
    background: #f7f8fa;
    border-radius: 16rpx;
    font-size: 24rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #666666;
    line-height: 88rpx;
    margin: 0 auto;
    text-align: center;
  }
  .img {
    padding-top: 84rpx;
  }
  .img-succ {
    padding-top: 100rpx;
  }
  .refund-succ {
    width: 240rpx;
    height: 240rpx;
    margin: 0 auto;
    display: block;
  }
  .refund {
    width: 334rpx;
    height: 334rpx;
    margin: 0 auto;
    display: block;
  }
  &__list {
    padding: 0 32rpx;
  }
  &__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 23rpx 0;
    text {
      font-size: 28rpx;
      line-height: 40rpx;
      color: #333;
    }
    radio {
      transform: scale(0.7);
    }
    &.active {
      text {
        color: #ec1500;
      }
    }
  }
  &__button {
    border-top: 1rpx solid #f2f3f5;
    padding: 16rpx 40rpx;
    button {
      background-image: linear-gradient(269deg, #ff5d00 12%, #ff1900 86%);
      border-radius: 160rpx;
      height: 80rpx;
      font-size: 28rpx;
      line-height: 80rpx;
      color: #fff;
    }
  }
}
.logis-modal {
  min-height: auto;
}
</style>
