|
|
@@ -1,13 +1,9 @@
|
|
|
export default {
|
|
|
- async scan() {
|
|
|
- const ret = { scanType: 'QR_CODE', query: {}, path: '' }
|
|
|
+ async scan<T>() {
|
|
|
+ const ret = { scanType: 'QR_CODE', query: {} as T, path: '' }
|
|
|
// #ifdef H5
|
|
|
// debug模式模拟 扫码信息
|
|
|
if (store.common.data.debug) {
|
|
|
- ret.query = {
|
|
|
- cashierId: '710613333157822464',
|
|
|
- gasstationId: '710613333157822464',
|
|
|
- }
|
|
|
return ret
|
|
|
}
|
|
|
// #endif
|
|
|
@@ -34,7 +30,7 @@ export default {
|
|
|
if (scanRes.scanType === 'WX_CODE') {
|
|
|
ret.scanType = 'WX_CODE'
|
|
|
const pqo = func.getPQ(scanRes.path)
|
|
|
- ret.query = pqo.query
|
|
|
+ ret.query = pqo.query as T
|
|
|
ret.path = pqo.page
|
|
|
}
|
|
|
return ret
|