Authored by 陈峰

Merge branch 'master' into 'release/6.8.5'

Master



See merge request !1677
... ... @@ -8,7 +8,7 @@
#base image : ccr.ccs.tencentyun.com/yoho-base/node
FROM ccr.ccs.tencentyun.com/yoho-base/node:10.4.1-alpine
FROM ccr.ccs.tencentyun.com/yoho-base/node:10.4.1-alpine-fix
MAINTAINER xiaoxiao.hao <xiaoxiao.hao@yoho.cn>
... ... @@ -16,9 +16,9 @@ ENV NODE_ENV=production \
NODE_HOME=/home
RUN cd /home && \
mkdir -p /home/yoho-yohobuy-wap
mkdir -p /home/yoho-yohobuy-wap
COPY . /home/yoho-yohobuy-wap
COPY . /home/yoho-yohobuy-wap
WORKDIR /home/yoho-yohobuy-wap
... ...
... ... @@ -77,7 +77,7 @@ function detail(req, res, next) {
req.ctx(YoLuckService).getDetail(id, uid).then(result => {
if (result.error) {
return next(result.error);
return Promise.reject(result.error);
}
res.render('yoluck/detail', {
... ...
... ... @@ -188,7 +188,7 @@ class YoLuckService extends global.yoho.BaseModel {
return result.data;
} catch (e) {
return {
error: '出错了'
error: e
};
}
}
... ... @@ -223,6 +223,11 @@ class YoLuckService extends global.yoho.BaseModel {
const result = {};
if (r1.error) {
result.error = r1.error;
return result;
}
result.userName = userName || _.get(r4, 'data.nickname', '') || '';
result.actPrizeId = actPrizeId;
result.product = !r1.error ? r1 : {};
... ...
... ... @@ -195,6 +195,7 @@ const Wechat = {
}
};
} else {
logger.info(`wechat unifiedorder result: ${JSON.stringify(unifiedOrderResult)}`);
logger.info('payCenter: wechat pay no unifiedOrderResult');
return {};
}
... ...
... ... @@ -155,9 +155,7 @@ module.exports = {
}
},
session: {
host: '192.168.102.49',
// host: '127.0.0.1',
host: '127.0.0.1',
port: '6379',
pass: '',
prefix: 'yohobuy_session:'
... ...
... ... @@ -224,7 +224,7 @@ exports.serverError = () => {
} else if (err.code === 9999991 || err.code === 9999992) {
return _err510(req, res, 510, err);
} else if (+err.statusCode === 503) {
return _err503(req, res, 510, err);
return _err503(req, res, 503, err);
}
if (!res.headersSent) {
... ...
{
"name": "yohobuywap-node",
"version": "6.8.71",
"version": "6.8.74",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -101,6 +101,10 @@ function getUser() {
getUser();
(function() {
if (!lottery.$list || !lottery.$list.length) {
return;
}
api.getDetailMyCode({id}).then(res => {
if (res.code !== 200) {
return;
... ...
... ... @@ -12,15 +12,15 @@ function h5Path(shareUid, actPrizeId) {
return location.protocol + `//m.yohobuy.com/activity/yoluck/${actPrizeId}.html?shareUid=${shareUid}`;
}
function shareName(userName) {
return `${userName || ''}邀请你参加0元抽奖活动`;
function shareName(name) {
return `【0元抽奖】点一下,免费拿走${name}`;
}
function shareDesc(name) {
return `奖品:${name}`;
}
function shareData({name, imgUrl, price, shareUid, userName, actPrizeId}) {
function shareData({name, imgUrl, price, shareUid, actPrizeId}) {
let link = h5Path(shareUid, actPrizeId);
let urls = imgUrl.split('?');
let shareImg = urls[0] || imgUrl;
... ... @@ -29,12 +29,10 @@ function shareData({name, imgUrl, price, shareUid, userName, actPrizeId}) {
shareImg = `${shareImg}?imageView2/2/w/375/h/235/q/60`;
}
userName = userName || '';
return {
app: {
shareType: 'yoluck',
title: shareName(userName),
title: shareName(name),
imgUrl: shareImg,
market_price: price,
miniProgramUrl: miniPath(shareUid, actPrizeId),
... ... @@ -44,7 +42,7 @@ function shareData({name, imgUrl, price, shareUid, userName, actPrizeId}) {
hideType: ['7', '8', '9']
},
h5: {
title: shareName(userName),
title: shareName(name),
imgUrl: imgUrl,
link: link,
desc: shareDesc(name),
... ...