Тема: JSON-->redirect
Показать сообщение отдельно
  #3 (permalink)  
Старый 18.05.2017, 16:43
Аспирант
Отправить личное сообщение для SkyNetYar Посмотреть профиль Найти все сообщения от SkyNetYar
 
Регистрация: 14.04.2017
Сообщений: 32

Похоже на правду! но вот как это использовать,мой код такой..

t.prototype.makeNotFoundCallButtons = function () {
					var t,
					e;
					return t = [],
					e = "phone=" + encodeURIComponent(this.call.entityPhone),
					e += "&title=" + encodeURIComponent(this.call.source) + " " + "(" + encodeURIComponent(this.call.entityPhone) + ")",
					e += "&address=" + encodeURIComponent(this.call.source),
					t.push({
						title: "Создать контакт",
						url: this.config.bitrix_domain + "/crm/contact/edit/0/?" + e
					}),
					t.push({
						title: "Создать лид",
						url: this.config.bitrix_domain + "/crm/lead/edit/0/?" + e
					}),
					t.push({
						title: "Записать лид",
						url: this.config.bitrix_domain + "/crm/configs/import/lead.php?LOGIN=admin&PASSWORD=qwerty&TITLE="+ encodeURIComponent(this.call.source) + " " + "(" + encodeURIComponent(this.call.entityPhone) + ")"+"&PHONE_WORK="+ encodeURIComponent(this.call.entityPhone)+"&SOURCE_ID="+ encodeURIComponent(this.call.source) +""
					}), 
					t.push({
						title: "Создать компанию",
						url: this.config.bitrix_domain + "/crm/company/edit/0/?" + e
					}),
					t
				},


Вот когда нажимаю на кнопку срабатывает вот эта часть
t.push({
						title: "Записать лид"
url: this.config.bitrix_domain + "/crm/configs/import/lead.php?LOGIN=admin&PASSWORD=qwerty&TITLE="+ encodeURIComponent(this.call.source) + " " + "(" + encodeURIComponent(this.call.entityPhone) + ")"+"&PHONE_WORK="+ encodeURIComponent(this.call.entityPhone)+"&SOURCE_ID="+ encodeURIComponent(this.call.source) +""


Как приспособить?
Именно вот это this.config.bitrix_domain + "/crm/configs/import/lead.php? идет обращение к REST API и тот возвращает то что выше писал..

Последний раз редактировалось SkyNetYar, 18.05.2017 в 16:46.
Ответить с цитированием