|
@@ -172,287 +172,6 @@
|
|
|
</div>
|
|
|
|
|
|
<!---->
|
|
|
-
|
|
|
- <script type="text/javascript">
|
|
|
- $(function () {
|
|
|
- let post_data = {
|
|
|
- 'token': $.cookie('access_token'),
|
|
|
- 'page': 1,
|
|
|
- 'line': 10
|
|
|
- };
|
|
|
- $.postJSON(
|
|
|
- http_ip_prot + 'langWord/query', JSON.stringify(post_data),
|
|
|
- function (data) {
|
|
|
- if (data['code'] == 0) {
|
|
|
- // console.log(data['res'])
|
|
|
- console.log(data)
|
|
|
- addTable(data['res'])
|
|
|
- let count_page = Math.ceil(data['res']['count'] / 10)
|
|
|
- $('#pagination').pagination({
|
|
|
- pages: count_page, //总页数
|
|
|
- // pages: 10000, //总页数
|
|
|
- edges: 2,
|
|
|
- cssStyle: 'pagination-sm', //按纽大小pagination-lg或写入自定义css
|
|
|
- displayedPages: 5, //显示几个
|
|
|
- onPageClick: function (pageNumber, event) {
|
|
|
- //点击时调用
|
|
|
- // alert(pageNumber);
|
|
|
- queryData(pageNumber)
|
|
|
- },
|
|
|
- onInit: function (getid) {
|
|
|
- //刷新时或初始化调用
|
|
|
- // alert(getid);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- alert(data['msg'])
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- // $('#pagination').pagination({
|
|
|
- // pages: 50, //总页数
|
|
|
- // edges: 2,
|
|
|
- // cssStyle: 'pagination-sm', //按纽大小pagination-lg或写入自定义css
|
|
|
- // displayedPages: 5, //显示几个
|
|
|
- // onPageClick: function(pageNumber, event) {
|
|
|
- // //点击时调用
|
|
|
- // // alert(pageNumber);
|
|
|
- // },
|
|
|
- // onInit: function(getid) {
|
|
|
- // //刷新时或初始化调用
|
|
|
- // // alert(getid);
|
|
|
- // }
|
|
|
- // });
|
|
|
- });
|
|
|
- let la_list
|
|
|
- let checkboxInput = '<input type="checkbox" aria-label="Checkbox for following text input">'
|
|
|
- let lw_data
|
|
|
-
|
|
|
- function queryData(page) {
|
|
|
- let post_data = {
|
|
|
- 'token': $.cookie('access_token'),
|
|
|
- 'page': page,
|
|
|
- 'line': 10
|
|
|
- };
|
|
|
- $.postJSON(
|
|
|
- http_ip_prot + 'langWord/query', JSON.stringify(post_data),
|
|
|
- function (data) {
|
|
|
- if (data['code'] == 0) {
|
|
|
- // console.log(data['res'])
|
|
|
- console.log(data)
|
|
|
- addTable(data['res'])
|
|
|
- } else {
|
|
|
- alert(data['msg'])
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- function addTable(data) {
|
|
|
- //头部多区域语言
|
|
|
- let head_data = data['la_list'];
|
|
|
- la_list = head_data
|
|
|
- // body部详细语言
|
|
|
- let body_data = data['lw_dict'];
|
|
|
- lw_data = body_data
|
|
|
- let head_html = '<tr><th>en</th>';
|
|
|
- //头部标签添加
|
|
|
- $.each(head_data, function (idx, obj) {
|
|
|
- // console.log(idx)
|
|
|
- head_html += ('<th>' + obj['lang'] + '</th>')
|
|
|
- });
|
|
|
- head_html += '<th width="180px"><a href="#" onclick="addRow()">add</a></th></tr>';
|
|
|
-
|
|
|
- let body_html = '';
|
|
|
-
|
|
|
-
|
|
|
- $.each(body_data, function (idx, obj) {
|
|
|
- // console.log(idx)
|
|
|
- // console.log(obj)
|
|
|
- let edit_btn = '<a href="#" title="Edit" onclick="editFunc(\'' + idx + '\')"><i class="fa fa-edit"></i></a>';
|
|
|
- let del_btn = '<a href="#" title="Delete" onclick="deleteFunc(\'' + idx + '\')"><i class="fa fa-ban"></i></a>';
|
|
|
- body_html += '<tr>';
|
|
|
- body_html += ('<td>' + idx + '</td>');
|
|
|
- console.log('--------');
|
|
|
- $.each(la_list, function (x, y) {
|
|
|
- if (obj[y['lang']]) {
|
|
|
- body_html += ('<td>' + obj[y['lang']] + '</td>')
|
|
|
- } else {
|
|
|
- body_html += ('<td></td>')
|
|
|
- }
|
|
|
- });
|
|
|
- body_html += '<td>' + edit_btn + ' ' + del_btn + '</td></tr>';
|
|
|
- });
|
|
|
-
|
|
|
- $('#langTableHead').html(head_html);
|
|
|
- $('#langTableBody').html(body_html);
|
|
|
- addDelFunc()
|
|
|
- }
|
|
|
-
|
|
|
- function addRow() {
|
|
|
-
|
|
|
- let newRow = '<tr><td><input class="form-control" type="text" langID="key" id="newRow_key"></td>'
|
|
|
- $.each(la_list, function (idx, obj) {
|
|
|
- // console.log(idx)
|
|
|
- // newRow += ('<td>' + obj['id'] + '</td>')
|
|
|
- newRow += ('<td>' +
|
|
|
- '<input class="form-control" type="text" langID="' + obj['id'] + '" id="newRow_lang_' + obj['id'] + '">' +
|
|
|
- '</td>')
|
|
|
- })
|
|
|
- let save_btn = '<a href="" title="Save" class="save_row"><i class="fa fa-check-circle-o"></i></a>';
|
|
|
- let del_btn = '<a href="" title="Delete" class="del_row"><i class="fa fa-ban"></i></a>';
|
|
|
-
|
|
|
- newRow += '<td>' + save_btn + ' ' + del_btn + '</td></tr>'
|
|
|
- $('#langTableBody').prepend(newRow)
|
|
|
- addDelFunc()
|
|
|
- addSaveFunc()
|
|
|
- }
|
|
|
-
|
|
|
- function addDelFunc() {
|
|
|
- $(".del_row").bind("click", function () {
|
|
|
- let trRow = $(this).parent().parent()
|
|
|
- trRow.remove()
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- function addSaveFunc() {
|
|
|
- $(".save_row").bind("click", function () {
|
|
|
- let post_data = {
|
|
|
- 'token': $.cookie('access_token')
|
|
|
- }
|
|
|
- let post_list = []
|
|
|
- let trRow = $(this).parent().parent()
|
|
|
- trRow.find('input').each(function () {
|
|
|
- // console.log($(this).attr('id'))
|
|
|
- // console.log($(this).attr('langID'))
|
|
|
- let inputVal = $(this).val()
|
|
|
- let langID = $(this).attr('langID')
|
|
|
- if (langID === 'key') {
|
|
|
- post_data['word_key'] = inputVal
|
|
|
- } else {
|
|
|
- post_list.push({'la_id': langID, 'val': inputVal})
|
|
|
- }
|
|
|
- })
|
|
|
- post_data['word_arr'] = post_list
|
|
|
- console.log(post_data)
|
|
|
- $.postJSON(
|
|
|
- http_ip_prot + 'langWord/add', JSON.stringify(post_data),
|
|
|
- function (data) {
|
|
|
- if (data['code'] == 0) {
|
|
|
- // console.log(data['res'])
|
|
|
- window.location.reload();
|
|
|
- console.log(data)
|
|
|
- } else {
|
|
|
- alert(data['msg'])
|
|
|
- }
|
|
|
- }
|
|
|
- )
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // 编辑模态框
|
|
|
- function editFunc(langKey) {
|
|
|
- console.log(lw_data);
|
|
|
- console.log(la_list);
|
|
|
- // alert(langKey)
|
|
|
- $('#modal-container-593541').modal('show')
|
|
|
- // let post_data = {'token': $.cookie('access_token')};
|
|
|
- let html_per = '<label for="lang_key_edit">KEY</label><input class="form-control" type="text" id="lang_key_edit" oldkey="' + langKey + '" value="' + langKey + '"> '
|
|
|
- $.each(la_list, function (idx, obj) {
|
|
|
- console.log(obj);
|
|
|
- html_per += ('<label for="InputLangArea">' + obj['lang'] + ':</label>' +
|
|
|
- '<input type="text" class="form-control" lang="' + obj['lang'] + '" value="' + (lw_data[langKey][obj['lang']] ? lw_data[langKey][obj['lang']] : '') + '"/>')
|
|
|
- });
|
|
|
- // console.log(html_per)
|
|
|
- $('#edit_model_form').html(html_per)
|
|
|
- }
|
|
|
-
|
|
|
- function deleteFunc(langKey) {
|
|
|
- var r = confirm("Press a button")
|
|
|
- if (r) {
|
|
|
- let post_data = {
|
|
|
- 'token': $.cookie('access_token'),
|
|
|
- 'word_key': langKey
|
|
|
- }
|
|
|
- console.log(post_data)
|
|
|
- $.postJSON(
|
|
|
- http_ip_prot + 'langWord/delete', JSON.stringify(post_data),
|
|
|
- function (data) {
|
|
|
- if (data['code'] == 0) {
|
|
|
- // console.log(data['res'])
|
|
|
- console.log(data);
|
|
|
- alert(data['msg']);
|
|
|
- window.location.reload();
|
|
|
- } else {
|
|
|
- alert(data['msg'])
|
|
|
- }
|
|
|
- }
|
|
|
- )
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*post_data = {
|
|
|
- word_key_id:1,
|
|
|
- word_key:xxx,
|
|
|
- word_arr:[
|
|
|
- {'lang':'','val':''},
|
|
|
- {'lang':'','val':''},
|
|
|
- {'lang':'','val':''}
|
|
|
- ]
|
|
|
- }*/
|
|
|
- function editRow() {
|
|
|
- let post_data = {}
|
|
|
- post_data['token'] = $.cookie('access_token')
|
|
|
- post_data['word_key'] = $('#lang_key_edit').val()
|
|
|
- post_data['old_word_key'] = $('#lang_key_edit').attr('oldkey')
|
|
|
- post_data['word_arr'] = {}
|
|
|
- $('#edit_model_form').find('input').each(function () {
|
|
|
- let langArea = $(this).attr('lang')
|
|
|
- if (langArea) {
|
|
|
- post_data['word_arr'][langArea] = $(this).val()
|
|
|
- }
|
|
|
- })
|
|
|
- console.log(post_data)
|
|
|
- $.postJSON(
|
|
|
- http_ip_prot + 'langWord/update', JSON.stringify(post_data),
|
|
|
- function (data) {
|
|
|
- if (data['code'] == 0) {
|
|
|
- // console.log(data['res'])
|
|
|
- console.log(data)
|
|
|
- alert(data['msg'])
|
|
|
-
|
|
|
- window.location.reload();
|
|
|
- } else {
|
|
|
- alert(data['msg'])
|
|
|
- }
|
|
|
- }
|
|
|
- )
|
|
|
- // $('.editRowSaveBtn').bind('click', function () {
|
|
|
- // console.log('adjslkfjsdalkfj')
|
|
|
- // })
|
|
|
- }
|
|
|
- function subLangAre() {
|
|
|
- let access_token = $.cookie('access_token')
|
|
|
- let langArea = $('#InputLangArea').val()
|
|
|
- let post_data = {
|
|
|
- 'token': access_token,
|
|
|
- 'lang': langArea,
|
|
|
- }
|
|
|
- console.log(post_data)
|
|
|
- $.postJSON(
|
|
|
- http_ip_prot + 'langArea/add',
|
|
|
- JSON.stringify(post_data),
|
|
|
- function (data) {
|
|
|
- if (data['code'] == 0) {
|
|
|
- alert(data['msg'])
|
|
|
- } else {
|
|
|
- alert(data['msg'])
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- </script>
|
|
|
</section>
|
|
|
<section class="tab-item-2">
|
|
|
<h1>Two</h1>
|
|
@@ -483,5 +202,287 @@
|
|
|
</section>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+<script type="text/javascript">
|
|
|
+ $(function () {
|
|
|
+ let post_data = {
|
|
|
+ 'token': $.cookie('access_token'),
|
|
|
+ 'page': 1,
|
|
|
+ 'line': 10
|
|
|
+ };
|
|
|
+ $.postJSON(
|
|
|
+ http_ip_prot + 'langWord/query', JSON.stringify(post_data),
|
|
|
+ function (data) {
|
|
|
+ if (data['code'] == 0) {
|
|
|
+ // console.log(data['res'])
|
|
|
+ console.log(data)
|
|
|
+ addTable(data['res'])
|
|
|
+ let count_page = Math.ceil(data['res']['count'] / 10)
|
|
|
+ $('#pagination').pagination({
|
|
|
+ pages: count_page, //总页数
|
|
|
+ // pages: 10000, //总页数
|
|
|
+ edges: 2,
|
|
|
+ cssStyle: 'pagination-sm', //按纽大小pagination-lg或写入自定义css
|
|
|
+ displayedPages: 5, //显示几个
|
|
|
+ onPageClick: function (pageNumber, event) {
|
|
|
+ //点击时调用
|
|
|
+ // alert(pageNumber);
|
|
|
+ queryData(pageNumber)
|
|
|
+ },
|
|
|
+ onInit: function (getid) {
|
|
|
+ //刷新时或初始化调用
|
|
|
+ // alert(getid);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ alert(data['msg'])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ // $('#pagination').pagination({
|
|
|
+ // pages: 50, //总页数
|
|
|
+ // edges: 2,
|
|
|
+ // cssStyle: 'pagination-sm', //按纽大小pagination-lg或写入自定义css
|
|
|
+ // displayedPages: 5, //显示几个
|
|
|
+ // onPageClick: function(pageNumber, event) {
|
|
|
+ // //点击时调用
|
|
|
+ // // alert(pageNumber);
|
|
|
+ // },
|
|
|
+ // onInit: function(getid) {
|
|
|
+ // //刷新时或初始化调用
|
|
|
+ // // alert(getid);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ });
|
|
|
+ let la_list
|
|
|
+ let checkboxInput = '<input type="checkbox" aria-label="Checkbox for following text input">'
|
|
|
+ let lw_data
|
|
|
+
|
|
|
+ function queryData(page) {
|
|
|
+ let post_data = {
|
|
|
+ 'token': $.cookie('access_token'),
|
|
|
+ 'page': page,
|
|
|
+ 'line': 10
|
|
|
+ };
|
|
|
+ $.postJSON(
|
|
|
+ http_ip_prot + 'langWord/query', JSON.stringify(post_data),
|
|
|
+ function (data) {
|
|
|
+ if (data['code'] == 0) {
|
|
|
+ // console.log(data['res'])
|
|
|
+ console.log(data)
|
|
|
+ addTable(data['res'])
|
|
|
+ } else {
|
|
|
+ alert(data['msg'])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ function addTable(data) {
|
|
|
+ //头部多区域语言
|
|
|
+ let head_data = data['la_list'];
|
|
|
+ la_list = head_data
|
|
|
+ // body部详细语言
|
|
|
+ let body_data = data['lw_dict'];
|
|
|
+ lw_data = body_data
|
|
|
+ let head_html = '<tr><th>en</th>';
|
|
|
+ //头部标签添加
|
|
|
+ $.each(head_data, function (idx, obj) {
|
|
|
+ // console.log(idx)
|
|
|
+ head_html += ('<th>' + obj['lang'] + '</th>')
|
|
|
+ });
|
|
|
+ head_html += '<th width="180px"><a href="#" onclick="addRow()">add</a></th></tr>';
|
|
|
+
|
|
|
+ let body_html = '';
|
|
|
+
|
|
|
+
|
|
|
+ $.each(body_data, function (idx, obj) {
|
|
|
+ // console.log(idx)
|
|
|
+ // console.log(obj)
|
|
|
+ let edit_btn = '<a href="#" title="Edit" onclick="editFunc(\'' + idx + '\')"><i class="fa fa-edit"></i></a>';
|
|
|
+ let del_btn = '<a href="#" title="Delete" onclick="deleteFunc(\'' + idx + '\')"><i class="fa fa-ban"></i></a>';
|
|
|
+ body_html += '<tr>';
|
|
|
+ body_html += ('<td>' + idx + '</td>');
|
|
|
+ console.log('--------');
|
|
|
+ $.each(la_list, function (x, y) {
|
|
|
+ if (obj[y['lang']]) {
|
|
|
+ body_html += ('<td>' + obj[y['lang']] + '</td>')
|
|
|
+ } else {
|
|
|
+ body_html += ('<td></td>')
|
|
|
+ }
|
|
|
+ });
|
|
|
+ body_html += '<td>' + edit_btn + ' ' + del_btn + '</td></tr>';
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#langTableHead').html(head_html);
|
|
|
+ $('#langTableBody').html(body_html);
|
|
|
+ addDelFunc()
|
|
|
+ }
|
|
|
+
|
|
|
+ function addRow() {
|
|
|
+
|
|
|
+ let newRow = '<tr><td><input class="form-control" type="text" langID="key" id="newRow_key"></td>'
|
|
|
+ $.each(la_list, function (idx, obj) {
|
|
|
+ // console.log(idx)
|
|
|
+ // newRow += ('<td>' + obj['id'] + '</td>')
|
|
|
+ newRow += ('<td>' +
|
|
|
+ '<input class="form-control" type="text" langID="' + obj['id'] + '" id="newRow_lang_' + obj['id'] + '">' +
|
|
|
+ '</td>')
|
|
|
+ })
|
|
|
+ let save_btn = '<a href="" title="Save" class="save_row"><i class="fa fa-check-circle-o"></i></a>';
|
|
|
+ let del_btn = '<a href="" title="Delete" class="del_row"><i class="fa fa-ban"></i></a>';
|
|
|
+
|
|
|
+ newRow += '<td>' + save_btn + ' ' + del_btn + '</td></tr>'
|
|
|
+ $('#langTableBody').prepend(newRow)
|
|
|
+ addDelFunc()
|
|
|
+ addSaveFunc()
|
|
|
+ }
|
|
|
+
|
|
|
+ function addDelFunc() {
|
|
|
+ $(".del_row").bind("click", function () {
|
|
|
+ let trRow = $(this).parent().parent()
|
|
|
+ trRow.remove()
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function addSaveFunc() {
|
|
|
+ $(".save_row").bind("click", function () {
|
|
|
+ let post_data = {
|
|
|
+ 'token': $.cookie('access_token')
|
|
|
+ }
|
|
|
+ let post_list = []
|
|
|
+ let trRow = $(this).parent().parent()
|
|
|
+ trRow.find('input').each(function () {
|
|
|
+ // console.log($(this).attr('id'))
|
|
|
+ // console.log($(this).attr('langID'))
|
|
|
+ let inputVal = $(this).val()
|
|
|
+ let langID = $(this).attr('langID')
|
|
|
+ if (langID === 'key') {
|
|
|
+ post_data['word_key'] = inputVal
|
|
|
+ } else {
|
|
|
+ post_list.push({'la_id': langID, 'val': inputVal})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ post_data['word_arr'] = post_list
|
|
|
+ console.log(post_data)
|
|
|
+ $.postJSON(
|
|
|
+ http_ip_prot + 'langWord/add', JSON.stringify(post_data),
|
|
|
+ function (data) {
|
|
|
+ if (data['code'] == 0) {
|
|
|
+ // console.log(data['res'])
|
|
|
+ window.location.reload();
|
|
|
+ console.log(data)
|
|
|
+ } else {
|
|
|
+ alert(data['msg'])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 编辑模态框
|
|
|
+ function editFunc(langKey) {
|
|
|
+ console.log(lw_data);
|
|
|
+ console.log(la_list);
|
|
|
+ // alert(langKey)
|
|
|
+ $('#modal-container-593541').modal('show')
|
|
|
+ // let post_data = {'token': $.cookie('access_token')};
|
|
|
+ let html_per = '<label for="lang_key_edit">KEY</label><input class="form-control" type="text" id="lang_key_edit" oldkey="' + langKey + '" value="' + langKey + '"> '
|
|
|
+ $.each(la_list, function (idx, obj) {
|
|
|
+ console.log(obj);
|
|
|
+ html_per += ('<label for="InputLangArea">' + obj['lang'] + ':</label>' +
|
|
|
+ '<input type="text" class="form-control" lang="' + obj['lang'] + '" value="' + (lw_data[langKey][obj['lang']] ? lw_data[langKey][obj['lang']] : '') + '"/>')
|
|
|
+ });
|
|
|
+ // console.log(html_per)
|
|
|
+ $('#edit_model_form').html(html_per)
|
|
|
+ }
|
|
|
+
|
|
|
+ function deleteFunc(langKey) {
|
|
|
+ var r = confirm("Press a button")
|
|
|
+ if (r) {
|
|
|
+ let post_data = {
|
|
|
+ 'token': $.cookie('access_token'),
|
|
|
+ 'word_key': langKey
|
|
|
+ }
|
|
|
+ console.log(post_data)
|
|
|
+ $.postJSON(
|
|
|
+ http_ip_prot + 'langWord/delete', JSON.stringify(post_data),
|
|
|
+ function (data) {
|
|
|
+ if (data['code'] == 0) {
|
|
|
+ // console.log(data['res'])
|
|
|
+ console.log(data);
|
|
|
+ alert(data['msg']);
|
|
|
+ window.location.reload();
|
|
|
+ } else {
|
|
|
+ alert(data['msg'])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /*post_data = {
|
|
|
+ word_key_id:1,
|
|
|
+ word_key:xxx,
|
|
|
+ word_arr:[
|
|
|
+ {'lang':'','val':''},
|
|
|
+ {'lang':'','val':''},
|
|
|
+ {'lang':'','val':''}
|
|
|
+ ]
|
|
|
+ }*/
|
|
|
+ function editRow() {
|
|
|
+ let post_data = {}
|
|
|
+ post_data['token'] = $.cookie('access_token')
|
|
|
+ post_data['word_key'] = $('#lang_key_edit').val()
|
|
|
+ post_data['old_word_key'] = $('#lang_key_edit').attr('oldkey')
|
|
|
+ post_data['word_arr'] = {}
|
|
|
+ $('#edit_model_form').find('input').each(function () {
|
|
|
+ let langArea = $(this).attr('lang')
|
|
|
+ if (langArea) {
|
|
|
+ post_data['word_arr'][langArea] = $(this).val()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(post_data)
|
|
|
+ $.postJSON(
|
|
|
+ http_ip_prot + 'langWord/update', JSON.stringify(post_data),
|
|
|
+ function (data) {
|
|
|
+ if (data['code'] == 0) {
|
|
|
+ // console.log(data['res'])
|
|
|
+ console.log(data)
|
|
|
+ alert(data['msg'])
|
|
|
+
|
|
|
+ window.location.reload();
|
|
|
+ } else {
|
|
|
+ alert(data['msg'])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ // $('.editRowSaveBtn').bind('click', function () {
|
|
|
+ // console.log('adjslkfjsdalkfj')
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ function subLangAre() {
|
|
|
+ let access_token = $.cookie('access_token')
|
|
|
+ let langArea = $('#InputLangArea').val()
|
|
|
+ let post_data = {
|
|
|
+ 'token': access_token,
|
|
|
+ 'lang': langArea,
|
|
|
+ }
|
|
|
+ console.log(post_data)
|
|
|
+ $.postJSON(
|
|
|
+ http_ip_prot + 'langArea/add',
|
|
|
+ JSON.stringify(post_data),
|
|
|
+ function (data) {
|
|
|
+ if (data['code'] == 0) {
|
|
|
+ alert(data['msg'])
|
|
|
+ window.location.reload();
|
|
|
+ } else {
|
|
|
+ alert(data['msg'])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+</script>
|
|
|
</body>
|
|
|
-</html>
|
|
|
+</html>
|