You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
3.2 KiB
Vue

1 year ago
<template>
1 year ago
<view class="main">
1 year ago
<title-block style="flex-shrink: 0;width: 100%" title="寄存"></title-block>
1 year ago
<view class="order" @click="goConsignmen">
1 year ago
<view class="order-item">
<image src="@/static/image/write.png" mode="scaleToFill" style="width: 63rpx;height: 62rpx" />
<view style="color: #fff;margin-top:10rpx">填写下单</view>
</view>
1 year ago
<view class="order-item" style="background:#76C458;" @click.stop="scanOrder">
1 year ago
<image src="@/static/image/scan.png" mode="scaleToFill" style="width: 57rpx;height: 57rpx" />
1 year ago
<view style="color: #fff;margin-top:10rpx">扫码下单</view>
1 year ago
</view>
</view>
<view class="list">
<view style="color: #76C458">目前可用寄存仓库地址</view>
<u-divider :dashed="true" lineColor="#4E964D"></u-divider>
1 year ago
<view v-for="(item,index) in addressList" :key="item.ID">
<view class="list-item">
<view>{{item.address}}</view>
1 year ago
<view>剩余{{item.leftNum}}位置</view>
1 year ago
</view>
<u-divider :dashed="true" lineColor="#4E964D" v-if="index !== addressList.length-1"></u-divider>
1 year ago
</view>
</view>
<tabbar :current="0"></tabbar>
</view>
1 year ago
</template>
<script>
1 year ago
import tabbar from "../../components/uiq-tabbar/uiq-tabbar.vue";
1 year ago
export default {
name: "index",
onLoad() {
1 year ago
uni.hideTabBar();
1 year ago
},
1 year ago
onShow() {
this.getAddress();
},
1 year ago
components: {
1 year ago
tabbar
1 year ago
},
1 year ago
data() {
return {
addressList: []
};
},
1 year ago
methods: {
scanOrder() {
6 months ago
uni.removeStorageSync('scanlist')
1 year ago
uni.scanCode({
onlyFromCamera: false,
success: res => {
console.log("条码类型:" + res.scanType);
console.log("条码内容:" + res.result);
1 year ago
uni.navigateTo({
6 months ago
url: "/pages/scanFeedback/index?url=" + res.result
1 year ago
});
1 year ago
}
});
1 year ago
},
async getAddress() {
const res = await this.$api.deposit.address();
console.log(res);
if (res.status === 0) {
this.addressList = res.data.data;
} else {
this.$common.msgToast(res.msg);
}
},
goConsignmen() {
uni.navigateTo({
url: "/pages/consignment-painting/index"
});
1 year ago
}
1 year ago
}
1 year ago
};
1 year ago
</script>
<style scoped lang="scss">
1 year ago
.main {
box-sizing: border-box;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
1 year ago
padding: 0 30rpx;
1 year ago
background-image: url("https://cdns.fontree.cn/fonchain-main/prod/image/default/artwork/4fdc9a0f-d72a-46b6-a04d-ed56d5465213.png");
1 year ago
1 year ago
.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;
}
}
.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;
}
}
}
1 year ago
</style>