Commit 2d4bc7ae authored by 张伯涛's avatar 张伯涛

扫码获取参数,以及拍照token传参

parent 6f81b601
...@@ -8,15 +8,17 @@ ...@@ -8,15 +8,17 @@
<el-button type="primary" @click="handleOutbound">出库</el-button> <el-button type="primary" @click="handleOutbound">出库</el-button>
<el-button type="primary">入库</el-button> <el-button type="primary">入库</el-button>
</div> </div>
<div>扫码获取:<span>{{scanCode}}</span></div>
</div> </div>
</template> </template>
<script> <script>
import { getToken } from '@/utils/auth'
export default { export default {
name: 'Index', name: 'Index',
data() { data() {
return { return {
scanCode: '',
} }
}, },
created() { created() {
...@@ -27,14 +29,16 @@ export default { ...@@ -27,14 +29,16 @@ export default {
flag: 'openScan' flag: 'openScan'
} }
this.$WebView.openScan(params).then(res => { this.$WebView.openScan(params).then(res => {
this.scanCode = res
console.log('提交后结果', res) console.log('提交后结果', res)
}) })
}, },
/** 拍照按钮*/ /** 拍照按钮*/
handleTakePhotos() { handleTakePhotos() {
console.log('调用前') console.log('调用前',getToken())
const params = { const params = {
flag: 'openCamera' flag: 'openCamera',
tokenMsg: getToken()
} }
this.$WebView.openCamera(params).then(res => { this.$WebView.openCamera(params).then(res => {
console.log('拍照', res) console.log('拍照', res)
......
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