全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug

This commit is contained in:
stivepeim
2021-06-11 17:41:16 +08:00
parent 52feaa504e
commit 41b6ff8232
582 changed files with 35633 additions and 28276 deletions

View File

@@ -8,7 +8,7 @@
>
<el-input v-model="editPram.name"  :maxlength="biztype.value === 1 ? 8 : 20" placeholder="分类名称" />
</el-form-item>
<el-form-item label="URL" v-if="biztype.value!==1">
<el-form-item label="URL" v-if="biztype.value!==1 && biztype.value!==3">
<el-input v-model="editPram.url" placeholder="URL" />
</el-form-item>
<el-form-item label="父级" v-if="biztype.value!==3">

View File

@@ -13,13 +13,14 @@ couponFrom.install = function(Vue, options) {
const instance = new ToastConstructor()
instance.$mount(document.createElement('div'))
document.body.appendChild(instance.$el)
Vue.prototype.$modalCoupon = function(handle, keyNum, coupons=[], callback, userIds='') {
Vue.prototype.$modalCoupon = function(handle, keyNum, coupons=[], callback, userIds='', userType='') {
instance.visible = true
instance.handle = handle
instance.keyNum = keyNum
instance.coupons = coupons
instance.userIds = userIds
instance.callback = callback
instance.userType = userType
}
}
export default couponFrom

View File

@@ -6,7 +6,7 @@
width="896px"
:before-close="handleClose"
>
<coupon-list v-if="visible" :handle="handle" :userIds="userIds" :couponData="coupons" @getCouponId="getCouponId" :keyNum="keyNum"></coupon-list>
<coupon-list v-if="visible" :handle="handle" :userIds="userIds" :couponData="coupons" @getCouponId="getCouponId" :keyNum="keyNum" :userType="userType"></coupon-list>
<!--<upload-index v-if="visible" :isMore="isMore" @getImage="getImage" />-->
</el-dialog>
</div>
@@ -24,7 +24,8 @@
handle: '',
keyNum: 0,
coupons: [],
userIds: ''
userIds: '',
userType: ''
}
},
watch: {

View File

@@ -3,8 +3,8 @@
<div class="header clearfix">
<div class="container">
<el-form inline size="small">
<el-form-item label="优惠名称:">
<el-input v-model="tableFrom.name" placeholder="请输入优惠券名称" class="selWidth" size="small">
<el-form-item label="优惠名称:">
<el-input v-model="tableFrom.keywords" placeholder="请输入优惠券名称" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
@@ -91,7 +91,7 @@
</template>
<script>
import { marketingListApi, couponUserApi } from '@/api/marketing'
import { marketingListApi, couponUserApi, marketingSendApi } from '@/api/marketing'
export default {
name: 'CouponList',
props: {
@@ -110,6 +110,10 @@ export default {
userIds: {
type: String,
default: ''
},
userType: {
type: String,
default: ''
}
},
data() {
@@ -122,10 +126,8 @@ export default {
tableFrom: {
page: 1,
limit: 10,
name: '',
// type: 0,
isDel: 0,
status: 1
keywords: '',
type: ''
},
multipleSelection: [],
multipleSelectionAll: [],
@@ -145,6 +147,7 @@ export default {
mounted() {
this.tableFrom.page = 1
this.getList()
if(!this.couponData) return;
this.couponData.forEach(row => {
this.$refs.table.toggleRowSelection(row);
});
@@ -233,7 +236,8 @@ export default {
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
marketingListApi(this.tableFrom).then(res => {
this.userType ? this.tableFrom.type = 1 : this.tableFrom.type = 3;
marketingSendApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.listLoading = false

View File

@@ -37,8 +37,8 @@
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="onAdd(data.id)">添加分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部分类'" @click.native="onEdit(data.id)">编辑分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部分类'" @click.native="handleDelete(data.id)">删除分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部图片'" @click.native="onEdit(data.id)">编辑分类</el-dropdown-item>
<el-dropdown-item v-if="node.label !== '全部图片'" @click.native="handleDelete(data.id)">删除分类</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</span>
@@ -94,7 +94,7 @@
</el-option>
</el-select>
</div>
<div class="pictrueList acea-row">
<div class="pictrueList acea-row" v-loading="loadingPic">
<div v-show="isShowPic" class="imagesNo">
<i class="el-icon-picture" style="font-size: 60px;color: rgb(219, 219, 219);" />
<span class="imagesNo_sp">图片库为空</span>
@@ -184,6 +184,7 @@ export default {
},
data() {
return {
loadingPic: false,
loading: false,
modals: false,
allTreeList:[],
@@ -318,7 +319,7 @@ export default {
// 表单分类
handlerGetList() {
let datas = {
name: '全部分类',
name: '全部图片',
id: ''
}
treeCategroy(this.treeFrom).then(data => {
@@ -334,7 +335,7 @@ export default {
// 所有分类
getList() {
const data = {
name: '全部分类',
name: '全部图片',
id: 10000
}
treeCategroy(this.treeFrom).then(res => {
@@ -409,6 +410,7 @@ export default {
// 文件列表
getFileList() {
if ( this.tableData.pid === 10000) this.tableData.pid = 0
this.loadingPic = true;
fileListApi(this.tableData).then(async res => {
this.pictrueList.list = res.list
if(this.tableData.page === 1 && this.pictrueList.list.length > 0) this.pictrueList.list[0].localImg = this.localImg
@@ -418,6 +420,9 @@ export default {
this.isShowPic = true
}
this.pictrueList.total = res.total
this.loadingPic = false;
}).catch(()=>{
this.loadingPic = false;
})
},
pageChange(page) {

View File

@@ -58,14 +58,6 @@
<span>{{ scope.row.addres }}</span>
</template>
</el-table-column>
<el-table-column
label="是否关注公众号"
min-width="120"
>
<template slot-scope="scope">
<span>{{ scope.row.sex | saxFilter }}</span>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination