<navigator class="navigator-nav" url="/store/jdypd/jdypd" wx:for="{{list}}" wx:key="value" >{{item.name}}</navigator>
<!
<map scale="20" style="width:100%;" markers="{{jd}}" longitude="116.8174347526" latitude="23.5694540972"></map>
<button type="primary" bindtap="bc" style="width:100%;">店名</button>
<mp-checkbox-group prop="checkbox" multi="{{true}}" bindchange="checkboxChange">
<mp-checkbox wx:for="{{checkboxItems}}" wx:key="value" label="{{item.name}}" value="{{item.value}}" checked="{{item.checked}}" ></mp-checkbox>
</mp-checkbox-group>
//让点击的第一个页面改变成对应的店名,纬度经度,checkbox列表 电话号码
第一个wxml对应的js部分
data: {
list: [
{ name: '聚点饮品店', value: 0, },
{ name: '老绍粿条面', value: 1 },
{ name: '老桥头菜脯面', value: 2 },
{ name: '', value: 3 },
{ name: '', value: 4 },
{ name: '', value: 5 },
{ name: 'test3', value: 6 },
{ name: 'test4', value: 7 },
{ name: 'test5', value: 8 },
{ name: 'test2', value: 9 },
{ name: 'test3', value: 10 },
{ name: 'test4', value: 11 },
{ name: 'test5', value: 12 },
{ name: 'test2', value: 13 },
{ name: 'test3', value: 14 },
{ name: 'test4', value: 15 },
{ name: 'test5', value: 16 }
],
},
//第二个wxml对应的js部分
data: {
checkboxItems: [
{ name: '草莓奶露11.88元', value: 0, checked: true },
{ name: '可乐4元', value: 1 },
{ name: '番茄酱', value: 2 },
{ name: '蜜蜂芥末酱', value: 3 },
{ name: '海苔沙拉', value: 4 },
{ name: '孜然蟹柳9元', value: 5 },
{ name: 'test3', value: 6 },
{ name: 'test4', value: 7 },
{ name: 'test5', value: 8 },
{ name: 'test2', value: 9 },
{ name: 'test3', value: 10 },
{ name: 'test4', value: 11 },
{ name: 'test5', value: 12 },
{ name: 'test2', value: 13 },
{ name: 'test3', value: 14 },
{ name: 'test4', value: 15 },
{ name: 'test5', value: 16 }
],
jd: [{
iconPath: "../../image/1.png",
id: 0,
latitude: "23.5694300972",
longitude: "116.8175257526",
width: 30,
height: 30
}]
},
checkboxChange(e) {
let newArray1 = [];
let newArray2 = [];
this.data.checkboxItems.map((item) => {
if (e.detail.value.indexOf('' + item.value) > -1) {
item.checked = true
newArray1.push(item)
}
else {
item.checked = false
newArray2.push(item)
}
})
this.setData({
checkboxItems: newArray1.concat(newArray2)
})
},
bc: function (e) {
wx.makePhoneCall({
phoneNumber: '13433889894',
success: function (res) {
console.log("ok")
},
fail: function (res) {
console.log("oclx")
},
complete: function (res) {
console.log("nopb")
},
})
},
问一下应该加什么内容