<view class="sectionsregion">
<view class="section__title">查询天气位置</view>
<picker mode="region" bindchange="bindRegionChange" name="region">
<view class="picker">
当前选择:{{region[0]}},{{region[1]}},{{region[2]}}
</view>
</picker>
</view>
js
method: "POST",
data:
{
msg1: e.detail.value.msg1,
msg2: e.detail.value.msg2,
color:e.detail.value.color,
region: e.details.code.region
},
萌新请教一下怎么获取picker mode="region"的数据再data的数据中post提交
用wx.request 发请求
wx.request({ url:'https://', header:{ "Content-Type": "application/json"}, method: "POST", data: { msg1: e.detail.value.msg1, msg2: e.detail.value.msg2, color: e.detail.value.color, addre: e.detail.value.region
想在wx.request的请求中 拿picker组件的 region的 code值