Commit 64943f7a authored by 张伯涛's avatar 张伯涛

测试

parent e2aeb4e8
......@@ -8,10 +8,10 @@ export const openCamera = (params) => {
})
})
}
// 存储数据
export const saveLocationData = (params) => {
// 扫码
export const openScan = (params) => {
return new Promise(resolve => {
DS_BRIDGE.call('saveLocationData', params, res => {
DS_BRIDGE.call('openScan', params, res => {
resolve(res)
})
})
......@@ -19,5 +19,5 @@ export const saveLocationData = (params) => {
export const WebView = {
openCamera,
saveLocationData
openScan
}
......@@ -24,10 +24,9 @@ export default {
methods: {
handleTest() {
const params = {
name: 'ceshi1312',
content: 'aaaaaaa'
flag: 'openScan'
}
this.$WebView.saveLocationData(params).then(res => {
this.$WebView.openScan(params).then(res => {
console.log('提交后结果', res)
})
},
......@@ -35,8 +34,7 @@ export default {
handleTakePhotos() {
console.log('调用前')
const params = {
name: 'ceshi1312',
content: 'aaaaaaa'
flag: 'openCamera'
}
this.$WebView.openCamera(params).then(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