Commit d218bd19 authored by xiaoman's avatar xiaoman

Merge branch 'feature/develop_0713' of...

Merge branch 'feature/develop_0713' of http://gitlab.wanwudezhi.work/quanku/qk_admin into feature/develop_0713
parents 16111733 84dc521b
module.exports = {
NODE_ENV: '"production"',
ENV_CONFIG: '"prod"',
BASE_API: '"https://qk_admin.wanwudezhi.com/demo/admin"'
BASE_API: '"https://quanku-system.wanwudezhi.com/admin"'
}
......@@ -50,7 +50,12 @@
</el-form-item>
<el-form-item label="商品详细介绍">
<editor :init="editorInit" :style="{'min-height':'800px' }" v-model="goods.detail"/>
<!-- <editor :init="editorInit" :style="{'min-height':'800px' }" v-model="goods.detail"/>-->
<el-input
v-model="goods.detail"
:rows="10"
type="textarea"
placeholder="请输入商品详细介绍"/>
</el-form-item>
</el-form>
</el-card>
......@@ -109,7 +114,7 @@
<script>
import { publishGoods, listCategories } from '@/api/business/goods'
import { createStorage, uploadPath } from '@/api/business/storage'
import { uploadPath } from '@/api/business/storage'
import Editor from '@tinymce/tinymce-vue'
import { MessageBox } from 'element-ui'
import { getToken } from '@/utils/auth'
......@@ -130,8 +135,8 @@ export default {
attributes: [],
rules: {
name: [{ required: true, message: '商品名称不能为空', trigger: 'blur' }]
},
editorInit: {
}
/* editorInit: {
language: 'zh_CN',
convert_urls: false,
plugins: ['advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount'],
......@@ -145,7 +150,7 @@ export default {
failure('上传失败,请重新上传')
})
}
}
}*/
}
},
computed: {
......
......@@ -249,6 +249,9 @@ export default {
url = file.response.data.url
}
if (url === this.goods.topImage) {
this.goods.topImage = ''
}
if (this.goods.images[i] === url) {
this.goods.images.splice(i, 1)
}
......
......@@ -319,7 +319,7 @@ export default {
handleScroll() {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
const testEle = this.$refs.top
if (scrollTop > testEle.offsetTop) {
if (scrollTop > (testEle && testEle.offsetTop)) {
this.isFixed = true
} else {
this.isFixed = false
......@@ -372,12 +372,16 @@ export default {
if (this.goodsParams.categoryIds) {
this.categoryIds = this.goodsParams.categoryIds || []
}
if (response.data.data.images) {
if (response.data.data.images && response.data.data.images.length > 0) {
this.goodsParams.images = response.data.data.images.split(';') || []
}
if (this.goodsParams.topImage) {
if (this.goodsParams.topImage && this.goodsParams.topImage.length > 0) {
const list = [this.goodsParams.topImage]
if (this.goodsParams.images && this.goodsParams.images.length > 0) {
this.goodsParams.images = list.concat(this.goodsParams.images)
} else {
this.goodsParams.images = list
}
}
})
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment