Commit a6c14536 by ivan Lan

Add views templates

parent 1b07f88f
json.current_page @orders.current_page
json.total_pages @orders.total_pages
json.send(@orders.first.class.model_name.collection) @orders, partial: 'shotengai/share/order_simple', as: :order
\ No newline at end of file
json.partial! "shotengai/share/order_simple", order: @resource
json.current_page @resources.current_page
json.total_pages @resources.total_pages
json.set! @resources.first.class.model_name.collection do
json.array! @resources, partial: 'shotengai/share/product_simple', as: :product
end
json.partial! "shotengai/share/product", product: @resource
json.current_page @resources.current_page
json.total_pages @resources.total_pages
json.set! @resources.first.class.model_name.collection do
json.array! @resources, partial: 'shotengai/share/product_simple', as: :products
end
json.partial! "shotengai/share/series", series: @resource
json.current_page @resources.current_page
json.total_pages @resources.total_pages
json.set! @resources.first.class.model_name.collection do
json.array! @resources, partial: 'shotengai/share/snapshot_simple', as: :snapshot
end
json.partial! "shotengai/share/snaoshot", snaoshot: @resource
json.extract! order, :id, :seq, :address,
:pay_time, :delivery_time, :receipt_time,
:delivery_way, :delivery_cost,
:merchant_remark, :mark, :customer_remark,
:status, :meta
json.snapshots, partial: 'shotengai/share/snapshot_simple', as: :series
\ No newline at end of file
json.extract! order, :id, :seq, :address,
:pay_time, :delivery_time, :receipt_time,
:delivery_way, :delivery_cost,
:merchant_remark, :mark, :customer_remark,
:status, :meta
\ No newline at end of file
json.extract! product, :id, :title, :status, :need_express, :need_time_attr,
:cover_image, :banners, :spec, :detail, :meta
json.default_series product.default_series, partial: 'shotengai/share/series_simple', as: :series
\ No newline at end of file
json.extract! product, :id, :title, :status, :need_express, :cover_image
\ No newline at end of file
json.extract! series, :id, :original_price, :price,
:stock, :spec, :meta
\ No newline at end of file
json.extract! series, :id, :original_price, :price,
:stock, :spec, :meta
\ No newline at end of file
json.extract! snapshot, :id, :original_price, :price, :count,
:spec, :banners, :cover_image, :detail, :meta
\ No newline at end of file
json.extract! snapshot, :id, :original_price, :price, :count,
:spec, :cover_image, :meta
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment