Authored by 郭成尧

baseurl

... ... @@ -725,12 +725,18 @@ var cookies = {
// 1. 优惠券领取
// 2. YOHO币领取
var baseUrl = '//activity.yoho.cn';
if (location.hostname === 'm.yohobuy.com') {
baseUrl = '//m.yohobuy.com/activity';
}
var _getCoin = function _getCoin(data) {
data.app = utils.queryString();
data.app.uid = data.uid;
jsonp({
url: '//m.yohobuy.com/activity/coin/sendCoin?callback=?',
url: baseUrl + '/coin/sendCoin?callback=?',
data: data
}).then(function (res) {
if (res.code === 200 && res.data) {
... ... @@ -804,7 +810,7 @@ var _getCoupon = function _getCoupon(data) {
data.app.session_key = cookies.cookie('app_session_key') || data.app.session_key;
jsonp({
url: '//m.yohobuy.com/activity/feature/couponSend?callback=?',
url: baseUrl + '/feature/couponSend?callback=?',
data: data
}).then(function (res) {
if (res.code === 200) {
... ... @@ -860,7 +866,7 @@ var _initCoin = function _initCoin(uid) {
if (window.__wxjs_environment === 'miniprogram' && wx && wx.miniProgram) {
wx.miniProgram.navigateTo({
url: '/pages/userCenter/userCenter?h5back=' + location.href
url: '../bindPhoneNumber/bindPhoneNumber?h5back=' + location.href
});
return;
}
... ... @@ -899,7 +905,7 @@ var _initCoupon = function _initCoupon(uid) {
if (window.__wxjs_environment === 'miniprogram' && wx && wx.miniProgram) {
wx.miniProgram.navigateTo({
url: 'pages/bindPhoneNumber/bindPhoneNumber?h5back=' + location.href
url: '../bindPhoneNumber/bindPhoneNumber?h5back=' + location.href
});
return;
}
... ...