add app webview客服页面

master
luoyang 5 years ago
parent 875482d168
commit 6c684c0799

@ -222,5 +222,7 @@ public interface RetailAppService {
JSONObject getClientSubManage(JSONObject device); JSONObject getClientSubManage(JSONObject device);
JSONObject getCustomerInfo(JSONObject device);
boolean isSubPartner(JSONObject device, String clientMoniker); boolean isSubPartner(JSONObject device, String clientMoniker);
} }

@ -2435,6 +2435,19 @@ public class RetailAppServiceImp implements RetailAppService {
return result; return result;
} }
public JSONObject getCustomerInfo(JSONObject device) {
JSONObject result = new JSONObject();
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
result.put("contact_email", client.getString("contact_email"));
result.put("client_id", client.getString("client_id"));
result.put("contact_person", client.getString("contact_person"));
result.put("country", client.getString("country"));
result.put("state", client.getString("state"));
return result;
}
@Override @Override
public boolean isSubPartner(JSONObject device,String clientMoniker) { public boolean isSubPartner(JSONObject device,String clientMoniker) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);

@ -843,4 +843,13 @@ public class RetailAppController {
public JSONObject getClientSubManage(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { public JSONObject getClientSubManage(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return retailAppService.getClientSubManage(device); return retailAppService.getClientSubManage(device);
} }
@GetMapping("/client/customer")
public ModelAndView redirectClientCustomer(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
ModelAndView model = new ModelAndView("app/app_customer");
JSONObject client = retailAppService.getCustomerInfo(device);
model.addObject("client", client);
return model;
}
} }

@ -10,6 +10,7 @@ import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.core.PaymentApi; import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.exceptions.OrderNotExistsException; import au.com.royalpay.payment.core.exceptions.OrderNotExistsException;
import au.com.royalpay.payment.manage.analysis.core.ATOReportService;
import au.com.royalpay.payment.manage.analysis.core.DashboardService; import au.com.royalpay.payment.manage.analysis.core.DashboardService;
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService; import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
import au.com.royalpay.payment.manage.appclient.core.RetailAppService; import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
@ -26,6 +27,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.SysClientLegalPersonMapper; import au.com.royalpay.payment.manage.mappers.system.SysClientLegalPersonMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
import au.com.royalpay.payment.manage.system.core.TradeSecureService; import au.com.royalpay.payment.manage.system.core.TradeSecureService;
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService; import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.CommonConsts;
@ -58,6 +60,7 @@ import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
@ -557,4 +560,17 @@ public class TestController implements ApplicationEventPublisherAware {
}); });
} }
@GetMapping("/client/customer")
public ModelAndView redirectClientCustomer() {
JSONObject result = new JSONObject();
ModelAndView model = new ModelAndView("app/app_customer");
JSONObject client = clientManager.getClientInfoByMoniker("PINE");
result.put("contact_email", client.getString("contact_email"));
result.put("client_id", client.getString("client_id"));
result.put("contact_person", client.getString("contact_person"));
result.put("country", client.getString("country"));
result.put("state", client.getString("state"));
model.addObject("client", result);
return model;
}
} }

@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RoyalPay</title>
<meta name="description" content="RoyalPay Customer service">
<meta name="keywords" content="RoyalPay在线客服">
<script src="//code.tidio.co/zl6fdb5cii0l7b5kjvwqfqyilr5ncjvx.js"></script>
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
<meta content="#ffffff" name="msapplication-TileColor" />
<script type="text/javascript" data-th-inline="javascript">
window.email = /*[[*{_client.contact_email}]]*/'';
window.id = /*[[*{client.client_id}]]*/'';
window.name = /*[[*{client.contact_person}]]*/'';
window.country = /*[[*{client.country}]]*/'';
window.city = /*[[*{client.state}]]*/'';
document.tidioIdentify = {
distinct_id: window.id, // Unique user ID in your system
email: window.email, // User email
name: window.name, // Visitor name
city: window.city, // City
country: window.country // Country
};
function white() {
$("#loading").css({
"position":"absolute",    //绝对位置
"display":"block",    //让对象成为块级元素
"background-color":"white",  //背景白色
"z-index":"9999",  //最上层显示
"opacity":"0.7"  //背景透明度
});
}
</script>
<style type="text/css">
@keyframes myfirst {
0% {
transform: rotateY(1deg);
}
100% {
transform: rotateY(90deg);
}
}
@media (min-width:100px) and (max-width:399px){
#img2{width: 60px;height: 45px;}
#img1{width: 60px;height: 15px;}
.contract{font-size:1px;}
.return-class {
float: right;
font-size: 15px;
padding: 10px 0px;
}
}
@media (min-width:400px) and (max-width:799px){
#img2{width: 160px;height: 75px;}
#img1{width: 160px;height: 40px;}
.contract{font-size:5px;}
.return-class {
float: right;
font-size: 15px;
padding: 10px 20px;
}
}
div.polaroid {
text-align: center;
}
div.rotate_left {
position: fixed;
width: 200px;
margin: 0 -100px;
top: 20%;
left: 50%;
z-index: 9999999;
}
.dh {
width: 30px;
animation: myfirst 1s linear 0s infinite alternate;
}
</style>
</head>
<body>
<div class="polaroid">
<div class="rotate_left" style="display: none" id="loading_logo">
<img class="dh" src="/static/images/r_logo.svg" alt="RoyalPay" style="width:150px;height:150px;margin-top: 10%;margin-bottom: 10%;"/>
<p style="color: black;font-size: 15px;">Easy BusinessEasy Pay</p>
</div>
</div>
<div id="loading" style="width:100%;height:100%;display:none"></div>
<div ui-view autoscroll="true" id = "all" class="contract">
<section class="content" style="background:#4F4F4F;">
</section>
</div>
<script>
document.getElementById("loading_logo").style ="";
white();
(function() {
function onTidioChatApiReady() {
window.tidioChatApi.open();
document.getElementById('loading').style.display = "none";
document.getElementById('loading_logo').style.display = "none";
}
if (window.tidioChatApi) {
window.tidioChatApi.on("ready", onTidioChatApiReady);
} else {
document.addEventListener("tidioChat-ready", onTidioChatApiReady);
}
})();
</script>
</body>
</html>
Loading…
Cancel
Save