Merge branch 'master' into production
This commit is contained in:
commit
a9859d0522
2 changed files with 17 additions and 14 deletions
|
@ -6,7 +6,7 @@ module.exports = class BuyGemsModal extends ModalView
|
||||||
template: template
|
template: template
|
||||||
plain: true
|
plain: true
|
||||||
|
|
||||||
products: [
|
originalProducts: [
|
||||||
{ price: '$4.99', gems: 5000, id: 'gems_5', i18n: 'buy_gems.few_gems' }
|
{ price: '$4.99', gems: 5000, id: 'gems_5', i18n: 'buy_gems.few_gems' }
|
||||||
{ price: '$9.99', gems: 11000, id: 'gems_10', i18n: 'buy_gems.pile_gems' }
|
{ price: '$9.99', gems: 11000, id: 'gems_10', i18n: 'buy_gems.pile_gems' }
|
||||||
{ price: '$19.99', gems: 25000, id: 'gems_20', i18n: 'buy_gems.chest_gems' }
|
{ price: '$19.99', gems: 25000, id: 'gems_20', i18n: 'buy_gems.chest_gems' }
|
||||||
|
@ -24,6 +24,8 @@ module.exports = class BuyGemsModal extends ModalView
|
||||||
if application.isIPadApp
|
if application.isIPadApp
|
||||||
@products = []
|
@products = []
|
||||||
Backbone.Mediator.publish 'buy-gems-modal:update-products'
|
Backbone.Mediator.publish 'buy-gems-modal:update-products'
|
||||||
|
else
|
||||||
|
@products = @originalProducts
|
||||||
|
|
||||||
getRenderData: ->
|
getRenderData: ->
|
||||||
c = super()
|
c = super()
|
||||||
|
@ -33,11 +35,11 @@ module.exports = class BuyGemsModal extends ModalView
|
||||||
onIPadProducts: (e) ->
|
onIPadProducts: (e) ->
|
||||||
newProducts = []
|
newProducts = []
|
||||||
for iapProduct in e.products
|
for iapProduct in e.products
|
||||||
localProduct = _.find @products, { id: iapProduct.id }
|
localProduct = _.find @originalProducts, { id: iapProduct.id }
|
||||||
continue unless localProduct
|
continue unless localProduct
|
||||||
localProduct.price = iapProduct.price
|
localProduct.price = iapProduct.price
|
||||||
newProducts.push localProduct
|
newProducts.push localProduct
|
||||||
@products = newProducts
|
@products = _.sortBy newProducts, 'gems'
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
onClickProductButton: (e) ->
|
onClickProductButton: (e) ->
|
||||||
|
|
|
@ -18,7 +18,8 @@ config.mongo =
|
||||||
mongoose_replica_string: process.env.COCO_MONGO_MONGOOSE_REPLICA_STRING or ''
|
mongoose_replica_string: process.env.COCO_MONGO_MONGOOSE_REPLICA_STRING or ''
|
||||||
|
|
||||||
config.apple =
|
config.apple =
|
||||||
verifyURL: process.env.COCO_APPLE_VERIFY_URL or 'https://sandbox.itunes.apple.com/verifyReceipt' # 'https://buy.itunes.apple.com/verifyReceipt'
|
#verifyURL: process.env.COCO_APPLE_VERIFY_URL or 'https://sandbox.itunes.apple.com/verifyReceipt'
|
||||||
|
verifyURL: process.env.COCO_APPLE_VERIFY_URL or 'https://buy.itunes.apple.com/verifyReceipt'
|
||||||
|
|
||||||
config.redis =
|
config.redis =
|
||||||
port: process.env.COCO_REDIS_PORT or 6379
|
port: process.env.COCO_REDIS_PORT or 6379
|
||||||
|
|
Reference in a new issue