Authored by 郭成尧

Merge branch 'feature/coin' into 'master'

Feature/coin



See merge request !6
... ... @@ -24,3 +24,5 @@ spm_modules
.cache
dist
web.log
npm-debug
package-lock
... ...
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node@6/6.10.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'version',
1 verbose cli 'patch' ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 info git [ 'status', '--porcelain' ]
5 verbose stack Error: Git working directory not clean.
5 verbose stack M src/js/individuation.js
5 verbose stack at /usr/local/lib/node_modules/npm/lib/version.js:247:19
5 verbose stack at /usr/local/lib/node_modules/npm/lib/utils/no-progress-while-running.js:21:8
5 verbose stack at ChildProcess.exithandler (child_process.js:197:7)
5 verbose stack at emitTwo (events.js:106:13)
5 verbose stack at ChildProcess.emit (events.js:191:7)
5 verbose stack at maybeClose (internal/child_process.js:877:16)
5 verbose stack at Socket.<anonymous> (internal/child_process.js:334:11)
5 verbose stack at emitOne (events.js:96:13)
5 verbose stack at Socket.emit (events.js:188:7)
5 verbose stack at Pipe._handle.close [as _onclose] (net.js:498:12)
6 verbose cwd /Users/ccbikai/yoho/yoho-js-sdk
7 error Darwin 16.5.0
8 error argv "/usr/local/Cellar/node@6/6.10.0/bin/node" "/usr/local/bin/npm" "version" "patch"
9 error node v6.10.0
10 error npm v3.10.10
11 error Git working directory not clean.
11 error M src/js/individuation.js
12 error If you need help, you may report this error at:
12 error <https://github.com/npm/npm/issues>
13 verbose exit [ 1, true ]
This diff could not be displayed because it is too large.
{
"name": "yoho-js-sdk",
"version": "1.3.2",
"version": "1.3.3",
"description": "YOHO!前端js的功能封装包,主要用于在活动页面中,对主要功能的封装。",
"keywords": [
"YOHO!",
... ...
... ... @@ -8,14 +8,22 @@ import user from './user';
import cookies from './cookies';
import jsonp from './jsonp';
let isSendCoin = false;
let _getCoin = function(data) {
data.app = utils.queryString();
data.app.uid = data.uid;
if (isSendCoin) {
return;
}
isSendCoin = true;
jsonp({
url: '//m.yohobuy.com/activity/coin/sendCoin?callback=?',
timeout: 5000, // 5s
data: data
}).then(function(res) {
isSendCoin = false;
if (res.code === 200 && res.data) {
if (res.data.code === 200) {
utils.showCoinTip({
... ... @@ -70,6 +78,7 @@ let _getCoin = function(data) {
});
}
}, function(){
isSendCoin = false;
utils.showCoinTip({
title: '领取失败',
content: '抱歉,系统错误,有货君正奋力解决中...请稍后再来',
... ... @@ -94,6 +103,7 @@ let _getCoupon = function(data){
isSendCoupon = true;
jsonp({
url: '//m.yohobuy.com/activity/feature/couponSend?callback=?',
timeout: 5000, // 5s
data: data
}).then(function(res) {
isSendCoupon = false;
... ...