This is a HTML-like code written in WeChat Mini Program language. It creates a view of coupons with two different states: active and inactive.

The first part of the code (within the first "view" tag) creates the active coupon view. It starts with an image tag that displays an active coupon icon, followed by a profile section that displays the name of the coupon, its validity period, and its discount type and amount.

The "btn" tag creates a button that triggers an action when clicked. The action uses the "touse" function and passes the coupon data as a parameter.

The second part of the code (within the second "view" tag) creates the inactive coupon view. It starts with an image tag that displays an inactive coupon icon, followed by a disabled profile section that displays the name of the coupon and its discount type and amount, but with a "disabled" style.

The "btn" tag in this case displays the coupon status, which is also styled as "disabled".

Overall, this code creates a dynamic view of coupons with different styles and actions depending on their state

view class= coupons wx for= fcoupons wxkey= id wxif= lactiveIndex == 1image class=icon src=images icon coupons -active svg imageview class= profileview class= nameview class=t tE# viewview class=n

原文地址: https://www.cveoy.top/t/topic/g3IA 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录