WeChat mini program mall development's dynamic API implements code for product details page (below)

不言
Release: 2018-08-16 16:52:43
Original
3476 people have browsed it

The content of this article is about the code (below) of the dynamic API implemented in the WeChat mini-program mall development to realize the product details page. It has certain reference value. Friends in need can refer to it. I hope it will be useful to you. Helps.

See the effect

Add to shopping cart.gif

Development plan

1. Add to shopping cart floating box, Product quantity, price calculation, collection and add to shopping cart function development
2. Call the add to shopping cart API to add to the shopping cart

Acquire product details API data model based on product ID

Visit: https ://100boot.cn/ Select the micro-mall case, as shown below:

Add to shopping cart and product collection API.jpg


There is also a detailed data model below that you can view!

detail.wxml

     #template模板引用       ¥{{goods.totalMoney}} 销量 {{goods.buyRate}} 件 商品编码:{{goods.goodsId}}     购买数量