123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <template>
- <view class="app-content">
- <view class="nav">
- <liu-search @fall="fall" :historyList="historyList" @input="input" @change="change"
- @changes='changes'></liu-search>
- </view>
- <!-- 提示信息和下拉弹窗 -->
- <mask-model :headername="headername" :typeShow="typeShow" :tabname="tabname" ref="showMask" btnType="1"
- @confirm="confirm" @cancel="cancel" titleColoe="#666666" cancelColor="#666666" confirmColor="#007AFF"
- :maskTitle="maskTitle"></mask-model>
- </view>
- </template>
- <script>
- import Nav from '../../components/header/nav.vue'
- import maskModel from '../../components/mask-model/mask-model.vue'
- export default {
- data() {
- return {
- historyList: [],
- maskTitle: '请核对录入的航班号或行李号是否正确',
- tabname: '', //按钮名称
- typeShow: true,
- headername: '请核对信息',
- value:null
- }
- },
- created(option) {},
- onLoad() {},
- onUnload() {},
- onShow() {
- uni.$on("scancodemsg", (data) => {
- if (data.msg.length > 9) {
- uni.navigateTo({
- url: "/pages/detail/index?luggageNum=" + Number(data.msg)
- })
- }
- });
- },
- mounted() {
- uni.$off("scancodemsg");
- },
- components: {
- Nav
- },
- methods: {
- fall() {
- uni.navigateBack({
- delta: 1
- })
- },
- changes() {
- // uni.redirectTo({
- // url: "/pages/myrecords/index"
- // })
- },
- //搜索内容
- change(e) {
- this.value = e
- this.typeShow = false
- this.maskTitle = '请核对录入的行李号是否正确'
- this.headername = '请核对信息'
- this.$refs.showMask.show();
- },
- confirm: function() { //确定按钮
- this.$storage.remove('searchData');
- if(this.value.length>9){
- uni.navigateTo({
- url: "/pages/detail/index?luggageNum=" + Number(this.value)
- })
- }
- else{
- this.$storage.set('searchData',this.value);
- uni.switchTab({
- url: "/pages/index/index"
- })
- }
- },
- cancel(){},
- //input事件
- input(e) {
- console.log('搜索框输入的内容:' + e)
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .app-content {
- >.nav {
- width: 100%;
- position: relative;
- display: flex;
- margin-top: 1.875rem;
- >.log {
- width: .375rem;
- height: .75rem;
- font-size: .75rem;
- position: absolute;
- left: 1.5rem;
- background: url('../../static/ico@1x.png') no-repeat;
- background-size: 100% 100%;
- }
- }
- }
- </style>
|