123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- function getQueryParams(name) {
- var url = window.location.href
- var parts = url.split('?')
- var query = parts[1]
- if (!query) return null
- var pairs = query.split('&')
- for (var i = 0; i < pairs.length; i++) {
- var pair = pairs[i].split('=')
- // 解码键和值
- var key = decodeURIComponent(pair[0])
- var value = decodeURIComponent(pair[1])
- if (key === name) {
- return value
- }
- }
- return null
- }
- function getOrgOptions(base, token) {
- $.ajax({
- url: base + '/client/c/mobileInfo/selection/selectionOrg',
- type: 'GET',
- headers: {
- 'token': token
- },
- success: function(response) {
- if (response.code === 200) {
- const dropdown = $('#orgSelect');
- response.data.forEach(item => {
- const option = $('<option></option>').val(item.orgId).text(item.orgName);
- dropdown.append(option);
- });
- } else {
- console.error('Error:', response);
- }
- },
- error: function(error) {
- console.error('Request failed:', error);
- }
- });
- }
- function getPlayUrl(base, token, orgId, cb) {
- $.ajax({
- url: base + '/client/c/mobileInfo/selection/selectionOrg',
- type: 'GET',
- headers: {
- 'token': token
- },
- success: function(response) {
- if (response.code === 200) {
- var data = response.data
- cb(data)
- } else {
- console.error('Error:', response);
- }
- },
- error: function(error) {
- console.error('Request failed:', error);
- }
- });
- }
|