Authored by yyq

Merge branch 'release/6.7.9' of git.yoho.cn:fe/yohobuywap-node into release/6.7.9

... ... @@ -21,6 +21,7 @@ const redbagPage = async(req, res, next) => {
userInfo.data.rewardType = false;
}
}
return res.render('red-envelope/redbag-cs', {
pageHeader: headerModel.setNav({
navTitle: '添加潮流顾问'
... ...
... ... @@ -24,15 +24,20 @@
</div>
{{/if}}
<div class="wx-account-info">
<div id="hasCode" style="display:{{#if userInfo.submitWechat}}block;{{else}}none;{{/if}}">已提交微信号:<span id="wxCode">{{userInfo.userWechatCode}}</span></div>
<div id="hasCode" style="display:{{#if userInfo.submitWechat}}block;{{else}}none;{{/if}}">
已提交微信号:<span id="wxCode">{{userInfo.userWechatCode}}</span></div>
<div id="noCode" style="display:{{#if userInfo.submitWechat}}none;{{else}}block;{{/if}}">未提交微信</div>
</div>
</div>
<div class="user-label">
<div class="title">用户标签</div>
<div>
<span class="label">{{userInfo.tag_address}}</span>
<span class="label">{{userInfo.tag_createTime}}</span>
{{#if userInfo.tag_address}}
<span class="label">{{userInfo.tag_address}}</span>
{{/if}}
{{#if userInfo.tag_createTime}}
<span class="label">{{userInfo.tag_createTime}}</span>
{{/if}}
</div>
</div>
<div class="relation-list">
... ...
... ... @@ -18,6 +18,19 @@ let channels = {
lifestyle: 4
};
exports.getShareCode = async(req, res, next) =>{
try {
let shareCode = await req.ctx(newHomeModel).getShareCode(req.user.uid);
let shareUrl = '/activity/red-envelope/index?shareCode=' + shareCode.data;
return res.json({result: true, code: 200, data: shareUrl});
} catch (e) {
return next(e);
}
};
exports.index = async(req, res, next) => {
let responseData = {
isLogin: req.user.uid ? true : false,
... ...
... ... @@ -188,7 +188,7 @@ router.get('/return/exchange/refreshDelivery', auth, exchange.refreshDelivery);
router.get('/tide-command', auth, tideCommand.tideCommand); // 设置潮流口令
router.get('/', newHome.index); // 新个人中心首页
router.get('/getCodeUrl', auth, newHome.getShareCode);
router.get('/family', auth, disableBFCache, family.familyIndex); // family首页
router.get('/family/vipDetailData', auth, family.familyVip); // 获取VIP信息
... ...
{
"name": "yohobuywap-node",
"version": "96.7.15",
"version": "96.7.16",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -38,19 +38,26 @@ class NewHome extends Page {
}
copyShareUrl() {
this.selector.$wxcs.click(function() {
this.selector.$wxcs.click(()=> {
let clipboard = new Clipboard('#wxcs', {
text: ()=> {
return location.origin + $(this).attr('data-url');
text: () => {
return location.origin + this.selector.$wxcs.attr('data-url');
}
});
clipboard.on('success', function(e) {
clipboard.on('success', (e) => {
e.clearSelection();
tip.show('复制分享地址成功');
$.ajax({
method: 'get',
url: '/home/getCodeUrl',
success: (data) => {
this.selector.$wxcs.attr('data-url', data.data);
}
});
});
clipboard.on('error', function() {
clipboard.on('error', () => {
tip.show('复制失败');
});
... ...