Authored by zhangxiaoru

路径

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