|
|
@@ -6,6 +6,7 @@ Page({
|
|
|
radio: false,
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ console.log(options)
|
|
|
if (options.item) {
|
|
|
let item = JSON.parse(options.item);
|
|
|
this.setData({
|
|
|
@@ -15,7 +16,7 @@ Page({
|
|
|
})
|
|
|
};
|
|
|
if (options.params) this.setData({
|
|
|
- params: JSON.parse(params)
|
|
|
+ params: JSON.parse(options.params)
|
|
|
})
|
|
|
this.setData({
|
|
|
radio: options.radio ? true : false
|
|
|
@@ -29,14 +30,15 @@ Page({
|
|
|
result = this.data.result,
|
|
|
list = this.data.result.map(value => this.data.list.find(v => v.contactsid == value));
|
|
|
try {
|
|
|
- let page = pages[pages.length - 2].selectComponent(item.model || "#Form");
|
|
|
- if (page) {
|
|
|
+ if (item) {
|
|
|
+ let page = pages[pages.length - 2].selectComponent(item.model || "#Form");
|
|
|
item.value = this.data.radio ? [list[0].name, result] : [list.map(v => v.name), result];
|
|
|
page.handleRoute(item);
|
|
|
} else {
|
|
|
pages[pages.length - 2].handleSelectContacts(this.data.result, list)
|
|
|
}
|
|
|
} catch (e) {
|
|
|
+ console.log(e)
|
|
|
wx.showToast({
|
|
|
title: '操作失败',
|
|
|
icon: "none"
|