|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<view style="width:100%;position: fixed;top:0;z-index:99">
|
|
|
|
<view class="navBarContent">
|
|
|
|
<u-icon name="arrow-left" @click="onBack"
|
|
|
|
style="position: absolute;top:50%;left:40upx;transform: translateY(-50%);" color="#000" size="35">
|
|
|
|
</u-icon>
|
|
|
|
<text>物流查询</text>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<image :src="$picUrl+'/static/news3/walletBg.png'" mode="widthFix" class="bgImg"></image>
|
|
|
|
<view class="contentDes">
|
|
|
|
<u-field v-model="logisticsNum" label="物流单号" placeholder="请填写物流单号">
|
|
|
|
</u-field>
|
|
|
|
<view class="btnGroup">
|
|
|
|
<view class="btnItem" @click="scanCode">
|
|
|
|
<image :src="$picUrl+'/static/news3/scan.png'" mode="widthFix"></image>
|
|
|
|
<text>扫码识别</text>
|
|
|
|
</view>
|
|
|
|
<view class="btnItem" style="margin-left:66upx;" @click="getClipboardData">
|
|
|
|
<image :src="$picUrl+'/static/news3/copy.png'" mode="widthFix"></image>
|
|
|
|
<text>粘贴单号</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="footerBtn" :style="{'opacity': logisticsNum?1:0.6 }" @click="onCheck">
|
|
|
|
查快递
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
logisticsNum: '',
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
getClipboardData(value) {
|
|
|
|
uni.getClipboardData({
|
|
|
|
success: (res) => { // 获取成功回调
|
|
|
|
this.logisticsNum = res.data
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
scanCode() {
|
|
|
|
uni.scanCode({
|
|
|
|
success: (res) => {
|
|
|
|
this.logisticsNum = res.result;
|
|
|
|
},
|
|
|
|
fail: (res) => {
|
|
|
|
console.log(res)
|
|
|
|
uni.showToast({
|
|
|
|
title: '扫描失败',
|
|
|
|
icon: 'none'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
onBack() {
|
|
|
|
uni.navigateBack({
|
|
|
|
delta: 1 // 表示返回到上一页(默认为1)
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 查快递
|
|
|
|
*/
|
|
|
|
onCheck() {
|
|
|
|
if (!this.logisticsNum) {
|
|
|
|
return this.$toast('请输入物流单号')
|
|
|
|
}
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/news3/LogisticsDetails?logisticsNum=" + this.logisticsNum
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
page {
|
|
|
|
background-color: #F7F8FA;
|
|
|
|
min-height: 100%;
|
|
|
|
padding-bottom: 140upx;
|
|
|
|
padding-top: 130upx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.bgImg {
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentDes {
|
|
|
|
position: relative;
|
|
|
|
z-index: 2;
|
|
|
|
margin: 0upx 26upx;
|
|
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
border-radius: 6px 6px 6px 6px;
|
|
|
|
opacity: 1;
|
|
|
|
padding: 0 28upx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.navBarContent {
|
|
|
|
height: 88upx;
|
|
|
|
line-height: 88upx;
|
|
|
|
text-align: center;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
text {
|
|
|
|
font-size: 32upx;
|
|
|
|
font-family: PingFang SC, PingFang SC;
|
|
|
|
font-weight: 500;
|
|
|
|
color: #000;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
::v-deep .u-field {
|
|
|
|
padding: 30upx 10upx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.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 {
|
|
|
|
width: 86%;
|
|
|
|
height: 88upx;
|
|
|
|
background: #FF5050;
|
|
|
|
border-radius: 36px 36px 36px 36px;
|
|
|
|
opacity: 1;
|
|
|
|
font-size: 28upx;
|
|
|
|
font-family: PingFang SC, PingFang SC;
|
|
|
|
font-weight: 500;
|
|
|
|
color: #FFFFFF;
|
|
|
|
line-height: 88upx;
|
|
|
|
text-align: center;
|
|
|
|
margin: 96upx auto 0 auto;
|
|
|
|
}
|
|
|
|
</style>
|