| | |
| | | <template> |
| | | <view > |
| | | <scroll-view scroll-y catch:touchmove="touchmove"> |
| | | <view class="square-2"> |
| | | <!-- <view class="square-2"> |
| | | <view class="square-title"> |
| | | <view class="title-sign"><view class="sign"></view></view> |
| | | <view class="title-text"><text>通道</text></view> |
| | |
| | | <uni-combox emptyTips="暂无数据" :candidates="staNoList" v-model="staNo" placeholder="通道"></uni-combox> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="square-2"> |
| | | <view class="square-title"> |
| | | <view class="title-sign"><view class="sign"></view></view> |
| | |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input readonly="value" v-model="locNo" type="text" placeholder="扫码 / 输入" |
| | | :focus="locNoFocus" > |
| | | :focus="locNoFocus" @input="nextInput('userIdFocus')"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="remove('locNo')"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="square-content"> |
| | | <view class="content-input"> |
| | | <input v-model="userId" type="text" placeholder="扫码 / 输入" |
| | | :focus="userIdFocus"> |
| | | :focus="userIdFocus" @input="nextInput('barcodeFocus')"> |
| | | <uni-icons type="closeempty" size="20" color="#dadada" @click="remove('userId')"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | type: 'center', |
| | | msgType: 'success', |
| | | messageText: '这是一条成功提示', |
| | | staNoList:[1,2,3,4,5,6], |
| | | staNoList:[1,2,3,4,5,6,7,8], |
| | | staNo:'', |
| | | locNoFocus:true, |
| | | userIdFocus:false, |
| | |
| | | getUrl() { |
| | | this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl |
| | | }, |
| | | focuss(e) { |
| | | this[e] = false; |
| | | setTimeout(()=>{ |
| | | this[e] = true; |
| | | }, 100); |
| | | }, |
| | | locNoFocuss() { |
| | | // #ifdef APP |
| | | let that = this; |
| | | that.locNoFocus = false; |
| | | setTimeout(()=>{ |
| | | that.remove('locNo') |
| | | that.locNoFocus = true; |
| | | }, 100); |
| | | // #endif |
| | | |
| | | }, |
| | | |
| | | userIdFocuss() { |
| | | let that = this; |
| | | that.userIdFocus = false; |
| | | setTimeout(()=>{ |
| | | that.userIdFocus = true; |
| | | }, 100); |
| | | }, |
| | | barcodeFocuss() { |
| | | let that = this; |
| | | that.barcodeFocus = false; |
| | | setTimeout(()=>{ |
| | | that.barcodeFocus = true; |
| | | }, 100); |
| | | }, |
| | | nextInput(type) { |
| | | this.focuss(type) |
| | | // switch (obj) { |
| | | // case 'locNo': |
| | | // this.userIdFocuss(); |
| | | // break; |
| | | // case 'userId': |
| | | // this.barcodeFocuss(); |
| | | // break; |
| | | // } |
| | | }, |
| | | // 清空input |
| | | remove(e) { |
| | | this[e] = '' |
| | |
| | | this.locNo = '' |
| | | this.userId = '' |
| | | this.barcode = '' |
| | | this.locNoFocuss() |
| | | }, |
| | | // 确认 |
| | | confirm() { |
| | |
| | | uni.request({ |
| | | url: that.commonUrl + '/mobile/test/startUp/auth', |
| | | data: { |
| | | channel:that.staNo, |
| | | // channel:that.staNo, |
| | | locNo:that.locNo, |
| | | userId:that.userId, |
| | | barcode:that.barcode |