Authored by 邱骏

Merge branch 'feature/wechatCs' into feature/converse

... ... @@ -19,7 +19,7 @@ COPY yoho-activity-platform.tar.gz /home
RUN cd /home && \
mkdir -p /home/yoho-activity-platform && \
mkdir -p /Data/log/yoho-activity-platform && \
tar -xzvf yoho-activity-platform.tar.gz -C /home/yoho-activity-platform && \
tar -xzf yoho-activity-platform.tar.gz -C /home/yoho-activity-platform && \
rm -rf yoho-activity-platform.tar.gz
WORKDIR /home/yoho-activity-platform
... ...
... ... @@ -89,7 +89,7 @@ try {
// docker验证项目是否正常发布
app.use('/node/status.html', (req, res) => {
return res.status(204).end();
return res.status(200).end();
});
require('./dispatch')(app);
... ...
... ... @@ -159,6 +159,22 @@ const wechatShare = {
}
}).catch(next);
},
getWechatCs(req, res, next) {
let param = req.body || {};
let uid = {
toString: () => {
return parseInt(param.uid, 10);
},
sessionKey: param.sessionKey,
appVersion: param.appVersion,
appSessionType: param.sessionType
};
return req.ctx(WechatModel).getIsNeedAddWechatCS(uid).then(result => {
return res.json(result);
}).catch(next);
}
};
... ...
... ... @@ -68,13 +68,13 @@ class WechatModel extends global.yoho.BaseModel {
};
if (type === 'save') {
strSql = `insert into ${TABLE_WECHAT}
(access_token, access_ticket, access_create_time, access_expired) values
strSql = `insert into ${TABLE_WECHAT}
(access_token, access_ticket, access_create_time, access_expired) values
(:access_token, :access_ticket, :access_create_time, :access_expired);`;
return mysqlCli.insert(strSql, params);
} else if (type === 'update') {
strSql = `update ${TABLE_WECHAT} set
strSql = `update ${TABLE_WECHAT} set
access_token = :access_token,
access_ticket = :access_ticket,
access_create_time = :access_create_time,
... ... @@ -84,6 +84,16 @@ class WechatModel extends global.yoho.BaseModel {
}
}
getIsNeedAddWechatCS(uid) {
return this.get({
url: '',
data: {
method: 'app.passport.getIsNeedAddWechatCS',
uid: uid
}
});
}
}
module.exports = WechatModel;
... ...
... ... @@ -63,4 +63,7 @@ router.post('/guochao/checkFav', guochao.checkFav);
// 图片处理git
router.get('/shoes/getBase64ImageData', shoes.getImageData);
// 查询专属客服微信号
router.post('/getWechatCs', wechat.getWechatCs);
module.exports = router;
... ...
... ... @@ -8,7 +8,7 @@
const pkg = require('../package.json');
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const isTest = process.env.NODE_ENV === 'test3';
module.exports = {
app: 'h5',
... ... @@ -19,14 +19,14 @@ module.exports = {
yohoVerifyUdid: '0f626ede-0e17-460b-a8ea-069ee506e8e9',
domains: {
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
api: 'http://api-test3.dev.yohocorp.com/',
service: 'http://api-test3.dev.yohocorp.com/',
singleApi: 'http://api-test3.yohops.com:9999/',
singleApi: 'http://api.yoho.cn/',
api: 'http://api.yoho.cn/',
// singleApi: 'http://api.yoho.cn/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
store: 'http://192.168.102.47:8080/portal-gateway/wechat/',
service: 'http://service.yoho.cn/',
serviceNotify: 'http://service.yoho.cn/',
platformApi: 'http://172.16.6.210:8088/',
},
... ... @@ -67,15 +67,13 @@ module.exports = {
maxFiles: 7
},
console: {
level: 'info',
level: 'debug',
colorize: 'all',
prettyPrint: true
}
},
redis: {
connect: {
// host: '127.0.0.1',
host: '192.168.102.49',
port: '6379',
enable_offline_queue: false,
... ... @@ -96,10 +94,10 @@ module.exports = {
},
mysql: {
connect: {
host: 'localhost',
host: '192.168.102.219',
port: '3306',
user: 'root',
password: ''
user: 'yh_test',
password: 'yh_test'
},
database: 'yoho_activity_platform',
},
... ... @@ -190,21 +188,21 @@ if (isProduction) {
siteUrl: '//action.yoho.cn',
assetUrl: `/yoho-activity-platform/${pkg.version}/`,
domains: {
api: process.env.TEST_API || 'http://api-test1.yohops.com:9999/',
service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/',
global: process.env.TEST_GLOBAL || 'http://global-test-soa.yohops.com:9999/',
store: process.env.TEST_STORE || 'http://192.168.102.210:8080/portal-gateway/wechat/',
liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',
singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/',
api: 'http://api-test3.dev.yohocorp.com/',
service: 'http://api-test3.dev.yohocorp.com/',
global: 'http://global-test-soa.yohops.com:9999/',
store: 'http://192.168.102.210:8080/portal-gateway/wechat/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.dev.yohocorp.com/',
platformApi: 'http://192.168.102.48:8088/'
},
useCache: true,
mysql: {
connect: {
host: 'localhost',
host: '192.168.102.219',
port: '3306',
user: 'root',
password: ''
user: 'yh_test',
password: 'yh_test'
},
database: 'yoho_activity_platform',
}
... ...
... ... @@ -14,6 +14,21 @@ module.exports = {
},
seederStorage: 'sequelize'
},
test3: {
username: 'yh_test',
password: 'yh_test',
database: 'yoho_activity_platform',
port: '3306',
host: '192.168.102.219',
dialect: 'mysql',
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
},
seederStorage: 'sequelize'
},
production: {
username: 'yh_vpc_bak',
password: 'yoho@2Y$^YpNb7hp',
... ...
#!/bin/bash
wordir=$2
wordir=$1
cd $wordir
rm -rf yoho-activity-platform.tar.gz
if [[ $1 == "TEST1" ]] || [[ $1 == "TEST2" ]] || [[ $1 == "TEST3" ]]
then
NODE_ENV='test'
elif [[ $1 == "GRAY-QCLOUD" ]]
then
NODE_ENV='gray'
elif [[ $1 == "ONLINE-AWS" ]] || [[ $1 == "ONLINE-QCLOUD" ]]
then
NODE_ENV='production'
fi
yarn
NODE_ENV=development yarn
yarn --production=false
yarn build
tar -czvf yoho-activity-platform.tar.gz *
tar -czf yoho-activity-platform.tar.gz *
... ...
2b0f287ebc269a4629e5c63eb94d0644
\ No newline at end of file
... ...
8a9723d4f7974a78efe7bcc47a2de387
\ No newline at end of file
... ...
6f7ce9d3dec89f5ea16431a6030f5d43
\ No newline at end of file
... ...
a8dd03d2504673733288baa043e8301d
\ No newline at end of file
... ...
02313c3236dd18aa06d45ee3bd8f0370
\ No newline at end of file
... ...
356ae3dc3a7e3eaa9324067e556adebf
\ No newline at end of file
... ...
ec8ca55d0c7367250f8d1c65900e7817
\ No newline at end of file
... ...
03e6ff8f6d803c17a1c1efc228b5a016
\ No newline at end of file
... ...
e0bfe6ed930a4fb609e28e6f95b9cb57
\ No newline at end of file
... ...
364348225d35f530b1b1d3cf42f035a6
\ No newline at end of file
... ...
083dbe1ac022090c78012381d40172fe
\ No newline at end of file
... ...
6aafbae56001d931446d84bdf4d52daf
\ No newline at end of file
... ...
ba8b7adc2de640fd349bc52c689edd5a
\ No newline at end of file
... ...
cb4c52feccd3157e9eecf10374b4430a
\ No newline at end of file
... ...
10521533b62f7f5f9f11e0cac5b144c6
\ No newline at end of file
... ...
ade4ec0161c2fd4a35621f44cfc2869c
\ No newline at end of file
... ...
8f77a3a9cc3e575826068d814e938248
\ No newline at end of file
... ...
ddf6b705c75cda4e14ba3fc41bbce800
\ No newline at end of file
... ...
ee49c5b03d983c66d9da737d8eb4f53a
\ No newline at end of file
... ...
c4e6bfff407522b24a13347ae384c23c
\ No newline at end of file
... ...
20608d555610a3ccb6e4b4659f2bde8f
\ No newline at end of file
... ...
b3ffed72b88e1eff1815eb1fa69e7c9b
\ No newline at end of file
... ...
dc09801c5326fc992cae091280b16282
\ No newline at end of file
... ...
1062df56cb75c5d93c37f6b6481b740f
\ No newline at end of file
... ...
e8afa4320cbbd038d9d7d46f25edfd85
\ No newline at end of file
... ...
feb10dd32a7262a75f0d8c854a5402b2
\ No newline at end of file
... ...
1856de9c47814eb0ce0518d8398c8c80
\ No newline at end of file
... ...
22a365ab9d801db75234f0ff28b21fe3
\ No newline at end of file
... ...
55c9dc4ced0ef36b777058ee8c548a34
\ No newline at end of file
... ...
546ef472fd6e8f6e6e2903c42343fb51
\ No newline at end of file
... ...