1f456a00a07e84baa33a7d1a925c3b3a.json 12 KB

1
  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/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",{"version":3,"sources":["userAgreement.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"userAgreement.vue","sourceRoot":"src/view/system-config","sourcesContent":["<template>\n <div>\n <Card>\n <Row>\n <Button v-opcode=\"'admins/notice/protocol/add'\" v-show=\"showButton\" type=\"primary\" @click=\"openNoticeModal()\">\n <Icon type=\"md-add\" />新增用户协议\n </Button>\n </Row>\n <Row class=\"mt10\">\n <Table border ref=\"selection\" :columns=\"columns\" :data=\"tableData\">\n </Table>\n </Row>\n <!-- 页码 -->\n <div style=\"margin: 10px;overflow: hidden\">\n <div style=\"float: left;\">\n <Page :total=\"total\" :current=\"currentPage\" :page-size=\"pagenum\" @on-change=\"levelchangepage\"></Page>\n </div>\n </div>\n </Card>\n <!-- 新增/查看 协议 -->\n <Modal v-model=\"showNoticeModal\" width=\"800px\">\n <p slot=\"header\" style=\"text-align:center;font-size:16px;\">\n <!-- <Icon type=\"ios-alert\" color=\"#2d8cf0\" size=\"24\" /> -->\n <span>用户协议</span>\n </p>\n\t\t\t<Form ref=\"addform\" label-position=\"right\" :label-width=\"80\">\n\t\t\t\t<FormItem label=\"协议内容:\">\n\t\t\t\t\t<Row type=\"flex\" justify=\"space-between\" align=\"middle\">\n\t\t\t\t\t\t<Col span=\"24\">\n\t\t\t\t\t\t\t<editor ref=\"editor\" :value=\"content\" @on-change=\"handleChange\"/>\n\t\t\t\t\t\t</Col>\n\t\t\t\t\t</Row>\n\t\t\t\t</FormItem>\n\t\t\t</Form>\n <div slot=\"footer\">\n <Row type=\"flex\" justify=\"center\">\n <Button @click=\"showNoticeModal=false\">取消</Button>\n <Button type=\"primary\" @click=\"saveAdd()\" :loading=\"btnLoading_pass\" v-show=\"eduModalTitle=='addnew'\">确定</Button>\n </Row>\n </div>\n </Modal>\n </div>\n</template>\n\n<script>\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</script>\n\n<style>\n .mt10 {\n margin-top: 10px;\n }\n</style>\n"]}]}