From a5df70331c0a56fc8e8ab1eb734a4e4b27f4d955 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=96=20=E7=8E=96?= <2250912113@qq.com>
Date: Tue, 4 Jun 2024 12:32:03 +0800
Subject: [PATCH] job
---
django3qu6u/.idea/.gitignore | 8 +
django3qu6u/.idea/django3qu6u.iml | 34 +
.../inspectionProfiles/Project_Default.xml | 7 +
.../inspectionProfiles/profiles_settings.xml | 6 +
django3qu6u/.idea/misc.xml | 7 +
django3qu6u/.idea/modules.xml | 8 +
django3qu6u/config.ini | 9 +
django3qu6u/db/django3qu6u.sql | 473 +
django3qu6u/dj2/__init__.py | 3 +
.../dj2/__pycache__/__init__.cpython-37.pyc | Bin 0 -> 172 bytes
.../dj2/__pycache__/settings.cpython-37.pyc | Bin 0 -> 3804 bytes
.../dj2/__pycache__/urls.cpython-37.pyc | Bin 0 -> 3608 bytes
.../dj2/__pycache__/views.cpython-37.pyc | Bin 0 -> 14488 bytes
.../dj2/__pycache__/wsgi.cpython-37.pyc | Bin 0 -> 518 bytes
django3qu6u/dj2/settings.py | 184 +
django3qu6u/dj2/urls.py | 101 +
django3qu6u/dj2/views.py | 963 +
django3qu6u/dj2/wsgi.py | 16 +
django3qu6u/django开发文档.docx | Bin 0 -> 12984 bytes
django3qu6u/init.py | 53 +
django3qu6u/main/Gerenjianli_v.py | 725 +
django3qu6u/main/Gongsi_v.py | 717 +
django3qu6u/main/Gongsixinxi_v.py | 725 +
django3qu6u/main/Keshihua_v.py | 717 +
django3qu6u/main/Mianshijieguo_v.py | 733 +
django3qu6u/main/Mianshiyaoqing_v.py | 733 +
django3qu6u/main/Qiuzhizhe_v.py | 717 +
django3qu6u/main/Storeup_v.py | 717 +
django3qu6u/main/Tongzhigonggao_v.py | 717 +
django3qu6u/main/Toudijianli_v.py | 733 +
django3qu6u/main/Zhaopinxinxi_v.py | 725 +
django3qu6u/main/__init__.py | 1 +
.../__pycache__/Gerenjianli_v.cpython-37.pyc | Bin 0 -> 17940 bytes
.../main/__pycache__/Gongsi_v.cpython-37.pyc | Bin 0 -> 17362 bytes
.../__pycache__/Gongsixinxi_v.cpython-37.pyc | Bin 0 -> 17958 bytes
.../__pycache__/Keshihua_v.cpython-37.pyc | Bin 0 -> 17446 bytes
.../Mianshijieguo_v.cpython-37.pyc | Bin 0 -> 18259 bytes
.../Mianshiyaoqing_v.cpython-37.pyc | Bin 0 -> 18301 bytes
.../__pycache__/Qiuzhizhe_v.cpython-37.pyc | Bin 0 -> 17488 bytes
.../main/__pycache__/Storeup_v.cpython-37.pyc | Bin 0 -> 17404 bytes
.../Tongzhigonggao_v.cpython-37.pyc | Bin 0 -> 17698 bytes
.../__pycache__/Toudijianli_v.cpython-37.pyc | Bin 0 -> 18175 bytes
.../__pycache__/Zhaopinxinxi_v.cpython-37.pyc | Bin 0 -> 18000 bytes
.../main/__pycache__/__init__.cpython-37.pyc | Bin 0 -> 167 bytes
.../main/__pycache__/admin.cpython-37.pyc | Bin 0 -> 914 bytes
.../main/__pycache__/apps.cpython-37.pyc | Bin 0 -> 398 bytes
.../__pycache__/config_model.cpython-37.pyc | Bin 0 -> 724 bytes
.../main/__pycache__/config_v.cpython-37.pyc | Bin 0 -> 3235 bytes
.../main/__pycache__/model.cpython-37.pyc | Bin 0 -> 16346 bytes
.../main/__pycache__/models.cpython-37.pyc | Bin 0 -> 12389 bytes
.../main/__pycache__/schema_v.cpython-37.pyc | Bin 0 -> 10492 bytes
.../main/__pycache__/urls.cpython-37.pyc | Bin 0 -> 4603 bytes
.../__pycache__/users_model.cpython-37.pyc | Bin 0 -> 843 bytes
.../main/__pycache__/users_v.cpython-37.pyc | Bin 0 -> 3887 bytes
django3qu6u/main/admin.py | 31 +
django3qu6u/main/apps.py | 6 +
django3qu6u/main/config_model.py | 21 +
django3qu6u/main/config_v.py | 131 +
django3qu6u/main/model.py | 663 +
django3qu6u/main/models.py | 485 +
django3qu6u/main/schema_v.py | 499 +
django3qu6u/main/tests.py | 3 +
django3qu6u/main/urls.py | 162 +
django3qu6u/main/users_model.py | 22 +
django3qu6u/main/users_v.py | 161 +
django3qu6u/main/views.py | 3 +
django3qu6u/manage.py | 15 +
django3qu6u/requirements.txt | 7 +
.../templates/front/admin/1-install.bat | 1 +
django3qu6u/templates/front/admin/2-run.bat | 1 +
django3qu6u/templates/front/admin/3-build.bat | 1 +
.../templates/front/admin/babel.config.js | 5 +
.../front/admin/dist/css/app.fee01443.css | 1 +
.../admin/dist/css/chunk-vendors.6d894868.css | 20 +
.../templates/front/admin/dist/favicon.ico | Bin 0 -> 4286 bytes
.../dist/fonts/element-icons.535877f5.woff | Bin 0 -> 28200 bytes
.../dist/fonts/element-icons.732389de.ttf | Bin 0 -> 55956 bytes
.../front/admin/dist/img/404.3648f234.png | Bin 0 -> 21703 bytes
.../admin/dist/img/zhongguo.20798bfa.png | Bin 0 -> 4849 bytes
.../templates/front/admin/dist/index.html | 1 +
.../front/admin/dist/js/app.3993825f.js | 2 +
.../front/admin/dist/js/app.3993825f.js.map | 1 +
.../admin/dist/js/chunk-vendors.7e405093.js | 109 +
.../dist/js/chunk-vendors.7e405093.js.map | 1 +
.../templates/front/admin/package-lock.json | 11444 ++++++
.../templates/front/admin/package.json | 62 +
.../templates/front/admin/public/favicon.ico | Bin 0 -> 4286 bytes
.../templates/front/admin/public/index.html | 21 +
django3qu6u/templates/front/admin/src/App.vue | 30 +
.../admin/src/assets/css/canvas-bg-1.css | 13 +
.../admin/src/assets/css/canvas-bg-2.css | 6 +
.../admin/src/assets/css/canvas-bg-3.css | 5 +
.../src/assets/css/element-variables.scss | 9 +
.../front/admin/src/assets/css/style.scss | 47 +
.../front/admin/src/assets/img/404.png | Bin 0 -> 21703 bytes
.../front/admin/src/assets/img/avator.png | Bin 0 -> 91999 bytes
.../front/admin/src/assets/img/bg.jpg | Bin 0 -> 4321837 bytes
.../front/admin/src/assets/img/captcha.jpg | Bin 0 -> 3365 bytes
.../front/admin/src/assets/img/login.png | Bin 0 -> 843 bytes
.../front/admin/src/assets/img/logo.png | Bin 0 -> 4859 bytes
.../front/admin/src/assets/img/password.png | Bin 0 -> 1359 bytes
.../front/admin/src/assets/img/role.png | Bin 0 -> 2957 bytes
.../admin/src/assets/img/test/jianshe.png | Bin 0 -> 3817 bytes
.../admin/src/assets/img/test/jiaotong.png | Bin 0 -> 3674 bytes
.../admin/src/assets/img/test/nongye.png | Bin 0 -> 2780 bytes
.../admin/src/assets/img/test/weixin.png | Bin 0 -> 1847 bytes
.../admin/src/assets/img/test/zhifubao.png | Bin 0 -> 1924 bytes
.../admin/src/assets/img/test/zhongguo.png | Bin 0 -> 4849 bytes
.../front/admin/src/assets/img/username.png | Bin 0 -> 1178 bytes
.../front/admin/src/assets/js/canvas-bg-1.js | 85 +
.../front/admin/src/assets/js/canvas-bg-2.js | 191 +
.../front/admin/src/assets/js/canvas-bg-3.js | 175 +
.../front/admin/src/assets/js/canvas-bg-4.js | 336 +
.../front/admin/src/assets/js/canvas-bg-5.js | 154 +
.../admin/src/components/SvgIcon/index.vue | 43 +
.../src/components/common/BreadCrumbs.vue | 109 +
.../src/components/common/BreadCrumbs.vue.bak | 77 +
.../admin/src/components/common/Editor.vue | 240 +
.../src/components/common/ExcelFileUpload.vue | 142 +
.../src/components/common/FileUpload.vue | 140 +
.../admin/src/components/home/HomeCard.vue | 60 +
.../admin/src/components/home/HomeChart.vue | 126 +
.../admin/src/components/home/HomeComment.vue | 101 +
.../src/components/home/HomeProgress.vue | 55 +
.../admin/src/components/index/IndexAside.vue | 56 +
.../src/components/index/IndexAsideStatic.vue | 501 +
.../components/index/IndexAsideStatic.vue.bak | 76 +
.../src/components/index/IndexAsideSub.vue | 51 +
.../src/components/index/IndexHeader.vue | 185 +
.../src/components/index/IndexHeader.vue.bak | 89 +
.../admin/src/components/index/IndexMain.vue | 143 +
.../src/components/index/IndexMain.vue.bak | 124 +
.../templates/front/admin/src/icons/index.js | 9 +
.../front/admin/src/icons/svg/404.svg | 1 +
.../front/admin/src/icons/svg/articleEdit.svg | 1 +
.../front/admin/src/icons/svg/banner.svg | 1 +
.../front/admin/src/icons/svg/bug.svg | 1 +
.../front/admin/src/icons/svg/build.svg | 1 +
.../front/admin/src/icons/svg/cfg.svg | 1 +
.../front/admin/src/icons/svg/channel.svg | 1 +
.../front/admin/src/icons/svg/chart.svg | 1 +
.../front/admin/src/icons/svg/clipboard.svg | 1 +
.../front/admin/src/icons/svg/code.svg | 1 +
.../front/admin/src/icons/svg/component.svg | 1 +
.../front/admin/src/icons/svg/contacts.svg | 1 +
.../front/admin/src/icons/svg/dashboard.svg | 1 +
.../front/admin/src/icons/svg/date.svg | 1 +
.../front/admin/src/icons/svg/dept.svg | 1 +
.../front/admin/src/icons/svg/dict.svg | 1 +
.../admin/src/icons/svg/documentation.svg | 1 +
.../front/admin/src/icons/svg/download.svg | 1 +
.../front/admin/src/icons/svg/drag.svg | 1 +
.../front/admin/src/icons/svg/druid.svg | 1 +
.../front/admin/src/icons/svg/edit.svg | 1 +
.../front/admin/src/icons/svg/education.svg | 1 +
.../front/admin/src/icons/svg/email.svg | 1 +
.../front/admin/src/icons/svg/excel.svg | 1 +
.../admin/src/icons/svg/exit-fullscreen.svg | 1 +
.../front/admin/src/icons/svg/eye-open.svg | 1 +
.../front/admin/src/icons/svg/file.svg | 1 +
.../front/admin/src/icons/svg/form.svg | 1 +
.../front/admin/src/icons/svg/fullscreen.svg | 1 +
.../front/admin/src/icons/svg/icon.svg | 1 +
.../admin/src/icons/svg/international.svg | 1 +
.../front/admin/src/icons/svg/job.svg | 1 +
.../front/admin/src/icons/svg/language.svg | 1 +
.../front/admin/src/icons/svg/link.svg | 1 +
.../front/admin/src/icons/svg/list.svg | 1 +
.../front/admin/src/icons/svg/lock.svg | 1 +
.../front/admin/src/icons/svg/log.svg | 1 +
.../front/admin/src/icons/svg/logininfor.svg | 1 +
.../front/admin/src/icons/svg/menu.svg | 1 +
.../front/admin/src/icons/svg/message.svg | 1 +
.../front/admin/src/icons/svg/money.svg | 1 +
.../front/admin/src/icons/svg/monitor.svg | 1 +
.../front/admin/src/icons/svg/nested.svg | 1 +
.../front/admin/src/icons/svg/nested0.svg | 1 +
.../front/admin/src/icons/svg/online.svg | 1 +
.../front/admin/src/icons/svg/operation.svg | 1 +
.../front/admin/src/icons/svg/password.svg | 1 +
.../front/admin/src/icons/svg/password0.svg | 1 +
.../front/admin/src/icons/svg/pdf.svg | 1 +
.../front/admin/src/icons/svg/people.svg | 1 +
.../front/admin/src/icons/svg/peoples.svg | 1 +
.../front/admin/src/icons/svg/phone.svg | 1 +
.../front/admin/src/icons/svg/post.svg | 1 +
.../front/admin/src/icons/svg/qq.svg | 1 +
.../front/admin/src/icons/svg/search.svg | 1 +
.../front/admin/src/icons/svg/sender.svg | 1 +
.../front/admin/src/icons/svg/server.svg | 1 +
.../front/admin/src/icons/svg/shopping.svg | 1 +
.../admin/src/icons/svg/shoppingCard.svg | 1 +
.../front/admin/src/icons/svg/size.svg | 1 +
.../front/admin/src/icons/svg/skill.svg | 1 +
.../front/admin/src/icons/svg/star.svg | 1 +
.../front/admin/src/icons/svg/svg/AI.svg | 1 +
.../src/icons/svg/svg/AIDeviceLayout.svg | 1 +
.../front/admin/src/icons/svg/svg/EIM.svg | 1 +
.../front/admin/src/icons/svg/svg/VIP.svg | 1 +
.../src/icons/svg/svg/agricultureRegister.svg | 1 +
.../front/admin/src/icons/svg/svg/area.svg | 1 +
.../front/admin/src/icons/svg/svg/base.svg | 1 +
.../front/admin/src/icons/svg/svg/batch.svg | 1 +
.../front/admin/src/icons/svg/svg/board.svg | 1 +
.../front/admin/src/icons/svg/svg/board1.svg | 19 +
.../admin/src/icons/svg/svg/boardConfig.svg | 1 +
.../front/admin/src/icons/svg/svg/cfg.svg | 1 +
.../front/admin/src/icons/svg/svg/code.svg | 1 +
.../front/admin/src/icons/svg/svg/company.svg | 1 +
.../front/admin/src/icons/svg/svg/crop.svg | 1 +
.../front/admin/src/icons/svg/svg/crops.svg | 1 +
.../admin/src/icons/svg/svg/dashboard.svg | 1 +
.../admin/src/icons/svg/svg/dataAbnormal.svg | 1 +
.../admin/src/icons/svg/svg/dataLack.svg | 1 +
.../front/admin/src/icons/svg/svg/dept.svg | 1 +
.../front/admin/src/icons/svg/svg/device.svg | 1 +
.../src/icons/svg/svg/deviceMonitorData.svg | 1 +
.../front/admin/src/icons/svg/svg/dict.svg | 1 +
.../src/icons/svg/svg/diseasesinsect.svg | 1 +
.../src/icons/svg/svg/diseasesinsects.svg | 1 +
.../admin/src/icons/svg/svg/documentation.svg | 1 +
.../front/admin/src/icons/svg/svg/email.svg | 1 +
.../admin/src/icons/svg/svg/environmental.svg | 1 +
.../admin/src/icons/svg/svg/eye-open.svg | 1 +
.../src/icons/svg/svg/farmingProject.svg | 1 +
.../front/admin/src/icons/svg/svg/finance.svg | 1 +
.../admin/src/icons/svg/svg/financeBudget.svg | 1 +
.../src/icons/svg/svg/financeReality.svg | 1 +
.../front/admin/src/icons/svg/svg/firm.svg | 1 +
.../front/admin/src/icons/svg/svg/firms.svg | 1 +
.../admin/src/icons/svg/svg/harvestBatch.svg | 1 +
.../src/icons/svg/svg/harvestDetection.svg | 1 +
.../admin/src/icons/svg/svg/harvestManage.svg | 1 +
.../admin/src/icons/svg/svg/harvestWorks.svg | 1 +
.../src/icons/svg/svg/heavyMetalDetection.svg | 1 +
.../front/admin/src/icons/svg/svg/home.svg | 14 +
.../admin/src/icons/svg/svg/inspection.svg | 1 +
.../admin/src/icons/svg/svg/internet.svg | 1 +
.../src/icons/svg/svg/internetActive.svg | 17 +
.../front/admin/src/icons/svg/svg/log.svg | 1 +
.../admin/src/icons/svg/svg/mainSystem.svg | 1 +
.../src/icons/svg/svg/mainSystemActive.svg | 16 +
.../front/admin/src/icons/svg/svg/menu.svg | 1 +
.../src/icons/svg/svg/monitorEquipment.svg | 1 +
.../front/admin/src/icons/svg/svg/news.svg | 1 +
.../front/admin/src/icons/svg/svg/order.svg | 1 +
.../admin/src/icons/svg/svg/password.svg | 1 +
.../front/admin/src/icons/svg/svg/peoples.svg | 1 +
.../front/admin/src/icons/svg/svg/pest.svg | 1 +
.../admin/src/icons/svg/svg/pestActive.svg | 32 +
.../src/icons/svg/svg/pesticideResidue.svg | 1 +
.../front/admin/src/icons/svg/svg/pests.svg | 1 +
.../front/admin/src/icons/svg/svg/phone.svg | 1 +
.../front/admin/src/icons/svg/svg/plant.svg | 1 +
.../front/admin/src/icons/svg/svg/plants.svg | 1 +
.../admin/src/icons/svg/svg/plantsActive.svg | 28 +
.../admin/src/icons/svg/svg/residual.svg | 1 +
.../src/icons/svg/svg/retroactiveCoding.svg | 1 +
.../front/admin/src/icons/svg/svg/scheme.svg | 1 +
.../front/admin/src/icons/svg/svg/source.svg | 1 +
.../admin/src/icons/svg/svg/sourceActive.svg | 15 +
.../front/admin/src/icons/svg/svg/system.svg | 1 +
.../front/admin/src/icons/svg/svg/task.svg | 1 +
.../admin/src/icons/svg/svg/tempFarm.svg | 1 +
.../admin/src/icons/svg/svg/traceability.svg | 1 +
.../src/icons/svg/svg/traceabilityList.svg | 1 +
.../src/icons/svg/svg/traceabilityStyle.svg | 1 +
.../front/admin/src/icons/svg/svg/user.svg | 1 +
.../front/admin/src/icons/svg/svg/user0.svg | 1 +
.../admin/src/icons/svg/svg/validCode.svg | 1 +
.../front/admin/src/icons/svg/svg/video.svg | 1 +
.../src/icons/svg/svg/videoEquipment.svg | 1 +
.../admin/src/icons/svg/svg/videoKey.svg | 1 +
.../admin/src/icons/svg/svg/vipCustomized.svg | 1 +
.../admin/src/icons/svg/svg/warnings.svg | 1 +
.../admin/src/icons/svg/svg/workOrder.svg | 1 +
.../icons/svg/svg/┐┤░х╣▄└э.svg | 16 +
.../╓╪╜Ё╩Ї╝ь▓т╣▄└э.svg | 1 +
.../front/admin/src/icons/svg/swagger.svg | 1 +
.../front/admin/src/icons/svg/system.svg | 1 +
.../front/admin/src/icons/svg/tab.svg | 1 +
.../front/admin/src/icons/svg/table.svg | 1 +
.../front/admin/src/icons/svg/table0.svg | 1 +
.../front/admin/src/icons/svg/task.svg | 1 +
.../front/admin/src/icons/svg/template.svg | 1 +
.../front/admin/src/icons/svg/theme.svg | 1 +
.../front/admin/src/icons/svg/tool.svg | 1 +
.../front/admin/src/icons/svg/tree-table.svg | 1 +
.../front/admin/src/icons/svg/tree.svg | 1 +
.../front/admin/src/icons/svg/user.svg | 1 +
.../front/admin/src/icons/svg/user0.svg | 1 +
.../front/admin/src/icons/svg/validCode.svg | 1 +
.../front/admin/src/icons/svg/wechat.svg | 1 +
.../front/admin/src/icons/svg/zip.svg | 1 +
.../templates/front/admin/src/icons/svgo.yml | 22 +
django3qu6u/templates/front/admin/src/main.js | 78 +
.../front/admin/src/router/router-static.js | 140 +
.../templates/front/admin/src/store/store.js | 0
.../templates/front/admin/src/utils/api.js | 17 +
.../templates/front/admin/src/utils/base.js | 16 +
.../templates/front/admin/src/utils/http.js | 29 +
.../templates/front/admin/src/utils/i18n.js | 12 +
.../templates/front/admin/src/utils/menu.js | 6 +
.../front/admin/src/utils/storage.js | 18 +
.../templates/front/admin/src/utils/utils.js | 61 +
.../front/admin/src/utils/validate.js | 57 +
.../templates/front/admin/src/views/404.vue | 46 +
.../front/admin/src/views/center.vue | 210 +
.../templates/front/admin/src/views/home.vue | 57 +
.../templates/front/admin/src/views/index.vue | 32 +
.../templates/front/admin/src/views/login.vue | 597 +
.../views/modules/config/add-or-update.vue | 493 +
.../admin/src/views/modules/config/list.vue | 505 +
.../modules/gerenjianli/add-or-update.vue | 912 +
.../src/views/modules/gerenjianli/list.vue | 732 +
.../views/modules/gongsi/add-or-update.vue | 644 +
.../admin/src/views/modules/gongsi/list.vue | 595 +
.../modules/gongsixinxi/add-or-update.vue | 818 +
.../src/views/modules/gongsixinxi/list.vue | 635 +
.../views/modules/keshihua/add-or-update.vue | 468 +
.../admin/src/views/modules/keshihua/list.vue | 544 +
.../modules/mianshijieguo/add-or-update.vue | 672 +
.../src/views/modules/mianshijieguo/list.vue | 608 +
.../modules/mianshiyaoqing/add-or-update.vue | 660 +
.../src/views/modules/mianshiyaoqing/list.vue | 738 +
.../views/modules/qiuzhizhe/add-or-update.vue | 631 +
.../src/views/modules/qiuzhizhe/list.vue | 595 +
.../views/modules/storeup/add-or-update.vue | 561 +
.../admin/src/views/modules/storeup/list.vue | 564 +
.../modules/tongzhigonggao/add-or-update.vue | 613 +
.../src/views/modules/tongzhigonggao/list.vue | 563 +
.../modules/toudijianli/add-or-update.vue | 704 +
.../src/views/modules/toudijianli/list.vue | 749 +
.../src/views/modules/users/add-or-update.vue | 492 +
.../admin/src/views/modules/users/list.vue | 560 +
.../modules/zhaopinxinxi/add-or-update.vue | 944 +
.../src/views/modules/zhaopinxinxi/list.vue | 697 +
.../templates/front/admin/src/views/pay.vue | 161 +
.../front/admin/src/views/register.vue | 563 +
.../front/admin/src/views/update-password.vue | 118 +
.../admin/src/views/update-password.vue.bak | 118 +
.../templates/front/admin/vue.config.js | 62 +
.../templates/front/css/bootstrap.min.css | 13 +
.../templates/front/css/canvas-bg-1.css | 13 +
.../templates/front/css/canvas-bg-2.css | 6 +
.../templates/front/css/canvas-bg-3.css | 5 +
.../templates/front/css/canvas-bg-4.css | 11 +
.../templates/front/css/canvas-bg-5.css | 11 +
django3qu6u/templates/front/css/common.css | 22 +
django3qu6u/templates/front/css/style.css | 701 +
.../templates/front/css/swiper.min.css | 13 +
django3qu6u/templates/front/css/theme.css | 265 +
.../templates/front/elementui/elementui.css | 1 +
.../templates/front/elementui/elementui.js | 1 +
.../front/elementui/fonts/element-icons.ttf | Bin 0 -> 55956 bytes
.../front/elementui/fonts/element-icons.woff | Bin 0 -> 28200 bytes
django3qu6u/templates/front/img/avator.png | Bin 0 -> 4731 bytes
django3qu6u/templates/front/img/banner.jpg | Bin 0 -> 101987 bytes
django3qu6u/templates/front/img/jianshe.png | Bin 0 -> 3817 bytes
django3qu6u/templates/front/img/jiaotong.png | Bin 0 -> 3674 bytes
django3qu6u/templates/front/img/line.jpg | Bin 0 -> 1202 bytes
django3qu6u/templates/front/img/nongye.png | Bin 0 -> 2780 bytes
django3qu6u/templates/front/img/now.png | Bin 0 -> 1876 bytes
.../templates/front/img/seckilling.jpg | Bin 0 -> 1555 bytes
django3qu6u/templates/front/img/select.png | Bin 0 -> 1851 bytes
django3qu6u/templates/front/img/unselect.png | Bin 0 -> 1908 bytes
django3qu6u/templates/front/img/weixin.png | Bin 0 -> 1847 bytes
django3qu6u/templates/front/img/yuan.png | Bin 0 -> 24685 bytes
django3qu6u/templates/front/img/zhifubao.png | Bin 0 -> 1924 bytes
django3qu6u/templates/front/img/zhongguo.png | Bin 0 -> 4849 bytes
.../front/js/bootstrap.AMapPositionPicker.js | 707 +
.../templates/front/js/bootstrap.min.js | 7 +
.../templates/front/js/canvas-bg-web-1.js | 83 +
.../templates/front/js/canvas-bg-web-2.js | 189 +
.../templates/front/js/canvas-bg-web-3.js | 173 +
.../templates/front/js/canvas-bg-web-4.js | 334 +
.../templates/front/js/canvas-bg-web-5.js | 152 +
django3qu6u/templates/front/js/config.js | 105 +
django3qu6u/templates/front/js/jquery.js | 2 +
django3qu6u/templates/front/js/swiper.min.js | 14 +
django3qu6u/templates/front/js/utils.js | 59 +
django3qu6u/templates/front/js/validate.js | 74 +
django3qu6u/templates/front/js/vue.js | 11965 ++++++
.../templates/front/layui/css/layui.css | 2 +
.../front/layui/css/layui.mobile.css | 2 +
.../front/layui/css/modules/code.css | 2 +
.../css/modules/laydate/default/laydate.css | 2 +
.../css/modules/layer/default/icon-ext.png | Bin 0 -> 5911 bytes
.../layui/css/modules/layer/default/icon.png | Bin 0 -> 11493 bytes
.../layui/css/modules/layer/default/layer.css | 2 +
.../css/modules/layer/default/loading-0.gif | Bin 0 -> 5793 bytes
.../css/modules/layer/default/loading-1.gif | Bin 0 -> 701 bytes
.../css/modules/layer/default/loading-2.gif | Bin 0 -> 1787 bytes
.../templates/front/layui/font/iconfont.eot | Bin 0 -> 46684 bytes
.../templates/front/layui/font/iconfont.svg | 554 +
.../templates/front/layui/font/iconfont.ttf | Bin 0 -> 46508 bytes
.../templates/front/layui/font/iconfont.woff | Bin 0 -> 30628 bytes
.../templates/front/layui/font/iconfont.woff2 | Bin 0 -> 25964 bytes
.../templates/front/layui/images/face/0.gif | Bin 0 -> 2689 bytes
.../templates/front/layui/images/face/1.gif | Bin 0 -> 5514 bytes
.../templates/front/layui/images/face/10.gif | Bin 0 -> 2797 bytes
.../templates/front/layui/images/face/11.gif | Bin 0 -> 4121 bytes
.../templates/front/layui/images/face/12.gif | Bin 0 -> 3361 bytes
.../templates/front/layui/images/face/13.gif | Bin 0 -> 7425 bytes
.../templates/front/layui/images/face/14.gif | Bin 0 -> 2375 bytes
.../templates/front/layui/images/face/15.gif | Bin 0 -> 1793 bytes
.../templates/front/layui/images/face/16.gif | Bin 0 -> 6721 bytes
.../templates/front/layui/images/face/17.gif | Bin 0 -> 4439 bytes
.../templates/front/layui/images/face/18.gif | Bin 0 -> 3017 bytes
.../templates/front/layui/images/face/19.gif | Bin 0 -> 3040 bytes
.../templates/front/layui/images/face/2.gif | Bin 0 -> 3222 bytes
.../templates/front/layui/images/face/20.gif | Bin 0 -> 5144 bytes
.../templates/front/layui/images/face/21.gif | Bin 0 -> 5191 bytes
.../templates/front/layui/images/face/22.gif | Bin 0 -> 9823 bytes
.../templates/front/layui/images/face/23.gif | Bin 0 -> 3792 bytes
.../templates/front/layui/images/face/24.gif | Bin 0 -> 8096 bytes
.../templates/front/layui/images/face/25.gif | Bin 0 -> 3127 bytes
.../templates/front/layui/images/face/26.gif | Bin 0 -> 3291 bytes
.../templates/front/layui/images/face/27.gif | Bin 0 -> 4377 bytes
.../templates/front/layui/images/face/28.gif | Bin 0 -> 2793 bytes
.../templates/front/layui/images/face/29.gif | Bin 0 -> 4854 bytes
.../templates/front/layui/images/face/3.gif | Bin 0 -> 4017 bytes
.../templates/front/layui/images/face/30.gif | Bin 0 -> 2555 bytes
.../templates/front/layui/images/face/31.gif | Bin 0 -> 2002 bytes
.../templates/front/layui/images/face/32.gif | Bin 0 -> 3481 bytes
.../templates/front/layui/images/face/33.gif | Bin 0 -> 2454 bytes
.../templates/front/layui/images/face/34.gif | Bin 0 -> 3700 bytes
.../templates/front/layui/images/face/35.gif | Bin 0 -> 1800 bytes
.../templates/front/layui/images/face/36.gif | Bin 0 -> 2331 bytes
.../templates/front/layui/images/face/37.gif | Bin 0 -> 1513 bytes
.../templates/front/layui/images/face/38.gif | Bin 0 -> 3615 bytes
.../templates/front/layui/images/face/39.gif | Bin 0 -> 6495 bytes
.../templates/front/layui/images/face/4.gif | Bin 0 -> 5689 bytes
.../templates/front/layui/images/face/40.gif | Bin 0 -> 3154 bytes
.../templates/front/layui/images/face/41.gif | Bin 0 -> 3644 bytes
.../templates/front/layui/images/face/42.gif | Bin 0 -> 5305 bytes
.../templates/front/layui/images/face/43.gif | Bin 0 -> 2674 bytes
.../templates/front/layui/images/face/44.gif | Bin 0 -> 4126 bytes
.../templates/front/layui/images/face/45.gif | Bin 0 -> 3417 bytes
.../templates/front/layui/images/face/46.gif | Bin 0 -> 3007 bytes
.../templates/front/layui/images/face/47.gif | Bin 0 -> 2333 bytes
.../templates/front/layui/images/face/48.gif | Bin 0 -> 2689 bytes
.../templates/front/layui/images/face/49.gif | Bin 0 -> 2315 bytes
.../templates/front/layui/images/face/5.gif | Bin 0 -> 4567 bytes
.../templates/front/layui/images/face/50.gif | Bin 0 -> 5866 bytes
.../templates/front/layui/images/face/51.gif | Bin 0 -> 2785 bytes
.../templates/front/layui/images/face/52.gif | Bin 0 -> 777 bytes
.../templates/front/layui/images/face/53.gif | Bin 0 -> 2127 bytes
.../templates/front/layui/images/face/54.gif | Bin 0 -> 2196 bytes
.../templates/front/layui/images/face/55.gif | Bin 0 -> 1971 bytes
.../templates/front/layui/images/face/56.gif | Bin 0 -> 2034 bytes
.../templates/front/layui/images/face/57.gif | Bin 0 -> 2705 bytes
.../templates/front/layui/images/face/58.gif | Bin 0 -> 2258 bytes
.../templates/front/layui/images/face/59.gif | Bin 0 -> 10311 bytes
.../templates/front/layui/images/face/6.gif | Bin 0 -> 2213 bytes
.../templates/front/layui/images/face/60.gif | Bin 0 -> 3245 bytes
.../templates/front/layui/images/face/61.gif | Bin 0 -> 2495 bytes
.../templates/front/layui/images/face/62.gif | Bin 0 -> 2017 bytes
.../templates/front/layui/images/face/63.gif | Bin 0 -> 5871 bytes
.../templates/front/layui/images/face/64.gif | Bin 0 -> 6448 bytes
.../templates/front/layui/images/face/65.gif | Bin 0 -> 3576 bytes
.../templates/front/layui/images/face/66.gif | Bin 0 -> 3029 bytes
.../templates/front/layui/images/face/67.gif | Bin 0 -> 2701 bytes
.../templates/front/layui/images/face/68.gif | Bin 0 -> 1424 bytes
.../templates/front/layui/images/face/69.gif | Bin 0 -> 2431 bytes
.../templates/front/layui/images/face/7.gif | Bin 0 -> 3398 bytes
.../templates/front/layui/images/face/70.gif | Bin 0 -> 4590 bytes
.../templates/front/layui/images/face/71.gif | Bin 0 -> 5304 bytes
.../templates/front/layui/images/face/8.gif | Bin 0 -> 4050 bytes
.../templates/front/layui/images/face/9.gif | Bin 0 -> 4221 bytes
.../front/layui/lay/modules/carousel.js | 2 +
.../templates/front/layui/lay/modules/code.js | 2 +
.../front/layui/lay/modules/colorpicker.js | 2 +
.../front/layui/lay/modules/element.js | 2 +
.../templates/front/layui/lay/modules/flow.js | 2 +
.../templates/front/layui/lay/modules/form.js | 2 +
.../front/layui/lay/modules/jquery.js | 5 +
.../front/layui/lay/modules/laydate.js | 2 +
.../front/layui/lay/modules/layedit.js | 2 +
.../front/layui/lay/modules/layer.js | 2 +
.../front/layui/lay/modules/laypage.js | 2 +
.../front/layui/lay/modules/laytpl.js | 2 +
.../front/layui/lay/modules/mobile.js | 2 +
.../templates/front/layui/lay/modules/rate.js | 2 +
.../front/layui/lay/modules/slider.js | 2 +
.../front/layui/lay/modules/table.js | 2 +
.../front/layui/lay/modules/transfer.js | 2 +
.../templates/front/layui/lay/modules/tree.js | 2 +
.../front/layui/lay/modules/upload.js | 2 +
.../templates/front/layui/lay/modules/util.js | 2 +
.../templates/front/layui/layui.all.js | 5 +
django3qu6u/templates/front/layui/layui.js | 2 +
django3qu6u/templates/front/modules/config.js | 14 +
.../templates/front/modules/http/http.js | 142 +
.../front/modules/layarea/layarea.js | 4020 ++
.../front/modules/tinymce/index.html | 95 +
.../front/modules/tinymce/tinymce.js | 209 +
.../tinymce/tinymce/jquery.tinymce.min.js | 91 +
.../modules/tinymce/tinymce/langs/readme.md | 3 +
.../modules/tinymce/tinymce/langs/zh_CN.js | 419 +
.../front/modules/tinymce/tinymce/license.txt | 504 +
.../tinymce/tinymce/plugins/advlist/plugin.js | 297 +
.../tinymce/plugins/advlist/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/anchor/plugin.js | 145 +
.../tinymce/plugins/anchor/plugin.min.js | 9 +
.../tinymce/plugins/autolink/plugin.js | 191 +
.../tinymce/plugins/autolink/plugin.min.js | 9 +
.../tinymce/plugins/autoresize/plugin.js | 188 +
.../tinymce/plugins/autoresize/plugin.min.js | 9 +
.../tinymce/plugins/autosave/plugin.js | 230 +
.../tinymce/plugins/autosave/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/bbcode/plugin.js | 103 +
.../tinymce/plugins/bbcode/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/charmap/plugin.js | 1695 +
.../tinymce/plugins/charmap/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/code/plugin.js | 99 +
.../tinymce/plugins/code/plugin.min.js | 9 +
.../tinymce/plugins/codesample/plugin.js | 1766 +
.../tinymce/plugins/codesample/plugin.min.js | 9 +
.../tinymce/plugins/colorpicker/plugin.js | 22 +
.../tinymce/plugins/colorpicker/plugin.min.js | 9 +
.../tinymce/plugins/contextmenu/plugin.js | 22 +
.../tinymce/plugins/contextmenu/plugin.min.js | 9 +
.../tinymce/plugins/directionality/plugin.js | 314 +
.../plugins/directionality/plugin.min.js | 9 +
.../tinymce/plugins/emoticons/js/emojis.js | 9015 +++++
.../plugins/emoticons/js/emojis.min.js | 2 +
.../tinymce/plugins/emoticons/plugin.js | 602 +
.../tinymce/plugins/emoticons/plugin.min.js | 9 +
.../tinymce/plugins/fullpage/plugin.js | 568 +
.../tinymce/plugins/fullpage/plugin.min.js | 9 +
.../tinymce/plugins/fullscreen/plugin.js | 1192 +
.../tinymce/plugins/fullscreen/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/help/plugin.js | 908 +
.../tinymce/plugins/help/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/hr/plugin.js | 48 +
.../tinymce/tinymce/plugins/hr/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/image/plugin.js | 2519 ++
.../tinymce/plugins/image/plugin.min.js | 9 +
.../tinymce/plugins/imagetools/plugin.js | 1718 +
.../tinymce/plugins/imagetools/plugin.min.js | 9 +
.../tinymce/plugins/importcss/plugin.js | 407 +
.../tinymce/plugins/importcss/plugin.min.js | 9 +
.../tinymce/plugins/indent2em/plugin.js | 47 +
.../tinymce/plugins/indent2em/plugin.min.js | 47 +
.../tinymce/plugins/insertdatetime/plugin.js | 198 +
.../plugins/insertdatetime/plugin.min.js | 9 +
.../tinymce/plugins/legacyoutput/plugin.js | 184 +
.../plugins/legacyoutput/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/link/plugin.js | 1842 +
.../tinymce/plugins/link/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/lists/plugin.js | 2185 ++
.../tinymce/plugins/lists/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/media/plugin.js | 1388 +
.../tinymce/plugins/media/plugin.min.js | 9 +
.../tinymce/plugins/nonbreaking/plugin.js | 109 +
.../tinymce/plugins/nonbreaking/plugin.min.js | 9 +
.../tinymce/plugins/noneditable/plugin.js | 124 +
.../tinymce/plugins/noneditable/plugin.min.js | 9 +
.../tinymce/plugins/pagebreak/plugin.js | 119 +
.../tinymce/plugins/pagebreak/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/paste/plugin.js | 2400 ++
.../tinymce/plugins/paste/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/preview/plugin.js | 126 +
.../tinymce/plugins/preview/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/print/plugin.js | 55 +
.../tinymce/plugins/print/plugin.min.js | 9 +
.../tinymce/plugins/quickbars/plugin.js | 883 +
.../tinymce/plugins/quickbars/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/save/plugin.js | 131 +
.../tinymce/plugins/save/plugin.min.js | 9 +
.../tinymce/plugins/searchreplace/plugin.js | 872 +
.../plugins/searchreplace/plugin.min.js | 9 +
.../tinymce/plugins/spellchecker/plugin.js | 825 +
.../plugins/spellchecker/plugin.min.js | 9 +
.../tinymce/plugins/tabfocus/plugin.js | 130 +
.../tinymce/plugins/tabfocus/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/table/plugin.js | 9478 +++++
.../tinymce/plugins/table/plugin.min.js | 9 +
.../tinymce/plugins/template/plugin.js | 598 +
.../tinymce/plugins/template/plugin.min.js | 9 +
.../tinymce/plugins/textcolor/plugin.js | 22 +
.../tinymce/plugins/textcolor/plugin.min.js | 9 +
.../tinymce/plugins/textpattern/plugin.js | 1417 +
.../tinymce/plugins/textpattern/plugin.min.js | 9 +
.../tinymce/tinymce/plugins/toc/plugin.js | 249 +
.../tinymce/tinymce/plugins/toc/plugin.min.js | 9 +
.../tinymce/plugins/visualblocks/plugin.js | 116 +
.../plugins/visualblocks/plugin.min.js | 9 +
.../tinymce/plugins/visualchars/plugin.js | 571 +
.../tinymce/plugins/visualchars/plugin.min.js | 9 +
.../tinymce/plugins/wordcount/plugin.js | 495 +
.../tinymce/plugins/wordcount/plugin.min.js | 9 +
.../front/modules/tinymce/tinymce/readme.md | 77 +
.../tinymce/skins/content/dark/content.css | 59 +
.../skins/content/dark/content.min.css | 8 +
.../skins/content/dark/content.min.css.map | 1 +
.../tinymce/skins/content/default/content.css | 49 +
.../skins/content/default/content.min.css | 8 +
.../skins/content/default/content.min.css.map | 1 +
.../skins/content/document/content.css | 53 +
.../skins/content/document/content.min.css | 8 +
.../content/document/content.min.css.map | 1 +
.../tinymce/skins/content/writer/content.css | 50 +
.../skins/content/writer/content.min.css | 8 +
.../skins/content/writer/content.min.css.map | 1 +
.../tinymce/skins/ui/oxide-dark/content.css | 596 +
.../skins/ui/oxide-dark/content.inline.css | 608 +
.../ui/oxide-dark/content.inline.min.css | 8 +
.../ui/oxide-dark/content.inline.min.css.map | 1 +
.../skins/ui/oxide-dark/content.min.css | 8 +
.../skins/ui/oxide-dark/content.min.css.map | 1 +
.../skins/ui/oxide-dark/content.mobile.css | 29 +
.../ui/oxide-dark/content.mobile.min.css | 8 +
.../ui/oxide-dark/content.mobile.min.css.map | 1 +
.../ui/oxide-dark/fonts/tinymce-mobile.woff | Bin 0 -> 4624 bytes
.../tinymce/skins/ui/oxide-dark/skin.css | 2884 ++
.../tinymce/skins/ui/oxide-dark/skin.min.css | 8 +
.../skins/ui/oxide-dark/skin.min.css.map | 1 +
.../skins/ui/oxide-dark/skin.mobile.css | 673 +
.../skins/ui/oxide-dark/skin.mobile.min.css | 8 +
.../ui/oxide-dark/skin.mobile.min.css.map | 1 +
.../tinymce/skins/ui/oxide/content.css | 614 +
.../tinymce/skins/ui/oxide/content.inline.css | 608 +
.../skins/ui/oxide/content.inline.min.css | 8 +
.../skins/ui/oxide/content.inline.min.css.map | 1 +
.../tinymce/skins/ui/oxide/content.min.css | 8 +
.../skins/ui/oxide/content.min.css.map | 1 +
.../tinymce/skins/ui/oxide/content.mobile.css | 29 +
.../skins/ui/oxide/content.mobile.min.css | 8 +
.../skins/ui/oxide/content.mobile.min.css.map | 1 +
.../skins/ui/oxide/fonts/tinymce-mobile.woff | Bin 0 -> 4624 bytes
.../tinymce/tinymce/skins/ui/oxide/skin.css | 2884 ++
.../tinymce/skins/ui/oxide/skin.min.css | 8 +
.../tinymce/skins/ui/oxide/skin.min.css.map | 1 +
.../tinymce/skins/ui/oxide/skin.mobile.css | 673 +
.../skins/ui/oxide/skin.mobile.min.css | 8 +
.../skins/ui/oxide/skin.mobile.min.css.map | 1 +
.../tinymce/tinymce/themes/mobile/theme.js | 13809 +++++++
.../tinymce/themes/mobile/theme.min.js | 9 +
.../tinymce/tinymce/themes/silver/theme.js | 31251 ++++++++++++++++
.../tinymce/themes/silver/theme.min.js | 9 +
.../front/modules/tinymce/tinymce/tinymce.js | 28598 ++++++++++++++
.../modules/tinymce/tinymce/tinymce.min.js | 9 +
.../templates/front/pages/config/add.html | 411 +
.../templates/front/pages/config/detail.html | 396 +
.../templates/front/pages/config/list.html | 436 +
.../front/pages/gerenjianli/add.html | 698 +
.../front/pages/gerenjianli/detail.html | 544 +
.../front/pages/gerenjianli/list.html | 452 +
.../templates/front/pages/gongsi/add.html | 512 +
.../templates/front/pages/gongsi/center.html | 541 +
.../templates/front/pages/gongsi/detail.html | 423 +
.../templates/front/pages/gongsi/list.html | 438 +
.../front/pages/gongsi/register.html | 180 +
.../front/pages/gongsixinxi/add.html | 676 +
.../front/pages/gongsixinxi/detail.html | 648 +
.../front/pages/gongsixinxi/list.html | 445 +
.../templates/front/pages/home/home.html | 1386 +
.../templates/front/pages/keshihua/add.html | 347 +
.../front/pages/keshihua/detail.html | 396 +
.../templates/front/pages/keshihua/list.html | 436 +
.../templates/front/pages/login/login.html | 325 +
.../front/pages/mianshijieguo/add.html | 469 +
.../front/pages/mianshijieguo/detail.html | 438 +
.../front/pages/mianshijieguo/list.html | 450 +
.../front/pages/mianshiyaoqing/add.html | 460 +
.../front/pages/mianshiyaoqing/detail.html | 449 +
.../front/pages/mianshiyaoqing/list.html | 451 +
.../templates/front/pages/qiuzhizhe/add.html | 520 +
.../front/pages/qiuzhizhe/center.html | 554 +
.../front/pages/qiuzhizhe/detail.html | 417 +
.../templates/front/pages/qiuzhizhe/list.html | 447 +
.../front/pages/qiuzhizhe/register.html | 186 +
.../templates/front/pages/storeup/list.html | 233 +
.../front/pages/tongzhigonggao/add.html | 516 +
.../front/pages/tongzhigonggao/detail.html | 472 +
.../front/pages/tongzhigonggao/list.html | 438 +
.../front/pages/toudijianli/add.html | 579 +
.../front/pages/toudijianli/detail.html | 446 +
.../front/pages/toudijianli/list.html | 446 +
.../templates/front/pages/users/add.html | 378 +
.../templates/front/pages/users/detail.html | 408 +
.../templates/front/pages/users/list.html | 436 +
.../front/pages/zhaopinxinxi/add.html | 768 +
.../front/pages/zhaopinxinxi/detail.html | 688 +
.../front/pages/zhaopinxinxi/list.html | 445 +
.../templates/front/xznstatic/css/common.css | 396 +
.../templates/front/xznstatic/css/login.css | 132 +
.../templates/front/xznstatic/css/public.css | 498 +
.../templates/front/xznstatic/css/style.css | 498 +
.../front/xznstatic/img/162237296.jpg | Bin 0 -> 293549 bytes
.../front/xznstatic/img/162240878.jpg | Bin 0 -> 277686 bytes
.../templates/front/xznstatic/img/19.jpg | Bin 0 -> 74458 bytes
.../front/xznstatic/img/1_092ZZ2503138.jpg | Bin 0 -> 13384 bytes
.../templates/front/xznstatic/img/20.jpg | Bin 0 -> 676597 bytes
.../front/xznstatic/img/index_24.gif | Bin 0 -> 12128 bytes
.../front/xznstatic/img/index_35.gif | Bin 0 -> 28357 bytes
.../front/xznstatic/img/index_41.gif | Bin 0 -> 1373 bytes
.../front/xznstatic/img/index_44.gif | Bin 0 -> 1355 bytes
.../templates/front/xznstatic/img/logo.png | Bin 0 -> 3733 bytes
.../front/xznstatic/img/news_list_time.jpg | Bin 0 -> 1249 bytes
.../front/xznstatic/img/service_btn.png | Bin 0 -> 1351 bytes
.../front/xznstatic/img/service_img.png | Bin 0 -> 8180 bytes
.../front/xznstatic/img/service_title.png | Bin 0 -> 3626 bytes
.../templates/front/xznstatic/js/index.js | 8 +
.../front/xznstatic/js/jquery-1.11.3.min.js | 5 +
.../xznstatic/js/jquery.SuperSlide.2.1.1.js | 15 +
django3qu6u/util/__init__.py | 2 +
.../util/__pycache__/__init__.cpython-37.pyc | Bin 0 -> 142 bytes
.../util/__pycache__/auth.cpython-37.pyc | Bin 0 -> 2009 bytes
.../__pycache__/baidubce_api.cpython-37.pyc | Bin 0 -> 2014 bytes
.../util/__pycache__/codes.cpython-37.pyc | Bin 0 -> 743 bytes
.../util/__pycache__/common.cpython-37.pyc | Bin 0 -> 476 bytes
.../__pycache__/configread.cpython-37.pyc | Bin 0 -> 617 bytes
.../util/__pycache__/locate.cpython-37.pyc | Bin 0 -> 642 bytes
.../util/__pycache__/message.cpython-37.pyc | Bin 0 -> 1044 bytes
.../util/alipay_key/alipay_public_2048.txt | 3 +
.../util/alipay_key/app_private_2048.txt | 3 +
django3qu6u/util/auth.py | 71 +
django3qu6u/util/baidubce_api.py | 63 +
django3qu6u/util/codes.py | 27 +
django3qu6u/util/common.py | 9 +
django3qu6u/util/configread.py | 18 +
django3qu6u/util/create_db.sql | 1 +
django3qu6u/util/locate.py | 17 +
django3qu6u/util/message.py | 27 +
django3qu6u/util/sqlinit.py | 30 +
django3qu6u/xmiddleware/__init__.py | 2 +
.../__pycache__/__init__.cpython-37.pyc | Bin 0 -> 149 bytes
.../__pycache__/xauth.cpython-37.pyc | Bin 0 -> 2074 bytes
.../__pycache__/xparam.cpython-37.pyc | Bin 0 -> 1539 bytes
django3qu6u/xmiddleware/xauth.py | 104 +
django3qu6u/xmiddleware/xparam.py | 52 +
django3qu6u/安装.bat | 2 +
django3qu6u/运行.bat | 2 +
736 files changed, 221077 insertions(+)
create mode 100644 django3qu6u/.idea/.gitignore
create mode 100644 django3qu6u/.idea/django3qu6u.iml
create mode 100644 django3qu6u/.idea/inspectionProfiles/Project_Default.xml
create mode 100644 django3qu6u/.idea/inspectionProfiles/profiles_settings.xml
create mode 100644 django3qu6u/.idea/misc.xml
create mode 100644 django3qu6u/.idea/modules.xml
create mode 100644 django3qu6u/config.ini
create mode 100644 django3qu6u/db/django3qu6u.sql
create mode 100644 django3qu6u/dj2/__init__.py
create mode 100644 django3qu6u/dj2/__pycache__/__init__.cpython-37.pyc
create mode 100644 django3qu6u/dj2/__pycache__/settings.cpython-37.pyc
create mode 100644 django3qu6u/dj2/__pycache__/urls.cpython-37.pyc
create mode 100644 django3qu6u/dj2/__pycache__/views.cpython-37.pyc
create mode 100644 django3qu6u/dj2/__pycache__/wsgi.cpython-37.pyc
create mode 100644 django3qu6u/dj2/settings.py
create mode 100644 django3qu6u/dj2/urls.py
create mode 100644 django3qu6u/dj2/views.py
create mode 100644 django3qu6u/dj2/wsgi.py
create mode 100644 django3qu6u/django开发文档.docx
create mode 100644 django3qu6u/init.py
create mode 100644 django3qu6u/main/Gerenjianli_v.py
create mode 100644 django3qu6u/main/Gongsi_v.py
create mode 100644 django3qu6u/main/Gongsixinxi_v.py
create mode 100644 django3qu6u/main/Keshihua_v.py
create mode 100644 django3qu6u/main/Mianshijieguo_v.py
create mode 100644 django3qu6u/main/Mianshiyaoqing_v.py
create mode 100644 django3qu6u/main/Qiuzhizhe_v.py
create mode 100644 django3qu6u/main/Storeup_v.py
create mode 100644 django3qu6u/main/Tongzhigonggao_v.py
create mode 100644 django3qu6u/main/Toudijianli_v.py
create mode 100644 django3qu6u/main/Zhaopinxinxi_v.py
create mode 100644 django3qu6u/main/__init__.py
create mode 100644 django3qu6u/main/__pycache__/Gerenjianli_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Gongsi_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Gongsixinxi_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Keshihua_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Mianshijieguo_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Mianshiyaoqing_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Qiuzhizhe_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Storeup_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Tongzhigonggao_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Toudijianli_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/Zhaopinxinxi_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/__init__.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/admin.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/apps.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/config_model.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/config_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/model.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/models.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/schema_v.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/urls.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/users_model.cpython-37.pyc
create mode 100644 django3qu6u/main/__pycache__/users_v.cpython-37.pyc
create mode 100644 django3qu6u/main/admin.py
create mode 100644 django3qu6u/main/apps.py
create mode 100644 django3qu6u/main/config_model.py
create mode 100644 django3qu6u/main/config_v.py
create mode 100644 django3qu6u/main/model.py
create mode 100644 django3qu6u/main/models.py
create mode 100644 django3qu6u/main/schema_v.py
create mode 100644 django3qu6u/main/tests.py
create mode 100644 django3qu6u/main/urls.py
create mode 100644 django3qu6u/main/users_model.py
create mode 100644 django3qu6u/main/users_v.py
create mode 100644 django3qu6u/main/views.py
create mode 100644 django3qu6u/manage.py
create mode 100644 django3qu6u/requirements.txt
create mode 100644 django3qu6u/templates/front/admin/1-install.bat
create mode 100644 django3qu6u/templates/front/admin/2-run.bat
create mode 100644 django3qu6u/templates/front/admin/3-build.bat
create mode 100644 django3qu6u/templates/front/admin/babel.config.js
create mode 100644 django3qu6u/templates/front/admin/dist/css/app.fee01443.css
create mode 100644 django3qu6u/templates/front/admin/dist/css/chunk-vendors.6d894868.css
create mode 100644 django3qu6u/templates/front/admin/dist/favicon.ico
create mode 100644 django3qu6u/templates/front/admin/dist/fonts/element-icons.535877f5.woff
create mode 100644 django3qu6u/templates/front/admin/dist/fonts/element-icons.732389de.ttf
create mode 100644 django3qu6u/templates/front/admin/dist/img/404.3648f234.png
create mode 100644 django3qu6u/templates/front/admin/dist/img/zhongguo.20798bfa.png
create mode 100644 django3qu6u/templates/front/admin/dist/index.html
create mode 100644 django3qu6u/templates/front/admin/dist/js/app.3993825f.js
create mode 100644 django3qu6u/templates/front/admin/dist/js/app.3993825f.js.map
create mode 100644 django3qu6u/templates/front/admin/dist/js/chunk-vendors.7e405093.js
create mode 100644 django3qu6u/templates/front/admin/dist/js/chunk-vendors.7e405093.js.map
create mode 100644 django3qu6u/templates/front/admin/package-lock.json
create mode 100644 django3qu6u/templates/front/admin/package.json
create mode 100644 django3qu6u/templates/front/admin/public/favicon.ico
create mode 100644 django3qu6u/templates/front/admin/public/index.html
create mode 100644 django3qu6u/templates/front/admin/src/App.vue
create mode 100644 django3qu6u/templates/front/admin/src/assets/css/canvas-bg-1.css
create mode 100644 django3qu6u/templates/front/admin/src/assets/css/canvas-bg-2.css
create mode 100644 django3qu6u/templates/front/admin/src/assets/css/canvas-bg-3.css
create mode 100644 django3qu6u/templates/front/admin/src/assets/css/element-variables.scss
create mode 100644 django3qu6u/templates/front/admin/src/assets/css/style.scss
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/404.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/avator.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/bg.jpg
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/captcha.jpg
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/login.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/logo.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/password.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/role.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/test/jianshe.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/test/jiaotong.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/test/nongye.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/test/weixin.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/test/zhifubao.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/test/zhongguo.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/img/username.png
create mode 100644 django3qu6u/templates/front/admin/src/assets/js/canvas-bg-1.js
create mode 100644 django3qu6u/templates/front/admin/src/assets/js/canvas-bg-2.js
create mode 100644 django3qu6u/templates/front/admin/src/assets/js/canvas-bg-3.js
create mode 100644 django3qu6u/templates/front/admin/src/assets/js/canvas-bg-4.js
create mode 100644 django3qu6u/templates/front/admin/src/assets/js/canvas-bg-5.js
create mode 100644 django3qu6u/templates/front/admin/src/components/SvgIcon/index.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/common/BreadCrumbs.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/common/BreadCrumbs.vue.bak
create mode 100644 django3qu6u/templates/front/admin/src/components/common/Editor.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/common/ExcelFileUpload.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/common/FileUpload.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/home/HomeCard.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/home/HomeChart.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/home/HomeComment.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/home/HomeProgress.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexAside.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexAsideStatic.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexAsideStatic.vue.bak
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexAsideSub.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexHeader.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexHeader.vue.bak
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexMain.vue
create mode 100644 django3qu6u/templates/front/admin/src/components/index/IndexMain.vue.bak
create mode 100644 django3qu6u/templates/front/admin/src/icons/index.js
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/404.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/articleEdit.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/banner.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/bug.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/build.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/cfg.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/channel.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/chart.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/clipboard.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/code.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/component.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/contacts.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/dashboard.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/date.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/dept.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/dict.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/documentation.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/download.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/drag.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/druid.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/edit.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/education.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/email.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/excel.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/exit-fullscreen.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/eye-open.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/file.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/form.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/fullscreen.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/icon.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/international.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/job.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/language.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/link.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/list.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/lock.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/log.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/logininfor.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/menu.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/message.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/money.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/monitor.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/nested.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/nested0.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/online.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/operation.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/password.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/password0.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/pdf.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/people.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/peoples.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/phone.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/post.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/qq.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/search.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/sender.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/server.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/shopping.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/shoppingCard.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/size.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/skill.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/star.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/AI.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/AIDeviceLayout.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/EIM.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/VIP.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/agricultureRegister.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/area.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/base.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/batch.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/board.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/board1.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/boardConfig.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/cfg.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/code.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/company.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/crop.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/crops.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/dashboard.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/dataAbnormal.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/dataLack.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/dept.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/device.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/deviceMonitorData.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/dict.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/diseasesinsect.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/diseasesinsects.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/documentation.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/email.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/environmental.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/eye-open.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/farmingProject.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/finance.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/financeBudget.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/financeReality.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/firm.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/firms.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/harvestBatch.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/harvestDetection.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/harvestManage.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/harvestWorks.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/heavyMetalDetection.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/home.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/inspection.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/internet.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/internetActive.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/log.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/mainSystem.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/mainSystemActive.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/menu.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/monitorEquipment.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/news.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/order.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/password.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/peoples.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/pest.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/pestActive.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/pesticideResidue.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/pests.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/phone.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/plant.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/plants.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/plantsActive.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/residual.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/retroactiveCoding.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/scheme.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/source.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/sourceActive.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/system.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/task.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/tempFarm.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/traceability.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/traceabilityList.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/traceabilityStyle.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/user.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/user0.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/validCode.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/video.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/videoEquipment.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/videoKey.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/vipCustomized.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/warnings.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/workOrder.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/┐┤░х╣▄└э.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/svg/╓╪╜Ё╩Ї╝ь▓т╣▄└э.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/swagger.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/system.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/tab.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/table.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/table0.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/task.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/template.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/theme.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/tool.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/tree-table.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/tree.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/user.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/user0.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/validCode.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/wechat.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svg/zip.svg
create mode 100644 django3qu6u/templates/front/admin/src/icons/svgo.yml
create mode 100644 django3qu6u/templates/front/admin/src/main.js
create mode 100644 django3qu6u/templates/front/admin/src/router/router-static.js
create mode 100644 django3qu6u/templates/front/admin/src/store/store.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/api.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/base.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/http.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/i18n.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/menu.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/storage.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/utils.js
create mode 100644 django3qu6u/templates/front/admin/src/utils/validate.js
create mode 100644 django3qu6u/templates/front/admin/src/views/404.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/center.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/home.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/index.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/login.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/config/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/config/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/gerenjianli/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/gerenjianli/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/gongsi/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/gongsi/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/gongsixinxi/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/gongsixinxi/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/keshihua/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/keshihua/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/mianshijieguo/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/mianshijieguo/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/mianshiyaoqing/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/mianshiyaoqing/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/qiuzhizhe/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/qiuzhizhe/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/storeup/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/storeup/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/tongzhigonggao/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/tongzhigonggao/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/toudijianli/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/toudijianli/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/users/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/users/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/zhaopinxinxi/add-or-update.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/modules/zhaopinxinxi/list.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/pay.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/register.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/update-password.vue
create mode 100644 django3qu6u/templates/front/admin/src/views/update-password.vue.bak
create mode 100644 django3qu6u/templates/front/admin/vue.config.js
create mode 100644 django3qu6u/templates/front/css/bootstrap.min.css
create mode 100644 django3qu6u/templates/front/css/canvas-bg-1.css
create mode 100644 django3qu6u/templates/front/css/canvas-bg-2.css
create mode 100644 django3qu6u/templates/front/css/canvas-bg-3.css
create mode 100644 django3qu6u/templates/front/css/canvas-bg-4.css
create mode 100644 django3qu6u/templates/front/css/canvas-bg-5.css
create mode 100644 django3qu6u/templates/front/css/common.css
create mode 100644 django3qu6u/templates/front/css/style.css
create mode 100644 django3qu6u/templates/front/css/swiper.min.css
create mode 100644 django3qu6u/templates/front/css/theme.css
create mode 100644 django3qu6u/templates/front/elementui/elementui.css
create mode 100644 django3qu6u/templates/front/elementui/elementui.js
create mode 100644 django3qu6u/templates/front/elementui/fonts/element-icons.ttf
create mode 100644 django3qu6u/templates/front/elementui/fonts/element-icons.woff
create mode 100644 django3qu6u/templates/front/img/avator.png
create mode 100644 django3qu6u/templates/front/img/banner.jpg
create mode 100644 django3qu6u/templates/front/img/jianshe.png
create mode 100644 django3qu6u/templates/front/img/jiaotong.png
create mode 100644 django3qu6u/templates/front/img/line.jpg
create mode 100644 django3qu6u/templates/front/img/nongye.png
create mode 100644 django3qu6u/templates/front/img/now.png
create mode 100644 django3qu6u/templates/front/img/seckilling.jpg
create mode 100644 django3qu6u/templates/front/img/select.png
create mode 100644 django3qu6u/templates/front/img/unselect.png
create mode 100644 django3qu6u/templates/front/img/weixin.png
create mode 100644 django3qu6u/templates/front/img/yuan.png
create mode 100644 django3qu6u/templates/front/img/zhifubao.png
create mode 100644 django3qu6u/templates/front/img/zhongguo.png
create mode 100644 django3qu6u/templates/front/js/bootstrap.AMapPositionPicker.js
create mode 100644 django3qu6u/templates/front/js/bootstrap.min.js
create mode 100644 django3qu6u/templates/front/js/canvas-bg-web-1.js
create mode 100644 django3qu6u/templates/front/js/canvas-bg-web-2.js
create mode 100644 django3qu6u/templates/front/js/canvas-bg-web-3.js
create mode 100644 django3qu6u/templates/front/js/canvas-bg-web-4.js
create mode 100644 django3qu6u/templates/front/js/canvas-bg-web-5.js
create mode 100644 django3qu6u/templates/front/js/config.js
create mode 100644 django3qu6u/templates/front/js/jquery.js
create mode 100644 django3qu6u/templates/front/js/swiper.min.js
create mode 100644 django3qu6u/templates/front/js/utils.js
create mode 100644 django3qu6u/templates/front/js/validate.js
create mode 100644 django3qu6u/templates/front/js/vue.js
create mode 100644 django3qu6u/templates/front/layui/css/layui.css
create mode 100644 django3qu6u/templates/front/layui/css/layui.mobile.css
create mode 100644 django3qu6u/templates/front/layui/css/modules/code.css
create mode 100644 django3qu6u/templates/front/layui/css/modules/laydate/default/laydate.css
create mode 100644 django3qu6u/templates/front/layui/css/modules/layer/default/icon-ext.png
create mode 100644 django3qu6u/templates/front/layui/css/modules/layer/default/icon.png
create mode 100644 django3qu6u/templates/front/layui/css/modules/layer/default/layer.css
create mode 100644 django3qu6u/templates/front/layui/css/modules/layer/default/loading-0.gif
create mode 100644 django3qu6u/templates/front/layui/css/modules/layer/default/loading-1.gif
create mode 100644 django3qu6u/templates/front/layui/css/modules/layer/default/loading-2.gif
create mode 100644 django3qu6u/templates/front/layui/font/iconfont.eot
create mode 100644 django3qu6u/templates/front/layui/font/iconfont.svg
create mode 100644 django3qu6u/templates/front/layui/font/iconfont.ttf
create mode 100644 django3qu6u/templates/front/layui/font/iconfont.woff
create mode 100644 django3qu6u/templates/front/layui/font/iconfont.woff2
create mode 100644 django3qu6u/templates/front/layui/images/face/0.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/1.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/10.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/11.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/12.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/13.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/14.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/15.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/16.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/17.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/18.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/19.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/2.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/20.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/21.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/22.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/23.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/24.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/25.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/26.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/27.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/28.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/29.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/3.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/30.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/31.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/32.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/33.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/34.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/35.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/36.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/37.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/38.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/39.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/4.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/40.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/41.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/42.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/43.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/44.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/45.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/46.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/47.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/48.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/49.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/5.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/50.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/51.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/52.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/53.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/54.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/55.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/56.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/57.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/58.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/59.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/6.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/60.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/61.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/62.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/63.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/64.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/65.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/66.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/67.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/68.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/69.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/7.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/70.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/71.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/8.gif
create mode 100644 django3qu6u/templates/front/layui/images/face/9.gif
create mode 100644 django3qu6u/templates/front/layui/lay/modules/carousel.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/code.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/colorpicker.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/element.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/flow.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/form.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/jquery.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/laydate.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/layedit.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/layer.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/laypage.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/laytpl.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/mobile.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/rate.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/slider.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/table.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/transfer.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/tree.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/upload.js
create mode 100644 django3qu6u/templates/front/layui/lay/modules/util.js
create mode 100644 django3qu6u/templates/front/layui/layui.all.js
create mode 100644 django3qu6u/templates/front/layui/layui.js
create mode 100644 django3qu6u/templates/front/modules/config.js
create mode 100644 django3qu6u/templates/front/modules/http/http.js
create mode 100644 django3qu6u/templates/front/modules/layarea/layarea.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/index.html
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/jquery.tinymce.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/langs/readme.md
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/langs/zh_CN.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/license.txt
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/advlist/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/advlist/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/anchor/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/anchor/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/autolink/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/autolink/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/autoresize/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/autoresize/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/autosave/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/autosave/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/bbcode/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/bbcode/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/charmap/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/charmap/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/code/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/code/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/codesample/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/codesample/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/colorpicker/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/colorpicker/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/contextmenu/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/contextmenu/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/directionality/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/directionality/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/emoticons/js/emojis.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/emoticons/js/emojis.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/emoticons/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/emoticons/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/fullpage/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/fullpage/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/fullscreen/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/fullscreen/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/help/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/help/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/hr/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/hr/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/image/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/image/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/imagetools/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/imagetools/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/importcss/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/importcss/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/indent2em/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/indent2em/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/insertdatetime/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/insertdatetime/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/legacyoutput/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/legacyoutput/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/link/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/link/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/lists/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/lists/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/media/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/media/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/nonbreaking/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/nonbreaking/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/noneditable/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/noneditable/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/pagebreak/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/pagebreak/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/paste/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/paste/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/preview/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/preview/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/print/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/print/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/quickbars/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/quickbars/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/save/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/save/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/searchreplace/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/searchreplace/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/spellchecker/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/spellchecker/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/tabfocus/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/tabfocus/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/table/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/table/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/template/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/template/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/textcolor/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/textcolor/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/textpattern/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/textpattern/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/toc/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/toc/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/visualblocks/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/visualblocks/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/visualchars/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/visualchars/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/wordcount/plugin.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/plugins/wordcount/plugin.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/readme.md
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/dark/content.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/dark/content.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/dark/content.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/default/content.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/default/content.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/default/content.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/document/content.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/document/content.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/document/content.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/writer/content.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/writer/content.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/content/writer/content.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.inline.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.inline.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.inline.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.mobile.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.mobile.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/skin.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/skin.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/skin.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/skin.mobile.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/skin.mobile.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.inline.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.inline.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.inline.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.mobile.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.mobile.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/content.mobile.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/skin.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/skin.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/skin.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/skin.mobile.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/skin.mobile.min.css
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/skins/ui/oxide/skin.mobile.min.css.map
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/themes/mobile/theme.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/themes/mobile/theme.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/themes/silver/theme.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/themes/silver/theme.min.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/tinymce.js
create mode 100644 django3qu6u/templates/front/modules/tinymce/tinymce/tinymce.min.js
create mode 100644 django3qu6u/templates/front/pages/config/add.html
create mode 100644 django3qu6u/templates/front/pages/config/detail.html
create mode 100644 django3qu6u/templates/front/pages/config/list.html
create mode 100644 django3qu6u/templates/front/pages/gerenjianli/add.html
create mode 100644 django3qu6u/templates/front/pages/gerenjianli/detail.html
create mode 100644 django3qu6u/templates/front/pages/gerenjianli/list.html
create mode 100644 django3qu6u/templates/front/pages/gongsi/add.html
create mode 100644 django3qu6u/templates/front/pages/gongsi/center.html
create mode 100644 django3qu6u/templates/front/pages/gongsi/detail.html
create mode 100644 django3qu6u/templates/front/pages/gongsi/list.html
create mode 100644 django3qu6u/templates/front/pages/gongsi/register.html
create mode 100644 django3qu6u/templates/front/pages/gongsixinxi/add.html
create mode 100644 django3qu6u/templates/front/pages/gongsixinxi/detail.html
create mode 100644 django3qu6u/templates/front/pages/gongsixinxi/list.html
create mode 100644 django3qu6u/templates/front/pages/home/home.html
create mode 100644 django3qu6u/templates/front/pages/keshihua/add.html
create mode 100644 django3qu6u/templates/front/pages/keshihua/detail.html
create mode 100644 django3qu6u/templates/front/pages/keshihua/list.html
create mode 100644 django3qu6u/templates/front/pages/login/login.html
create mode 100644 django3qu6u/templates/front/pages/mianshijieguo/add.html
create mode 100644 django3qu6u/templates/front/pages/mianshijieguo/detail.html
create mode 100644 django3qu6u/templates/front/pages/mianshijieguo/list.html
create mode 100644 django3qu6u/templates/front/pages/mianshiyaoqing/add.html
create mode 100644 django3qu6u/templates/front/pages/mianshiyaoqing/detail.html
create mode 100644 django3qu6u/templates/front/pages/mianshiyaoqing/list.html
create mode 100644 django3qu6u/templates/front/pages/qiuzhizhe/add.html
create mode 100644 django3qu6u/templates/front/pages/qiuzhizhe/center.html
create mode 100644 django3qu6u/templates/front/pages/qiuzhizhe/detail.html
create mode 100644 django3qu6u/templates/front/pages/qiuzhizhe/list.html
create mode 100644 django3qu6u/templates/front/pages/qiuzhizhe/register.html
create mode 100644 django3qu6u/templates/front/pages/storeup/list.html
create mode 100644 django3qu6u/templates/front/pages/tongzhigonggao/add.html
create mode 100644 django3qu6u/templates/front/pages/tongzhigonggao/detail.html
create mode 100644 django3qu6u/templates/front/pages/tongzhigonggao/list.html
create mode 100644 django3qu6u/templates/front/pages/toudijianli/add.html
create mode 100644 django3qu6u/templates/front/pages/toudijianli/detail.html
create mode 100644 django3qu6u/templates/front/pages/toudijianli/list.html
create mode 100644 django3qu6u/templates/front/pages/users/add.html
create mode 100644 django3qu6u/templates/front/pages/users/detail.html
create mode 100644 django3qu6u/templates/front/pages/users/list.html
create mode 100644 django3qu6u/templates/front/pages/zhaopinxinxi/add.html
create mode 100644 django3qu6u/templates/front/pages/zhaopinxinxi/detail.html
create mode 100644 django3qu6u/templates/front/pages/zhaopinxinxi/list.html
create mode 100644 django3qu6u/templates/front/xznstatic/css/common.css
create mode 100644 django3qu6u/templates/front/xznstatic/css/login.css
create mode 100644 django3qu6u/templates/front/xznstatic/css/public.css
create mode 100644 django3qu6u/templates/front/xznstatic/css/style.css
create mode 100644 django3qu6u/templates/front/xznstatic/img/162237296.jpg
create mode 100644 django3qu6u/templates/front/xznstatic/img/162240878.jpg
create mode 100644 django3qu6u/templates/front/xznstatic/img/19.jpg
create mode 100644 django3qu6u/templates/front/xznstatic/img/1_092ZZ2503138.jpg
create mode 100644 django3qu6u/templates/front/xznstatic/img/20.jpg
create mode 100644 django3qu6u/templates/front/xznstatic/img/index_24.gif
create mode 100644 django3qu6u/templates/front/xznstatic/img/index_35.gif
create mode 100644 django3qu6u/templates/front/xznstatic/img/index_41.gif
create mode 100644 django3qu6u/templates/front/xznstatic/img/index_44.gif
create mode 100644 django3qu6u/templates/front/xznstatic/img/logo.png
create mode 100644 django3qu6u/templates/front/xznstatic/img/news_list_time.jpg
create mode 100644 django3qu6u/templates/front/xznstatic/img/service_btn.png
create mode 100644 django3qu6u/templates/front/xznstatic/img/service_img.png
create mode 100644 django3qu6u/templates/front/xznstatic/img/service_title.png
create mode 100644 django3qu6u/templates/front/xznstatic/js/index.js
create mode 100644 django3qu6u/templates/front/xznstatic/js/jquery-1.11.3.min.js
create mode 100644 django3qu6u/templates/front/xznstatic/js/jquery.SuperSlide.2.1.1.js
create mode 100644 django3qu6u/util/__init__.py
create mode 100644 django3qu6u/util/__pycache__/__init__.cpython-37.pyc
create mode 100644 django3qu6u/util/__pycache__/auth.cpython-37.pyc
create mode 100644 django3qu6u/util/__pycache__/baidubce_api.cpython-37.pyc
create mode 100644 django3qu6u/util/__pycache__/codes.cpython-37.pyc
create mode 100644 django3qu6u/util/__pycache__/common.cpython-37.pyc
create mode 100644 django3qu6u/util/__pycache__/configread.cpython-37.pyc
create mode 100644 django3qu6u/util/__pycache__/locate.cpython-37.pyc
create mode 100644 django3qu6u/util/__pycache__/message.cpython-37.pyc
create mode 100644 django3qu6u/util/alipay_key/alipay_public_2048.txt
create mode 100644 django3qu6u/util/alipay_key/app_private_2048.txt
create mode 100644 django3qu6u/util/auth.py
create mode 100644 django3qu6u/util/baidubce_api.py
create mode 100644 django3qu6u/util/codes.py
create mode 100644 django3qu6u/util/common.py
create mode 100644 django3qu6u/util/configread.py
create mode 100644 django3qu6u/util/create_db.sql
create mode 100644 django3qu6u/util/locate.py
create mode 100644 django3qu6u/util/message.py
create mode 100644 django3qu6u/util/sqlinit.py
create mode 100644 django3qu6u/xmiddleware/__init__.py
create mode 100644 django3qu6u/xmiddleware/__pycache__/__init__.cpython-37.pyc
create mode 100644 django3qu6u/xmiddleware/__pycache__/xauth.cpython-37.pyc
create mode 100644 django3qu6u/xmiddleware/__pycache__/xparam.cpython-37.pyc
create mode 100644 django3qu6u/xmiddleware/xauth.py
create mode 100644 django3qu6u/xmiddleware/xparam.py
create mode 100644 django3qu6u/安装.bat
create mode 100644 django3qu6u/运行.bat
diff --git a/django3qu6u/.idea/.gitignore b/django3qu6u/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/django3qu6u/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/django3qu6u/.idea/django3qu6u.iml b/django3qu6u/.idea/django3qu6u.iml
new file mode 100644
index 0000000..21c1625
--- /dev/null
+++ b/django3qu6u/.idea/django3qu6u.iml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/django3qu6u/.idea/inspectionProfiles/Project_Default.xml b/django3qu6u/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..7c4836f
--- /dev/null
+++ b/django3qu6u/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/django3qu6u/.idea/inspectionProfiles/profiles_settings.xml b/django3qu6u/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/django3qu6u/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/django3qu6u/.idea/misc.xml b/django3qu6u/.idea/misc.xml
new file mode 100644
index 0000000..efe5b00
--- /dev/null
+++ b/django3qu6u/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/django3qu6u/.idea/modules.xml b/django3qu6u/.idea/modules.xml
new file mode 100644
index 0000000..2b7a098
--- /dev/null
+++ b/django3qu6u/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/django3qu6u/config.ini b/django3qu6u/config.ini
new file mode 100644
index 0000000..2535fa5
--- /dev/null
+++ b/django3qu6u/config.ini
@@ -0,0 +1,9 @@
+[sql]
+;support two sql,mysql and mssql,choice one
+type = mysql
+host = 127.0.0.1
+port = 3306
+user = root
+passwd = 123456
+db = django3qu6u
+charset = utf8
diff --git a/django3qu6u/db/django3qu6u.sql b/django3qu6u/db/django3qu6u.sql
new file mode 100644
index 0000000..dd40461
--- /dev/null
+++ b/django3qu6u/db/django3qu6u.sql
@@ -0,0 +1,473 @@
+-- MySQL dump 10.13 Distrib 5.7.31, for Linux (x86_64)
+--
+-- Host: localhost Database: django3qu6u
+-- ------------------------------------------------------
+-- Server version 5.7.31
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Current Database: `django3qu6u`
+--
+
+/*!40000 DROP DATABASE IF EXISTS `django3qu6u`*/;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `django3qu6u` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
+
+USE `django3qu6u`;
+
+--
+-- Table structure for table `config`
+--
+
+DROP TABLE IF EXISTS `config`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `config` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(100) NOT NULL COMMENT '配置参数名称',
+ `value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `config`
+--
+
+LOCK TABLES `config` WRITE;
+/*!40000 ALTER TABLE `config` DISABLE KEYS */;
+INSERT INTO `config` VALUES (1,'picture1','upload/picture1.jpg'),(2,'picture2','upload/picture2.jpg'),(3,'picture3','upload/picture3.jpg');
+/*!40000 ALTER TABLE `config` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gerenjianli`
+--
+
+DROP TABLE IF EXISTS `gerenjianli`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gerenjianli` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `zhanghao` varchar(200) DEFAULT NULL COMMENT '账号',
+ `xingming` varchar(200) DEFAULT NULL COMMENT '姓名',
+ `xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
+ `shouji` varchar(200) DEFAULT NULL COMMENT '手机',
+ `zhaopian` varchar(200) DEFAULT NULL COMMENT '照片',
+ `zhuanye` varchar(200) NOT NULL COMMENT '专业',
+ `xueli` varchar(200) NOT NULL COMMENT '学历',
+ `xuexiao` varchar(200) NOT NULL COMMENT '学校',
+ `chushengriqi` date DEFAULT NULL COMMENT '出生日期',
+ `yingyushuiping` varchar(200) DEFAULT NULL COMMENT '英语水平',
+ `gongzuonianxian` varchar(200) DEFAULT NULL COMMENT '工作年限',
+ `juzhudizhi` varchar(200) DEFAULT NULL COMMENT '居住地址',
+ `gerenjineng` longtext COMMENT '个人技能',
+ `yixianggangwei` varchar(200) DEFAULT NULL COMMENT '意向岗位',
+ `yixiangfangxiang` varchar(200) DEFAULT NULL COMMENT '意向方向',
+ `yixiangchengshi` varchar(200) DEFAULT NULL COMMENT '意向城市',
+ `yixiangxinshui` varchar(200) DEFAULT NULL COMMENT '意向薪水',
+ `ziwomiaoshu` longtext COMMENT '自我描述',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COMMENT='个人简历';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gerenjianli`
+--
+
+LOCK TABLES `gerenjianli` WRITE;
+/*!40000 ALTER TABLE `gerenjianli` DISABLE KEYS */;
+INSERT INTO `gerenjianli` VALUES (31,'2024-05-20 08:30:24','账号1','姓名1','性别1','手机1','upload/gerenjianli_zhaopian1.jpg','专业1','学历1','学校1','2024-05-20','英语水平1','工作年限1','居住地址1','个人技能1','意向岗位1','意向方向1','意向城市1','意向薪水1','自我描述1'),(32,'2024-05-20 08:30:24','账号2','姓名2','性别2','手机2','upload/gerenjianli_zhaopian2.jpg','专业2','学历2','学校2','2024-05-20','英语水平2','工作年限2','居住地址2','个人技能2','意向岗位2','意向方向2','意向城市2','意向薪水2','自我描述2'),(33,'2024-05-20 08:30:24','账号3','姓名3','性别3','手机3','upload/gerenjianli_zhaopian3.jpg','专业3','学历3','学校3','2024-05-20','英语水平3','工作年限3','居住地址3','个人技能3','意向岗位3','意向方向3','意向城市3','意向薪水3','自我描述3'),(34,'2024-05-20 08:30:24','账号4','姓名4','性别4','手机4','upload/gerenjianli_zhaopian4.jpg','专业4','学历4','学校4','2024-05-20','英语水平4','工作年限4','居住地址4','个人技能4','意向岗位4','意向方向4','意向城市4','意向薪水4','自我描述4'),(35,'2024-05-20 08:30:24','账号5','姓名5','性别5','手机5','upload/gerenjianli_zhaopian5.jpg','专业5','学历5','学校5','2024-05-20','英语水平5','工作年限5','居住地址5','个人技能5','意向岗位5','意向方向5','意向城市5','意向薪水5','自我描述5'),(36,'2024-05-20 08:30:24','账号6','姓名6','性别6','手机6','upload/gerenjianli_zhaopian6.jpg','专业6','学历6','学校6','2024-05-20','英语水平6','工作年限6','居住地址6','个人技能6','意向岗位6','意向方向6','意向城市6','意向薪水6','自我描述6');
+/*!40000 ALTER TABLE `gerenjianli` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gongsi`
+--
+
+DROP TABLE IF EXISTS `gongsi`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gongsi` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `gongsizhanghao` varchar(200) NOT NULL COMMENT '公司账号',
+ `mima` varchar(200) NOT NULL COMMENT '密码',
+ `gongsimingcheng` varchar(200) NOT NULL COMMENT '公司名称',
+ `gongsilingyu` varchar(200) DEFAULT NULL COMMENT '公司领域',
+ `gongsiguimo` varchar(200) DEFAULT NULL COMMENT '公司规模',
+ `gongsileixing` varchar(200) DEFAULT NULL COMMENT '公司类型',
+ `gongsitupian` varchar(200) DEFAULT NULL COMMENT '公司图片',
+ `gongsidizhi` varchar(200) DEFAULT NULL COMMENT '公司地址',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `gongsizhanghao` (`gongsizhanghao`)
+) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COMMENT='公司';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gongsi`
+--
+
+LOCK TABLES `gongsi` WRITE;
+/*!40000 ALTER TABLE `gongsi` DISABLE KEYS */;
+INSERT INTO `gongsi` VALUES (21,'2024-05-20 08:30:24','22','22','公司名称1','公司领域1','公司规模1','公司类型1','upload/gongsi_gongsitupian1.jpg','公司地址1'),(22,'2024-05-20 08:30:24','公司账号2','123456','公司名称2','公司领域2','公司规模2','公司类型2','upload/gongsi_gongsitupian2.jpg','公司地址2'),(23,'2024-05-20 08:30:24','公司账号3','123456','公司名称3','公司领域3','公司规模3','公司类型3','upload/gongsi_gongsitupian3.jpg','公司地址3'),(24,'2024-05-20 08:30:24','公司账号4','123456','公司名称4','公司领域4','公司规模4','公司类型4','upload/gongsi_gongsitupian4.jpg','公司地址4'),(25,'2024-05-20 08:30:24','公司账号5','123456','公司名称5','公司领域5','公司规模5','公司类型5','upload/gongsi_gongsitupian5.jpg','公司地址5'),(26,'2024-05-20 08:30:24','公司账号6','123456','公司名称6','公司领域6','公司规模6','公司类型6','upload/gongsi_gongsitupian6.jpg','公司地址6');
+/*!40000 ALTER TABLE `gongsi` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `gongsixinxi`
+--
+
+DROP TABLE IF EXISTS `gongsixinxi`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `gongsixinxi` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `gongsizhanghao` varchar(200) DEFAULT NULL COMMENT '公司账号',
+ `gongsimingcheng` varchar(200) DEFAULT NULL COMMENT '公司名称',
+ `fengmian` varchar(200) DEFAULT NULL COMMENT '封面',
+ `gongsidizhi` varchar(200) DEFAULT NULL COMMENT '公司地址',
+ `gongsilingyu` varchar(200) DEFAULT NULL COMMENT '公司领域',
+ `gongsiguimo` varchar(200) DEFAULT NULL COMMENT '公司规模',
+ `gongsileixing` varchar(200) DEFAULT NULL COMMENT '公司类型',
+ `chuangliriqi` date DEFAULT NULL COMMENT '创立日期',
+ `fuzeren` varchar(200) DEFAULT NULL COMMENT '负责人',
+ `lianxifangshi` varchar(200) DEFAULT NULL COMMENT '联系方式',
+ `yuangongrenshu` varchar(200) DEFAULT NULL COMMENT '员工人数',
+ `gongsijieshao` longtext COMMENT '公司介绍',
+ `thumbsupnum` int(11) DEFAULT '0' COMMENT '赞',
+ `crazilynum` int(11) DEFAULT '0' COMMENT '踩',
+ `clicktime` datetime DEFAULT NULL COMMENT '最近点击时间',
+ `clicknum` int(11) DEFAULT '0' COMMENT '点击次数',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COMMENT='公司信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `gongsixinxi`
+--
+
+LOCK TABLES `gongsixinxi` WRITE;
+/*!40000 ALTER TABLE `gongsixinxi` DISABLE KEYS */;
+INSERT INTO `gongsixinxi` VALUES (41,'2024-05-20 08:30:24','公司账号1','公司名称1','upload/gongsixinxi_fengmian1.jpg','公司地址1','公司领域1','公司规模1','公司类型1','2024-05-20','负责人1','13823888881','员工人数1','公司介绍1',1,1,'2024-05-20 16:30:24',1),(42,'2024-05-20 08:30:24','公司账号2','公司名称2','upload/gongsixinxi_fengmian2.jpg','公司地址2','公司领域2','公司规模2','公司类型2','2024-05-20','负责人2','13823888882','员工人数2','公司介绍2',2,2,'2024-05-20 16:30:24',6),(43,'2024-05-20 08:30:24','公司账号3','公司名称3','upload/gongsixinxi_fengmian3.jpg','公司地址3','公司领域3','公司规模3','公司类型3','2024-05-20','负责人3','13823888883','员工人数3','公司介绍3',3,3,'2024-05-20 16:30:24',3),(44,'2024-05-20 08:30:24','公司账号4','公司名称4','upload/gongsixinxi_fengmian4.jpg','公司地址4','公司领域4','公司规模4','公司类型4','2024-05-20','负责人4','13823888884','员工人数4','公司介绍4',4,4,'2024-05-20 16:30:24',4),(45,'2024-05-20 08:30:24','公司账号5','公司名称5','upload/gongsixinxi_fengmian5.jpg','公司地址5','公司领域5','公司规模5','公司类型5','2024-05-20','负责人5','13823888885','员工人数5','公司介绍5',5,5,'2024-05-20 16:30:24',5),(46,'2024-05-20 08:30:24','公司账号6','公司名称6','upload/gongsixinxi_fengmian6.jpg','公司地址6','公司领域6','公司规模6','公司类型6','2024-05-20','负责人6','13823888886','员工人数6','公司介绍6',6,6,'2024-05-20 16:30:24',6);
+/*!40000 ALTER TABLE `gongsixinxi` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `keshihua`
+--
+
+DROP TABLE IF EXISTS `keshihua`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `keshihua` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `keshihua` varchar(200) DEFAULT NULL COMMENT '可视化',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8 COMMENT='可视化';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `keshihua`
+--
+
+LOCK TABLES `keshihua` WRITE;
+/*!40000 ALTER TABLE `keshihua` DISABLE KEYS */;
+INSERT INTO `keshihua` VALUES (101,'2024-05-20 08:30:24','可视化1'),(102,'2024-05-20 08:30:24','可视化2'),(103,'2024-05-20 08:30:24','可视化3'),(104,'2024-05-20 08:30:24','可视化4'),(105,'2024-05-20 08:30:24','可视化5'),(106,'2024-05-20 08:30:24','可视化6');
+/*!40000 ALTER TABLE `keshihua` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `mianshijieguo`
+--
+
+DROP TABLE IF EXISTS `mianshijieguo`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `mianshijieguo` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `biaoti` varchar(200) DEFAULT NULL COMMENT '标题',
+ `gangweimingcheng` varchar(200) DEFAULT NULL COMMENT '岗位名称',
+ `jieguo` longtext NOT NULL COMMENT '结果',
+ `shijian` datetime DEFAULT NULL COMMENT '时间',
+ `gongsizhanghao` varchar(200) DEFAULT NULL COMMENT '公司账号',
+ `gongsimingcheng` varchar(200) DEFAULT NULL COMMENT '公司名称',
+ `zhanghao` varchar(200) DEFAULT NULL COMMENT '账号',
+ `xingming` varchar(200) DEFAULT NULL COMMENT '姓名',
+ `crossuserid` bigint(20) DEFAULT NULL COMMENT '跨表用户id',
+ `crossrefid` bigint(20) DEFAULT NULL COMMENT '跨表主键id',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 COMMENT='面试结果';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `mianshijieguo`
+--
+
+LOCK TABLES `mianshijieguo` WRITE;
+/*!40000 ALTER TABLE `mianshijieguo` DISABLE KEYS */;
+INSERT INTO `mianshijieguo` VALUES (81,'2024-05-20 08:30:24','标题1','岗位名称1','结果1','2024-05-20 16:30:24','公司账号1','公司名称1','账号1','姓名1',1,1),(82,'2024-05-20 08:30:24','标题2','岗位名称2','结果2','2024-05-20 16:30:24','公司账号2','公司名称2','账号2','姓名2',2,2),(83,'2024-05-20 08:30:24','标题3','岗位名称3','结果3','2024-05-20 16:30:24','公司账号3','公司名称3','账号3','姓名3',3,3),(84,'2024-05-20 08:30:24','标题4','岗位名称4','结果4','2024-05-20 16:30:24','公司账号4','公司名称4','账号4','姓名4',4,4),(85,'2024-05-20 08:30:24','标题5','岗位名称5','结果5','2024-05-20 16:30:24','公司账号5','公司名称5','账号5','姓名5',5,5),(86,'2024-05-20 08:30:24','标题6','岗位名称6','结果6','2024-05-20 16:30:24','公司账号6','公司名称6','账号6','姓名6',6,6);
+/*!40000 ALTER TABLE `mianshijieguo` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `mianshiyaoqing`
+--
+
+DROP TABLE IF EXISTS `mianshiyaoqing`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `mianshiyaoqing` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `gangweimingcheng` varchar(200) DEFAULT NULL COMMENT '岗位名称',
+ `tongzhineirong` longtext NOT NULL COMMENT '通知内容',
+ `tongzhishijian` datetime DEFAULT NULL COMMENT '通知时间',
+ `gongsizhanghao` varchar(200) DEFAULT NULL COMMENT '公司账号',
+ `gongsimingcheng` varchar(200) DEFAULT NULL COMMENT '公司名称',
+ `zhanghao` varchar(200) DEFAULT NULL COMMENT '账号',
+ `xingming` varchar(200) DEFAULT NULL COMMENT '姓名',
+ `crossuserid` bigint(20) DEFAULT NULL COMMENT '跨表用户id',
+ `crossrefid` bigint(20) DEFAULT NULL COMMENT '跨表主键id',
+ `sfsh` varchar(200) DEFAULT '否' COMMENT '是否审核',
+ `shhf` longtext COMMENT '审核回复',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8 COMMENT='面试邀请';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `mianshiyaoqing`
+--
+
+LOCK TABLES `mianshiyaoqing` WRITE;
+/*!40000 ALTER TABLE `mianshiyaoqing` DISABLE KEYS */;
+INSERT INTO `mianshiyaoqing` VALUES (71,'2024-05-20 08:30:24','岗位名称1','通知内容1','2024-05-20 16:30:24','公司账号1','公司名称1','账号1','姓名1',1,1,'是',''),(72,'2024-05-20 08:30:24','岗位名称2','通知内容2','2024-05-20 16:30:24','公司账号2','公司名称2','账号2','姓名2',2,2,'是',''),(73,'2024-05-20 08:30:24','岗位名称3','通知内容3','2024-05-20 16:30:24','公司账号3','公司名称3','账号3','姓名3',3,3,'是',''),(74,'2024-05-20 08:30:24','岗位名称4','通知内容4','2024-05-20 16:30:24','公司账号4','公司名称4','账号4','姓名4',4,4,'是',''),(75,'2024-05-20 08:30:24','岗位名称5','通知内容5','2024-05-20 16:30:24','公司账号5','公司名称5','账号5','姓名5',5,5,'是',''),(76,'2024-05-20 08:30:24','岗位名称6','通知内容6','2024-05-20 16:30:24','公司账号6','公司名称6','账号6','姓名6',6,6,'是','');
+/*!40000 ALTER TABLE `mianshiyaoqing` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `qiuzhizhe`
+--
+
+DROP TABLE IF EXISTS `qiuzhizhe`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `qiuzhizhe` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `zhanghao` varchar(200) NOT NULL COMMENT '账号',
+ `mima` varchar(200) NOT NULL COMMENT '密码',
+ `xingming` varchar(200) NOT NULL COMMENT '姓名',
+ `nianling` int(11) DEFAULT NULL COMMENT '年龄',
+ `xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
+ `shouji` varchar(200) DEFAULT NULL COMMENT '手机',
+ `zhaopian` varchar(200) DEFAULT NULL COMMENT '照片',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `zhanghao` (`zhanghao`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='求职者';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `qiuzhizhe`
+--
+
+LOCK TABLES `qiuzhizhe` WRITE;
+/*!40000 ALTER TABLE `qiuzhizhe` DISABLE KEYS */;
+INSERT INTO `qiuzhizhe` VALUES (11,'2024-05-20 08:30:24','11','11','姓名1',1,'男','13823888881','upload/qiuzhizhe_zhaopian1.jpg'),(12,'2024-05-20 08:30:24','账号2','123456','姓名2',2,'男','13823888882','upload/qiuzhizhe_zhaopian2.jpg'),(13,'2024-05-20 08:30:24','账号3','123456','姓名3',3,'男','13823888883','upload/qiuzhizhe_zhaopian3.jpg'),(14,'2024-05-20 08:30:24','账号4','123456','姓名4',4,'男','13823888884','upload/qiuzhizhe_zhaopian4.jpg'),(15,'2024-05-20 08:30:24','账号5','123456','姓名5',5,'男','13823888885','upload/qiuzhizhe_zhaopian5.jpg'),(16,'2024-05-20 08:30:24','账号6','123456','姓名6',6,'男','13823888886','upload/qiuzhizhe_zhaopian6.jpg');
+/*!40000 ALTER TABLE `qiuzhizhe` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `storeup`
+--
+
+DROP TABLE IF EXISTS `storeup`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `storeup` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `userid` bigint(20) NOT NULL COMMENT '用户id',
+ `refid` bigint(20) DEFAULT NULL COMMENT '收藏id',
+ `tablename` varchar(200) DEFAULT NULL COMMENT '表名',
+ `name` varchar(200) NOT NULL COMMENT '收藏名称',
+ `picture` varchar(200) NOT NULL COMMENT '收藏图片',
+ `type` varchar(200) DEFAULT '1' COMMENT '类型(1:收藏,21:赞,22:踩)',
+ `inteltype` varchar(200) DEFAULT NULL COMMENT '推荐类型',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1645000431353 DEFAULT CHARSET=utf8 COMMENT='收藏表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `storeup`
+--
+
+LOCK TABLES `storeup` WRITE;
+/*!40000 ALTER TABLE `storeup` DISABLE KEYS */;
+/*!40000 ALTER TABLE `storeup` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `tongzhigonggao`
+--
+
+DROP TABLE IF EXISTS `tongzhigonggao`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tongzhigonggao` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `biaoti` varchar(200) NOT NULL COMMENT '标题',
+ `jianjie` longtext COMMENT '简介',
+ `fabushijian` date DEFAULT NULL COMMENT '发布时间',
+ `fengmian` varchar(200) DEFAULT NULL COMMENT '封面',
+ `neirong` longtext COMMENT '内容',
+ `clicktime` datetime DEFAULT NULL COMMENT '最近点击时间',
+ `clicknum` int(11) DEFAULT '0' COMMENT '点击次数',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=utf8 COMMENT='通知公告';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `tongzhigonggao`
+--
+
+LOCK TABLES `tongzhigonggao` WRITE;
+/*!40000 ALTER TABLE `tongzhigonggao` DISABLE KEYS */;
+INSERT INTO `tongzhigonggao` VALUES (91,'2024-05-20 08:30:24','标题1','简介1','2024-05-20','upload/tongzhigonggao_fengmian1.jpg','内容1','2024-05-20 16:30:24',1),(92,'2024-05-20 08:30:24','标题2','简介2','2024-05-20','upload/tongzhigonggao_fengmian2.jpg','内容2','2024-05-20 16:30:24',2),(93,'2024-05-20 08:30:24','标题3','简介3','2024-05-20','upload/tongzhigonggao_fengmian3.jpg','内容3','2024-05-20 16:30:24',3),(94,'2024-05-20 08:30:24','标题4','简介4','2024-05-20','upload/tongzhigonggao_fengmian4.jpg','内容4','2024-05-20 16:30:24',4),(95,'2024-05-20 08:30:24','标题5','简介5','2024-05-20','upload/tongzhigonggao_fengmian5.jpg','内容5','2024-05-20 16:30:24',5),(96,'2024-05-20 08:30:24','标题6','简介6','2024-05-20','upload/tongzhigonggao_fengmian6.jpg','内容6','2024-05-20 16:30:24',6);
+/*!40000 ALTER TABLE `tongzhigonggao` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `toudijianli`
+--
+
+DROP TABLE IF EXISTS `toudijianli`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `toudijianli` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `zhanghao` varchar(200) DEFAULT NULL COMMENT '账号',
+ `xingming` varchar(200) DEFAULT NULL COMMENT '姓名',
+ `zhaopian` varchar(200) DEFAULT NULL COMMENT '照片',
+ `jianliwenjian` varchar(200) DEFAULT NULL COMMENT '简历文件',
+ `gangweimingcheng` varchar(200) DEFAULT NULL COMMENT '岗位名称',
+ `toudishijian` datetime DEFAULT NULL COMMENT '投递时间',
+ `gongsizhanghao` varchar(200) DEFAULT NULL COMMENT '公司账号',
+ `gongsimingcheng` varchar(200) DEFAULT NULL COMMENT '公司名称',
+ `crossuserid` bigint(20) DEFAULT NULL COMMENT '跨表用户id',
+ `crossrefid` bigint(20) DEFAULT NULL COMMENT '跨表主键id',
+ `sfsh` varchar(200) DEFAULT '否' COMMENT '是否审核',
+ `shhf` longtext COMMENT '审核回复',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COMMENT='投递简历';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `toudijianli`
+--
+
+LOCK TABLES `toudijianli` WRITE;
+/*!40000 ALTER TABLE `toudijianli` DISABLE KEYS */;
+INSERT INTO `toudijianli` VALUES (61,'2024-05-20 08:30:24','账号1','姓名1','upload/toudijianli_zhaopian1.jpg','','岗位名称1','2024-05-20 16:30:24','公司账号1','公司名称1',1,1,'是',''),(62,'2024-05-20 08:30:24','账号2','姓名2','upload/toudijianli_zhaopian2.jpg','','岗位名称2','2024-05-20 16:30:24','公司账号2','公司名称2',2,2,'是',''),(63,'2024-05-20 08:30:24','账号3','姓名3','upload/toudijianli_zhaopian3.jpg','','岗位名称3','2024-05-20 16:30:24','公司账号3','公司名称3',3,3,'是',''),(64,'2024-05-20 08:30:24','账号4','姓名4','upload/toudijianli_zhaopian4.jpg','','岗位名称4','2024-05-20 16:30:24','公司账号4','公司名称4',4,4,'是',''),(65,'2024-05-20 08:30:24','账号5','姓名5','upload/toudijianli_zhaopian5.jpg','','岗位名称5','2024-05-20 16:30:24','公司账号5','公司名称5',5,5,'是',''),(66,'2024-05-20 08:30:24','账号6','姓名6','upload/toudijianli_zhaopian6.jpg','','岗位名称6','2024-05-20 16:30:24','公司账号6','公司名称6',6,6,'是','');
+/*!40000 ALTER TABLE `toudijianli` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `users`
+--
+
+DROP TABLE IF EXISTS `users`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `users` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `username` varchar(100) NOT NULL COMMENT '用户名',
+ `password` varchar(100) NOT NULL COMMENT '密码',
+ `role` varchar(100) DEFAULT '管理员' COMMENT '角色',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `users`
+--
+
+LOCK TABLES `users` WRITE;
+/*!40000 ALTER TABLE `users` DISABLE KEYS */;
+INSERT INTO `users` VALUES (1,'abo','abo','管理员','2024-05-20 08:30:24');
+/*!40000 ALTER TABLE `users` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `zhaopinxinxi`
+--
+
+DROP TABLE IF EXISTS `zhaopinxinxi`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `zhaopinxinxi` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+ `gangweibianhao` varchar(200) NOT NULL COMMENT '岗位编号',
+ `gangweimingcheng` varchar(200) NOT NULL COMMENT '岗位名称',
+ `shangbandizhi` varchar(200) NOT NULL COMMENT '上班地址',
+ `jingyanyaoqiu` longtext NOT NULL COMMENT '经验要求',
+ `xueliyaoqiu` varchar(200) NOT NULL COMMENT '学历要求',
+ `zhaopinrenshu` int(11) NOT NULL COMMENT '招聘人数',
+ `gangweifuli` longtext COMMENT '岗位福利',
+ `xinzidaiyu` varchar(200) DEFAULT NULL COMMENT '薪资待遇',
+ `gongzuonianxian` varchar(200) NOT NULL COMMENT '工作年限',
+ `tupian` varchar(200) DEFAULT NULL COMMENT '图片',
+ `fabushijian` date DEFAULT NULL COMMENT '发布时间',
+ `gongsizhanghao` varchar(200) DEFAULT NULL COMMENT '公司账号',
+ `gongsimingcheng` varchar(200) DEFAULT NULL COMMENT '公司名称',
+ `gongsilingyu` varchar(200) DEFAULT NULL COMMENT '公司领域',
+ `gongsiguimo` varchar(200) DEFAULT NULL COMMENT '公司规模',
+ `gongsileixing` varchar(200) DEFAULT NULL COMMENT '公司类型',
+ `zhiweixinxi` longtext COMMENT '职位信息',
+ `thumbsupnum` int(11) DEFAULT '0' COMMENT '赞',
+ `crazilynum` int(11) DEFAULT '0' COMMENT '踩',
+ `clicktime` datetime DEFAULT NULL COMMENT '最近点击时间',
+ `clicknum` int(11) DEFAULT '0' COMMENT '点击次数',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `gangweibianhao` (`gangweibianhao`)
+) ENGINE=InnoDB AUTO_INCREMENT=1645000403948 DEFAULT CHARSET=utf8 COMMENT='招聘信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `zhaopinxinxi`
+--
+
+LOCK TABLES `zhaopinxinxi` WRITE;
+/*!40000 ALTER TABLE `zhaopinxinxi` DISABLE KEYS */;
+INSERT INTO `zhaopinxinxi` VALUES (51,'2024-05-20 08:30:24','岗位编号1','岗位名称1','上班地址1','经验要求1','学历要求1',1,'岗位福利1','薪资待遇1','工作年限1','upload/zhaopinxinxi_tupian1.jpg','2024-05-20','公司账号1','公司名称1','公司领域1','公司规模1','公司类型1','职位信息1',1,1,'2024-05-20 16:30:24',1),(52,'2024-05-20 08:30:24','岗位编号2','岗位名称2','上班地址2','经验要求2','学历要求2',2,'岗位福利2','薪资待遇2','工作年限2','upload/zhaopinxinxi_tupian2.jpg','2024-05-20','公司账号2','公司名称2','公司领域2','公司规模2','公司类型2','职位信息2',2,2,'2024-05-20 16:30:24',2),(53,'2024-05-20 08:30:24','岗位编号3','岗位名称3','上班地址3','经验要求3','学历要求3',3,'岗位福利3','薪资待遇3','工作年限3','upload/zhaopinxinxi_tupian3.jpg','2024-05-20','公司账号3','公司名称3','公司领域3','公司规模3','公司类型3','职位信息3',3,3,'2024-05-20 16:30:24',3),(54,'2024-05-20 08:30:24','岗位编号4','岗位名称4','上班地址4','经验要求4','学历要求4',4,'岗位福利4','薪资待遇4','工作年限4','upload/zhaopinxinxi_tupian4.jpg','2024-05-20','公司账号4','公司名称4','公司领域4','公司规模4','公司类型4','职位信息4',4,4,'2024-05-20 16:30:24',4),(55,'2024-05-20 08:30:24','岗位编号5','岗位名称5','上班地址5','经验要求5','学历要求5',5,'岗位福利5','薪资待遇5','工作年限5','upload/zhaopinxinxi_tupian5.jpg','2024-05-20','公司账号5','公司名称5','公司领域5','公司规模5','公司类型5','职位信息5',5,5,'2024-05-20 16:30:24',5),(56,'2024-05-20 08:30:24','岗位编号6','岗位名称6','上班地址6','经验要求6','学历要求6',6,'岗位福利6','薪资待遇6','工作年限6','upload/zhaopinxinxi_tupian6.jpg','2024-05-20','公司账号6','公司名称6','公司领域6','公司规模6','公司类型6','职位信息6',6,6,'2024-05-20 16:30:24',6),(1645000370071,'2024-05-20 08:32:50','01','水电费','11','第三方时代','睡得着',22,'','222','电商发送到','','2024-05-20','22','公司名称1','公司领域1','公司规模1','公司类型1','
水电费
',0,0,NULL,0),(1645000403947,'2024-05-20 08:33:23','02','水电费','水电费时代','水电费时代','时代发多少',33,'','','时代发送到','','2024-05-20','22','公司名称1','公司领域1','公司规模1','公司类型1','',0,0,NULL,0);
+/*!40000 ALTER TABLE `zhaopinxinxi` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2024-05-20 9:27:16
diff --git a/django3qu6u/dj2/__init__.py b/django3qu6u/dj2/__init__.py
new file mode 100644
index 0000000..aa60bed
--- /dev/null
+++ b/django3qu6u/dj2/__init__.py
@@ -0,0 +1,3 @@
+import pymysql
+
+pymysql.install_as_MySQLdb()
\ No newline at end of file
diff --git a/django3qu6u/dj2/__pycache__/__init__.cpython-37.pyc b/django3qu6u/dj2/__pycache__/__init__.cpython-37.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..128771ffe6a8642c99ea1d0edac4a137c41a2d69
GIT binary patch
literal 172
zcmZ?b<>g`k0@rOkNjgCKF^B^LOhASM5EqL8i4=wu#vFzyhE#?Hj0+hUfxKV_O{SMX
z83sR1rYQD;%G}E0!kj3f%)H`~#GIV?#Nv40%HTksl%$mmMIfWV#4i;WtC;N6;*8Xo
wl&r+O^nByOQnOMZ+bAYJJ~J<~BtBlRpz;=nO>TZlX-=vgBT!>8NH+%)0B%kwq5uE@
literal 0
HcmV?d00001
diff --git a/django3qu6u/dj2/__pycache__/settings.cpython-37.pyc b/django3qu6u/dj2/__pycache__/settings.cpython-37.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4128fd14bb5b8e10e95c19d7b2b81f6bfc6686d1
GIT binary patch
literal 3804
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
.*)/(?P.*)$', views.admin_lib2),
+ re_path(r'admin/lib/(?P.*)/(?P.*)/(?P.*)$', views.admin_lib3),
+ re_path(r'admin/lib/(?P.*)/(?P.*)/(?P.*)/(?P.*)$', views.admin_lib4),
+ re_path(r'admin/page/(?P.*)$', views.admin_page),
+ re_path(r'admin/page/(?P.*)/(?P.*)$', views.admin_page2),
+ re_path(r'admin/pages/(?P.*)$', views.admin_pages),
+ re_path(r'admin/pages/(?P.*)/(?P.*)$', views.admin_pages2),
+
+ re_path(r'front/(?P.*)$', views.schema_front1),
+ re_path(r'front/(?P.*)/(?P.*)$', views.schema_front2),
+ re_path(r'front/(?P.*)/(?P.*)/(?P.*)$', views.schema_front3),
+ re_path(r'front/(?P.*)/(?P.*)/(?P.*)/(?P.*)$', views.schema_front4),
+ re_path(r'{}/front/(?P.*)$'.format(schemaName), views.schema_front1),
+ re_path(r'{}/front/(?P.*)/(?P.*)$'.format(schemaName), views.schema_front2),
+ re_path(r'{}/front/(?P.*)/(?P.*)/(?P.*)$'.format(schemaName), views.schema_front3),
+ re_path(r'{}/front/(?P.*)/(?P.*)/(?P.*)/(?P.*)$'.format(schemaName), views.schema_front4),
+ # re_path(r'assets/(?P.*)$', views.assets1),
+ # re_path(r'assets/(?P.*)/(?P.*)$', views.assets2),
+ # re_path(r'assets/(?P.*)/(?P.*)/(?P.*)$', views.assets3),
+ # re_path(r'assets/(?P.*)/(?P.*)/(?P.*)/(?P.*)$', views.assets4),
+ #re_path(r'admin/(?P.*)$', views.admin_file1),
+ re_path(r'admin/(?P.*)/(?P.*)$', views.admin_file2),
+ re_path(r'admin/(?P.*)/(?P.*)/(?P.*)$', views.admin_file3),
+ re_path(r'admin/(?P.*)/(?P.*)/(?P.*)/(?P.*)$', views.admin_file4),
+ re_path(r'layui/(?P.*)$', views.layui1),
+ re_path(r'layui/(?P.*)/(?P.*)$', views.layui2),
+ re_path(r'layui/(?P.*)/(?P.*)/(?P.*)$', views.layui3),
+ re_path(r'layui/(?P.*)/(?P.*)/(?P.*)/(?P.*)$', views.layui4),
+ re_path(r'pages/(?P.*)$', views.front_pages),
+ re_path(r'pages/(?P.*)/(?P.*)$', views.front_pages2),
+ # re_path(r'pages/(?P.*)$', views.front_file1),
+ # re_path(r'(?Pcss|jss|img|image|iamges|font|fonts)/(?P.*)$', views.front_file2),
+ re_path(r'modules/(?P.*)$', views.front_modules),
+ re_path(r'css/(?P.*)$', views.css1),
+ re_path(r'js/(?P.*)$', views.js1),
+ re_path(r'img/(?P.*)$', views.img1),
+ path(r'test//',views.test),
+ path(r'null',views.null),
+ path('{}/'.format(schemaName),include('main.urls')),#导入schemaName
+]
+
+#判断admin使用vue还是jquery
+if os.path.isdir(os.path.join(os.getcwd(),"templates/front/admin/dist/")):
+ urlpatterns.extend([
+ path(r'{}/admin/dist/index.html'.format(schemaName),
+ TemplateView.as_view(template_name='front/admin/dist/index.html')),
+ path(r'{}/admin/'.format(schemaName), TemplateView.as_view(template_name='front/admin/dist/index.html')),
+ # 以下是后台admin的url匹配规则
+ path(r'admin/dist/index.html'.format(schemaName),
+ TemplateView.as_view(template_name='front/admin/dist/index.html')),
+ path(r'admin/', TemplateView.as_view(template_name='front/admin/dist/index.html')),
+ ])
+else:
+ urlpatterns.extend([
+ path(r'{}/admin/index.html'.format(schemaName),
+ TemplateView.as_view(template_name='front/admin/index.html')),
+ path(r'{}/admin/'.format(schemaName), TemplateView.as_view(template_name='front/admin/index.html')),
+ # 以下是后台admin的url匹配规则
+ path(r'admin/index.html'.format(schemaName),
+ TemplateView.as_view(template_name='front/admin/index.html')),
+ path(r'admin/', TemplateView.as_view(template_name='front/admin/index.html')),
+
+ ])
+
+
+if os.path.isfile(os.path.join(os.getcwd(),"templates/front/index.html")):
+ urlpatterns.extend([
+ path(r'index.html', TemplateView.as_view(template_name='front/index.html')),
+ path(r'{}/index.html'.format(schemaName), TemplateView.as_view(template_name='front/index.html')),
+ path(r'{}/front/index.html'.format(schemaName), TemplateView.as_view(template_name='front/index.html')),
+ path(r'', TemplateView.as_view(template_name='front/index.html')),
+ ])
diff --git a/django3qu6u/dj2/views.py b/django3qu6u/dj2/views.py
new file mode 100644
index 0000000..895d88e
--- /dev/null
+++ b/django3qu6u/dj2/views.py
@@ -0,0 +1,963 @@
+# coding:utf-8
+__author__ = "ila"
+import os,sys
+from django.http import JsonResponse, HttpResponse
+from django.apps import apps
+
+
+def index(request):
+ if request.method in ["GET", "POST"]:
+ msg = {"code": 200, "msg": "success", "data": []}
+ print("=================>index")
+ # allModels = apps.get_app_config('main').get_models()
+ # for m in allModels:
+ # print(m.__tablename__)
+ # print(dir(m))
+ # # for col in m._meta.fields:
+ # # print("col name============>",col.name)
+ # # print("col type============>",col.get_internal_type())
+ # print(allModels)
+
+ return JsonResponse(msg)
+
+
+def test(request, p1):
+ if request.method in ["GET", "POST"]:
+ msg = {"code": 200, "msg": "success", "data": []}
+ print("=================>index ", p1)
+ return JsonResponse(msg)
+
+def null(request,):
+ if request.method in ["GET", "POST"]:
+ msg = {"code": 200, "msg": "success", "data": []}
+ return JsonResponse(msg)
+
+def check_suffix(filelName,path1):
+ try:
+ image_data = open(path1, "rb").read()
+ except:
+ image_data = "no file"
+ if '.js' in filelName:
+ return HttpResponse(image_data, content_type="application/javascript")
+ elif '.jpg' in filelName or '.jpeg' in filelName or '.png' in filelName or '.gif' in filelName:
+ return HttpResponse(image_data, content_type="image/png")
+ elif '.css' in filelName:
+ return HttpResponse(image_data, content_type="text/css")
+ elif '.ttf' in filelName or '.woff' in filelName:
+ return HttpResponse(image_data, content_type="application/octet-stream")
+ elif '.mp4' in filelName:
+ return HttpResponse(image_data, content_type="video/mp4")
+ elif '.mp3' in filelName:
+ return HttpResponse(image_data, content_type="audio/mp3")
+ elif '.csv' in filelName:
+ return HttpResponse(image_data, content_type="application/CSV")
+ elif '.doc' in filelName:
+ return HttpResponse(image_data, content_type="application/msword")
+ elif '.docx' in filelName:
+ return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document")
+ elif '.xls' in filelName:
+ return HttpResponse(image_data, content_type="application/vnd.ms-excel")
+ elif '.xlsx' in filelName:
+ return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
+ elif '.ppt' in filelName:
+ return HttpResponse(image_data, content_type="application/vnd.ms-powerpoint")
+ elif '.pptx' in filelName:
+ return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.presentationml.presentation")
+ else:
+ return HttpResponse(image_data, content_type="text/html")
+
+def admin_lib2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_lib3(request, p1, p2, p3):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p3:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p3:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p3 or '.woff' in p3:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p3:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p3:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_lib4(request, p1, p2, p3, p4):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3, p4)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p4:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p4:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p4 or '.woff' in p4:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p4:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p4:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_page(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/page/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_page2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/page/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_pages(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/pages/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_pages2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/pages/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_file1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_file2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2)
+ if not os.path.isfile(path1):
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_file3(request, p1, p2, p3):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2, p3)
+
+ if not os.path.isfile(path1):
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2,p3)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p3:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p3:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p3 or '.woff' in p3:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p3:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p3:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def admin_file4(request, p1, p2, p3, p4):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2, p3, p4)
+ if not os.path.isfile(path1):
+ path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2,p3,p4)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p4:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p4:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p4 or '.woff' in p4:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p4:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p4:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+def front_pages(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def front_pages2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def layui1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def layui2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2)
+ print("layui2 path1========================>",path1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def layui3(request, p1, p2, p3):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2, p3)
+ print("layui3 path1========================>",path1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ #
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p3:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p3:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p3 or '.woff' in p3:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p3:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p3:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def layui4(request, p1, p2, p3, p4):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2, p3, p4)
+ print("layui4 path1========================>",path1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p4:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p4:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p4 or '.woff' in p4:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p4:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p4:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def pages1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def pages2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def front_file1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def front_file2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+def schema_front1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def schema_front2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def schema_front3(request, p1, p2, p3):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2, p3)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p3:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p3:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p3 or '.woff' in p3:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p3:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p3:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def schema_front4(request, p1, p2, p3, p4):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2, p3, p4)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p4:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p4:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p4 or '.woff' in p4:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p4:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p4:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+def assets1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # elif '.map' in p1:
+ # return JsonResponse({})
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def assets2(request, p1, p2):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p2:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p2:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p2 or '.woff' in p2:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p2:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p2:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # elif '.map' in p2:
+ # return JsonResponse({})
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def assets3(request, p1, p2, p3):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2, p3)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p3:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p3:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p3 or '.woff' in p3:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p3:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p3:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # elif '.map' in p3:
+ # return JsonResponse({})
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+
+def assets4(request, p1, p2, p3, p4):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2, p3, p4)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p4:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p4:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p4 or '.woff' in p4:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p4:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p4:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # elif '.map' in p4:
+ # return JsonResponse({})
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+def css1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/css/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+def js1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/js/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+
+def img1(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/img/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
+
+ # try:
+ # image_data = open(path1, "rb").read()
+ # except:
+ # image_data="no file"
+ # if '.js' in p1:
+ # return HttpResponse(image_data, content_type="application/javascript")
+ # elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
+ # return HttpResponse(image_data, content_type="image/png")
+ # elif '.css' in p1:
+ # return HttpResponse(image_data, content_type="text/css")
+ # elif '.ttf' in p1 or '.woff' in p1:
+ # return HttpResponse(image_data, content_type="application/octet-stream")
+ # elif '.mp4' in p1:
+ # return HttpResponse(image_data, content_type="video/mp4")
+ # elif '.mp3' in p1:
+ # return HttpResponse(image_data, content_type="audio/mp3")
+ # else:
+ # return HttpResponse(image_data, content_type="text/html")
+def front_modules(request, p1):
+ if request.method in ["GET", "POST"]:
+ fullPath = request.get_full_path()
+ print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
+ path1 = os.path.join(os.getcwd(), "templates/front/modules/", p1)
+
+ return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
\ No newline at end of file
diff --git a/django3qu6u/dj2/wsgi.py b/django3qu6u/dj2/wsgi.py
new file mode 100644
index 0000000..e41adc2
--- /dev/null
+++ b/django3qu6u/dj2/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for dj2 project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dj2.settings")
+
+application = get_wsgi_application()
diff --git a/django3qu6u/django开发文档.docx b/django3qu6u/django开发文档.docx
new file mode 100644
index 0000000000000000000000000000000000000000..9ccc35781e9ed0ec6c7989a3365ba3ee483f641a
GIT binary patch
literal 12984
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
b0sMWYtRM~c%Y2~$j-9apvm=!D1@!*_X{?E~
literal 0
HcmV?d00001
diff --git a/django3qu6u/init.py b/django3qu6u/init.py
new file mode 100644
index 0000000..cf90369
--- /dev/null
+++ b/django3qu6u/init.py
@@ -0,0 +1,53 @@
+# coding:utf-8
+# author:ila
+import click,py_compile,os
+from configparser import ConfigParser
+from util.configread import config_read
+from util.sqlinit import Create
+@click.group()
+def sub():
+ pass
+
+
+@click.command()
+def initdb(ini="config.ini"):
+ dbtype, host, port, user, passwd, dbName, charset = config_read(ini)
+ if dbtype == 'mysql':
+ cm = Create(dbtype, host, port, user, passwd, dbName, charset)
+ cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` /*!40100 DEFAULT CHARACTER SET utf8 */ ;".format(dbName))
+
+ cm.conn_close()
+ elif dbtype == 'mssql':
+ cm = Create(dbtype, host, port, user, passwd, dbName, charset)
+ cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;".format(dbName))
+
+ cm.conn_close()
+ else:
+ print('请修改当前面目录下的config.ini文件')
+
+@click.command()
+def initsql(ini="config.ini"):
+ dbtype, host, port, user, passwd, dbName, charset = config_read(ini)
+ if dbtype == 'mysql':
+ cm = Create(dbtype, host, port, user, passwd, dbName, charset)
+ cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` /*!40100 DEFAULT CHARACTER SET utf8 */ ;".format(dbName))
+ with open("./db/django3qu6u.sql", encoding="utf8") as f:
+ createsql = f.read()
+ createsql = "DROP TABLE" + createsql.split('DROP TABLE', 1)[-1]
+ cm.create_tables(createsql.split(';')[:-1])
+ cm.conn_close()
+ elif dbtype == 'mssql':
+ cm = Create(dbtype, host, port, user, passwd, dbName, charset)
+ cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;".format(dbName))
+ with open("./db/mssql.sql", encoding="utf8") as f:
+ createsql = f.read()
+ createsql = "DROP TABLE" + createsql.split('DROP TABLE', 1)[-1]
+ cm.create_tables(createsql.split(';')[:-1])
+ cm.conn_close()
+ else:
+ print('请修改当前面目录下的config.ini文件')
+
+sub.add_command(initdb,"initdb")
+sub.add_command(initsql,"initsql")
+if __name__ == "__main__":
+ sub()
diff --git a/django3qu6u/main/Gerenjianli_v.py b/django3qu6u/main/Gerenjianli_v.py
new file mode 100644
index 0000000..f7798e5
--- /dev/null
+++ b/django3qu6u/main/Gerenjianli_v.py
@@ -0,0 +1,725 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import gerenjianli
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def gerenjianli_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = gerenjianli.createbyreq(gerenjianli, gerenjianli, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def gerenjianli_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = gerenjianli.getbyparams(gerenjianli, gerenjianli, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= gerenjianli.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, gerenjianli, req_dict)
+
+
+def gerenjianli_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def gerenjianli_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= gerenjianli.getallcolumn( gerenjianli, gerenjianli)
+
+ try:
+ __loginUserColumn__= gerenjianli.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''gerenjianli.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def gerenjianli_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = gerenjianli.getbyparams(gerenjianli, gerenjianli, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def gerenjianli_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=gerenjianli.getbyparams(gerenjianli, gerenjianli, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def gerenjianli_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gerenjianli.getallcolumn( gerenjianli, gerenjianli)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=gerenjianli.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=gerenjianli.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'gerenjianli'[:7]!='discuss'and "userid" in gerenjianli.getallcolumn(gerenjianli,gerenjianli):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=gerenjianli.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =gerenjianli.page(gerenjianli, gerenjianli, req_dict)
+
+ return JsonResponse(msg)
+
+def gerenjianli_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in gerenjianli.getallcolumn(gerenjianli,gerenjianli):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = gerenjianli.page(gerenjianli,gerenjianli, req_dict)
+
+ return JsonResponse(msg)
+
+
+def gerenjianli_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gerenjianli.getallcolumn( gerenjianli, gerenjianli)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=gerenjianli.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=gerenjianli.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=gerenjianli.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=gerenjianli.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if gerenjianli.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = gerenjianli.page(gerenjianli, gerenjianli, req_dict)
+
+ return JsonResponse(msg)
+
+def gerenjianli_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= gerenjianli.getallcolumn( gerenjianli, gerenjianli)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= gerenjianli.createbyreq(gerenjianli,gerenjianli, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def gerenjianli_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gerenjianli.getallcolumn( gerenjianli, gerenjianli)
+ try:
+ __authSeparate__=gerenjianli.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=gerenjianli.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= gerenjianli.createbyreq(gerenjianli,gerenjianli, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def gerenjianli_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=gerenjianli.getbyid(gerenjianli,gerenjianli,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = gerenjianli.updatebyparams(gerenjianli,gerenjianli, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gerenjianli_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = gerenjianli.getbyid(gerenjianli,gerenjianli, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= gerenjianli.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in gerenjianli.getallcolumn(gerenjianli,gerenjianli):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=gerenjianli.updatebyparams(gerenjianli,gerenjianli,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def gerenjianli_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =gerenjianli.getbyid(gerenjianli,gerenjianli, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= gerenjianli.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in gerenjianli.getallcolumn(gerenjianli,gerenjianli):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=gerenjianli.updatebyparams(gerenjianli,gerenjianli,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def gerenjianli_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in gerenjianli.getallcolumn(gerenjianli,gerenjianli) :
+ del req_dict["mima"]
+ if "password" not in gerenjianli.getallcolumn(gerenjianli,gerenjianli) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = gerenjianli.updatebyparams(gerenjianli, gerenjianli, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gerenjianli_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=gerenjianli.deletes(gerenjianli,
+ gerenjianli,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gerenjianli_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= gerenjianli.getbyid(gerenjianli, gerenjianli, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=gerenjianli.updatebyparams(gerenjianli,gerenjianli,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def gerenjianli_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ gerenjianli.createbyreq(gerenjianli, gerenjianli, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def gerenjianli_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def gerenjianli_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'gerenjianli' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from gerenjianli where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from gerenjianli where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def gerenjianli_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM gerenjianli {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM gerenjianli {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM gerenjianli {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def gerenjianli_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+
+ sql = "SELECT {0}, sum({1}) AS total FROM gerenjianli {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def gerenjianli_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/gerenjianli/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def gerenjianli_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/gerenjianli')
+
+
diff --git a/django3qu6u/main/Gongsi_v.py b/django3qu6u/main/Gongsi_v.py
new file mode 100644
index 0000000..ca45e6e
--- /dev/null
+++ b/django3qu6u/main/Gongsi_v.py
@@ -0,0 +1,717 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import gongsi
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def gongsi_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = gongsi.createbyreq(gongsi, gongsi, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def gongsi_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = gongsi.getbyparams(gongsi, gongsi, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= gongsi.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, gongsi, req_dict)
+
+
+def gongsi_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def gongsi_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= gongsi.getallcolumn( gongsi, gongsi)
+
+ try:
+ __loginUserColumn__= gongsi.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''gongsi.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def gongsi_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = gongsi.getbyparams(gongsi, gongsi, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def gongsi_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=gongsi.getbyparams(gongsi, gongsi, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def gongsi_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gongsi.getallcolumn( gongsi, gongsi)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=gongsi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=gongsi.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'gongsi'[:7]!='discuss'and "userid" in gongsi.getallcolumn(gongsi,gongsi):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=gongsi.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =gongsi.page(gongsi, gongsi, req_dict)
+
+ return JsonResponse(msg)
+
+def gongsi_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in gongsi.getallcolumn(gongsi,gongsi):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = gongsi.page(gongsi,gongsi, req_dict)
+
+ return JsonResponse(msg)
+
+
+def gongsi_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gongsi.getallcolumn( gongsi, gongsi)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=gongsi.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=gongsi.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=gongsi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=gongsi.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if gongsi.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = gongsi.page(gongsi, gongsi, req_dict)
+
+ return JsonResponse(msg)
+
+def gongsi_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= gongsi.getallcolumn( gongsi, gongsi)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= gongsi.createbyreq(gongsi,gongsi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def gongsi_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gongsi.getallcolumn( gongsi, gongsi)
+ try:
+ __authSeparate__=gongsi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=gongsi.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= gongsi.createbyreq(gongsi,gongsi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def gongsi_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=gongsi.getbyid(gongsi,gongsi,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = gongsi.updatebyparams(gongsi,gongsi, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gongsi_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = gongsi.getbyid(gongsi,gongsi, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= gongsi.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in gongsi.getallcolumn(gongsi,gongsi):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=gongsi.updatebyparams(gongsi,gongsi,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def gongsi_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =gongsi.getbyid(gongsi,gongsi, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= gongsi.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in gongsi.getallcolumn(gongsi,gongsi):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=gongsi.updatebyparams(gongsi,gongsi,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def gongsi_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in gongsi.getallcolumn(gongsi,gongsi) :
+ del req_dict["mima"]
+ if "password" not in gongsi.getallcolumn(gongsi,gongsi) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = gongsi.updatebyparams(gongsi, gongsi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gongsi_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=gongsi.deletes(gongsi,
+ gongsi,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gongsi_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= gongsi.getbyid(gongsi, gongsi, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=gongsi.updatebyparams(gongsi,gongsi,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def gongsi_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ gongsi.createbyreq(gongsi, gongsi, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def gongsi_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def gongsi_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'gongsi' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from gongsi where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from gongsi where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def gongsi_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM gongsi {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM gongsi {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM gongsi {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def gongsi_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+
+ sql = "SELECT {0}, sum({1}) AS total FROM gongsi {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def gongsi_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/gongsi/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def gongsi_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/gongsi')
+
+
diff --git a/django3qu6u/main/Gongsixinxi_v.py b/django3qu6u/main/Gongsixinxi_v.py
new file mode 100644
index 0000000..d09f4d9
--- /dev/null
+++ b/django3qu6u/main/Gongsixinxi_v.py
@@ -0,0 +1,725 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import gongsixinxi
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def gongsixinxi_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = gongsixinxi.createbyreq(gongsixinxi, gongsixinxi, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def gongsixinxi_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = gongsixinxi.getbyparams(gongsixinxi, gongsixinxi, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= gongsixinxi.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, gongsixinxi, req_dict)
+
+
+def gongsixinxi_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def gongsixinxi_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= gongsixinxi.getallcolumn( gongsixinxi, gongsixinxi)
+
+ try:
+ __loginUserColumn__= gongsixinxi.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''gongsixinxi.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def gongsixinxi_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = gongsixinxi.getbyparams(gongsixinxi, gongsixinxi, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def gongsixinxi_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=gongsixinxi.getbyparams(gongsixinxi, gongsixinxi, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def gongsixinxi_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gongsixinxi.getallcolumn( gongsixinxi, gongsixinxi)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=gongsixinxi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=gongsixinxi.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'gongsixinxi'[:7]!='discuss'and "userid" in gongsixinxi.getallcolumn(gongsixinxi,gongsixinxi):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=gongsixinxi.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =gongsixinxi.page(gongsixinxi, gongsixinxi, req_dict)
+
+ return JsonResponse(msg)
+
+def gongsixinxi_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in gongsixinxi.getallcolumn(gongsixinxi,gongsixinxi):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = gongsixinxi.page(gongsixinxi,gongsixinxi, req_dict)
+
+ return JsonResponse(msg)
+
+
+def gongsixinxi_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gongsixinxi.getallcolumn( gongsixinxi, gongsixinxi)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=gongsixinxi.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=gongsixinxi.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=gongsixinxi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=gongsixinxi.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if gongsixinxi.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = gongsixinxi.page(gongsixinxi, gongsixinxi, req_dict)
+
+ return JsonResponse(msg)
+
+def gongsixinxi_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= gongsixinxi.getallcolumn( gongsixinxi, gongsixinxi)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= gongsixinxi.createbyreq(gongsixinxi,gongsixinxi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def gongsixinxi_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= gongsixinxi.getallcolumn( gongsixinxi, gongsixinxi)
+ try:
+ __authSeparate__=gongsixinxi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=gongsixinxi.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= gongsixinxi.createbyreq(gongsixinxi,gongsixinxi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def gongsixinxi_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=gongsixinxi.getbyid(gongsixinxi,gongsixinxi,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = gongsixinxi.updatebyparams(gongsixinxi,gongsixinxi, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gongsixinxi_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = gongsixinxi.getbyid(gongsixinxi,gongsixinxi, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= gongsixinxi.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in gongsixinxi.getallcolumn(gongsixinxi,gongsixinxi):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=gongsixinxi.updatebyparams(gongsixinxi,gongsixinxi,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def gongsixinxi_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =gongsixinxi.getbyid(gongsixinxi,gongsixinxi, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= gongsixinxi.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in gongsixinxi.getallcolumn(gongsixinxi,gongsixinxi):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=gongsixinxi.updatebyparams(gongsixinxi,gongsixinxi,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def gongsixinxi_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in gongsixinxi.getallcolumn(gongsixinxi,gongsixinxi) :
+ del req_dict["mima"]
+ if "password" not in gongsixinxi.getallcolumn(gongsixinxi,gongsixinxi) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = gongsixinxi.updatebyparams(gongsixinxi, gongsixinxi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gongsixinxi_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=gongsixinxi.deletes(gongsixinxi,
+ gongsixinxi,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def gongsixinxi_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= gongsixinxi.getbyid(gongsixinxi, gongsixinxi, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=gongsixinxi.updatebyparams(gongsixinxi,gongsixinxi,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def gongsixinxi_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ gongsixinxi.createbyreq(gongsixinxi, gongsixinxi, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def gongsixinxi_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def gongsixinxi_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'gongsixinxi' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from gongsixinxi where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from gongsixinxi where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def gongsixinxi_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM gongsixinxi {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM gongsixinxi {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM gongsixinxi {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def gongsixinxi_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+
+ sql = "SELECT {0}, sum({1}) AS total FROM gongsixinxi {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def gongsixinxi_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/gongsixinxi/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def gongsixinxi_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/gongsixinxi')
+
+
diff --git a/django3qu6u/main/Keshihua_v.py b/django3qu6u/main/Keshihua_v.py
new file mode 100644
index 0000000..279e140
--- /dev/null
+++ b/django3qu6u/main/Keshihua_v.py
@@ -0,0 +1,717 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import keshihua
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def keshihua_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = keshihua.createbyreq(keshihua, keshihua, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def keshihua_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = keshihua.getbyparams(keshihua, keshihua, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= keshihua.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, keshihua, req_dict)
+
+
+def keshihua_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def keshihua_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= keshihua.getallcolumn( keshihua, keshihua)
+
+ try:
+ __loginUserColumn__= keshihua.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''keshihua.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def keshihua_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = keshihua.getbyparams(keshihua, keshihua, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def keshihua_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=keshihua.getbyparams(keshihua, keshihua, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def keshihua_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= keshihua.getallcolumn( keshihua, keshihua)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=keshihua.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=keshihua.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'keshihua'[:7]!='discuss'and "userid" in keshihua.getallcolumn(keshihua,keshihua):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=keshihua.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =keshihua.page(keshihua, keshihua, req_dict)
+
+ return JsonResponse(msg)
+
+def keshihua_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in keshihua.getallcolumn(keshihua,keshihua):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = keshihua.page(keshihua,keshihua, req_dict)
+
+ return JsonResponse(msg)
+
+
+def keshihua_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= keshihua.getallcolumn( keshihua, keshihua)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=keshihua.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=keshihua.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=keshihua.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=keshihua.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if keshihua.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = keshihua.page(keshihua, keshihua, req_dict)
+
+ return JsonResponse(msg)
+
+def keshihua_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= keshihua.getallcolumn( keshihua, keshihua)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= keshihua.createbyreq(keshihua,keshihua, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def keshihua_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= keshihua.getallcolumn( keshihua, keshihua)
+ try:
+ __authSeparate__=keshihua.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=keshihua.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= keshihua.createbyreq(keshihua,keshihua, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def keshihua_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=keshihua.getbyid(keshihua,keshihua,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = keshihua.updatebyparams(keshihua,keshihua, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def keshihua_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = keshihua.getbyid(keshihua,keshihua, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= keshihua.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in keshihua.getallcolumn(keshihua,keshihua):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=keshihua.updatebyparams(keshihua,keshihua,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def keshihua_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =keshihua.getbyid(keshihua,keshihua, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= keshihua.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in keshihua.getallcolumn(keshihua,keshihua):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=keshihua.updatebyparams(keshihua,keshihua,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def keshihua_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in keshihua.getallcolumn(keshihua,keshihua) :
+ del req_dict["mima"]
+ if "password" not in keshihua.getallcolumn(keshihua,keshihua) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = keshihua.updatebyparams(keshihua, keshihua, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def keshihua_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=keshihua.deletes(keshihua,
+ keshihua,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def keshihua_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= keshihua.getbyid(keshihua, keshihua, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=keshihua.updatebyparams(keshihua,keshihua,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def keshihua_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ keshihua.createbyreq(keshihua, keshihua, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def keshihua_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def keshihua_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'keshihua' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from keshihua where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from keshihua where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def keshihua_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM keshihua {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM keshihua {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM keshihua {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def keshihua_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+
+ sql = "SELECT {0}, sum({1}) AS total FROM keshihua {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def keshihua_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/keshihua/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def keshihua_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/keshihua')
+
+
diff --git a/django3qu6u/main/Mianshijieguo_v.py b/django3qu6u/main/Mianshijieguo_v.py
new file mode 100644
index 0000000..aeb2bda
--- /dev/null
+++ b/django3qu6u/main/Mianshijieguo_v.py
@@ -0,0 +1,733 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import mianshijieguo
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def mianshijieguo_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = mianshijieguo.createbyreq(mianshijieguo, mianshijieguo, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def mianshijieguo_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = mianshijieguo.getbyparams(mianshijieguo, mianshijieguo, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= mianshijieguo.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, mianshijieguo, req_dict)
+
+
+def mianshijieguo_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def mianshijieguo_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= mianshijieguo.getallcolumn( mianshijieguo, mianshijieguo)
+
+ try:
+ __loginUserColumn__= mianshijieguo.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''mianshijieguo.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def mianshijieguo_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = mianshijieguo.getbyparams(mianshijieguo, mianshijieguo, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def mianshijieguo_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=mianshijieguo.getbyparams(mianshijieguo, mianshijieguo, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def mianshijieguo_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= mianshijieguo.getallcolumn( mianshijieguo, mianshijieguo)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=mianshijieguo.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=mianshijieguo.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'mianshijieguo'[:7]!='discuss'and "userid" in mianshijieguo.getallcolumn(mianshijieguo,mianshijieguo):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=mianshijieguo.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =mianshijieguo.page(mianshijieguo, mianshijieguo, req_dict)
+
+ return JsonResponse(msg)
+
+def mianshijieguo_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in mianshijieguo.getallcolumn(mianshijieguo,mianshijieguo):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = mianshijieguo.page(mianshijieguo,mianshijieguo, req_dict)
+
+ return JsonResponse(msg)
+
+
+def mianshijieguo_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= mianshijieguo.getallcolumn( mianshijieguo, mianshijieguo)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=mianshijieguo.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=mianshijieguo.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=mianshijieguo.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=mianshijieguo.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if mianshijieguo.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = mianshijieguo.page(mianshijieguo, mianshijieguo, req_dict)
+
+ return JsonResponse(msg)
+
+def mianshijieguo_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= mianshijieguo.getallcolumn( mianshijieguo, mianshijieguo)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= mianshijieguo.createbyreq(mianshijieguo,mianshijieguo, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def mianshijieguo_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= mianshijieguo.getallcolumn( mianshijieguo, mianshijieguo)
+ try:
+ __authSeparate__=mianshijieguo.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=mianshijieguo.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= mianshijieguo.createbyreq(mianshijieguo,mianshijieguo, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def mianshijieguo_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=mianshijieguo.getbyid(mianshijieguo,mianshijieguo,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = mianshijieguo.updatebyparams(mianshijieguo,mianshijieguo, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def mianshijieguo_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = mianshijieguo.getbyid(mianshijieguo,mianshijieguo, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= mianshijieguo.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in mianshijieguo.getallcolumn(mianshijieguo,mianshijieguo):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=mianshijieguo.updatebyparams(mianshijieguo,mianshijieguo,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def mianshijieguo_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =mianshijieguo.getbyid(mianshijieguo,mianshijieguo, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= mianshijieguo.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in mianshijieguo.getallcolumn(mianshijieguo,mianshijieguo):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=mianshijieguo.updatebyparams(mianshijieguo,mianshijieguo,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def mianshijieguo_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in mianshijieguo.getallcolumn(mianshijieguo,mianshijieguo) :
+ del req_dict["mima"]
+ if "password" not in mianshijieguo.getallcolumn(mianshijieguo,mianshijieguo) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = mianshijieguo.updatebyparams(mianshijieguo, mianshijieguo, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def mianshijieguo_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=mianshijieguo.deletes(mianshijieguo,
+ mianshijieguo,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def mianshijieguo_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= mianshijieguo.getbyid(mianshijieguo, mianshijieguo, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=mianshijieguo.updatebyparams(mianshijieguo,mianshijieguo,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def mianshijieguo_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ mianshijieguo.createbyreq(mianshijieguo, mianshijieguo, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def mianshijieguo_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def mianshijieguo_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'mianshijieguo' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from mianshijieguo where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from mianshijieguo where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def mianshijieguo_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM mianshijieguo {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM mianshijieguo {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM mianshijieguo {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def mianshijieguo_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+
+ sql = "SELECT {0}, sum({1}) AS total FROM mianshijieguo {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def mianshijieguo_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/mianshijieguo/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def mianshijieguo_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/mianshijieguo')
+
+
diff --git a/django3qu6u/main/Mianshiyaoqing_v.py b/django3qu6u/main/Mianshiyaoqing_v.py
new file mode 100644
index 0000000..49c8bdc
--- /dev/null
+++ b/django3qu6u/main/Mianshiyaoqing_v.py
@@ -0,0 +1,733 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import mianshiyaoqing
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def mianshiyaoqing_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = mianshiyaoqing.createbyreq(mianshiyaoqing, mianshiyaoqing, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def mianshiyaoqing_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = mianshiyaoqing.getbyparams(mianshiyaoqing, mianshiyaoqing, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= mianshiyaoqing.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, mianshiyaoqing, req_dict)
+
+
+def mianshiyaoqing_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= mianshiyaoqing.getallcolumn( mianshiyaoqing, mianshiyaoqing)
+
+ try:
+ __loginUserColumn__= mianshiyaoqing.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''mianshiyaoqing.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def mianshiyaoqing_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = mianshiyaoqing.getbyparams(mianshiyaoqing, mianshiyaoqing, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=mianshiyaoqing.getbyparams(mianshiyaoqing, mianshiyaoqing, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def mianshiyaoqing_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= mianshiyaoqing.getallcolumn( mianshiyaoqing, mianshiyaoqing)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=mianshiyaoqing.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=mianshiyaoqing.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'mianshiyaoqing'[:7]!='discuss'and "userid" in mianshiyaoqing.getallcolumn(mianshiyaoqing,mianshiyaoqing):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=mianshiyaoqing.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =mianshiyaoqing.page(mianshiyaoqing, mianshiyaoqing, req_dict)
+
+ return JsonResponse(msg)
+
+def mianshiyaoqing_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in mianshiyaoqing.getallcolumn(mianshiyaoqing,mianshiyaoqing):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = mianshiyaoqing.page(mianshiyaoqing,mianshiyaoqing, req_dict)
+
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= mianshiyaoqing.getallcolumn( mianshiyaoqing, mianshiyaoqing)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=mianshiyaoqing.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=mianshiyaoqing.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=mianshiyaoqing.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=mianshiyaoqing.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if mianshiyaoqing.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = mianshiyaoqing.page(mianshiyaoqing, mianshiyaoqing, req_dict)
+
+ return JsonResponse(msg)
+
+def mianshiyaoqing_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= mianshiyaoqing.getallcolumn( mianshiyaoqing, mianshiyaoqing)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= mianshiyaoqing.createbyreq(mianshiyaoqing,mianshiyaoqing, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= mianshiyaoqing.getallcolumn( mianshiyaoqing, mianshiyaoqing)
+ try:
+ __authSeparate__=mianshiyaoqing.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=mianshiyaoqing.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= mianshiyaoqing.createbyreq(mianshiyaoqing,mianshiyaoqing, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def mianshiyaoqing_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=mianshiyaoqing.getbyid(mianshiyaoqing,mianshiyaoqing,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = mianshiyaoqing.updatebyparams(mianshiyaoqing,mianshiyaoqing, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = mianshiyaoqing.getbyid(mianshiyaoqing,mianshiyaoqing, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= mianshiyaoqing.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in mianshiyaoqing.getallcolumn(mianshiyaoqing,mianshiyaoqing):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=mianshiyaoqing.updatebyparams(mianshiyaoqing,mianshiyaoqing,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def mianshiyaoqing_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =mianshiyaoqing.getbyid(mianshiyaoqing,mianshiyaoqing, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= mianshiyaoqing.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in mianshiyaoqing.getallcolumn(mianshiyaoqing,mianshiyaoqing):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=mianshiyaoqing.updatebyparams(mianshiyaoqing,mianshiyaoqing,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in mianshiyaoqing.getallcolumn(mianshiyaoqing,mianshiyaoqing) :
+ del req_dict["mima"]
+ if "password" not in mianshiyaoqing.getallcolumn(mianshiyaoqing,mianshiyaoqing) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = mianshiyaoqing.updatebyparams(mianshiyaoqing, mianshiyaoqing, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=mianshiyaoqing.deletes(mianshiyaoqing,
+ mianshiyaoqing,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def mianshiyaoqing_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= mianshiyaoqing.getbyid(mianshiyaoqing, mianshiyaoqing, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=mianshiyaoqing.updatebyparams(mianshiyaoqing,mianshiyaoqing,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def mianshiyaoqing_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ mianshiyaoqing.createbyreq(mianshiyaoqing, mianshiyaoqing, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def mianshiyaoqing_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def mianshiyaoqing_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'mianshiyaoqing' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from mianshiyaoqing where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from mianshiyaoqing where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def mianshiyaoqing_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM mianshiyaoqing {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM mianshiyaoqing {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM mianshiyaoqing {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def mianshiyaoqing_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+
+ sql = "SELECT {0}, sum({1}) AS total FROM mianshiyaoqing {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def mianshiyaoqing_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/mianshiyaoqing/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def mianshiyaoqing_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/mianshiyaoqing')
+
+
diff --git a/django3qu6u/main/Qiuzhizhe_v.py b/django3qu6u/main/Qiuzhizhe_v.py
new file mode 100644
index 0000000..f34f495
--- /dev/null
+++ b/django3qu6u/main/Qiuzhizhe_v.py
@@ -0,0 +1,717 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import qiuzhizhe
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def qiuzhizhe_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = qiuzhizhe.createbyreq(qiuzhizhe, qiuzhizhe, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def qiuzhizhe_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = qiuzhizhe.getbyparams(qiuzhizhe, qiuzhizhe, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= qiuzhizhe.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, qiuzhizhe, req_dict)
+
+
+def qiuzhizhe_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= qiuzhizhe.getallcolumn( qiuzhizhe, qiuzhizhe)
+
+ try:
+ __loginUserColumn__= qiuzhizhe.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''qiuzhizhe.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def qiuzhizhe_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = qiuzhizhe.getbyparams(qiuzhizhe, qiuzhizhe, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=qiuzhizhe.getbyparams(qiuzhizhe, qiuzhizhe, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def qiuzhizhe_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= qiuzhizhe.getallcolumn( qiuzhizhe, qiuzhizhe)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=qiuzhizhe.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=qiuzhizhe.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'qiuzhizhe'[:7]!='discuss'and "userid" in qiuzhizhe.getallcolumn(qiuzhizhe,qiuzhizhe):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=qiuzhizhe.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =qiuzhizhe.page(qiuzhizhe, qiuzhizhe, req_dict)
+
+ return JsonResponse(msg)
+
+def qiuzhizhe_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in qiuzhizhe.getallcolumn(qiuzhizhe,qiuzhizhe):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = qiuzhizhe.page(qiuzhizhe,qiuzhizhe, req_dict)
+
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= qiuzhizhe.getallcolumn( qiuzhizhe, qiuzhizhe)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=qiuzhizhe.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=qiuzhizhe.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=qiuzhizhe.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=qiuzhizhe.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if qiuzhizhe.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = qiuzhizhe.page(qiuzhizhe, qiuzhizhe, req_dict)
+
+ return JsonResponse(msg)
+
+def qiuzhizhe_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= qiuzhizhe.getallcolumn( qiuzhizhe, qiuzhizhe)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= qiuzhizhe.createbyreq(qiuzhizhe,qiuzhizhe, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= qiuzhizhe.getallcolumn( qiuzhizhe, qiuzhizhe)
+ try:
+ __authSeparate__=qiuzhizhe.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=qiuzhizhe.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= qiuzhizhe.createbyreq(qiuzhizhe,qiuzhizhe, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def qiuzhizhe_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=qiuzhizhe.getbyid(qiuzhizhe,qiuzhizhe,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = qiuzhizhe.updatebyparams(qiuzhizhe,qiuzhizhe, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = qiuzhizhe.getbyid(qiuzhizhe,qiuzhizhe, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= qiuzhizhe.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in qiuzhizhe.getallcolumn(qiuzhizhe,qiuzhizhe):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=qiuzhizhe.updatebyparams(qiuzhizhe,qiuzhizhe,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def qiuzhizhe_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =qiuzhizhe.getbyid(qiuzhizhe,qiuzhizhe, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= qiuzhizhe.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in qiuzhizhe.getallcolumn(qiuzhizhe,qiuzhizhe):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=qiuzhizhe.updatebyparams(qiuzhizhe,qiuzhizhe,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in qiuzhizhe.getallcolumn(qiuzhizhe,qiuzhizhe) :
+ del req_dict["mima"]
+ if "password" not in qiuzhizhe.getallcolumn(qiuzhizhe,qiuzhizhe) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = qiuzhizhe.updatebyparams(qiuzhizhe, qiuzhizhe, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=qiuzhizhe.deletes(qiuzhizhe,
+ qiuzhizhe,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def qiuzhizhe_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= qiuzhizhe.getbyid(qiuzhizhe, qiuzhizhe, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=qiuzhizhe.updatebyparams(qiuzhizhe,qiuzhizhe,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def qiuzhizhe_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ qiuzhizhe.createbyreq(qiuzhizhe, qiuzhizhe, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def qiuzhizhe_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def qiuzhizhe_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'qiuzhizhe' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from qiuzhizhe where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from qiuzhizhe where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def qiuzhizhe_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM qiuzhizhe {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM qiuzhizhe {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM qiuzhizhe {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def qiuzhizhe_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+
+ sql = "SELECT {0}, sum({1}) AS total FROM qiuzhizhe {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def qiuzhizhe_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/qiuzhizhe/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def qiuzhizhe_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/qiuzhizhe')
+
+
diff --git a/django3qu6u/main/Storeup_v.py b/django3qu6u/main/Storeup_v.py
new file mode 100644
index 0000000..1dfd757
--- /dev/null
+++ b/django3qu6u/main/Storeup_v.py
@@ -0,0 +1,717 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import storeup
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def storeup_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = storeup.createbyreq(storeup, storeup, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def storeup_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = storeup.getbyparams(storeup, storeup, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= storeup.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, storeup, req_dict)
+
+
+def storeup_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def storeup_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= storeup.getallcolumn( storeup, storeup)
+
+ try:
+ __loginUserColumn__= storeup.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''storeup.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def storeup_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = storeup.getbyparams(storeup, storeup, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def storeup_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=storeup.getbyparams(storeup, storeup, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def storeup_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= storeup.getallcolumn( storeup, storeup)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=storeup.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=storeup.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'storeup'[:7]!='discuss'and "userid" in storeup.getallcolumn(storeup,storeup):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=storeup.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =storeup.page(storeup, storeup, req_dict)
+
+ return JsonResponse(msg)
+
+def storeup_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in storeup.getallcolumn(storeup,storeup):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = storeup.page(storeup,storeup, req_dict)
+
+ return JsonResponse(msg)
+
+
+def storeup_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= storeup.getallcolumn( storeup, storeup)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=storeup.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=storeup.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=storeup.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=storeup.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if storeup.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = storeup.page(storeup, storeup, req_dict)
+
+ return JsonResponse(msg)
+
+def storeup_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= storeup.getallcolumn( storeup, storeup)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= storeup.createbyreq(storeup,storeup, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def storeup_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= storeup.getallcolumn( storeup, storeup)
+ try:
+ __authSeparate__=storeup.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=storeup.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= storeup.createbyreq(storeup,storeup, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def storeup_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=storeup.getbyid(storeup,storeup,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = storeup.updatebyparams(storeup,storeup, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def storeup_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = storeup.getbyid(storeup,storeup, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= storeup.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in storeup.getallcolumn(storeup,storeup):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=storeup.updatebyparams(storeup,storeup,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def storeup_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =storeup.getbyid(storeup,storeup, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= storeup.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in storeup.getallcolumn(storeup,storeup):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=storeup.updatebyparams(storeup,storeup,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def storeup_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in storeup.getallcolumn(storeup,storeup) :
+ del req_dict["mima"]
+ if "password" not in storeup.getallcolumn(storeup,storeup) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = storeup.updatebyparams(storeup, storeup, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def storeup_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=storeup.deletes(storeup,
+ storeup,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def storeup_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= storeup.getbyid(storeup, storeup, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=storeup.updatebyparams(storeup,storeup,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def storeup_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ storeup.createbyreq(storeup, storeup, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def storeup_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def storeup_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'storeup' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from storeup where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from storeup where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def storeup_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM storeup {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM storeup {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM storeup {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def storeup_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+
+ sql = "SELECT {0}, sum({1}) AS total FROM storeup {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def storeup_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/storeup/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def storeup_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/storeup')
+
+
diff --git a/django3qu6u/main/Tongzhigonggao_v.py b/django3qu6u/main/Tongzhigonggao_v.py
new file mode 100644
index 0000000..3cd7b5b
--- /dev/null
+++ b/django3qu6u/main/Tongzhigonggao_v.py
@@ -0,0 +1,717 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import tongzhigonggao
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def tongzhigonggao_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = tongzhigonggao.createbyreq(tongzhigonggao, tongzhigonggao, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def tongzhigonggao_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = tongzhigonggao.getbyparams(tongzhigonggao, tongzhigonggao, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= tongzhigonggao.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, tongzhigonggao, req_dict)
+
+
+def tongzhigonggao_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= tongzhigonggao.getallcolumn( tongzhigonggao, tongzhigonggao)
+
+ try:
+ __loginUserColumn__= tongzhigonggao.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''tongzhigonggao.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def tongzhigonggao_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = tongzhigonggao.getbyparams(tongzhigonggao, tongzhigonggao, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=tongzhigonggao.getbyparams(tongzhigonggao, tongzhigonggao, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def tongzhigonggao_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= tongzhigonggao.getallcolumn( tongzhigonggao, tongzhigonggao)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=tongzhigonggao.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=tongzhigonggao.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'tongzhigonggao'[:7]!='discuss'and "userid" in tongzhigonggao.getallcolumn(tongzhigonggao,tongzhigonggao):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=tongzhigonggao.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =tongzhigonggao.page(tongzhigonggao, tongzhigonggao, req_dict)
+
+ return JsonResponse(msg)
+
+def tongzhigonggao_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in tongzhigonggao.getallcolumn(tongzhigonggao,tongzhigonggao):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = tongzhigonggao.page(tongzhigonggao,tongzhigonggao, req_dict)
+
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= tongzhigonggao.getallcolumn( tongzhigonggao, tongzhigonggao)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=tongzhigonggao.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=tongzhigonggao.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=tongzhigonggao.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=tongzhigonggao.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if tongzhigonggao.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = tongzhigonggao.page(tongzhigonggao, tongzhigonggao, req_dict)
+
+ return JsonResponse(msg)
+
+def tongzhigonggao_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= tongzhigonggao.getallcolumn( tongzhigonggao, tongzhigonggao)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= tongzhigonggao.createbyreq(tongzhigonggao,tongzhigonggao, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= tongzhigonggao.getallcolumn( tongzhigonggao, tongzhigonggao)
+ try:
+ __authSeparate__=tongzhigonggao.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=tongzhigonggao.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= tongzhigonggao.createbyreq(tongzhigonggao,tongzhigonggao, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def tongzhigonggao_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=tongzhigonggao.getbyid(tongzhigonggao,tongzhigonggao,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = tongzhigonggao.updatebyparams(tongzhigonggao,tongzhigonggao, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = tongzhigonggao.getbyid(tongzhigonggao,tongzhigonggao, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= tongzhigonggao.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in tongzhigonggao.getallcolumn(tongzhigonggao,tongzhigonggao):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=tongzhigonggao.updatebyparams(tongzhigonggao,tongzhigonggao,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def tongzhigonggao_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =tongzhigonggao.getbyid(tongzhigonggao,tongzhigonggao, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= tongzhigonggao.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in tongzhigonggao.getallcolumn(tongzhigonggao,tongzhigonggao):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=tongzhigonggao.updatebyparams(tongzhigonggao,tongzhigonggao,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in tongzhigonggao.getallcolumn(tongzhigonggao,tongzhigonggao) :
+ del req_dict["mima"]
+ if "password" not in tongzhigonggao.getallcolumn(tongzhigonggao,tongzhigonggao) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = tongzhigonggao.updatebyparams(tongzhigonggao, tongzhigonggao, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=tongzhigonggao.deletes(tongzhigonggao,
+ tongzhigonggao,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def tongzhigonggao_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= tongzhigonggao.getbyid(tongzhigonggao, tongzhigonggao, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=tongzhigonggao.updatebyparams(tongzhigonggao,tongzhigonggao,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def tongzhigonggao_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ tongzhigonggao.createbyreq(tongzhigonggao, tongzhigonggao, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def tongzhigonggao_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def tongzhigonggao_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'tongzhigonggao' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from tongzhigonggao where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from tongzhigonggao where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def tongzhigonggao_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM tongzhigonggao {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM tongzhigonggao {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM tongzhigonggao {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def tongzhigonggao_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+
+ sql = "SELECT {0}, sum({1}) AS total FROM tongzhigonggao {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def tongzhigonggao_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/tongzhigonggao/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def tongzhigonggao_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/tongzhigonggao')
+
+
diff --git a/django3qu6u/main/Toudijianli_v.py b/django3qu6u/main/Toudijianli_v.py
new file mode 100644
index 0000000..f584fb9
--- /dev/null
+++ b/django3qu6u/main/Toudijianli_v.py
@@ -0,0 +1,733 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import toudijianli
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def toudijianli_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = toudijianli.createbyreq(toudijianli, toudijianli, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def toudijianli_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = toudijianli.getbyparams(toudijianli, toudijianli, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= toudijianli.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, toudijianli, req_dict)
+
+
+def toudijianli_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def toudijianli_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= toudijianli.getallcolumn( toudijianli, toudijianli)
+
+ try:
+ __loginUserColumn__= toudijianli.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''toudijianli.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def toudijianli_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = toudijianli.getbyparams(toudijianli, toudijianli, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def toudijianli_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=toudijianli.getbyparams(toudijianli, toudijianli, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def toudijianli_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= toudijianli.getallcolumn( toudijianli, toudijianli)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=toudijianli.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=toudijianli.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'toudijianli'[:7]!='discuss'and "userid" in toudijianli.getallcolumn(toudijianli,toudijianli):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=toudijianli.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =toudijianli.page(toudijianli, toudijianli, req_dict)
+
+ return JsonResponse(msg)
+
+def toudijianli_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in toudijianli.getallcolumn(toudijianli,toudijianli):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = toudijianli.page(toudijianli,toudijianli, req_dict)
+
+ return JsonResponse(msg)
+
+
+def toudijianli_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= toudijianli.getallcolumn( toudijianli, toudijianli)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=toudijianli.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=toudijianli.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=toudijianli.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=toudijianli.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if toudijianli.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = toudijianli.page(toudijianli, toudijianli, req_dict)
+
+ return JsonResponse(msg)
+
+def toudijianli_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= toudijianli.getallcolumn( toudijianli, toudijianli)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= toudijianli.createbyreq(toudijianli,toudijianli, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def toudijianli_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= toudijianli.getallcolumn( toudijianli, toudijianli)
+ try:
+ __authSeparate__=toudijianli.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=toudijianli.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= toudijianli.createbyreq(toudijianli,toudijianli, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def toudijianli_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=toudijianli.getbyid(toudijianli,toudijianli,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = toudijianli.updatebyparams(toudijianli,toudijianli, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def toudijianli_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = toudijianli.getbyid(toudijianli,toudijianli, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= toudijianli.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in toudijianli.getallcolumn(toudijianli,toudijianli):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=toudijianli.updatebyparams(toudijianli,toudijianli,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def toudijianli_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =toudijianli.getbyid(toudijianli,toudijianli, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= toudijianli.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in toudijianli.getallcolumn(toudijianli,toudijianli):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=toudijianli.updatebyparams(toudijianli,toudijianli,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def toudijianli_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in toudijianli.getallcolumn(toudijianli,toudijianli) :
+ del req_dict["mima"]
+ if "password" not in toudijianli.getallcolumn(toudijianli,toudijianli) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = toudijianli.updatebyparams(toudijianli, toudijianli, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def toudijianli_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=toudijianli.deletes(toudijianli,
+ toudijianli,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def toudijianli_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= toudijianli.getbyid(toudijianli, toudijianli, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=toudijianli.updatebyparams(toudijianli,toudijianli,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def toudijianli_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ toudijianli.createbyreq(toudijianli, toudijianli, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def toudijianli_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def toudijianli_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'toudijianli' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from toudijianli where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from toudijianli where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def toudijianli_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM toudijianli {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM toudijianli {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM toudijianli {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def toudijianli_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and zhanghao ='{0}' ".format(decode_str['params']['zhanghao'])
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+
+ sql = "SELECT {0}, sum({1}) AS total FROM toudijianli {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def toudijianli_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/toudijianli/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def toudijianli_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/toudijianli')
+
+
diff --git a/django3qu6u/main/Zhaopinxinxi_v.py b/django3qu6u/main/Zhaopinxinxi_v.py
new file mode 100644
index 0000000..538c383
--- /dev/null
+++ b/django3qu6u/main/Zhaopinxinxi_v.py
@@ -0,0 +1,725 @@
+#coding:utf-8
+__author__ = "ila"
+import base64, copy, logging, os, time, xlrd
+from django.http import JsonResponse
+from django.apps import apps
+from django.db.models.aggregates import Count,Sum
+from .models import zhaopinxinxi
+from util.codes import *
+from util.auth import Auth
+from util.common import Common
+import util.message as mes
+from django.db import connection
+import random
+from django.core.mail import send_mail
+from alipay import AliPayConfig, AliPay
+from django.conf import settings
+from django.shortcuts import redirect
+
+def zhaopinxinxi_register(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+
+ error = zhaopinxinxi.createbyreq(zhaopinxinxi, zhaopinxinxi, req_dict)
+ if error != None:
+ msg['code'] = crud_error_code
+ msg['msg'] = "用户已存在,请勿重复注册!"
+ return JsonResponse(msg)
+
+def zhaopinxinxi_login(request):
+ if request.method in ["POST", "GET"]:
+ msg = {'code': normal_code, "msg": mes.normal_code}
+ req_dict = request.session.get("req_dict")
+
+ datas = zhaopinxinxi.getbyparams(zhaopinxinxi, zhaopinxinxi, req_dict)
+ if not datas:
+ msg['code'] = password_error_code
+ msg['msg'] = mes.password_error_code
+ return JsonResponse(msg)
+ try:
+ __sfsh__= zhaopinxinxi.__sfsh__
+ except:
+ __sfsh__=None
+
+ if __sfsh__=='是':
+ if datas[0].get('sfsh')=='否':
+ msg['code']=other_code
+ msg['msg'] = "账号已锁定,请联系管理员审核!"
+ return JsonResponse(msg)
+
+ req_dict['id'] = datas[0].get('id')
+ return Auth.authenticate(Auth, zhaopinxinxi, req_dict)
+
+
+def zhaopinxinxi_logout(request):
+ if request.method in ["POST", "GET"]:
+ msg = {
+ "msg": "登出成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_resetPass(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+ req_dict = request.session.get("req_dict")
+
+ columns= zhaopinxinxi.getallcolumn( zhaopinxinxi, zhaopinxinxi)
+
+ try:
+ __loginUserColumn__= zhaopinxinxi.__loginUserColumn__
+ except:
+ __loginUserColumn__=None
+ username=req_dict.get(list(req_dict.keys())[0])
+ if __loginUserColumn__:
+ username_str=__loginUserColumn__
+ else:
+ username_str=username
+ if 'mima' in columns:
+ password_str='mima'
+ else:
+ password_str='password'
+
+ init_pwd = '123456'
+
+ eval('''zhaopinxinxi.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
+
+ return JsonResponse(msg)
+
+
+
+def zhaopinxinxi_session(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+
+ req_dict={"id":request.session.get('params').get("id")}
+ msg['data'] = zhaopinxinxi.getbyparams(zhaopinxinxi, zhaopinxinxi, req_dict)[0]
+
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_default(request):
+
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ req_dict.update({"isdefault":"是"})
+ data=zhaopinxinxi.getbyparams(zhaopinxinxi, zhaopinxinxi, req_dict)
+ if len(data)>0:
+ msg['data'] = data[0]
+ else:
+ msg['data'] = {}
+ return JsonResponse(msg)
+
+def zhaopinxinxi_page(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= zhaopinxinxi.getallcolumn( zhaopinxinxi, zhaopinxinxi)
+
+ #当前登录用户所在表
+ tablename = request.session.get("tablename")
+
+
+ #authColumn=list(__authTables__.keys())[0]
+ #authTable=__authTables__.get(authColumn)
+
+ # if authTable==tablename:
+ #params = request.session.get("params")
+ #req_dict[authColumn]=params.get(authColumn)
+
+ '''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
+ try:
+ __authSeparate__=zhaopinxinxi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ #当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
+ #接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
+ try:
+ __hasMessage__=zhaopinxinxi.__hasMessage__
+ except:
+ __hasMessage__=None
+ if __hasMessage__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict["userid"]=request.session.get("params").get("id")
+
+
+
+ # 判断当前表的表属性isAdmin,为真则是管理员表
+ # 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ # 当前表也是有管理员权限的表
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if tablename!="users" and 'zhaopinxinxi'[:7]!='discuss'and "userid" in zhaopinxinxi.getallcolumn(zhaopinxinxi,zhaopinxinxi):
+ req_dict["userid"] = request.session.get("params").get("id")
+
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=zhaopinxinxi.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={}:
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] =zhaopinxinxi.page(zhaopinxinxi, zhaopinxinxi, req_dict)
+
+ return JsonResponse(msg)
+
+def zhaopinxinxi_autoSort(request):
+ '''
+ .智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
+主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+ if "clicknum" in zhaopinxinxi.getallcolumn(zhaopinxinxi,zhaopinxinxi):
+ req_dict['sort']='clicknum'
+ else:
+ req_dict['sort']='clicktime'
+ req_dict['order']='desc'
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = zhaopinxinxi.page(zhaopinxinxi,zhaopinxinxi, req_dict)
+
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_list(request):
+ '''
+ 前台分页
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= zhaopinxinxi.getallcolumn( zhaopinxinxi, zhaopinxinxi)
+ #表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
+ try:
+ __foreEndList__=zhaopinxinxi.__foreEndList__
+ except:
+ __foreEndList__=None
+
+ if __foreEndList__=="前要登":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #forrEndListAuth
+ try:
+ __foreEndListAuth__=zhaopinxinxi.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+
+ #authSeparate
+ try:
+ __authSeparate__=zhaopinxinxi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __foreEndListAuth__ =="是" and __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params",{"id":0}).get("id")
+
+ tablename = request.session.get("tablename")
+ if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
+ del req_dict["userid"]
+ else:
+ __isAdmin__ = None
+
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+ if __isAdmin__ == "是":
+ if req_dict.get("userid"):
+ del req_dict["userid"]
+ else:
+ #非管理员权限的表,判断当前表字段名是否有userid
+ if "userid" in columns:
+ try:
+ # 本接口可以匿名访问,所以try判断是否为匿名
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+ #当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
+ try:
+ __authTables__=zhaopinxinxi.__authTables__
+ except:
+ __authTables__=None
+
+ if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+ for authColumn,authTable in __authTables__.items():
+ if authTable==tablename:
+ params = request.session.get("params")
+ req_dict[authColumn]=params.get(authColumn)
+ break
+
+ if zhaopinxinxi.__tablename__[:7]=="discuss":
+ try:
+ del req_dict['userid']
+ except:
+ pass
+
+
+ msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
+ msg['data']['pageSize'] = zhaopinxinxi.page(zhaopinxinxi, zhaopinxinxi, req_dict)
+
+ return JsonResponse(msg)
+
+def zhaopinxinxi_save(request):
+ '''
+ 后台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ tablename=request.session.get("tablename")
+ __isAdmin__ = None
+ allModels = apps.get_app_config('main').get_models()
+ for m in allModels:
+ if m.__tablename__==tablename:
+
+ try:
+ __isAdmin__ = m.__isAdmin__
+ except:
+ __isAdmin__ = None
+ break
+
+
+ #获取全部列名
+ columns= zhaopinxinxi.getallcolumn( zhaopinxinxi, zhaopinxinxi)
+ if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
+ params=request.session.get("params")
+ req_dict['userid']=params.get('id')
+
+
+ error= zhaopinxinxi.createbyreq(zhaopinxinxi,zhaopinxinxi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_add(request):
+ '''
+ 前台新增
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ #获取全部列名
+ columns= zhaopinxinxi.getallcolumn( zhaopinxinxi, zhaopinxinxi)
+ try:
+ __authSeparate__=zhaopinxinxi.__authSeparate__
+ except:
+ __authSeparate__=None
+
+ if __authSeparate__=="是":
+ tablename=request.session.get("tablename")
+ if tablename!="users" and 'userid' in columns:
+ try:
+ req_dict['userid']=request.session.get("params").get("id")
+ except:
+ pass
+
+ try:
+ __foreEndListAuth__=zhaopinxinxi.__foreEndListAuth__
+ except:
+ __foreEndListAuth__=None
+
+ if __foreEndListAuth__ and __foreEndListAuth__!="否":
+ tablename=request.session.get("tablename")
+ if tablename!="users":
+ req_dict['userid']=request.session.get("params").get("id")
+
+ error= zhaopinxinxi.createbyreq(zhaopinxinxi,zhaopinxinxi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def zhaopinxinxi_thumbsup(request,id_):
+ '''
+ 点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ id_=int(id_)
+ type_=int(req_dict.get("type",0))
+ rets=zhaopinxinxi.getbyid(zhaopinxinxi,zhaopinxinxi,id_)
+
+ update_dict={
+ "id":id_,
+ }
+ if type_==1:#赞
+ update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
+ elif type_==2:#踩
+ update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
+ error = zhaopinxinxi.updatebyparams(zhaopinxinxi,zhaopinxinxi, update_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_info(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data = zhaopinxinxi.getbyid(zhaopinxinxi,zhaopinxinxi, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+ #浏览点击次数
+ try:
+ __browseClick__= zhaopinxinxi.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in zhaopinxinxi.getallcolumn(zhaopinxinxi,zhaopinxinxi):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+ ret=zhaopinxinxi.updatebyparams(zhaopinxinxi,zhaopinxinxi,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = ret
+ return JsonResponse(msg)
+
+def zhaopinxinxi_detail(request,id_):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+
+ data =zhaopinxinxi.getbyid(zhaopinxinxi,zhaopinxinxi, int(id_))
+ if len(data)>0:
+ msg['data']=data[0]
+
+ #浏览点击次数
+ try:
+ __browseClick__= zhaopinxinxi.__browseClick__
+ except:
+ __browseClick__=None
+
+ if __browseClick__=="是" and "clicknum" in zhaopinxinxi.getallcolumn(zhaopinxinxi,zhaopinxinxi):
+ try:
+ clicknum=int(data[0].get("clicknum",0))+1
+ except:
+ clicknum=0+1
+ click_dict={"id":int(id_),"clicknum":clicknum}
+
+ ret=zhaopinxinxi.updatebyparams(zhaopinxinxi,zhaopinxinxi,click_dict)
+ if ret!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = retfo
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_update(request):
+ '''
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+ if req_dict.get("mima") and req_dict.get("password"):
+ if "mima" not in zhaopinxinxi.getallcolumn(zhaopinxinxi,zhaopinxinxi) :
+ del req_dict["mima"]
+ if "password" not in zhaopinxinxi.getallcolumn(zhaopinxinxi,zhaopinxinxi) :
+ del req_dict["password"]
+ try:
+ del req_dict["clicknum"]
+ except:
+ pass
+
+
+ error = zhaopinxinxi.updatebyparams(zhaopinxinxi, zhaopinxinxi, req_dict)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_delete(request):
+ '''
+ 批量删除
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
+ req_dict = request.session.get("req_dict")
+
+ error=zhaopinxinxi.deletes(zhaopinxinxi,
+ zhaopinxinxi,
+ req_dict.get("ids")
+ )
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+
+def zhaopinxinxi_vote(request,id_):
+ '''
+ 浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
+统计商品或新闻的点击次数;提供新闻的投票功能
+ '''
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": mes.normal_code}
+
+
+ data= zhaopinxinxi.getbyid(zhaopinxinxi, zhaopinxinxi, int(id_))
+ for i in data:
+ votenum=i.get('votenum')
+ if votenum!=None:
+ params={"id":int(id_),"votenum":votenum+1}
+ error=zhaopinxinxi.updatebyparams(zhaopinxinxi,zhaopinxinxi,params)
+ if error!=None:
+ msg['code'] = crud_error_code
+ msg['msg'] = error
+ return JsonResponse(msg)
+
+def zhaopinxinxi_importExcel(request):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ excel_file = request.FILES.get("file", "")
+ file_type = excel_file.name.split('.')[1]
+
+ if file_type in ['xlsx', 'xls']:
+ data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
+ table = data.sheets()[0]
+ rows = table.nrows
+
+ try:
+ for row in range(1, rows):
+ row_values = table.row_values(row)
+ req_dict = {}
+ zhaopinxinxi.createbyreq(zhaopinxinxi, zhaopinxinxi, req_dict)
+
+ except:
+ pass
+
+ else:
+ msg.code = 500
+ msg.msg = "文件类型错误"
+
+ return JsonResponse(msg)
+
+def zhaopinxinxi_sendemail(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+
+ code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
+ to = []
+ to.append(req_dict['email'])
+
+ send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
+
+ cursor = connection.cursor()
+ cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
+
+ msg = {
+ "msg": "发送成功",
+ "code": 0
+ }
+
+ return JsonResponse(msg)
+
+def zhaopinxinxi_autoSort2(request):
+
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ cursor = connection.cursor()
+ leixing = set()
+ try:
+ cursor.execute("select goodtype from orders where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'zhaopinxinxi' order by addtime desc")
+ rows = cursor.fetchall()
+ for row in rows:
+ for item in row:
+ leixing.add(item)
+ except:
+ leixing = set()
+
+ L = []
+ cursor.execute("select * from zhaopinxinxi where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from zhaopinxinxi where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+
+
+ return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
+
+def zhaopinxinxi_value(request, xColumnName, yColumnName, timeStatType):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+ sql = ''
+ if timeStatType == '日':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM zhaopinxinxi {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
+
+ if timeStatType == '月':
+ sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM zhaopinxinxi {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
+
+ if timeStatType == '年':
+ sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM zhaopinxinxi {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def zhaopinxinxi_o_value(request, xColumnName, yColumnName):
+ if request.method in ["POST", "GET"]:
+ msg = {"code": normal_code, "msg": "成功", "data": {}}
+
+ where = ' where 1 = 1 '
+ token = request.META.get('HTTP_TOKEN')
+ decode_str = eval(base64.b64decode(token).decode("utf8"))
+ if decode_str['tablename'] != 'users':
+ where = where + " and gongsizhanghao ='{0}' ".format(decode_str['params']['gongsizhanghao'])
+
+ sql = "SELECT {0}, sum({1}) AS total FROM zhaopinxinxi {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
+ L = []
+ cursor = connection.cursor()
+ cursor.execute(sql)
+ desc = cursor.description
+ data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
+ for online_dict in data_dict:
+ for key in online_dict:
+ if 'datetime.datetime' in str(type(online_dict[key])):
+ online_dict[key] = online_dict[key].strftime(
+ "%Y-%m-%d %H:%M:%S")
+ else:
+ pass
+ L.append(online_dict)
+ msg['data'] = L
+
+ return JsonResponse(msg)
+
+def zhaopinxinxi_alipay(request):
+ if request.method in ["POST", "GET"]:
+ alipay = AliPay(
+ appid=settings.ALIPAY_APP_ID,
+ app_notify_url=None,
+ app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
+ alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
+ sign_type=settings.ALIPAY_SIGN_TYPE,
+ debug=True,
+ config=AliPayConfig(timeout=15)
+ )
+
+ req_dict = request.session.get("req_dict")
+
+ order_string = alipay.api_alipay_trade_page_pay(
+ out_trade_no=req_dict['tradeno'],
+ total_amount=req_dict['totalamount'],
+ subject=req_dict['subject'],
+ return_url='http://localhost:8080/django3qu6u/zhaopinxinxi/notify',
+ #notify_url=''
+ )
+ pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
+ pay_url = ''.format(pay_url)
+
+ return JsonResponse({'code': 0, "data": pay_url})
+
+def zhaopinxinxi_notify(request):
+ if request.method in ["POST", "GET"]:
+ req_dict = request.session.get("req_dict")
+ out_trade_no = req_dict['out_trade_no']
+ cursor = connection.cursor()
+
+ return redirect('http://localhost:8080/django3qu6u/admin/dist/index.html#/zhaopinxinxi')
+
+
diff --git a/django3qu6u/main/__init__.py b/django3qu6u/main/__init__.py
new file mode 100644
index 0000000..de0c674
--- /dev/null
+++ b/django3qu6u/main/__init__.py
@@ -0,0 +1 @@
+default_app_config = 'main.apps.MainConfig'
diff --git a/django3qu6u/main/__pycache__/Gerenjianli_v.cpython-37.pyc b/django3qu6u/main/__pycache__/Gerenjianli_v.cpython-37.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f57d32dcf605fd12048a56e8c17ffae4ee8f3642
GIT binary patch
literal 17940
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
I+O4nn-)hPwA^-pY
literal 0
HcmV?d00001
diff --git a/django3qu6u/main/__pycache__/Gongsi_v.cpython-37.pyc b/django3qu6u/main/__pycache__/Gongsi_v.cpython-37.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cc5bf91d15f99a7aff51df57601a18db1ff59ca4
GIT binary patch
literal 17362
zcmd^HTW}oJnV#MtCiAv4EN#>$K&O=OUf%
zF_xIwwJ`xhFg6MIIAp|v<3PX;_h1vUmCHjOcVDR9s@<*N8B4pVrD|&{4|&?}Kc~Aj
zBTKf~O{KPKt(w!PPxra>IsgCtm-8Rr*3=XY;9uoe_w71u1_EEwjrUJQ=2rZyiV_I0
zKwp3Easd3*j2fhI2-rp-^2d8_7lcq9U(nW4U-=
zJlE9Mg!>Q+XA`;RzGm^v$hK^!_aoU^xz@f`Q5Mb4&b9TmiM*P+kfPDkkYuFX+N?fmHNwyHzrL2Qp
zh3j=}5nGIFH@lj3;<}72VO_W`XVeN$-3DxT(4)#*$P}&v6bw4TyJ2j
z*bTU@W~i&7Ovl9YHy(HRwtOrrYC6edb$)R
zewS6qZ!@i-Lf$fQuce2EtS;5jHx!C_+X?m-a}!wB03L+~3i$ymgPd{=y}7<<@227n
zg)FJ)T@YC_zfS+JJ48l!Hnys1-93?!f@Ht@re9cY=3p+DJUgm;c+?Xq@@qUzD(#cNSC{=xC;5h9C;=MPlhef6s|&wwz-4?KVF{nO{(
z9XogQiRyDNSKl40RX$nhs2SGP#OF{?b19ie$$UyKr$mwi2xI5SP@1Q6mNR=OZCQ^L
z_<1DZ7^xHuC6#ib1$(#YQVXHA6HkLf&AgrI2U&IL{0eHDDAT1ImbTLt@1%mHpDaYq
ziM!O1EevGxSE9ta8i`99YC_RK8d3aIq#-4$8cM4q7qwO4G#Ng@&}7lX34%!?;}gsR
zrm`T@h=FaTjve)e1u4c+=iDo&t51GfJ9M=A^pC{!W0}Nv&{`ocCX#wVe)1!eD3Bi}
zzNu;Qn+iqyCOougp7Bwtsu)4O6nTHx5!{6F6T^N38GqQ7i_!U*S`G?24mZ%T=F_oS
z(SSc{B{CK`2zs3t0B-3ejSrTzawxBr^m2%WNd39rvb^Lqk1%nf0%}uDZ0lc;9Mq`b_|cMoY0Du*RQ%^^=P-8rtZSd
zK|rz9y(^OiJS=&%ysq=na%Wd}aR_8%`u7(l<2cAToz3QPt9QC)VLEPggKZ*XByKp${3M)s1mkAc1VhLuuu@}6WXKkJ^+14Ojmeq
zAa7)7;*hf=b*N%Aph{QWl!>X4h#1LO%-oeOX6**B7jJY$XPi4HB$-0swwOaFm^JgR
z$eucpv=TGTrrSHsk3}3DP%)bj#|fDNXE~9lKdTAc5QqtwdK_5m&FWE=@ArTTI18j5
z2mot!rW5(Oa~!Hyma{CEUKSvd=o!?Vk>69J-m0>$liLwNGj*SJ%#=e_M
z#>T+I%gd2cWH4URM4JmnqPS}+hZ}kh%bvFejw-_o?hlm0?g;XrMU6p`K)>&iGO;d@
z-zdMCN?0>9Sj%_Rc>y+SPf(OV&5)|-n7St5kD~zb?etD?7(lB
zZ%)u4oG{B+{YA@?j8DDrjg)MnNUyhfYmQ;$AtX`9_);1x`5~SF1cYD;mK9WaVE{$xJ_jQsYdKA+l>arTA4{b&)_Ru9w%2HGROHl=M(?4<)@woCu`w-Lgw1$G1~alp2>}7>~V<^ydQ~Nm?KHj^hRZAuYq#FAersxSl=vT`UZ?
zGDv)|h|Dp;XdrDJV#l>81#85?5KV&kDVOkb&3>-M&&@)8&(>@OYs@a*2;){LXddPTX7aX~-DdU|a$lV}1k+;~Y>ltZ
zJoWI>+KZ>EufNux&GhfFGdc6Y>Qjf$y?yfRCx>e<|Ki*mpN^k=v--|UwRb;!SYA+j
z{M13%t(p9;!ZHShER(H0`)2jX-<^B)@!CrtRrkMA`@sij6ph1fsXg4nqq@wUE>^;X_YX
z&63tyU0^OSQBf83P}RoS3}PG0#Y-!c|x9rg%HQR5cJ1jfx-H!#8?Ydia1n?
z2vmxQP${CN=wMSx7b6;kaE=Zp%0`_qN6k8wVh}2Y;g0%@*Bg5N54We4au%uNYt3VG
zIo8l;%$=*4_!5=>O)2Io5Pwq&iT+V`0aYSaY4KHwI4KR{3sruXH>X(nL@5DP0!l?m
zEyZ0`;x1Ap2Af!z%@WE`E9OPzZ_U&b=x$a6w$ApI4a!MngK|>Ypd6G9C?%Ae3v6wz
zvyJ8z$vPBB0X(c8IaNLM#KhQ#e@^J=DUxFVtpf$&l#p_EGm7|Kl=wP_r<6$B>)Z5f
z3nh0`azR+>ntchV;xwmHu#nA7dA0?nGZX{Z)pZ5yA7ztUM3QnMY0x0Z*#CDtvJN2$
zXs!m~X#_yHI{m>b_4Ej}4Ns%W0+nhRu)wEi6EK&cO+cqmRiS@)_0=n;(J6dALxXm~
zFcu$CNlo>=KYzpxs9tIpE}nXJyvq&JSoJOXa**j|jWCtL#HxgW7y7Ymh
z24T7aMehVxgr;~qQO`q*;XA=gz#KbjM`4_W$(soS>(>G`$oHw!9WzQ{c#3`vQzRmu
z%27nYpGL`$CX3W(&{mw<66P}uAyNO|>?Uv%xVHpjnY0=^;c}D?Z6#61QAeKzM@hZo
zJdT=POBW>5!v*#GJmPbP&nuJ8i>~IGX@5pCCdtQ17v~Eo`35DV9l~CpbOjPHND7`p
zx2x%a7z%kgCAB6g*FdsXdatQ$F0$-37|x*(cYK_=u-eAO2!5S1Vf
zkclLYsn+B)RymxLo&e^5fDnm+-2O04UtZai9`F?r59&e8VWtTY+a{d%M1ZsvKm-_b
z36LC`^#mv&{c91RZyR11r=e8W(O`UL8k{6G0f7Pxrx2YnmFNV4iP!JM>T^+NI#P?e
z_Enm(0#O?IrwJV4{eh9?nMTusBft=#2ag+3BW>F7U8vg+MNs^sQTtBG-{HoiI{w=R
znp54iBrpqNiv&(bc;@wza8ojUOvSzC``{F8ujz18D{x$f06t+*-d?;750ke!1MggT
zP5_ibW>tp(D3!ll_YSDfed2tAq0BTmh_e?)ek7lwX
zbpOduJk#lX+hcmTb2NKo$dnR)5k@5}6em{K$pkG4c1itSdg|ydHY43(!#3}35r)N{
zP=+}P>2dV-hw5NYQXuNERQ+BLjSZf5ZrYX;la=MR=5)m9nIhiUUnGi5V(=dJ88Ai?
zK?A~i0qAW$ndp-8INoWXJRk4Q;)zdr|Jq1-HfYQa;!jW=ZQR1kOWxfeyt}tS@CD)B
zRcQkkxD*_0+*t8NCMb+H2)}@79|R?#J@UNqFGdy+6;m6P2ozJ4qGe+agmRtA?E5z5
z7(mAn>`aBw5_+_QC66Xa=zal=QW+=~m?gIr<1S5-(2P&x{W_mwh!lh-I0;e@Q4y&f
z*uD`2BnsN7RBR`ow_zyoi2N{o4<+l7kY>1(7ap<94dfhv5-3EY*j3EYOOx`^g{nN2
zip{jOl(Q(IjzOoQ1={;|f}oq3gd_PBP7;AEK`q)dNnjHYkmQL)buQp*0c{h4OngGw
zi+BJ35DIqbB%w6@B?u)k6-uTd6uHpT5Qn2smF=HkdcG~(+`8g6_Xc^5Z6j=a@?Bi_D-w|6AA*Ekajvp%M9#)MK%
zS_qIK%zFq^)*&clQo}+i-e>wcAPugeb%Cjx5#IIPfg-?!l=9cf$wzXo6vQuVVst#1APll1|PQp
z>OL>Rit~_iRm|4>{tvdMpT5~I_2LSq38_lgW
zA=D6%F-|@`{P7aaCW!_5M;z;u{4==mXY-JpO%eH|o-a7}-B$|2&g>~`B@Ol`u>vV&
zP_}uuFWU4uh^2GI8-!(@c$4oTI)OG&g?Ix|4|l^7g&HQ*E>g=Q#hXDUVzO%=9vT1f
zA?eAj{dBDM0({7ad=2cuI$5-)P79Oodm7du&mSw@&lhu5SC2jmXZQG%Z&jZ@aqSA!
z`Evh(+S4zbd-H_!p*IX*Z^1U}dv;$G-f_H0kD>0Nk)^U*Dv+*m*^T>x=qGya^pD2h
z9h1&(@>vTvH@wx2pZ|l}k)vmS@dN*9{n*YY(7J#lC+zmt)1U^FvHW$4;(0(Y1>G-M
z);mgui?%On|I)BpiFoH?C;_;m<3ZY*A#0=673pz>|1F;Ra6m2;pMcNc#wXxUY=rH>
zff96gqSXqbfXKcmt0i?%!;U{JR|@eG=xRWNd&3S5h8Z-#iZK>ok;AGWZiLUUDBc2j
z4@S$OkyZP;ZMZv2p@S+IAPEaXuf$8VmyL*ka>Q<`B