244 lines
11 KiB
HTML
244 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
|
<link href="/jscss/style.css" rel="stylesheet" type="text/css" />
|
|
<script type="text/javascript" charset="utf-8" src="/jscss/theme.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-24 col-sm-12 col-md-8 px2 py2">
|
|
<fieldset class="tips">
|
|
<legend>服务图片设置</legend>
|
|
<div>
|
|
<form>
|
|
<div class="char6 row">
|
|
<div class="ciy-form col-24 col-sm-24 top">
|
|
<label class="lang">服务商客服码</label>
|
|
<div>
|
|
<ciy-upload com="serviceimg" num="1" type="jpg,png" />
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<div class="txt-center">
|
|
<button type="button" class="btn lg" onclick="editserv(this)">更新</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-24 col-sm-12 col-md-8 px2 py2">
|
|
<fieldset class="tips">
|
|
<legend>收款账号设置</legend>
|
|
<div>
|
|
<form>
|
|
<div class="char6 row">
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">收款账号类型</label>
|
|
<div>
|
|
<ciy-radio com="recvtype" />
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">收款账号</label>
|
|
<div>
|
|
<input type="text" name="recvaccount" style="width:100%;" />
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">收款账号名</label>
|
|
<div>
|
|
<input type="text" name="recvname" style="width:100%;" />
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<div class="txt-center">
|
|
<button type="button" class="btn lg" onclick="editrecv(this)">设置</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-24 col-sm-12 col-md-8 px2 py2">
|
|
<fieldset class="tips">
|
|
<legend>API接入设置</legend>
|
|
<div>
|
|
<form>
|
|
<div class="char6 row">
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">appid</label>
|
|
<div>
|
|
<input type="text" name="ali_appid" style="width:100%;" />
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">PubKey</label>
|
|
<div>
|
|
<input type="file" id="pubkey" />
|
|
<br />appCertPublicKey_[num].crt
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">RootCert</label>
|
|
<div>
|
|
<input type="file" id="rootkey" />
|
|
<br />alipayRootCert.crt
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">PubRSA2</label>
|
|
<div>
|
|
<input type="file" id="apppub" />
|
|
<br />alipayCertPublicKey_RSA2.crt
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<label class="lang">PriKey</label>
|
|
<div>
|
|
<input type="file" id="apppri" />
|
|
<br />应用私钥RSA2048*.txt
|
|
</div>
|
|
</div>
|
|
<div class="ciy-form col-24 col-sm-24">
|
|
<div class="txt-center">
|
|
<button type="button" class="btn lg" onclick="editapp(this)">设置</button>
|
|
<button type="button" class="btn sm warn abs b0 r0" onclick="testapp()">签约测试</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ciy-hr my4"></div>
|
|
<div id="id_status"></div>
|
|
</div>
|
|
<script type="text/javascript" src="/jscss/ciy.js"></script>
|
|
<script type="text/javascript" src="/jscss/ciycmp.js"></script>
|
|
<script type="text/javascript" src="/jscss/ciycmp2.js"></script>
|
|
<script type="text/javascript" src="/jscss/ciytable.js"></script>
|
|
<script type="text/javascript" src="../common.js"></script>
|
|
<script type="text/javascript">
|
|
'use strict';
|
|
var table;
|
|
var Glob = {};
|
|
ciyfn.pageload(function () {
|
|
//Glob.urlp = ciyfn.urlparam();
|
|
Glob.certfile = {};
|
|
ciyfn.callfunc('init', {}, function (json) {
|
|
var path = ciyfn.makeuploadpath('providerbase', ciyfn.getstorage(ciy_vars.tokenfield));
|
|
ciycmp({ dom: $5('[com=recvtype]'), value: json.data.recvtype, range: 'accounttype' });
|
|
ciycmp({ dom: $5('[com=feerate]'), value: json.data.feerate });
|
|
ciycmp({ dom: $5('[com=feelow]'), value: json.data.feelow });
|
|
$5('[name=recvaccount]').val(json.data.recvaccount);
|
|
$5('[name=recvname]').val(json.data.recvname);
|
|
ciycmp({ dom: $5('[com=serviceimg]'), value: json.data.serviceimg, path: path });
|
|
ciycmp({ dom: $5('[com=pubkey]') });
|
|
$5('[name=ali_appid]').val(json.key.ali_appid);
|
|
|
|
var html = '';
|
|
if (json.data.providerstatus == 10) {
|
|
html += '<button class="btn dag" onclick="prov_stop()">暂停业务</button>';
|
|
html += ' 暂停后,所有商户无法下达新转账操作、不能提现,已下达的转账操作不影响。';
|
|
}
|
|
if (json.data.providerstatus == 20) {
|
|
html += '<button class="btn succ" onclick="prov_start()">恢复业务</button>';
|
|
}
|
|
if (json.data.providerstatus == 30) {
|
|
html += '服务商已被冻结,请联系平台';
|
|
}
|
|
$5('#id_status').html(html);
|
|
});
|
|
});
|
|
$5('[type=file]').on('change', function (ev) {
|
|
var id = ev.target.id;
|
|
var name = ev.target.value;
|
|
const file = ev.target.files[0];
|
|
if (!file)
|
|
return;
|
|
const reader = new FileReader();
|
|
reader.onload = function (e) {
|
|
const content = e.target.result;
|
|
Glob.certfile[id] = { name: name, content: content };
|
|
};
|
|
reader.readAsText(file);
|
|
});
|
|
function editserv(dom) {
|
|
var postparam = ciyfn.getform(dom);
|
|
if (ciyfn.throttle(dom)) return;
|
|
ciyfn.callfunc("editserv", postparam, function (json) {
|
|
ciyfn.toast('提交成功');
|
|
});
|
|
}
|
|
function editrecv(dom) {
|
|
var postparam = ciyfn.getform(dom);
|
|
if (ciyfn.throttle(dom)) return;
|
|
ciyfn.callfunc("editrecv", postparam, function (json) {
|
|
ciyfn.toast('提交成功');
|
|
});
|
|
}
|
|
function editapp(dom) {
|
|
var postparam = ciyfn.getform(dom);
|
|
if (!Glob.certfile.pubkey)
|
|
return ciyfn.toast('请上传PubKey');
|
|
if (!Glob.certfile.rootkey)
|
|
return ciyfn.toast('请上传RootCert');
|
|
if (!Glob.certfile.apppub)
|
|
return ciyfn.toast('请上传PubRSA2');
|
|
if (!Glob.certfile.apppri)
|
|
return ciyfn.toast('请上传私钥');
|
|
//Glob.certfile.apppri.name "C:\\fakepath\\应用私钥RSA2048-敏感数据,请妥善保管.txt"
|
|
postparam.pubkey = Glob.certfile.pubkey.content;
|
|
postparam.rootkey = Glob.certfile.rootkey.content;
|
|
postparam.apppub = Glob.certfile.apppub.content;
|
|
postparam.apppri = Glob.certfile.apppri.content;
|
|
if (ciyfn.throttle(dom)) return;
|
|
ciyfn.callfunc("editapp", postparam, function (json) {
|
|
ciyfn.toast('设置成功');
|
|
});
|
|
}
|
|
function testapp() {
|
|
ciyfn.callfunc("testapp", {}, function (json) {
|
|
window.open(json.url);
|
|
ciyfn.alert({
|
|
content: '是否出现二维码?'
|
|
, btns: ["*关闭"]
|
|
});
|
|
});
|
|
}
|
|
function prov_stop() {
|
|
ciyfn.alert({
|
|
content: '确定要暂停服务?'
|
|
, btns: ["暂停", '*关闭']
|
|
, cb: function (opn) {
|
|
if (opn.btn == '关闭')
|
|
return opn.close();
|
|
ciyfn.callfunc("prov_stop", {}, function (json) {
|
|
opn.close();
|
|
ciyfn.toast('已暂停服务');
|
|
location.reload();
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function prov_start() {
|
|
ciyfn.callfunc("prov_start", {}, function (json) {
|
|
ciyfn.toast('已开启服务');
|
|
location.reload();
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |