sunshibo 2 недель назад
Родитель
Сommit
029285e69d
1 измененных файлов с 12 добавлено и 3 удалено
  1. 12 3
      HBuilderProjects/shareIndex.html

+ 12 - 3
HBuilderProjects/shareIndex.html

@@ -1263,9 +1263,18 @@
 				credentials: 'omit',
 				headers: { Accept: 'application/json' }
 			}).then(function (res) {
-				alert(res.json)
-				if (!res.ok) throw new Error('HTTP ' + res.status);
-				return res.json();
+				return res.json().then(function (data) {
+					try {
+						alert(
+							'getWxConfig HTTP ' +
+								res.status +
+								'\n' +
+								JSON.stringify(data, null, 2)
+						);
+					} catch (alertErr) {}
+					if (!res.ok) throw new Error('HTTP ' + res.status);
+					return data;
+				});
 			});
 		}