Authored by zhangxiaoru

路径

@@ -4,12 +4,11 @@ const headerModel = require('../../../doraemon/models/header'); @@ -4,12 +4,11 @@ const headerModel = require('../../../doraemon/models/header');
4 const shopService = require(`${mRoot}/shop-service`); 4 const shopService = require(`${mRoot}/shop-service`);
5 const helpers = global.yoho.helpers; 5 const helpers = global.yoho.helpers;
6 const _ = require('lodash'); 6 const _ = require('lodash');
7 -const crypto = global.yoho.crypto;  
8 const authcode = require(`${global.utils}/authcode`); 7 const authcode = require(`${global.utils}/authcode`);
9 8
10 -const base64_str_encode = ($input) => { 9 +const base64StrEncode = ($input) => {
11 return $input.replace('+/=', '-_.'); 10 return $input.replace('+/=', '-_.');
12 -} 11 +};
13 12
14 const index = (req, res, next) => { 13 const index = (req, res, next) => {
15 let channel = req.cookies._Channel || 'boys'; 14 let channel = req.cookies._Channel || 'boys';
@@ -35,7 +34,7 @@ const apply = (req, res, next) => { @@ -35,7 +34,7 @@ const apply = (req, res, next) => {
35 if (!uid) { 34 if (!uid) {
36 35
37 loginUrl = helpers.urlFormat('/signin.html', { 36 loginUrl = helpers.urlFormat('/signin.html', {
38 - refer: helpers.urlFormat('/shop/apply') 37 + refer: helpers.urlFormat('/apply', null, 'shop')
39 }); 38 });
40 39
41 res.redirect(loginUrl); 40 res.redirect(loginUrl);
@@ -50,7 +49,7 @@ const apply = (req, res, next) => { @@ -50,7 +49,7 @@ const apply = (req, res, next) => {
50 Promise.all([headerModel.requestHeaderData(channel), shopService.applyAction()]).then(result => { 49 Promise.all([headerModel.requestHeaderData(channel), shopService.applyAction()]).then(result => {
51 responseData.headerData = result[0].headerData; 50 responseData.headerData = result[0].headerData;
52 responseData.oneCategory = result[1]; 51 responseData.oneCategory = result[1];
53 - responseData.uploadKey = base64_str_encode(authcode(JSON.stringify(adpic), 'yohobuy_upload_system', null, 'encode')); 52 + responseData.uploadKey = base64StrEncode(authcode(JSON.stringify(adpic), 'yohobuy_upload_system', null, 'encode'));
54 res.render('apply', responseData); 53 res.render('apply', responseData);
55 }).catch(next); 54 }).catch(next);
56 }; 55 };
1 <div class="settled-page center-content yoho-page"> 1 <div class="settled-page center-content yoho-page">
2 - <a href="/shop/apply"> 2 + <a href="//shop.yohobuy.com/apply">
3 {{#if devEnv}} 3 {{#if devEnv}}
4 <img class="banner" src="//webstatic.dev.yohobuy.com/img/about/banner.jpg"> 4 <img class="banner" src="//webstatic.dev.yohobuy.com/img/about/banner.jpg">
5 {{^}} 5 {{^}}