Authored by 毕凯

Merge branch 'hotfix/address' into 'master'

地址微信支付相关问题修复



See merge request !332
... ... @@ -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 16:38:39
*/
'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');
... ... @@ -178,7 +179,7 @@ const Wechat = {
let resParams = {
appId: unifiedOrderResult.appid,
timeStamp: parseInt(Date.parse(new Date()) / 1000, 10),
timeStamp: parseInt(Date.parse(new Date()) / 1000, 10) + '',
nonceStr: nonceStr,
package: 'prepay_id=' + unifiedOrderResult.prepay_id,
signType: 'MD5',
... ...
{
"name": "m-yohobuy-node",
"version": "5.4.21",
"version": "5.4.22",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -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,
... ...
... ... @@ -136,6 +136,11 @@ $submit.on('touchend', function() {
});
// 省市区
$area.on('touchend', function() {
$area.on('touchstart', function() {
addressVact.$children[0].show = true;
});
// IOS 光标隐藏
$area.find('input[name=area]').on('touchend', function() {
return false;
});
... ...
... ... @@ -18,7 +18,7 @@
.top {
margin-bottom: 1PX;
font-size: 34px;
font-size: 26px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
... ... @@ -30,7 +30,7 @@
}
.swiper-container {
padding: 30px 0 0px;
padding: 30px 0 0;
width: 100%;
height: 209px;
overflow-y: hidden;
... ...
... ... @@ -214,10 +214,11 @@
methods: {
/* 返回标题处理 */
returnTitle() {
let streetTitle = this.street.allTitle !== '全部' ? this.street.allTitle : '';
let getTitle = this.province.allTitle +
this.city.allTitle +
this.area.allTitle +
this.street.allTitle;
streetTitle;
let returnTitle = '';
if (getTitle.length > 11) {
... ... @@ -311,14 +312,14 @@
id: id
}, resultData => {
/* 结果返回 */
if (resultData.length < 1) {
areaCode.val(id);
let returnTitle = this.returnTitle();
// /* 结果返回 */
// if (resultData.length < 1) {
// areaCode.val(id);
// let returnTitle = this.returnTitle();
area.val(returnTitle);
this.show = false;
}
// area.val(returnTitle);
// this.show = false;
// }
/* 数据绑定 */
switch ((id + '').length) {
... ...
... ... @@ -334,7 +334,7 @@ function transformJit(packageList) {
_.forEach(packageList, (pValue, pKey) => {
result.packages[pKey] = {
packageType: '包裹' + (pKey + 1) + ':' + pValue.title
packageType: (pKey + 1) + ':' + pValue.title
};
_.forEach(pValue.goods_list, (gValue, gKey) => {
... ...