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

174 lines
3.3 KiB

10 months ago
<template>
<view>
<view style="width:100%;position: fixed;top:0;z-index:99">
9 months ago
<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>
10 months ago
</view>
10 months ago
<image :src="$picUrl+'/static/news3/walletBg.png'" mode="widthFix" class="bgImg"></image>
10 months ago
<view class="contentDes">
9 months ago
<u-field v-model="logisticsNum" label="物流单号" placeholder="请填写物流单号">
10 months ago
</u-field>
<view class="btnGroup">
9 months ago
<view class="btnItem" @click="scanCode">
10 months ago
<image :src="$picUrl+'/static/news3/scan.png'" mode="widthFix"></image>
10 months ago
<text>扫码识别</text>
</view>
9 months ago
<view class="btnItem" style="margin-left:66upx;" @click="getClipboardData">
10 months ago
<image :src="$picUrl+'/static/news3/copy.png'" mode="widthFix"></image>
10 months ago
<text>粘贴单号</text>
</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 {
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%;
padding-bottom: 140upx;
padding-top: 230upx;
10 months ago
}
9 months ago
.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;
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: 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 {
9 months ago
width: 86%;
height: 88upx;
9 months ago
background: #FF5050;
9 months ago
border-radius: 36px 36px 36px 36px;
opacity: 1;
9 months ago
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
9 months ago
line-height: 88upx;
9 months ago
text-align: center;
9 months ago
margin: 96upx auto 0 auto;
10 months ago
}
</style>