This commit is contained in:
junshuai
2022-07-23 13:54:07 +08:00
parent 809c426b5a
commit 62548736a7
4912 changed files with 827659 additions and 38 deletions

View File

@@ -0,0 +1,654 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0">
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="request"/>
<c:set var="resourcePath" value="${ctx}/resources" scope="request"/>
<script type="text/javascript">
var ctx = "${ctx}"; //上下文路径
var resourcePath = "${resourcePath}";
document.writeln('<script type="text/javascript" src="' + resourcePath + '/js/global.js?d=' + new Date().getTime() + '" ><\/script>');
</script>
<title>商户进件审核</title>
<style>
#Rootloading {
display: inline-block;
width: 12.8%;
max-width: 80px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
</style>
<link href="${resourcePath}/css/act-common.css" rel="stylesheet">
<style id="__WXWORK_INNER_SCROLLBAR_CSS">
::-webkit-scrollbar {
width: 12px !important;
height: 12px !important;
}
::-webkit-scrollbar-track:vertical {
}
::-webkit-scrollbar-thumb:vertical {
background-color: rgba(136, 141, 152, 0.5) !important;
border-radius: 10px !important;
background-clip: content-box !important;
border: 2px solid transparent !important;
}
::-webkit-scrollbar-track:horizontal {
}
::-webkit-scrollbar-thumb:horizontal {
background-color: rgba(136, 141, 152, 0.5) !important;
border-radius: 10px !important;
background-clip: content-box !important;
border: 2px solid transparent !important;
}
::-webkit-resizer {
display: none !important;
}
.content-wrapper .header {
height: 3.125rem;
background-color: #ff2d4b;
color: white;
display: flex;
justify-content: center;
text-align: center;
align-items: center
}
.merc-info {
margin: 1.25rem 1.25rem;
line-height: 3rem;
}
.item {
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgba(163, 162, 162, .5);
}
.main-title {
border-left: 6px solid #ff2d4b;
padding-left: .8rem;
color: #ff2d4b;
}
.item-image-view {
display: flex;
justify-content: space-around;
align-items: center;
}
.item-image-view .item-image img {
height: 100px;
width: 80%;
}
.item-image img {
height: 160px;
width: 60%;
}
.item-image {
display: flex;
justify-content: center;
align-items: center;
padding-bottom: 20px;
}
.item-value {
max-width: 15.625rem;
}
.foot {
height: 5rem;
width: 100%;
background-color: #ffffff;
position: fixed;
bottom: 0;
}
.foot-bottom {
display: flex;
justify-content: space-around;
margin: 1.25rem 5%;
align-items: center;
text-align: center;
line-height: 2.4rem;
}
.foot-bottom .btn-success {
background-color: #67C23A;
color: white;
height: 2.4rem;
width: 45%;
border-radius: 30px;
}
.foot-bottom .btn-reject {
background-color: #F56C6C;
color: white;
height: 2.4rem;
width: 45%;
border-radius: 30px;
}
#imgdiv {
width: 500px;
margin: 50px auto;
}
#imgdiv img {
width: 300px;
margin: 0 100px;
}
#bigimg {
width: 100%;
height: 100%;
position: fixed;
background: rgba(0, 0, 0, .3);
top: 0;
display: none;
}
#bigimg img {
width: 90%;
margin: auto;
position: fixed;
left: 0;
right: 0;
top: 80px;
cursor: pointer;
}
.btn-cacle {
background-color: #67C23A;
}
.btn-cancel {
background-color: #909399;
}
.channle-item{
line-height: 4rem;
display: flex;
justify-content: space-around;
}
.channel-radio-item{
margin: 0 0.5rem;
}
.income-class{
text-align: center;
display: flex;
justify-content: space-evenly;
}
.class-loading{
background-color: white;
position: relative;
top: 50%;
left: 30%;
width: 40%;
height: 45px;
border-radius: 5px;
}
.class-loading-body{
display: flex;
justify-content: space-evenly;
align-items: center;
width: 80%;
text-align: center;
padding: 8px 0 0 12px;
}
.loading-txt{
color: #8d8b8b;
}
.hide{
display: none;
}
.channel-text{
margin-left: 0.2rem;
}
.ban-selected{
color: #7d7d7d;
}
</style>
</head>
<body style="height: auto;">
<div id="app" class="">
<div class="content-wrapper">
<div class="header">
进件审核
</div>
<div class="main">
<div class="merc-info">
<div class="main-popula-info">
<div class="main-title">
推广员基本信息
</div>
<div class="item">
<div class="item-name">推广员名称</div>
<div class="item-value">${app.userName}</div>
</div>
<div class="item">
<div class="item-name">登录账号</div>
<div class="item-value">${info.loginName}</div>
</div>
<div class="item">
<div class="item-name">证件号</div>
<div class="item-value">${cert.certNo}</div>
</div>
<div>
<div class="item-name">实名认证件照</div>
<div class="item-image-view">
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'"
src="${cert.imgPositive}" style="width: 125px"/></div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'"
src="${cert.imgNegative}" style="width: 125px"/></div>
</div>
</div>
</div>
<div class="main-merc-info">
<div class="main-title">
商户基本信息
</div>
<div class="item">
<div class="item-name">商户名称</div>
<div class="item-value">${merchant.merchantName}</div>
</div>
<div class="item">
<div class="item-name">商户类型</div>
<div class="item-value">${merchant.merchantType == '1' ? '小微' : merchant.merchantType == '2' ? '个体' : '企业'}</div>
</div>
<div class="item">
<div class="item-name">商户简称</div>
<div class="item-value">${merchant.alias}</div>
</div>
<div class="item">
<div class="item-name">商户联系人</div>
<div class="item-value">${merchant.contactName}</div>
</div>
<div class="item">
<div class="item-name">联系人电话</div>
<div class="item-value">${merchant.contactMobile}</div>
</div>
<div class="item">
<div class="item-name">经营类目</div>
<div class="item-value" style="font-size: 0.8rem">${merchant.mccName}</div>
</div>
<div class="item">
<div class="item-name">详细地址</div>
<div class="item-value"
style="font-size: 0.8rem">${merchant.province}${merchant.city}${merchant.district}${merchant.address}</div>
</div>
<div>
<div class="item-name">门店照片</div>
<div class="item-image-view">
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'"
src="${merchant.storeHeadPic}" style="width: 90px"/></div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'"
src="${merchant.cashPic}" style="width: 90px"/></div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'"
src="${merchant.storeInsidePic}" style="width: 90px"/></div>
</div>
</div>
</div>
<c:if test="${merchant.merchantType ne '1'}">
<div class="main-license-info">
<div class="main-title">
营业执照信息
</div>
<div class="item">
<div class="item-name">法人姓名</div>
<div class="item-value">${merchant.principalPerson}</div>
</div>
<div class="item">
<div class="item-name">法人证件号</div>
<div class="item-value">${merchant.principalCertNo}</div>
</div>
<div class="item">
<div class="item-name">执照名称</div>
<div class="item-value">${merchant.bussAuthName}</div>
</div>
<div class="item">
<div class="item-name">执照编号</div>
<div class="item-value">${merchant.bussAuthNum}</div>
</div>
<div class="item">
<div class="item-name">注册地址</div>
<div class="item-value" style="font-size: 0.8rem">${merchant.bussAuthAddress}</div>
</div>
<div>
<div class="item-name">营业执照照片</div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'"
src="${merchant.businessLicensePic}"/></div>
</div>
</div>
</c:if>
<div class="main-settle-info">
<div class="main-title">
结算基本信息
</div>
<div class="item">
<div class="item-name">银行名称</div>
<div class="item-value">${bank.bankName}</div>
</div>
<div class="item">
<div class="item-name">支行名称</div>
<div class="item-value">${bank.branchName}</div>
</div>
<div class="item">
<div class="item-name">开户名</div>
<div class="item-value">${bank.bankHolder}</div>
</div>
<div class="item">
<div class="item-name">开户卡号</div>
<div class="item-value">${bank.bankCardNo}</div>
</div>
<div class="item">
<div class="item-name">预留手机号</div>
<div class="item-value">${bank.phone}</div>
</div>
<div class="item">
<div class="item-name">证件号码</div>
<div class="item-value">${card.certNo}</div>
</div>
<div>
<div class="item-name">结算人证件照</div>
<div class="item-image-view">
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'" src="${card.imgPositive}" style="width: 90px"/></div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'" src="${card.imgNegative}" style="width: 90px"/></div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'" src="${bank.imgUrl}" style="width: 90px"/></div>
</div>
</div>
<div>
<div class="item-name">结算人其他照片</div>
<div class="item-image-view">
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'" src="${merchant.literalPic}" style="width: 125px"/></div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'" src="${merchant.handPic}" style="width: 125px"/></div>
</div>
</div>
<div>
<div class="item-name">商户协议</div>
<div class="item-image-view">
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'" src="${merchant.dealPic}" style="width: 125px"/></div>
<div class="item-image"><img onerror="this.src='${resourcePath }/images/error.jpg'" src="${merchant.affilatePic}" style="width: 125px"/></div>
</div>
</div>
<c:if test="${settleType == '012' || settleType == '022'}">
<div>
<div class="item-name">非法人授权函</div>
<div class="item-image-view">
<div class="item-image"><img onerror="this.src='${resourcePath}/images/error.jpg'" style="width: 125px" src="${merchant.warrantyPic}"/></div>
</div>
</div>
</c:if>
<c:if test="${channelFlag}">
<div class="main-channel-info">
<div class="main-title">
通道信息
</div>
<div>已进件通道:${useChannelName}</div>
</div>
</c:if>
<div class="main-settle-info">
<div class="main-title">
上次驳回原因
</div>
<div>驳回时间:${userApp.updateTime}</div>
<div>驳回理由:${userApp.remark}</div>
<p>
<div>1</div>
</div>
</div>
</div>
</div>
<div class="foot">
<div class="foot-bottom">
<div class="btn-success" id="adopt">通过</div>
<div class="btn-reject" id="reject">驳回</div>
</div>
</div>
</div>
</div>
<div id="imgdiv"></div>
<!-- 放大遮罩层 -->
<div id="bigimg" onclick="closeimg();"></div>
<div class="toast-wrapper" style="display: none;">
<div class="toast"></div>
</div>
<%-- <div class="toast3-wrapper" style="display: block;">--%>
<%-- </div>--%>
<div class="toast-wrapper2 toast-title" style="display: none;">
<div class="toast2" id="toast1" style="height: 200px;">
<p class="toast-title">选择进件通道</p>
<div class="channle-item">
<c:if test="${not empty channelList}">
<c:forEach items="${channelList}" var="channel">
<label for="${channel.channelCode}" class="channel-radio-item">
<input type="radio" name="channel" ${channel.useFlag ? "disabled" : ""} data-id="${channel.id}" value="${channel.channelCode}" id="${channel.channelCode}" class="channel-radio"><span class="channel-text ${channel.useFlag ? "ban-selected" : ""}">${channel.channelName}</span>
</label>
</c:forEach>
</c:if>
</div>
<div class="income-class">
<div>已进件:${not empty useChannelName ? useChannelName : "暂无"}</div>
<div>类型:${importType eq 2 ? '插件' : '普通'}</div>
</div>
<div class="foot-bottom" style="display: flex;justify-content: space-around;">
<div class="btn-success" id="confirm">确定</div>
<div class="btn-reject" id="cancel">取消</div>
</div>
</div>
<div class="class-loading hide">
<div class="class-loading-body">
<div class="loading-img">
<img src="${resourcePath }/images/loading-2.gif" width="28px">
</div>
<div class="loading-txt">加载中...</div>
</div>
</div>
</div>
<div class="toast-wrapper2 reject-title" style="display: none;">
<div class="toast2" id="toast2" style="height: 250px;">
<p class="toast-title toast2-title">请入驳回原因</p>
<p class="toast-message" style="line-height: 60px">
<select name="remark1" id="remark1" style="max-width: 250px">
<option value="">请选择</option>
<c:forEach items="${rejectList}" var="reject">
<option value="${reject.rejectName}">${reject.rejectName}</option>
</c:forEach>
</select>
<textarea name="remark" id="remark" autocomplete="false" style="min-width: 250px;margin-left: 2px"
placeholder="请输入驳回原因"></textarea>
<%-- <input type="text" name="remark" style="margin-left: 4px;" autocomplete="false" placeholder="请输入驳回原因" id="remark">--%>
</p>
<div class="foot-bottom" style="display: flex;justify-content: space-around;">
<div class="btn-success" id="save">确定</div>
</div>
</div>
</div>
<script>
$(function () {
$("img[id!='prevewImg']").on('click', function () {
imgbig(this);
})
$("#adopt").on('click', function () {
$(".toast-title-message").html("是否确认审核通过?");
$(".toast-title").show();
//$(".toast-title").fadeIn(700);
})
$("#cancel").on('click', function () {
$('#toast1').addClass('toast2-out');
$('.toast-title').fadeOut(700);
setTimeout(function () {
$('#toast1').removeClass('toast2-out');
}, 1000)
})
$("#reject").on('click', function () {
$(".reject-title").fadeIn(700);
$(".toast2-title").show();
})
$('#toast2').on('click', function (e) {
e.stopPropagation();
return false
})
$('.reject-title').click(function () {
$('#toast2').addClass('toast2-out')
$(this).fadeOut(700)
setTimeout(function () {
$('#toast2').removeClass('toast2-out')
}, 1000)
})
$("#confirm").on('click', function () {
let flag = false;
let cV = "";
let cI = "";
$("[name='channel']").each((k,v)=>{
if(v.checked){
flag = true;
cV = v.value;
cI = $(v).data().id;
}
})
if(!flag){
alert("至少选中一个通道类型进件!");
return;
}
let type = '${importType}';
if(cV == "SXF" && type == 2){
alert("随行付暂不支持插件进件!");
return;
}
$("#toast1").hide();
$(".class-loading").removeClass('hide');
if(type == 1){
//普通进件
var url = "/manage/merchantStore/manualMerchantIncom/${userId}/"+cI+'/${app.merchantCode}';
$.ajax({
type:'GET',
url:url,
timeout:15000, //超时时间 15秒
dataType: 'json',
complete:(XMLHttpRequest, textStatus)=>{
if(textStatus == 'timeout'){
alert("请求超时,请登录后台查看进件结果!");
}
},
success:(res)=>{
if (res.code == 1) {
alert("提交成功!");
} else {
alert(res.msg);
}
}
})
}else if (type == 2){
//插件进件
var url = "/manage/merchantStore/audit/${userId}";
$.get(url,function (res) {
$(".class-loading").addClass('hide');
$(".toast-title").hide();
$("#toast1").show();
if (res.code == 200) {
alert("提交成功!");
} else {
alert(res.msg);
}
})
}else{
alert("未知进件类型");
$(".class-loading").addClass('hide');
$(".toast-title").hide();
$("#toast1").show();
}
})
$("#remark1").on('change', function () {
$("#remark").val($(this).val());
})
$("#save").on('click', function () {
var remark = $("#remark").val();
if (!remark) {
alert("请填写驳回原因!");
return
}
var url = "/manage/merchantStore/rejectAudit/${userId}?errMsg=" + remark;
$.get(url, function (res) {
if (res.code == 1) {
alert("操作成功!");
$(".reject-title").hide();
} else {
alert(res.msg);
}
})
})
})
function imgbig(obj) {
var imgsrc = $(obj).attr('src');
$("#bigimg").css("display", "block");
$("#bigimg").html("<img id='prevewImg' src=" + imgsrc + " />");
}
function closeimg() {
$("#bigimg").css("display", "none");
}
</script>
</body>
</html>

View File

@@ -0,0 +1,55 @@
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="../../common.jsp" />
<title></title>
</head>
<body>
<input type="hidden" id="appId" value="${appId }">
<input type="hidden" id=ali_appid value="${ali_appid }">
<script type="text/javascript">
function GetQueryString(name){
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
}
/**
* 判断是否是微信浏览器
*/
function isWeiXin(){
var ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
return true;
}else{
return false;
}
}
/**
* 业务分流
*/
var uri="${url}";
var domain_url = '${domain_wap}';
if(uri==''||typeof(uri)=='undefined'){
uri=domain_url+"/index";
}else{
uri=domain_url+uri;
}
var appId=document.getElementById("appId").value;
var aLi_appId=document.getElementById("ali_appid").value;
if(isWeiXin()){
var jump="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURIComponent(uri)+"&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
window.location=jump;
}
</script>
</body>
</html>

View File

@@ -0,0 +1,383 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>交易投诉</title>
<script src="${resourcePath}/js/My97DatePicker/WdatePicker.js"></script>
<style>
*{
margin: 0;
padding: 0;
color: #000;
}
.container{
background-color: #f6f6f65e;
}
.header {
height: 2rem;
background-color: #ff2d4b;
color: white;
display: flex;
justify-content: center;
text-align: center;
align-items: center
}
.content-wrapper {
margin: 1.25rem 1rem;
line-height: 2rem;
}
.body-item{
margin-bottom: 1.2rem;
}
.title {
border-left: 4px solid #ff2d4b;
padding-left: .8rem;
color: #ff2d4b;
margin-bottom: .5rem;
}
.item {
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgba(163, 162, 162, .5);
}
.item-input{
line-height: 1.5rem;
font-size: 17px;
}
.item-textarea{
width: 92%;
font-size: 15px;
line-height: 1rem;
padding:.5rem .5rem;
border: 1px solid #ddd1d1;
color: #707070;
}
.weui-uploader__input-box{
position: relative;
height: 135px;
border: 1px solid #D9D9D9;
width: 135px;
margin: 0 0 0 5px;
}
.weui-uploader__bd{
margin-bottom: 0;
margin-right: 0;
}
.footer{
line-height: 3rem;
}
.footer-btn{
height: 100%;
text-align: center;
}
.footer-submit-btn{
width: 80%;
border: 0;
height: 1.8rem;
/* height: 100%; */
border-radius: 20px;
background-color: #ff2d4b;
color: #fff;
font-size: 17px;
box-shadow: 1px 1px 10px #797979ed;
}
.weui-cell{
padding: 0;
}
.weui-uploader__files, .weui-uploader__files li, .weui-uploader__input-box {
display: inline-block !important;
margin: 0;
width: 128px;
height: 128px;
}
.img-box {
padding-top: 20px;
}
.img {
display: inline-block;
width: 130px;
height: 130px;
/*width: 50%;*/
position: relative;
}
.img img {
width: 100%;
height: 100%;
object-fit: cover;
}
.img:nth-child(2n) {
margin-left: 15px;
}
.flex{
display: flex;
justify-content: space-between;
align-items: center;
}
.img-max{
color: #707070;
}
.img-count{
display: flex;
}
.title-p{
color: #ff2d4b;
}
.item-input{
text-align:right;
}
.img-del {
position: absolute;
z-index: 2;
top: -10px;
right: -10px;
width: 18px !important;
height: 18px !important;
}
</style>
</head>
<body>
<form id="form">
<input type="hidden" name="merchantCode" value="${merchantCode}">
<input type="hidden" name="orderNumber" value="${orderNumber}">
<div class="container">
<header class="header">交易投诉</header>
<div class="content-wrapper">
<div class="body-item">
<div class="title">投诉商户信息</div>
<div class="item">
<div class="item-name">商户名称</div>
<div class="item-value">
<input type="text" name="merchantName" class="item-input" value="${mercName}" readonly maxlength="15" autocomplete="off" placeholder="请输入投诉商户名称" >
</div>
</div>
<c:if test="${not empty mercPhone}">
<div class="item">
<div class="item-name">商户电话</div>
<div class="item-value">
<input type="text" class="item-input" value="${mercPhone}" readonly placeholder="请输入投诉商家联系方式" autocomplete="off" maxlength="11" >
</div>
</div>
</c:if>
</div>
<div class="body-item">
<div class="title">订单信息</div>
<div class="item">
<div class="item-name">订单金额</div>
<div class="item-value">
<input type="number" name="orderAmt" class="item-input" maxlength="10" autocomplete="off" placeholder="请输入投诉订单金额">
</div>
</div>
<div class="item">
<div class="item-name">交易时间</div>
<div class="item-value">
<input type="text" name="payTime" readonly id="payTime" class="item-input" autocomplete="off" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm'})" placeholder="请选择交易时间">
<img onclick="WdatePicker({el:'payTime',dateFmt:'yyyy-MM-dd HH:mm'})" src="${resourcePath}/js/My97DatePicker/skin/datePicker.gif" width="16" height="22" style="cursor:pointer" align="absmiddle">
</div>
</div>
</div>
<div class="body-item">
<div class="title">投诉人联系方式</div>
<div class="item">
<div class="item-name">手机号</div>
<div class="item-value">
<input type="number" name="complaintPhone" class="item-input" placeholder="您的联系方式,方便核实" autocomplete="off" maxlength="11" />
</div>
</div>
</div>
<div class="body-item">
<div class="title">投诉内容</div>
<div class="item-group">
<div class="item-value">
<textarea name="remark" cols="20" rows="8" maxlength="500" autocomplete="off" class="item-textarea"></textarea>
</div>
</div>
<div class="title flex">
<p class="title-p">上传交易账单及被骗截图</p>
<div class="img-count"><span id="uploadCount" class="img-now-count">0</span>/<span id="img-max" class="img-max">8</span></div>
</div>
<div class="item-group">
<div class="item-name"></div>
<div class="item-value">
<div class="weui-uploader__bd">
<ul class="img-box">
<li class="img" id="img-add">
<div class="weui-uploader__input-box">
<input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer-btn">
<button class="footer-submit-btn" id="submit">提交投诉</button>
</div>
</footer>
</div>
</form>
</body>
<script>
$(function (){
let allowTypes = ['image/jpg', 'image/jpeg', 'image/png', 'image/gif'];
let maxSize = 1024 * 1024*5; //5M
let maxCount = 8;
let maxWidth = 1900; // 图片最大宽度
let $uploaderFiles = $('#img-add');
$("#img-max").text(maxCount);
// let imageArr = [];
let tmpl = `<li class="img" data-index="#index#">
<img class="img-li" src="#url#" alt="">
<img class="img-del" src="${resourcePath}/images/icon-del.png" />
</li>`
$("#uploaderInput").on("change", function (e) {
files = e.target.files;
// 如果没有选中文件,直接返回
if (files.length === 0) {
return;
}
let nowCount = $("#uploadCount").text();
if (files.length + parseInt(nowCount) > maxCount) {
$.alert('最多只能上传' + maxCount + '张图片',"系统提示");
return;
}
for (let i = 0, len = files.length; i < len; ++i) {
let file = files[i];
// let imgID = new Date().getTime()+randomNum(1000,9999);
let reader = new FileReader();
let fileType = file.type;
// 如果类型不在允许的类型范围内
let fileName = file.name;
let suffix = fileName.substr(fileName.lastIndexOf(".")+1,fileName.length);
if (allowTypes.indexOf(file.type) === -1) {
$.alert('该类型不允许上传' + fileType,"系统提示");
continue;
}
if (file.size > maxSize) {
$.alert("图片太大,不允许上传!","系统提示");
continue;
}
reader.onload = function (e) {
var img = new Image();
img.onload = function () {
// 不要超出最大宽度
let w = Math.min(maxWidth, img.width);
// 高度按比例计算
let h = img.height * (w / img.width);
let canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d');
// 设置 canvas 的宽度和高度
canvas.width = w;
canvas.height = h;
ctx.drawImage(img, 0, 0, w, h);
let base64 = canvas.toDataURL(fileType,0.6); //0.6指的是压缩60%
$uploaderFiles.before($(tmpl.replace('#url#', base64).replace('#index#', i)));
let num = $('.img-li').length;
$('#uploadCount').text(num);
if($('.img-li').length == maxCount){
$("#img-add").hide();
}
if(suffix == "jpg"){
suffix = "jpeg";
}
};
img.src = e.target.result;
};
reader.readAsDataURL(file);
}
});
// 删除图片
$(document).on('click', '.img-del', function () {
$("#uploadCount").text(parseInt($("#uploadCount").text())-1)
$(this).parent().remove();
if($('.img-li').length < maxCount){
$("#img-add").show();
}
})
$("#submit").on("click",function (){
let $data = serialize($("#form"));
if(!$data.orderAmt){
$.alert("投诉订单金额不能为空!","系统提示");
return false;
}
if(!$data.payTime){
$.alert("投诉订单交易时间不能为空!","系统提示");
return false;
}
if(!$data.complaintPhone){
$.alert("投诉人联系方式不能为空!","系统提示");
return false;
}
let flag = checkPhone($data.complaintPhone);
if(!flag){
$.alert("手机号码有误,请重填","系统提示");
return false;
}
if(!$data.remark){
$.alert("投诉内容不能为空!","系统提示");
return false;
}
let imgd = $(".img-li");
if(imgd.length <= 0){
$.alert("请上传交易账单以及被骗的相关截图!","系统提示");
return false;
}
let imageArr = [];
imgd.each(function (){
let $base64 = $(this).attr("src");
imageArr.push($base64.replace("data:image/jpeg;base64,","").replace("data:image/png;base64,","").replace("data:image/jpg;base64,",""));
})
$data.imageList = imageArr;
let url = ctx + "/merchant/complaint/save";
$.showLoading("提交中...");
$.ajax({
url:url,
type:"post",
dataType:'json',
traditional:true,
data:$data,
success:(res)=>{
$.hideLoading();
$.alert(res.message,"系统提示");
}
})
return false;
})
})
function randomNum(minNum,maxNum){
switch(arguments.length){
case 1:
return parseInt(Math.random()*minNum+1,10);
break;
case 2:
return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);
break;
default:
return 0;
break;
}
}
function checkPhone(phone){
if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))){
return false;
}
return true;
}
function dateClick(){
}
</script>
</html>

View File

@@ -0,0 +1,36 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
<title>支付</title>
<jsp:include page="../../common.jsp" />
<script type="text/javascript" src="https://www.shouyinbei.net/resources/wap/js/json2.js"></script>
<link rel="stylesheet" href="https://www.shouyinbei.net/resources/wap/css/reset.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
</head>
<body style="background:#fff;">
<div class="content whitebg ml02 mr02">
<div class="textc">
</div>
<div class="textc f4 mt03 bdbc pb03"></div>
<div class="gray f3 mt05"><span class="ml02 mr02">${message}</span></div>
<div class="mt04 ml02 mr02 pb01 box">
</div>
</div>
<input type="hidden" id="timestamp" value=${timestamp }>
<input type="hidden" id="nonceStr" value=${nonceStr }>
<input type="hidden" id="signature" value=${signature }>
<input type="hidden" id="appId" value=${appId }>
<input type="hidden" id="merchantCode" value=${merchantCode }>
<input type="hidden" id="cardId" value=${cardId }>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>提示</title>
</head>
<body style="background:#ffff;">
<div class="login_form ml20 mr20 mt50">
<form method="post">
<div class="weui-cells weui-cells_form mt50 tcenter">
<div class=" f55 white dlblock radiusp50 padding15">
<img src="${resourcePath}/images/bg_error_msg.png" width="100" height="100">
</div>
<div style="font-weight: 700;color: #000000;font-size: 15px;text-align: center;">
${error}
</div>
</div>
<%-- <div class="btn mt50">
<a href="${ctx }/vip/myVIPCard?storeId=${storeId}" class="weui-btn weui-btn_primary radius10 f16 pt10 pb10">确定</a>
</div> --%>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,59 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>提示</title>
<style>
.footer{
text-align: center;
position: fixed;
bottom: 30%;
width: 100%;
color: #000;
}
.complaint{
color: red;
}
</style>
</head>
<body style="background:#ffff;">
<div class="page-title tcenter bluebg white h40 white positionr">
<div>
<span>提示</span>
</div>
</div>
<div class="login_form ml20 mr20 mt50">
<form method="post">
<div class="weui-cells weui-cells_form mt50 tcenter">
<div class=" f55 white dlblock radiusp50 padding15">
<img src="${resourcePath}/images/error_img.png" width="100" height="100">
</div>
<div class="mt30" style="font-weight: 700;color: #000000;font-size: 23px;text-align: center;">
${error}
</div>
</div>
</form>
</div>
<c:if test="${not empty token }">
<div class="footer">
<div class="footer-content">
如遭遇诈骗或交易纠纷,<a href="javascript:void(0)" id="complaint" class="complaint">请点此投诉</a>
</div>
</div>
</c:if>
</body>
<script>
$("#complaint").on("click",()=>{
let $token = '${token}';
if($token){
window.location.href = ctx + "/merchant/complaint/"+$token
}
})
</script>
</html>

View File

@@ -0,0 +1,134 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<jsp:include page="../../common.jsp" />
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>会员卡充值</title>
<style>
.h40{
height:40px;
line-height:40px;
}
</style>
</head>
<!doctype html>
<body class="">
<div class="bluebg pt20 pb15 positionr mt20 ml20 mr20 pl10 pr10 positionr radius5" style="min-height:150px;">
<div class="weui-flex">
<div class="weui-flex__item white">
<div class="f14 mb10">${merchantMenber.nickName }</div>
<div class="f14">${merchantMenber.memberCode }</div>
</div>
<div class="weui-flex__item white tright">
收银就用收银呗
</div>
</div>
<div class="f14 pt20 white">
<c:if test="${not empty activityRechargeList }">
<div class="mb10">
<span class="icon icon-18 f14 vm"></span><span class="vm ml10">
<c:forEach var="activityRecharge" items="${activityRechargeList }">
充<fmt:formatNumber type="number" value="${activityRecharge.rechargeMoney }" pattern="0.00" maxFractionDigits="2"/> 送<fmt:formatNumber type="number" value="${activityRecharge.giveMoney}" pattern="0.00" maxFractionDigits="2"/>
</c:forEach>
</span>
</div>
</c:if>
<!-- <div class="mb10"><span class="icon icon-18 f14 vm"></span><span class="vm ml10">充100送1充200送2充300送3</span></div>
<div class="mb10"><span class="icon icon-18 f14 vm"></span><span class="vm ml10">消费2返2</span></div>
<div class="mb10"><span class="icon icon-18 f14 vm"></span><span class="vm ml10">激活会员送100</span></div> -->
<div class="tright positiona bottom0 right0 pr20 pb15 pr10">
<span class="vm"><img src="https://www.shouyinbei.net/resources/wap/images/wollet.png" width="20"></span>
<span class="vm">钱包</span>
<span class="f28 vm"><fmt:formatNumber type="number" value="${merchantMenber.usableRechargeFee + merchantMenber.usableGiveFee }" pattern="0.00" maxFractionDigits="2"/></span>
</div>
</div>
</div>
<div class="weui-cells weui-cells_form bdbe ml20 mr20">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd"><label for="" class="weui-label f-black f22">¥</label></div>
<div class="weui-cell__bd">
<input class="weui-input tright" type="number" pattern="[0-9]*" id="rechargeMoney" value="weui input error" placeholder="请输入充值金额(元)">
</div>
</div>
</div>
<div class="weui-cells weui-cells_form bdbe pb20">
<div class="tcenter clearfix payTab">
<div class="f16 fl tcenter pt20 wp33 current">
<a href="javascript:void(0);" class="dblock radius5 pt10 pb10 ml10 mr10">200元</a>
</div>
<div class="f16 fl tcenter pt20 wp33">
<a href="javascript:void(0);" class="dblock radius5 pt10 pb10 ml10 mr10">150元</a>
</div>
<div class="f16 fl tcenter pt20 wp33">
<a href="javascript:void(0);" class="dblock radius5 pt10 pb10 ml10 mr10">50元</a>
</div>
<c:forEach items="${activityRechargeList }" var="activityRecharge">
<div class="f16 fl tcenter pt20 wp33">
<a href="javascript:void(0);" class="dblock radius5 pt10 pb10 ml10 mr10">${activityRecharge.rechargeMoney }元送${activityRecharge.giveMoney }元</a>
</div>
</c:forEach>
</div>
</div>
<div class="btn mt20 ml20 mr20">
<a href="javascript:void(0);onclick=memberPay()" class="weui-btn weui-btn_primary radius10 f14 pt15 pb15">立即充值</a>
</div>
<script>
$(function(){
$(".payTab>div").click(function(){
$(this).addClass("current").siblings("div").removeClass("current");
var a=$(".current a").text();
var money=a.split('元');
var rechargeMoney=money[0];
$("#rechargeMoney").val(rechargeMoney);
})
})
function memberPay(){
var rechargeMoney=$("#rechargeMoney").val();
if(StringUtil.isNotTwo(rechargeMoney)){
if(StringUtil.isBlank(rechargeMoney)){
alert("请输入金额");
return;
}
alert('请输入正确的金额格式(正整数或小数)');
return;
}
if(StringUtil.isNotBlank(rechargeMoney)){
if(rechargeMoney<0.01){
alert('充值金额必须大于0.01');
return;
}
}
$.ajax({
url:ctx+'/merchant/memberPay',
data:{
"consumeMoney":rechargeMoney,
'openId':'${merchantMenber.openid}',
'merchantCode':'${merchantMenber.merchantCode}',
'storeId':'${merchantMenber.storeId}',
},
dataType:"json",
type:"post",
success:function(res){
if(res.code=='1'){
window.location = res.jspay_url;
}else{
$.toast(res.msg,"text");
}
}
})
}
</script>
</body>
</html>

View File

@@ -0,0 +1,260 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>升级充值</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://www.shouyinbei.net/resources/wap/js/jquery.min.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet" href="http://unpkg.com/vue-ydui/dist/ydui.rem.css">
<!-- 引入rem自适应类库 -->
<script src="http://unpkg.com/vue-ydui/dist/ydui.flexible.js"></script>
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js"></script>
<style>
.body,html{
margin: 0;
padding: 0;
font-family: 微软雅黑, 宋体, Arial;
}
.center-top{
display: flex;
align-items: center;
justify-content: center;
height: 200px;
}
.yd-navbar-center-title,.yd-back-icon{
color: #fff !important;
}
.center{
margin-top: 20px;
padding: 20px;
background-color: #eee;
}
.chong{
width: 150px;
margin: 0 auto;
}
.b{
width: 100%;
height: 200px;
font-size: 20px;
font-family: 微软雅黑, 宋体, Arial;
}
.btn{
margin-top: 40px;
width: 100%;
height: 40px;
background-color: #f96a4f;
color:#fff;
border-radius: 5px;
border: 0;
}
.backdrop {
position: fixed;
z-index: 998;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,.1);
}
</style>
</head>
<body>
<div id='loading' class="backdrop" style="display: none; padding-top: 70%; text-align: center;">
<div>
<img src="${resourcePath}/images/loading-2.gif" alt="loading" />
</div>
<div style="font-family:'Microsoft YaHei';color:#000000;font-size: 0.5rem;">支付中...</div>
<!--自己放loding图片-->
</div>
<div id="app">
<yd-navbar title="充值" style="background-color: #f96a4f;">
<a to="#" slot="left">
<yd-navbar-back-icon></yd-navbar-back-icon>
</a>
</yd-navbar>
<c:if test="${level eq '1'}">
<div class="center-top">
<img class="b" src="https://www.shouyinbei.net/resources/images/levelLogo.png" alt="">
</div>
</c:if>
<c:if test="${level eq '2'}">
<div class="center-top">
<img class="b" src="https://www.shouyinbei.net/resources/images/levellogo1.png" alt="">
</div>
</c:if>
<c:if test="${level eq '1'}">
<div class="center">
<div class="chong">
<span style="font-size: 16px;" >充值金额:<b id="a">${twoUpVipAmount}</b>元</span>
</div>
<button class="btn" onclick="setFocusHander()">立即充值</button>
</div>
</c:if>
<c:if test="${level eq '2'}">
<div class="center">
<div class="chong">
<span style="font-size: 16px;" >充值金额:<b id="a">${threeUpVipAmount}</b>元</span>
</div>
<button class="btn" onclick="setFocusHander()">立即充值</button>
</div>
</c:if>
<input type="hidden" id="userAppId" value="${userAppId}">
<input type="hidden" id="payType" value="${payType}">
<input type="hidden" id="userid" value="${userid}">
<input type="hidden" id="openid" value="${openid}">
</div>
<!-- 引入 Vue -->
<script src="http://unpkg.com/vue"></script>
<!-- 引入组件库 -->
<script src="http://unpkg.com/vue-ydui/dist/ydui.rem.js"></script>
<!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
<script>
function isWeiXin(){
var ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
return true;
}else{
return false;
}
}
function isAlipay() {
var ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/Alipay/i) == "alipay"){
return true;
}else{
return false;
}
}
function setFocusHander(){
var money=$("#a").text();
var userAppId=$("#userAppId").val();
var payWay=$("#payType").val();
var userid=$("#userid").val();
var openid=$("#openid").val();
if(userAppId == "" || userAppId == null || userAppId == undefined){ // "",null,undefined
alert("用户id不能为空");
return;
}
if(money == "" || money == null || money == undefined){ // "",null,undefined
alert("金额不能为空!");
return;
}
$('#loading').css('display','block');
$.ajax({
url:ctx + '/merchant/upGradePay',
data:{
"userAppId": userAppId,
"money": money,
"payWay": payWay,
"level":${level},
"userid":userid,
"openid":openid,
},
dataType:"json",
type:"post",
success:function(res){
$('#loading').css('display','none');
if(res.code=='1'){
var rdata = res.data;
if("WXZF" == payWay){
WeixinJSBridge.invoke('getBrandWCPayRequest', {
// 商品名称
"appId" : rdata.payAppId,
"timeStamp" : rdata.payTimeStamp,
"nonceStr" : rdata.paynonceStr,
"package" : rdata.payPackage,
"signType" : rdata.paySignType,
"paySign" : rdata.paySign,
}, function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
//成功之后跳转地址
window.location = ctx + '/merchant/paySuccess';
} else {
alert("支付失败");
}
})
}else if("ZFBZF" == payWay){
var reg=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\/])+$/;
if(reg.test(rdata.source)){
window.location = rdata.source;
}else{
ap.tradePay({
tradeNO : rdata.source
}, function(res) {
if (res.resultCode == '9000') {
window.location = ctx + '/merchant/paySuccess'; //订单支付成功
} else if (res.resultCode == '8000') {
} else if (res.resultCode == '4000') {
ap.alert("订单支付失败");
} else if (res.resultCode == '6001') {
} else if (res.resultCode == '6002') {
ap.alert("网络连接出错");
}
});
}
}else{
window.location = rdata.redirectUrl;
}
}else{
alert(res.msg);
}
}
})
}
/* new Vue({
el: '#app',
data:{
input10:''
},
mounted(){
var money=this.$refs.a.innerHTML;
console.log(this.$refs.b.value)
},
methods: {
setFocusHander: function (){
var money=this.$refs.a.innerHTML;
var userId=this.$refs.b.value;
var payWay='';
if(isWeiXin()){
payWay='WXZF';
}else{
payWay='ZFBZF';
}
$.ajax({
url:'/wap/wechat/leshuaPay',
data:{
"userId": userId,
"money": money,
"payWay": payWay,
},
dataType:"json",
type:"post",
success:function(res){
if(res.code=='1'){
window.location=res.jspay_url;
}else{
alert(res.msg);
}
}
})
},
}
}) */
</script>
</body>
</html>

View File

@@ -0,0 +1,893 @@
<%@ page contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="request"/>
<c:set var="resourcePath" value="${ctx}/resources" scope="request"/>
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="${resourcePath}/css/weui.css">
<link rel="stylesheet" href="${resourcePath}/css/weuix.css">
<%--<script type="text/javascript" src="${resourcePath}/js/zepto.min.js"></script>--%>
<%--<script type="text/javascript" src="${resourcePath}/js/zepto.weui.js"></script>--%>
<script type="text/javascript" src="${resourcePath}/js/swiper.min.js"></script>
<script type="text/javascript" src="${resourcePath}/js/utils/StringUtil.js"></script>
<%--<script type="text/javascript" src="${resourcePath}/js/utils/DateUtil.js"></script>--%>
<%--<script type="text/javascript" src="${resourcePath}/js/global.js"></script>--%>
<%--<link href="https://www.shouyinbei.net/resources/wap/css/weui.min.css" type="text/css" rel="stylesheet" />--%>
<script src="https://www.shouyinbei.net/resources/js/alipayjsapi.min3.1.1.js"></script>
<script src="${resourcePath}/js/third-party/jquery/jquery-1.11.0.min.js"></script>
<%--<script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>--%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>向商家付款</title>
<style type="text/css">
.logo {
margin: 2vw !important;
line-height: 1;
height: 10vw;
position: relative;
}
.logo img {
margin: 0;
height: 10vw;
border-radius: 50%;
}
.logo div.title {
position: absolute;
margin-left: 2vw;
display:inline-block;
height: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
line-height: 10vw;
font-size: 5vw;
right: 64px;
left: 36px;
}
.logo div.right {
right: 0;
font-size: 4vw;
display: inline-block;
color: #df6051;
line-height: 10vw;
position: relative;
}
.item {
height: 80px;
padding: 5px 20px;
}
.shangLogo {
width: 30%;
height: 100%;
position: relative;
float: left;
}
.bs {
padding: 0 10px;
border-bottom: none;
}
.shouyin {
text-align: center;
left: 50%;
padding: 7px;
background-color: #f8f8f8;
color: #000;
font-size: 12px;
border-bottom: white solid 1px;
}
.gongsi p {
width: 100%;
height: 120px;
line-height: 120px;
text-align: center;
}
.mt40 {
margin-top: 40px;
}
.moneyPay {
padding-left: 30px;
background: url(../resources/images/bankcard.png) no-repeat left
}
.weui-cell {
justify-content: space-between;
}
.weui-cell:before {
border-top: 0;
}
.weui-cells:after {
border-bottom: 0;
}
.weui-cells:before {
border-top: 0;
}
.vm {
vertical-align: center;
padding: 10px 0;
}
.submit, .del {
padding: 0 !important;
}
.weui-footer_fixed-bottom {
bottom: 0;
-webkit-user-select: none;
-moz-user-select: none;
}
.showKeyBoard {
animation: showKeyBoard 200ms;
-moz-animation: showKeyBoard 200ms;
-webkit-animation: showKeyBoard 200ms;
-o-animation: showKeyBoard 200ms;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
.hiddenKeyBoard {
animation: hiddenKeyBoard 200ms;
-moz-animation: hiddenKeyBoard 200ms;
-webkit-animation: hiddenKeyBoard 200ms;
-o-animation: hiddenKeyBoard 200ms;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
.weui-btn+.weui-btn {
margin: 0;
}
.weui-btn+.weui-cell {
padding: 15px;
}
.weui-btn {
border-radius: 0 !important;
border: 0 !important;
font-size: 22px;
}
.weui-btn:after {
border-radius: 0 !important;
border: 1px solid white;
}
.f-submit{
line-height: 50px;
}
/*input::-webkit-input-placeholder { !* WebKit browsers 适配谷歌 *!*/
/* color: #000;*/
/*}*/
/*input:-moz-placeholder { !* Mozilla Firefox 4 to 18 适配火狐 *!*/
/* color: #000;*/
/*}*/
/*input::-moz-placeholder { !* Mozilla Firefox 19+ 适配火狐 *!*/
/* color: #000;*/
/*}*/
/*input:-ms-input-placeholder { !* Internet Explorer 10+ 适配ie*!*/
/* color: #000;*/
/*}*/
img {
pointer-events:none;/* 禁止长按图片保存 */
}
/* 隐藏键盘动画 */
@keyframes hiddenKeyBoard
{
from {bottom: 0;}
to {bottom: -224px;}
}
@-moz-keyframes hiddenKeyBoard /* Firefox */
{
from {bottom: 0;}
to {bottom: -224px;}
}
@-webkit-keyframes hiddenKeyBoard /* Safari and Chrome */
{
from {bottom: 0;}
to {bottom: -224px;}
}
@-o-keyframes hiddenKeyBoard /* Opera */
{
from {bottom: 0;}
to {bottom: -224px;}
}
/* 弹出键盘动画 */
@keyframes showKeyBoard
{
from {bottom: -224px;}
to {bottom: 0;}
}
@-moz-keyframes showKeyBoard /* Firefox */
{
from {bottom: -224px;}
to {bottom: 0;}
}
@-webkit-keyframes showKeyBoard /* Safari and Chrome */
{
from {bottom: -224px;}
to {bottom: 0;}
}
@-o-keyframes showKeyBoard /* Opera */
{
from {bottom: -224px;}
to {bottom: 0;}
}
.backdrop {
position: fixed;
z-index: 998;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,.1);
}
</style>
</head>
<body style="background: #fff;">
<div id='loading' class="backdrop" style="display: none; padding-top: 70%; text-align: center;">
<div>
<img src="${resourcePath}/images/loading-2.gif" alt="loading" />
</div>
<div style="font-family:'Microsoft YaHei';color:#000000;font-size: 1rem;">支付中...</div>
<!--自己放loding图片-->
</div>
<!-- <div class="page-title tcenter h40 bluebg white">
<span>收银呗</span>
</div> -->
<div class="logo" style="margin: 10px;">
<img src="https://www.shouyinbei.net/resources/images/syblogo.png" />
<div class="title" style="color:black;">${storeName}</div>
<div class="right" onclick="showRemarkDialog()">
添加备注
</div>
</div>
<%-- <div class="tcenter">--%>
<%-- <img src="https://www.shouyinbei.net/resources/images/merchant.png"--%>
<%-- style="height: 30px; width: 30px" class="vm">--%>
<%-- </div>--%>
<div class="weui-cells weui-cells_form bs" style="margin-top: 30px">
<div class="weui-cell weui-cell_warn bdbe" style="background-color: #f8f8f8; border-radius: 5px;">
<div class="weui-cell__hd">
<label class="weui-label f-black f26">金额</label>
</div>
<div class="weui-cell__bd">
<input class="weui-input f26 tright" name="comsumeMoney"
id="comsumeMoney" value="" placeholder="¥0.00"
style="color: #000;">
</div>
</div>
<div class="weui-cells weui-cells_form" style="margin-top: 10px;">
<c:if test="${payType eq 'wx'}">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd">
<span class="icon icon-14 f26 vm f-green"></span>
<span class="f-black f18 ml10">微信支付</span>
</div>
<div class="weui-cells_checkbox">
<label class="weui-check__label" style="padding: 0;">
<div class="weui-cell__hd">
<input type="radio" class="weui-check" name="radio1"
value="weixinPay" checked="checked"> <i
class="weui-icon-checked"></i>
</div>
</label>
</div>
</div>
<%-- <c:if test="${isMember eq '1'}">--%>
<%-- <div class="weui-cell weui-cell_warn">--%>
<%-- <div class="weui-cell__hd">--%>
<%-- <span class="icon icon-42 f26 vm "></span>--%>
<%-- <span class="f-black f18 ml10">会员卡支付</span>--%>
<%-- <span class="weui-cell__hd f16" style="color: #ccc;">--%>
<%-- <c:forEach items="${activityRechargeList }" var="activityRecharge">--%>
<%-- 充${activityRecharge.rechargeMoney }送${activityRecharge.giveMoney}--%>
<%-- </c:forEach>--%>
<%-- </span>--%>
<%-- </div>--%>
<%-- <div class="weui-cells_checkbox">--%>
<%-- <label class="weui-check__label" style="padding: 0;">--%>
<%-- <div class="weui-cell__hd">--%>
<%-- <input type="radio" class="weui-check" name="radio1"--%>
<%-- value="memberPay"> <i class="weui-icon-checked"></i>--%>
<%-- </div>--%>
<%-- </label>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div class="weui-cell weui-cell_warn">--%>
<%-- <div class="weui-cell__hd">--%>
<%-- <span class="f18 ml10" style="color:#bbb;">会员卡余额:<fmt:formatNumber type="number" value="${balance}" pattern="0.00" maxFractionDigits="2"/></span>--%>
<%-- </div>--%>
<%-- <div class="weui-cell__hd">--%>
<%-- <a href="javascript:void(0)" onclick="goMemberPay()" style="color:#FF586A;" class="f16 mr10">充值</a>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </c:if>--%>
<%-- <c:if test="${isMember ne '1'}">--%>
<%-- <div class="weui-cell weui-cell_warn">--%>
<%-- <div class="weui-cell__hd">--%>
<%-- <span class="icon icon-42 f26 vm "></span>--%>
<%-- <span class="f-black f18 ml10">会员卡支付</span>--%>
<%-- <span class="weui-cell__hd f16" style="color: #ccc;">--%>
<%-- <c:forEach items="${activityRechargeList }" var="activityRecharge">--%>
<%-- 充${activityRecharge.rechargeMoney }送${activityRecharge.giveMoney}--%>
<%-- </c:forEach>--%>
<%-- </span>--%>
<%-- </div>--%>
<%-- <div class="weui-cell__hd">--%>
<%-- <a href="javascript:void(0)" onclick="openVIPCard()" style="color:#FF586A;" class="f16 mr10">开通</a>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </c:if>--%>
</c:if>
</div>
</div>
<input type="hidden" id="code" value="${code }">
<input type="hidden" id="nickName" value="${nickName }">
<input type="hidden" id="userImg" value="${userImg }">
<input type="hidden" id="auth_code" value="${auth_code}">
<input type="hidden" id="openid" value="${openid }">
<input type="hidden" id="userid" value="${userid }">
<input type="hidden" id="userAppId" value="${userAppId }">
<input type="hidden" id="merchantCode" value="${merchantCode }">
<input type="hidden" id="storeId" value="${storeId }">
<input type="hidden" id="aisleSwitch" value="${aisleSwitch }">
<input type="hidden" id="leshuaMchId" value="${leshuaMchId }">
<input type="hidden" id="isMember" value="${isMember }">
<input type="hidden" id="unionId" value="${unionId }">
<input type="hidden" id="qrNo" value="${qrNo}">
<%-- <div class="btn mt40 ml20 mr20">--%>
<%-- <a href="javascript:void(0);onclick=paySuccessOrFail()"--%>
<%-- class="weui-btn weui-btn_primary radius10 f14 pt5 pb5">确&nbsp;&nbsp;认&nbsp;&nbsp;支&nbsp;&nbsp;付</a>--%>
<%-- </div>--%>
<%-- <div class="gongsi">--%>
<%-- <p>@2019&nbsp;武汉融商创银科技有限公司</p>--%>
<%-- </div>--%>
<div class="weui-mask" style="opacity: 1;"></div>
<div class="weui-dialog" style="opacity: 1;">
<div class="weui-dialog__hd">
<strong class="weui-dialog__title">备注信息</strong>
</div>
<div class="weui-dialog__bd">
<input type="text" class="weui-input weui-prompt-input" placeholder="请输入备注" id="remark" name="remark" value="">
</div>
<div class="weui-dialog__ft">
<a href="javascript:;" class="weui-dialog__btn default" onclick="hiddenRemarkDialog()">取消</a>
<a href="javascript:;" class="weui-dialog__btn primary" onclick="enterRemark()">确定</a>
</div>
</div>
<div class="weui-footer_fixed-bottom">
<div class="shouyin">
<p>收&nbsp;银&nbsp;就&nbsp;用&nbsp;收&nbsp;银&nbsp;呗</p>
</div>
<div class="weui-flex tcenter f26 f-black" style="padding: 0;">
<div class="weui-flex__item">
<div class="weui-btn weui-btn_default" onclick="onNumberDown(1)">
<div class="swiper-container">1</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown(4)">
<div class="swiper-container">4</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown(7)">
<div class="swiper-container">7</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown('.')">
<div class="swiper-container">.</div>
</div>
</div>
<div class="weui-flex__item">
<div class="weui-btn weui-btn_default" onclick="onNumberDown(2)">
<div class="swiper-container">2</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown(5)">
<div class="swiper-container">5</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown(8)">
<div class="swiper-container">8</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown(0)">
<div class="swiper-container">0</div>
</div>
</div>
<div class="weui-flex__item">
<div class="weui-btn weui-btn_default" onclick="onNumberDown(3)">
<div class="swiper-container">3</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown(6)">
<div class="swiper-container">6</div>
</div>
<div class="weui-btn weui-btn_default" onclick="onNumberDown(9)">
<div class="swiper-container">9</div>
</div>
<div class="weui-cell weui-btn weui-btn_default" onclick="hiddenKeyBoard()">
<img class="swiper-container" src="<%=request.getAttribute("resourcePath")%>/images/keyboard.png" width="26px" height="26px" />
</div>
</div>
<div class="weui-flex__item">
<div class="weui-cell weui-btn weui-btn_default del" onclick="backSpace()">
<img class="swiper-container" src="<%=request.getAttribute("resourcePath")%>/images/del.png" width="26px" height="26px" />
</div>
<div class="weui-cell weui-btn_default weui-swiped-btn_warn f-white submit" onclick="paySuccessOrFail()">
<div class="swiper-container f22 f-submit">
<p>支</p><p>付</p>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
// // 初始化
// var vConsole = new VConsole();
// console.log('VConsole is cool');
var isKeyBoardVisible = false;
/** 是否需要打开自己写的键盘 */
var showDiyKeyBoardFlag = false;
/** 自定义键盘是否可见 */
var isDiyKeyBoardVisible = true;
/** 网页初始高度 */
var winHeight;
/** 网页实时高度 */
var thisHeight;
/** 备注 */
var remark;
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
// 通过下面这个API隐藏右上角按钮
WeixinJSBridge.call('hideOptionMenu');
});
$(function (){
winHeight = window.innerHeight;
window.onresize = function(){
thisHeight = window.innerHeight;
// confirm("winHeight : " + winHeight);
// confirm("thisHeight : " + thisHeight);
if(winHeight - thisHeight > 50){
// confirm("当前系统键盘可见");
isKeyBoardVisible = true;
//当软键盘弹出,在这里面操作
if (showDiyKeyBoardFlag) {
hiddenKeyBoardImmediately();
}
}else{
isKeyBoardVisible = false;
//当软键盘收起,在此处操作
if (showDiyKeyBoardFlag) {
showDiyKeyBoard();
}
}
}
let del = $(".del");
let submit = $(".submit");
let parent = $(".del").parent();
console.log("total height: " + parent.parent().height());
parent.height(parent.parent().height());
console.log("del height: " + (parent.height() / 4));
del.height(parent.height() / 4);
console.log("submit height: " + (parent.height() * 3 / 4));
submit.height(parent.height() * 3 / 4);
$("#comsumeMoney").focus(function() {
showKeyBoard();
document.activeElement.blur();
});
$("#remark").focus(function () {
showDiyKeyBoardFlag = false;
hiddenKeyBoardImmediately()
console.log("remark winHeight " + winHeight);
$(window).height(winHeight * 0.8);
console.log("remark winHeight " + $(window).height());
});
$(".shouyin").click(function() {
showKeyBoard();
});
});
function isWeiXin() {
var ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
return true;
} else {
return false;
}
}
function isAlipay() {
var ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/Alipay/i) == "alipay"){
return true;
}else{
return false;
}
}
function paySuccessOrFail() {
var comsumeMoney = $("#comsumeMoney").val();//消费金额
var aisleSwitch = $("#aisleSwitch").val();//通道
var leshuaMchId = $("#leshuaMchId").val();//乐刷商户id
var userImg = $("#userImg").val();//支付用户头像
var nickName = $("#nickName").val();//昵称
var pattern = /^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/;
if (!pattern.test(comsumeMoney)) {
alert('请输入正确的金额(保留两位有效数字)');
return;
}
if (StringUtil.isNotBlank(comsumeMoney)) {
if (comsumeMoney < 0.01) {
alert('充值金额必须大于0.01');
return;
}
}
if (aisleSwitch == '0') {//1乐刷通道 0官方通道
if (isWeiXin()) {
wechatPay(comsumeMoney, userImg, nickName);// 微信支付
} else {
aliPay(comsumeMoney, userImg, nickName);
}
} else{
tradePay(comsumeMoney, leshuaMchId, userImg, nickName);
}
}
// 微信支付
function wechatPay(comsumeMoney, userImg, nickName) {
var openid = $('#openid').val();
var code = $("#code").val();
var userAppId = $("#userAppId").val();
var storeId = $("#storeId").val();
var merchantCode = $("#merchantCode").val();
var remark = $("#remark").val();
$.ajax({
url : '${ctx}/merchant/wechatPay',
data : {
"openid" : openid,
"merchantCode" : merchantCode,
"comsumeMoney" : comsumeMoney,
"userAppId" : userAppId,
"storeId" : storeId,
"userImg" : userImg,
"nickName" : nickName,
"remark" : remark
},
dataType : "json",
type : "post",
success : function(result) {
var rdata = result.data;
WeixinJSBridge.invoke('getBrandWCPayRequest', {
// 商品名称
"appId" : rdata.appId,
"timeStamp" : rdata.timeStamp,
"nonceStr" : rdata.nonceStr,
"package" : rdata.packageMsg,
"signType" : rdata.signType,
"paySign" : rdata.paySgin,
}, function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
//成功之后跳转地址
window.location = '${ctx}/merchant/paySuccess';
} else {
alert("支付失败");
}
})
},
error : function(data) {
alert('系统错误请稍后再试')
}
})
}
// 支付宝支付
function aliPay(comsumeMoney, userImg, nickName) {
var auth_code = $("#auth_code").val();
var userid = $("#userid").val();
var userAppId = $("#userAppId").val();
var storeId = $("#storeId").val();
var merchantCode = $("#merchantCode").val();
var remark = $("#remark").val();
$.ajax({
url : '${ctx}/merchant/aliPay',
dataType : 'json',
"type" : "post",
data : {
'comsumeMoney' : comsumeMoney,
"merchantCode" : merchantCode,
"storeId" : storeId,
'userid' : userid,
"userAppId" : userAppId,
"userImg" : userImg,
"nickName" : nickName,
"remark" : remark,
},
success : function(data) {
if ("1" == data.code) {
ap.tradePay({
tradeNO : data.transNo
}, function(res) {
if (res.resultCode == '9000') {
window.location = '${ctx}/merchant/paySuccess'; //订单支付成功
} else if (res.resultCode == '8000') {
} else if (res.resultCode == '4000') {
ap.alert("订单支付失败");
} else if (res.resultCode == '6001') {
} else if (res.resultCode == '6002') {
ap.alert("网络连接出错");
}
});
} else {
alert(data.resultMsg);
}
},
error : function(data) {
alert('系统错误请稍后再试')
}
});
}
//统一支付入口
function tradePay(comsumeMoney, leshuaMchId, userImg, nickName) {
var radioPay = $("input[name='radio1']:checked").val();//是会员选择的
var storeId = $("#storeId").val();
var openid = $("#openid").val();
var merchantCode = $("#merchantCode").val();
var remark = $("#remark").val();
var isMember = $("#isMember").val();
var userId = $("#userid").val();
var unionId = $("#unionId").val();
var qrNo = $("#qrNo").val();
var payWay = "";
if (isWeiXin()) {
payWay = "WXZF";
} else if(isAlipay()){
payWay = "ZFBZF";
}else{
payWay = "UNIONPAY";
}
//var index = layer.msg('支付中...', {icon: 16,time:0,shade : [0.3 , '#000' , false]});
$('#loading').css('display','block');
$.ajax({
url : '${ctx}/merchant/tradePay',
data : {
"comsumeMoney" : comsumeMoney,
"leshuaMchId" : leshuaMchId,
"merchantCode" : merchantCode,
"storeId" : storeId,
"payWay" : payWay,
"userImg" : userImg,
"nickName" : nickName,
"remark" : remark,
"openid" : openid,
"isMember" : isMember,
"radioPay" : radioPay,
"userId" : userId,
"unionId" : unionId,
"snNo" : qrNo,
},
dataType : "json",
type : "post",
success : function(res) {
$('#loading').css('display','none');
if (res.isMember == '1') {
window.location = '${ctx}/merchant/paySuccess';
} else if (res.isMember == '0') {
window.location = '${ctx}/wap/merchant/payFail';
} else {
if (res.code == 200) {
//乐刷
var rdata = res.data;
if("WXZF" == payWay){
WeixinJSBridge.invoke('getBrandWCPayRequest', {
// 商品名称
"appId" : rdata.payAppId,
"timeStamp" : rdata.payTimeStamp,
"nonceStr" : rdata.paynonceStr,
"package" : rdata.payPackage,
"signType" : rdata.paySignType,
"paySign" : rdata.paySign,
}, function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok" || res.err_msg == "stopMonitoringBeacons:ok") {
//成功之后跳转地址
window.location = '${ctx}/merchant/jumpUrl?orderNumber='+rdata.orderNumber;
} else {
cancelPay(rdata.orderNumber);
alert("支付失败");
}
})
}else if("ZFBZF" == payWay){
var reg=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\/])+$/;
if(reg.test(rdata.source)){
window.location = rdata.source;
}else{
ap.tradePay({
tradeNO : rdata.source
}, function(res) {
if (res.resultCode == '9000') {
window.location = '${ctx}/merchant/jumpUrl?orderNumber='+rdata.orderNumber;//订单支付成功
} else if (res.resultCode == '8000') {
} else if (res.resultCode == '4000') {
cancelPay(rdata.orderNumber);
ap.alert("订单支付失败");
} else if (res.resultCode == '6001' || res.resultCode == '99') {
cancelPay(rdata.orderNumber);
} else if (res.resultCode == '6002') {
cancelPay(rdata.orderNumber);
ap.alert("网络连接出错");
}
});
}
}else{
window.location = rdata.redirectUrl;
}
} else {
alert(res.message);
}
}
}
})
}
function cancelPay(m) {
var url = "${ctx}/merchant/cancelPay/"+m;
$.get(url, (res)=>{
console.log(res);
})
}
<%--function goMemberPay(){--%>
<%-- /*var storeId=$("#storeId").val();--%>
<%-- var merchantCode=$("#merchantCode").val();--%>
<%-- var openid=$("#openid").val();*/--%>
<%-- var openid = $("#openid").val();--%>
<%-- window.location = '${ctx}/vip/goPay?cardNo=${cardNo}';--%>
<%--}--%>
<%--function openVIPCard() {--%>
<%-- var storeId=$("#storeId").val();--%>
<%-- var merchantCode=$("#merchantCode").val();--%>
<%-- var openid=$("#openid").val();--%>
<%-- window.location= '${ctx}/vip/vipOpenCard?storeId='+storeId+'&merchantCode='+merchantCode+'&openid='+openid;--%>
<%--}--%>
function showDiyKeyBoard() {
isDiyKeyBoardVisible = true;
$(".weui-footer_fixed-bottom").removeClass("hiddenKeyBoard");
$(".weui-footer_fixed-bottom").addClass("showKeyBoard");
}
function hiddenDiyKeyBoard() {
isDiyKeyBoardVisible = false;
$(".weui-footer_fixed-bottom").removeClass("showKeyBoard");
$(".weui-footer_fixed-bottom").addClass("hiddenKeyBoard");
}
function hiddenKeyBoard() {
showDiyKeyBoardFlag = false;
if (isDiyKeyBoardVisible) {
hiddenDiyKeyBoard()
}
}
function showKeyBoard() {
showDiyKeyBoardFlag = true;
// 两种键盘都不可见,则调用动画
if (!isDiyKeyBoardVisible && !isKeyBoardVisible) {
// confirm("当前自定义键盘不可见;系统键盘不可见");
showDiyKeyBoard();
}
}
/**
* 立即收起自定义键盘
*/
function hiddenKeyBoardImmediately() {
showDiyKeyBoardFlag = false;
isDiyKeyBoardVisible = false;
$(".weui-footer_fixed-bottom").removeClass("showKeyBoard");
$(".weui-footer_fixed-bottom").removeClass("hiddenKeyBoard");
$(".weui-footer_fixed-bottom").css("bottom", "-224px");
}
function onNumberDown(num) {
let number = $('#comsumeMoney').val();
if (number === "" || number === "undefined" || number === undefined || number === null) {
number = "0";
}
let dotPosition = number.indexOf(".");
if (dotPosition !== -1 && num === ".") {
return;
}
if (dotPosition !== -1 && (dotPosition + 3) === number.length) {
return;
}
if (number === "0" && num !== ".") {
number = num;
} else {
number += num;
}
$('#comsumeMoney').val(number);
}
function backSpace() {
let number = $('#comsumeMoney').val();
$('#comsumeMoney').val(number.substr(0, number.length - 1));
}
/** 打开备注弹窗 */
function showRemarkDialog() {
hiddenKeyBoardImmediately()
$("#remark").val(remark);
$(".weui-mask").addClass("weui-mask--visible");
$(".weui-dialog").addClass("weui-dialog--visible");
}
/** 收起备注弹窗 */
function hiddenRemarkDialog() {
$(".weui-mask").removeClass("weui-mask--visible");
$(".weui-dialog").removeClass("weui-dialog--visible");
showDiyKeyBoard();
}
function enterRemark() {
remark = $("#remark").val();
$(".weui-mask").removeClass("weui-mask--visible");
$(".weui-dialog").removeClass("weui-dialog--visible");
showDiyKeyBoard();
}
</script>
</html>

View File

@@ -0,0 +1,107 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>提示</title>
<script src="https://www.shouyinbei.net/resources/js/alipayjsapi.min3.1.1.js"></script>
<style>
html {
font-family: Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;
word-spacing: .03125rem;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.lineH2{
line-height: 2rem;
}
p{
font-size: 16px;
}
.btn{
border: 0;
border-radius: 20px;
height: 1.8rem;
background-color: #FF586A;
color: #fff;
font-size: .8rem;
width: 80%;
}
</style>
</head>
<body style="background:#ffff;">
<div class="page-title tcenter bluebg white h40 white positionr">
<div>
<span>提示</span>
</div>
</div>
<div class="login_form ml20 mr20 mt50">
<div class="weui-cells weui-cells_form mt50 tcenter">
<div class=" f55 white dlblock radiusp50 padding15">
<img src="${resourcePath}/images/error_img.png" width="100" height="100">
</div>
<div class="lineH2" style="text-align: center;">
<p>您的付款距离与店铺过远,请当面付款!</p>
<p>如位置判断有误,授权获取定位后支付!</p>
</div>
<div class="mt30" style="display: ${empty province ? 'block' : 'none'}">
<button class="btn read">获取定位</button>
</div>
</div>
</div>
<form id="form" class="hiddenForm">
<input type="hidden" id="code" name="code" value="${code}">
<input type="hidden" id="auth_code" name="auth_code" value="${auth_code}">
<input type="hidden" id="userAuthCode" name="userAuthCode" value="${userAuthCode}">
<input type="hidden" id="merchantCode" name="merchantCode" value="${merchantCode}">
<input type="hidden" id="userAppId" name="userAppId" value="${userAppId}">
<input type="hidden" id="qrNo" name="qrNo" value="${qrNo}">
<input type="hidden" id="payType" name="payType" value="${payType}">
<input type="hidden" id="cokus" name="cokus" value="${cokus}">
<input type="hidden" id="province" name="province" value="">
</form>
</body>
<script>
function ready(callback) {
// 如果jsbridge已经注入则直接调用
if (window.AlipayJSBridge) {
callback && callback();
} else {
// 如果没有注入则监听注入的事件
document.addEventListener('AlipayJSBridgeReady', callback, false);
}
}
ready(function() {
document.querySelector('.read').addEventListener('click', function() {
AlipayJSBridge.call('getCurrentLocation', { bizType: '$s',requestType:1}, function(result) {
if (result.error) {
AlipayJSBridge.call('alert', {
title: '提示',
message: result.errorMessage,
button: '确定'
}, function(e) {
});
return;
}else{
let province = result.province;
$("#province").val(province);
let data = $("#form").serialize();
window.location.href = ctx + "/merchant/h5pay?"+data;
}
});
});
});
</script>
</html>

View File

@@ -0,0 +1,39 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>支付失败</title>
</head>
<body style="background:#ffff;">
<div class="page-title tcenter bluebg white h40 white positionr">
<div>
<span>支付失败</span>
<!-- <a href="javascript:history.go(-1);" class="white f21 h40 left0 top0 positiona">
<span class="dblock w40 h40 icon icon-59 white f22"></span>
</a> -->
</div>
</div>
<div class="login_form ml20 mr20 mt50">
<form method="post">
<div class="weui-cells weui-cells_form mt50 tcenter">
<div class="bg-red icon icon-95 f55 white dlblock radiusp50 padding15">
</div>
<div class="mt30" style="font-weight: 700;color: #000;font-size: 22px;text-align: center;">
支付失败!
</div>
</div>
<%-- <div class="btn mt50">
<a href="${ctx }/vip/myVIPCard?storeId=${storeId}" class="weui-btn weui-btn_primary radius10 f16 pt10 pb10">确定</a>
</div> --%>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,36 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>支付成功</title>
</head>
<body style="background:#fff;">
<div class="page-title tcenter bluebg white h40 white positionr">
<div>
<span>提示</span>
<!-- <a href="javascript:history.go(-1);" class="white f21 h40 left0 top0 positiona">
<span class="dblock w40 h40 icon icon-59 white f22"></span>
</a> -->
</div>
</div>
<div class="login_form ml20 mr20 mt50">
<form method="post">
<div class="weui-cells weui-cells_form mt50 tcenter">
<div class="bg-red icon icon-66 f55 white dlblock radiusp50 padding15">
</div>
<div class="mt30" style="font-weight: 700;color: #000;font-size: 22px;text-align: center;">
支付成功
</div>
</div>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>注册成功</title>
</head>
<body style="background:#f7f8fa;">
<%-- <div class="page-title tcenter bluebg white h40 white positionr">--%>
<%-- <div>--%>
<%-- <span>注册成功</span>--%>
<%-- <a href="javascript:history.go(-1);" class="white f21 h40 left0 top0 positiona">--%>
<%-- <span class="dblock w40 h40 icon icon-59 white f22"></span>--%>
<%-- </a>--%>
<%-- </div>--%>
<%-- </div>--%>
<div class="login_form ml20 mr20 mt50">
<form method="post">
<div class="weui-cells weui-cells_form mt50 tcenter">
<div class="bg-green icon icon-66 f55 white dlblock radiusp50 padding15">
</div>
<div class="mt30">
成功!
</div>
</div>
</form>
</div>
<div class="btn ml20 mr20 mr40" style="margin-top:2rem;">
<a href="javascript:void(0);" id="btnOpenApp" class="weui-btn weui-btn_primary radius10 f14 pt15 pb15">已有账号,下载登录</a>
</div>
</body>
<script src="https://static.jmlk.co/scripts/dist/jmlink.min.js"></script>
<script type="text/javascript">
new JMLink({
jmlink:'https://bztg6y.jglinks.cn/AAp2',
button:document.querySelector('a#btnOpenApp'),
autoLaunchApp : false,
downloadWhenUniversalLinkFailed: true,
inapp : false,
params: {}
});
</script>
</html>

View File

@@ -0,0 +1,251 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>分享</title>
<style>
div,body,p,span,h1,h2,h3,h4{ color:#333}
input::-webkit-input-placeholder {
font-family: Avenir,Helvetica,Arial,sans-serif;
/* placeholder颜色 */
color: rgb(118, 118, 118);
/*color: #aab2bd;*/
/* placeholder字体大小 */
font-size: 18px;
/* placeholder位置 */
}
input {
border:none;
border-bottom: 1px solid #000
}
.mr40{
margin-top:40px;
}
.bg-logo{
height:8rem;
width:100%;
background-repeat: no-repeat;
background-size:contain;
background-position:center 0;
background-image: url('${resourcePath}/images/bg_logo.png');
}
.kaptcha{
width: 80px;
height: 32px;
}
.weui-cells{
height: 60px;
}
</style>
</head>
<body>
<div class="bg-logo">
</div>
<!-- <div class="page-title tcenter h40 bluebg white">
<span>分享</span>
<a href="个人中心.html" class="white f21 h40 left0 top0 positiona">
<span class="dblock w40 h40 icon icon-59 white f22"></span>
</a>
</div>-->
<div class="weui-cells weui-cells_form bdbe" style="margin-top:10px;">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd"><span class="icon icon-90 f24"></span></div>
<div class="weui-cell__bd">
<input class="weui-input tleft pl10" id="phone" type="number" pattern="[0-9]*" value="weui input error" placeholder="请输入手机号码">
</div>
</div>
</div>
<div class="weui-cells weui-cells_form bdbe">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd"><span class="icon icon-71 f24"></span></div>
<div class="weui-cell__bd">
<input class="weui-input tleft pl10" id="validateCode" type="text" maxlength="4" value="" placeholder="请输入图形验证码">
</div>
<div class="weui-cell__bd tright">
<img src="${ctx}/kaptcha/get" onclick="refreshKaptcha(this)" class="kaptcha dlblock white f12" />
</div>
</div>
</div>
<div class="weui-cells weui-cells_form bdbe">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd"><span class="icon icon-71 f24"></span></div>
<div class="weui-cell__bd">
<input class="weui-input tleft pl10" id="phoneverify" type="number" pattern="[0-9]*" value="weui input error" placeholder="请输入验证码">
</div>
<div class="weui-cell__bd tright">
<a href="javascript:void(0);onclick=verification()" id="obtain" class="weui-btn_primary radius5 pt10 pb10 pl10 pr10 dlblock white f12">获取验证码</a>
</div>
</div>
</div>
<div class="weui-cells weui-cells_form bdbe">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd"><span class="icon icon-31 f24"></span></div>
<div class="weui-cell__bd">
<input class="weui-input tleft pl10" type="password" id="password" maxlength="20" placeholder="请输入6~20位登录密码">
</div>
</div>
</div>
<div class="weui-cells weui-cells_form bdbe">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd"><span class="icon icon-31 f24"></span></div>
<div class="weui-cell__bd pl10">
<input class="weui-input tleft" type="password" id="againPassword" maxlength="20" placeholder="请再次输入登录密码"/>
</div>
</div>
<input type="hidden" id="inviteNum" value="${inviteNum }">
</div>
<div class="weui-cells weui-cells_form bdbe">
<div class="weui-cell weui-cell_warn">
<div class="weui-cell__hd"><span class="icon icon-123 f24"></span></div>
<div class="weui-cell__bd pl10">
<input class="weui-input tleft" type="text" readonly value="推荐人:${userName}${enPhone }"/>
</div>
</div>
</div>
<div class="btn ml20 mr20 mr40">
<!-- <a href="javascript:void(0);" class="weui-btn weui-btn_primary radius10 f14 pt15 pb15">推荐人:${userName}${enPhone}</a -->
<a href="javascript:void(0);" onclick="goreGister()" class="weui-btn weui-btn_primary radius10 f14 pt15 pb15">注册</a>
<a href="javascript:void(0);" id="btnOpenApp" class="weui-btn weui-btn_primary radius10 f14 pt15 pb15">已有账号,下载登录</a>
</div>
</body>
<script src="https://static.jmlk.co/scripts/dist/jmlink.min.js"></script>
<script type="text/javascript">
new JMLink({
jmlink:'https://bztg6y.jglinks.cn/AAp2',
button:document.querySelector('a#btnOpenApp'),
autoLaunchApp : false,
downloadWhenUniversalLinkFailed: true,
inapp : false,
params: {}
});
function goreGister(){
var phone=$("#phone").val();
var phoneverify=$("#phoneverify").val();
var password=$("#password").val();
var againPassword=$("#againPassword").val();
var inviteNum=$("#inviteNum").val();
var phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
// var psdReg = /^(?=.*[a-z|A-Z]).{6,20}$/;
if (!phoneReg.test(phone)) {
$.alert("请输入正确的手机号","系统提示");
return;
}
if (!password || !againPassword) {
$.alert("请输入登录密码","系统提示");
return;
}
if (password.length < 6) {
$.alert("密码长度6到20位","系统提示");
return;
}
if(password!=againPassword){
$.alert("两次的密码必须相同!","系统提示");
return;
}
$.showLoading("提交中...")
$.ajax({
url:ctx+'/merchant/goRegister',
data:{
"inviteNum":inviteNum,
"phoneverify" : phoneverify,
"phone":phone,
"password":password,
},
dataType:"json",
type:"post",
success:function(res){
$.hideLoading();
if(res.code == '200'){
window.location.href = ctx+ "/merchant/registerSuccess";
}else{
$.alert(res.message,"系统提示");
}
},
error:function(res){
$.hideLoading();
$.alert("系统繁忙,请稍后再试","系统提示");
},
})
}
function verification() {
var phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
var phone=$.trim($("#phone").val());
if (!phoneReg.test(phone)) {
$.alert("请输入正确的手机号","系统提示");
return;
}
var validateCode = $.trim($("#validateCode").val());
if(!validateCode){
$.alert("请输入图形验证码","系统提示");
return;
}
var href = 'javascript:void(0); onclick=verification()';
var _this = $("#obtain");
_this.removeAttr("href");
$.showLoading("获取中...");
$.ajax({
url:ctx+'/vip/getPhoneCode',
data:{
"phone":phone,
"validateCode" : validateCode
},
dataType:"json",
type:"post",
success:function(data){
//成功
$.hideLoading();
if(data.code=='1'){
var sec = 60;
var timer = window.setInterval(function() {
sec--;
if (sec > 0) {
_this.text(sec + "秒重新发送!");
} else {
// 去掉定时器
window.clearInterval(timer);
_this.text("获取验证码");
_this.attr("href","javascript:void(0); onclick=verification()");
}
}, 1000);
}else if(data.code=='0'){
$.alert("获取验证码失败,请稍后再试","系统提示");
_this.text("获取验证码");
_this.attr("href",href);
}else if(data.code=='2'){
//系统错误
$.alert("系统繁忙!","系统提示");
_this.text("获取验证码");
_this.attr("href",href);
}else if(data.code=='3'){
$.alert("手机号已被注册!","系统提示");
_this.text("获取验证码");
_this.attr("href",href);
}else{
$.alert(data.msg,"系统提示");
_this.text("获取验证码");
_this.attr("href",href);
}
}
})
}
function refreshKaptcha(obj){
let url = $(obj).attr("src");
let time = new Date().getTime();
if(url.indexOf("?") > 0){
url = url.split("?")[0]
}
$(obj).attr("src",url+"?t="+ time);
}
</script>
</html>

View File

@@ -0,0 +1,103 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<jsp:include page="../../common.jsp" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>提示</title>
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
<style>
html {
font-family: Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;
word-spacing: .03125rem;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.lineH2{
line-height: 2rem;
}
p{
font-size: 16px;
}
.btn{
border: 0;
border-radius: 20px;
height: 1.8rem;
background-color: #FF586A;
color: #fff;
font-size: .8rem;
width: 80%;
}
</style>
</head>
<body style="background:#ffff;">
<div class="login_form ml20 mr20 mt50">
<div class="weui-cells weui-cells_form mt50 tcenter">
<div class=" f55 white dlblock radiusp50 padding15">
<img src="${resourcePath}/images/error_img.png" width="100" height="100">
</div>
<div class="lineH2" style="text-align: center;">
<p>您的付款距离与店铺过远,请当面付款!</p>
<p>如位置判断有误,授权获取定位后支付!</p>
</div>
<div class="mt30" style="display: ${empty province ? 'block' : 'none'}">
<button class="btn read" onclick="getLocation()">获取定位</button>
</div>
</div>
</div>
</body>
<script>
wx.config({
debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来若要查看传入的参数可以在pc端打开参数信息会通过log打出仅在pc端时才会打印。
appId: '${appId}', // 必填,公众号的唯一标识
timestamp: '${timestamp}', // 必填,生成签名的时间戳
nonceStr: '${noncestr}', // 必填,生成签名的随机串
signature: '${sign}',// 必填,签名
jsApiList: ["getLocation"], // 必填需要使用的JS接口列表
verifyJsApiList:["geoLocation"]
});
wx.ready(function(){
// config信息验证后会执行ready方法所有接口调用都必须在config接口获得结果之后config是一个客户端的异步操作所以如果需要在页面加载时就调用相关接口则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口则可以直接调用不需要放在ready函数中。
});
wx.error(function(res){
// config信息验证失败会执行error函数如签名过期导致验证失败具体错误信息可以打开config的debug模式查看也可以在返回的res参数中查看对于SPA可以在这里更新签名。
});
function getLocation(){
$.showLoading("获取中...");
wx.miniProgram.geoLocation({
type: 'gcj02', // 默认为wgs84的gps坐标如果要返回直接给openLocation用的火星坐标可传入'gcj02'
success: function (res) {
let latitude = res.latitude; // 纬度浮点数范围为90 ~ -90
let longitude = res.longitude; // 经度浮点数范围为180 ~ -180。
getAddress(latitude,longitude);
},cancel:function (){
$.alert("请先授权获取位置信息!");
},fail:function (res){
$.alert(JSON.stringify(res));
}
});
}
function getAddress(latitude,longitude){
let url = ctx + "/wechat/getAddress";
$.post(url,{lat:latitude,lng:longitude},function (res){
$.hideLoading();
if(res.code != 200){
return $.alert(res.message,"系统提示");
}
window.localStorage.setItem("province",res.data);
window.location.href = ctx + "/merchant/recharge?storeId=${storeId}&appOpenId=${appOpenId}"
})
}
</script>
</html>