UNPKG

yylib-quick-mobile

Version:

yylib-quick-mobile

27 lines (26 loc) 634 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.backOrClose = backOrClose; exports.ArrayIndexOf = ArrayIndexOf; function backOrClose() { if (window.history.length > 1) { window.history.back(); } else { if (typeof YYPlugin != 'undefined') { window.YYPlugin.call("CommonPlugin", "closewindow"); } else { console.log('无回退,且未加载YYPlus!'); } } } function ArrayIndexOf(arr, obj) { var i = arr.length; while (i--) { if (arr[i] === obj) { return true; } } return false; }