Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shotengai
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
shotengai
Commits
95b0dcd0
Commit
95b0dcd0
authored
Sep 24, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add already_disable to snapshot & Improve template
parent
568590dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
8 deletions
+13
-8
_series.json.jbuilder
lib/generators/templates/views/share/_series.json.jbuilder
+3
-2
_series_simple.json.jbuilder
...rators/templates/views/share/_series_simple.json.jbuilder
+2
-2
_snapshot.json.jbuilder
lib/generators/templates/views/share/_snapshot.json.jbuilder
+2
-2
_snapshot_simple.json.jbuilder
...tors/templates/views/share/_snapshot_simple.json.jbuilder
+2
-2
snapshot.rb
lib/shotengai/snapshot.rb
+4
-0
No files found.
lib/generators/templates/views/share/_series.json.jbuilder
View file @
95b0dcd0
json.extract! series, :id, :title, :original_price, :price,
:stock, :spec, :cover_image, :banners, :meta, :detail, :shotengai_product_id
\ No newline at end of file
:stock, :spec, :cover_image, :banners, :meta, :detail,
:shotengai_product_id
\ No newline at end of file
lib/generators/templates/views/share/_series_simple.json.jbuilder
View file @
95b0dcd0
json.extract! series, :id, :title, :original_price, :price,
:stock, :spec, :cover_image, :meta, :shotengai_product_id
\ No newline at end of file
:stock, :spec, :cover_image, :meta, :shotengai_product_id
\ No newline at end of file
lib/generators/templates/views/share/_snapshot.json.jbuilder
View file @
95b0dcd0
...
...
@@ -2,4 +2,4 @@ json.extract! snapshot, :id, :title, :shotengai_series_id,
:original_price, :price, :count,
:product_status_zh, :order_status_zh, :product_status, :order_status,
:total_price, :total_original_price, :revised_amount,
:spec, :cover_image, :banners, :detail, :meta, :is_in_cart
\ No newline at end of file
:spec, :cover_image, :banners, :detail, :meta, :is_in_cart, :already_disable
\ No newline at end of file
lib/generators/templates/views/share/_snapshot_simple.json.jbuilder
View file @
95b0dcd0
...
...
@@ -2,4 +2,4 @@ json.extract! snapshot, :id, :title, :shotengai_series_id,
:original_price, :price, :count, :title,
:product_status_zh, :order_status_zh, :product_status, :order_status,
:total_price, :total_original_price, :revised_amount,
:spec, :cover_image, :meta, :is_in_cart
\ No newline at end of file
:spec, :cover_image, :meta, :is_in_cart, :already_disable
\ No newline at end of file
lib/shotengai/snapshot.rb
View file @
95b0dcd0
...
...
@@ -74,6 +74,10 @@ module Shotengai
read_attribute
(
:meta
)
||
(
series
.
product
.
meta
||
{}
).
merge
(
series
.
meta
||
{})
end
def
already_disable
series
.
deleted?
end
# 订单支付后 存储当时信息快照
def
copy_info
# cut_stock
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment