<view class="templateItem bg-ff radius-15">
<view class="template" style="width: 94%;">
<picker @change="bindPickerChange" :value="index1" :range="arrayPyf" range-key="realName">
<image src="https://document.dxznjy.com/course/7d53c96e7f404f429a49eb1f06f4e4e6.png" class="w44"></image>
<view>拼音法抗遗忘</view>
</picker>
</view>
<view class="template">
<u-picker :show="show2" :immediateChange ='true' :columns="arrayPyf" title='请选择您的孩子' keyName="realName" confirmColor="#357B71" @confirm="confirm2" @cancel='cancel2' @change="changeHandler2"></u-picker>
<view @click="selectPerson">
<image src="https://document.dxznjy.com/course/7d53c96e7f404f429a49eb1f06f4e4e6.png" class="w44"></image>
<view>拼音法抗遗忘</view>
</view>
</view>
</view>
//初始定值 arrayPyf: []
// 获取学员列表
async getStudent() {
let that = this;
let loginMobile = uni.getStorageSync('LoginMobile');
// console.log(loginMobile);
that.StudentCodeKey = "review_" + loginMobile;
let result = await httpUser.get("znyy/review/query/my/student");
if (result != undefined && result != '') {
if (result.data.data != null) {
that.arrayStudent = result.data.data;
console.log('that.arrayStudent--',that.arrayStudent);
//获取拼音法抗遗忘接口人员数据
that.arrayPyf=that.arrayStudent.map((item,index,array)=>{
return{
realName:item.realName,
studentCode:item.studentCode,
}
})
console.log('arrayPyf',that.arrayPyf);
// picker直接使用 不需要
that.arrayPyf=that.arrayPyf
// u-picker外面要再套一个数组
that.arrayPyf=[that.arrayPyf]
}
}
},