Commit c8be89c0 authored by Facius's avatar Facius

fix: 【ID1001316】 【小程序-首页-绑卡方式】:扫描非学习卡条码,相机拍摄页面未提示:未成功识别相关信息

parent 333cdde1
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
>手动输入卡号、密码绑定</view >手动输入卡号、密码绑定</view
> >
</view> </view>
<view>
<u-toast ref="uToast" />
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -91,7 +94,7 @@ export default { ...@@ -91,7 +94,7 @@ export default {
onlyFromCamera: true, onlyFromCamera: true,
success: (res) => { success: (res) => {
console.log(res) console.log(res)
if (res.result) { if (res.result && res.result.length == 15 + 8) {
this.$u.route({ this.$u.route({
url: 'pages/learn/boundTest', url: 'pages/learn/boundTest',
params: { params: {
...@@ -99,8 +102,22 @@ export default { ...@@ -99,8 +102,22 @@ export default {
// relationId: this.relationId, // relationId: this.relationId,
}, },
}) })
} else {
this.$refs.uToast.show({
title: '未成功识别相关信息',
type: 'error',
duration: 2000,
})
} }
}, },
fail: (err) => {
console.log(err)
this.$refs.uToast.show({
title: '未成功识别相关信息',
type: 'error',
duration: 2000,
})
},
}) })
}, },
handleClickBuy() { handleClickBuy() {
......
...@@ -15,10 +15,11 @@ ...@@ -15,10 +15,11 @@
<view class="content-view"> <view class="content-view">
<view class="field-title">学习卡卡号</view> <view class="field-title">学习卡卡号</view>
<view class="field-view"> <view class="field-view">
<input <u-input
type="number" type="number"
class="input-view" class="input-view"
:value="code" v-model="code"
input-align="center"
placeholder="请输入卡号" placeholder="请输入卡号"
:placeholder-style="placeplaceholderStyle" :placeholder-style="placeplaceholderStyle"
cursor-spacing="140" cursor-spacing="140"
...@@ -28,10 +29,11 @@ ...@@ -28,10 +29,11 @@
</view> </view>
<view class="field-title">学习卡密码</view> <view class="field-title">学习卡密码</view>
<view class="field-view"> <view class="field-view">
<input <u-input
class="input-view" class="input-view"
password password
:value="password" input-align="center"
v-model="password"
placeholder="请输入密码" placeholder="请输入密码"
:placeholder-style="placeplaceholderStyle" :placeholder-style="placeplaceholderStyle"
cursor-spacing="140" cursor-spacing="140"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment