WXML
Add an activity title and a booking button to this mini program screen.
index.wxml (excerpt)
<view>
<text>{{title}}</text>
<button>Reserve this time</button>
</view>title: "Weekend pottery"Weekend pottery
Saturday 14:00 · Pottery workshop
{{title}} reads the activity name from page data. The button tag declares an object; separate logic handles its click.
Bind data, rather than duplicate the page: {{title}} displays a field from page data. List and condition directives control which objects appear as data changes.
Use the platform’s components: WeChat uses tags such as view, text, and button. WXML resembles HTML but is not a browser document.
Send this to the AI Agent in your project
Add an activity title and booking button to this WeChat page’s WXML. Bind the title to page data and connect the button to existing booking logic. Change the activity name afterward and verify the title updates while booking still works.
Select page elements for precise AI edits
Click a button, text, or card, note the change, then copy its exact location to AI.
Open Selector Pro website↗