layui.use(['form', 'jquery', 'layer', 'mhttp'], function () {
let form = layui.form;
let $ = layui.jquery;
let http = layui.mhttp;
let layer = layui.layer;
let authInfo = JSON.parse(localStorage.getItem(window._AUTH_INFO_));
let authInfoDeductionSwitch = authInfo.detail.deduction_switch;
// 查询应用
let ret = http.ajax({
url: '/app/lists'
});
let agent_uid = GetQueryString('uid');
let agent_username = GetQueryString('username');
let agent_own_app_uids = GetQueryString('own_app_uids');
let agent_status = GetQueryString('status');
let agent_commission_ratio = GetQueryString('commission_ratio');
ret.then((data) => {
if (data.code === 200) {
let html = '';
for (let i in data.data) {
html += '';
}
$('.own_app_uids').html(html);
let own_app_uids = agent_own_app_uids.split(',');
for (let i in own_app_uids) {
$('.che_' + own_app_uids[i]).attr('checked', 'checked');
}
$('.username').val(agent_username);
if (agent_status === '1') {
$('.status').attr('checked', 'checked');
}
if (authInfoDeductionSwitch === 2){
// cps
html = '