Commit d67f6e08 authored by daniel's avatar daniel

fix(custom): 客服电话校验更新

parent 4c2d8eb0
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!doctype html>
<html>
<head>
<title>赛客客服</title>
<!-- Bootstrap CSS-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome CSS-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css">
<!-- Fontastic Custom icon font-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/fontastic.css">
<!-- Google fonts - Poppins -->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css">
<!-- theme stylesheet-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/style.default.css?v=<%=System.currentTimeMillis()%>" id="theme-stylesheet">
<!-- Custom stylesheet - for your changes-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/juery-ui-1.12.css">
<!-- Favicon-->
<link rel="shortcut icon" href="https://img.geexek.com/files/home/favicon.ico">
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/main.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/leaflet/css/leaflet.css?v=<%=System.currentTimeMillis()%>"/>
<link rel="stylesheet" href="${ctxStatic}/leaflet/css/leaflet_label.css"/>
<link rel="stylesheet" href="${ctxStatic}/cmpt/road.css?v=<%=System.currentTimeMillis()%>"/>
<link rel="stylesheet" href="${ctxStatic}/cmpt/road-new.css?v=<%=System.currentTimeMillis()%>"/>
<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script>
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<style>
.submit{
display: inline-block;
width: 120px;
height: 45px;
text-align: center;
line-height: 45px;
color: white;
background: #ce3939;
border-radius: 4px;
letter-spacing: 1px;
cursor: pointer;
font-size: 16px;
}
.input{
height: 50px;
width: 790px;
line-height: 50px;
border: 2px solid #F4F4F4;
border-radius:4px;
margin-right: 30px;
margin-left: 0px;
padding-left: 12px;
}
.title-new{
font-size: 24px;
color: #333333;
}
.section{
display: flex;
justify-content: center;
margin: 30px 0px;
height: 130px;
align-items: center;
background: rgba(255,255,255,1);
box-shadow: 0px 0px 10px 0px rgba(238,235,235,1);
border-radius: 4px;
}
</style>
</head>
<body>
<jsp:include page="../common/header.jsp"></jsp:include>
<div class="page-content d-flex align-items-stretch main-body">
<jsp:include page="../common/menu.jsp"></jsp:include>
<div class="rght" id="customer">
<div class="title-new">
<span class="title">赛事客服</span>
</div>
<div class="section">
<input class="input" type="text" v-model="customer.mobile" placeholder="请输入客服电话">
<span v-on:click="save" class="submit">保存</span>
</div>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!doctype html>
<html>
</div>
<script src="${ctxStatic}/vue/vue.js"></script>
<script>
var customerV = new Vue({
el : '#customer',
data : {
customer : {id:-1,mobile:'',cmptId:getCId()}
},
methods:{
save : function () {
var telNo = $.trim(customerV.$data.customer.mobile);
<head>
<title>赛客客服</title>
<!-- Bootstrap CSS-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome CSS-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/font-awesome/css/font-awesome.min.css">
<!-- Fontastic Custom icon font-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/fontastic.css">
<!-- Google fonts - Poppins -->
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/font-css.css">
<!-- theme stylesheet-->
<link rel="stylesheet"
href="${ctxStatic}/newdermon/css/style.default.css?v=<%=System.currentTimeMillis()%>"
id="theme-stylesheet">
<!-- Custom stylesheet - for your changes-->
<link rel="stylesheet"
href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/juery-ui-1.12.css">
<!-- Favicon-->
<link rel="shortcut icon" href="https://img.geexek.com/files/home/favicon.ico">
<link rel="stylesheet"
href="${ctxStatic}/newdermon/css/custom.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/newdermon/css/main.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet" href="${ctxStatic}/cmpt/setting.css?v=<%=System.currentTimeMillis()%>">
<link rel="stylesheet"
href="${ctxStatic}/leaflet/css/leaflet.css?v=<%=System.currentTimeMillis()%>" />
<link rel="stylesheet" href="${ctxStatic}/leaflet/css/leaflet_label.css" />
<link rel="stylesheet" href="${ctxStatic}/cmpt/road.css?v=<%=System.currentTimeMillis()%>" />
<link rel="stylesheet" href="${ctxStatic}/cmpt/road-new.css?v=<%=System.currentTimeMillis()%>" />
<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script>
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<style>
.submit {
display: inline-block;
width: 120px;
height: 45px;
text-align: center;
line-height: 45px;
color: white;
background: #ce3939;
border-radius: 4px;
letter-spacing: 1px;
cursor: pointer;
font-size: 16px;
}
var telphone = /^(0|86|17951)?(13[0-9]|15[012356789]|17[01678]|18[0-9]|14[57])[0-9]{8}$/;
.input {
height: 50px;
width: 790px;
line-height: 50px;
border: 2px solid #F4F4F4;
border-radius: 4px;
margin-right: 30px;
margin-left: 0px;
padding-left: 12px;
}
var fixedTel = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
if(!telphone.test(telNo)&&!fixedTel.test(telNo)){
layer.alert('联系电话格式不正确,请输入正确的固定电话或手机号');
return false;
.title-new {
font-size: 24px;
color: #333333;
}
$.ajax({
url : '/gk/customer/saveOrUpdate',
data : customerV.$data.customer,
type:'post',
beforeSend:function(){
var index = layer.load()
setTimeout(function () {
layer.close(index);
},1500)
},
success:function (data) {
customerV.$data.customer = data.content;
layer.msg('保存成功!')
setTimeout(function () {
layer.closeAll();
},1000)
}
})
}
}
});
function getCustomer(){
$.ajax({
url : '/gk/customer/'+getCId(),
success:function (data) {
if(data.content){
customerV.$data.customer = data.content;
.section {
display: flex;
justify-content: center;
margin: 30px 0px;
height: 130px;
align-items: center;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10px 0px rgba(238, 235, 235, 1);
border-radius: 4px;
}
}
});
}
getCustomer();
</script>
</body>
</style>
</head>
<body>
<jsp:include page="../common/header.jsp"></jsp:include>
<div class="page-content d-flex align-items-stretch main-body">
<jsp:include page="../common/menu.jsp"></jsp:include>
<div class="rght" id="customer">
<div class="title-new">
<span class="title">赛事客服</span>
</div>
<div class="section">
<input class="input" type="text" v-model="customer.mobile" placeholder="请输入客服电话">
<span v-on:click="save" class="submit">保存</span>
</div>
</div>
<script src="${ctxStatic}/vue/vue.js"></script>
<script>
var customerV = new Vue({
el: '#customer',
data: {
customer: { id: -1, mobile: '', cmptId: getCId() }
},
methods: {
save: function () {
var telNo = $.trim(customerV.$data.customer.mobile);
var telPhone = /^(0|86|17951)?(13[0-9]|14[5-9]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])[0-9]{8}$/;
const fixedTel = /^(0[0-9]{2,3}-)([2-9][0-9]{6,7})(-[0-9]{1,4})?$/;
if (!telPhone.test(telNo) && !fixedTel.test(telNo)) {
layer.alert('联系电话格式不正确,请输入正确的固定电话或手机号');
return false;
}
$.ajax({
url: '/gk/customer/saveOrUpdate',
data: customerV.$data.customer,
type: 'post',
beforeSend: function () {
var index = layer.load()
setTimeout(function () {
layer.close(index);
}, 1500)
},
success: function (data) {
customerV.$data.customer = data.content;
layer.msg('保存成功!')
setTimeout(function () {
layer.closeAll();
}, 1000)
}
})
}
}
});
function getCustomer() {
$.ajax({
url: '/gk/customer/' + getCId(),
success: function (data) {
if (data.content) {
customerV.$data.customer = data.content;
}
}
});
}
getCustomer();
</script>
</body>
</html>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment