mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 17:05:54 +08:00
解决oss问题
This commit is contained in:
@@ -57,13 +57,14 @@
|
|||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls">
|
<Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls">
|
||||||
<OssManage ref="ossManage" :isComponent="true" :initialize="showOssManager" @selected="handleCallback" />
|
<OssManage ref="ossManage" :isComponent="true" :initialize="showOssManager" @selected="(list)=>{ selectedImage = list}" @callback="handleCallback" />
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import vuedraggable from "vuedraggable";
|
import vuedraggable from "vuedraggable";
|
||||||
import { uploadFile } from "@/libs/axios";
|
import {uploadFile} from "@/libs/axios";
|
||||||
|
// import OssManage from "@/views/sys/oss-manage/ossManage";
|
||||||
import OssManage from "@/views/sys/oss-manage/ossManage.vue";
|
import OssManage from "@/views/sys/oss-manage/ossManage.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -88,11 +89,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
confirmUrl(){
|
|
||||||
|
|
||||||
},
|
|
||||||
handleClickUploadImage(){
|
handleClickUploadImage(){
|
||||||
this.show = true
|
this.show = true;
|
||||||
},
|
},
|
||||||
// 回调给父级
|
// 回调给父级
|
||||||
callback() {
|
callback() {
|
||||||
@@ -122,21 +120,22 @@ export default {
|
|||||||
handleSuccessGoodsPicture(res, file) {
|
handleSuccessGoodsPicture(res, file) {
|
||||||
if (file.response) {
|
if (file.response) {
|
||||||
file.url = file.response.result;
|
file.url = file.response.result;
|
||||||
this.images.push(file);
|
this.images.push(file);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirmUrls(){
|
confirmUrls(){
|
||||||
this.selectedImage.length ? this.selectedImage.forEach(element => {
|
// this.selectedImage.length ? this.selectedImage.forEach(element => {
|
||||||
this.images.push({ url: element.url })
|
// this.images.push({ url: element.url })
|
||||||
}):''
|
// }):''
|
||||||
this.showOssManager = false
|
this.showOssManager = false
|
||||||
},
|
},
|
||||||
handleCallback(val){
|
handleCallback(val){
|
||||||
this.selectedImage = val
|
this.$Message.success("导入成功")
|
||||||
|
this.images.push({url:val.url})
|
||||||
},
|
},
|
||||||
// 从资源库中导入图片
|
// 从资源库中导入图片
|
||||||
importOSS(){
|
importOSS(){
|
||||||
this.showOssManager = true
|
this.showOssManager = true;
|
||||||
this.$refs.ossManage.selectImage = true;
|
this.$refs.ossManage.selectImage = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -354,12 +354,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<h4>商品详情描述</h4>
|
<h4>商品详情描述</h4>
|
||||||
<div class="form-item-view">
|
<div class="form-item-view">
|
||||||
<div class="tree-bar">
|
|
||||||
<FormItem class="form-item-view-el" label="店内分类" prop="shopCategory">
|
|
||||||
<Tree ref="tree" :check-strictly="false" :data="shopCategory" show-checkbox style="text-align: left"
|
|
||||||
@on-select-change="selectTree" @on-check-change="changeSelect"></Tree>
|
|
||||||
</FormItem>
|
|
||||||
</div>
|
|
||||||
<FormItem class="form-item-view-el" label="PC商品描述" prop="intro" style="width: 100%">
|
<FormItem class="form-item-view-el" label="PC商品描述" prop="intro" style="width: 100%">
|
||||||
<editor
|
<editor
|
||||||
ref="editor"
|
ref="editor"
|
||||||
@@ -1187,7 +1181,7 @@ export default {
|
|||||||
this.goodsParams = []
|
this.goodsParams = []
|
||||||
API_GOODS.getCategoryParamsListDataSeller(this.categoryId).then(
|
API_GOODS.getCategoryParamsListDataSeller(this.categoryId).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
if (!response || response.length <= 0) {
|
if (!Array.isArray(response) || response.length <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.goodsParams = response;
|
this.goodsParams = response;
|
||||||
|
|||||||
Reference in New Issue
Block a user