diff --git a/Gemfile.lock b/Gemfile.lock index 4058fcf..2489e61 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,7 +43,7 @@ GEM airbrussh (1.1.2) sshkit (>= 1.6.1, != 1.7.0) arel (7.1.4) - autoprefixer-rails (6.7.7.1) + autoprefixer-rails (6.7.7.2) execjs bcrypt (3.1.11) better_errors (2.1.1) @@ -85,7 +85,7 @@ GEM railties (>= 4.1.0, < 5.1) responders warden (~> 1.2.3) - domain_name (0.5.20170223) + domain_name (0.5.20170404) unf (>= 0.0.5, < 1.0.0) erubis (2.7.0) execjs (2.7.0) @@ -129,7 +129,7 @@ GEM minitest (5.10.1) monetize (1.6.0) money (~> 6.8) - money (6.8.2) + money (6.8.3) i18n (>= 0.6.4, < 0.9) sixarm_ruby_unaccent (>= 1.1.1, < 2) money-rails (1.8.0) @@ -230,11 +230,11 @@ GEM tilt (2.0.7) tzinfo (1.2.3) thread_safe (~> 0.1) - uglifier (3.1.12) + uglifier (3.2.0) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext - unf_ext (0.0.7.2) + unf_ext (0.0.7.3) warden (1.2.7) rack (>= 1.0) websocket-driver (0.6.5) @@ -245,10 +245,10 @@ GEM http (>= 1.0.4, < 3) nokogiri (>= 1.6.0) thor - weui-rails (1.1.1) + weui-rails (1.1.1.1) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) - wx_pay (0.14.2) + wx_pay (0.15.0) activesupport (>= 3.2) rest-client (>= 1.7) diff --git a/app/assets/stylesheets/weui-rails.scss b/app/assets/stylesheets/weui-rails.scss index 8807e07..0cceaaa 100644 --- a/app/assets/stylesheets/weui-rails.scss +++ b/app/assets/stylesheets/weui-rails.scss @@ -1,7 +1,14 @@ $weuiGridIconSize: 128px; $weuiGridColumnCount: 2; -@import "weui"; +@import "base/reset"; + +// cell +@import "widget/weui-cell/weui-cell_global"; +@import "widget/weui-cell/weui-form"; + +// grid +@import "widget/weui-grid/weui-grid"; .page { position: absolute; diff --git a/app/controllers/wewebs_controller.rb b/app/controllers/wewebs_controller.rb index 5ced463..7d6bc34 100644 --- a/app/controllers/wewebs_controller.rb +++ b/app/controllers/wewebs_controller.rb @@ -22,7 +22,7 @@ def pay body: order.teddy_sku, out_trade_no: "teddies_shop_order_id_#{order.id}", total_fee: order.amount_fens, - spbill_create_ip: Socket.ip_address_list.detect(&:ipv4_private?).ip_address, + spbill_create_ip: request.ip, notify_url: Figaro.env.wechat_pay_notify_url, trade_type: 'JSAPI', openid: openid diff --git a/app/views/layouts/wechat.html.erb b/app/views/layouts/wechat.html.erb index b142c89..e0363f1 100644 --- a/app/views/layouts/wechat.html.erb +++ b/app/views/layouts/wechat.html.erb @@ -3,6 +3,7 @@ + <%= csrf_meta_tags %> <%= @title.presence || "Teddies Shop" %> <%= stylesheet_link_tag 'weui-rails', media: 'all' %>