...
|
...
|
@@ -24,6 +24,11 @@ exports.appAdapter = (req, res, next) => { |
|
|
exports.page = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.query.uid;
|
|
|
}
|
|
|
|
|
|
|
|
|
userApi.profile(req.user.uid)
|
|
|
.then(userinfo => {
|
|
|
userinfo = userinfo.data;
|
...
|
...
|
@@ -49,12 +54,18 @@ exports.page = (req, res, next) => { |
|
|
};
|
|
|
|
|
|
exports.getOrders = (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.query.uid;
|
|
|
}
|
|
|
|
|
|
orderModel.getOrders({
|
|
|
type: req.query.type || 1,
|
|
|
page: req.query.page || 1,
|
|
|
gender: req.query.gender || '1,3',
|
|
|
yh_channel: req.query.channel || 1,
|
|
|
uid: req.user.uid
|
|
|
uid
|
|
|
}).then(result => {
|
|
|
res.render('chat/chat-order', {
|
|
|
layout: false,
|
...
|
...
|
@@ -69,7 +80,12 @@ exports.getOrders = (req, res, next) => { |
|
|
*
|
|
|
*/
|
|
|
exports.fetchHistory = (req, res) => {
|
|
|
const uid = req.user.uid;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.query.uid;
|
|
|
}
|
|
|
|
|
|
const endTime = req.query.endTime;
|
|
|
|
|
|
imApi.fetchImHistory(uid, endTime).then(result => {
|
...
|
...
|
@@ -79,7 +95,12 @@ exports.fetchHistory = (req, res) => { |
|
|
|
|
|
|
|
|
exports.msghistory = (req, res) => {
|
|
|
const uid = req.user.uid;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.query.uid;
|
|
|
}
|
|
|
|
|
|
|
|
|
imApi.fetchImHistory(uid).then(result => {
|
|
|
res.json(result);
|
...
|
...
|
@@ -94,7 +115,12 @@ exports.msghistory = (req, res) => { |
|
|
* content 留言内容
|
|
|
*/
|
|
|
exports.saveMSG = (req, res) => {
|
|
|
const uid = req.user.uid;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.body.uid;
|
|
|
}
|
|
|
|
|
|
const conversationId = req.body.conversationId;
|
|
|
const content = req.body.content;
|
|
|
|
...
|
...
|
@@ -113,7 +139,12 @@ exports.saveMSG = (req, res) => { |
|
|
* 2. 失败情况
|
|
|
*/
|
|
|
exports.fetchOrders = (req, res) => {
|
|
|
const uid = req.user.uid;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.query.uid;
|
|
|
}
|
|
|
|
|
|
|
|
|
imApi.fetchOrderList(uid)
|
|
|
.then(result => {
|
...
|
...
|
@@ -128,7 +159,12 @@ exports.fetchOrders = (req, res) => { |
|
|
};
|
|
|
|
|
|
exports.saveEvalute = (req, res) => {
|
|
|
const uid = req.user.uid;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.body.uid;
|
|
|
}
|
|
|
|
|
|
|
|
|
const conversationId = req.body.conversationId;
|
|
|
const promoter = req.body.promoter;
|
...
|
...
|
@@ -148,7 +184,12 @@ exports.saveEvalute = (req, res) => { |
|
|
|
|
|
|
|
|
exports.queryGlobalOrder = (req, res) => {
|
|
|
const uid = req.user.uid;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
if (!uid) {
|
|
|
uid = req.query.uid;
|
|
|
}
|
|
|
|
|
|
|
|
|
let emptyOrder = {
|
|
|
code: 200,
|
...
|
...
|
|