Merge branch 'hotfix/5.0' into release/usercenter
Showing
100 changed files
with
971 additions
and
154 deletions
Too many changes to show.
To preserve performance only 100 of 100+ files are displayed.
@@ -5,11 +5,35 @@ | @@ -5,11 +5,35 @@ | ||
5 | */ | 5 | */ |
6 | 'use strict'; | 6 | 'use strict'; |
7 | const inviteModel = require('../models/invite'); | 7 | const inviteModel = require('../models/invite'); |
8 | -const inviteTitle = '有货 邀请好友赢福利'; | 8 | +const inviteTitle = { |
9 | + vipDay: '有货会员日 赢更多福利', | ||
10 | + normal: '有货 邀请好友赢福利' | ||
11 | +}; | ||
9 | const _ = require('lodash'); | 12 | const _ = require('lodash'); |
10 | const md5 = require('md5'); | 13 | const md5 = require('md5'); |
11 | const secretKey = '5466ee572bcbc75830d044e66ab429bc';// 秘钥 | 14 | const secretKey = '5466ee572bcbc75830d044e66ab429bc';// 秘钥 |
12 | 15 | ||
16 | + | ||
17 | +/* | ||
18 | + 判断邀请 好友 类型 | ||
19 | + */ | ||
20 | +exports.checkType = function(req, res, next) { | ||
21 | + inviteModel.checkType() | ||
22 | + .then(function(result) { | ||
23 | + if (result.code === 200 && result.data) { | ||
24 | + res.locals.isVipDay = true; | ||
25 | + res.locals.title = inviteTitle.vipDay; | ||
26 | + } else { | ||
27 | + res.locals.isVipDay = false; | ||
28 | + res.locals.title = inviteTitle.normal; | ||
29 | + } | ||
30 | + | ||
31 | + return next(); | ||
32 | + }) | ||
33 | + .catch(next); | ||
34 | +}; | ||
35 | + | ||
36 | + | ||
13 | // 简介、好友领取列表页面 | 37 | // 简介、好友领取列表页面 |
14 | exports.index = (req, res, next) => { | 38 | exports.index = (req, res, next) => { |
15 | let actId = req.query.act_id * 1 || 0; | 39 | let actId = req.query.act_id * 1 || 0; |
@@ -34,14 +58,15 @@ exports.index = (req, res, next) => { | @@ -34,14 +58,15 @@ exports.index = (req, res, next) => { | ||
34 | res.render(renderPage, { | 58 | res.render(renderPage, { |
35 | module: 'activity', | 59 | module: 'activity', |
36 | page: 'invite', | 60 | page: 'invite', |
37 | - result: result, | ||
38 | - title: inviteTitle | 61 | + width750: true, |
62 | + result: result | ||
39 | }); | 63 | }); |
40 | }).catch(next); | 64 | }).catch(next); |
41 | }; | 65 | }; |
42 | 66 | ||
43 | // 微信好友获取红包方法(即分享出去的地址)页面 | 67 | // 微信好友获取红包方法(即分享出去的地址)页面 |
44 | exports.share = (req, res, next) => { | 68 | exports.share = (req, res, next) => { |
69 | + | ||
45 | let shareUid = req.params[0]; | 70 | let shareUid = req.params[0]; |
46 | let actId = req.params[1]; | 71 | let actId = req.params[1]; |
47 | let nums = req.params[2]; | 72 | let nums = req.params[2]; |
@@ -78,16 +103,14 @@ exports.share = (req, res, next) => { | @@ -78,16 +103,14 @@ exports.share = (req, res, next) => { | ||
78 | nums: nums, | 103 | nums: nums, |
79 | actId: actId, | 104 | actId: actId, |
80 | openId: wxUserInfo.unionid | 105 | openId: wxUserInfo.unionid |
81 | - }, | ||
82 | - title: inviteTitle | 106 | + } |
83 | }); | 107 | }); |
84 | } else { | 108 | } else { |
85 | // 是自己分享的连接 | 109 | // 是自己分享的连接 |
86 | res.render('invite/list', { | 110 | res.render('invite/list', { |
87 | module: 'activity', | 111 | module: 'activity', |
88 | page: 'invite', | 112 | page: 'invite', |
89 | - result: result.data.list, | ||
90 | - title: inviteTitle | 113 | + result: result.data.list |
91 | }); | 114 | }); |
92 | } | 115 | } |
93 | 116 | ||
@@ -204,8 +227,7 @@ exports.myCoupons = (req, res, next) => { | @@ -204,8 +227,7 @@ exports.myCoupons = (req, res, next) => { | ||
204 | page: 'invite', | 227 | page: 'invite', |
205 | result: result[0], | 228 | result: result[0], |
206 | userInfo: result[1], | 229 | userInfo: result[1], |
207 | - amount: amount, | ||
208 | - title: inviteTitle | 230 | + amount: amount |
209 | }); | 231 | }); |
210 | }).catch(next); | 232 | }).catch(next); |
211 | }; | 233 | }; |
@@ -215,18 +237,12 @@ exports.shareover = (req, res) => { | @@ -215,18 +237,12 @@ exports.shareover = (req, res) => { | ||
215 | let amount = req.query.amount * 1 || 5; | 237 | let amount = req.query.amount * 1 || 5; |
216 | let sign = req.query.sign; | 238 | let sign = req.query.sign; |
217 | 239 | ||
218 | - if (md5(amount + secretKey) !== sign) { | ||
219 | - res.redirect('/'); | ||
220 | - return false; | ||
221 | - } | ||
222 | - | ||
223 | res.render('invite/shareover', { | 240 | res.render('invite/shareover', { |
224 | module: 'activity', | 241 | module: 'activity', |
225 | page: 'invite', | 242 | page: 'invite', |
226 | result: { | 243 | result: { |
227 | amount: amount | 244 | amount: amount |
228 | - }, | ||
229 | - title: inviteTitle | 245 | + } |
230 | }); | 246 | }); |
231 | }; | 247 | }; |
232 | 248 | ||
@@ -254,8 +270,7 @@ exports.over = (req, res) => { | @@ -254,8 +270,7 @@ exports.over = (req, res) => { | ||
254 | res.render('invite/over', { | 270 | res.render('invite/over', { |
255 | module: 'activity', | 271 | module: 'activity', |
256 | page: 'invite', | 272 | page: 'invite', |
257 | - result: [], | ||
258 | - title: inviteTitle | 273 | + result: [] |
259 | }); | 274 | }); |
260 | }; | 275 | }; |
261 | 276 |
@@ -201,7 +201,7 @@ exports.index = (req, res, next) => { | @@ -201,7 +201,7 @@ exports.index = (req, res, next) => { | ||
201 | } | 201 | } |
202 | 202 | ||
203 | return userAcquireStatus(uid, couponids.join(',')).then((cous) => { | 203 | return userAcquireStatus(uid, couponids.join(',')).then((cous) => { |
204 | - coupons.data = (coupons.data || []).map((item)=>{ | 204 | + coupons.data = _.get(coupons, 'data', []).map((item)=>{ |
205 | item.status = 1; | 205 | item.status = 1; |
206 | (cous.data || []).forEach((it) => { | 206 | (cous.data || []).forEach((it) => { |
207 | 207 |
apps/activity/controllers/vipDay.js
0 → 100644
1 | +/* eslint no-unused-vars: ["error", { "args": "none" }]*/ | ||
2 | +/* eslint-disable no-shadow, camelcase */ | ||
3 | +'use strict'; | ||
4 | +const helpers = global.yoho.helpers; | ||
5 | +const vipDayModel = require('../models/vipDay'); | ||
6 | +const auth = require('../../passport/models/auth-helper'); | ||
7 | +const co = require('bluebird').coroutine; | ||
8 | + | ||
9 | + | ||
10 | +function humanNum_wan(num) { | ||
11 | + return num; | ||
12 | + | ||
13 | + // if (num > 9999) { | ||
14 | + // num = (num / 10000).toFixed(2) + '万' | ||
15 | + // } | ||
16 | + | ||
17 | + // return num; | ||
18 | +} | ||
19 | + | ||
20 | +exports.beforeIn = (req, res, next) => { | ||
21 | + // 将APP登录状态正常化 | ||
22 | + if (req.yoho.isApp) { | ||
23 | + req.user.uid = Number(req.user.uid || req.query.uid); | ||
24 | + } | ||
25 | + | ||
26 | + // 未登录 | ||
27 | + if (!req.user.uid) { | ||
28 | + if (req.xhr) { | ||
29 | + return res.json({ | ||
30 | + code: 401, | ||
31 | + message: '抱歉,您还未登录', | ||
32 | + redirect: '/signin.html' | ||
33 | + }); | ||
34 | + } | ||
35 | + | ||
36 | + return res.redirect(helpers.urlFormat('/signin.html', { | ||
37 | + refer: req.originalUrl | ||
38 | + })); | ||
39 | + } | ||
40 | + | ||
41 | + next(); | ||
42 | +}; | ||
43 | + | ||
44 | +exports.index = (req, res, next) => { | ||
45 | + res.locals.module = 'activity'; | ||
46 | + res.locals.page = 'vipday-entry'; | ||
47 | + res.locals.width750 = true; | ||
48 | + | ||
49 | + let cate = { | ||
50 | + goods1: [51281456, 51228151, 51315660], | ||
51 | + goods2: [51362376, 51339512, 51316684], | ||
52 | + goods3: [51374524, 51338322, 51344316] | ||
53 | + }; | ||
54 | + | ||
55 | + if (req.app.get('env') !== 'production') { | ||
56 | + cate = { | ||
57 | + goods1: [512581904, 512581902, 512581900], | ||
58 | + goods2: [512581822, 512581816, 512581812], | ||
59 | + goods3: [512581806, 512581796, 512581792] | ||
60 | + }; | ||
61 | + } | ||
62 | + | ||
63 | + | ||
64 | + vipDayModel.getGoods(cate) | ||
65 | + .then(result => { | ||
66 | + // console.log(result.data) | ||
67 | + if (result.code !== 200) { | ||
68 | + return Promise.reject('error'); | ||
69 | + } | ||
70 | + | ||
71 | + res.render('vip_day/index', { | ||
72 | + title: '会员日活动', | ||
73 | + pageStyle: 'vip-day entry', | ||
74 | + goods1: result.data.goods1, | ||
75 | + goods2: result.data.goods2, | ||
76 | + goods3: result.data.goods3 | ||
77 | + }); | ||
78 | + return; | ||
79 | + }).catch(next); | ||
80 | +}; | ||
81 | + | ||
82 | +exports.crazyWheel = (req, res, next) => { | ||
83 | + res.locals.module = 'activity'; | ||
84 | + res.locals.page = 'vipday-wheel'; | ||
85 | + res.locals.width750 = true; | ||
86 | + | ||
87 | + if (!req.session.playwheel) { | ||
88 | + return res.redirect('/activity/vip-day'); | ||
89 | + } | ||
90 | + | ||
91 | + vipDayModel.getJoinNum(1).then(result => { | ||
92 | + let joins = result && result.data || 0; | ||
93 | + | ||
94 | + res.render('vip_day/crazy_wheel', { | ||
95 | + title: '疯狂大转盘', | ||
96 | + pageStyle: 'vip-day game', | ||
97 | + isWheel: true, | ||
98 | + joins: humanNum_wan(joins), | ||
99 | + joinNum: joins | ||
100 | + }); | ||
101 | + }); | ||
102 | +}; | ||
103 | + | ||
104 | +exports.crazyLuck = (req, res, next) => { | ||
105 | + const uid = req.user.uid; | ||
106 | + | ||
107 | + res.locals.module = 'activity'; | ||
108 | + res.locals.page = 'vipday-luck'; | ||
109 | + res.locals.width750 = true; | ||
110 | + | ||
111 | + co(function* () { | ||
112 | + let coins = yield vipDayModel.getCoins(uid); | ||
113 | + let joinNum = yield vipDayModel.getJoinNum(2); | ||
114 | + | ||
115 | + coins = (coins && coins.data && coins.data.total) || 0; | ||
116 | + joinNum = (joinNum && joinNum.data) || 0; | ||
117 | + | ||
118 | + res.render('vip_day/crazy_luck', { | ||
119 | + title: '拼手气', | ||
120 | + pageStyle: 'vip-day game', | ||
121 | + isLuck: true, | ||
122 | + coins: humanNum_wan(coins), | ||
123 | + coinNum: coins, | ||
124 | + joins: humanNum_wan(joinNum), | ||
125 | + joinNum: joinNum, | ||
126 | + }); | ||
127 | + })().catch(next); | ||
128 | +}; | ||
129 | + | ||
130 | + | ||
131 | +/* 会员日签到 */ | ||
132 | +exports.signin = (req, res, next) => { | ||
133 | + let uid = req.user.uid; | ||
134 | + | ||
135 | + return vipDayModel.signin(uid) | ||
136 | + .then(function(result) { | ||
137 | + res.json(result); | ||
138 | + }) | ||
139 | + .catch(next); | ||
140 | +}; | ||
141 | + | ||
142 | +exports.saveMsg = (req, res, next) => { | ||
143 | + let uid = req.user.uid; | ||
144 | + let content = req.body.content; | ||
145 | + | ||
146 | + auth.profile(uid) | ||
147 | + .then(profile => { | ||
148 | + // 1. get nick_name | ||
149 | + return profile.data.profile_name; | ||
150 | + }) | ||
151 | + .then(nick_name => { | ||
152 | + // 2. save message | ||
153 | + return vipDayModel.saveMsg(uid, nick_name, content); | ||
154 | + }) | ||
155 | + .then(result => { | ||
156 | + if (result.code === 200 && result.data === 1) { | ||
157 | + req.session.playwheel = true; | ||
158 | + } | ||
159 | + | ||
160 | + res.json(result); | ||
161 | + }) | ||
162 | + .catch(next); | ||
163 | +}; | ||
164 | + | ||
165 | +// 获取 会员日的 用户留言 | ||
166 | +exports.fetchMsg = (req, res, next) => { | ||
167 | + let uid = req.user.uid || (req.yoho.isApp && Number(req.query.uid)) || 0; | ||
168 | + | ||
169 | + vipDayModel.queryLeaveWordsList(uid).then(result => { | ||
170 | + return res.json(result); | ||
171 | + }).catch(next); | ||
172 | +}; | ||
173 | + | ||
174 | + | ||
175 | +exports.wheelResult = (req, res, next) => { | ||
176 | + let uid = req.user.uid; | ||
177 | + let prize_type = 2; | ||
178 | + | ||
179 | + return vipDayModel.addPrizeLog(uid, prize_type).then(result => { | ||
180 | + return res.json(result); | ||
181 | + }).catch(next); | ||
182 | + | ||
183 | + | ||
184 | +}; | ||
185 | + | ||
186 | +exports.luckResult = (req, res, next) => { | ||
187 | + let uid = req.user.uid; | ||
188 | + let prize_type = 1; | ||
189 | + let cost = 20; | ||
190 | + | ||
191 | + let handle = co(function* (uid) { | ||
192 | + // 查询用户 有货币 | ||
193 | + let r1 = yield vipDayModel.getCoins(uid); | ||
194 | + | ||
195 | + if (r1.code !== 200) { | ||
196 | + return { | ||
197 | + code: r1.code, | ||
198 | + message: '请求不合法' | ||
199 | + }; | ||
200 | + } | ||
201 | + | ||
202 | + let coin = r1.data.total; | ||
203 | + | ||
204 | + // console.log(coin); | ||
205 | + if (coin < 20) { | ||
206 | + return { code: 400, message: '有货币不够...' }; | ||
207 | + } | ||
208 | + | ||
209 | + // 得出 中奖结果 | ||
210 | + let result = yield vipDayModel.addPrizeLog(uid, prize_type); | ||
211 | + | ||
212 | + if (result.code !== 200) { | ||
213 | + return result; | ||
214 | + } | ||
215 | + | ||
216 | + Object.assign(result, { coin: coin - cost + result.data }); | ||
217 | + return result; | ||
218 | + }); | ||
219 | + | ||
220 | + handle(uid).then(function(result) { | ||
221 | + return res.json(result); | ||
222 | + }).catch(next); | ||
223 | +}; | ||
224 | + | ||
225 | +exports.luckResultCollect = (req, res, next) => { | ||
226 | + let uid = req.user.uid; | ||
227 | + let prize_type = 1; | ||
228 | + | ||
229 | + return vipDayModel.queryPrizeLog(uid, prize_type).then(result => { | ||
230 | + if (result.code === 200 && result.data) { | ||
231 | + result.data = result.data.filter(award => award.prizeValue); | ||
232 | + } | ||
233 | + | ||
234 | + res.json(result); | ||
235 | + }); | ||
236 | +}; |
@@ -23,7 +23,7 @@ app.engine('.hbs', hbs({ | @@ -23,7 +23,7 @@ app.engine('.hbs', hbs({ | ||
23 | extname: '.hbs', | 23 | extname: '.hbs', |
24 | defaultLayout: 'layout', | 24 | defaultLayout: 'layout', |
25 | layoutsDir: doraemon, | 25 | layoutsDir: doraemon, |
26 | - partialsDir: ['./views/partial', `${doraemon}/partial`], | 26 | + partialsDir: [path.join(__dirname, 'views/partial'), `${doraemon}/partial`], |
27 | helpers: Object.assign({}, global.yoho.helpers, helpers) | 27 | helpers: Object.assign({}, global.yoho.helpers, helpers) |
28 | })); | 28 | })); |
29 | 29 |
1 | 'use strict'; | 1 | 'use strict'; |
2 | const api = global.yoho.API; | 2 | const api = global.yoho.API; |
3 | +const serviceAPI = global.yoho.ServiceAPI; | ||
3 | const camelCase = global.yoho.camelCase; | 4 | const camelCase = global.yoho.camelCase; |
4 | const _ = require('lodash'); | 5 | const _ = require('lodash'); |
5 | 6 | ||
@@ -341,8 +342,20 @@ const getWxUserInfo = (params) => { | @@ -341,8 +342,20 @@ const getWxUserInfo = (params) => { | ||
341 | }); | 342 | }); |
342 | }; | 343 | }; |
343 | 344 | ||
345 | +/** | ||
346 | + * 获取 邀请好友赢福利的类型: | ||
347 | + * 1. 普通的要求好友赢福利 | ||
348 | + * 2. 会员日的邀请好友 赢福利 | ||
349 | + */ | ||
350 | +const checkType = () => { | ||
351 | + const url = '/activity/UserdaySigninController/isUserday'; | ||
352 | + | ||
353 | + return serviceAPI.get(url, {}); | ||
354 | +}; | ||
355 | + | ||
344 | module.exports = { | 356 | module.exports = { |
345 | index, | 357 | index, |
358 | + checkType, | ||
346 | shareModel, | 359 | shareModel, |
347 | getBindLogByOpenId, | 360 | getBindLogByOpenId, |
348 | sendRegCodeToMobile, | 361 | sendRegCodeToMobile, |
apps/activity/models/vipDay.js
0 → 100644
1 | +/* eslint-disable camelcase */ | ||
2 | +'use strict'; | ||
3 | +const url = require('url'); | ||
4 | +const _ = require('lodash'); | ||
5 | +const API = global.yoho.API; | ||
6 | +const serviceAPI = global.yoho.ServiceAPI; | ||
7 | +const utils = require(global.utils + '/product-process'); | ||
8 | +const helpers = global.yoho.helpers; | ||
9 | + | ||
10 | +// 签到 | ||
11 | +// doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E4%BC%9A%E5%91%98%E6%97%A5%E6%B4%BB%E5%8A%A8/%E4%BC%9A%E5%91%98%E6%97%A5%E7%AD%BE%E5%88%B0.md | ||
12 | +exports.signin = (uid)=> { | ||
13 | + const url = '/activity/UserdaySigninController/signin'; | ||
14 | + | ||
15 | + return serviceAPI.post(url, {uid}); | ||
16 | +}; | ||
17 | + | ||
18 | +// 写留言 | ||
19 | +// doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E4%BC%9A%E5%91%98%E6%97%A5%E6%B4%BB%E5%8A%A8/%E4%BF%9D%E5%AD%98%E7%94%A8%E6%88%B7%E7%95%99%E8%A8%80.md | ||
20 | +exports.saveMsg = (uid, nick_name, content) => { | ||
21 | + const url = '/activity/UserdayLeaveWordsController/addLeaveWords'; | ||
22 | + | ||
23 | + return serviceAPI.post(url, { | ||
24 | + uid, | ||
25 | + nick_name, | ||
26 | + content | ||
27 | + }); | ||
28 | +}; | ||
29 | + | ||
30 | +exports.queryLeaveWordsList = (uid) => { | ||
31 | + const url = '/activity/UserdayLeaveWordsController/queryLeaveWordsList'; | ||
32 | + | ||
33 | + return serviceAPI.get(url, {uid}); | ||
34 | +}; | ||
35 | + | ||
36 | + | ||
37 | +// 拼手气大转盘 抽奖 | ||
38 | +// doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E4%BC%9A%E5%91%98%E6%97%A5%E6%B4%BB%E5%8A%A8/%E6%8B%BC%E6%89%8B%E6%B0%94%E5%A4%A7%E8%BD%AC%E7%9B%98%E6%8A%BD%E5%A5%96.md | ||
39 | +exports.addPrizeLog = (uid, prize_type) => { | ||
40 | + const url = '/activity/UserdayPrizeLogController/addPrizeLog'; | ||
41 | + | ||
42 | + return serviceAPI.post(url, { | ||
43 | + uid, | ||
44 | + prize_type | ||
45 | + }); | ||
46 | +}; | ||
47 | + | ||
48 | +// 查询 中奖纪录 | ||
49 | +exports.queryPrizeLog = (uid, prize_type) => { | ||
50 | + const url = '/activity/UserdayPrizeLogController/queryPrizeLog'; | ||
51 | + | ||
52 | + return serviceAPI.get(url, { | ||
53 | + uid, | ||
54 | + prize_type | ||
55 | + }); | ||
56 | +}; | ||
57 | + | ||
58 | + | ||
59 | +// 获取用户的有货币 | ||
60 | +// doc: http://git.yoho.cn/yoho-documents/api-interfaces/tree/master/%E6%9C%89%E8%B4%A7%E5%B8%81 | ||
61 | +exports.getCoins = uid => { | ||
62 | + return API.get('', { | ||
63 | + method: 'app.yohocoin.total', | ||
64 | + uid | ||
65 | + }); | ||
66 | +}; | ||
67 | + | ||
68 | +// 获取抽奖人数 | ||
69 | +// doc: http://git.yoho.cn/yoho-documents/api-interfaces/blob/master/%E4%BC%9A%E5%91%98%E6%97%A5%E6%B4%BB%E5%8A%A8/%E6%9F%A5%E8%AF%A2%E5%8F%82%E4%B8%8E%E6%8A%BD%E5%A5%96%E4%BA%BA%E6%95%B0.md | ||
70 | +exports.getJoinNum = prize_type => { | ||
71 | + const url = '/activity/UserdayPrizeLogController/queryPrizeLogNum'; | ||
72 | + | ||
73 | + return serviceAPI.get(url, { | ||
74 | + prize_type, | ||
75 | + }); | ||
76 | +}; | ||
77 | + | ||
78 | +/** | ||
79 | + * cate [object Object] | ||
80 | + */ | ||
81 | +exports.getGoods = cate => { | ||
82 | + let skns = ''; | ||
83 | + let cates = Object.keys(cate); | ||
84 | + | ||
85 | + _.forEach(cate, function(val, key) { | ||
86 | + skns = skns.concat(',').concat(val.join(',')); | ||
87 | + }); | ||
88 | + | ||
89 | + skns = skns.slice(1); | ||
90 | + | ||
91 | + return API.get('', { | ||
92 | + method: 'h5.product.batch', | ||
93 | + productSkn: skns | ||
94 | + }).then(result => { | ||
95 | + if (result.code !== 200) { | ||
96 | + return { | ||
97 | + code: result.code, | ||
98 | + message: result.message | ||
99 | + }; | ||
100 | + } | ||
101 | + let productList = utils.processProductList(result.data.product_list); | ||
102 | + let data = {}; | ||
103 | + | ||
104 | + productList.forEach(product=> { | ||
105 | + let skn = product.productSkn; | ||
106 | + let imgSrc = url.parse(product.defaultImages); | ||
107 | + | ||
108 | + product.defaultImages = ['//', imgSrc.hostname, imgSrc.pathname].join(''); | ||
109 | + | ||
110 | + product.url = helpers.appUrlFormat(product.url, 'go.productDetail', { | ||
111 | + product_skn: skn | ||
112 | + }); | ||
113 | + | ||
114 | + for (let c of cates) { | ||
115 | + let index = cate[c].indexOf(skn); | ||
116 | + | ||
117 | + if (index !== -1) { | ||
118 | + cate[c].splice(index, 1); | ||
119 | + | ||
120 | + data[c] || (data[c] = []); | ||
121 | + data[c].push(product); | ||
122 | + break; | ||
123 | + } | ||
124 | + } | ||
125 | + }); | ||
126 | + | ||
127 | + // console.log(data.goods1.length) | ||
128 | + // console.log(data.goods2.length) | ||
129 | + // console.log(data.goods3.length) | ||
130 | + | ||
131 | + return { | ||
132 | + code: 200, | ||
133 | + data | ||
134 | + }; | ||
135 | + }); | ||
136 | +}; |
@@ -14,6 +14,7 @@ const wechat = require(`${cRoot}/wechat`); | @@ -14,6 +14,7 @@ const wechat = require(`${cRoot}/wechat`); | ||
14 | const student = require(`${cRoot}/student`); | 14 | const student = require(`${cRoot}/student`); |
15 | const live = require(`${cRoot}/live`); | 15 | const live = require(`${cRoot}/live`); |
16 | const invite = require(`${cRoot}/invite`); | 16 | const invite = require(`${cRoot}/invite`); |
17 | +const vipDay = require(`${cRoot}/vipDay`); | ||
17 | const market = require(`${cRoot}/market`); | 18 | const market = require(`${cRoot}/market`); |
18 | 19 | ||
19 | // routers | 20 | // routers |
@@ -48,21 +49,32 @@ router.get('/live/replay/barrage', live.replayBarrage); | @@ -48,21 +49,32 @@ router.get('/live/replay/barrage', live.replayBarrage); | ||
48 | router.get('/live/replay/:id', live.main); | 49 | router.get('/live/replay/:id', live.main); |
49 | router.get('/live/:id', live.main); | 50 | router.get('/live/:id', live.main); |
50 | 51 | ||
51 | -router.get('/invite', invite.index); | ||
52 | -router.get('/invite/index', invite.index); | 52 | +router.get('/invite', invite.checkType, invite.index); |
53 | +router.get('/invite/index', invite.checkType, invite.index); | ||
53 | 54 | ||
54 | router.get('/market', market.index);// 市场推广活动 | 55 | router.get('/market', market.index);// 市场推广活动 |
55 | 56 | ||
56 | -router.get(/\/invite\/share_([\d]+)_([\d]+)_([\d]+).html/, invite.share); | 57 | +router.get(/\/invite\/share_([\d]+)_([\d]+)_([\d]+).html/, invite.checkType, invite.share); |
57 | router.get('/invite/sendRegCodeToMobile', invite.sendRegCodeToMobile); | 58 | router.get('/invite/sendRegCodeToMobile', invite.sendRegCodeToMobile); |
58 | router.get('/invite/checkOldUserCoupon', invite.checkOldUserCoupon); | 59 | router.get('/invite/checkOldUserCoupon', invite.checkOldUserCoupon); |
59 | router.get('/invite/validRegCode', invite.validRegCode); | 60 | router.get('/invite/validRegCode', invite.validRegCode); |
60 | router.get('/invite/register', invite.register); | 61 | router.get('/invite/register', invite.register); |
61 | router.get('/invite/receiveCoupons', invite.receiveCoupons); | 62 | router.get('/invite/receiveCoupons', invite.receiveCoupons); |
62 | -router.get(/\/invite\/mycoupons_([\d]+)_([\d]+)_([\d]+)_([\d]+).html/, invite.myCoupons); // 好友领取完优惠券的页面 | 63 | +router.get(/\/invite\/mycoupons_([\d]+)_([\d]+)_([\d]+)_([\d]+).html/, invite.checkType, invite.myCoupons); // 好友领取完优惠券的页面 |
63 | router.get('/invite/getwxinfo', invite.getwxinfo); | 64 | router.get('/invite/getwxinfo', invite.getwxinfo); |
64 | router.get('/invite/shareover', invite.shareover); | 65 | router.get('/invite/shareover', invite.shareover); |
65 | router.get('/invite/over', invite.over); | 66 | router.get('/invite/over', invite.over); |
66 | 67 | ||
68 | +router.get('/vip-day', vipDay.index); | ||
69 | +router.get('/vip-day/crazy-wheel', vipDay.beforeIn, vipDay.crazyWheel); | ||
70 | +router.post('/vip-day/crazy-wheel/award.json', vipDay.beforeIn, vipDay.wheelResult); | ||
71 | +router.post('/vip-day/crazy-luck/award.json', vipDay.beforeIn, vipDay.luckResult); | ||
72 | +router.get('/vip-day/crazy-luck/award-list.json', vipDay.beforeIn, vipDay.luckResultCollect); | ||
73 | +router.get('/vip-day/crazy-luck', vipDay.beforeIn, vipDay.crazyLuck); | ||
74 | +router.post('/vip-day/signin.json', vipDay.beforeIn, vipDay.signin); | ||
75 | +router.post('/vip-day/msg/save.json', vipDay.beforeIn, vipDay.saveMsg); | ||
76 | +router.get('/vip-day/msg/fetch.json', vipDay.fetchMsg); | ||
77 | + | ||
78 | + | ||
67 | 79 | ||
68 | module.exports = router; | 80 | module.exports = router; |
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | <h6>权益1:新品立享9折</h6> | 11 | <h6>权益1:新品立享9折</h6> |
12 | <p>1、学生购买原价新品时,可立即享受9折优惠,与VIP折扣不可同时享受。</p> | 12 | <p>1、学生购买原价新品时,可立即享受9折优惠,与VIP折扣不可同时享受。</p> |
13 | <h6>权益2:每1元返1个有货币</h6> | 13 | <h6>权益2:每1元返1个有货币</h6> |
14 | - <p>1、学生购买商品时,以商品的实际成交金额计算,每1元返1个有货币;</p> | 14 | + <p>1、学生购买指定商品时,以商品的实际成交金额计算,每1元返1个有货币;</p> |
15 | <p>2、返有货币时间:确认收货7日后,系统将自动将对应数量的有货币返至购买账户;</p> | 15 | <p>2、返有货币时间:确认收货7日后,系统将自动将对应数量的有货币返至购买账户;</p> |
16 | <p>3、有货币有效期:获得当日至次年12月31日,逾期自动作废;</p> | 16 | <p>3、有货币有效期:获得当日至次年12月31日,逾期自动作废;</p> |
17 | <p>4、查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细。</p> | 17 | <p>4、查看有货币:登录后,点击“个人中心”在“我的有货币”中可以查看有货币余额及明细。</p> |
1 | <div class="invite-page invite-page-bg"> | 1 | <div class="invite-page invite-page-bg"> |
2 | <div class="invite-content-list"> | 2 | <div class="invite-content-list"> |
3 | <div> | 3 | <div> |
4 | - <img src="//cdn.yoho.cn/m-yohobuy-node/assets/img/activity/invite/title_new.png" /> | 4 | + <img class="banner" src="{{imgSrc 'img/activity/invite/title_new.png'}}" /> |
5 | + <img class="logo" src="{{imgSrc 'img/activity/invite/logo.png'}}" > | ||
5 | <br /> | 6 | <br /> |
6 | - <p class="fz14">只需1位小伙伴领取,<br/>即得<strong class="fz17">10元现金券</strong>!<br/>全部领完,可继续发,上不封顶!<br/>奔跑吧,潮人们!</p> | ||
7 | - | 7 | + <p class="fz14 intro-title"> |
8 | + 只需1位小伙伴领取,<br/> | ||
9 | + 即得<strong class="fz17">10元现金券</strong>!<br/> | ||
10 | + 全部领完,可继续发,上不封顶!<br/> | ||
11 | + {{#if isVipDay}} | ||
12 | + <strong class="fz17">每月28日,会员潮集狂欢</strong> | ||
13 | + {{else}} | ||
14 | + <strong class="fz17">动动指尖吧!潮人们</strong> | ||
15 | + {{/if}} | ||
16 | + </p> | ||
8 | <a href="javascript:void(0)" class="weal-btn fz16" id="send_gift">立刻发福利</a> | 17 | <a href="javascript:void(0)" class="weal-btn fz16" id="send_gift">立刻发福利</a> |
9 | <h2 class="rule-tit fz15">活动细则</h2> | 18 | <h2 class="rule-tit fz15">活动细则</h2> |
10 | <ol class="rule-con hide"> | 19 | <ol class="rule-con hide"> |
1 | <div class="invite-page invite-page-bg"> | 1 | <div class="invite-page invite-page-bg"> |
2 | <div class="invite-content-list"> | 2 | <div class="invite-content-list"> |
3 | {{#if result.isEmpty}} | 3 | {{#if result.isEmpty}} |
4 | - <div class="coupon-box coupon-box02 relative mar-top-a"> | 4 | + <!--<div class="coupon-box coupon-box02 relative mar-top-a"> |
5 | <p class="fz9 bold">YUAN</p> | 5 | <p class="fz9 bold">YUAN</p> |
6 | <strong class="fz18">现金券</strong> | 6 | <strong class="fz18">现金券</strong> |
7 | <p class="fz9 bold">CPOUPON</p> | 7 | <p class="fz9 bold">CPOUPON</p> |
8 | <div class="pirbox absolute"> | 8 | <div class="pirbox absolute"> |
9 | <em class="absolute">¥</em>0 | 9 | <em class="absolute">¥</em>0 |
10 | </div> | 10 | </div> |
11 | - </div> | 11 | + </div>--> |
12 | + <div class="coupon-box chit0"></div> | ||
12 | 13 | ||
13 | <p class="draw-coupon fz19 bold t-shadow">至少1位小伙伴领取<br />才能获得现金券!</p> | 14 | <p class="draw-coupon fz19 bold t-shadow">至少1位小伙伴领取<br />才能获得现金券!</p> |
14 | <p class="goon fz11 t-shadow">~继续呼唤小伙伴吧~</p> | 15 | <p class="goon fz11 t-shadow">~继续呼唤小伙伴吧~</p> |
@@ -24,39 +25,24 @@ | @@ -24,39 +25,24 @@ | ||
24 | <p><a href="javascript:void(0)" class="weal-btn fz16">再次分享</a></p> | 25 | <p><a href="javascript:void(0)" class="weal-btn fz16">再次分享</a></p> |
25 | {{else if result.isFive}} | 26 | {{else if result.isFive}} |
26 | <!-- 现金券 start --> | 27 | <!-- 现金券 start --> |
27 | - <div class="coupon-box coupon-box02 relative mar-top-a"> | ||
28 | - <p class="fz9 bold">YUAN</p> | ||
29 | - <strong class="fz18">现金券</strong> | ||
30 | - <p class="fz9 bold">CPOUPON</p> | ||
31 | - <div class="pirbox absolute"> | ||
32 | - <em class="absolute">¥</em>10 | ||
33 | - </div> | ||
34 | - <div class="count-not fz11 absolute"><hr class="fn-left"><hr class="fn-right">已送达您的账户</div> | ||
35 | - </div> | 28 | + <div class="coupon-box chit10"></div> |
36 | <!-- 现金券 end --> | 29 | <!-- 现金券 end --> |
37 | 30 | ||
38 | - <p class="draw-coupon fz16 bold t-shadow">您的号召力爆棚!!!</p> | 31 | + <p class="draw-coupon fz16 bold t-shadow">您的号召力爆棚!!</p> |
39 | <p class="fz11">已有5位小伙伴领取红包</p> | 32 | <p class="fz11">已有5位小伙伴领取红包</p> |
33 | + <p class="fz16 bold">打开【Yoho!Buy有货】客户端<br>再次分享吧</p> | ||
40 | <ul class="list-port"> | 34 | <ul class="list-port"> |
41 | {{# result.data}} | 35 | {{# result.data}} |
42 | <li><img class="pic" src="{{img}}"><p class="name">{{nick}}</p><p class="pon">{{couponAmount}}元</p></li> | 36 | <li><img class="pic" src="{{img}}"><p class="name">{{nick}}</p><p class="pon">{{couponAmount}}元</p></li> |
43 | {{/ result.data}} | 37 | {{/ result.data}} |
44 | </ul> | 38 | </ul> |
45 | <br /> | 39 | <br /> |
46 | - <p><a href="javascript:void(0)" class="weal-btn fz16">还要发福利</a></p> | 40 | + <!--<p><a href="javascript:void(0)" class="weal-btn fz16">还要发福利</a></p>--> |
47 | <br /> | 41 | <br /> |
48 | <p class="fz11 t-shadow">优惠券有效期:优惠券到账以后7天内有效(自然天)</p> | 42 | <p class="fz11 t-shadow">优惠券有效期:优惠券到账以后7天内有效(自然天)</p> |
49 | {{else}} | 43 | {{else}} |
50 | <!-- 现金券 start --> | 44 | <!-- 现金券 start --> |
51 | - <div class="coupon-box coupon-box02 relative mar-top-a"> | ||
52 | - <p class="fz9 bold">YUAN</p> | ||
53 | - <strong class="fz18">现金券</strong> | ||
54 | - <p class="fz9 bold">CPOUPON</p> | ||
55 | - <div class="pirbox absolute"> | ||
56 | - <em class="absolute">¥</em>10 | ||
57 | - </div> | ||
58 | - <div class="count-not fz11 absolute"><hr class="fn-left"><hr class="fn-right">已送达您的账户</div> | ||
59 | - </div> | 45 | + <div class="coupon-box chit10"></div> |
60 | <!-- 现金券 end --> | 46 | <!-- 现金券 end --> |
61 | 47 | ||
62 | <p class="draw-coupon fz19 bold t-shadow">召集5位小伙伴领取,<br>即可再发福利,赶快召唤吧!</p> | 48 | <p class="draw-coupon fz19 bold t-shadow">召集5位小伙伴领取,<br>即可再发福利,赶快召唤吧!</p> |
1 | <div class="invite-page invite-page-bg"> | 1 | <div class="invite-page invite-page-bg"> |
2 | <div class="invite-content-page"> | 2 | <div class="invite-content-page"> |
3 | - <img src="//cdn.yoho.cn/m-yohobuy-node/assets/img/activity/invite/title_new.png" /> | ||
4 | - <h2 class="bold fz16">YoHo!Buy有货福利来袭,即领即用!</h2> | ||
5 | - <p>全球1000+潮流品牌每日上新!</p> | 3 | + <img class="banner" src="{{imgSrc 'img/activity/invite/title_new.png'}}" > |
4 | + <img class="logo" src="{{imgSrc 'img/activity/invite/logo.png'}}" > | ||
5 | + {{#if isVipDay}} | ||
6 | + <h2 class="fz16">会员日大波福利来袭,只在今日!</h2> | ||
7 | + {{else}} | ||
8 | + <h2 class="fz16">福利来袭,即领即用</h2> | ||
9 | + {{/if}} | ||
10 | + <p class="fz16">全球1400+潮流品牌每日上新!</p> | ||
6 | <div class='invite-group relative'> | 11 | <div class='invite-group relative'> |
7 | - <p class="fz13">— <span class='bold'>填写您的手机号码,来YOHO潮流!</span> —</p> | ||
8 | - <p class='fz11'>已注册YOHO!Buy有货的手机号不能领取哦</p><br /> | 12 | + <p class="fz13"><span class='bold'>填写您的手机号码,来YOHO!玩潮流!</span></p> |
13 | + <p class='fz11'>已注册YOHO!Buy有货的手机号不能领取哦</p> | ||
14 | + <div class="form"> | ||
9 | <span class='send-validate-btn'>发送验证码</span> | 15 | <span class='send-validate-btn'>发送验证码</span> |
10 | <input type='text' placeholder='输入手机号' class='invite-mobile' /> | 16 | <input type='text' placeholder='输入手机号' class='invite-mobile' /> |
11 | <input type='text' placeholder='输入验证码' class='invite-code' /> | 17 | <input type='text' placeholder='输入验证码' class='invite-code' /> |
@@ -14,17 +20,21 @@ | @@ -14,17 +20,21 @@ | ||
14 | <input type="hidden" name="shareUid" value="{{result.shareUid}}" /> | 20 | <input type="hidden" name="shareUid" value="{{result.shareUid}}" /> |
15 | <input type="hidden" name="openId" value="{{result.openId}}" /> | 21 | <input type="hidden" name="openId" value="{{result.openId}}" /> |
16 | <input type='button' value='领福利' class='invite-btn receive-btn'/> | 22 | <input type='button' value='领福利' class='invite-btn receive-btn'/> |
23 | + </div> | ||
17 | </div> | 24 | </div> |
18 | 25 | ||
19 | <div class='invite-dialog oldget hide'> | 26 | <div class='invite-dialog oldget hide'> |
20 | <div class='invite-dialog-center'> | 27 | <div class='invite-dialog-center'> |
21 | - <p class="fz13 mtTop03">您已是Yoho!Buy有货的顾客,</p> | 28 | + <p class="fz13 mtTop03">您已是有货的顾客,</p> |
22 | <p class="fz13">此福利仅限新用户领取,</p> | 29 | <p class="fz13">此福利仅限新用户领取,</p> |
23 | - <p class="fz13">您只需下载Yoho!Buy有货手机客户端,</p> | ||
24 | - <p class="fz13">在【我的】栏目中邀请好友领福利,</p> | ||
25 | - <p class="fz13 mtTop04">即可赢取<strong class="fz18">10元现金券</strong></p> | 30 | + {{#if isVipDay}} |
31 | + <p class="fz13">你还可以参加会员日其他活动, 购物即享</p> | ||
32 | + <p class="fz13">VIP翻倍升级, 还有大批有货币等你玩</p> | ||
33 | + {{else}} | ||
34 | + {{/if}} | ||
26 | <div class='btn-group'> | 35 | <div class='btn-group'> |
27 | <input type='button' class='invite-btn cancelbtn' value='重新输入' /> | 36 | <input type='button' class='invite-btn cancelbtn' value='重新输入' /> |
37 | + <span class="btn-group-gap"></span> | ||
28 | <input type='button' class='invite-btn download-btn' value='立即查看' /> | 38 | <input type='button' class='invite-btn download-btn' value='立即查看' /> |
29 | </div> | 39 | </div> |
30 | </div> | 40 | </div> |
@@ -40,6 +50,7 @@ | @@ -40,6 +50,7 @@ | ||
40 | <br /> | 50 | <br /> |
41 | <div class='btn-group'> | 51 | <div class='btn-group'> |
42 | <input type='button' class='invite-btn cancelbtn' value='重新输入' /> | 52 | <input type='button' class='invite-btn cancelbtn' value='重新输入' /> |
53 | + <span class="btn-group-gap"></span> | ||
43 | <input type='button' class='invite-btn download-btn' value='立即查看' /> | 54 | <input type='button' class='invite-btn download-btn' value='立即查看' /> |
44 | </div> | 55 | </div> |
45 | </div><!--/isreg--> | 56 | </div><!--/isreg--> |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <div> | 3 | <div> |
4 | <img src="//cdn.yoho.cn/m-yohobuy-node/assets/img/activity/invite/title_new.png" /> | 4 | <img src="//cdn.yoho.cn/m-yohobuy-node/assets/img/activity/invite/title_new.png" /> |
5 | <br /> | 5 | <br /> |
6 | - <p class="fz14">只需1位小伙伴领取,<br/>即得<strong class="fz17">10元现金券</strong>!<br/>全部领完,可继续发,上不封顶!<br/>奔跑吧,潮人们!</p> | 6 | + <p class="fz14">只需1位小伙伴领取,<br/>即得<strong class="fz17">10元现金券</strong>!<br/>全部领完,可继续发,上不封顶!<br/>动动指尖吧!潮人们</p> |
7 | 7 | ||
8 | <a href="javascript:void(0)" class="invite-btn fz16">立刻发福利</a> | 8 | <a href="javascript:void(0)" class="invite-btn fz16">立刻发福利</a> |
9 | <h2 class="rule-tit fz15">活动细则</h2> | 9 | <h2 class="rule-tit fz15">活动细则</h2> |
1 | <div class="invite-page invite-page-bg"> | 1 | <div class="invite-page invite-page-bg"> |
2 | <div class="invite-content-list"> | 2 | <div class="invite-content-list"> |
3 | <div class='mar-top-a'> | 3 | <div class='mar-top-a'> |
4 | - <h2 class="fz37 bold">太可惜了,</h2> | ||
5 | - <p class="fz15 t-shadow">您与88元现金券擦肩而过!别伤心,</p> | ||
6 | <p class="fz22 bold">赠您{{result.amount}}元现金券</p> | 4 | <p class="fz22 bold">赠您{{result.amount}}元现金券</p> |
7 | <p class="t-shadow">(仅限Yobo!Buy有货客户端使用)</p> | 5 | <p class="t-shadow">(仅限Yobo!Buy有货客户端使用)</p> |
8 | <!-- 现金券 start --> | 6 | <!-- 现金券 start --> |
9 | - <div class="coupon-box coupon-box02 relative mar-top-a"> | ||
10 | - <p class="fz9 bold">YUAN</p> | ||
11 | - <strong class="fz18">现金券</strong> | ||
12 | - <p class="fz9 bold">CPOUPON</p> | ||
13 | - <div class="pirbox absolute"> | ||
14 | - <em class="absolute">¥</em>{{result.amount}} | ||
15 | - </div> | ||
16 | - <div class="count-not fz11 absolute"><hr class="fn-left"><hr class="fn-right">已送达您的账户</div> | ||
17 | - </div> | 7 | + <div class="coupon-box chit10"></div> |
18 | <!-- 现金券 end --> | 8 | <!-- 现金券 end --> |
19 | 9 | ||
20 | <p class="hurry-size fz16 bold">赶紧来Yobo!Buy有货<br/>逛潮牌吧!</p> | 10 | <p class="hurry-size fz16 bold">赶紧来Yobo!Buy有货<br/>逛潮牌吧!</p> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | </div> | 18 | </div> |
19 | {{# floorAdListTitle}} | 19 | {{# floorAdListTitle}} |
20 | <div class="floor-top"> | 20 | <div class="floor-top"> |
21 | - <img src="{{imgSrc '//cdn.yoho.cn/m-yohobuy-node/assets/img/activity/market/floor-top-1.jpg'}}" /> | 21 | + <img src="{{imgSrc 'img/activity/market/floor-top-1.jpg'}}" /> |
22 | </div> | 22 | </div> |
23 | {{/ floorAdListTitle}} | 23 | {{/ floorAdListTitle}} |
24 | <ul class="floor-ul"> | 24 | <ul class="floor-ul"> |
@@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
33 | </ul> | 33 | </ul> |
34 | {{# newsList}} | 34 | {{# newsList}} |
35 | <div class="floor-top"> | 35 | <div class="floor-top"> |
36 | - <img src="{{imgSrc '//cdn.yoho.cn/m-yohobuy-node/assets/img/activity/market/floor-top-2.jpg'}}" /> | 36 | + <img src="{{imgSrc 'img/activity/market/floor-top-2.jpg'}}" /> |
37 | </div> | 37 | </div> |
38 | <div class="floor-c"> | 38 | <div class="floor-c"> |
39 | <a href="{{url}}"> | 39 | <a href="{{url}}"> |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | </section> | 14 | </section> |
15 | {{else}} | 15 | {{else}} |
16 | <section class='s-section clearfix'> | 16 | <section class='s-section clearfix'> |
17 | - <div class='s-verify-img s-verify-fail'></div> | 17 | + <div class='s-verify-img s-verify-fail' prompt='{{./prompt}}'></div> |
18 | <p class='s-verify-title'>太遗憾了,{{./prompt}}</p> | 18 | <p class='s-verify-title'>太遗憾了,{{./prompt}}</p> |
19 | <p class='s-verify-txt'>您可以<a class='red' href='//m.yohobuy.com/activity/student/register'>重新验证 ></a></p> | 19 | <p class='s-verify-txt'>您可以<a class='red' href='//m.yohobuy.com/activity/student/register'>重新验证 ></a></p> |
20 | </section> | 20 | </section> |
1 | +<div class="vipday-game game-luck"> | ||
2 | + {{> vip_day/game-header message="花20有货币就能获一次抽奖机会哦!"}} | ||
3 | + {{> vip_day/game-main}} | ||
4 | + <div class="info"> | ||
5 | + <div class="info-item my-icon"> | ||
6 | + <div class="my-icon-label"> | ||
7 | + <i class="small-icon"></i><span>我的有货币</span> | ||
8 | + </div> | ||
9 | + <span id="my-coin" class="game-val game-rect">{{coins}}</span> | ||
10 | + </div> | ||
11 | + <div class="info-item"> | ||
12 | + <button id="my-award" class="game-btn my-award" type="button" data-toggle="ymodal" data-target="#js-awards">我的奖品</button> | ||
13 | + </div> | ||
14 | + <div class="info-item player-num"> | ||
15 | + <div> | ||
16 | + 已有:<span id="player-num" class="player-num-val">{{joins}}</span>人 | ||
17 | + </div> | ||
18 | + <span>参加抽奖</span> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="explain"> | ||
22 | + <div class="explain-txt"> | ||
23 | + <h6 class="explain-title">有货币抽奖规则:</h6> | ||
24 | + <ul class="explain-rules"> | ||
25 | + <li>1、 每次投入20有货币,用户账内有货币需大于20;每位用户不限参与次数</li> | ||
26 | + <li>2、 奖品为20、50、100、200、1000、2000、5000有货币,抽中对应奖品即可获得;如未中奖则告知“很遗憾您没有中奖,继续加油哦~~”!</li> | ||
27 | + </ul> | ||
28 | + </div> | ||
29 | + </div> | ||
30 | +</div> | ||
31 | + | ||
32 | +<div class="ymodal ymodal-alert vipday-luck-awards" id="js-awards"> | ||
33 | + <div class="ymodal-dialog"> | ||
34 | + <div class="ymodal-content"> | ||
35 | + <div class="ymodal-header">我的奖品<i class="iconfont close" data-dismiss="ymodal"></i></div> | ||
36 | + <ol class="ymodal-body"> | ||
37 | + <!-- placeholder --> | ||
38 | + </ol> | ||
39 | + </div> | ||
40 | + </div> | ||
41 | +</div> | ||
42 | + | ||
43 | +<script> | ||
44 | + var coin = {{coinNum}}; | ||
45 | + var joinNum = {{joinNum}}; | ||
46 | +</script> |
1 | +<div class="vipday-game game-wheel"> | ||
2 | + {{> vip_day/game-header message="您有1次抽奖机会"}} | ||
3 | + {{> vip_day/game-main}} | ||
4 | + <div class="info"> | ||
5 | + <div class="info-item"> | ||
6 | + 已有<span class="game-val game-rect" id="js-join-num">{{joins}}</span>人参与抽奖 | ||
7 | + </div> | ||
8 | + </div> | ||
9 | + <div class="explain"> | ||
10 | + <div class="explain-txt"> | ||
11 | + <h6 class="explain-title">留言板细则:</h6> | ||
12 | + <ul class="explain-rules"> | ||
13 | + <li>每位用户限写一条留言,完成提交后获得一次抽奖机会。可随机获得10元现金券、20元现金券、50元现金券、100元现金券</li> | ||
14 | + <li>您的想法有可能会在后面的会员日实现哦~<br>本次活动解释权归有货所有</li> | ||
15 | + </ul> | ||
16 | + </div> | ||
17 | + </div> | ||
18 | +</div> | ||
19 | + | ||
20 | +<script> | ||
21 | + var joinNum = {{joinNum}}; | ||
22 | +</script> |
apps/activity/views/action/vip_day/index.hbs
0 → 100644
1 | +{{! header }} | ||
2 | +<header class="vip-day-header"></header> | ||
3 | + | ||
4 | +<div class="vip-day-slogan"></div> | ||
5 | + | ||
6 | +<section class="vip-day-sec qiangjuan" id="qiangquan"> | ||
7 | + <div class="content"> | ||
8 | + <ul class="chits"> | ||
9 | + <li> | ||
10 | + <div class="chit chit10"></div> | ||
11 | + </li> | ||
12 | + <li> | ||
13 | + <div class="chit chit30"></div> | ||
14 | + </li> | ||
15 | + <li> | ||
16 | + <div class="chit chit60"></div> | ||
17 | + </li> | ||
18 | + </ul> | ||
19 | + <button class="qiangjuan-foucs" data-toggle="ymodal" data-target="#chit-qcode">立刻关注抢优惠券</button> | ||
20 | + </div> | ||
21 | +</section> | ||
22 | + | ||
23 | +{{! section: 玩转有货币 }} | ||
24 | +<section class="vip-day-sec play-coin" id="play-coin"> | ||
25 | + <header class="header"> | ||
26 | + <i class="title-pic"></i> | ||
27 | + </header> | ||
28 | + <div class="content"> | ||
29 | + <a href='/home/mycurrency{{#if isApp}}?openby:yohobuy={"action":"go.signin"}{{/if}}' class="d-chit-more"></a> | ||
30 | + <ul class="clearfix"> | ||
31 | + <li class="item item-1 pull-left" id="js-qiandao"> | ||
32 | + <!--<a href="http://m.yohobuy.com/home/mycurrency?openby:yohobuy={'action':'go.h5','params':{'islogin':'Y','url':'http://m.yohobuy.com/home/mycurrency'}}">--> | ||
33 | + <img class="play-icon-flag play-coin-left" src="{{imgSrc 'img/activity/vip_day/play-coin-1.png'}}" alt="签到福利"> | ||
34 | + <!--</a>--> | ||
35 | + </li> | ||
36 | + <li class="play-coin-div"></li> | ||
37 | + <li class="item item-2 pull-right" id="js-game-luck"> | ||
38 | + <a href='http://m.yohobuy.com/activity/vip-day/crazy-luck{{#if isApp}}?openby:yohobuy={"action":"go.h5","params":{"islogin":"Y","url":"http://m.yohobuy.com/activity/vip-day/crazy-luck"}}{{/if}}'> | ||
39 | + <img class="play-icon-flag play-coin-right" src="{{imgSrc 'img/activity/vip_day/play-coin-2.png'}}" alt="拼手气"> | ||
40 | + </a> | ||
41 | + </li> | ||
42 | + </ul> | ||
43 | + </div> | ||
44 | +</section> | ||
45 | + | ||
46 | +{{! section: vip等级加速 }} | ||
47 | +<section class="vip-day-sec vip-rocket" id="vip-rocket"> | ||
48 | + <header class="header"> | ||
49 | + <i class="title-pic"></i> | ||
50 | + </header> | ||
51 | + <div class="content text-center"> | ||
52 | + <a href="javascript:;" data-toggle="ymodal" data-target="#vip-privilege" class="vip-rocket-a"></a> | ||
53 | + <i class="vip-rocket-point"></i> | ||
54 | + </div> | ||
55 | +</section> | ||
56 | + | ||
57 | +{{! section: 会员日专享商品 }} | ||
58 | +<section class="vip-day-sec vip-goods" id="vip-goods"> | ||
59 | + <header class="header"> | ||
60 | + <i class="title-pic"></i> | ||
61 | + </header> | ||
62 | + <div class="content"> | ||
63 | + <div class="vip-goods-sec"> | ||
64 | + <!-- good class 1--> | ||
65 | + <h5 class="vip-goods-sec-label">明星潮牌</h5> | ||
66 | + <ul class="vip-goods-list clearfix"> | ||
67 | + {{#each goods1}} | ||
68 | + {{> vip_day/vip-good}} | ||
69 | + {{/each}} | ||
70 | + </ul> | ||
71 | + <!-- good class 2--> | ||
72 | + <h5 class="vip-goods-sec-label">新品释出</h5> | ||
73 | + <ul class="vip-goods-list clearfix"> | ||
74 | + {{#each goods2}} | ||
75 | + {{> vip_day/vip-good}} | ||
76 | + {{/each}} | ||
77 | + </ul> | ||
78 | + <!-- good class 3--> | ||
79 | + <h5 class="vip-goods-sec-label">VIP独享</h5> | ||
80 | + <ul class="vip-goods-list clearfix"> | ||
81 | + {{#each goods3}} | ||
82 | + {{> vip_day/vip-good}} | ||
83 | + {{/each}} | ||
84 | + </ul> | ||
85 | + <div class="text-center"> | ||
86 | + <a href='https://m.yohobuy.com/product/sale/vip?channel={{channel}}&openby:yohobuy={"action":"go.vippro"}' class="vip-goods-more">点击查看更多</a> | ||
87 | + </div> | ||
88 | + </div> | ||
89 | + </div> | ||
90 | +</section> | ||
91 | + | ||
92 | +{{! section: 欢乐福利加倍区 }} | ||
93 | +<section id="js-msg-sec" class="vip-day-sec vip-day-fuli"> | ||
94 | + <header class="header"> | ||
95 | + <i class="title-pic"></i> | ||
96 | + </header> | ||
97 | + <div class="content vip-day-msg"> | ||
98 | + <div class="clearfix"> | ||
99 | + <div class="mirror"> | ||
100 | + <textarea class="vip-msg-content"></textarea> | ||
101 | + <button class="vip-msg-send" type="button">写好啦!</button> | ||
102 | + </div> | ||
103 | + <img class="txt" src="{{imgSrc 'img/activity/vip_day/leava-msg.png'}}" alt=""> | ||
104 | + </div> | ||
105 | + <div class="vip-day-msg-input"></div> | ||
106 | + </div> | ||
107 | +</section> | ||
108 | + | ||
109 | +{{! section: 召唤神龙}} | ||
110 | +<!--<a href="/activity/invite?act_id=29&openby:yohobuy={'action':'go.h5','params':{url:'http://m.yohobuy.com/activity/invite?act_id=29'}}">--> | ||
111 | + <div class="vip-day-sec friends" id="js-invite-friends">"呼朋唤友一起玩!更多福利,欢乐加倍"</div> | ||
112 | +<!--</a>--> | ||
113 | + | ||
114 | +{{! footer }} | ||
115 | +<footer class="vip-day-footer"> | ||
116 | + {{#unless isApp}} <a href="http://www.yohoshow.com/about/index/yohobuyqr/" class="app-download"></a> {{/unless}} | ||
117 | +</footer> | ||
118 | +{{> vip_day/footer-nav }} | ||
119 | + | ||
120 | +{{! 立刻关注抢优惠券 弹出二维码}} | ||
121 | +<div class="ymodal" id="chit-qcode"> | ||
122 | + <div class="vh-center ymodal-dialog" data-dismiss="ymodal"> | ||
123 | + <div> | ||
124 | + <img class="qcode" src="{{imgSrc 'img/activity/vip_day/qcode.jpg'}}"> | ||
125 | + <p class="chit-qcode-tip">扫码关注有货微信或搜索“yohobuy”关注订阅号</p> | ||
126 | + </div> | ||
127 | + </div> | ||
128 | +</div> | ||
129 | + | ||
130 | +<div class="ymodal" id="qiandao-modal"> | ||
131 | + <div class="vh-center ymodal-dialog" data-dismiss="ymodal"> | ||
132 | + <img src="{{imgSrc 'img/activity/vip_day/qiandao.png'}}"> | ||
133 | + </div> | ||
134 | +</div> | ||
135 | + | ||
136 | +<div class="ymodal" id="vip-privilege"> | ||
137 | + <div class="vh-center ymodal-dialog" data-dismiss="ymodal"> | ||
138 | + <img src="{{imgSrc 'img/activity/vip_day/privilege.png'}}" alt="VIP 权益"> | ||
139 | + </div> | ||
140 | +</div> |
1 | +<nav class="footer-nav"> | ||
2 | + <ul> | ||
3 | + <li> | ||
4 | + <i class="bg-chit"></i> | ||
5 | + <br> | ||
6 | + <span>立刻抢券</span> | ||
7 | + <a href="#qiangquan"></a> | ||
8 | + </li> | ||
9 | + <li> | ||
10 | + <i class="bg-coin"></i> | ||
11 | + <br> | ||
12 | + <span>玩转有货币</span> | ||
13 | + <a href="#play-coin"></a> | ||
14 | + </li> | ||
15 | + <li> | ||
16 | + <i class="bg-level"></i> | ||
17 | + <br> | ||
18 | + <span>翻倍升级</span> | ||
19 | + <a href="#vip-rocket"></a> | ||
20 | + </li> | ||
21 | + <li> | ||
22 | + <i class="bg-goods"></i> | ||
23 | + <br> | ||
24 | + <span>专享产品</span> | ||
25 | + <a href="#vip-goods"></a> | ||
26 | + </li> | ||
27 | + <li> | ||
28 | + <i class="bg-fuli"></i> | ||
29 | + <br> | ||
30 | + <span>福利加倍</span> | ||
31 | + <a href="#js-msg-sec"></a> | ||
32 | + </li> | ||
33 | + </ul> | ||
34 | +</nav> |
1 | +<div class="game"> | ||
2 | + <div class="game-stage" id="js-stage"> | ||
3 | + <div class="game-item game-award is-active" data-index="1"></div> | ||
4 | + <div class="game-item game-award" data-index="2"></div> | ||
5 | + <div class="game-item game-award" data-index="3"></div> | ||
6 | + <div class="game-item game-award" data-index="8"></div> | ||
7 | + <div class="game-item game-boot"></div> | ||
8 | + <div class="game-item game-award" data-index="4"></div> | ||
9 | + <div class="game-item game-award" data-index="7"></div> | ||
10 | + <div class="game-item game-award" data-index="6"></div> | ||
11 | + <div class="game-item game-award" data-index="5"></div> | ||
12 | + </div> | ||
13 | +</div> |
1 | +<li class="vip-good"> | ||
2 | + <div style="border: 1px solid #000;"> | ||
3 | + <img class="vip-good-show" src="{{image defaultImages 220 115}}" alt=""> | ||
4 | + <div class="vip-good-price"> | ||
5 | + {{!-- | ||
6 | + <div class="text-right"> | ||
7 | + <sup>¥</sup><span>539</span> | ||
8 | + </div> | ||
9 | + <div class="text-left"> | ||
10 | + <span class="disable-price">¥539</span> | ||
11 | + </div> | ||
12 | + --}} | ||
13 | + {{#if marketPrice}} | ||
14 | + <sup>¥</sup><span>{{salesPrice}}</span><span class="disable-price">¥{{marketPrice}}</span> | ||
15 | + {{else}} | ||
16 | + <sup>¥</sup><span>{{salesPrice}}</span> | ||
17 | + {{/if}} | ||
18 | + </div> | ||
19 | + <div class="vip-good-bottom"> | ||
20 | + <h6 class="vip-good-name line-clamp-2">{{productName}}</h6> | ||
21 | + <button class="vip-good-fav" type="button">马上购买</button> | ||
22 | + </div> | ||
23 | + </div> | ||
24 | + <a class="vip-good-link" href='{{url}}'></a> | ||
25 | +</li> |
@@ -239,8 +239,9 @@ let getChannelSwitchData = () => { | @@ -239,8 +239,9 @@ let getChannelSwitchData = () => { | ||
239 | */ | 239 | */ |
240 | let getChannelData = (params) => { | 240 | let getChannelData = (params) => { |
241 | var channelData = {}; | 241 | var channelData = {}; |
242 | + let navGender = _.cloneDeep(params.gender); | ||
242 | 243 | ||
243 | - return Promise.all([_getChannelResource(params), _getLeftNav(params.gender)]).then((data) => { | 244 | + return Promise.all([_getChannelResource(params), _getLeftNav(navGender)]).then((data) => { |
244 | channelData.content = data[0]; // 资源位数据 | 245 | channelData.content = data[0]; // 资源位数据 |
245 | channelData.sideNav = data[1]; // 侧边栏数据 | 246 | channelData.sideNav = data[1]; // 侧边栏数据 |
246 | 247 |
@@ -110,7 +110,7 @@ const _processIndexData = (dataList) => { | @@ -110,7 +110,7 @@ const _processIndexData = (dataList) => { | ||
110 | let url = `/guang/star/detail?tag=${data.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${data.tagName}"}}}`; // eslint-disable-line | 110 | let url = `/guang/star/detail?tag=${data.tagName}&openby:yohobuy={"action":"go.h5","params":{"id":"","share":"","shareparam":{},"islogin":"N","type":0,"updateflag":"N","url":"http://m.yohobuy.com/guang/star/detail","param":{"tag":"${data.tagName}"}}}`; // eslint-disable-line |
111 | 111 | ||
112 | formatData.starAvatar.push({ | 112 | formatData.starAvatar.push({ |
113 | - //noLazy: index < 6, | 113 | + // noLazy: index < 6, |
114 | url: url, | 114 | url: url, |
115 | cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180') : data.cover | 115 | cover: data.cover ? (data.cover + '?imageView2/2/w/180/h/180') : data.cover |
116 | }); | 116 | }); |
@@ -67,23 +67,22 @@ const _reviewStatus = (res, req, uid, status) => { | @@ -67,23 +67,22 @@ const _reviewStatus = (res, req, uid, status) => { | ||
67 | }; | 67 | }; |
68 | 68 | ||
69 | // 还款列表公共处理块 | 69 | // 还款列表公共处理块 |
70 | -const _repaymentList = (req, res, title, params) => { | 70 | +const _repaymentList = (req, res, opt, params) => { |
71 | params = _.assign({ | 71 | params = _.assign({ |
72 | uid: req.cookies.installmentUid || 1 | 72 | uid: req.cookies.installmentUid || 1 |
73 | }, params); | 73 | }, params); |
74 | 74 | ||
75 | installmentModel.getQueryAmtList(params).then((result) => { | 75 | installmentModel.getQueryAmtList(params).then((result) => { |
76 | - res.render('installment/repayment-list', { | 76 | + res.render('installment/repayment-list', _.assign({ |
77 | module: 'home', | 77 | module: 'home', |
78 | page: 'repayment-list', | 78 | page: 'repayment-list', |
79 | isInstallmentPage: true, | 79 | isInstallmentPage: true, |
80 | - title: title, | ||
81 | data: result | 80 | data: result |
82 | - }); | 81 | + }, opt)); |
83 | }).catch(() => { | 82 | }).catch(() => { |
84 | _serverCrash(res, { | 83 | _serverCrash(res, { |
85 | url: req.originalUrl, | 84 | url: req.originalUrl, |
86 | - title: title | 85 | + title: opt.title |
87 | }); | 86 | }); |
88 | }); | 87 | }); |
89 | }; | 88 | }; |
@@ -195,28 +194,40 @@ const review = (req, res) => { | @@ -195,28 +194,40 @@ const review = (req, res) => { | ||
195 | 194 | ||
196 | // 逾期未还款列表 | 195 | // 逾期未还款列表 |
197 | const overdueList = (req, res) => { | 196 | const overdueList = (req, res) => { |
198 | - _repaymentList(req, res, '逾期未还金额', { | 197 | + _repaymentList(req, res, { |
198 | + title: '逾期未还金额', | ||
199 | + posId: 1 | ||
200 | + }, { | ||
199 | queryDays: -1 | 201 | queryDays: -1 |
200 | }); | 202 | }); |
201 | }; | 203 | }; |
202 | 204 | ||
203 | // 7日待还款列表 | 205 | // 7日待还款列表 |
204 | const sevenDayList = (req, res) => { | 206 | const sevenDayList = (req, res) => { |
205 | - _repaymentList(req, res, '近7日待还款', { | 207 | + _repaymentList(req, res, { |
208 | + title: '近7日待还款', | ||
209 | + posId: 2 | ||
210 | + }, { | ||
206 | queryDays: 7 | 211 | queryDays: 7 |
207 | }); | 212 | }); |
208 | }; | 213 | }; |
209 | 214 | ||
210 | // 本月待还款列表 | 215 | // 本月待还款列表 |
211 | const monthRepayList = (req, res) => { | 216 | const monthRepayList = (req, res) => { |
212 | - _repaymentList(req, res, '本月待还金额', { | 217 | + _repaymentList(req, res, { |
218 | + title: '本月待还金额', | ||
219 | + posId: 3 | ||
220 | + }, { | ||
213 | queryDays: 30 | 221 | queryDays: 30 |
214 | }); | 222 | }); |
215 | }; | 223 | }; |
216 | 224 | ||
217 | // 待还总金额列表 | 225 | // 待还总金额列表 |
218 | const totalRepayList = (req, res) => { | 226 | const totalRepayList = (req, res) => { |
219 | - _repaymentList(req, res, '待还总金额', { | 227 | + _repaymentList(req, res, { |
228 | + title: '待还总金额', | ||
229 | + posId: 4 | ||
230 | + }, { | ||
220 | queryDays: 0 | 231 | queryDays: 0 |
221 | }); | 232 | }); |
222 | }; | 233 | }; |
@@ -227,7 +238,8 @@ const repayRecordPage = (req, res) => { | @@ -227,7 +238,8 @@ const repayRecordPage = (req, res) => { | ||
227 | module: 'home', | 238 | module: 'home', |
228 | page: 'repay-record', | 239 | page: 'repay-record', |
229 | isInstallmentPage: true, | 240 | isInstallmentPage: true, |
230 | - title: '还款记录' | 241 | + title: '还款记录', |
242 | + posId: 5 | ||
231 | }); | 243 | }); |
232 | }; | 244 | }; |
233 | 245 | ||
@@ -258,8 +270,11 @@ const getRepayRecord = (req, res) => { | @@ -258,8 +270,11 @@ const getRepayRecord = (req, res) => { | ||
258 | // 账号管理 | 270 | // 账号管理 |
259 | const account = (req, res) => { | 271 | const account = (req, res) => { |
260 | res.render('installment/account', { | 272 | res.render('installment/account', { |
273 | + module: 'home', | ||
274 | + page: 'account', | ||
261 | title: '账号管理', | 275 | title: '账号管理', |
262 | - isInstallmentPage: true | 276 | + isInstallmentPage: true, |
277 | + posId: 7 | ||
263 | }); | 278 | }); |
264 | }; | 279 | }; |
265 | 280 | ||
@@ -368,7 +383,8 @@ const orderIndex = (req, res) => { | @@ -368,7 +383,8 @@ const orderIndex = (req, res) => { | ||
368 | page: 'installment.order', | 383 | page: 'installment.order', |
369 | title: '我的分期订单', | 384 | title: '我的分期订单', |
370 | navBtn: false, | 385 | navBtn: false, |
371 | - isInstallmentPage: true | 386 | + isInstallmentPage: true, |
387 | + posId: 6 | ||
372 | }); | 388 | }); |
373 | }; | 389 | }; |
374 | 390 |
apps/home/controllers/myqrcode.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +const model = require('../models/myqrcode'), | ||
4 | + headerModel = require('../../../doraemon/models/header'); // 头部model | ||
5 | + | ||
6 | +exports.index = (req, res, next) => { | ||
7 | + let params = req.query; | ||
8 | + | ||
9 | + model.getQr({ | ||
10 | + token: params.token, | ||
11 | + }).then(result => { | ||
12 | + params.token = result; | ||
13 | + params.uname = decodeURIComponent(params.uname); | ||
14 | + params.icon = params.icon || 'https://img11.static.yhbimg.com/yhb-img01/2016/07/05/13/017ec560b82c132ab2fdb22f7cf6f42b83.png?imageView/2/w/{width}/h/{height}'; | ||
15 | + res.render('myqrcode', { | ||
16 | + title: '查看二维码', | ||
17 | + module: 'home', | ||
18 | + page: 'myqrcode', | ||
19 | + isPassportPage: true, | ||
20 | + data: params, | ||
21 | + pageHeader: headerModel.setNav({ | ||
22 | + navTitle: '查看二维码' | ||
23 | + }) | ||
24 | + }); | ||
25 | + }).catch(next); | ||
26 | +}; | ||
27 | + | ||
28 | + |
@@ -80,10 +80,14 @@ const _infoNum = (params) => { | @@ -80,10 +80,14 @@ const _infoNum = (params) => { | ||
80 | * @param params | 80 | * @param params |
81 | */ | 81 | */ |
82 | const _getAddressData = (params) => { | 82 | const _getAddressData = (params) => { |
83 | - return api.get('', { | ||
84 | - method: 'app.address.gethidden', | ||
85 | - uid: params.uid | ||
86 | - }, {code: 200}); | 83 | + if (params.uid) { |
84 | + return api.get('', { | ||
85 | + method: 'app.address.gethidden', | ||
86 | + uid: params.uid | ||
87 | + }, {code: 200}); | ||
88 | + } else { | ||
89 | + return false; | ||
90 | + } | ||
87 | }; | 91 | }; |
88 | 92 | ||
89 | /** | 93 | /** |
@@ -102,7 +106,8 @@ const index = (params) => { | @@ -102,7 +106,8 @@ const index = (params) => { | ||
102 | cartUrl: helpers.urlFormat('/cart/index/index'), | 106 | cartUrl: helpers.urlFormat('/cart/index/index'), |
103 | signinUrl: helpers.urlFormat('/signin.html', { | 107 | signinUrl: helpers.urlFormat('/signin.html', { |
104 | refer: helpers.urlFormat('/home') | 108 | refer: helpers.urlFormat('/home') |
105 | - }) | 109 | + }), |
110 | + verifyUrl: helpers.urlFormat('/activity/student/register') | ||
106 | }; | 111 | }; |
107 | 112 | ||
108 | return api.all([ | 113 | return api.all([ |
@@ -116,7 +121,8 @@ const index = (params) => { | @@ -116,7 +121,8 @@ const index = (params) => { | ||
116 | Object.assign(finalResult, { | 121 | Object.assign(finalResult, { |
117 | profileName: result[0].data.profile_name, | 122 | profileName: result[0].data.profile_name, |
118 | headIco: result[0].data.head_ico, | 123 | headIco: result[0].data.head_ico, |
119 | - vipInfo: result[0].data.vip_info | 124 | + vipInfo: result[0].data.vip_info, |
125 | + students: _.get(result[0].data, 'vip_info.is_student', 0) === 1 | ||
120 | }); | 126 | }); |
121 | } | 127 | } |
122 | 128 |
apps/home/models/myqrcode.js
0 → 100644
1 | +'use strict'; | ||
2 | + | ||
3 | +const api = global.yoho.API; | ||
4 | +const crypto = global.yoho.crypto; | ||
5 | +const PASSWORD = 'yoho9646yoho9646'; | ||
6 | + | ||
7 | +exports.getQr = (params) => { | ||
8 | + let uid = ''; | ||
9 | + | ||
10 | + try { | ||
11 | + uid = crypto.decrypt(PASSWORD, decodeURIComponent(params.token)); | ||
12 | + } catch (e) { | ||
13 | + console.error(e); | ||
14 | + uid = params.token; | ||
15 | + } | ||
16 | + | ||
17 | + return api.get('', { | ||
18 | + method: 'app.twoDimen.getCode', | ||
19 | + uid: uid, | ||
20 | + }).then(result => { | ||
21 | + return (result && result.data && result.data.code) || ''; | ||
22 | + }); | ||
23 | +}; |
@@ -15,6 +15,7 @@ const cRoot = './controllers'; | @@ -15,6 +15,7 @@ const cRoot = './controllers'; | ||
15 | const installment = require(cRoot + '/installment'); | 15 | const installment = require(cRoot + '/installment'); |
16 | 16 | ||
17 | const personalController = require(`${cRoot}/qrcode`); | 17 | const personalController = require(`${cRoot}/qrcode`); |
18 | +const userQrcode = require(`${cRoot}/myqrcode`); | ||
18 | const homeController = require(`${cRoot}/index`); | 19 | const homeController = require(`${cRoot}/index`); |
19 | const addressController = require(`${cRoot}/address`); | 20 | const addressController = require(`${cRoot}/address`); |
20 | const favorite = require(`${cRoot}/favorite`); | 21 | const favorite = require(`${cRoot}/favorite`); |
@@ -33,8 +34,10 @@ const recommendForYou = require(`${cRoot}/recommend-for-you`); | @@ -33,8 +34,10 @@ const recommendForYou = require(`${cRoot}/recommend-for-you`); | ||
33 | 34 | ||
34 | // const myDetail = require(`${cRoot}/myDetail); | 35 | // const myDetail = require(`${cRoot}/myDetail); |
35 | 36 | ||
37 | + | ||
36 | // 查看二维码 | 38 | // 查看二维码 |
37 | router.get('/QRcode/:id', personalController.QRcode); | 39 | router.get('/QRcode/:id', personalController.QRcode); |
40 | +router.get('/user/qrcode', userQrcode.index); | ||
38 | 41 | ||
39 | /* 个人中心地址管理相关路由 */ | 42 | /* 个人中心地址管理相关路由 */ |
40 | router.get('/address', auth, addressController.address); // 地址管理页面 | 43 | router.get('/address', auth, addressController.address); // 地址管理页面 |
1 | <div class="my-page yoho-page"> | 1 | <div class="my-page yoho-page"> |
2 | <div class="my-header"> | 2 | <div class="my-header"> |
3 | {{#isLogin}} | 3 | {{#isLogin}} |
4 | - <a class="user-info" href="/home/mydetails"> | ||
5 | - <span class="user-avatar" data-avatar="{{image headIco 128 128}}"></span> | ||
6 | - <span class="username">{{profileName}}</span> | ||
7 | - {{#vipInfo}} | ||
8 | - <span class="vip-icon vip-{{cur_level}}"></span> | ||
9 | - {{/vipInfo}} | ||
10 | - <div class="iconfont more-icon tap-hightlight"></div> | ||
11 | - </a> | ||
12 | - {{/isLogin}} | ||
13 | - {{^isLogin}} | ||
14 | - <div class="user-info"> | ||
15 | - <a class="login-btn" href="{{signinUrl}}"> | ||
16 | - 登录/注册 | 4 | + <a class="user-info" href="/home/mydetails"> |
5 | + <span class="user-avatar" data-avatar="{{image headIco 128 128}}"></span> | ||
6 | + <span class="username">{{profileName}}</span> | ||
7 | + {{#vipInfo}} | ||
8 | + <span class="vip-icon vip-{{cur_level}}"></span> | ||
9 | + {{/vipInfo}} | ||
10 | + | ||
11 | + {{#if students}} | ||
12 | + <span class="vip-icon students"></span> | ||
13 | + {{/if}} | ||
14 | + <div class="iconfont more-icon tap-hightlight"></div> | ||
17 | </a> | 15 | </a> |
18 | - </div> | 16 | + {{#unless students}} |
17 | + <a class="students-entry" href="{{verifyUrl}}">学生认证</a> | ||
18 | + {{/unless}} | ||
19 | + {{^}} | ||
20 | + <div class="user-info"> | ||
21 | + <a class="login-btn" href="{{signinUrl}}"> | ||
22 | + 登录/注册 | ||
23 | + </a> | ||
24 | + <a class="students-entry" href="{{verifyUrl}}">学生认证</a> | ||
25 | + </div> | ||
19 | {{/isLogin}} | 26 | {{/isLogin}} |
20 | </div> | 27 | </div> |
21 | <div class="my-link clearfix {{^isLogin}}no-login{{/isLogin}}"> | 28 | <div class="my-link clearfix {{^isLogin}}no-login{{/isLogin}}"> |
@@ -32,18 +39,16 @@ | @@ -32,18 +39,16 @@ | ||
32 | <p>浏览记录</p> | 39 | <p>浏览记录</p> |
33 | </a> | 40 | </a> |
34 | </div> | 41 | </div> |
35 | - | ||
36 | - <div class="notice" data-time="{{notice.time}}"> | ||
37 | - {{#notice}} | ||
38 | - <a class="notice-item item-{{@index}}" href="{{url}}"> | ||
39 | - <span class="notice-icon"></span> | ||
40 | - {{title}} | ||
41 | - </a> | ||
42 | - {{/notice}} | ||
43 | - </div> | ||
44 | - | ||
45 | - <!-- {{#if notice.open}} | ||
46 | - {{/if}}--> | 42 | + {{#if notice.open}} |
43 | + <div class="notice" data-time="{{notice.time}}"> | ||
44 | + {{#notice}} | ||
45 | + <a class="notice-item item-{{@index}}" href="{{url}}"> | ||
46 | + <span class="notice-icon"></span> | ||
47 | + {{title}} | ||
48 | + </a> | ||
49 | + {{/notice}} | ||
50 | + </div> | ||
51 | + {{/if}} | ||
47 | <div class="my-order"> | 52 | <div class="my-order"> |
48 | <a class="order-title" href="/home/orders"> | 53 | <a class="order-title" href="/home/orders"> |
49 | 我的订单 | 54 | 我的订单 |
1 | -<div class="account-page"> | 1 | +<div class="account-page" data-pos-id="{{posId}}"> |
2 | <ul class="account-list"> | 2 | <ul class="account-list"> |
3 | <li><a href="/home/installment/bank-card">我的银行卡:<div class="list-right"><span class="iconfont"></span></div></a></li> | 3 | <li><a href="/home/installment/bank-card">我的银行卡:<div class="list-right"><span class="iconfont"></span></div></a></li> |
4 | </ul> | 4 | </ul> |
1 | <div class="installment-page installment-bg"> | 1 | <div class="installment-page installment-bg"> |
2 | {{#if notOpen}} | 2 | {{#if notOpen}} |
3 | + <input type="hidden" value="false" class="is-open"> | ||
3 | {{# bannerTop}} | 4 | {{# bannerTop}} |
4 | {{> resources/banner-top}} | 5 | {{> resources/banner-top}} |
5 | {{/ bannerTop}} | 6 | {{/ bannerTop}} |
@@ -26,6 +27,7 @@ | @@ -26,6 +27,7 @@ | ||
26 | {{> installment/installment-only}} | 27 | {{> installment/installment-only}} |
27 | {{/ installmentOnly}} | 28 | {{/ installmentOnly}} |
28 | {{else}} | 29 | {{else}} |
30 | + <input type="hidden" value="true" class="is-open"> | ||
29 | <div class="detail-tab"> | 31 | <div class="detail-tab"> |
30 | <span class="on is-repay">待还款金额</span> | 32 | <span class="on is-repay">待还款金额</span> |
31 | <span class="is-usable">可用额度</span> | 33 | <span class="is-usable">可用额度</span> |
@@ -35,19 +37,19 @@ | @@ -35,19 +37,19 @@ | ||
35 | <p class="detail-txt1">近7日待还款</p> | 37 | <p class="detail-txt1">近7日待还款</p> |
36 | <p class="detail-txt1">¥<span class="detail-txt2">{{dayAmt}}</span></p> | 38 | <p class="detail-txt1">¥<span class="detail-txt2">{{dayAmt}}</span></p> |
37 | {{#if isOverdue}} | 39 | {{#if isOverdue}} |
38 | - <p class="detail-txt3">您有¥{{overAmt}}已逾期,点击<a href="/home/installment/repay/overdue">查看详情</a></p> | 40 | + <p class="detail-txt3">您有¥{{overAmt}}已逾期,点击<a href="/home/installment/repay/overdue" class="nav-bit" data-id="1">查看详情</a></p> |
39 | {{/if}} | 41 | {{/if}} |
40 | - <a href="/home/installment/repay/7daylist" class="see-btn">明细</a> | 42 | + <a href="/home/installment/repay/7daylist" class="see-btn nav-bit" data-id="2">明细</a> |
41 | </div> | 43 | </div> |
42 | <ul class="group-list"> | 44 | <ul class="group-list"> |
43 | - <li><a href="/home/installment/repay/month">本月待还金额:<div class="list-right"><span class="list-r-txt">¥{{monthAmt}}</span><span class="iconfont"> </span></div></a></li> | ||
44 | - <li><a href="/home/installment/repay/total">待还总金额:<div class="list-right"><span class="list-r-txt">¥{{totalAmt}}</span><span class="iconfont"> </span></div></a></li> | ||
45 | - <li><a href="/home/installment/repay/record">还款记录:<div class="list-right iconfont"></div></a></li> | ||
46 | - <li><a href="/home/installment/order">分期订单:<div class="list-right iconfont"></div></a></li> | 45 | + <li><a href="/home/installment/repay/month" class="nav-bit" data-id="3">本月待还金额:<div class="list-right"><span class="list-r-txt">¥{{monthAmt}}</span><span class="iconfont"> </span></div></a></li> |
46 | + <li><a href="/home/installment/repay/total" class="nav-bit" data-id="4">待还总金额:<div class="list-right"><span class="list-r-txt">¥{{totalAmt}}</span><span class="iconfont"> </span></div></a></li> | ||
47 | + <li><a href="/home/installment/repay/record" class="nav-bit" data-id="5">还款记录:<div class="list-right iconfont"></div></a></li> | ||
48 | + <li><a href="/home/installment/order" class="nav-bit" data-id="6">分期订单:<div class="list-right iconfont"></div></a></li> | ||
47 | </ul> | 49 | </ul> |
48 | 50 | ||
49 | <ul class="group-list"> | 51 | <ul class="group-list"> |
50 | - <li><a href="/home/installment/account">账户管理:<span class="list-right iconfont"></span></a></li> | 52 | + <li><a href="/home/installment/account" class="nav-bit" data-id="7">账户管理:<span class="list-right iconfont"></span></a></li> |
51 | </ul> | 53 | </ul> |
52 | </div> | 54 | </div> |
53 | <div class="usable installment-cont"> | 55 | <div class="usable installment-cont"> |
1 | {{#if orders}} | 1 | {{#if orders}} |
2 | {{#each orders}} | 2 | {{#each orders}} |
3 | <li> | 3 | <li> |
4 | - <a href="/home/installment/order/{{orderCode}}"> | 4 | + <a href="/home/installment/order/{{orderCode}}" data-code="{{orderCode}}"> |
5 | {{#orderGoods}} | 5 | {{#orderGoods}} |
6 | <div class="image-box"> | 6 | <div class="image-box"> |
7 | <img src="{{image goodsImage 90 120}}" alt="{{productName}}"/> | 7 | <img src="{{image goodsImage 90 120}}" alt="{{productName}}"/> |
1 | -<div class="repayment-list-page installment-order-page yoho-page"> | 1 | +<div class="repayment-list-page installment-order-page yoho-page" data-pos-id="{{posId}}"> |
2 | {{> resources/banner-top}} | 2 | {{> resources/banner-top}} |
3 | <ul class="header-tab"> | 3 | <ul class="header-tab"> |
4 | <li class="active"> | 4 | <li class="active"> |
1 | -<div class="repayment-list-page"> | 1 | +<div class="repayment-list-page" data-pos-id="{{posId}}"> |
2 | <ul class="record-list"></ul> | 2 | <ul class="record-list"></ul> |
3 | <div class="no-result" style="display: none;"> | 3 | <div class="no-result" style="display: none;"> |
4 | <i class="result-icon"></i> | 4 | <i class="result-icon"></i> |
1 | -<div class="repayment-list-page yoho-page"> | 1 | +<div class="repayment-list-page yoho-page" data-pos-id="{{posId}}"> |
2 | {{#data}} | 2 | {{#data}} |
3 | {{#if isNoResult}} | 3 | {{#if isNoResult}} |
4 | <div class="no-result"> | 4 | <div class="no-result"> |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | {{else}} | 9 | {{else}} |
10 | <ul class="repay-list"> | 10 | <ul class="repay-list"> |
11 | {{#each repaymentList}} | 11 | {{#each repaymentList}} |
12 | - <li data-currfee="{{currFee}}" data-currnofeeamt="{{currNoFeeAmt}}" data-curramt="{{currAmt}}" data-bill-no="{{billNo}}" data-currterm={{currTerm}}> | 12 | + <li data-currfee="{{currFee}}" data-currnofeeamt="{{currNoFeeAmt}}" data-curramt="{{currAmt}}" data-bill-no="{{billNo}}" data-currterm={{currTerm}} data-terms={{terms}}> |
13 | <input id="list-{{key}}" type="checkbox" class="installment-check-btn" {{#if isChecked}}checked{{/if}}/> | 13 | <input id="list-{{key}}" type="checkbox" class="installment-check-btn" {{#if isChecked}}checked{{/if}}/> |
14 | <label for="list-{{key}}"> | 14 | <label for="list-{{key}}"> |
15 | <div class="cont"> | 15 | <div class="cont"> |
apps/home/views/action/myqrcode.hbs
0 → 100644
1 | +{{#data}} | ||
2 | +<section class="myqrcode"> | ||
3 | + <img src="{{image icon 120 120}}" class="myqrcode_head" alt=""> | ||
4 | + <p class="myqrcode_uname">{{uname}}</p> | ||
5 | + <div class="myqrcode_vip myqrcode_vip_{{vip}}"></div> | ||
6 | + <div class="myqrcode_qr" qr-data="{{token}}"> | ||
7 | + <img src="{{image icon 100 100}}" class="myqrcode_icon" alt=""> | ||
8 | + </div> | ||
9 | +</section> | ||
10 | +{{/data}} |
@@ -14,8 +14,8 @@ | @@ -14,8 +14,8 @@ | ||
14 | <div class="repayment-bottom" style="display: none;"> | 14 | <div class="repayment-bottom" style="display: none;"> |
15 | <input id="repayment-total" type="checkbox" class="installment-check-btn" {{#if isAllChecked}}checked{{/if}}/> | 15 | <input id="repayment-total" type="checkbox" class="installment-check-btn" {{#if isAllChecked}}checked{{/if}}/> |
16 | <label for="repayment-total"> | 16 | <label for="repayment-total"> |
17 | - <p class="repay-price">待支付:<span>¥<span class="curr-amt">{{round currAmtCount}}</span></span></p> | ||
18 | - <p class="serve-price" {{#if isCurrFee}}style="display:block;"{{/if}}>含逾期服务费¥<span class="curr-fee">{{round currFeeCount}}</span></p> | 17 | + <p class="repay-price">待支付:<span>¥<span class="curr-amt">{{currAmtCount}}</span></span></p> |
18 | + <p class="serve-price" {{#if isCurrFee}}style="display:block;"{{/if}}>含逾期服务费¥<span class="curr-fee">{{currFeeCount}}</span></p> | ||
19 | </label> | 19 | </label> |
20 | <a href='' class="repayment-btn">立即还款</a> | 20 | <a href='' class="repayment-btn">立即还款</a> |
21 | </div> | 21 | </div> |
@@ -245,7 +245,9 @@ const bind = { | @@ -245,7 +245,9 @@ const bind = { | ||
245 | let refer = req.cookies.refer; | 245 | let refer = req.cookies.refer; |
246 | let type = req.query.type; | 246 | let type = req.query.type; |
247 | 247 | ||
248 | - refer = helpers.urlFormat('/?go=1'); | 248 | + if (!refer || /signin|login/.test(refer)) { |
249 | + refer = helpers.urlFormat('/?go=1'); | ||
250 | + } | ||
249 | 251 | ||
250 | res.render('bind/success', { | 252 | res.render('bind/success', { |
251 | isPassportPage: true, | 253 | isPassportPage: true, |
@@ -639,7 +639,7 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => { | @@ -639,7 +639,7 @@ const _detailDataPkg = (origin, uid, vipLevel, ua) => { | ||
639 | vipList.push({ | 639 | vipList.push({ |
640 | level: levelList[value.caption], | 640 | level: levelList[value.caption], |
641 | text: value.price, | 641 | text: value.price, |
642 | - currentLevel: (value.vipLevel === vipLevel) | 642 | + currentLevel: (levelList[value.caption] === parseInt(vipLevel, 10)) |
643 | }); | 643 | }); |
644 | }); | 644 | }); |
645 | 645 |
@@ -181,9 +181,14 @@ const _searchSales = (params) => { | @@ -181,9 +181,14 @@ const _searchSales = (params) => { | ||
181 | } | 181 | } |
182 | 182 | ||
183 | params = Object.assign({ | 183 | params = Object.assign({ |
184 | - limit: '50' | 184 | + limit: '60' |
185 | }, params); | 185 | }, params); |
186 | 186 | ||
187 | + // 5.0.0 sale 按后台导入顺序排列 | ||
188 | + if (params.type === 'all') { | ||
189 | + params.type = ''; | ||
190 | + } | ||
191 | + | ||
187 | if (typeCont[params.type]) { | 192 | if (typeCont[params.type]) { |
188 | params.order = typeCont[params.type][params.order]; | 193 | params.order = typeCont[params.type][params.order]; |
189 | } | 194 | } |
@@ -78,12 +78,12 @@ module.exports = { | @@ -78,12 +78,12 @@ module.exports = { | ||
78 | if (isProduction) { | 78 | if (isProduction) { |
79 | Object.assign(module.exports, { | 79 | Object.assign(module.exports, { |
80 | appName: 'm.yohobuy.com', | 80 | appName: 'm.yohobuy.com', |
81 | - assetUrl: '//cdn.yoho.cn/m-yohobuy-node/assets', | 81 | + assetUrl: '//cdn.yoho.cn/m-yohobuy-node/assets/', |
82 | domains: { | 82 | domains: { |
83 | api: 'http://api.yoho.yohoops.org/', | 83 | api: 'http://api.yoho.yohoops.org/', |
84 | service: 'http://service.yoho.yohoops.org/', | 84 | service: 'http://service.yoho.yohoops.org/', |
85 | liveApi: 'http://api.live.yoho.cn/', | 85 | liveApi: 'http://api.live.yoho.cn/', |
86 | - singleApi: 'http://singleapi.yoho.cn/' | 86 | + singleApi: 'http://single.yoho.cn/' |
87 | }, | 87 | }, |
88 | memcache: { | 88 | memcache: { |
89 | master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], | 89 | master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'], |
@@ -101,7 +101,7 @@ if (isProduction) { | @@ -101,7 +101,7 @@ if (isProduction) { | ||
101 | } else if (isTest) { | 101 | } else if (isTest) { |
102 | Object.assign(module.exports, { | 102 | Object.assign(module.exports, { |
103 | appName: 'm.yohobuy.com for test', | 103 | appName: 'm.yohobuy.com for test', |
104 | - assetUrl: '//cdn.yoho.cn/m-yohobuy-node/assets', | 104 | + assetUrl: '//cdn.yoho.cn/m-yohobuy-node/assets/', |
105 | domains: { | 105 | domains: { |
106 | api: process.env.TEST_API || 'http://api-test1.yohops.com:9999/', | 106 | api: process.env.TEST_API || 'http://api-test1.yohops.com:9999/', |
107 | service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/', | 107 | service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/', |
@@ -32,13 +32,14 @@ | @@ -32,13 +32,14 @@ | ||
32 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> | 32 | <link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)"> |
33 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> | 33 | <link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)"> |
34 | </head> | 34 | </head> |
35 | - <body class="{{#if width750}}width750{{/if}} {{#if isWechat}}wechat-body{{/if}} {{#if isPassportPage}}passport-body{{/if}} {{#if isStarIndexPage}}star-index-bg{{/if}} {{#if isStarDetailPage}}star-class-body{{/if}} {{#if isInstallmentPage}}installment-body{{/if}}"> | 35 | + <body class="{{pageStyle}} {{#if isWechat}}wechat-body{{/if}} {{#if width750}}width750{{/if}} {{#if isPassportPage}}passport-body{{/if}} {{#if isStarIndexPage}}star-index-bg{{/if}} {{#if isStarDetailPage}}star-class-body{{/if}} {{#if isInstallmentPage}}installment-body{{/if}}"> |
36 | <div class="main-wrap"> | 36 | <div class="main-wrap"> |
37 | {{#if systemUpdate}} | 37 | {{#if systemUpdate}} |
38 | {{> updata}} | 38 | {{> updata}} |
39 | {{/if}} | 39 | {{/if}} |
40 | - | 40 | + {{#unless isApp}} |
41 | {{> header}} | 41 | {{> header}} |
42 | + {{/unless}} | ||
42 | {{{body}}} | 43 | {{{body}}} |
43 | {{> footer}} | 44 | {{> footer}} |
44 | </div> | 45 | </div> |
1 | {{#if this}} {{!-- 剔除值为false的项 --}} | 1 | {{#if this}} {{!-- 剔除值为false的项 --}} |
2 | - {{#this}} | ||
3 | - <div class="good-info {{#if @root.saleViplogin}}sale-vip{{/if}}" data-id="{{productSkn}}" data-bp-id="guang_goodList_{{productName}}_false"> | 2 | + <div class="good-info {{#if @root.saleViplogin}}sale-vip{{/if}}" data-good-id="{{productId}}" data-id="{{productSkn}}" data-bp-id="guang_goodList_{{productName}}_false"> |
4 | <div class="tag-container clearfix"> | 3 | <div class="tag-container clearfix"> |
5 | {{# tags}} | 4 | {{# tags}} |
6 | {{# isNew}} | 5 | {{# isNew}} |
@@ -60,5 +59,4 @@ | @@ -60,5 +59,4 @@ | ||
60 | {{/if}} | 59 | {{/if}} |
61 | </div> | 60 | </div> |
62 | </div> | 61 | </div> |
63 | - {{/this}} | ||
64 | {{/if}} | 62 | {{/if}} |
1 | +{{#data}} | ||
2 | + <div class="best-week"> | ||
3 | + {{> common/floor-header-more}} | ||
4 | + | ||
5 | + <ul class="six-lines-floor clearfix"> | ||
6 | + {{# list}} | ||
7 | + <li> | ||
8 | + <a href="{{url}}"> | ||
9 | + <div class="img-box"> | ||
10 | + <img class="lazy" data-original="{{image src 180 320}}" alt=""> | ||
11 | + </div> | ||
12 | + </a> | ||
13 | + </li> | ||
14 | + {{/ list}} | ||
15 | + </ul> | ||
16 | + </div> | ||
17 | +{{/data}} |
1 | { | 1 | { |
2 | "name": "m-yohobuy-node", | 2 | "name": "m-yohobuy-node", |
3 | - "version": "4.9.27", | 3 | + "version": "5.0.0", |
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": { |
@@ -28,10 +28,10 @@ | @@ -28,10 +28,10 @@ | ||
28 | "express-handlebars": "^3.0.0", | 28 | "express-handlebars": "^3.0.0", |
29 | "express-session": "^1.14.1", | 29 | "express-session": "^1.14.1", |
30 | "influxdb-winston": "^1.0.1", | 30 | "influxdb-winston": "^1.0.1", |
31 | - "lodash": "^4.15.0", | 31 | + "lodash": "^4.16.1", |
32 | "md5": "^2.1.0", | 32 | "md5": "^2.1.0", |
33 | "memcached": "^2.2.1", | 33 | "memcached": "^2.2.1", |
34 | - "moment": "^2.14.1", | 34 | + "moment": "^2.15.1", |
35 | "morgan": "^1.7.0", | 35 | "morgan": "^1.7.0", |
36 | "passport": "^0.3.2", | 36 | "passport": "^0.3.2", |
37 | "passport-local": "^1.0.0", | 37 | "passport-local": "^1.0.0", |
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | "passport-weixin": "^0.1.0", | 41 | "passport-weixin": "^0.1.0", |
42 | "request-promise": "^3.0.0", | 42 | "request-promise": "^3.0.0", |
43 | "serve-favicon": "^2.3.0", | 43 | "serve-favicon": "^2.3.0", |
44 | - "uuid": "^2.0.2", | 44 | + "uuid": "^2.0.3", |
45 | "winston": "^2.2.0", | 45 | "winston": "^2.2.0", |
46 | "winston-daily-rotate-file": "^1.3.0", | 46 | "winston-daily-rotate-file": "^1.3.0", |
47 | "yoho-node-lib": "0.0.49" | 47 | "yoho-node-lib": "0.0.49" |
@@ -58,7 +58,8 @@ | @@ -58,7 +58,8 @@ | ||
58 | "gulp-postcss": "^6.2.0", | 58 | "gulp-postcss": "^6.2.0", |
59 | "gulp-sourcemaps": "^2.0.0-alpha", | 59 | "gulp-sourcemaps": "^2.0.0-alpha", |
60 | "gulp-util": "^3.0.7", | 60 | "gulp-util": "^3.0.7", |
61 | - "husky": "^0.11.4", | 61 | + "handlebars-loader": "^1.4.0", |
62 | + "husky": "^0.11.8", | ||
62 | "nodemon": "^1.10.2", | 63 | "nodemon": "^1.10.2", |
63 | "postcss-assets": "^4.0.1", | 64 | "postcss-assets": "^4.0.1", |
64 | "postcss-cachebuster": "^0.1.3", | 65 | "postcss-cachebuster": "^0.1.3", |
@@ -69,14 +70,14 @@ | @@ -69,14 +70,14 @@ | ||
69 | "postcss-position": "^0.5.0", | 70 | "postcss-position": "^0.5.0", |
70 | "postcss-pxtorem": "^3.3.1", | 71 | "postcss-pxtorem": "^3.3.1", |
71 | "postcss-short": "^1.4.0", | 72 | "postcss-short": "^1.4.0", |
72 | - "postcss-sprites": "^3.1.2", | 73 | + "postcss-sprites": "^3.3.0", |
73 | "postcss-use": "^2.3.0", | 74 | "postcss-use": "^2.3.0", |
74 | "precss": "^1.4.0", | 75 | "precss": "^1.4.0", |
75 | "shelljs": "^0.7.0", | 76 | "shelljs": "^0.7.0", |
76 | - "stylelint": "^7.1.0", | 77 | + "stylelint": "^7.3.1", |
77 | "stylelint-config-yoho": "^1.2.7", | 78 | "stylelint-config-yoho": "^1.2.7", |
78 | "webpack": "^1.13.2", | 79 | "webpack": "^1.13.2", |
79 | - "webpack-dev-server": "^1.15.0", | 80 | + "webpack-dev-server": "^1.16.1", |
80 | "webpack-stream": "^3.1.0", | 81 | "webpack-stream": "^3.1.0", |
81 | "yoho-fastclick": "^1.0.6", | 82 | "yoho-fastclick": "^1.0.6", |
82 | "yoho-hammer": "^2.0.7", | 83 | "yoho-hammer": "^2.0.7", |
@@ -84,6 +85,7 @@ | @@ -84,6 +85,7 @@ | ||
84 | "yoho-iscroll": "^5.2.0", | 85 | "yoho-iscroll": "^5.2.0", |
85 | "yoho-jquery": "^2.2.4", | 86 | "yoho-jquery": "^2.2.4", |
86 | "yoho-jquery-lazyload": "^1.9.7", | 87 | "yoho-jquery-lazyload": "^1.9.7", |
88 | + "yoho-jquery-qrcode": "^0.14.0", | ||
87 | "yoho-mlellipsis": "0.0.3", | 89 | "yoho-mlellipsis": "0.0.3", |
88 | "yoho-swiper": "^3.3.1" | 90 | "yoho-swiper": "^3.3.1" |
89 | } | 91 | } |
public/img/activity/invite/chit0.png
0 → 100644

12 KB
public/img/activity/invite/chit10.png
0 → 100644

15.4 KB
public/img/activity/invite/chit15.png
0 → 100644

15.3 KB
public/img/activity/invite/logo.png
0 → 100644

6.77 KB
public/img/activity/vip_day/activity.jpg
0 → 100644

51.9 KB
public/img/activity/vip_day/awards@2x.png
0 → 100644

3.82 KB
public/img/activity/vip_day/chit-more.png
0 → 100644

10.1 KB
public/img/activity/vip_day/chit-stage.png
0 → 100644

26 KB
public/img/activity/vip_day/chit.png
0 → 100644

8.28 KB
public/img/activity/vip_day/chit10.png
0 → 100644

6.57 KB
public/img/activity/vip_day/chit30.png
0 → 100644

7.95 KB
public/img/activity/vip_day/chit60.png
0 → 100644

7.99 KB
public/img/activity/vip_day/coin-lite@2x.png
0 → 100644

2.21 KB
public/img/activity/vip_day/coin.png
0 → 100644

15.8 KB
public/img/activity/vip_day/cursor.png
0 → 100644

1.28 KB
public/img/activity/vip_day/double-fuli.png
0 → 100644

5.39 KB
public/img/activity/vip_day/double-level.png
0 → 100644

4.97 KB
public/img/activity/vip_day/foot-app.png
0 → 100644

64.7 KB
public/img/activity/vip_day/fuli-qiandao.png
0 → 100644

6.05 KB
public/img/activity/vip_day/get-chit.png
0 → 100644

3.51 KB
public/img/activity/vip_day/happy-fuli.png
0 → 100644

11.3 KB
public/img/activity/vip_day/invite.jpg
0 → 100644

55.8 KB
public/img/activity/vip_day/leava-msg.png
0 → 100644

12.5 KB
public/img/activity/vip_day/luck-desc@2x.png
0 → 100644

30.5 KB
public/img/activity/vip_day/luck-stage.png
0 → 100644

39.3 KB
public/img/activity/vip_day/luck.png
0 → 100644

5.25 KB
public/img/activity/vip_day/play-coin-1.png
0 → 100644

15.6 KB
public/img/activity/vip_day/play-coin-2.png
0 → 100644

10.5 KB

8.78 KB
public/img/activity/vip_day/play-coin.png
0 → 100644

4.56 KB
public/img/activity/vip_day/point.png
0 → 100644

5.92 KB

4.24 KB
public/img/activity/vip_day/privilege.png
0 → 100644

43.9 KB
public/img/activity/vip_day/qcode.jpg
0 → 100644

46.1 KB
public/img/activity/vip_day/qiandao.png
0 → 100644

57.3 KB
public/img/activity/vip_day/slogan.png
0 → 100644

21.1 KB
public/img/activity/vip_day/sprite1.png
0 → 100644

214 Bytes
public/img/activity/vip_day/sprite2.png
0 → 100644

3.41 KB
public/img/activity/vip_day/stage@2x.png
0 → 100644

5.46 KB
public/img/activity/vip_day/star-btn@2x.png
0 → 100644

3.97 KB
public/img/activity/vip_day/vip-boot-pic.jpg
0 → 100644

84.2 KB
public/img/activity/vip_day/vip-boot.png
0 → 100644

5.47 KB

9.55 KB

30.5 KB
No preview for this file type
public/img/home/vip-1.png
0 → 100644

3.68 KB
public/img/home/vip-2.png
0 → 100644

3.4 KB
public/img/home/vip-3.png
0 → 100644

3.8 KB
public/img/product/limit.png
deleted
100644 → 0

25.2 KB
-
Please register or login to post a comment