Compare commits

...

2 Commits

Author SHA1 Message Date
2159256e53 fix 2024-10-15 16:46:43 +08:00
bea133759f fix 2024-10-15 16:45:54 +08:00
2 changed files with 49 additions and 57 deletions

View File

@ -5,18 +5,14 @@
<span style="font-weight: bold"> 已扫画筒号{{ state.pid }} </span>
<span style="margin-top: 40rpx"> 请放入 </span>
<view class="painting-box">
<span style="font-weight: bold; text-align: center"
>{{ state.containerName }}货架</span
>
<span style="font-weight: bold; text-align: center">{{ state.containerName }}货架</span>
<up-line style="margin-top: 20rpx"></up-line>
<span
style="
<span style="
color: #cf3050;
font-size: 24px;
text-align: center;
margin-top: 20rpx;
"
>
">
{{ state.boxName }}
</span>
<span style="text-align: center; margin-top: 20rpx"> {{ state.column }}{{ state.row }} </span>
@ -24,24 +20,10 @@
</view>
</view>
<view class="button-container">
<up-button
style="width: 336rpx; margin: auto; height: 80rpx"
color="#BABABA"
throttleTime="5"
:disabled="closeButton"
@click="closeFn"
:loading="loading"
>取消</up-button
>
<up-button
style="width: 336rpx; margin: auto; height: 80rpx"
color="#EFC54E"
throttleTime="5"
@click="doneSet"
:disabled="isButtonDisabled"
:loading="loading"
>{{ buttonText }}</up-button
>
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#BABABA" throttleTime="5"
:disabled="closeButton" @click="closeFn" :loading="loading">取消</up-button>
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#EFC54E" throttleTime="5" @click="doneSet"
:disabled="isButtonDisabled" :loading="loading">{{ buttonText }}</up-button>
</view>
</template>
@ -50,6 +32,7 @@ import { ref, reactive, onBeforeMount } from "vue";
import useToast from "@/hooks/toast/useToast.js";
import { onLoad } from "@dcloudio/uni-app";
import { freebox, bind, check_freebox, cancel } from "@/api/login.js";
import { closeWebview, runTimeEnv } from "@/utils/index.js"
const { showMessage } = useToast();
const loading = ref(false);
const isButtonDisabled = ref(false);
@ -173,6 +156,7 @@ page {
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
}
}
.button-container {
display: flex;
justify-content: space-between;

8
utils/index.js Normal file
View File

@ -0,0 +1,8 @@
const currentWebView = plus.webview.getWebviewById("wv");
export const runTimeEnv = () => {
return currentWebView.RunTime === "app";
};
export const closeWebview = () => {
currentWebView.close();
};