shawenguan 1 gadu atpakaļ
vecāks
revīzija
accd4d9ce2
1 mainītis faili ar 10 papildinājumiem un 10 dzēšanām
  1. 10 10
      Scripts/huluwa/huluwaHelper.js

+ 10 - 10
Scripts/huluwa/huluwaHelper.js

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