diff --git a/src/views/modules/book/clock-add-or-update.vue b/src/views/modules/book/clock-add-or-update.vue index f960c6d..76f5ce3 100644 --- a/src/views/modules/book/clock-add-or-update.vue +++ b/src/views/modules/book/clock-add-or-update.vue @@ -63,6 +63,8 @@ + + @@ -88,6 +90,22 @@ import 'quill/dist/quill.core.css' import 'quill/dist/quill.snow.css' import 'quill/dist/quill.bubble.css' + const toolbarOptions = [ + ['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线 + ['blockquote', 'code-block'], //引用,代码块 + [{ 'header': 1 }, { 'header': 2 }], // 几级标题 + [{ 'list': 'ordered' }, { 'list': 'bullet' }], // 有序列表,无序列表 + [{ 'script': 'sub' }, { 'script': 'super' }], // 下角标,上角标 + [{ 'indent': '-1' }, { 'indent': '+1' }], // 缩进 + [{ 'direction': 'rtl' }], // 文字输入方向 + [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小 + [{ 'header': [1, 2, 3, 4, 5, 6, false] }],// 标题 + [{ 'color': [] }, { 'background': [] }], // 颜色选择 + [{ 'font': ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial'] }],// 字体 + [{ 'align': [] }], // 居中 + ['clean'], // 清除样式, + ['link', 'image'], // 上传图片、上传视频 +] export default { data() { @@ -140,50 +158,19 @@ // 富文本编辑器配置 editorOption: { modules: { - toolbar: [ - ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 - ['blockquote', 'code-block'], // 引用 代码块 - [{ - header: 1 - }, { - header: 2 - }], // 1、2 级标题 - [{ - list: 'ordered' - }, { - list: 'bullet' - }], // 有序、无序列表 - [{ - script: 'sub' - }, { - script: 'super' - }], // 上标/下标 - [{ - indent: '-1' - }, { - indent: '+1' - }], // 缩进 - [{ - direction: 'rtl' - }], // 文本方向 - [{ - size: ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36'] - }], // 字体大小 - [{ - header: [1, 2, 3, 4, 5, 6] - }], // 标题 - [{ - color: [] - }, { - background: [] - }], // 字体颜色、字体背景颜色 - // [{ font: ['songti'] }], // 字体种类 - [{ - align: [] - }], // 对齐方式 - ['clean'], // 清除文本格式 - ['image', 'video'] // 链接、图片、视频 - ] + toolbar: { + container: toolbarOptions, + handlers: { + image: function (value) { + if (value) { + // 调用element的图片上传组件 + document.querySelector('.avatar-uploader input').click() + } else { + this.quill.format('image', false) + } + } + } + }, }, placeholder: '请输入正文' }, @@ -192,7 +179,24 @@ created() { }, - methods: { + methods: { + contentUploadSuccess(res, file) { + // console.log(res) + let quill = this.$refs.myQuillEditor.quill + // 如果上传成功 + if (res) { + // 获取光标所在位置 + let length = quill.getSelection().index; + // 插入图片,res为服务器返回的图片链接地址 + quill.insertEmbed(length, 'image', res.url) + // 调整光标到最后 + quill.setSelection(length + 1) + } else { + // 提示信息,需引入Message + this.$message.error('图片插入失败!') + } + + }, init(id,bookid) { this.productPid = bookid this.dataForm.shupingid = id || null @@ -201,32 +205,34 @@ this.visible = true this.$nextTick(() => { this.$refs['dataForm'].resetFields() - if (this.dataForm.productId) { + if (id) { this.$http({ - url: this.$http.adornUrl(`/book/task/info/${id}`), + url: this.$http.adornUrl('/book/clock/getBookClockDetail'), method: 'get', - params: this.$http.adornParams() + params: this.$http.adornParams({ + 'entryId': id + }), }).then(({ data }) => { console.log(data,666) if (data && data.code === 0) { - this.dataForm.title = data.bookTaskEntity.heading - this.dataForm.video = data.bookTaskEntity.video - this.dataForm.days = data.bookTaskEntity.days - this.dataForm.productImages = data.bookTaskEntity.images - this.dataForm.productDetails = data.bookTaskEntity.content + this.dataForm.title = data.entry.title + this.dataForm.video = data.entry.video + this.dataForm.days = data.entry.day + this.dataForm.productImages = data.entry.image + this.dataForm.productDetails = data.entry.content // console.log(this.dataForm.video, 'this.dataForm.video') if (this.dataForm.video != '') { this.videoList.push({ - name: data.bookTaskEntity.heading, - url: data.bookTaskEntity.video + name: data.entry.title, + url: data.entry.video }) } - if (data.bookTaskEntity.images != "") { + if (data.entry.image != "") { var img = { name: '', - url: data.bookTaskEntity.images + url: data.entry.image } var attr = [] attr.push(img) @@ -263,15 +269,16 @@ // console.log('userid', this.$store.state.user.id) this.$refs['dataForm'].validate((valid) => { if (valid) { - this.$http({ - url: this.$http.adornUrl(`/book/task/${!this.dataForm.shupingid ? 'save' : 'update'}`), + this.$http({ + + url: this.$http.adornUrl(`/book/clock/${!this.dataForm.shupingid ? 'addBookClock' : 'updateBookClock'}`), method: 'post', data: this.$http.adornData({ - 'bookid': this.productPid, - 'heading': this.dataForm.title, - 'images': this.dataForm.productImages, + 'bookId': this.productPid, + 'title': this.dataForm.title, + 'image': this.dataForm.productImages, 'content': this.dataForm.productDetails, - 'days': this.dataForm.days, + 'day': this.dataForm.days, 'video': this.dataForm.video, // 'video': "https://ehh-private-01.oss-cn-beijing.aliyuncs.com…3/08/28/91fd5a4c35c34763abca5d2929637164movie.mp4", 'id': this.dataForm.shupingid || undefined, diff --git a/src/views/modules/book/clock.vue b/src/views/modules/book/clock.vue index 0210f7a..5395cb4 100644 --- a/src/views/modules/book/clock.vue +++ b/src/views/modules/book/clock.vue @@ -4,7 +4,7 @@ 增加打卡任务 - 批量删除 + @@ -35,12 +35,12 @@ --> @@ -52,12 +52,12 @@ label="内容"> { if (data && data.code === 0) { - this.dataList = data.page.list - this.totalPage = data.page.totalCount + this.dataList = data.page.records + this.totalPage = data.page.pages } else { this.dataList = [] this.totalPage = 0 @@ -197,18 +197,23 @@ }, // 删除 deleteHandle (id) { - var ids = id ? [id] : this.dataListSelections.map(item => { - return item.id - }) - this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { + // var ids = id ? [id] : this.dataListSelections.map(item => { + // return item.id + // }) + this.$confirm(`确定对[id=${id}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.$http({ - url: this.$http.adornUrl('/book/task/delete'), - method: 'post', - data: this.$http.adornData(ids, false) + url: this.$http.adornUrl('/book/clock/delBookClock'), + method: 'get', + params: this.$http.adornParams({ + 'entryId': id + }), + // data: this.$http.adornData({ + // 'entryId': id + // }) }).then(({data}) => { if (data && data.code === 0) { this.$message({ diff --git a/src/views/modules/order/buyorder.vue b/src/views/modules/order/buyorder.vue index 712c83e..796cf88 100644 --- a/src/views/modules/order/buyorder.vue +++ b/src/views/modules/order/buyorder.vue @@ -178,8 +178,8 @@
-
微信支付
-
支付宝支付
+
微信支付
+
支付宝支付
疯币支付
diff --git a/src/views/modules/shop/shopproduct-add-or-update.vue b/src/views/modules/shop/shopproduct-add-or-update.vue index 1943e93..f7c6639 100644 --- a/src/views/modules/shop/shopproduct-add-or-update.vue +++ b/src/views/modules/shop/shopproduct-add-or-update.vue @@ -136,6 +136,8 @@
+ + @@ -161,6 +163,22 @@ import 'quill/dist/quill.core.css' import 'quill/dist/quill.snow.css' import 'quill/dist/quill.bubble.css' + const toolbarOptions = [ + ['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线 + ['blockquote', 'code-block'], //引用,代码块 + [{ 'header': 1 }, { 'header': 2 }], // 几级标题 + [{ 'list': 'ordered' }, { 'list': 'bullet' }], // 有序列表,无序列表 + [{ 'script': 'sub' }, { 'script': 'super' }], // 下角标,上角标 + [{ 'indent': '-1' }, { 'indent': '+1' }], // 缩进 + [{ 'direction': 'rtl' }], // 文字输入方向 + [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小 + [{ 'header': [1, 2, 3, 4, 5, 6, false] }],// 标题 + [{ 'color': [] }, { 'background': [] }], // 颜色选择 + [{ 'font': ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial'] }],// 字体 + [{ 'align': [] }], // 居中 + ['clean'], // 清除样式, + ['link', 'image'], // 上传图片、上传视频 +] export default { data() { @@ -267,50 +285,24 @@ // 富文本编辑器配置 editorOption: { modules: { - toolbar: [ - ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 - ['blockquote', 'code-block'], // 引用 代码块 - [{ - header: 1 - }, { - header: 2 - }], // 1、2 级标题 - [{ - list: 'ordered' - }, { - list: 'bullet' - }], // 有序、无序列表 - [{ - script: 'sub' - }, { - script: 'super' - }], // 上标/下标 - [{ - indent: '-1' - }, { - indent: '+1' - }], // 缩进 - [{ - direction: 'rtl' - }], // 文本方向 - [{ - size: ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36'] - }], // 字体大小 - [{ - header: [1, 2, 3, 4, 5, 6] - }], // 标题 - [{ - color: [] - }, { - background: [] - }], // 字体颜色、字体背景颜色 - // [{ font: ['songti'] }], // 字体种类 - [{ - align: [] - }], // 对齐方式 - ['clean'], // 清除文本格式 - ['image', 'video'] // 链接、图片、视频 - ] + history: { + delay: 1000, + maxStack: 50, + userOnly: false + }, + toolbar: { + container: toolbarOptions, + handlers: { + image: function (value) { + if (value) { + // 调用element的图片上传组件 + document.querySelector('.avatar-uploader input').click() + } else { + this.quill.format('image', false) + } + } + } + }, }, placeholder: '请输入正文', @@ -323,6 +315,23 @@ this.getTags() }, methods: { + contentUploadSuccess(res, file) { + // console.log(res) + let quill = this.$refs.myQuillEditor.quill + // 如果上传成功 + if (res) { + // 获取光标所在位置 + let length = quill.getSelection().index; + // 插入图片,res为服务器返回的图片链接地址 + quill.insertEmbed(length, 'image', res.url) + // 调整光标到最后 + quill.setSelection(length + 1) + } else { + // 提示信息,需引入Message + this.$message.error('图片插入失败!') + } + + }, handleCheckedCitiesChange(value) { console.log(value, 'value') }, diff --git a/src/views/modules/user/user-point-memery.vue b/src/views/modules/user/user-point-memery.vue index 42292e1..4bf4b18 100644 --- a/src/views/modules/user/user-point-memery.vue +++ b/src/views/modules/user/user-point-memery.vue @@ -82,7 +82,7 @@ :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage" layout="total, sizes, prev, pager, next, jumper"> - + @@ -94,8 +94,8 @@ {{mdetail.createTime}} - 充值疯币 - 扣除疯币 + 充值天医币 + 扣除天医币 - +