Authored by 郭成尧

Merge branch 'master' into hotfix/couponselect

@@ -13,7 +13,8 @@ exports.index = (req, res) => { @@ -13,7 +13,8 @@ exports.index = (req, res) => {
13 page: 'birthday', 13 page: 'birthday',
14 title: '生日券', 14 title: '生日券',
15 width750: true, 15 width750: true,
16 - localCss: true 16 + localCss: true,
  17 + isApp: req.yoho.isApp
17 }; 18 };
18 19
19 res.render('birthday', responseData); 20 res.render('birthday', responseData);
@@ -54,7 +54,7 @@ module.exports = { @@ -54,7 +54,7 @@ module.exports = {
54 yh_channel: params.yh_channel, 54 yh_channel: params.yh_channel,
55 limit: params.limit || 60, 55 limit: params.limit || 60,
56 need_filter: 'null', 56 need_filter: 'null',
57 - rec_pos: '100004', 57 + rec_pos: '100053',
58 gender: params.gender || gender[params.yh_channel] 58 gender: params.gender || gender[params.yh_channel]
59 }, { 59 }, {
60 cache: true 60 cache: true
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </div> 11 </div>
12 <div class="rule-item"> 12 <div class="rule-item">
13 <div>领取资格:</div> 13 <div>领取资格:</div>
14 - <div>您在领取时,必须是有货VIP银卡、金卡、白金卡用户,<a href="//m.yohobuy.com/home/grade">(了解您当前的VIP级别)</a>,且在个人信息中已完善生日信息<a href="//m.yohobuy.com/home/mydetails">(查看/完善个人信息)</a></div> 14 + <div>您在领取时,必须是有货VIP银卡、金卡、白金卡用户,<a href='//m.yohobuy.com/home/grade?openby:yohobuy={"action":"go.vipInfo"}'>(了解您当前的VIP级别)</a>,且在个人信息中已完善生日信息{{#unless @root.isApp}}<a href="//m.yohobuy.com/home/mydetails">(查看/完善个人信息)</a>{{/unless}}</div>
15 </div> 15 </div>
16 </div> 16 </div>
17 <p class="foot-tip">温馨提示:同一用户一年内(365天)仅可以领取一次生日特惠哦!</p> 17 <p class="foot-tip">温馨提示:同一用户一年内(365天)仅可以领取一次生日特惠哦!</p>
@@ -8,8 +8,9 @@ exports.familyIndex = (req, res, next) => { @@ -8,8 +8,9 @@ exports.familyIndex = (req, res, next) => {
8 let contentCodeOne = '486e6adc7c83001b2e9e83996438fab8'; 8 let contentCodeOne = '486e6adc7c83001b2e9e83996438fab8';
9 let contentCodeTwo = 'eebbcc60607ac443922d8fabe44eb222'; 9 let contentCodeTwo = 'eebbcc60607ac443922d8fabe44eb222';
10 let isMarsApp = req.yoho.isMarsApp; 10 let isMarsApp = req.yoho.isMarsApp;
  11 + let protocol = req.protocol;
11 12
12 - req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp).then(result => { 13 + req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp, protocol).then(result => {
13 res.render('family/index', { 14 res.render('family/index', {
14 page: 'family', 15 page: 'family',
15 title: 'YOHO!Family', 16 title: 'YOHO!Family',
@@ -433,7 +433,7 @@ class familyModel extends global.yoho.BaseModel { @@ -433,7 +433,7 @@ class familyModel extends global.yoho.BaseModel {
433 /** 433 /**
434 * family主页 434 * family主页
435 */ 435 */
436 - familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp) { 436 + familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp, protocol) {
437 return Promise.all([ 437 return Promise.all([
438 this._userData(uid), 438 this._userData(uid),
439 this._getCode(uid), 439 this._getCode(uid),
@@ -445,6 +445,11 @@ class familyModel extends global.yoho.BaseModel { @@ -445,6 +445,11 @@ class familyModel extends global.yoho.BaseModel {
445 let familyIndexData = {}; 445 let familyIndexData = {};
446 446
447 if (result[0] && result[0].data) { 447 if (result[0] && result[0].data) {
  448 +
  449 + if (result[0].data.headIco) {
  450 + result[0].data.headIco = result[0].data.headIco.replace('img01.yohomars.com', 'imgmars.yohobuy.com').replace('img02.yohomars.com', 'imgmars.yohobuy.com'); // eslint-disable-line
  451 + }
  452 +
448 familyIndexData = _.assign(familyIndexData, { 453 familyIndexData = _.assign(familyIndexData, {
449 head_ico: result[0].data.headIco, 454 head_ico: result[0].data.headIco,
450 nickname: result[0].data.nickName, 455 nickname: result[0].data.nickName,
@@ -472,9 +477,9 @@ class familyModel extends global.yoho.BaseModel { @@ -472,9 +477,9 @@ class familyModel extends global.yoho.BaseModel {
472 } 477 }
473 478
474 if (isMarsApp) { 479 if (isMarsApp) {
475 - familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:mars={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}'; 480 + familyIndexData.userInfoLink = `${protocol}://m.yohobuy.com/home/family/userInfo?openby:mars={"action":"go.h5","params":{"url":"${protocol}://m.yohobuy.com/home/family/userInfo"}}`;
476 } else { 481 } else {
477 - familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}'; 482 + familyIndexData.userInfoLink = `${protocol}://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"${protocol}://m.yohobuy.com/home/family/userInfo"}}`;
478 } 483 }
479 484
480 return familyIndexData; 485 return familyIndexData;
@@ -545,6 +550,9 @@ class familyModel extends global.yoho.BaseModel { @@ -545,6 +550,9 @@ class familyModel extends global.yoho.BaseModel {
545 let vip = 0; // 从family进入二维码,暂时显示0 550 let vip = 0; // 从family进入二维码,暂时显示0
546 let hideTips = true; 551 let hideTips = true;
547 552
  553 + if (result[0].data.headIco) {
  554 + result[0].data.headIco = result[0].data.headIco.replace('img01.yohomars.com', 'imgmars.yohobuy.com').replace('img02.yohomars.com', 'imgmars.yohobuy.com'); // eslint-disable-line
  555 + }
548 556
549 result[0].data.gender = (thisGender === '1' ? 'BOY' : 'GIRL'); 557 result[0].data.gender = (thisGender === '1' ? 'BOY' : 'GIRL');
550 result[0].data.otherGender = (thisGender === '1' ? 'GIRL' : 'BOY'); 558 result[0].data.otherGender = (thisGender === '1' ? 'GIRL' : 'BOY');
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 </a> 27 </a>
28 <a class="iconfont qrcode" href="/home/newQrcode">&#xe73a;</a> 28 <a class="iconfont qrcode" href="/home/newQrcode">&#xe73a;</a>
29 <div class="gif-part hide"></div> 29 <div class="gif-part hide"></div>
30 - <!-- <a class="family-entry" href="//m.yohobuy.com/home/family"></a> --> 30 + <a class="family-entry" href="//m.yohobuy.com/home/family">
31 {{/ baseInfo}} 31 {{/ baseInfo}}
32 {{else}} 32 {{else}}
33 <a class="login-btn" href="{{signinUrl}}" data-refer="{{referUrl}}"> 33 <a class="login-btn" href="{{signinUrl}}" data-refer="{{referUrl}}">
@@ -26,7 +26,7 @@ const domains = { @@ -26,7 +26,7 @@ const domains = {
26 26
27 module.exports = { 27 module.exports = {
28 app: 'h5', 28 app: 'h5',
29 - appVersion: '6.3.0', // 调用api的版本 29 + appVersion: '6.2.3', // 调用api的版本
30 port: 6001, 30 port: 6001,
31 siteUrl: '//m.yohobuy.com', 31 siteUrl: '//m.yohobuy.com',
32 assetUrl: '//127.0.0.1:5001', 32 assetUrl: '//127.0.0.1:5001',
1 { 1 {
2 "name": "yohobuywap-node", 2 "name": "yohobuywap-node",
3 - "version": "6.3.0", 3 + "version": "6.2.30",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -4,7 +4,7 @@ require('3party/question-list.page.css'); @@ -4,7 +4,7 @@ require('3party/question-list.page.css');
4 let $ = require('yoho-jquery'), 4 let $ = require('yoho-jquery'),
5 yoho = require('yoho-app'); 5 yoho = require('yoho-app');
6 6
7 -const DETAIL_URI = 'http://m.yohobuy.com/3party/questionnaire'; 7 +const DETAIL_URI = location.protocol + '//m.yohobuy.com/3party/questionnaire';
8 8
9 require('../common'); 9 require('../common');
10 10
@@ -115,7 +115,7 @@ $list.on('click', 'li', function() { @@ -115,7 +115,7 @@ $list.on('click', 'li', function() {
115 if (canShare && yoho && yoho.isApp) { 115 if (canShare && yoho && yoho.isApp) {
116 yoho.invokeMethod('go.showShareAlert', { 116 yoho.invokeMethod('go.showShareAlert', {
117 title: data.title, 117 title: data.title,
118 - link: 'https://m.yohobuy.com/3party/questionnaire/' + data.id, 118 + link: DETAIL_URI + '/' + data.id,
119 desc: data.desc, 119 desc: data.desc,
120 imgUrl: data.img 120 imgUrl: data.img
121 }); 121 });