Authored by weiqingting

添加 app_version 到 User-Agent

@@ -144,6 +144,7 @@ exports.index = (req, res, next) => { @@ -144,6 +144,7 @@ exports.index = (req, res, next) => {
144 let code = 'a83b7d55324fb65f96c1f85a3387ebd8'; 144 let code = 'a83b7d55324fb65f96c1f85a3387ebd8';
145 let uid = req.__USER__.uid; 145 let uid = req.__USER__.uid;
146 let options; 146 let options;
  147 + let noLoginUrl = helpers.urlFormat('/activity/student/register')+'?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '://m.yohobuy.com/activity/student"}}}';
147 148
148 149
149 150
@@ -183,23 +184,14 @@ exports.index = (req, res, next) => { @@ -183,23 +184,14 @@ exports.index = (req, res, next) => {
183 if (coupons && coupons.data) { 184 if (coupons && coupons.data) {
184 coupons.link = link && link.data ? link.data[0].url + (req.__USER__.isApp ? '&app_version=' + req.__USER__.app_version : '') : ''; 185 coupons.link = link && link.data ? link.data[0].url + (req.__USER__.isApp ? '&app_version=' + req.__USER__.app_version : '') : '';
185 coupons.data = (coupons.data || []).map((item) => { 186 coupons.data = (coupons.data || []).map((item) => {
  187 + // let url = item.image.url;
186 couponids.push(item.couponID); 188 couponids.push(item.couponID);
187 189
188 - if (!req.__USER__.isLogin) {  
189 - item.image.url = 'http://m.yohobuy.com/activity/student/register?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student"}}}';  
190 - }  
191 -  
192 - // if (item.image.url.indexOf('?') === -1) {  
193 - // item.image.url += '?'; 190 + // if (!req.__USER__.isLogin) {
  191 + // url = 'http://m.yohobuy.com/activity/student/register?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student"}}}';
194 // } 192 // }
195 // 193 //
196 - //  
197 - // url = item.image.url.substring(0, item.image.url.indexOf('?'));  
198 - //  
199 - // param = JSON.stringify(getRequest(item.image.url));  
200 - // item.image.url = item.image.url + '&app_version=1&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"' + url + '","param":' + param + '}}';  
201 -  
202 - // console.log(item); 194 + // item.image.noLoginUrl=url;
203 return item; 195 return item;
204 }); 196 });
205 } 197 }
@@ -240,7 +232,8 @@ exports.index = (req, res, next) => { @@ -240,7 +232,8 @@ exports.index = (req, res, next) => {
240 http: req.__USER__.http, 232 http: req.__USER__.http,
241 uid: req.__USER__.uid, 233 uid: req.__USER__.uid,
242 app_version: req.__USER__.app_version, 234 app_version: req.__USER__.app_version,
243 - isAppNoLogin: req.__USER__.isApp && !req.__USER__.isLogin 235 + isAppNoLogin: req.__USER__.isApp && !req.__USER__.isLogin,
  236 + noLoginUrl:noLoginUrl
244 }; 237 };
245 if (!req.__USER__.isApp) { 238 if (!req.__USER__.isApp) {
246 options.pageHeader = headerModel.setNav({ 239 options.pageHeader = headerModel.setNav({
@@ -259,7 +252,7 @@ exports.index = (req, res, next) => { @@ -259,7 +252,7 @@ exports.index = (req, res, next) => {
259 } 252 }
260 } else { 253 } else {
261 // no login 254 // no login
262 - options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register"}}}'; 255 + options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register","antarget":"1"}}}';
263 } 256 }
264 } else { 257 } else {
265 if (options.isLogin) { 258 if (options.isLogin) {
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <a href='{{image.url}}' class="main-left"></a> 40 <a href='{{image.url}}' class="main-left"></a>
41 {{#isEqual status 1}} 41 {{#isEqual status 1}}
42 {{#if @root.isAppNoLogin}} 42 {{#if @root.isAppNoLogin}}
43 - <a href='{{../image.url}}' class="main-right-use" > 43 + <a href='{{@root.noLoginUrl}}' class="main-right-use" >
44 <span class="on-receive on-lingqu no-bg"> 44 <span class="on-receive on-lingqu no-bg">
45 <p>点击</p> 45 <p>点击</p>
46 <p>领取</p> 46 <p>领取</p>
@@ -126,7 +126,7 @@ @@ -126,7 +126,7 @@
126 <a href="{{url}}">{{product_name}}</a> 126 <a href="{{url}}">{{product_name}}</a>
127 </div> 127 </div>
128 <div class="price"> 128 <div class="price">
129 - <span class="sale-price">¥{{round student_price}} <i class='s-biaoqian'>学生价</i></span> 129 + <span class="sale-price">¥{{round student_price}} <a class='s-biaoqian'>学生价</a></span>
130 <p class="s-price-block"> 130 <p class="s-price-block">
131 <span class="market-price">¥{{round market_price}}</span> 131 <span class="market-price">¥{{round market_price}}</span>
132 </p> 132 </p>
1 'use strict'; 1 'use strict';
2 2
3 const fs = require('fs'); 3 const fs = require('fs');
4 -let devHost = 'localhost'; 4 +let devHost = '172.16.6.159';
5 5
6 fs.readFile('.devhost', (err, buf)=> { 6 fs.readFile('.devhost', (err, buf)=> {
7 if (!err) { 7 if (!err) {