fix
This commit is contained in:
parent
2159256e53
commit
a2ec8f55c3
@ -5,6 +5,8 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
console.log("App Show");
|
console.log("App Show");
|
||||||
|
console.log(window.location.href);
|
||||||
|
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
console.log("App Hide");
|
console.log("App Hide");
|
||||||
|
@ -39,8 +39,7 @@ const currentWebView = plus.webview.getWebviewById("wv");
|
|||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
root.style.setProperty(
|
root.style.setProperty(
|
||||||
"--statusBarHeight",
|
"--statusBarHeight",
|
||||||
`${
|
`${currentWebView.RunTime === "app"
|
||||||
currentWebView.RunTime === "app"
|
|
||||||
? plus.navigator.getStatusbarHeight()
|
? plus.navigator.getStatusbarHeight()
|
||||||
: 0 ?? 0
|
: 0 ?? 0
|
||||||
}px`
|
}px`
|
||||||
@ -51,9 +50,11 @@ root.style.setProperty(
|
|||||||
.status_bar {
|
.status_bar {
|
||||||
height: var(--status-bar-height);
|
height: var(--status-bar-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.u-status-bar) {
|
:deep(.u-status-bar) {
|
||||||
margin-top: var(--statusBarHeight);
|
margin-top: var(--statusBarHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin flex($direction: row) {
|
@mixin flex($direction: row) {
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -6,53 +6,38 @@
|
|||||||
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 1">
|
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 1">
|
||||||
确定要出库{{ state.locateAddress }}的
|
确定要出库{{ state.locateAddress }}的
|
||||||
</span>
|
</span>
|
||||||
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 1"> {{state.pid}}画筒吗?</span>
|
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 1">
|
||||||
<span style="font-weight: bold;text-align: center;" v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==4">画筒号:{{state.pid}}</span>
|
{{ state.pid }}画筒吗?</span>
|
||||||
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==4">所在位置:{{ state.locateAddress }}</span>
|
<span style="font-weight: bold;text-align: center;"
|
||||||
|
v-if="state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4">画筒号:{{ state.pid }}</span>
|
||||||
|
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;"
|
||||||
|
v-if="state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4">所在位置:{{ state.locateAddress }}</span>
|
||||||
<view class="painting-box">
|
<view class="painting-box">
|
||||||
<span>画作名称:{{ state.drawName }}</span>
|
<span>画作名称:{{ state.drawName }}</span>
|
||||||
<span style="margin-top: 20rpx;">画家:{{ state.drawerName }}</span>
|
<span style="margin-top: 20rpx;">画家:{{ state.drawerName }}</span>
|
||||||
<span style="margin-top: 20rpx;">预览图:</span>
|
<span style="margin-top: 20rpx;">预览图:</span>
|
||||||
<view class="image-container">
|
<view class="image-container">
|
||||||
<up-image
|
<up-image :src=state.drawThumbnail></up-image>
|
||||||
:src=state.drawThumbnail
|
|
||||||
></up-image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-container">
|
<view class="button-container">
|
||||||
<up-button
|
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#BABABA" throttleTime="5"
|
||||||
style="width: 336rpx; margin: auto; height: 80rpx"
|
v-if="state.boxRelBucketStatus == 1">取消</up-button>
|
||||||
color="#BABABA"
|
<up-button style="width: 336rpx; margin: auto; height: 80rpx;" color="#EFC54E" throttleTime="5" @click="doneSet"
|
||||||
throttleTime="5"
|
v-if="state.boxRelBucketStatus == 1" :disabled="isButtonDisabled"> {{ buttonText }}</up-button>
|
||||||
v-if="state.boxRelBucketStatus == 1"
|
<up-button style="width: 426rpx; margin: auto; height: 86rpx;" color="#EFC54E" throttleTime="5" @click="login"
|
||||||
>取消</up-button
|
v-if="state.boxRelBucketStatus == 2 || state.boxRelBucketStatus == 4">返回继续扫码</up-button>
|
||||||
>
|
|
||||||
<up-button
|
|
||||||
style="width: 336rpx; margin: auto; height: 80rpx;"
|
|
||||||
color="#EFC54E"
|
|
||||||
throttleTime="5"
|
|
||||||
@click="doneSet"
|
|
||||||
v-if="state.boxRelBucketStatus == 1"
|
|
||||||
:disabled="isButtonDisabled"
|
|
||||||
> {{ buttonText }}</up-button
|
|
||||||
>
|
|
||||||
<up-button
|
|
||||||
style="width: 426rpx; margin: auto; height: 86rpx;"
|
|
||||||
color="#EFC54E"
|
|
||||||
throttleTime="5"
|
|
||||||
@click="login"
|
|
||||||
v-if="state.boxRelBucketStatus == 2||state.boxRelBucketStatus ==4"
|
|
||||||
>返回继续扫码</up-button
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onBeforeMount } from "vue";
|
import { ref, reactive, onBeforeMount } from "vue";
|
||||||
|
// import { closeWebview, runTimeEnv } from "@/utils/index.js"
|
||||||
|
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import useToast from "@/hooks/toast/useToast.js";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
import { pbDetail, outbound } from "@/api/login.js";
|
import { pbDetail, outbound } from "@/api/login.js";
|
||||||
@ -149,6 +134,7 @@ const doneSet = async () => {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-container {
|
.image-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -157,6 +143,7 @@ const doneSet = async () => {
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-container {
|
.button-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -170,4 +157,3 @@ const doneSet = async () => {
|
|||||||
height: 8%;
|
height: 8%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -5,25 +5,45 @@
|
|||||||
<span style="font-weight: bold"> 已扫画筒号:{{ state.pid }} </span>
|
<span style="font-weight: bold"> 已扫画筒号:{{ state.pid }} </span>
|
||||||
<span style="margin-top: 40rpx"> 请放入: </span>
|
<span style="margin-top: 40rpx"> 请放入: </span>
|
||||||
<view class="painting-box">
|
<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>
|
<up-line style="margin-top: 20rpx"></up-line>
|
||||||
<span style="
|
<span
|
||||||
|
style="
|
||||||
color: #cf3050;
|
color: #cf3050;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
">
|
"
|
||||||
|
>
|
||||||
{{ state.boxName }}
|
{{ state.boxName }}
|
||||||
</span>
|
</span>
|
||||||
<span style="text-align: center; margin-top: 20rpx"> {{ state.column }}列{{ state.row }}行 </span>
|
<span style="text-align: center; margin-top: 20rpx">
|
||||||
|
{{ state.column }}列{{ state.row }}行
|
||||||
|
</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-container">
|
<view class="button-container">
|
||||||
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#BABABA" throttleTime="5"
|
<up-button
|
||||||
:disabled="closeButton" @click="closeFn" :loading="loading">取消</up-button>
|
style="width: 336rpx; margin: auto; height: 80rpx"
|
||||||
<up-button style="width: 336rpx; margin: auto; height: 80rpx" color="#EFC54E" throttleTime="5" @click="doneSet"
|
color="#BABABA"
|
||||||
:disabled="isButtonDisabled" :loading="loading">{{ buttonText }}</up-button>
|
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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -32,7 +52,7 @@ import { ref, reactive, onBeforeMount } from "vue";
|
|||||||
import useToast from "@/hooks/toast/useToast.js";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { freebox, bind, check_freebox, cancel } from "@/api/login.js";
|
import { freebox, bind, check_freebox, cancel } from "@/api/login.js";
|
||||||
import { closeWebview, runTimeEnv } from "@/utils/index.js"
|
import { closeWebview, runTimeEnv } from "@/utils/index.js";
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const isButtonDisabled = ref(false);
|
const isButtonDisabled = ref(false);
|
||||||
@ -44,10 +64,9 @@ const state = reactive({
|
|||||||
containerName: "",
|
containerName: "",
|
||||||
boxName: "",
|
boxName: "",
|
||||||
boxUid: "",
|
boxUid: "",
|
||||||
containerUid: '',
|
containerUid: "",
|
||||||
});
|
});
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
|
||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.pid;
|
state.pid = options.pid;
|
||||||
bindShelfHole();
|
bindShelfHole();
|
||||||
@ -61,13 +80,12 @@ const bindShelfHole = async () => {
|
|||||||
state.boxName = res.data.boxName;
|
state.boxName = res.data.boxName;
|
||||||
state.containerUid = res.data.containerUid;
|
state.containerUid = res.data.containerUid;
|
||||||
state.boxUid = res.data.boxUid;
|
state.boxUid = res.data.boxUid;
|
||||||
check()
|
check();
|
||||||
if (state.boxName) {
|
if (state.boxName) {
|
||||||
const parts = state.boxName.split(/(\d+)/);
|
const parts = state.boxName.split(/(\d+)/);
|
||||||
state.column = parts[0]; // 字母部分
|
state.column = parts[0]; // 字母部分
|
||||||
state.row = parts[1]; // 数字部分
|
state.row = parts[1]; // 数字部分
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
@ -86,6 +104,7 @@ const doneSet = async () => {
|
|||||||
showMessage({ type: "sucess", message: "入库成功" });
|
showMessage({ type: "sucess", message: "入库成功" });
|
||||||
isButtonDisabled.value = true;
|
isButtonDisabled.value = true;
|
||||||
buttonText.value = "已入库";
|
buttonText.value = "已入库";
|
||||||
|
closeWebview();
|
||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
@ -95,7 +114,7 @@ const doneSet = async () => {
|
|||||||
const closeFn = async () => {
|
const closeFn = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await cancel({
|
const res = await cancel({
|
||||||
boxUid: state.boxUid
|
boxUid: state.boxUid,
|
||||||
});
|
});
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
showMessage({ type: "error", message: "取消入库" });
|
showMessage({ type: "error", message: "取消入库" });
|
||||||
@ -105,18 +124,17 @@ const closeFn = async () => {
|
|||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
};
|
||||||
//查孔洞是否能用
|
//查孔洞是否能用
|
||||||
const check = async () => {
|
const check = async () => {
|
||||||
const res = await check_freebox({
|
const res = await check_freebox({
|
||||||
boxUid: state.boxUid
|
boxUid: state.boxUid,
|
||||||
});
|
});
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -32,14 +32,14 @@ const request = new Request({
|
|||||||
// response.config.headers["Authorization"] = response.data.data.Token;
|
// response.config.headers["Authorization"] = response.data.data.Token;
|
||||||
// }
|
// }
|
||||||
if (response.data.code === 401) {
|
if (response.data.code === 401) {
|
||||||
uni.clearStorageSync()//清缓存
|
uni.clearStorageSync(); //清缓存
|
||||||
const params = new URLSearchParams(window.location.search)//属性包含当前 URL 的查询字符串部分
|
const params = new URLSearchParams(window.location.search); //属性包含当前 URL 的查询字符串部分
|
||||||
const id = params.get('id')
|
const id = params.get("id");
|
||||||
const pid = params.get('pid')
|
const pid = params.get("pid");
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/login/index?id="+id+'&pid='+pid,
|
url: "/pages/login/index?id=" + id + "&pid=" + pid,
|
||||||
});
|
});
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
if ([200, 201, 204].includes(response.status)) {
|
if ([200, 201, 204].includes(response.status)) {
|
||||||
return response.config.responseType === "blob" ? response : response;
|
return response.config.responseType === "blob" ? response : response;
|
||||||
|
Loading…
Reference in New Issue
Block a user