| 1 |
- {"remainingRequest":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/system-config/userAgreement.vue?vue&type=script&lang=js&","dependencies":[{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/src/view/system-config/userAgreement.vue","mtime":1618306924000},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/thread-loader/dist/cjs.js","mtime":1665684003955},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/babel-loader/lib/index.js","mtime":1665684010704},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/cache-loader/dist/cjs.js","mtime":1665684022107},{"path":"/usr/local/develop/php/www/waibao/NN2022100801/NN2022100801/addons/admin/node_modules/vue-loader/lib/index.js","mtime":1665684006084}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport Editor from '_c/editor'\nimport axios from '@/libs/api.request'\nexport default {\n name: 'userAgreement',\n data () {\n return {\n showButton:true,\n btnLoading_pass: false,\n currentPage: 1,\n total: 0,\n showNoticeModal: false,\n eduModalTitle: 'addnew',\n // 查询条件\n pagenum: 10,\n content: '12312323',\n columns: [\n {\n title: ' 排序',\n key: 'id'\n },\n /* {\n title: '标题',\n key: 'title'\n }, */\n {\n title: '更改时间',\n key: 'updated_at'\n },\n {\n title: '创建',\n key: 'user',\n render: (h, params) => {\n return h('span', params.row.user.nick_name)\n }\n },\n {\n title: '操作',\n key: 'action',\n align: 'center',\n render: (h, params) => {\n return h('div', [\n h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px'\n },\n on: {\n click: () => {\n this.eduModalTitle = 'check'\n this.showNoticeModal = true\n this.$refs.editor.setHtml(params.row.content)\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/notice/protocol'\n }\n ]\n }, '查看'),\n h('Button', {\n props: {\n size: 'small',\n type: 'primary'\n },\n style: {\n marginTop: '5px',\n marginBottom: '5px',\n marginLeft:'5px'\n },\n on: {\n click: () => {\n this.eduModalTitle = 'addnew'\n this.showNoticeModal = true\n this.$refs.editor.setHtml(params.row.content)\n }\n },\n directives: [\n {\n name: 'opcode',\n value: 'admins/notice/protocol'\n }\n ]\n }, '编辑')\n ])\n }\n }\n ],\n tableData: []\n }\n },\n created () {\n this.getList()\n },\n components: {Editor},\n methods: {\n // 分页\n levelchangepage (res) {\n this.currentPage = res\n this.getList()\n },\n // 打开新增广告弹窗\n openNoticeModal () {\n this.eduModalTitle = 'addnew',\n this.showNoticeModal = true\n this.content = ''\n this.$refs.editor.setHtml('')\n },\n // 获取列表信息\n getList () {\n axios\n .request({\n method: 'POST',\n url: '/admins/system/protocol',\n data: {\n page: this.currentPage\n }\n })\n .then(res => {\n if (res.data.code === 'success') {\n if(res.data.data == []){\n this.showButton = true\n }else{\n this.showButton = false\n }\n this.tableData = res.data.data\n this.total = res.data.data.total\n } else {\n this.$Message.error(res.data.message, 'middle')\n }\n })\n },\n // 新增用户协议\n saveAdd () {\n var that = this\n this.btnLoading_pass = true\n axios.request({\n url: '/admins/system/protocol/add',\n data: {\n content: this.content\n },\n method: 'POST'\n }).then((res) => {\n if (res.data.code === 'success') {\n this.showNoticeModal = false\n this.getList()\n }\n this.$Message.info(res.data.message)\n this.btnLoading_pass = false\n })\n },\n handleChange (html, text) {\n this.content = html\n console.log('html', html)\n console.log('text', text)\n }\n }\n}\n",null]}
|