提交代码
This commit is contained in:
parent
2a180c72db
commit
c4629781da
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="popup">
|
||||
<uv-popup ref="popup" customStyle="width: 688rpx; height: auto; padding:32rpx;" round="16rpx"
|
||||
<uv-popup ref="popup" customStyle="width: 620rpx; height: auto; padding:32rpx;" round="16rpx"
|
||||
:closeOnClickOverlay="false" :safeAreaInsetBottom="false">
|
||||
<view class="modal-container">
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
lineHeight: '86rpx',
|
||||
color: '#fff',
|
||||
fontSize: '32rpx',
|
||||
}" shape="circle" @click="confirm">
|
||||
}" color="#FB322E" shape="circle" @click="confirm">
|
||||
{{ props.confirmText || $t('common.confirm') }}
|
||||
</uv-button>
|
||||
<!-- <view
|
||||
|
||||
@ -188,7 +188,7 @@
|
||||
"detail.total": "总共费用",
|
||||
"detail.next": "下一步",
|
||||
"detail.read": "我已经阅读并同意 ",
|
||||
"detail.agreement": "《订仓协议》",
|
||||
"detail.agreement": "订仓协议",
|
||||
"detail.agreeTip": "请阅读并同意《订仓协议》",
|
||||
"detail.orderNum": "订单序号",
|
||||
"detail.type": "仓库",
|
||||
|
||||
@ -64,10 +64,10 @@
|
||||
<view class="font32 fontb name">
|
||||
{{ unitTypeData[state.active].name }}
|
||||
</view>
|
||||
<view class="font26 fontb textGary" style="padding: 0 28rpx;">
|
||||
<view class="font26 fontb textGary" style="padding: 0 28rpx;padding-right: 0;">
|
||||
{{ unitTypeData[state.active].volumeRange }}
|
||||
</view>
|
||||
<view class="font26 fontb textGary">({{ unitTypeData[state.active].description }})</view>
|
||||
<view class="font26 fontb textGary">({{ unitTypeData[state.active].description }})</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orderInfo sflist card" v-if="unitTypeData.length">
|
||||
@ -182,7 +182,7 @@
|
||||
</uv-radio>
|
||||
</view>
|
||||
<view class="price mgb10">
|
||||
<text class="font28 textGary fontb" style="text-decoration: line-through #000;padding-right: 20rpx;">¥ {{
|
||||
<text class="font28 textGary fontb" style="text-decoration: line-through;text-decoration-color: rgb(0, 0, 0);padding-right: 20rpx;">¥ {{
|
||||
item.price
|
||||
}}/月</text>
|
||||
<text class="font28 fontb" style="color: #D2021B;">¥ {{ item.currentPrice }}/月</text>
|
||||
@ -371,13 +371,17 @@
|
||||
:text="$t('common.loading')"></uv-loading-icon>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="roll-btn" @click="handleRoll">
|
||||
<!-- <view class="roll-btn" @click="handleRoll">
|
||||
<uv-icon name="arrow-down" size="24" color="#FFFFFF"></uv-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="bottom-read agree" v-if="state.isRead" @click="handleAgree">{{ $t("detail.agreeTerm") }}</view>
|
||||
<view class="bottom-read" v-else>{{ $t("detail.scrollRead") }}</view>
|
||||
</view>
|
||||
</uv-popup>
|
||||
<myModal v-model="state.showhasOrderModal" :content="$t('common.cantUselocker')" :cancelShow="false"></myModal>
|
||||
<myModal v-model="state.showhasunpaidOrderModal" :content="$t('common.unpaidOrderTips')" @confirm="unpaidOrder" :cancelShow="false"></myModal>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -385,8 +389,8 @@
|
||||
import { ref, computed, nextTick, watch } from "vue";
|
||||
import { onTabItemTap, getDistance, makePhoneCall, mergeFiveGoatStores, parseUrlParams } from "/utils/common.js";
|
||||
import myCustomtTabBar from "@/components/myCustomtTabBar.vue";
|
||||
import wxNavbar from "@/components/wxNavbar.vue";
|
||||
import siteDetail from '@/components/siteDetail.vue';
|
||||
// import wxNavbar from "@/components/wxNavbar.vue";
|
||||
// import siteDetail from '@/components/siteDetail.vue';
|
||||
import { onLoad, onShow, onShareAppMessage, onUnload } from "@dcloudio/uni-app";
|
||||
import { baseImageUrl, projectInfo, isKingKong, setOrderDays } from "@/config/index.js";
|
||||
import { useLoginApi } from "/Apis/home.js";
|
||||
@ -395,6 +399,7 @@ import { navigateTo } from '@/utils/navigateTo';
|
||||
// 主题色配置
|
||||
import { useMainStore } from "@/store/index.js";
|
||||
import { navbarHeightAndStatusBarHeight, shareParam } from "@/utils/common.js";
|
||||
import myModal from "@/components/myModal.vue";
|
||||
import { couponApi } from "@/Apis/coupon.js";
|
||||
import { useLocation } from "@/hooks/useLocation";
|
||||
import { useLoginApi as useLoginApi2 } from "@/Apis/login";
|
||||
@ -459,6 +464,8 @@ const state = ref({
|
||||
zhuangxiuzhong: false,
|
||||
priceData: {},
|
||||
hasVerify: false,
|
||||
showhasOrderModal:false,
|
||||
showhasunpaidOrderModal:false,
|
||||
});
|
||||
|
||||
const goOrder = async () => {
|
||||
@ -559,11 +566,12 @@ const goOrder = async () => {
|
||||
} else {
|
||||
if(res.code === 206){
|
||||
reset();
|
||||
uni.showToast({
|
||||
title: '仓位已出租,请重新选择其他仓位!',
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: '仓位已出租,请重新选择其他仓位!',
|
||||
// icon: 'none',
|
||||
// duration: 5000
|
||||
// })
|
||||
state.value.showhasOrderModal = true;
|
||||
|
||||
// uni.showModal({
|
||||
// title: t('common.title'),
|
||||
@ -575,21 +583,18 @@ const goOrder = async () => {
|
||||
// })
|
||||
}
|
||||
if (res.code === 1001) {
|
||||
uni.showToast({
|
||||
title: t('common.unpaidOrderTips'),
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/unlock/index?type=unpaid',
|
||||
})
|
||||
},3000)
|
||||
state.value.showhasunpaidOrderModal = true;
|
||||
return
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
const unpaidOrder = async () => {
|
||||
getApp().globalData.tabParams = { type: 'unpaid' }
|
||||
uni.switchTab({
|
||||
url: '/pages/unlock/index',
|
||||
})
|
||||
}
|
||||
const reset = () => {
|
||||
state.value.lockerId = null;
|
||||
state.value.priceData = {};
|
||||
@ -774,6 +779,7 @@ const goSite = () => {
|
||||
});
|
||||
};
|
||||
const goUnlock = () => {
|
||||
getApp().globalData.tabParams = { type: 'paid' }
|
||||
uni.navigateTo({
|
||||
url: "/pages/unlock/index",
|
||||
});
|
||||
@ -787,7 +793,7 @@ const getLockerBySiteId = () => {
|
||||
mask: true
|
||||
})
|
||||
getSiteApi
|
||||
.GetLockerBySiteId({ siteId: state.value.siteId, unitTypeId: state.value.unitTypeId })
|
||||
.GetLockerBySiteId({ siteId: state.value.siteId, unitTypeId: state.value.unitTypeId,month: state.value.month })
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
LockerList.value = res.data;
|
||||
@ -924,22 +930,24 @@ const getLockerById = () => {
|
||||
// res.data == null 找不到订单 isPlaceOrder 等于订单不可以租用
|
||||
if (!res.data || !res.data?.isPlaceOrder) {
|
||||
// 支付回调 会触发onshow 这个会优先出来 所有 支付成功就不弹窗 会有一个支付成功的弹窗显示
|
||||
uni.showModal({
|
||||
title: t("common.title"),
|
||||
content: t("common.cantUselocker"),
|
||||
showCancel: false,
|
||||
success: function () {
|
||||
reset();
|
||||
},
|
||||
});
|
||||
state.value.showhasOrderModal = true
|
||||
reset();
|
||||
// uni.showModal({
|
||||
// title: t("common.title"),
|
||||
// content: t("common.cantUselocker"),
|
||||
// showCancel: false,
|
||||
// success: function () {
|
||||
// reset();
|
||||
// },
|
||||
// });
|
||||
uni.hideLoading();
|
||||
return;
|
||||
}
|
||||
getLockerExpense();
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: "/pages/index/index",
|
||||
});
|
||||
// uni.reLaunch({
|
||||
// url: "/pages/index/index",
|
||||
// });
|
||||
}
|
||||
}).finally(() => {
|
||||
uni.hideLoading();
|
||||
@ -1252,12 +1260,13 @@ function changeMove(event) {
|
||||
.agreement-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 30rpx;
|
||||
padding: 20rpx 0rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size:36rpx;
|
||||
font-weight: 600;
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1302,10 +1311,13 @@ function changeMove(event) {
|
||||
|
||||
.check-wrap {
|
||||
pointer-events: none;
|
||||
margin-right: 10rpx;
|
||||
margin-right: 8rpx;
|
||||
:deep(.uv-radio-group){
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
:deep(.uv-radio__label-wrap){
|
||||
display: none;
|
||||
}
|
||||
// min-width: 40rpx;
|
||||
// height: 40rpx;
|
||||
// border: 6rpx solid #242a37;
|
||||
@ -1336,7 +1348,10 @@ function changeMove(event) {
|
||||
.check-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10rpx;
|
||||
margin-right: 8rpx;
|
||||
:deep(.uv-radio__label-wrap){
|
||||
display: none;
|
||||
}
|
||||
// :deep(.uv-radio){
|
||||
// zoom: 1.0;
|
||||
// }
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<view class="container" :class="[`${themeInfo.theme}-theme`]">
|
||||
<view class="header">
|
||||
<uv-tabs @change="handleChange" :current="state.current" lineWidth="80rpx" lineHeight="10rpx" lineColor="#f56c6c" :scrollable="false" :list="list">
|
||||
<uv-tabs @change="handleChange" :current="state.current" lineWidth="80rpx" lineHeight="10rpx"
|
||||
lineColor="#f56c6c" :scrollable="false" :list="list">
|
||||
</uv-tabs>
|
||||
</view>
|
||||
<view class="content">
|
||||
@ -64,11 +65,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" v-show="[0, 3, 4].includes(item.refundLockerStatus)" v-if="item.orderStatus !== 2">
|
||||
<uv-button
|
||||
:disabled="!(item.orderStartStatus == 2 && item.orderStatus !== 5 && item.isOpenDoor)"
|
||||
shape="circle" @click="openDevicePopup(item)">开门</uv-button>
|
||||
<uv-button
|
||||
:disabled="!(item.orderStartStatus == 2 && item.orderStatus !== 5 && item.isOpenLock)"
|
||||
<uv-button :disabled="!(item.orderStartStatus == 2 && item.orderStatus !== 5 && item.isOpenDoor)"
|
||||
shape="circle" @click="openDevicePopup(item)">开门</uv-button>
|
||||
<uv-button :disabled="!(item.orderStartStatus == 2 && item.orderStatus !== 5 && item.isOpenLock)"
|
||||
shape="circle" @click="openPwdPopup(item)">开锁</uv-button>
|
||||
<uv-button v-show="item.orderStartStatus == 2 || item.orderStartStatus == 1"
|
||||
:style="{ opacity: item.renewal ? '1' : '0.5' }" @click="showPayPopup(item)"
|
||||
@ -82,7 +81,6 @@
|
||||
<!-- 退仓申请中 -->
|
||||
<view class="btn" v-show="item.refundLockerStatus === 1">
|
||||
<uv-button :customStyle="{
|
||||
color: '#fff',
|
||||
}" color="#FB322E" plain shape="circle" @click="cancelMoveOutRqt(item)">取消退仓申请</uv-button>
|
||||
<uv-button shape="circle" @click="openDetailPopup(item)">{{ $t("unlock.details") }}</uv-button>
|
||||
</view>
|
||||
@ -113,7 +111,8 @@
|
||||
<view class="orderList">
|
||||
<view class="orderInfo">
|
||||
<image class="close-icon" src="/static/home/close.svg" @click="closeDetailPopup"></image>
|
||||
<view class="orderOn">订单号:{{ state.orderData.orderNo }} <uv-button shape="circle" @click="copyOrderOn(state.orderData)">复制</uv-button> </view>
|
||||
<view class="orderOn">订单号:{{ state.orderData.orderNo }} <uv-button shape="circle"
|
||||
@click="copyOrderOn(state.orderData)">复制</uv-button> </view>
|
||||
<view class="box1">
|
||||
<!-- 顶部:左中右布局 -->
|
||||
<view class="top">
|
||||
@ -162,7 +161,7 @@
|
||||
? `(${$t("unlock.overdue")})` : '' }}</template>
|
||||
<template v-else-if="state.orderData.refundLockerStatus === 4">{{
|
||||
$t("unlock.overdue") }}</template>
|
||||
<template v-else-if="state.orderData.orderStatus === 8">已取消</template>
|
||||
<template v-else-if="state.orderData.orderStatus === 8">已取消</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -182,12 +181,15 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label font26 fontb textGary">租金月费: </view>
|
||||
<view class="value font26 fontb">{{ currency }} {{ state.orderData.discountData?.[0]?.unitPrice }}
|
||||
<view class="value font26 fontb">{{ currency }} {{
|
||||
state.orderData.discountData?.[0]?.unitPrice
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label font26 fontb textGary">租期优惠: </view>
|
||||
<view class="value font26 fontb"> {{ state.orderData.discountData?.[0]?.month }}个月长租(-{{ currency }} {{ state.orderData.discountData?.[0]?.leaseDiscount }})
|
||||
<view class="value font26 fontb"> {{ state.orderData.discountData?.[0]?.month }}个月长租(-{{
|
||||
currency }} {{ state.orderData.discountData?.[0]?.leaseDiscount }})
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
@ -249,7 +251,9 @@
|
||||
</view>
|
||||
<view class="content">
|
||||
<text class="font26 textRed fontb" style="font-size: 60rpx;">{{ lockPwd }}#</text>
|
||||
<text class="textGray font26">输入密码即可开锁{{ [3, 7].includes(Number(state.selectItem?.lockTypeId)) ? "或一键开锁" : "" }}</text>
|
||||
<text class="textGray font26">输入密码即可开锁{{ [3, 7].includes(Number(state.selectItem?.lockTypeId)) ?
|
||||
"或一键开锁" :
|
||||
"" }}</text>
|
||||
</view>
|
||||
<view class="btnBox">
|
||||
<uv-button @click="closePwdPopup" :customStyle="{
|
||||
@ -259,13 +263,14 @@
|
||||
}" shape="circle">
|
||||
取消
|
||||
</uv-button>
|
||||
|
||||
<uv-button v-if="[3, 7].includes(Number(state.selectItem?.lockTypeId))" @click="RemoteOpen" :customStyle="{
|
||||
height: '86rpx',
|
||||
background: '#FB322E',
|
||||
color: '#fff',
|
||||
fontSize: '32rpx',
|
||||
}" color="#FB322E" shape="circle">
|
||||
|
||||
<uv-button v-if="[3, 7].includes(Number(state.selectItem?.lockTypeId))" @click="RemoteOpen"
|
||||
:customStyle="{
|
||||
height: '86rpx',
|
||||
background: '#FB322E',
|
||||
color: '#fff',
|
||||
fontSize: '32rpx',
|
||||
}" color="#FB322E" shape="circle">
|
||||
一键开锁
|
||||
</uv-button>
|
||||
<uv-button v-else @click="GetLockPwd" :customStyle="{
|
||||
@ -309,7 +314,8 @@
|
||||
仓号:{{ state.lockData?.name }}
|
||||
</view>
|
||||
<view>
|
||||
尺寸:长{{ state.lockData?.['length'] }}m*宽{{ state.lockData?.width }}m*高{{ state.lockData?.height }}m
|
||||
尺寸:长{{ state.lockData?.['length'] }}m*宽{{ state.lockData?.width }}m*高{{ state.lockData?.height
|
||||
}}m
|
||||
</view>
|
||||
</view>
|
||||
<view class="title2 font32 fontb">
|
||||
@ -330,14 +336,21 @@
|
||||
<view class="title2 font32 fontb">
|
||||
<text>优惠信息</text> <text style="color: #FB322E;">-¥ {{ state.priceData.favorable }}</text>
|
||||
</view>
|
||||
<view class="title2 textGary2 fontb font28">
|
||||
<text>租期优惠({{state.month}}个月长租)</text><text style="color: #FB322E;">-¥ {{ state.priceData.leaseDiscount }}</text>
|
||||
<view class="title2 textGary2 fontb font28">
|
||||
<text>租期优惠({{ state.month }}个月长租)</text><text style="color: #FB322E;">-¥ {{
|
||||
state.priceData.leaseDiscount
|
||||
}}</text>
|
||||
</view>
|
||||
<view class="toOrder card font28">
|
||||
<view class="left font28">
|
||||
<text class="price fontb" :class="{ overMaxFont: String(state.priceData?.expense).length>6 }"> {{ state.priceData.expense ? `¥${state.priceData.expense}`
|
||||
:'--'}}</text>
|
||||
<view class="detail" v-if="state.priceData.expense" @click="hidePayPopup"><text style="margin-right: 10rpx;font-weight: 600;" :class="{ overMaxFont: String(state.priceData?.expense).length>6 }" v-if="state.priceData?.expense">¥{{ state.priceData.leaseOriginalPrice }}</text>
|
||||
<text class="price fontb" :class="{ overMaxFont: String(state.priceData?.expense).length > 6 }">
|
||||
{{
|
||||
state.priceData.expense ? `¥${state.priceData.expense}`
|
||||
: '--' }}</text>
|
||||
<view class="detail" v-if="state.priceData.expense" @click="hidePayPopup"><text
|
||||
style="margin-right: 10rpx;font-weight: 600;"
|
||||
:class="{ overMaxFont: String(state.priceData?.expense).length > 6 }"
|
||||
v-if="state.priceData?.expense">¥{{ state.priceData.leaseOriginalPrice }}</text>
|
||||
<!-- <text
|
||||
class="font28">明细</text> -->
|
||||
<!-- <image src="/static/home/jiantouup.svg" style="height: 12rpx;margin-left: 10rpx;"
|
||||
@ -446,8 +459,8 @@
|
||||
</uv-popup>
|
||||
|
||||
<!-- 上传图片退仓的弹窗 -->
|
||||
<uv-popup ref="moveOutPopup" customStyle="width: 710rpx; border-radius: 24px;" :safeAreaInsetBottom="false" :closeOnClickOverlay="false"
|
||||
zIndex="9999">
|
||||
<uv-popup ref="moveOutPopup" customStyle="width: 710rpx; border-radius: 24px;" :safeAreaInsetBottom="false"
|
||||
:closeOnClickOverlay="false" zIndex="9999">
|
||||
<view class="modal-container">
|
||||
<view class="modal-title">{{ $t("unlock.moveoutReminder") }}</view>
|
||||
<text class="modal-text">
|
||||
@ -482,8 +495,8 @@
|
||||
</view>
|
||||
</uv-popup>
|
||||
<!-- 成功退仓弹窗 -->
|
||||
<uv-popup ref="moveOutPopup2" customStyle="width: 710rpx; border-radius: 24rpx;" :safeAreaInsetBottom="false" :closeOnClickOverlay="false"
|
||||
zIndex="9999">
|
||||
<uv-popup ref="moveOutPopup2" customStyle="width: 710rpx; border-radius: 24rpx;" :safeAreaInsetBottom="false"
|
||||
:closeOnClickOverlay="false" zIndex="9999">
|
||||
<view class="modal-container">
|
||||
<view class="modal-title">{{ $t("unlock.moveoutReminder") }}</view>
|
||||
<text class="modal-text">
|
||||
@ -502,12 +515,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</uv-popup>
|
||||
<uv-popup ref="cancelOrderPopupRef" customStyle="width: 710rpx; border-radius: 24rpx;" :safeAreaInsetBottom="false" :closeOnClickOverlay="false"
|
||||
zIndex="9999">
|
||||
<uv-popup ref="cancelOrderPopupRef" customStyle="width: 710rpx; border-radius: 24rpx;"
|
||||
:safeAreaInsetBottom="false" :closeOnClickOverlay="false" zIndex="9999">
|
||||
<view class="modal-container">
|
||||
<view class="modal-title">{{ $t("common.cancelOrder") }}</view>
|
||||
<text class="modal-text">
|
||||
{{ $t("common.cancelOrderTips") }}
|
||||
{{ $t("common.cancelOrderTips") }}
|
||||
</text>
|
||||
<view class="modal-button">
|
||||
<!-- <view class="modal-button-2" @click="goEvaluate">{{ $t("unlock.evaluate") }}</view> -->
|
||||
@ -586,8 +599,8 @@ const state = ref({
|
||||
month: 24,
|
||||
selfMonth: 1,
|
||||
refundLoading: false,
|
||||
current:0,
|
||||
cancelOrderList:[],
|
||||
current: 0,
|
||||
cancelOrderList: [],
|
||||
});
|
||||
const list = [{
|
||||
name: '在租',
|
||||
@ -599,11 +612,11 @@ const list = [{
|
||||
]
|
||||
const currentOrderList = computed(() => {
|
||||
|
||||
const isType1 = (item) =>
|
||||
!(item.orderStartStatus == 2 && item.refundLockerStatus === 0)
|
||||
const isType1 = (item) =>
|
||||
!(item.orderStartStatus == 2 && item.refundLockerStatus === 0)
|
||||
&& (item.refundLockerStatus === 2)
|
||||
|
||||
const isType2 = (item) =>
|
||||
const isType2 = (item) =>
|
||||
item.orderStatus == 2
|
||||
|
||||
if (state.value.current == 0) {
|
||||
@ -633,7 +646,7 @@ const showImage = (url) => {
|
||||
const handleChange = (e) => {
|
||||
state.value.current = e.index
|
||||
GetOrderList()
|
||||
if(state.value.current == 1){
|
||||
if (state.value.current == 1) {
|
||||
GetCancelOrder()
|
||||
}
|
||||
}
|
||||
@ -656,15 +669,15 @@ const handlePay = (item) => {
|
||||
mask: true,
|
||||
});
|
||||
let source = window.sf.isSfApp() ? 2 : 1;
|
||||
getApi
|
||||
.ContinueOrderPay({
|
||||
orderId:item.orderId,
|
||||
source
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.code === 200) {
|
||||
let path = window.location.pathname;
|
||||
getApi
|
||||
.ContinueOrderPay({
|
||||
orderId: item.orderId,
|
||||
source
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.code === 200) {
|
||||
let path = window.location.pathname;
|
||||
if (!path.endsWith('/')) {
|
||||
path = path + '/';
|
||||
}
|
||||
@ -712,10 +725,10 @@ const handlePay = (item) => {
|
||||
failUrl: returnUrl
|
||||
}).then(res => { }).catch(err => console.log(err))
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -819,10 +832,10 @@ const goOrder = async () => {
|
||||
|
||||
const openCancelOrder = (item) => {
|
||||
state.value.selectItem = item;
|
||||
cancelOrderPopupRef.value.open();
|
||||
cancelOrderPopupRef.value.open();
|
||||
}
|
||||
const closeCancelOrder = () => {
|
||||
cancelOrderPopupRef.value.close();
|
||||
cancelOrderPopupRef.value.close();
|
||||
}
|
||||
|
||||
const cancelOrder = () => {
|
||||
@ -833,7 +846,7 @@ const cancelOrder = () => {
|
||||
uni.hideLoading()
|
||||
if (res.code === 200) {
|
||||
closeCancelOrder();
|
||||
state.value.current = 1
|
||||
state.value.current = 1
|
||||
GetOrderList();
|
||||
GetCancelOrder()
|
||||
} else {
|
||||
@ -1057,26 +1070,26 @@ const cancelMoveOutRqt = (item) => {
|
||||
|
||||
// 获取锁的密码
|
||||
function RemoteOpen() {
|
||||
uni.showLoading({mask:true})
|
||||
getLockApi.RemoteOpen({ lockMac: state.value.selectItem.lockMac,input: '',siteId:state.value.selectItem.siteId }).then(res => {
|
||||
state.tryPWDCount++
|
||||
if(res.data.isSuccess) {
|
||||
uni.showToast({
|
||||
title:t('door.UnlockSuccessful'),
|
||||
duration:3000,
|
||||
icon:'none'
|
||||
})
|
||||
uni.hideLoading()
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title:res.data.message,
|
||||
duration:3000,
|
||||
icon:'none'
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
uni.showLoading({ mask: true })
|
||||
getLockApi.RemoteOpen({ lockMac: state.value.selectItem.lockMac, input: '', siteId: state.value.selectItem.siteId }).then(res => {
|
||||
state.tryPWDCount++
|
||||
if (res.data.isSuccess) {
|
||||
uni.showToast({
|
||||
title: t('door.UnlockSuccessful'),
|
||||
duration: 3000,
|
||||
icon: 'none'
|
||||
})
|
||||
uni.hideLoading()
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 3000,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
const lockPwd = ref('')
|
||||
// 获取锁的密码
|
||||
@ -1127,7 +1140,7 @@ const GetOrderById = () => {
|
||||
const GetCancelOrder = () => {
|
||||
uni.showLoading()
|
||||
getApi.GetCancelOrder().then(res => {
|
||||
state.value.cancelOrderList = []
|
||||
state.value.cancelOrderList = []
|
||||
if (res.code === 200) {
|
||||
state.value.cancelOrderList = res.data
|
||||
}
|
||||
@ -1158,9 +1171,6 @@ onShareAppMessage((res) => {
|
||||
onLoad((params) => {
|
||||
// GetOrderList()unpaid
|
||||
|
||||
if (params?.type == "unpaid") {
|
||||
state.value.current = 2
|
||||
}
|
||||
})
|
||||
onHide(() => {
|
||||
|
||||
@ -1181,9 +1191,22 @@ const token = ref(uni.getStorageSync('token'))
|
||||
onShow(() => {
|
||||
uni.hideTabBar()
|
||||
token.value = uni.getStorageSync('token')
|
||||
|
||||
const app = getApp()
|
||||
const type = app.globalData?.tabParams?.type
|
||||
|
||||
if (type === "unpaid") {
|
||||
state.value.current = 2
|
||||
} else if (type === "paid") {
|
||||
state.value.current = 0
|
||||
}
|
||||
|
||||
if (type) {
|
||||
app.globalData.tabParams = {}
|
||||
}
|
||||
onShowRerequestByIsLogin(() => {
|
||||
GetOrderList();
|
||||
if(state.value.current === 2){
|
||||
if (state.value.current === 2) {
|
||||
GetCancelOrder()
|
||||
}
|
||||
}, (err) => {
|
||||
@ -1338,11 +1361,12 @@ onShow(() => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 38rpx;
|
||||
.price {
|
||||
&.overMaxFont{
|
||||
font-size: 32rpx;
|
||||
|
||||
.price {
|
||||
&.overMaxFont {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail {
|
||||
display: flex;
|
||||
@ -1350,9 +1374,11 @@ onShow(() => {
|
||||
margin-left: 20rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
.overMaxFont{
|
||||
|
||||
.overMaxFont {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
@ -1642,9 +1668,10 @@ onShow(() => {
|
||||
// border-color: #A8AAAC !important;
|
||||
border-width: 1.5px !important;
|
||||
}
|
||||
:deep(.uv-button--info){
|
||||
border-color: #A8AAAC !important;
|
||||
}
|
||||
|
||||
:deep(.uv-button--info) {
|
||||
border-color: #A8AAAC !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1800,7 +1827,8 @@ onShow(() => {
|
||||
font-weight: bold;
|
||||
border-width: 1.5px !important;
|
||||
}
|
||||
:deep(.uv-button--info){
|
||||
|
||||
:deep(.uv-button--info) {
|
||||
border-color: #A8AAAC !important;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user