Authored by 郭成尧

Merge branch 'hotfix/wechathttps' into hotfix/address

... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-01-03 17:42:41
* @Last Modified by: Targaryen
* @Last Modified time: 2017-02-27 16:34:09
* @Last Modified time: 2017-03-01 09:54:23
*/
'use strict';
... ... @@ -148,7 +148,8 @@ const Wechat = {
*/
getOpenid(code, originalUrl) {
if (!code) {
let baseUrl = 'http://m.yohobuy.com' + originalUrl;
let isProduction = process.env.NODE_ENV === 'production';
let baseUrl = isProduction ? 'https://m.yohobuy.com' : 'http://m.yohobuy.com' + originalUrl;
let redirectUrl = tools.createOauthUrlForCode(baseUrl);
logger.info('payCenter: wechat pay no code');
... ...
... ... @@ -6,7 +6,7 @@ var phone,
newUserCouponPic = $('#newUserCouponPic').html(),
tipMessage = $('#tipMessage').html(),
activityID = $('#activityID').html(),
_weChatInterface = '//m.yohobuy.com/life/getSignPackage',
_weChatInterface = '//m.yohobuy.com/activity/wechat/share',
shareTitle = $('#shareTitle').val(),
shareImg = $('#shareImg').val(),
shareDesc = $('#shareDesc').val(),
... ... @@ -53,7 +53,7 @@ if (!$('#newUser').html()) {
* 微信分享
*/
if (typeof wx !== 'undefined') {
$.getJSON(_weChatInterface + '?pageurl=' +
$.getJSON(_weChatInterface + '?url=' +
encodeURIComponent(location.href.split('#')[0]) + '&callback=?',
function(json) {
var _appId, _timestamp, _nonceStr, _signature;
... ...
// 初始化config信息
var _weChatInterface = 'http://www.yohoboys.com/api/wechat/getSignPackage';// 签名等相关配置,yoho公众号
var _weChatInterface = '//m.yohobuy.com/activity/wechat/share';// 签名等相关配置,yoho公众号
$.getJSON(_weChatInterface + '?pageurl=' + encodeURIComponent(location.href.split('#')[0]) + '&callback=?', function(json) {
$.getJSON(_weChatInterface + '?url=' + encodeURIComponent(location.href.split('#')[0]) + '&callback=?', function(json) {
if (json !== undefined && json !== '') {
var _appId = json.appId.toString();
var _timestamp = json.timestamp;
... ...
... ... @@ -6,7 +6,7 @@ var $ = require('yoho-jquery'),
dialog = require('../plugin/dialog'),
Hammer = require('yoho-hammer');
var _weChatInterface = '//m.yohobuy.com/life/getSignPackage',
var _weChatInterface = '//m.yohobuy.com/activity/wechat/share',
wx = window.wx,
C_ID,
getChannel;
... ... @@ -159,7 +159,7 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() {
* 微信分享
*/
if (typeof wx !== 'undefined') {
$.getJSON(_weChatInterface + '?pageurl=' +
$.getJSON(_weChatInterface + '?url=' +
encodeURIComponent(location.href.split('#')[0]) + '&callback=?',
function(json) {
var _appId,
... ...
... ... @@ -6,7 +6,7 @@ var $ = require('yoho-jquery'),
dialog = require('../plugin/dialog'),
Hammer = require('yoho-hammer');
var _weChatInterface = '//m.yohobuy.com/life/getSignPackage',
var _weChatInterface = '//m.yohobuy.com/activity/wechat/share',
wx = window.wx,
C_ID,
getChannel;
... ... @@ -155,7 +155,7 @@ $('.on-lingqu', 'div.main-right-use').on('click', function() {
* 微信分享
*/
if (typeof wx !== 'undefined') {
$.getJSON(_weChatInterface + '?pageurl=' +
$.getJSON(_weChatInterface + '?url=' +
encodeURIComponent(location.href.split('#')[0]) + '&callback=?',
function(json) {
var _appId,
... ...