feat: 积分模块完成

This commit is contained in:
duan
2025-02-28 18:01:53 +08:00
parent f611d507bc
commit 03062abfe7
22 changed files with 891 additions and 93 deletions

View File

@@ -2,7 +2,7 @@
<el-dialog v-model="dialogVisible" title="选择图片" width="50%">
<el-container>
<el-aside style="background-color: #fff;border-right: 1px solid #ccc;" width="150px">
<el-button @click="addtype" type="">新增分类</el-button>
<el-button @click="addtype">新增分类</el-button>
<ul style="padding-left: 0;margin: 0;">
<li style="cursor: pointer;width: 90%;margin: 10px 0 ;" v-for="item in options" :key="item.id"
:class="[activedata == item.id ? 'activedata' : '']" @click="changeEvent(item.id)">
@@ -32,15 +32,12 @@
</div>
</template>
</el-dialog>
<myDialog :title="title" width="20%" ref="myDialogRef" @Confirm="subitgood">
<el-input v-model="typedata" placeholder="输入分类" />
</myDialog>
</template>
<script>
// import { getcommonCategor, getcommonpicture, storeAddcategory, addImg, delcate } from "@/api/imagesPhp";
import API from './addImgconfig/gallery'
import API2 from './addImgconfig/picture'
import myDialog from './myDialog.vue'
@@ -104,14 +101,6 @@ export default {
}
}
},
// uplocation() {
// this.activedata = -1
// this.page = 1
// this.dataImages = []
// // this.pageSize = 17
// this.getList()
// },
changeEvent(id) {
this.page = 1
this.pageSize = 18
@@ -126,31 +115,6 @@ export default {
this.dialogVisible = false
this.$emit('successEvent', this.selectImage)
},
// 刷新列表数据
async doSubmit() {
this.showUpload = false;
let arr = []
if (this.files.length) {
this.files.forEach(ele => {
arr.push({
url: ele.response.data[0],
name: ele.name
})
})
return
const res = await addImg({
category: this.value,
store_id: localStorage.getItem("shopId"),
url: arr
})
if (res.code == 1) {
this.getType(this.value)
} else {
this.$message.error(res.msg);
}
this.files = [];
}
},
handleBeforeRemove(file, fileList) {
let index = this.files.findIndex(ele => ele.name == file.name)
this.files.splice(index, 1);