同济口腔 支付成功但挂号失败时
- 前端处理:支付成功,跳转界面——显示挂号异常
- 前端处理:我的挂号——返回错误消息
- 后台处理:推送模版消息 挂号失败,失败原因(HIS)

去挂号.png
支付成功且挂号成功后跳转页面显示

支付成功.png
修改后的支付成功但挂号失败时跳转页面显示,跳转时间为10秒
<!DOCTYPE html>
<html>
<div ng-if="RegisterInfo">
</div>
<div ng-if="!RegisterInfo" class="noneInfo">
<h3 class="list-group-item text-center" style="color:red;">挂号异常</h3>
<ul class="list-group">
<li class="list-group-item">*挂号结果请以微信稍后推送消息为准。</li>
<li class="list-group-item marT">*您也可通过'我的挂号'查询结果,若无相关挂号信息则挂号失败。</li>
</ul>
</div>
</html>
//定义一个RegisterInfo 变量,在HTML中加上以上这段代码后,判断他有没有值,没有值就是没拿到就诊ID,那么挂号就失败了
$scope.RegisterInfo = null;
$scope.showLoading = true;
$http({
url: commonFunctions.getAPIUrl($scope.AppId) +
"/api/appointment/register?appid=" + $scope.AppId,
method: 'POST',
withCredentials: false,
data: JSON.stringify({
"method": "GetRegisterByHisOrder",
"params": [$scope.AppId, commonFunctions.getParameterByName("out_trade_no")]
}),
}).success(function (data) {
$scope.showLoading = false;
if (data.code == "0") {
if (data.result) {
// AttendId 就诊ID HIS唯一就诊号
if (data.result.AttendId){
$scope.RegisterInfo = data.result;
}
}
}
if (!$scope.RegisterInfo){
$scope.countDown = 10; //20180830:挂号异常10秒跳转.
}
});

挂号异常.png
我的挂号,异常时代码修改,添加的新代码如下
<!DOCTYPE html>
<html>
<div ng-bind="noneInfos(historyRegisterList,currentRegisterList)" class="noInfo"></div>
</html>
//没有挂号信息时提示
$scope.noneInfos = function (history,current) {
if(current.length == 0){
if(history.length == 0){
return '未查询到挂号记录!'
}
return '未查询到当日挂号记录!'
}
return '';
}
我的挂号,挂号成功时的界面显示

我的挂号.png