mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-11-14 22:53:43 +08:00
后台添加支付测试功能
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">查询参数</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="params" placeholder="账号订单查询自定义参数,JSON格式,没有请填 { } " class="layui-textarea"></textarea>
|
||||
|
||||
@@ -74,6 +74,10 @@
|
||||
<i class="layui-icon layui-icon-delete"></i>
|
||||
删除
|
||||
</button>
|
||||
<button class="pear-btn pear-btn-warming pear-btn-md" lay-event="testPay">
|
||||
<i class="layui-icon layui-icon-cart"></i>
|
||||
支付测试
|
||||
</button>
|
||||
</script>
|
||||
<script type="text/html" id="account-state">
|
||||
<input type="checkbox" name="state" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" lay-filter="accountEnable" {{ d.state == 1 ? 'checked' : '' }} />
|
||||
@@ -98,7 +102,7 @@
|
||||
select.innerHTML = option_str;
|
||||
form.render('select');
|
||||
})()
|
||||
|
||||
|
||||
let cols = [[
|
||||
{ type: 'checkbox' },
|
||||
{ title: '平 台', field: 'platform', align: 'center', templet: '' },
|
||||
@@ -154,6 +158,8 @@
|
||||
httpJSON('/api/PayManage/delAccount', { ids: select_id })
|
||||
layer.close(index);
|
||||
});
|
||||
} else if (obj.event === 'testPay') {
|
||||
account.testPay();
|
||||
}
|
||||
});
|
||||
// 表单自定义事件监听
|
||||
@@ -237,6 +243,17 @@
|
||||
layer.msg(rec_info.msg, { icon: 2, time: 1200 }, () => { obj.elem.checked = !obj.elem.checked });
|
||||
}
|
||||
}
|
||||
// 支付测试
|
||||
account.testPay = function () {
|
||||
layer.open({
|
||||
id: 'iframe-test-pay',
|
||||
type: 2,
|
||||
title: '支付测试',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '100%' : '480px', common.isModile() ? '100%' : '320px'],
|
||||
content: `/Order/testPay`,
|
||||
});
|
||||
}
|
||||
// 请求封装
|
||||
async function httpJSON(url, info) {
|
||||
const res = await fetch(url, { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(info) });
|
||||
|
||||
Reference in New Issue
Block a user