No Description

details.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Initialize your app
  2. var myApp = new Framework7({
  3. animateNavBackIcon: true,
  4. modalButtonOk: '确定',
  5. modalButtonCancel: '取消'
  6. });
  7. // Export selectors engine
  8. var $$ = Dom7;
  9. var maxPages = 0;
  10. // Add view
  11. var mainView = myApp.addView('.view-main', {
  12. // Because we use fixed-through navbar we can enable dynamic navbar
  13. dynamicNavbar: true
  14. });
  15. var html = '', id = 0;
  16. function getURLCode(){
  17. var search = location.search.length > 0 ? location.search.substring(1) : '',
  18. args = {},
  19. items = search.length ? search.split('&') : [],
  20. item = null,
  21. name = null,
  22. value = null,
  23. i = 0,
  24. len = items.length,
  25. data = '';
  26. for (i = 0; i < len; i++) {
  27. item = items[i].split('=');
  28. name = decodeURIComponent(item[0]);
  29. value = decodeURIComponent(item[1]);
  30. if (item.length) {
  31. args[name] = value
  32. }
  33. }
  34. return args;
  35. }
  36. id = getURLCode()['id'];
  37. console.log(id);
  38. $$.post('/user/information/getinformationcontentbyid', { id: id}, function (data) {
  39. res = JSON.parse(data);
  40. if (res.errno == 0) {
  41. // console.log(res);
  42. document.title = res.rst.title;
  43. $$('#content .title').html(res.rst.title);
  44. if(res.rst.content.indexOf("bwadmin.quyaqu.comhttp:") != -1){
  45. res.rst.content = res.rst.content.replace(/bwadmin.quyaqu.comhttp:/g, '');
  46. }
  47. $$('#content .container').html(res.rst.content)
  48. }
  49. });