diff --git a/apps/activity/controllers/expand-new.js b/apps/activity/controllers/expand-new.js new file mode 100644 index 0000000..602638d --- /dev/null +++ b/apps/activity/controllers/expand-new.js @@ -0,0 +1,80 @@ +'use strict'; + +const expandModel = require('../models/expand-new'), + headerModel = require('../../../doraemon/models/header'); + +exports.promotion = (req, res, next) => { + let uid = req.user.uid, + isApp = req.yoho.isApp; + + req.ctx(expandModel).promotionData(uid, isApp).then(result => { + res.render('expand-new/my-promotion', { + pageHeader: headerModel.setNav({ + navTitle: '我的邀请码', + navBtn: false, + myReward: true + }), + isApp: isApp, + width750: true, + localCss: true, + title: '我的邀请码', + page: 'my-promotion', + promotionData: result + }); + }).catch(next); +}; + +exports.myReward = (req, res, next) => { + let isApp = req.yoho.isApp, + uid = req.user.uid, + page = 1, + limit = 20; + + req.ctx(expandModel).rewardList(uid, page, limit, isApp).then(result => { + res.render('expand-new/my-reward', { + pageHeader: headerModel.setNav({ + navTitle: '我的奖励' + }), + isApp: isApp, + width750: true, + localCss: true, + title: '我的奖励', + page: 'my-reward', + rewardData: result + }); + }).catch(next); +}; + +exports.rewardList = (req, res, next) => { + let uid = req.user.uid, + page = req.query.page, + limit = 20, + isApp = req.yoho.isApp; + + req.ctx(expandModel).rewardList(uid, page, limit, isApp).then(result => { + res.render('expand-new/reward-list', { + layout: false, + rewardList: result.rewardList + }); + }).catch(next); +}; + +exports.rewardDetail = (req, res, next) => { + let isApp = req.yoho.isApp, + uid = req.user.uid, + firstOrderUid = req.query.firstOrderUid; + + req.ctx(expandModel).rewardDeatil(uid, firstOrderUid).then(result => { + res.render('expand-new/reward-detail', { + pageHeader: headerModel.setNav({ + navTitle: '我的奖励' + }), + isApp: isApp, + width750: true, + localCss: true, + title: '我的奖励', + page: 'reward-detail', + rewardDetail: result + }); + }).catch(next); +}; diff --git a/apps/activity/models/expand-new.js b/apps/activity/models/expand-new.js new file mode 100644 index 0000000..62104b3 --- /dev/null +++ b/apps/activity/models/expand-new.js @@ -0,0 +1,94 @@ +const api = global.yoho.API; +const _ = require('lodash'); +const helpers = global.yoho.helpers; + +module.exports = class extends global.yoho.BaseModel { + constructor(ctx) { + super(ctx); + } + + /** + * 我的邀请码页 + */ + promotionData(uid, isApp) { + return api.get('', { + method: 'app.invitecode.my', + uid: uid + }, { + code: 200 + }).then((result) => { + + if (result && result.code === 200 && result.data) { + + result.data.isApp = isApp; + result.data.copyUrl = result.data.url.replace(/"/g, '"').replace(/=/g, ':'); + + return result.data; + } else { + return {}; + } + }); + } + + /** + * 奖励列表页 + */ + rewardList(uid, page, limit, isApp) { + return api.get('', { + method: 'app.invitecode.history', + uid: uid, + page: page, + limit: limit + }).then((result) => { + + if (result && result.code === 200 && result.data) { + let finData = {}; + + _.forEach(result.data.data, function(val) { + + val.detailUrl = helpers.urlFormat('/activity/reward-detail', { + firstOrderUid: val.firstOrderUid + }); + + val.orderAmountDis = val.orderAmountDis === '-' ? val.orderAmountDis : '¥' + val.orderAmountDis; + + if (isApp) { + val.detailUrl = val.detailUrl + + '&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"http:' + + val.detailUrl + '","params":{"firstOrderUid":"' + val.firstOrderUid + '"}}}'; + } + }); + + finData.rewardList = result.data.data.length !== 0 ? result.data.data : false; + + if (parseInt(page, 10) === 1) { + finData.activityRuleDesc = result.data.activityRuleDesc; + } + + return finData; + } else { + return {}; + } + }); + } + + /** + * 奖励详情页 + */ + rewardDeatil(uid, firstOrderUid) { + return api.get('', { + method: 'app.invitecode.detail', + uid: uid, + firstOrderUid: firstOrderUid + }).then((result) => { + + if (result && result.code === 200) { + result.data.orderAmountDis = result.data.orderAmountDis === '-' ? + result.data.orderAmountDis : '¥' + result.data.orderAmountDis; + return result.data; + } else { + return {}; + } + }); + } +}; diff --git a/apps/activity/router.js b/apps/activity/router.js index ab81aff..389dfd3 100644 --- a/apps/activity/router.js +++ b/apps/activity/router.js @@ -51,6 +51,8 @@ const update = require('../../doraemon/middleware/update'); const userRecommend = require(`${cRoot}/user-recommend`); +const expand = require(`${cRoot}/expand-new`); + // routers @@ -264,4 +266,9 @@ router.get('/share-buy/my-rebeat', update('5.7.0'), auth, shareBuy.myRebeat); // router.get('/user-recommend', userRecommend.index); // 广点通投放落地页 router.get('/user-recommend/moreGoods', userRecommend.moreGoods); // 获取商品分页 +router.get('/my-promotion', auth, expand.promotion); // 拓展新客 我的邀请码页 +router.get('/my-reward', auth, expand.myReward); // 拓展新客 我的奖励页 +router.get('/reward-list', expand.rewardList); // 拓展新客 我的奖励列表 +router.get('/reward-detail', auth, expand.rewardDetail); // 拓展新客 我的奖励详情页 + module.exports = router; diff --git a/apps/activity/views/action/expand-new/my-promotion.hbs b/apps/activity/views/action/expand-new/my-promotion.hbs new file mode 100644 index 0000000..be79578 --- /dev/null +++ b/apps/activity/views/action/expand-new/my-promotion.hbs @@ -0,0 +1,47 @@ +<div class="my-promotion-page yoho-page"> + {{# promotionData}} + <div class="my-code"> + <div class="describe"> + {{{activityDescribe}}} + </div> + <div class="title"></div> + <div class="code-outer"> + <div class="code-qr" qr-data="{{url}}"></div> + </div> + </div> + <div class="invite-code invitation"> + <div class="title"></div> + <div class="code-content"> + <div class="invite-content"> + <span class="code">{{inviteCode}}</span> + {{#if isApp}} + <a class="copy" href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{inviteCode}}","message":"复制成功"}}'>复制</a> + {{/if}} + </div> + <p class="info">1.复制您的邀请码 2.粘贴给您的朋友</p> + </div> + </div> + <div class="invite-link invitation"> + <div class="title"></div> + <div class="code-content"> + <div class="invite-content"> + <span class="code">{{url}}</span> + {{#if isApp}} + <a class="copy" href='//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"{{copyUrl}}","message":"复制成功"}}'>复制</a> + {{/if}} + </div> + <p class="link-info"> + <span class="info">1.复制您的邀请链接 2.选择您的社交平台 3.粘贴给您的朋友</span> + {{#if isApp}} + <span class="share">分享</span> + {{/if}} + </p> + </div> + </div> + + <input id="shareLink" type="hidden" value="{{url}}"> + <input id="shareImg" type="hidden" value="{{sharePic}}"> + <input id="shareTitle" type="hidden" value="{{shareMainTitle}}"> + <input id="shareDesc" type="hidden" value="{{shareSubTitle}}"> + {{/ promotionData}} +</div> diff --git a/apps/activity/views/action/expand-new/my-reward.hbs b/apps/activity/views/action/expand-new/my-reward.hbs new file mode 100644 index 0000000..99bec7f --- /dev/null +++ b/apps/activity/views/action/expand-new/my-reward.hbs @@ -0,0 +1,30 @@ +<div class="my-reward-list-page yoho-page"> + {{# rewardData}} + <div class="message"> + <span>开启消息推送获取奖励发放状态</span> + <span class="state"><b>去开启</b><i class="iconfont"></i></span> + </div> + <div class="rules"> + <div class="title"> + <p>活动细则</p> + <i class="iconfont down"></i> + </div> + <p class="detail"> + {{{activityRuleDesc}}} + </p> + </div> + <div class="reward-list"> + <div class="list-item list-title"> + <span>我邀请的好友</span> + <span>首单购物金额</span> + <span>我的奖励</span> + <span>状态</span> + </div> + {{#if rewardList}} + {{> expand-new/reward-list}} + {{else}} + <div class="no-list">暂无奖励数据</div> + {{/if}} + </div> + {{/ rewardData}} +</div> diff --git a/apps/activity/views/action/expand-new/reward-detail.hbs b/apps/activity/views/action/expand-new/reward-detail.hbs new file mode 100644 index 0000000..3289354 --- /dev/null +++ b/apps/activity/views/action/expand-new/reward-detail.hbs @@ -0,0 +1,48 @@ +<div class="reward-detail-page yoho-page"> + {{# rewardDetail}} + <div class="reward-detail"> + <p class="detail-item"> + <span>我的奖励</span> + <span>{{couponName}}</span> + </p> + <p class="detail-item"> + <span>奖励状态</span> + <span>{{couponStatusDesc}}</span> + </p> + <p class="detail-item"> + <span>发放时间</span> + <span>{{couponSendTimeDis}}</span> + </p> + </div> + <div class="reward-related"> + <div class="releated-item"> + <span>我邀请的好友</span> + <span>{{nickName}}</span> + </div> + <div class="releated-item"> + <span>注册时间</span> + <span>{{registerTimeDis}}</span> + </div> + <div class="releated-item"> + <span>首单购物金额</span> + <span>{{orderAmountDis}}</span> + </div> + <div class="releated-item"> + <span>首单购物时间</span> + <span>{{firstOrderTimeDis}}</span> + </div> + <div class="releated-item"> + <span>订单类型</span> + <span>{{paymentTypeDis}}</span> + </div> + <div class="releated-item"> + <span>订单状态</span> + <span>{{paymentStatusDesc}}</span> + </div> + <div class="releated-item"> + <span>确认收货时间</span> + <span>{{confirmReceiptTimeDis}}</span> + </div> + </div> + {{/ rewardDetail}} +</div> diff --git a/apps/activity/views/action/expand-new/reward-list.hbs b/apps/activity/views/action/expand-new/reward-list.hbs new file mode 100644 index 0000000..2ce8b96 --- /dev/null +++ b/apps/activity/views/action/expand-new/reward-list.hbs @@ -0,0 +1 @@ +{{> expand-new/reward-list}} diff --git a/apps/activity/views/partial/expand-new/reward-list.hbs b/apps/activity/views/partial/expand-new/reward-list.hbs new file mode 100644 index 0000000..763b6b5 --- /dev/null +++ b/apps/activity/views/partial/expand-new/reward-list.hbs @@ -0,0 +1,8 @@ +{{# rewardList}} + <a href="{{detailUrl}}" class="list-item"> + <span>{{nickName}}</span> + <span>{{orderAmountDis}}</span> + <span>{{couponName}}</span> + <span>{{couponStatusDesc}}<i class="iconfont"></i></span> + </a> +{{/ rewardList}} diff --git a/apps/cart/controllers/ticketsConfirm.js b/apps/cart/controllers/ticketsConfirm.js index 73456ee..d8b91ae 100644 --- a/apps/cart/controllers/ticketsConfirm.js +++ b/apps/cart/controllers/ticketsConfirm.js @@ -17,7 +17,8 @@ const ticketsConfirm = (req, res) => { // pageFooter: true, localCss: true, - navBtn: false + navBtn: false, + width750: true }; let params = { @@ -55,9 +56,17 @@ const checkTickets = (req, res) => { useYohoCoin: req.body.useYohoCoin }; - indexModel.checkTickets(params).then(result => { - res.json(result); - }); + // 未登录 + if (!req.user.uid) { + return res.json({ + code: 401, + redirect: '/signin.html' + }); + } else { + indexModel.checkTickets(params).then(result => { + res.json(result); + }); + } }; module.exports = { diff --git a/apps/cart/models/ticketsConfirm.js b/apps/cart/models/ticketsConfirm.js index fdde7b6..201209d 100644 --- a/apps/cart/models/ticketsConfirm.js +++ b/apps/cart/models/ticketsConfirm.js @@ -2,6 +2,7 @@ const api = global.yoho.API; const helpers = global.yoho.helpers; +const _ = require('lodash'); // 展览票(单日票)skn const SINGLE_TICKETS_SKN = 51335912; @@ -14,8 +15,6 @@ const checkTickets = (param) => { buy_number: param.buyNumber, use_yoho_coin: param.useYohoCoin || 0, yoho_coin_mode: param.yohoCoinMode ? param.yohoCoinMode : 0 - }, { - code: 200 }).then((result) => { return result; }); @@ -71,7 +70,7 @@ const ticketsConfirm = (param) => { orderEnsurePage: true }; - if (result && result[0] && result[0].data) { + if (_.get(result, '[0].data.goods_list', false)) { let bulid = []; result[0].data.goods_list.forEach((val) => { diff --git a/apps/cart/views/partial/tickets/good.hbs b/apps/cart/views/partial/tickets/good.hbs index 6189153..46cd582 100644 --- a/apps/cart/views/partial/tickets/good.hbs +++ b/apps/cart/views/partial/tickets/good.hbs @@ -1,9 +1,17 @@ <div class="order-good" data-id="{{id}}" data-skn="{{skn}}"> <div class="thumb-wrap"> {{#if link}} - <a href="{{link}}"><img class="thumb lazy" data-original="{{thumb}}"></a> + <div class="pic-c"> + <a href="{{link}}"> + <img class="thumb lazy" data-original="{{thumb}}"> + </a> + <p>虚拟商品</p> + </div> {{else}} - <img class="thumb lazy" data-original="{{thumb}}"> + <div class="pic-c"> + <img class="thumb lazy" data-original="{{thumb}}"> + <p>虚拟商品</p> + </div> {{/if}} <p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p> </div> @@ -11,13 +19,13 @@ <p class="name row">{{name}}</p> <p class="row"> {{#if color}} - <span class="color"> + <span class="color{{#if tickets}} date{{/if}}"> {{#if tickets}}日期{{else}}颜色{{/if}}:{{color}} </span> {{/if}} {{#if size}} - <span class="size"> + <span class="size{{#if tickets}} hide{{/if}}"> {{#if tickets}}区域{{else}}尺码{{/if}}:{{size}} </span> {{/if}} diff --git a/apps/home/models/order.js b/apps/home/models/order.js index 696db7c..c8110c7 100644 --- a/apps/home/models/order.js +++ b/apps/home/models/order.js @@ -8,10 +8,6 @@ const _ = require('lodash'); * 门票 * @type {{SINGLE_TICKETS_SKN: number}} */ -const TICKETS = { - SINGLE_TICKETS_SKN: 51335912, // 展览票(单日票)skn - PACKAGE_TICKETS_SKN: 51335908 // 套票skn -}; /** * 格式化价格 @@ -25,7 +21,7 @@ const transPrice = (price, isSepcialZero) => { * 格式化订单商品 * @private */ -const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => { +const _formatOrderGoods = (orderGoods, count, haveLink) => { let result = []; _.forEach(orderGoods, value => { @@ -79,12 +75,7 @@ const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => { count += parseInt(value.buy_number, 10); /* 门票 */ - if (tickets) { - - /* 展览票不显示区域 */ - if (value.product_skn === TICKETS.SINGLE_TICKETS_SKN) { - delete goods.size; - } + if (value.goods_type === 'ticket') { Object.assign(goods, { tickets: true }); diff --git a/apps/home/models/orderDetail.js b/apps/home/models/orderDetail.js index 2053f89..e80e793 100644 --- a/apps/home/models/orderDetail.js +++ b/apps/home/models/orderDetail.js @@ -153,7 +153,6 @@ const orderDetailData = (uid, orderCode) => { uid: uid, order_code: orderCode }).then(result => { - if (result && result.code === 200) { let orderDetail = camelCase(result.data); let goods = []; @@ -185,7 +184,8 @@ const orderDetailData = (uid, orderCode) => { size: data.sizeName, payPrice: data.realPayPrice, salePrice: parseFloat(data.salesPrice).toFixed(2), - count: count + count: count, + tickets: data.goodsType === 'ticket' // isVipPrice: data.discountTag === 'V', // isStudebt: data.discountTag === 'S' @@ -221,6 +221,12 @@ const orderDetailData = (uid, orderCode) => { }); } + if (data.goodsType === 'ticket') { + obj = _.assign(obj, { + tickets: true + }); + } + goods.push(obj); orderDetail = _.assign(orderDetail, { diff --git a/apps/home/views/action/QRcode.hbs b/apps/home/views/action/QRcode.hbs index 6b79627..fde7da5 100644 --- a/apps/home/views/action/QRcode.hbs +++ b/apps/home/views/action/QRcode.hbs @@ -5,7 +5,7 @@ {{#qrcodeData}} <div class="qrcode yoho-page"> - <h2 class='qrcode-title'>2016 非常潮流盛世 YO'HOOD门票(限量) {{ticks.length}}件</h2> + <h2 class='qrcode-title'>2017 非常潮流盛世 YO'HOOD门票(限量) {{ticks.length}}件</h2> <p class='qrcode-tip'>提示:凭借二维码入场,每场二维码只可使用一次,请妥善保管;</p> <div class='qrcode-wrap'> diff --git a/apps/home/views/action/home.hbs b/apps/home/views/action/home.hbs index ab2778a..9d5d31e 100644 --- a/apps/home/views/action/home.hbs +++ b/apps/home/views/action/home.hbs @@ -106,7 +106,12 @@ </a> </div> <div class="group-list"> - <a class="list-item" href="/home/message"> + <a class="list-item invite" href="https://activity.yoho.cn/feature/357.html?share_id=2391&title="> + <span class="horn"></span> + 邀请好友,50元现金券无限赚 + <span class="iconfont num"></span> + </a> + <a class="list-item message" href="/home/message"> <span class="iconfont icon"></span> 消息 <span class="iconfont num">{{inboxTotal}} </span> diff --git a/apps/passport/controllers/reg.js b/apps/passport/controllers/reg.js index 18e59da..47028e9 100644 --- a/apps/passport/controllers/reg.js +++ b/apps/passport/controllers/reg.js @@ -115,6 +115,7 @@ let verifyMobile = (req, res, next) => { let mobile = +req.body.phoneNum; let area = +(req.body.areaCode || 86); + let inviteCode = +req.body.inviteCode || ''; // 判断参数是否合法 if (!_.isNumber(mobile) || !_.isNumber(area)) { @@ -153,7 +154,8 @@ let verifyMobile = (req, res, next) => { result.data = helpers.urlFormat('/passport/reg/code', { token: token, phoneNum: mobile, - areaCode: area + areaCode: area, + inviteCode: inviteCode }); } @@ -169,6 +171,7 @@ let codeAction = (req, res, next) => { let token = req.query.token; let mobile = +req.query.phoneNum; let area = +(req.query.areaCode || 86); + let inviteCode = +req.query.inviteCode || ''; // 判断是否允许访问, 不允许则跳转到错误页面 if (!_.isString(token) || !_.isNumber(mobile) || !sign.verifyToken(mobile, token)) { @@ -188,6 +191,7 @@ let codeAction = (req, res, next) => { areaCode: area, // 默认的区号 phoneNum: mobile, // 手机号 token: token, // 访问令牌 + inviteCode: inviteCode, serviceUrl: serviceUrl // 在线客服 }); }; @@ -273,6 +277,7 @@ let verifyCode = (req, res, next) => { let mobile = +req.body.phoneNum; let area = +(req.body.areaCode || 86); let code = +req.body.code; + let inviteCode = +req.body.inviteCode || ''; /* 判断参数是否合法 */ if (!_.isNumber(mobile) || !_.isNumber(area) || !_.isNumber(code)) { @@ -304,7 +309,8 @@ let verifyCode = (req, res, next) => { token: token, phoneNum: mobile, areaCode: area, - smsCode: code + smsCode: code, + inviteCode: inviteCode }); break; case 404: @@ -324,6 +330,7 @@ let passwordAction = (req, res, next) => { let mobile = +req.query.phoneNum; let area = +(req.query.areaCode || 86); let smsCode = +req.query.smsCode; + let inviteCode = +req.query.inviteCode || ''; // 判断是否允许访问, 不允许则跳转到错误页面 if (!smsCode || !_.isString(token) || !_.isNumber(mobile) || @@ -343,7 +350,8 @@ let passwordAction = (req, res, next) => { areaCode: area, // 默认的区号 phoneNum: mobile, // 手机号 token: token, // 访问令牌 - smsCode: smsCode // 手机验证码 + smsCode: smsCode, // 手机验证码 + inviteCode: inviteCode }); }; @@ -360,6 +368,7 @@ let setPassword = (req, res, next) => { let token = req.body.token; let smsCode = +req.body.smsCode; let isFromMy = _.get(req.session, 'phoneReg.isFromMy', '0'); + let inviteCode = req.body.inviteCode || ''; // 判断参数是否合法 if (!smsCode || !_.isString(token) || !_.isNumber(mobile) || !_.isNumber(area) || !password) { @@ -384,7 +393,7 @@ let setPassword = (req, res, next) => { // 验证注册的标识码是否有效 let resultCopy = null; - RegService.regMobileAes(area, mobile, password, shoppingKey, smsCode, isFromMy).then((result) => { + RegService.regMobileAes(area, mobile, password, shoppingKey, smsCode, inviteCode, isFromMy).then((result) => { if (!result.code || result.code !== 200) { return res.send(result); } diff --git a/apps/passport/models/reg-service.js b/apps/passport/models/reg-service.js index 2b16881..05f9085 100644 --- a/apps/passport/models/reg-service.js +++ b/apps/passport/models/reg-service.js @@ -96,7 +96,7 @@ const RegService = { return api.post('', params); }, - regMobileAes(area, mobile, password, shoppingKey, smsCode, isFromMy) { + regMobileAes(area, mobile, password, shoppingKey, smsCode, inviteCode, isFromMy) { isFromMy = isFromMy || '0'; let params = { @@ -105,6 +105,7 @@ const RegService = { profile: mobile, password: aes.aesPwd(password), verifyCode: smsCode, + inviteCode: inviteCode, isFromMy }; diff --git a/apps/passport/views/action/reg/index.hbs b/apps/passport/views/action/reg/index.hbs index 6687abe..166c4c9 100644 --- a/apps/passport/views/action/reg/index.hbs +++ b/apps/passport/views/action/reg/index.hbs @@ -6,6 +6,10 @@ <span id="area-code" class="area-code">{{areaCode}}</span> <input id="phone-num" class="input phone-num" type="text" placeholder="手机号"> </div> + <div class="input-container row code-container"> + <span id="code" class="invite-code">邀请码</span> + <input id="invite-code" class="input code" type="text" placeholder="无邀请码可不填"> + </div> {{!--图片验证--}} <div data-geetest="{{useGeetest}}" id="js-img-check"></div> @@ -13,4 +17,4 @@ <span id="btn-next" class="btn btn-next disable row">下一步</span> <p class="register-tip">Yoho!Family账号可登录Yoho!Buy有货、Yoho!Now、mars及SHOW</p> </div> -</div> \ No newline at end of file +</div> diff --git a/apps/passport/views/action/reg/password.hbs b/apps/passport/views/action/reg/password.hbs index 1a0576c..64ad778 100644 --- a/apps/passport/views/action/reg/password.hbs +++ b/apps/passport/views/action/reg/password.hbs @@ -17,6 +17,7 @@ <input id="area-code" type="hidden" value="{{areaCode}}"> <input id="token" type="hidden" value="{{token}}"> <input id="sms-code" type="hidden" value="{{smsCode}}"> + <input id="invite-code" type="hidden" value="{{inviteCode}}"> </div> <div class="prompt"> @@ -24,6 +25,6 @@ <div class="choose"> <span class="ensure">是</span> <span class="deny">否</span> - + </div> </div> diff --git a/apps/passport/views/partial/passport/code.hbs b/apps/passport/views/partial/passport/code.hbs index 104c62d..43e4b5a 100644 --- a/apps/passport/views/partial/passport/code.hbs +++ b/apps/passport/views/partial/passport/code.hbs @@ -19,4 +19,5 @@ <input id="phone-num" type="hidden" value={{phoneNum}}> <input id="area-code" type="hidden" value={{areaCode}}> <input id="token" type="hidden" value={{token}}> + <input id="invite-code" type="hidden" value={{inviteCode}}> </div> diff --git a/apps/product/models/detail.js b/apps/product/models/detail.js index b085105..374ef31 100644 --- a/apps/product/models/detail.js +++ b/apps/product/models/detail.js @@ -14,7 +14,7 @@ const singleAPI = global.yoho.SingleAPI; const helpers = global.yoho.helpers; const productProcess = require(`${utils}/product-process`); -const SINGLE_TICKETS_SKN = 51335912; // 展览票 +// const SINGLE_TICKETS_SKN = 51335912; // 展览票 /** * 获取用户数据信息 @@ -625,17 +625,19 @@ const _detailDataPkgAsync = (origin, uid, vipLevel, ua) => { }).then(result => { // 虚拟商品(门票) if (origin.attribute * 1 === 3) { - result.cartInfo.addToCartUrl = false; - result.tickets = result.cartInfo.tickets = true; + if (result.cartInfo.addToCartUrl) { + result.cartInfo.addToCartUrl = false; + result.tickets = result.cartInfo.tickets = true; + } result.ticketsConfirm = helpers.urlFormat('/cart/index/ticketsConfirm'); // 展览票 - if (origin.product_skn * 1 === SINGLE_TICKETS_SKN) { - result.single = true; - } else { - // 套票 - result.package = true; - } + // if (origin.product_skn * 1 === SINGLE_TICKETS_SKN) { + // result.single = true; + // } else { + // // 套票 + // result.package = true; + // } // 购票限制 result.cartInfo.limit = 4; @@ -748,6 +750,16 @@ const getNewProductAsyncData = (data) => { discount: discountBuy.bundleInfo.discount }; } + + // 2017电子门票不显示区域 + let ticketsProps = finalResult.cartInfo.props; + + _.forEach(ticketsProps, function(value) { + if (value.name === '区域') { + value.ticketHide = true; + value.name = ''; + } + }); return finalResult; }); }); diff --git a/apps/product/views/action/detail/new/detail.hbs b/apps/product/views/action/detail/new/detail.hbs index 9d7ade2..d59e292 100644 --- a/apps/product/views/action/detail/new/detail.hbs +++ b/apps/product/views/action/detail/new/detail.hbs @@ -66,7 +66,7 @@ {{! 品牌优惠券}} <div class="brand-coupon hide"> <i class="iconfont font-right pull-right"></i> - <i class="iconfont font-quan"></i><span>领取优惠券</span> + <i class="promotion-icon">券</i><span>领取优惠券</span> </div> {{!--占位: 促销--}} diff --git a/config/common.js b/config/common.js index aee0fa1..cc05c99 100644 --- a/config/common.js +++ b/config/common.js @@ -11,14 +11,14 @@ const isProduction = process.env.NODE_ENV === 'production'; const isTest = process.env.NODE_ENV === 'test'; const domains = { - singleApi: 'http://api-test3.yohops.com:9999/', - api: 'http://api-test3.yohops.com:9999/', - service: 'http://service-test3.yohops.com:9999/', - global: 'http://api-global.yohobuy.com', - store: 'http://192.168.102.47:8080/portal-gateway/', + // api: 'http://192.168.103.59:8080/gateway', + // service: 'http://192.168.103.59:8080/gateway', - // liveApi: 'http://api.live.yoho.cn/', - // singleApi: 'http://single.yoho.cn/', + api: 'http://api-test2.yohops.com:9999/', + service: 'http://service-test2.yohops.com:9999/', + singleApi: 'http://api-test2.yohops.com:9999/', + global: 'http://global-test-soa.yohops.com:9999', + liveApi: 'http://testapi.live.yohops.com:9999/', imSocket: 'ws://socket.yohobuy.com:10240', imCs: 'http://im.yohobuy.com/api', platformApi: 'http://192.168.102.48:8088/' @@ -26,7 +26,7 @@ const domains = { module.exports = { app: 'h5', - appVersion: '5.8.0', // 调用api的版本 + appVersion: '5.9.0', // 调用api的版本 port: 6001, siteUrl: '//m.yohobuy.com', assetUrl: '//127.0.0.1:5001', diff --git a/doraemon/views/partial/header.hbs b/doraemon/views/partial/header.hbs index f86a302..f9b22ba 100644 --- a/doraemon/views/partial/header.hbs +++ b/doraemon/views/partial/header.hbs @@ -44,6 +44,9 @@ {{channel}} <span class="iconfont"></span> </span> {{/saleNav}} + {{#myReward}} + <a href="/activity/my-reward" class="nav-home my-reward">我的奖励</a> + {{/myReward}} {{#invoiceNotice}} <span class="invoice-btn">{{.}}</span> {{/invoiceNotice}} diff --git a/doraemon/views/partial/home/order/good.hbs b/doraemon/views/partial/home/order/good.hbs index 9906ae9..f87cd56 100644 --- a/doraemon/views/partial/home/order/good.hbs +++ b/doraemon/views/partial/home/order/good.hbs @@ -11,7 +11,7 @@ <p class="name row">{{name}}</p> <p class="row"> {{#if color}} - <span class="color"> + <span class="color{{#if tickets}} date{{/if}}"> {{#if tickets}}日期{{else}}颜色{{/if}}:{{color}} </span> {{/if}} diff --git a/doraemon/views/partial/order/good.hbs b/doraemon/views/partial/order/good.hbs index b5715b2..5024f2e 100644 --- a/doraemon/views/partial/order/good.hbs +++ b/doraemon/views/partial/order/good.hbs @@ -1,9 +1,21 @@ <div class="order-good" data-id="{{id}}"> <div class="thumb-wrap"> - {{#if link}} - <a href="{{link}}"><img class="thumb" src="{{image thumb 90 120}}"></a> + {{#if link}} + <div class="pic-c"> + <a href="{{link}}"> + <img class="thumb" src="{{image thumb 90 120}}"> + </a> + {{#if tickets}} + <p>虚拟商品</p> + {{/if}} + </div> {{else}} - <img class="thumb" src="{{image thumb 90 120}}"> + <div class="pic-c"> + <img class="thumb" src="{{image thumb 90 120}}"> + {{#if tickets}} + <p>虚拟商品</p> + {{/if}} + </div> {{/if}} <p class="tag{{#if gift}} gift-tag{{/if}}{{#if advanceBuy}} advance-buy-tag{{/if}}"></p> </div> @@ -11,13 +23,13 @@ <p class="name row">{{name}}</p> <p class="row"> {{#if color}} - <span class="color"> + <span class="color{{#if tickets}} date{{/if}}"> {{#if tickets}}日期{{else}}颜色{{/if}}:{{color}} </span> {{/if}} {{#if size}} - <span class="size"> + <span class="size{{#if tickets}} hide{{/if}}"> {{#if tickets}}区域{{else}}尺码{{/if}}:{{size}} </span> {{/if}} diff --git a/doraemon/views/partial/order/order-btns.hbs b/doraemon/views/partial/order/order-btns.hbs index 3ea21e7..bffd1b9 100644 --- a/doraemon/views/partial/order/order-btns.hbs +++ b/doraemon/views/partial/order/order-btns.hbs @@ -31,7 +31,7 @@ <span class="btn del">删除订单</span> {{else if lookQrcode}} <a class="locHref" href="{{link}}"> - <span class="btn check-logistics">查看二维码</span> + <span class="btn check-logistics check-ewm">查看二维码</span> </a> {{else if afterService}} <span class="btn after-sales">申请售后</span> diff --git a/package.json b/package.json index 834d881..7795a8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "m-yohobuy-node", - "version": "5.8.10", + "version": "5.9.0", "private": true, "description": "A New Yohobuy Project With Express", "repository": { diff --git a/public/hbs/common/chose-panel-new.hbs b/public/hbs/common/chose-panel-new.hbs index 40cf214..aedbc0f 100644 --- a/public/hbs/common/chose-panel-new.hbs +++ b/public/hbs/common/chose-panel-new.hbs @@ -23,11 +23,11 @@ </div> <div class="chose-items"> {{#each props}} - <div class="block-list"> + <div class="block-list{{#if ticketHide}} hide{{/if}}"> <span class="name">{{name}}</span> <ul class="size-row clearfix"> {{#each values}} - <li class="block" data-prop-id="{{../type}}" data-value-id="{{id}}">{{name}}</li> + <li class="block{{#if ../ticketHide}} chosed hide{{/if}}" data-prop-id="{{../type}}" data-value-id="{{id}}">{{#if ../ticketHide}}{{else}}{{name}}{{/if}}</li> {{/each}} </ul> </div> diff --git a/public/hbs/product/detail/infodata.hbs b/public/hbs/product/detail/infodata.hbs index 7c227e5..33a4d64 100644 --- a/public/hbs/product/detail/infodata.hbs +++ b/public/hbs/product/detail/infodata.hbs @@ -22,7 +22,7 @@ <a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">加入购物车</a> {{/if}} {{#if tickets}} - <a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a> + <a id="ticketsToCart" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a> {{/if}} {{#if isDepositAdvance}} <a id="isDepositAdvance" href="javascript:;" class="addto-cart add-to-cart-url">立即购买</a> diff --git a/public/hbs/product/detail/promotion.hbs b/public/hbs/product/detail/promotion.hbs index 4d62247..b74c7f2 100644 --- a/public/hbs/product/detail/promotion.hbs +++ b/public/hbs/product/detail/promotion.hbs @@ -3,10 +3,10 @@ <div class="goods-discount" id="goodsDiscount"> {{#each promotion}} {{#if @first}} - <h1 class="first-item short-text tap-hightlight">{{promotionTitle}}<span class="icon-down iconfont dropdown"></span></h1> + <h1 class="first-item short-text tap-hightlight"><span class="promotion-icon">促</span>{{promotionTitle}}<span class="icon-down iconfont dropdown"></span></h1> {{else}} <div class="discount-folder"> - <h1 class="folder-item tap-hightlight">{{promotionTitle}}</h1> + <h1 class="folder-item tap-hightlight"><span class="promotion-icon">促</span>{{promotionTitle}}</h1> </div> {{/if}} {{/each}} diff --git a/public/img/activity/expand-new/invite-1.png b/public/img/activity/expand-new/invite-1.png new file mode 100644 index 0000000..f33db7d Binary files /dev/null and b/public/img/activity/expand-new/invite-1.png differ diff --git a/public/img/activity/expand-new/invite-2.png b/public/img/activity/expand-new/invite-2.png new file mode 100644 index 0000000..94126b2 Binary files /dev/null and b/public/img/activity/expand-new/invite-2.png differ diff --git a/public/img/activity/expand-new/invite-3.png b/public/img/activity/expand-new/invite-3.png new file mode 100644 index 0000000..c62da60 Binary files /dev/null and b/public/img/activity/expand-new/invite-3.png differ diff --git a/public/img/activity/expand-new/invite-back.png b/public/img/activity/expand-new/invite-back.png new file mode 100644 index 0000000..2058deb Binary files /dev/null and b/public/img/activity/expand-new/invite-back.png differ diff --git a/public/img/activity/expand-new/qrcode-back.png b/public/img/activity/expand-new/qrcode-back.png new file mode 100644 index 0000000..2e03c85 Binary files /dev/null and b/public/img/activity/expand-new/qrcode-back.png differ diff --git a/public/img/home/index/horn.png b/public/img/home/index/horn.png new file mode 100644 index 0000000..283b737 Binary files /dev/null and b/public/img/home/index/horn.png differ diff --git a/public/js/activity/my-promotion.page.js b/public/js/activity/my-promotion.page.js new file mode 100644 index 0000000..ec0d965 --- /dev/null +++ b/public/js/activity/my-promotion.page.js @@ -0,0 +1,49 @@ +'use strict'; +require('activity/my-promotion.page.css'); + +let $ = require('yoho-jquery'), + yoho = require('yoho-app'); + +let shareData = { + title: $('#shareTitle').val(), + link: $('#shareLink').val(), + desc: $('#shareDesc').val(), + imgUrl: $('#shareImg').val(), +}; + +require('yoho-jquery-qrcode'); +require('common'); +require('common/share')(shareData); + +// 生成二维码 +setTimeout(function() { + let text = $('.code-qr').attr('qr-data'), + width = $('.code-qr').css('width'); + + $('.code-qr').qrcode({ + render: 'image', // 显示方式,canvas,image和div + text: text, // 二维码的内容 + size: parseInt(width, 10) * 10, // 大小 + ecLevel: 'L', // 纠错级别 + background: '#fff' + }); +}, 0); + +// 分享弹框 +$('.share').click(function() { + + if (yoho && yoho.isApp) { + yoho.invokeMethod('go.showshareaction', shareData); + } +}); + +// 设置APP的头部 +if (yoho.isApp) { + + yoho.ready(function() { + yoho.invokeMethod('set.rightbuttoninfo', { + title: '我的奖励', + url: 'http://m.yohobuy.com/activity/my-reward?openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/activity/my-reward","islogin": "N","type": 0}}' + }); + }); +} diff --git a/public/js/activity/my-reward.page.js b/public/js/activity/my-reward.page.js new file mode 100644 index 0000000..0b92a01 --- /dev/null +++ b/public/js/activity/my-reward.page.js @@ -0,0 +1,96 @@ +'use strict'; +require('activity/my-reward.page.css'); + +let $ = require('yoho-jquery'), + yoho = require('yoho-app'); + +let page = 2, + searching = false, + winH = $(window).height(); + +// 获取推送消息开启状态 +function getStatus() { + + yoho.invokeMethod('get.usernotificationstatus', {}, function(res) { + if (parseInt(res, 10) === 1 || res === '1') { + $('.state').find('b').html('已开启'); + } else if (parseInt(res, 10) === 0) { + $('.state').find('b').html('去开启'); + } + }); +} + +if (yoho.isApp) { + + // 提供给APP调取刷新 + yoho.ready(function() { + yoho.addNativeMethod('refreshInfoPushState', function() { + getStatus(); + }); + }); +} + +// 点击开启状态跳转APP设置 +$('.state').click(function() { + yoho.invokeMethod('go.appsetting'); +}); + +// 活动规则展开与收起 +$('.title').click(function() { + if ($(this).find('i').hasClass('down')) { + $('.detail').css('height', 'auto'); + $(this).find('i').removeClass('down').html(''); + } else { + $('.detail').css('height', '0px'); + $(this).find('i').addClass('down').html(''); + } +}); + +// 奖励列表数据 +function moreList() { + if (searching) { + return; + } + + searching = true; + + $.ajax({ + type: 'GET', + url: '/activity/reward-list', + data: { + page: page + }, + success: function(data) { + if (data === '') { + return true; + } + + $('.reward-list').append(data); + + searching = false; + page++; + }, + }); +} + +function scrollHandler() { + + // 当scroll到3/4$goodsContainer高度后继续请求下一页数据 + if ($(window).scrollTop() + winH > + $(document).height() - 0.25 * $('.reward-list').height()) { + moreList(); + } +} + +// srcoll to load more +$(window).scroll(function() { + window.requestAnimationFrame(scrollHandler); +}); + +$(function() { + if (yoho.isApp) { + yoho.ready(function() { + getStatus(); + }); + } +}); diff --git a/public/js/activity/reward-detail.page.js b/public/js/activity/reward-detail.page.js new file mode 100644 index 0000000..ff94999 --- /dev/null +++ b/public/js/activity/reward-detail.page.js @@ -0,0 +1,2 @@ +'use strict'; +require('activity/reward-detail.page.css'); diff --git a/public/js/cart/order-ensure.js b/public/js/cart/order-ensure.js index 9f36a0f..dab54ec 100644 --- a/public/js/cart/order-ensure.js +++ b/public/js/cart/order-ensure.js @@ -39,6 +39,9 @@ require('common'); lazyLoad(); +// 初始化有货币 +orderInfo('yohoCoin', 0); + function getQueryParam() { let queryArray = location.search.substr(1).split('&'), i, diff --git a/public/js/common/chose-panel-new.js b/public/js/common/chose-panel-new.js index 879f16d..5cfcca4 100644 --- a/public/js/common/chose-panel-new.js +++ b/public/js/common/chose-panel-new.js @@ -414,6 +414,14 @@ class ChosePanel { return $(ele).text(); })); + if (this.modes.tickets) { + let $chosed = $('.block.chosed'); + + valueList = Array.from($chosed.not('.hide').map((index, ele) => { + return $(ele).text(); + })); + } + if (valueList.length) { $noChoose.addClass('hide'); $chooseInfo.removeClass('hide'); diff --git a/public/js/passport/code.js b/public/js/passport/code.js index aacad5f..7c179fb 100644 --- a/public/js/passport/code.js +++ b/public/js/passport/code.js @@ -15,7 +15,8 @@ module.exports = function(useInRegister, useForBind, useForRelate) { sourceType = $('#sourceType').val(), openId = $('#openId').val(), phoneNum = $('#phone-num').val(), - areaCode = $('#area-code').val().replace('+', ''); + areaCode = $('#area-code').val().replace('+', ''), + inviteCode = $('#invite-code').val(); let api = require('./api'); let tip = require('plugin/tip'); @@ -64,7 +65,8 @@ module.exports = function(useInRegister, useForBind, useForRelate) { phoneNum: phoneNum, areaCode: areaCode, code: trim($captcha.val()), - token: $('#token').val() + token: $('#token').val(), + inviteCode: inviteCode }, success: function(data) { if (data.code === 200) { diff --git a/public/js/passport/register/password.js b/public/js/passport/register/password.js index 6278d95..ece8950 100644 --- a/public/js/passport/register/password.js +++ b/public/js/passport/register/password.js @@ -74,7 +74,8 @@ function setPassword() { phoneNum: $('#phone-num').val(), areaCode: $('#area-code').val(), smsCode: $('#sms-code').val(), - token: $('#token').val() + token: $('#token').val(), + inviteCode: $('#invite-code').val() }, success: function(data) { let res = data.data; diff --git a/public/js/passport/register/register.js b/public/js/passport/register/register.js index 9a55fd4..ce3bf9d 100644 --- a/public/js/passport/register/register.js +++ b/public/js/passport/register/register.js @@ -81,7 +81,8 @@ $btnNext.on('touchstart', function() { requested = true; let params = { areaCode: areaCode.replace('+', ''), - phoneNum: pn + phoneNum: pn, + inviteCode: $('#invite-code').val() }; $.extend(params, result); diff --git a/public/js/product/detail.page.js b/public/js/product/detail.page.js index 9cdfc21..a499975 100644 --- a/public/js/product/detail.page.js +++ b/public/js/product/detail.page.js @@ -11,7 +11,7 @@ let $ = require('yoho-jquery'), require('./detail/page-render')(function() { let $discountFolder = $('.goods-discount .discount-folder'), - $discountArrow = $('.goods-discount .first-item span'); + $discountArrow = $('.goods-discount .first-item .iconfont'); let goodsDiscountEl = document.getElementById('goodsDiscount'), goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl), diff --git a/public/js/product/new-detail.js b/public/js/product/new-detail.js index 9909b4e..14c84fa 100644 --- a/public/js/product/new-detail.js +++ b/public/js/product/new-detail.js @@ -155,7 +155,7 @@ setTimeout(() => { let chosePanel = require('common/chose-panel-new'); - $('#addtoCart').on('touchstart', function() { + $('#addtoCart, #ticketsToCart').on('touchstart', function() { let productCode = $('#limitProductCode').val(); let seckill = $('.seckill-time').length; @@ -304,7 +304,7 @@ setTimeout(() => { let $goodsDiscount = $('#goodsDiscount'); let $discountFirstItem = $goodsDiscount.find('.first-item'); let $discountFolder = $goodsDiscount.find('.discount-folder'); - let $discountArrow = $goodsDiscount.find('.first-item span'); + let $discountArrow = $goodsDiscount.find('.first-item .iconfont'); // 初始化goods-discount if ($discountFolder.children().length === 0) { diff --git a/public/scss/activity/expand-new/_my-promotion.css b/public/scss/activity/expand-new/_my-promotion.css new file mode 100644 index 0000000..4799ede --- /dev/null +++ b/public/scss/activity/expand-new/_my-promotion.css @@ -0,0 +1,133 @@ +.my-promotion-page { + .my-code { + height: 468px; + overflow: hidden; + background-image: resolve("activity/expand-new/qrcode-back.png"); + background-size: 100%; + background-repeat: no-repeat; + position: relative; + + .describe { + width: 100%; + text-align: center; + font-size: 38px; + margin: 33px auto; + font-family: SourceHanSansCN; + transform: rotate(-2.3deg); + font-weight: 700; + font-style: oblique; + color: #000; + line-height: 58px; + margin-left: 13px; + } + + .code-outer { + width: 140px; + height: 140px; + padding: 10px; + background-color: #fff; + margin: 16px 0 0 308px; + } + + .code-qr { + width: 120px; + height: 120px; + } + } + + .title { + height: 60px; + } + + .invitation { + .code-content { + margin: 25px auto 50px; + height: 207px; + width: 690px; + padding: 30px 0 0 64px; + background-image: resolve("activity/expand-new/invite-back.png"); + background-size: 100%; + background-repeat: no-repeat; + } + + .invite-content { + .code { + width: 440px; + height: 68px; + display: block; + background-color: #fff; + color: #000; + line-height: 68px; + padding-left: 20px; + float: left; + font-size: 24px; + overflow: hidden; + } + + .copy { + height: 68px; + width: 120px; + color: #fff; + background-color: #b40001; + line-height: 68px; + text-align: center; + display: block; + float: left; + font-size: 30px; + } + } + + .info { + padding-top: 15px; + color: #fff; + clear: both; + width: 440px; + line-height: 40px; + display: inline-block; + font-size: 24px; + } + + .link-info { + clear: both; + width: 560px; + } + + .share { + width: 88px; + height: 36px; + border: 1px solid #fff; + color: #fff; + background-color: #000; + line-height: 36px; + text-align: center; + display: block; + float: right; + margin-top: 20px; + font-size: 24px; + } + } + + .my-code { + .title { + background-image: resolve("activity/expand-new/invite-1.png"); + background-size: 100%; + background-repeat: no-repeat; + } + } + + .invite-code { + .title { + background-image: resolve("activity/expand-new/invite-2.png"); + background-size: 100%; + background-repeat: no-repeat; + } + } + + .invite-link { + .title { + background-image: resolve("activity/expand-new/invite-3.png"); + background-size: 100%; + background-repeat: no-repeat; + } + } +} diff --git a/public/scss/activity/expand-new/_my-reward.css b/public/scss/activity/expand-new/_my-reward.css new file mode 100644 index 0000000..929e293 --- /dev/null +++ b/public/scss/activity/expand-new/_my-reward.css @@ -0,0 +1,98 @@ +.my-reward-list-page { + .message { + font-size: 32px; + height: 94px; + line-height: 94px; + padding: 0 30px; + font-weight: 700; + + .state { + float: right; + + i { + color: #e0e0e0; + } + } + } + + .rules { + color: #b0b0b0; + padding: 0 30px 30px; + + .title { + text-align: center; + font-size: 24px; + + p { + height: 30px; + line-height: 30px; + text-align: center; + width: 100%; + display: inline-block; + margin: 0 auto; + } + + i { + color: #e0e0e0; + display: inline-block; + position: relative; + top: -5px; + } + } + + .detail { + font-size: 22px; + line-height: 36px; + height: 0; + overflow: hidden; + + .more { + display: block; + color: #4a90e2; + } + } + } + + .reward-list { + font-size: 24px; + width: 100%; + overflow: hidden; + background-color: #f2f2f2; + padding-top: 20px; + + .list-item { + height: 95px; + line-height: 95px; + border-bottom: 1px solid #e0e0e0; + background-color: #fff; + } + + .list-title { + font-weight: 700; + } + + a { + overflow: hidden; + width: 100%; + display: block; + } + + span { + width: 25%; + text-align: center; + padding-left: 20px; + display: block; + float: left; + + i { + color: #e0e0e0; + } + } + + .no-list { + background-color: #fff; + text-align: center; + padding-top: 40px; + } + } +} diff --git a/public/scss/activity/expand-new/_reward-detail.css b/public/scss/activity/expand-new/_reward-detail.css new file mode 100644 index 0000000..6e36538 --- /dev/null +++ b/public/scss/activity/expand-new/_reward-detail.css @@ -0,0 +1,39 @@ +.reward-detail-page { + .reward-detail { + margin: 30px; + height: 240px; + background-color: #f06a6b; + color: #fff; + border-radius: 10px; + font-size: 28px; + padding: 30px 0 0 50px; + } + + .detail-item { + height: 60px; + line-height: 60px; + + span { + margin-right: 40px; + } + } + + .reward-related { + background-color: #f0f0f0; + padding-top: 20px; + font-size: 28px; + + .releated-item { + height: 88px; + line-height: 88px; + border-bottom: 1px solid #e0e0e0; + background-color: #fff; + + span:first-child { + margin-left: 30px; + width: 230px; + display: inline-block; + } + } + } +} diff --git a/public/scss/activity/my-promotion.page.css b/public/scss/activity/my-promotion.page.css new file mode 100644 index 0000000..2d196d2 --- /dev/null +++ b/public/scss/activity/my-promotion.page.css @@ -0,0 +1 @@ +@import "expand-new/my-promotion"; diff --git a/public/scss/activity/my-reward.page.css b/public/scss/activity/my-reward.page.css new file mode 100644 index 0000000..668134c --- /dev/null +++ b/public/scss/activity/my-reward.page.css @@ -0,0 +1 @@ +@import "expand-new/my-reward"; diff --git a/public/scss/activity/reward-detail.page.css b/public/scss/activity/reward-detail.page.css new file mode 100644 index 0000000..e711778 --- /dev/null +++ b/public/scss/activity/reward-detail.page.css @@ -0,0 +1 @@ +@import "expand-new/reward-detail"; diff --git a/public/scss/cart/_order-ensure.css b/public/scss/cart/_order-ensure.css index c4e15ab..f1d1c35 100644 --- a/public/scss/cart/_order-ensure.css +++ b/public/scss/cart/_order-ensure.css @@ -451,6 +451,11 @@ color: #b6b6b6; } + .date { + max-width: none !important; + display: block !important; + } + .price-wrap { position: absolute; top: 20px; diff --git a/public/scss/cart/tickets-confirm.page.css b/public/scss/cart/tickets-confirm.page.css index 83aa721..3cfc1bd 100644 --- a/public/scss/cart/tickets-confirm.page.css +++ b/public/scss/cart/tickets-confirm.page.css @@ -20,7 +20,7 @@ h4 { width: 95%; - margin-left: 5%; + margin: 0 2.5%; font-size: 30px; color: #b0b0b0; margin-bottom: 20px; @@ -28,8 +28,8 @@ } .yoho-coin { - margin-left: 5%; - width: 90%; + margin: 0 2.5%; + width: 95%; overflow: hidden; border-bottom: 1px solid #e0e0e0; @@ -41,7 +41,8 @@ .dispatch { .sub-block { h3 { - width: 90%; + width: 95% !important; + margin: 0 2.5% !important; span { color: #afafaf; @@ -77,4 +78,21 @@ color: #b0b0b0; } } + + .pic-c { + position: relative; + + p { + position: absolute; + bottom: 0; + left: 0; + color: #fff; + width: 100%; + text-align: center; + height: 35px; + line-height: 35px; + background-color: #d0021b; + font-size: 20px; + } + } } diff --git a/public/scss/home/_home.css b/public/scss/home/_home.css index 6e9ab1b..bbb8ef3 100644 --- a/public/scss/home/_home.css +++ b/public/scss/home/_home.css @@ -307,6 +307,29 @@ } } + .invite { + background: #d0021b; + color: #fff; + + &:after { + content: none; + } + + .horn { + width: 45px; + height: 88px; + display: block; + background-image: url("/home/index/horn.png"); + background-size: 100%; + float: left; + margin-right: 12px; + } + } + + .message { + clear: both; + } + .icon { margin-right: 10px; font-size: 50px; diff --git a/public/scss/home/_order-detail.css b/public/scss/home/_order-detail.css index 893b60b..23545fa 100644 --- a/public/scss/home/_order-detail.css +++ b/public/scss/home/_order-detail.css @@ -400,6 +400,11 @@ border-radius: 5PX; margin-left: 15px; margin-top: 5px; + + &.check-ewm { + width: auto; + padding: 0 10px; + } } .pay { diff --git a/public/scss/home/_order.css b/public/scss/home/_order.css index 1be4018..65b398d 100644 --- a/public/scss/home/_order.css +++ b/public/scss/home/_order.css @@ -250,6 +250,23 @@ border-bottom: 1px solid #e0e0e0; font-size: 26px; + .pic-c { + position: relative; + + p { + position: absolute; + bottom: 0; + left: 0; + color: #fff; + width: 100%; + text-align: center; + height: 35px; + line-height: 35px; + background-color: #d0021b; + font-size: 20px; + } + } + &:last-child { border-bottom: none; } @@ -338,6 +355,11 @@ color: #b6b6b6; } + .date { + max-width: none !important; + display: block !important; + } + .price-wrap { position: absolute; top: 0; diff --git a/public/scss/layout/_header.css b/public/scss/layout/_header.css index a70c0fd..0679173 100644 --- a/public/scss/layout/_header.css +++ b/public/scss/layout/_header.css @@ -51,6 +51,11 @@ font-size: 42px; font-weight: normal; } + + .my-reward { + font-size: 28px; + width: auto; + } } } diff --git a/public/scss/passport/_common.css b/public/scss/passport/_common.css index 54bc711..57c62a3 100644 --- a/public/scss/passport/_common.css +++ b/public/scss/passport/_common.css @@ -150,10 +150,20 @@ body.passport-body { line-height: 2.5; } + .invite-code { + position: absolute; + left: 15PX; + line-height: 2.5; + } + .phone-container { padding-left: 55PX; } + .code-container { + padding-left: 70PX; + } + .input { width: 100%; line-height: 26PX; diff --git a/public/scss/product/detail/_detail.css b/public/scss/product/detail/_detail.css index 9876b68..2c3c478 100644 --- a/public/scss/product/detail/_detail.css +++ b/public/scss/product/detail/_detail.css @@ -483,6 +483,18 @@ $basicBtnC: #eb0313; font-size: 28px; line-height: 88px; + .promotion-icon { + line-height: 36px; + background-color: #d0021b; + color: #fff; + padding: 0 4px; + border-radius: 4px; + margin-right: 10px; + font-size: 22px; + float: left; + margin-top: 26px; + } + span { color: $mainFontC; } @@ -711,6 +723,17 @@ $basicBtnC: #eb0313; line-height: 36px; } + .first-item > .promotion-icon, + .folder-item > .promotion-icon { + background-color: #d0021b; + color: #fff; + padding: 0 4px; + border-radius: 4px; + margin-right: 10px; + font-size: 22px; + float: left; + } + .short-text { overflow: hidden; text-overflow: ellipsis;