You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/news3/LogisticsInquiry.vue

168 lines
3.2 KiB

10 months ago
<template>
<view class="park">
<view class="park-navbar">
2 months ago
<!-- #ifndef H5 -->
<u-navbar title="物流查询" :border-bottom="false" :background="background"></u-navbar>
2 months ago
<!-- #endif -->
</view>
<view class="contentDes">
<u-field v-model="logisticsNum" label="物流单号" placeholder="请填写物流单号">
</u-field>
<view class="btnGroup">
<view class="btnItem" @click="scanCode" style="margin-right:35px;">
<image :src="$picUrl+'/static/news3/scan.png'" mode="widthFix"></image>
<text>扫码识别</text>
10 months ago
</view>
<view class="btnItem" style="margin-left:66upx;" @click="getClipboardData">
<image :src="$picUrl+'/static/news3/copy.png'" mode="widthFix"></image>
<text>粘贴单号</text>
10 months ago
</view>
</view>
</view>
9 months ago
<view class="footerBtn" :style="{'opacity': logisticsNum?1:0.6 }" @click="onCheck">
10 months ago
查快递
</view>
</view>
</template>
<script>
export default {
data() {
return {
background: {
background: `url(${this.$picUrl}/static/news/login-bg.png) center top no-repeat`,
backgroundSize: '100%',
},
9 months ago
logisticsNum: '',
10 months ago
};
},
9 months ago
methods: {
getClipboardData(value) {
uni.getClipboardData({
success: (res) => { // 获取成功回调
this.logisticsNum = res.data
}
});
},
scanCode() {
uni.scanCode({
success: (res) => {
9 months ago
this.logisticsNum = res.result;
9 months ago
},
fail: (res) => {
console.log(res)
uni.showToast({
title: '扫描失败',
icon: 'none'
})
}
})
},
onBack() {
uni.navigateBack({
delta: 1 // 表示返回到上一页(默认为1)
});
},
10 months ago
/**
9 months ago
* 查快递
10 months ago
*/
9 months ago
onCheck() {
if (!this.logisticsNum) {
return this.$toast('请输入物流单号')
}
10 months ago
uni.navigateTo({
9 months ago
url: "/pages/news3/LogisticsDetails?logisticsNum=" + this.logisticsNum
10 months ago
})
}
}
}
</script>
<style scoped lang="scss">
9 months ago
page {
background-color: #F7F8FA;
min-height: 100%;
9 months ago
height: 100%;
}
.park {
9 months ago
width: 100%;
background: url(https://www.royaum.com.cn/static/news/login-bg.png) center 0 no-repeat;
background-size: 100% auto;
min-height: 100vh;
10 months ago
}
9 months ago
.contentDes {
9 months ago
margin: 0upx 26upx;
9 months ago
background-color: #fff;
9 months ago
9 months ago
background: #FFFFFF;
border-radius: 6px 6px 6px 6px;
opacity: 1;
9 months ago
padding: 0 28upx;
9 months ago
}
.navBarContent {
9 months ago
height: 140upx;
line-height: 140upx;
9 months ago
text-align: center;
position: relative;
text {
font-size: 32upx;
10 months ago
font-family: PingFang SC, PingFang SC;
font-weight: 500;
9 months ago
color: #000;
10 months ago
}
9 months ago
}
::v-deep .u-field {
padding: 45rpx 28upx !important;
9 months ago
}
.btnGroup {
display: flex;
justify-content: flex-end;
padding: 44upx 40upx;
.btnItem {
display: flex;
align-items: center;
image {
width: 40upx;
height: auto;
}
text {
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3B3B3B;
margin-left: 20upx;
}
}
}
.footerBtn {
9 months ago
width: 86%;
9 months ago
height: 98upx;
9 months ago
background: #FF5050;
9 months ago
border-radius: 6px;
9 months ago
opacity: 1;
9 months ago
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
9 months ago
line-height: 98upx;
9 months ago
text-align: center;
9 months ago
margin: 96upx auto 0 auto;
10 months ago
}
</style>