mirror of
https://gitee.com/bootx/dax-pay-h5
synced 2026-08-11 07:05:34 +08:00
H5端扫码增加安全控制:只能在草稿/驳回状态使用、防止越权访问
This commit is contained in:
@@ -13,16 +13,15 @@ export function findAllProvinceAndCityAndArea() {
|
||||
/**
|
||||
* 提交进件申请
|
||||
*/
|
||||
export function submit(id, headers) {
|
||||
export function submit(id, sign, headers) {
|
||||
return http.request({
|
||||
url: '/onb/mch/apply/submit',
|
||||
method: 'post',
|
||||
params: { id },
|
||||
params: { id, sign },
|
||||
headers,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 身份证OCR
|
||||
*/
|
||||
|
||||
@@ -12,11 +12,11 @@ import type {
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
export function findById(id, headers) {
|
||||
export function findById(id, sign, headers) {
|
||||
return http.request<Result<MerchantApply>>({
|
||||
method: 'get',
|
||||
url: '/hkrt/onb/apply/findById',
|
||||
params: { id },
|
||||
url: '/hkrt/onb/apply/h5/findById',
|
||||
params: { id, sign },
|
||||
headers,
|
||||
})
|
||||
}
|
||||
@@ -24,11 +24,12 @@ export function findById(id, headers) {
|
||||
/**
|
||||
* 保存信息
|
||||
*/
|
||||
export function save(param: MerchantApply, headers) {
|
||||
export function save(param: MerchantApply, sign, headers) {
|
||||
return http.request<Result<void>>({
|
||||
method: 'post',
|
||||
url: '/hkrt/onb/apply/save',
|
||||
url: '/hkrt/onb/apply/h5/save',
|
||||
data: param,
|
||||
params: { sign },
|
||||
headers,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ import type { WebHeaders } from '#/web'
|
||||
import router from '@/router'
|
||||
|
||||
const route = useRoute()
|
||||
const { id: applyId, token } = route.query
|
||||
const { id: applyId, sign, token } = route.query
|
||||
// 请求头信息
|
||||
const headers = {
|
||||
'AccessToken': token,
|
||||
@@ -667,7 +667,11 @@ function initData() {
|
||||
* 获取数据
|
||||
*/
|
||||
function getInfo() {
|
||||
findById(applyId, headers).then(({ data }) => {
|
||||
findById(applyId, sign, headers).then(({ code, data, msg }) => {
|
||||
if (code !== 0) {
|
||||
router.replace({ name: 'payFail', query: { msg, title: '获取信息失败' } })
|
||||
return
|
||||
}
|
||||
form.value = data
|
||||
})
|
||||
}
|
||||
@@ -698,7 +702,7 @@ function nextClick() {
|
||||
*/
|
||||
function saveTemp() {
|
||||
loading.value = true
|
||||
save(form.value, headers).then(({ code, msg }) => {
|
||||
save(form.value, sign, headers).then(({ code, msg }) => {
|
||||
if (code !== 0) {
|
||||
showNotify({ type: 'danger', message: msg })
|
||||
}
|
||||
@@ -717,7 +721,7 @@ function submitClick() {
|
||||
.validate()
|
||||
.then(() => {
|
||||
// 执行下一步操作
|
||||
submit(form.value.applyId, headers).then(({ code, data }) => {
|
||||
submit(form.value.applyId, sign, headers).then(({ code, data }) => {
|
||||
if (code !== 0) {
|
||||
showNotify({ type: 'danger', message: data })
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ import type {
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
export function findById(id, headers) {
|
||||
export function findById(id, sign, headers) {
|
||||
return http.request<Result<MerchantApply>>({
|
||||
method: 'get',
|
||||
url: '/leshua/onb/apply/findById',
|
||||
params: { id },
|
||||
url: '/leshua/onb/apply/h5/findById',
|
||||
params: { id, sign },
|
||||
headers,
|
||||
})
|
||||
}
|
||||
@@ -24,11 +24,12 @@ export function findById(id, headers) {
|
||||
/**
|
||||
* 保存信息
|
||||
*/
|
||||
export function save(param: MerchantApply, headers) {
|
||||
export function save(param: MerchantApply, sign, headers) {
|
||||
return http.request<Result<void>>({
|
||||
method: 'post',
|
||||
url: '/leshua/onb/apply/save',
|
||||
url: '/leshua/onb/apply/h5/save',
|
||||
data: param,
|
||||
params: { sign },
|
||||
headers,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ import type { WebHeaders } from '#/web'
|
||||
import router from '@/router'
|
||||
|
||||
const route = useRoute()
|
||||
const { id: applyId, token } = route.query
|
||||
const { id: applyId, sign, token } = route.query
|
||||
// 请求头信息
|
||||
const headers = {
|
||||
'AccessToken': token,
|
||||
@@ -634,7 +634,11 @@ function initData() {
|
||||
* 获取数据
|
||||
*/
|
||||
function getInfo() {
|
||||
findById(applyId, headers).then(({ data }) => {
|
||||
findById(applyId, sign, headers).then(({ code, data, msg }) => {
|
||||
if (code !== 0) {
|
||||
router.replace({ name: 'payFail', query: { msg, title: '获取信息失败' } })
|
||||
return
|
||||
}
|
||||
form.value = data
|
||||
})
|
||||
}
|
||||
@@ -665,7 +669,7 @@ function nextClick() {
|
||||
*/
|
||||
function saveTemp() {
|
||||
loading.value = true
|
||||
save(form.value, headers).then(({ code, msg }) => {
|
||||
save(form.value, sign, headers).then(({ code, msg }) => {
|
||||
if (code !== 0) {
|
||||
showNotify({ type: 'danger', message: msg })
|
||||
}
|
||||
@@ -684,7 +688,7 @@ function submitClick() {
|
||||
.validate()
|
||||
.then(() => {
|
||||
// 执行下一步操作
|
||||
submit(form.value.applyId, headers).then(({ code, data }) => {
|
||||
submit(form.value.applyId, sign, headers).then(({ code, data }) => {
|
||||
if (code !== 0) {
|
||||
showNotify({ type: 'danger', message: data })
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ import type {
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
export function findById(id, headers) {
|
||||
export function findById(id, sign, headers) {
|
||||
return http.request<Result<MerchantApply>>({
|
||||
method: 'get',
|
||||
url: '/vbill/onb/apply/findById',
|
||||
params: { id },
|
||||
url: '/vbill/onb/apply/h5/findById',
|
||||
params: { id, sign },
|
||||
headers,
|
||||
})
|
||||
}
|
||||
@@ -24,11 +24,12 @@ export function findById(id, headers) {
|
||||
/**
|
||||
* 保存信息
|
||||
*/
|
||||
export function save(param: MerchantApply, headers) {
|
||||
export function save(param: MerchantApply, sign, headers) {
|
||||
return http.request<Result<void>>({
|
||||
method: 'post',
|
||||
url: '/vbill/onb/apply/save',
|
||||
url: '/vbill/onb/apply/h5/save',
|
||||
data: param,
|
||||
params: { sign },
|
||||
headers,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ import type { WebHeaders } from '#/web'
|
||||
import router from '@/router'
|
||||
|
||||
const route = useRoute()
|
||||
const { id: applyId, token } = route.query
|
||||
const { id: applyId, sign, token } = route.query
|
||||
// 请求头信息
|
||||
const headers = {
|
||||
'AccessToken': token,
|
||||
@@ -756,7 +756,11 @@ function initData() {
|
||||
* 获取数据
|
||||
*/
|
||||
function getInfo() {
|
||||
findById(applyId, headers).then(({ data }) => {
|
||||
findById(applyId, sign, headers).then(({ code, data, msg }) => {
|
||||
if (code !== 0) {
|
||||
router.replace({ name: 'payFail', query: { msg, title: '获取信息失败' } })
|
||||
return
|
||||
}
|
||||
form.value = data
|
||||
})
|
||||
}
|
||||
@@ -787,7 +791,7 @@ function nextClick() {
|
||||
*/
|
||||
function saveTemp() {
|
||||
loading.value = true
|
||||
save(form.value, headers).then(({ code, msg }) => {
|
||||
save(form.value, sign, headers).then(({ code, msg }) => {
|
||||
if (code !== 0) {
|
||||
showNotify({ type: 'danger', message: msg })
|
||||
}
|
||||
@@ -806,7 +810,7 @@ function submitClick() {
|
||||
.validate()
|
||||
.then(() => {
|
||||
// 执行下一步操作
|
||||
submit(form.value.applyId, headers).then(({ code, data }) => {
|
||||
submit(form.value.applyId, sign, headers).then(({ code, data }) => {
|
||||
if (code !== 0) {
|
||||
showNotify({ type: 'danger', message: data })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user