...
|
...
|
@@ -24,6 +24,10 @@ const indexModel = require('../models/index'); |
|
|
const index = async function(req, res, next) {
|
|
|
let {e_id, token = ''} = req.query;
|
|
|
let isApp = req.yoho.isApp;
|
|
|
let userAgent = req.get('User-Agent');
|
|
|
|
|
|
let isYohobuy = /yohobuy/i.test(userAgent);
|
|
|
let isMiniprogram = /miniprogram/i.test(userAgent);
|
|
|
|
|
|
/**
|
|
|
* 用于渲染错误结果页面
|
...
|
...
|
@@ -47,7 +51,7 @@ const index = async function(req, res, next) { |
|
|
|
|
|
|
|
|
// 如果不在小程序或app中打开则返回
|
|
|
if (!isApp) {
|
|
|
if (!isApp || (!isYohobuy && !isMiniprogram)) {
|
|
|
return renderErroPage({msg: WRONG_INVIROMENT});
|
|
|
}
|
|
|
|
...
|
...
|
|