Authored by zzzzzzz

解决冲突

1 'use strict'; 1 'use strict';
2 -const api = global.yoho.ServiceAPI; 2 +const service = global.yoho.ServiceAPI;
  3 +const api = global.yoho.LiveAPI;
3 const contentCodeConfig = require('../../../config/content-code'); 4 const contentCodeConfig = require('../../../config/content-code');
4 const resourcesProcess = require(`${global.utils}/resources-process`); 5 const resourcesProcess = require(`${global.utils}/resources-process`);
5 6
@@ -21,6 +22,18 @@ const _formatTime = (a, b) => { @@ -21,6 +22,18 @@ const _formatTime = (a, b) => {
21 :${time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()}`; 22 :${time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes()}`;
22 }; 23 };
23 24
  25 +// 获取顶部bannel
  26 +let _getBannerData = () => {
  27 + return service.get('operations/api/v5/resource/get', {
  28 + content_code: contentCodeConfig.live.index
  29 + }, {
  30 + code: 200,
  31 + cache: true
  32 + }).then((result) => {
  33 + return result.data ? resourcesProcess(result.data) : [];
  34 + });
  35 +};
  36 +
24 // 获取精选视频 37 // 获取精选视频
25 const _getBestList = () => { 38 const _getBestList = () => {
26 return api.get('v1/living/best', {}, { 39 return api.get('v1/living/best', {}, {
@@ -49,18 +62,6 @@ const _getBestList = () => { @@ -49,18 +62,6 @@ const _getBestList = () => {
49 }); 62 });
50 }; 63 };
51 64
52 -// 获取顶部bannel  
53 -let _getBannerData = () => {  
54 - return api.get('operations/api/v5/resource/get', {  
55 - content_code: contentCodeConfig.live.index  
56 - }, {  
57 - code: 200,  
58 - cache: true  
59 - }).then((result) => {  
60 - return result.data ? resourcesProcess(result.data) : [];  
61 - });  
62 -};  
63 -  
64 // 获取直播中所有视频 65 // 获取直播中所有视频
65 const _getLivingList = () => { 66 const _getLivingList = () => {
66 return api.get('v1/living/listing', {}, { 67 return api.get('v1/living/listing', {}, {
@@ -17,7 +17,8 @@ module.exports = { @@ -17,7 +17,8 @@ module.exports = {
17 // api: 'http://devapi.yoho.cn:58078/', 17 // api: 'http://devapi.yoho.cn:58078/',
18 // service: 'http://devservice.yoho.cn:58077/' 18 // service: 'http://devservice.yoho.cn:58077/'
19 api: 'http://testapi.yoho.cn:28078/', 19 api: 'http://testapi.yoho.cn:28078/',
20 - service: 'http://testservice.yoho.cn:28077/' 20 + service: 'http://testservice.yoho.cn:28077/',
  21 + liveApi: 'http://api.live.yoho.cn/'
21 }, 22 },
22 subDomains: { 23 subDomains: {
23 host: '.m.yohobuy.com', 24 host: '.m.yohobuy.com',
@@ -86,7 +87,8 @@ if (isProduction) { @@ -86,7 +87,8 @@ if (isProduction) {
86 appName: 'm.yohobuy.com', 87 appName: 'm.yohobuy.com',
87 domains: { 88 domains: {
88 api: 'http://api.yoho.yohoops.org/', 89 api: 'http://api.yoho.yohoops.org/',
89 - service: 'http://service.yoho.yohoops.org/' 90 + service: 'http://service.yoho.yohoops.org/',
  91 + liveApi: 'http://api.live.yoho.cn/'
90 }, 92 },
91 memcache: { 93 memcache: {
92 master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], 94 master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
@@ -114,7 +116,8 @@ if (isProduction) { @@ -114,7 +116,8 @@ if (isProduction) {
114 appName: 'm.yohobuy.com for test', 116 appName: 'm.yohobuy.com for test',
115 domains: { 117 domains: {
116 api: 'http://testapi.yoho.cn:28078/', 118 api: 'http://testapi.yoho.cn:28078/',
117 - service: 'http://testservice.yoho.cn:28077/' 119 + service: 'http://testservice.yoho.cn:28077/',
  120 + liveApi: 'http://api.live.yoho.cn/'
118 }, 121 },
119 memcache: { 122 memcache: {
120 master: ['127.0.0.1:12111'], 123 master: ['127.0.0.1:12111'],
@@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
56 "uuid": "^2.0.2", 56 "uuid": "^2.0.2",
57 "winston": "^2.2.0", 57 "winston": "^2.2.0",
58 "winston-daily-rotate-file": "^1.2.0", 58 "winston-daily-rotate-file": "^1.2.0",
59 - "yoho-node-lib": "0.0.40" 59 + "yoho-node-lib": "0.0.41"
60 }, 60 },
61 "devDependencies": { 61 "devDependencies": {
62 "autoprefixer": "^6.3.7", 62 "autoprefixer": "^6.3.7",