|
@@ -357,15 +357,15 @@ function buildHeader(method, url, body) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function getUserInfo(appId, token) {
|
|
async function getUserInfo(appId, token) {
|
|
|
- const url = '/front-manager/api/customer/queryById/token';
|
|
|
|
|
|
|
+ let url = '/front-manager/api/customer/queryById/token';
|
|
|
const method = 'post';
|
|
const method = 'post';
|
|
|
const data = {appId};
|
|
const data = {appId};
|
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
|
headers['X-access-token'] = token;
|
|
headers['X-access-token'] = token;
|
|
|
return new Promise((resolve, _reject) => {
|
|
return new Promise((resolve, _reject) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ url = HOST + url;
|
|
|
const body = JSON.stringify(data);
|
|
const body = JSON.stringify(data);
|
|
|
- const url = HOST + url;
|
|
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|
|
@@ -394,7 +394,7 @@ async function getUserInfo(appId, token) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function getChannelActivity(id, token) {
|
|
async function getChannelActivity(id, token) {
|
|
|
- const url = '/front-manager/api/customer/promotion/channelActivity';
|
|
|
|
|
|
|
+ let url = '/front-manager/api/customer/promotion/channelActivity';
|
|
|
const method = 'post';
|
|
const method = 'post';
|
|
|
const data = {id};
|
|
const data = {id};
|
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
@@ -402,8 +402,8 @@ async function getChannelActivity(id, token) {
|
|
|
|
|
|
|
|
return new Promise((resolve, _reject) => {
|
|
return new Promise((resolve, _reject) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ url = HOST + url;
|
|
|
const body = JSON.stringify(data);
|
|
const body = JSON.stringify(data);
|
|
|
- const url = HOST + url;
|
|
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|
|
@@ -432,7 +432,7 @@ async function getChannelActivity(id, token) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function getChannelInfoId(appId) {
|
|
async function getChannelInfoId(appId) {
|
|
|
- const url = '/front-manager/api/get/getChannelInfoId';
|
|
|
|
|
|
|
+ let url = '/front-manager/api/get/getChannelInfoId';
|
|
|
const method = 'post';
|
|
const method = 'post';
|
|
|
const data = {appId};
|
|
const data = {appId};
|
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
@@ -440,8 +440,8 @@ async function getChannelInfoId(appId) {
|
|
|
|
|
|
|
|
return new Promise((resolve, _reject) => {
|
|
return new Promise((resolve, _reject) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ url = HOST + url;
|
|
|
const body = JSON.stringify(data);
|
|
const body = JSON.stringify(data);
|
|
|
- const url = HOST + url;
|
|
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|
|
@@ -470,7 +470,7 @@ async function getChannelInfoId(appId) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function appoint(activityId, channelId, token) {
|
|
async function appoint(activityId, channelId, token) {
|
|
|
- const url = '/front-manager/api/customer/promotion/appoint';
|
|
|
|
|
|
|
+ let url = '/front-manager/api/customer/promotion/appoint';
|
|
|
const method = 'post';
|
|
const method = 'post';
|
|
|
const data = {activityId, channelId};
|
|
const data = {activityId, channelId};
|
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
@@ -478,8 +478,8 @@ async function appoint(activityId, channelId, token) {
|
|
|
|
|
|
|
|
return new Promise((resolve, _reject) => {
|
|
return new Promise((resolve, _reject) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ url = HOST + url;
|
|
|
const body = JSON.stringify(data);
|
|
const body = JSON.stringify(data);
|
|
|
- const url = HOST + url;
|
|
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|
|
@@ -508,7 +508,7 @@ async function appoint(activityId, channelId, token) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function checkCustomerInQianggou(activityId, channelId, token) {
|
|
async function checkCustomerInQianggou(activityId, channelId, token) {
|
|
|
- const url = '/front-manager/api/customer/promotion/checkCustomerInQianggou';
|
|
|
|
|
|
|
+ let url = '/front-manager/api/customer/promotion/checkCustomerInQianggou';
|
|
|
const method = 'post';
|
|
const method = 'post';
|
|
|
const data = {activityId, channelId};
|
|
const data = {activityId, channelId};
|
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
const headers = buildHeader(method, url, JSON.stringify(data));
|
|
@@ -516,8 +516,8 @@ async function checkCustomerInQianggou(activityId, channelId, token) {
|
|
|
|
|
|
|
|
return new Promise((resolve, _reject) => {
|
|
return new Promise((resolve, _reject) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ url = HOST + url;
|
|
|
const body = JSON.stringify(data);
|
|
const body = JSON.stringify(data);
|
|
|
- const url = HOST + url;
|
|
|
|
|
let options = {
|
|
let options = {
|
|
|
url: url,
|
|
url: url,
|
|
|
headers: headers,
|
|
headers: headers,
|