mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-10-17 07:53:43 +08:00
更新一些便捷操作
This commit is contained in:
@@ -53,11 +53,11 @@
|
||||
})()
|
||||
},
|
||||
edit: function () {
|
||||
const cid = this.getAttribute("data-cid")
|
||||
const cid = this.getAttribute("data-cid");
|
||||
layer.open({
|
||||
id: 'iframe-channel-edit',
|
||||
type: 2,
|
||||
title: '添加收款终端',
|
||||
title: '修改终端',
|
||||
shade: 0.1,
|
||||
area: [common.isModile() ? '80%' : '400px', common.isModile() ? '70%' : '300px'],
|
||||
content: `/PayManage/editChannel?cid=${cid}`,
|
||||
@@ -74,6 +74,24 @@
|
||||
content: `/PayManage/addChannel?aid=${aid}`,
|
||||
});
|
||||
},
|
||||
delete: function () {
|
||||
const cid = this.getAttribute("data-cid");
|
||||
layer.confirm('确定删除终端?', { icon: 3, title: '提示' },
|
||||
function (index) {
|
||||
fetch('/api/PayManage/delChannel', { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ id: cid }) })
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
layer.msg(res.msg, { icon: 1, time: 1200 }, function () {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2, time: 1200 });
|
||||
}
|
||||
})
|
||||
layer.close(index);
|
||||
});
|
||||
},
|
||||
});
|
||||
// 工具
|
||||
let channel = {};
|
||||
@@ -89,7 +107,10 @@
|
||||
<a href="javascript:;" class="layui-font-blue" lay-on="getQrcode"data-qrcode="${item.qrcode}"><span class="icon pear-icon"></span></a><br>
|
||||
<span class="layui-badge layui-bg-cyan">最后使用</span><span class="layui-badge layui-bg-gray">${item.last_time}</span><br>
|
||||
<span class="layui-badge layui-bg-cyan">启用状态</span><span class="layui-badge layui-bg-${item.state == 1 ? 'green' : 'gray'}">${item.state == 1 ? '启用' : '禁用'}</span><br>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-radius layui-border-green layui-btn-sm edit" lay-on="edit" data-cid="${item.id}"><span class="icon pear-icon"></span>修改</button>
|
||||
<div class="layui-btn-group edit">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-on="edit" data-cid="${item.id}"><span class="icon pear-icon"></span></button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-on="delete" data-cid="${item.id}"><span class="icon pear-icon"></span></button>
|
||||
</div>
|
||||
</div>`;
|
||||
card.innerHTML = htmlstr;
|
||||
return card;
|
||||
|
@@ -60,9 +60,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">查询参数</label>
|
||||
<label class="layui-form-label">查询参数
|
||||
<a href="https://www.jyshare.com/front-end/53/" class="layui-font-blue" style="float: right;" target="_blank">
|
||||
<span class="layui-font-gray">JSON工具 </span><span class="icon pear-icon"></span>
|
||||
</a>
|
||||
</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="params" placeholder="账号订单查询自定义参数,JSON格式,没有请填 { } " class="layui-textarea"></textarea>
|
||||
<textarea name="params" placeholder="账号订单查询自定义参数,JSON格式,没有请勿填写!"
|
||||
class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,6 +116,7 @@
|
||||
let field = obj.field;
|
||||
field.state = 'state' in field ? 1 : 0;
|
||||
field.id = '<?php echo $id ?>';
|
||||
field.params = field.params === '' ? '{}' : field.params;
|
||||
(async () => {
|
||||
const url = '/api/PayManage/editAccount';
|
||||
const info = field;
|
||||
|
Reference in New Issue
Block a user