2023-09-19 02:50:09 +00:00
|
|
|
<template>
|
2023-09-25 12:59:40 +00:00
|
|
|
<view class="main">
|
2024-06-28 08:09:48 +00:00
|
|
|
<title-block style="flex-shrink: 0; width: 100%" title="寄存"></title-block>
|
|
|
|
<view class="order">
|
|
|
|
<view
|
|
|
|
:class="['order-item', isPass !== 2 ? 'disabled-div' : '']"
|
|
|
|
@click.stop="goConsignmen"
|
|
|
|
>
|
|
|
|
<image
|
|
|
|
src="@/static/image/write.png"
|
|
|
|
mode="scaleToFill"
|
|
|
|
style="width: 63rpx; height: 62rpx"
|
|
|
|
/>
|
|
|
|
<view style="color: #fff; margin-top: 10rpx">填写下单</view>
|
2023-09-20 11:59:14 +00:00
|
|
|
</view>
|
2024-06-28 08:09:48 +00:00
|
|
|
<view
|
|
|
|
:class="['order-item', isPass !== 2 ? 'disabled-div' : '']"
|
|
|
|
style="background: #76c458"
|
|
|
|
@click.stop="scanOrder"
|
|
|
|
>
|
|
|
|
<image
|
|
|
|
src="@/static/image/scan.png"
|
|
|
|
mode="scaleToFill"
|
|
|
|
style="width: 57rpx; height: 57rpx"
|
|
|
|
/>
|
|
|
|
<view style="color: #fff; margin-top: 10rpx">扫码下单</view>
|
2023-09-20 11:59:14 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="list">
|
2024-06-28 08:09:48 +00:00
|
|
|
<view style="color: #76c458">目前可用寄存仓库地址</view>
|
2023-09-20 11:59:14 +00:00
|
|
|
<u-divider :dashed="true" lineColor="#4E964D"></u-divider>
|
2024-06-28 08:09:48 +00:00
|
|
|
<view v-for="(item, index) in addressList" :key="item.ID">
|
2023-09-22 06:35:58 +00:00
|
|
|
<view class="list-item">
|
2024-06-28 08:09:48 +00:00
|
|
|
<view>{{ item.address }}</view>
|
|
|
|
<view>剩余{{ item.leftNum }}位置</view>
|
2023-09-22 06:35:58 +00:00
|
|
|
</view>
|
2024-06-28 08:09:48 +00:00
|
|
|
<u-divider
|
|
|
|
:dashed="true"
|
|
|
|
lineColor="#4E964D"
|
|
|
|
v-if="index !== addressList.length - 1"
|
|
|
|
></u-divider>
|
2023-09-20 11:59:14 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<tabbar :current="0"></tabbar>
|
|
|
|
</view>
|
2023-09-19 02:50:09 +00:00
|
|
|
</template>
|
|
|
|
<script>
|
2023-09-20 11:59:14 +00:00
|
|
|
import tabbar from "../../components/uiq-tabbar/uiq-tabbar.vue";
|
2023-09-19 02:50:09 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: "index",
|
|
|
|
onLoad() {
|
2023-09-20 11:59:14 +00:00
|
|
|
uni.hideTabBar();
|
2023-09-19 02:50:09 +00:00
|
|
|
},
|
2023-09-22 06:35:58 +00:00
|
|
|
onShow() {
|
|
|
|
this.getAddress();
|
|
|
|
},
|
2023-09-20 11:59:14 +00:00
|
|
|
components: {
|
2024-06-28 08:09:48 +00:00
|
|
|
tabbar,
|
2023-09-20 11:59:14 +00:00
|
|
|
},
|
2023-09-22 06:35:58 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2024-06-28 08:09:48 +00:00
|
|
|
addressList: [],
|
|
|
|
isPass: 0,
|
2023-09-22 06:35:58 +00:00
|
|
|
};
|
|
|
|
},
|
2023-09-20 11:59:14 +00:00
|
|
|
methods: {
|
|
|
|
scanOrder() {
|
2024-07-04 03:22:41 +00:00
|
|
|
if (this.isPass !== 2) return this.$common.msgToast("护照资料还在审核中");
|
2024-10-21 02:00:09 +00:00
|
|
|
if (this.isPass !== 2 && this.isPass === 4)
|
|
|
|
return this.$common.msgToast("资料审核未通过请重新注册");
|
2024-06-28 08:09:48 +00:00
|
|
|
uni.removeStorageSync("scanlist");
|
2023-09-20 11:59:14 +00:00
|
|
|
uni.scanCode({
|
|
|
|
onlyFromCamera: false,
|
2024-06-28 08:09:48 +00:00
|
|
|
success: (res) => {
|
2023-09-20 11:59:14 +00:00
|
|
|
console.log("条码类型:" + res.scanType);
|
|
|
|
console.log("条码内容:" + res.result);
|
2023-09-22 06:35:58 +00:00
|
|
|
uni.navigateTo({
|
2024-06-28 08:09:48 +00:00
|
|
|
url: "/pages/scanFeedback/index?url=" + res.result,
|
2023-09-22 06:35:58 +00:00
|
|
|
});
|
2024-06-28 08:09:48 +00:00
|
|
|
},
|
2023-09-20 11:59:14 +00:00
|
|
|
});
|
2023-09-22 06:35:58 +00:00
|
|
|
},
|
|
|
|
async getAddress() {
|
|
|
|
const res = await this.$api.deposit.address();
|
|
|
|
console.log(res);
|
|
|
|
if (res.status === 0) {
|
|
|
|
this.addressList = res.data.data;
|
2024-12-12 03:13:18 +00:00
|
|
|
this.pddIsPass();
|
2023-09-22 06:35:58 +00:00
|
|
|
} else {
|
|
|
|
this.$common.msgToast(res.msg);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
goConsignmen() {
|
2024-07-04 03:22:41 +00:00
|
|
|
if (this.isPass !== 2) return this.$common.msgToast("护照资料还在审核中");
|
2024-10-21 02:00:09 +00:00
|
|
|
if (this.isPass !== 2 && this.isPass === 4)
|
|
|
|
return this.$common.msgToast("资料审核未通过请重新注册");
|
2023-09-22 06:35:58 +00:00
|
|
|
uni.navigateTo({
|
2024-06-28 08:09:48 +00:00
|
|
|
url: "/pages/consignment-painting/index",
|
2023-09-22 06:35:58 +00:00
|
|
|
});
|
2024-06-28 08:09:48 +00:00
|
|
|
},
|
|
|
|
async pddIsPass() {
|
|
|
|
const res = await this.$api.deposit.fddIsPass();
|
|
|
|
if (res.status === 0) {
|
|
|
|
this.isPass = res.data.fdd.status;
|
|
|
|
} else {
|
|
|
|
this.$common.msgToast(res.msg);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2023-09-20 11:59:14 +00:00
|
|
|
};
|
2023-09-19 02:50:09 +00:00
|
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
2023-09-20 11:59:14 +00:00
|
|
|
.main {
|
|
|
|
box-sizing: border-box;
|
|
|
|
height: 100vh;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
2023-09-23 06:59:54 +00:00
|
|
|
padding: 0 30rpx;
|
2023-09-25 12:59:40 +00:00
|
|
|
background-image: url("https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/4fdc9a0f-d72a-46b6-a04d-ed56d5465213.png");
|
2023-09-22 07:00:26 +00:00
|
|
|
|
2023-09-20 11:59:14 +00:00
|
|
|
.order {
|
|
|
|
width: 100%;
|
|
|
|
margin-top: 40rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
.order-item {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
width: 330rpx;
|
|
|
|
height: 208rpx;
|
|
|
|
border-radius: 20rpx;
|
|
|
|
background: #4e964d;
|
|
|
|
}
|
2024-06-28 08:09:48 +00:00
|
|
|
.disabled-div {
|
|
|
|
opacity: 0.5; /* 降低透明度 */
|
|
|
|
}
|
2023-09-20 11:59:14 +00:00
|
|
|
}
|
|
|
|
.list {
|
|
|
|
margin-top: 40rpx;
|
|
|
|
width: 100%;
|
|
|
|
border-radius: 20rpx;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 12rpx 20rpx;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
background: #fff;
|
|
|
|
font-size: 24rpx;
|
|
|
|
.list-item {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
color: #939393;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-19 02:50:09 +00:00
|
|
|
</style>
|