You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
406 lines
14 KiB
406 lines
14 KiB
<!doctype html> |
|
<html> |
|
|
|
<head> |
|
<meta charset="UTF-8"> |
|
<title>商家管理</title> |
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"> |
|
<link href="../../../lib/css/mui.min.css" rel="stylesheet" /> |
|
<!--引入公共样式--> |
|
<link href="../../../lib/css/mui.pullToRefresh.css" rel="stylesheet" /> |
|
<link href="../../../lib/css/basic.css" rel="stylesheet" /> |
|
<link href="../css/merchant.css" rel="stylesheet" /> |
|
<!--下拉刷新上拉加载css--> |
|
<script src="../../../lib/js/rem-layout.js"></script> |
|
<script src="../../../lib/js/mui.min.js"></script> |
|
<script src="../../../lib/js/vue.js"></script> |
|
<script src="../../../lib/js/app.js"></script> |
|
<!--下拉刷新上拉加载js--> |
|
<script src="../../../lib/js/mui.pullToRefresh.js"></script> |
|
<script src="../../../lib/js/mui.pullToRefresh.material.js"></script> |
|
<!--baseJs--> |
|
<script src="../js/ajax/config_ajax.js"></script> |
|
<script src="../js/ajax/market_apply_ajax.js"></script> |
|
<script src="../js/ajax/market_user_ajax.js"></script> |
|
</head> |
|
|
|
<body> |
|
<div id='data-info'> |
|
<header class="mui-bar mui-bar-nav"> |
|
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> |
|
<h1 class="mui-title">{{langue.title}}</h1> |
|
</header> |
|
<div class="mui-content"> |
|
<div v-show="marketUserStatus == 'NOTMARKET' || marketUserStatus == null"> |
|
<div class="txt-box"> |
|
<h4>{{langue.rule}}</h4> |
|
<!--<p>商家服务准则与制度标准会员需通过平台认证获取商家身份及权限。 申请商家条件如下: 1.需确保账户内拥有10000USDT,作为商家保证金,冻结于自身账户内。取消商家资格,将解冻此保证金。 |
|
2.商家需遵守按时打款、快速放行、不恶意卡单、不恶意拍单、不随意取消订单等诚信交易的基本原则。 优质的商家应当具备快速打款、快速放行,低申诉率、低取消率,服务态度好、服务意识强等特质。 商家基本准则: (1)、 |
|
对自己的广告负责,确认好广告价格、数量再上架;当人离开或者下线 时,定先下架广告。(单价根据实时价幅度的5%) (2)、熟知各个银行的转款规定,在订单有效时间内,高效完成转款。 |
|
(3)、当收到买家转款,核对好金额后,及时放行。(收到到账信息后, 放行时间不得超过30分钟) (4)、当有需要时,才申诉订单。不因和对手方发生纠纷,而恶意申诉。 (5)、商家对普通用户应怀有服务意识,反应及时、用语礼貌。 |
|
</p>--> |
|
<div v-html='marketFreezeRule'> |
|
{{marketFreezeRule}} |
|
</div> |
|
</div> |
|
<div class="mui-input-row mui-checkbox mui-left"> |
|
<input id="agree-radio" name="radio" type="checkbox"> |
|
<label for="agree-radio" class="agree-radio">{{langue.checkThePrompt}}</label> |
|
</div> |
|
<div class="btn"> |
|
<button id="submitBtn" class="app-btn app-btn-darkly">{{langue.applyImmediately}}</button> |
|
</div> |
|
</div> |
|
<div v-show="marketUserStatus == 'MARKET'" style="margin-top: 0.2rem;"> |
|
<div class="btn"> |
|
<button id="cancel-M" class="app-btn app-btn-darkly">{{langue.marketCancelBtn}}</button> |
|
</div> |
|
</div> |
|
<div v-show="marketUserStatus == 'CANCELING'" style="margin-top: 0.2rem;"> |
|
<div class="btn"> |
|
<button class="app-btn app-btn-darkly" disabled>{{langue.canceling}}</button> |
|
</div> |
|
</div> |
|
</div> |
|
<!--弹出框--> |
|
<div class="cancelOrder" v-show='popover_Status'> |
|
<div> |
|
<div class="orderCont"> |
|
<p class="popText popText_1">{{langue.marginTitle}}</p> |
|
<p class="popText popText_1">{{langue.margin}}:{{marketFreezeAmount}}{{marketFreezeCoin}}</p> |
|
</div> |
|
<div class="orderHandle"> |
|
<div class="btn thinkBtn" id="cancelBtn"><span>{{langue.cancelBtn}}</span></div> |
|
<div class="btn cancelBtn" id="sureBtn"><span>{{langue.affirmBtn}}</span></div> |
|
</div> |
|
</div> |
|
</div> |
|
<!--灰色背景图蒙版--> |
|
<div id="bg" class="bg" v-show='bgStatus'></div> |
|
</div> |
|
|
|
</body> |
|
<script type="text/javascript"> |
|
var langues = { |
|
zh_CN: { |
|
title: '商家管理', |
|
rule: '商家规则', |
|
note1: "请勾选商家规则", |
|
affirmBtn: '确认', |
|
cancelBtn: '取消', |
|
margin: '保证金', |
|
marginTitle: '申请成为商家审核通过后,需锁定您法币钱包里一部分资金作为保证金,是否确认申请成为商家?', |
|
applyImmediately: '立即申请', |
|
checkThePrompt: '我已查看并同意商家规则', |
|
logInElse: '您的账号在别处登录!', |
|
waiting: '等待中...', |
|
handleSuccess: '操作成功!', |
|
netError: '网络异常,请刷新重试!', |
|
balanceError: '余额不足!', |
|
marketCancelBtn: '取消市商', |
|
canceling: '取消中...', |
|
marketMsg: '确认是否取消商家?', |
|
marketNote: '提示', |
|
yes: '确认', |
|
no: '取消', |
|
}, |
|
zh_HK: { |
|
title: '商家管理', |
|
rule: '商家規則', |
|
note1: "請勾選商家規則", |
|
affirmBtn: '確認', |
|
cancelBtn: '取消', |
|
margin: '保證金', |
|
marginTitle: '申請成為商家審核通過後,需鎖定您法幣錢包裡一部分資金作為保證金,是否確認申請成為商家?', |
|
applyImmediately: '立即申請', |
|
checkThePrompt: '我已查看並同意商家規則', |
|
logInElse: '您的帳號在別處登錄!', |
|
waiting: '等待中...', |
|
handleSuccess: '操作成功!', |
|
netError: '網路異常,請刷新重試!', |
|
balanceError: '餘額不足!', |
|
marketCancelBtn: '取消市商', |
|
canceling: '取消中...', |
|
marketMsg: '確認是否取消商家?', |
|
marketNote: '提示', |
|
yes: '確認', |
|
no: '取消', |
|
}, |
|
en_US: { |
|
title: 'Merchant Management', |
|
rule: 'Business rules', |
|
note1: "Please tick the merchant rule", |
|
affirmBtn: 'confirm', |
|
cancelBtn: 'cancel', |
|
margin: 'margin', |
|
marginTitle: 'After the application for becoming a merchant is approved, we need to lock a part of the money in your legal coin wallet as a deposit. Do you confirm the application for becoming a merchant?', |
|
applyImmediately: 'Apply immediately', |
|
checkThePrompt: 'I have checked and agreed with the merchant rules', |
|
logInElse: 'Your account is logged in elsewhere!', |
|
waiting: 'Waiting...', |
|
handleSuccess: 'Successful operation!', |
|
netError: 'Network exception, please refresh and try again!', |
|
balanceError: 'not sufficient funds!', |
|
marketCancelBtn: 'Cancel the market makers', |
|
canceling: 'To cancel the...', |
|
marketMsg: 'Confirm whether to cancel the market?', |
|
marketNote: 'Prompt', |
|
yes: 'Confirm', |
|
no: 'Cancel', |
|
} |
|
}; |
|
//2、页面上所有需要国际化的文字,包括提示,都通过Vue去引用,例子: |
|
var langueKey = app.getLanguageLocalStorage(); //获取国际化语种 |
|
var langue = langues[langueKey]; // 获取国际化语种数据 |
|
//3、每个页面都需要加上以下的方法: |
|
window.addEventListener('switchLangueData', function(e) { |
|
//dataInfo为Vue对象的名称 |
|
dataInfo.langue = langues[e.detail]; |
|
}); |
|
var dataInfo = new Vue({ |
|
el: '#data-info', |
|
data: { |
|
langue: langue, |
|
bgStatus: false, // 蒙版 |
|
popover_Status: false, // 彈出框 |
|
marketFreezeCoin: 'USDT', |
|
marketFreezeAmount: '-', |
|
marketFreezeRule: '', |
|
freeBalance: 0, |
|
marketUserStatus: null, //用户市商状态 |
|
}, |
|
methods: { |
|
reload_coin_balances: function reload_coin_balances() { //触发钱包数据列表 |
|
var walletWeb = plus.webview.getWebviewById("html/wallet/html/wallet.html"); |
|
mui.fire(walletWeb, 'walletSaveEvent', {}); |
|
}, |
|
} |
|
}) |
|
</script> |
|
|
|
<script type="text/javascript"> |
|
/*主体代码块*/ |
|
mui.plusReady(function() { |
|
//查询用户市商状态,再进行操作 |
|
selectStatusByUser(); |
|
}); |
|
</script> |
|
|
|
<script type="text/javascript"> |
|
/*事件代码块*/ |
|
document.getElementById("submitBtn").addEventListener("tap", function() { |
|
if(!document.getElementById("agree-radio").checked) { |
|
mui.toast(dataInfo.langue.note1); |
|
return; |
|
} else { |
|
dataInfo.bgStatus = true; |
|
dataInfo.popover_Status = true; |
|
} |
|
}); |
|
//确认提交按钮 |
|
document.getElementById("sureBtn").addEventListener("tap", function() { |
|
if(dataInfo.freeBalance * 1 < dataInfo.marketFreezeAmount * 1) { |
|
mui.toast(dataInfo.langue.balanceError); |
|
} else { |
|
marketApply(); |
|
} |
|
}); |
|
//取消按钮 |
|
document.getElementById("cancelBtn").addEventListener("tap", function() { |
|
dataInfo.bgStatus = false; |
|
dataInfo.popover_Status = false; |
|
}); |
|
//取消市商申请 |
|
document.getElementById("cancel-M").addEventListener("tap", function() { |
|
mui.confirm(dataInfo.langue.marketMsg, dataInfo.langue.marketNote, [dataInfo.langue.no, dataInfo.langue.yes], |
|
function(e) { |
|
if(e.index == 1) { |
|
cancelMarket(); |
|
} |
|
}); |
|
}); |
|
//钱包刷新触发事件 |
|
window.addEventListener("saveCoinsEven", function(e) { |
|
var balances = e.detail; |
|
if(balances[dataInfo.marketFreezeCoin]) { |
|
dataInfo.freeBalance = balances[dataInfo.marketFreezeCoin].freeBalance; |
|
} |
|
}); |
|
</script> |
|
|
|
<script type="text/javascript"> |
|
/*function代码块*/ |
|
|
|
//申请市商 |
|
function marketApply() { |
|
plus.nativeUI.showWaiting(dataInfo.langue.waiting); |
|
mui.ajax(marketApplyAjax.MARKET_APPLY.getUrl, { |
|
headers: { |
|
"X-Requested-Token": app.getTokenStorage(), // token头部 |
|
"locale": app.getLanguageLocalStorage() // 语种头部 |
|
}, |
|
dataType: 'json', |
|
type: marketApplyAjax.MARKET_APPLY.getType, |
|
timeout: 10000, //超时时间设置为10秒 |
|
success: function(data) { |
|
plus.nativeUI.closeWaiting(); |
|
if(data.code == 200) { |
|
dataInfo.bgStatus = false; |
|
dataInfo.popover_Status = false; |
|
mui.toast(dataInfo.langue.handleSuccess); |
|
mui.back(); |
|
} else if(data.code == 201) { |
|
//未登录,跳转登录页面 |
|
app.openWin(requestUrl.LOGIN.getUrl, requestUrl.LOGIN.getId); |
|
} else if(data.code == 202) { |
|
mui.toast(dataInfo.langue.logInElse); |
|
//未登录,跳转登录页面 |
|
app.openWin(requestUrl.LOGIN.getUrl, requestUrl.LOGIN.getId); |
|
} else { |
|
app.toast(data.msg); |
|
mui.back(); |
|
} |
|
}, |
|
error: function(xhr, type, errorThrown) { |
|
plus.nativeUI.closeWaiting(); |
|
app.toast(dataInfo.langue.note15); |
|
} |
|
}); |
|
} |
|
|
|
//申请取消市商 |
|
function cancelMarket() { |
|
plus.nativeUI.showWaiting(dataInfo.langue.waiting); |
|
mui.ajax(marketApplyAjax.CANCEL_APPLY.getUrl, { |
|
headers: { |
|
"X-Requested-Token": app.getTokenStorage(), // token头部 |
|
"locale": app.getLanguageLocalStorage() // 语种头部 |
|
}, |
|
dataType: 'json', |
|
type: marketApplyAjax.CANCEL_APPLY.getType, |
|
timeout: 10000, //超时时间设置为10秒 |
|
success: function(data) { |
|
plus.nativeUI.closeWaiting(); |
|
if(data.code == 200) { |
|
mui.toast(dataInfo.langue.handleSuccess); |
|
mui.back(); |
|
} else if(data.code == 201) { |
|
//未登录,跳转登录页面 |
|
app.openWin(requestUrl.LOGIN.getUrl, requestUrl.LOGIN.getId); |
|
} else if(data.code == 202) { |
|
mui.toast(dataInfo.langue.logInElse); |
|
//未登录,跳转登录页面 |
|
app.openWin(requestUrl.LOGIN.getUrl, requestUrl.LOGIN.getId); |
|
} else { |
|
app.toast(data.msg); |
|
} |
|
}, |
|
error: function(xhr, type, errorThrown) { |
|
plus.nativeUI.closeWaiting(); |
|
app.toast(dataInfo.langue.note15); |
|
} |
|
}); |
|
} |
|
|
|
//查询保证金代币 |
|
function selectMarketFreezeCoin() { |
|
mui.ajax(otcConfigAjax.SELECT_MARKET_FREEZE_COIN.getUrl, { |
|
headers: { |
|
"X-Requested-Token": app.getTokenStorage(), // token头部 |
|
"locale": app.getLanguageLocalStorage() // 语种头部 |
|
}, |
|
dataType: 'json', |
|
type: otcConfigAjax.SELECT_MARKET_FREEZE_COIN.getType, |
|
timeout: 10000, //超时时间设置为10秒 |
|
success: function(data) { |
|
if(data.code == 200) { |
|
if(data.data != null) { |
|
dataInfo.marketFreezeCoin = data.data; |
|
} |
|
} else if(data.code == 201) { |
|
//未登录,跳转登录页面 |
|
app.openWin(requestUrl.LOGIN.getUrl, requestUrl.LOGIN.getId); |
|
} else if(data.code == 202) { |
|
mui.toast(dataInfo.langue.logInElse); |
|
//未登录,跳转登录页面 |
|
app.openWin(requestUrl.LOGIN.getUrl, requestUrl.LOGIN.getId); |
|
} |
|
} |
|
}); |
|
} |
|
|
|
//查询保证金数量 |
|
function selectMarketFreezeAmount() { |
|
mui.ajax(otcConfigAjax.SELECT_MARKET_FREEZE_AMOUNT.getUrl, { |
|
headers: { |
|
"X-Requested-Token": app.getTokenStorage(), // token头部 |
|
"locale": app.getLanguageLocalStorage() // 语种头部 |
|
}, |
|
dataType: 'json', |
|
type: otcConfigAjax.SELECT_MARKET_FREEZE_AMOUNT.getType, |
|
timeout: 10000, //超时时间设置为10秒 |
|
success: function(data) { |
|
if(data.code == 200) { |
|
dataInfo.marketFreezeAmount = data.data; |
|
} |
|
} |
|
}); |
|
} |
|
|
|
//查询市商规则 |
|
function selectMarketFreezeRule() { |
|
mui.ajax(otcConfigAjax.SELECT_MARKET_FREEZE_RULE.getUrl, { |
|
headers: { |
|
"X-Requested-Token": app.getTokenStorage(), // token头部 |
|
"locale": app.getLanguageLocalStorage() // 语种头部 |
|
}, |
|
dataType: 'json', |
|
data: { |
|
type: 'business' |
|
}, |
|
type: otcConfigAjax.SELECT_MARKET_FREEZE_RULE.getType, |
|
timeout: 10000, //超时时间设置为10秒 |
|
success: function(data) { |
|
if(data.code == 200) { |
|
if(data.data) { |
|
dataInfo.marketFreezeRule = data.data.textContent; |
|
} |
|
} |
|
} |
|
}); |
|
} |
|
|
|
//查询用户市商状态 |
|
function selectStatusByUser() { |
|
mui.ajax(marketUserAjax.GET_STATUS_BY_USER.getUrl, { |
|
headers: { |
|
"X-Requested-Token": app.getTokenStorage(), // token头部 |
|
"locale": app.getLanguageLocalStorage() // 语种头部 |
|
}, |
|
dataType: 'json', |
|
data: { |
|
type: 'business' |
|
}, |
|
type: marketUserAjax.GET_STATUS_BY_USER.getType, |
|
timeout: 10000, //超时时间设置为10秒 |
|
success: function(data) { |
|
if(data.code == 200) { |
|
dataInfo.marketUserStatus = data.data; |
|
//市商记录为空 或者 市商未认证状态下才查询市商申请相关信息 |
|
if(data.data == null || data.data == 'NOTMARKET') { |
|
//查询保证金代币 |
|
selectMarketFreezeCoin(); |
|
//查询保证金数量 |
|
selectMarketFreezeAmount(); |
|
//规则查询 |
|
selectMarketFreezeRule(); |
|
//刷新钱包 |
|
dataInfo.reload_coin_balances(); |
|
} |
|
} |
|
} |
|
}); |
|
} |
|
</script> |
|
|
|
</html>
|
|
|