全新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

@@ -15,7 +15,7 @@
<el-input-number :min="0" :max="100" step-strictly v-model="formValidate.discount" placeholder="请输入享受折扣"></el-input-number>
</el-form-item>
<el-form-item label="经验" prop="experience">
<el-input v-model.number="formValidate.experience" placeholder="请输入经验"></el-input>
<el-input-number v-model.number="formValidate.experience" placeholder="请输入经验" :max="999999" step-strictly></el-input-number>
</el-form-item>
<el-form-item label="图标" prop="icon">
<div class="upLoadPicBox" @click="modalPicTap('1', 'icon')">

View File

@@ -80,6 +80,7 @@
cancelButtonText: '取消',
inputErrorMessage: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
inputType: 'text',
closeOnClickModal: false,
inputValue: row ? (this.$route.path.indexOf('group') !== -1?row.groupName:row.name): '' ,
inputPlaceholder: this.$route.path.indexOf('group') !== -1?'请输入分组名称':'请输入标签名称',
inputValidator: (value) => { if(!value) return '输入不能为空'}

View File

@@ -3,25 +3,25 @@
<el-form-item label="用户编号:">
<el-input v-model="ruleForm.id" disabled class="selWidth"></el-input>
</el-form-item>
<el-form-item label="真实姓名:">
<el-input v-model="ruleForm.realName" class="selWidth"></el-input>
</el-form-item>
<el-form-item label="手机号码:" prop="phone">
<el-input v-model.number="ruleForm.phone" class="selWidth"></el-input>
</el-form-item>
<el-form-item label="生日:">
<el-date-picker
v-model="ruleForm.birthday"
type="date"
class="selWidth"
placeholder="选择日期"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="身份证号:">
<el-input v-model="ruleForm.cardId" class="selWidth"></el-input>
</el-form-item>
<!--<el-form-item label="真实姓名:">-->
<!--<el-input v-model="ruleForm.realName" class="selWidth"></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="手机号码:" prop="phone">-->
<!--<el-input v-model.number="ruleForm.phone" class="selWidth" readonly></el-input>-->
<!--</el-form-item>-->
<!--<el-form-item label="生日:">-->
<!--<el-date-picker-->
<!--v-model="ruleForm.birthday"-->
<!--type="date"-->
<!--class="selWidth"-->
<!--placeholder="选择日期"-->
<!--format="yyyy 年 MM 月 dd 日"-->
<!--value-format="yyyy-MM-dd">-->
<!--</el-date-picker>-->
<!--</el-form-item>-->
<!--<el-form-item label="身份证号:">-->
<!--<el-input v-model="ruleForm.cardId" class="selWidth"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="用户地址:">
<el-input v-model="ruleForm.addres" class="selWidth"></el-input>
</el-form-item>
@@ -65,17 +65,17 @@
<script>
import { groupListApi, levelListApi, tagListApi, userInfoApi, userUpdateApi } from '@/api/user'
const defaultObj = {
birthday: '',
cardId: '',
// birthday: '',
// cardId: '',
id : null,
mark: '',
phone: '',
realName: '',
// phone: '',
// realName: '',
addres:'',
groupId: '',
level: '',
isPromoter: false,
status: false,
status: false
}
export default {
name: "UserEdit",
@@ -107,12 +107,12 @@
userInfo () {
userInfoApi({ id: this.uid}).then(async res => {
this.ruleForm = {
birthday: res.birthday,
cardId: res.cardId,
// birthday: res.birthday,
// cardId: res.cardId,
id : res.uid,
mark: res.mark,
phone: res.phone,
realName: res.realName,
// phone: res.phone,
// realName: res.realName,
status: res.status,
addres: res.addres,
groupId: Number(res.groupId) || '',

View File

@@ -11,7 +11,7 @@
<el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
<el-col v-bind="grid">
<el-form-item label="用户搜索:">
<el-input v-model="userFrom.keywords" placeholder="请输入" clearable class="selWidth"/>
<el-input v-model="userFrom.keywords" placeholder="请输入姓名" clearable class="selWidth"/>
</el-form-item>
</el-col>
<!--<el-col :span="24">-->
@@ -115,12 +115,12 @@
<el-form-item label="消费情况:">
<el-select v-model="userFrom.payCount" placeholder="请选择" class="selWidth" clearable>
<el-option value="" label="全部"></el-option>
<el-option value="-1" label="0"></el-option>
<el-option value="0" label="1+"></el-option>
<el-option value="1" label="2+"></el-option>
<el-option value="2" label="3+"></el-option>
<el-option value="3" label="4+"></el-option>
<el-option value="4" label="5+"></el-option>
<el-option value="0" label="0"></el-option>
<el-option value="1" label="1+"></el-option>
<el-option value="2" label="2+"></el-option>
<el-option value="3" label="3+"></el-option>
<el-option value="4" label="4+"></el-option>
<el-option value="5" label="5+"></el-option>
</el-select>
</el-form-item>
</el-col>
@@ -189,21 +189,21 @@
<el-form-item label="近次访问:">
<span>{{ props.row.updateTime | filterEmpty }}</span>
</el-form-item>
<el-form-item label="身份证号:">
<span>{{ props.row.cardId | filterEmpty }}</span>
</el-form-item>
<!--<el-form-item label="身份证号:">-->
<!--<span>{{ props.row.cardId | filterEmpty }}</span>-->
<!--</el-form-item>-->
<el-form-item label="手机号:">
<span>{{ props.row.phone | filterEmpty }}</span>
</el-form-item>
<el-form-item label="真实姓名:">
<span>{{ props.row.realName | filterEmpty }}</span>
</el-form-item>
<!--<el-form-item label="真实姓名:">-->
<!--<span>{{ props.row.realName | filterEmpty }}</span>-->
<!--</el-form-item>-->
<el-form-item label="标签:">
<span>{{ props.row.tagName | filterEmpty }}</span>
</el-form-item>
<el-form-item label="生日:">
<span>{{ props.row.birthday | filterEmpty }}</span>
</el-form-item>
<!--<el-form-item label="生日:">-->
<!--<span>{{ props.row.birthday | filterEmpty }}</span>-->
<!--</el-form-item>-->
<el-form-item label="地址:">
<span>{{ props.row.addres | filterEmpty }}</span>
</el-form-item>
@@ -260,13 +260,21 @@
min-width="130"
/>
<el-table-column
label="用户类型"
label="手机号"
min-width="100"
>
<template slot-scope="scope">
<span>{{scope.row.userType | typeFilter}}</span>
<span>{{scope.row.phone | filterEmpty}}</span>
</template>
</el-table-column>
<!--<el-table-column-->
<!--label="用户类型"-->
<!--min-width="100"-->
<!--&gt;-->
<!--<template slot-scope="scope">-->
<!--<span>{{scope.row.userType | typeFilter}}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column
prop="nowMoney"
label="余额"
@@ -289,6 +297,7 @@
<el-dropdown-item @click.native="editPoint(scope.row.uid)">积分余额</el-dropdown-item>
<el-dropdown-item @click.native="setBatch('group',scope.row)">设置分组</el-dropdown-item>
<el-dropdown-item @click.native="setBatch('label',scope.row)">设置标签</el-dropdown-item>
<el-dropdown-item @click.native="setPhone(scope.row)">修改手机号</el-dropdown-item>
<el-dropdown-item @click.native="setExtension(scope.row)">修改上级推广人</el-dropdown-item>
<el-dropdown-item @click.native="clearSpread(scope.row)" v-if="scope.row.spreadUid && scope.row.spreadUid>0">清除上级推广人</el-dropdown-item>
</el-dropdown-menu>
@@ -403,7 +412,7 @@
label="余额"
required
>
<el-input-number type="text" v-model="PointValidateForm.moneyValue" :max="999999"></el-input-number>
<el-input-number type="text" v-model="PointValidateForm.moneyValue" :precision="2" :step="0.1" :min="0" :max="999999"></el-input-number>
</el-form-item>
<el-form-item
label="修改积分"
@@ -418,7 +427,7 @@
label="积分"
required
>
<el-input-number type="text" step-strictly v-model="PointValidateForm.integralValue" :max="999999"></el-input-number>
<el-input-number type="text" step-strictly v-model="PointValidateForm.integralValue" :min="0" :max="999999"></el-input-number>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -439,7 +448,7 @@
</template>
<script>
import { userListApi, groupListApi, levelListApi, tagListApi, groupPiApi, tagPiApi, foundsApi, updateSpreadApi } from '@/api/user'
import { userListApi, groupListApi, levelListApi, tagListApi, groupPiApi, tagPiApi, foundsApi, updateSpreadApi, updatePhoneApi } from '@/api/user'
import { spreadClearApi } from '@/api/distribution'
import editFrom from './edit'
import userDetails from './userDetails'
@@ -638,6 +647,29 @@
this.getCityList()
},
methods: {
setPhone(row) {
this.$prompt('修改手机号', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputErrorMessage: '请输入修改手机号',
inputType: 'text',
inputValue: row.phone,
inputPlaceholder: '请输入手机号',
closeOnClickModal: false,
inputValidator: (value) => {
if (!value) return '请填写手机号'
if (!/^1[3456789]\d{9}$/.test(value)) return '手机号格式不正确!'
// if(!value) return '输入不能为空'
}
}).then(({value}) => {
updatePhoneApi({id: row.uid,phone: value}).then(() => {
this.$message.success('编辑成功')
this.getList();
})
}).catch(() => {
this.$message.info('取消输入')
})
},
// 清除
clearSpread(row) {
this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
@@ -735,7 +767,7 @@
_this.couponData.push(item.title)
})
_this.selectionList = []
},this.userIds)
},this.userIds,'user')
},
Close() {
this.Visible = false

View File

@@ -53,6 +53,7 @@
<script>
import { infobyconditionApi, topdetailApi } from '@/api/user'
import { integralListApi } from '@/api/marketing'
export default {
name: "UserDetails",
props:{
@@ -97,7 +98,48 @@
methods: {
changeType(key) {
this.tableFrom.type = key
this.getInfo()
if(key === '1'){
this.integral()
}else{
this.getInfo()
}
},
integral() {
this.loading = true
integralListApi({ limit:this.tableFrom.limit, page: this.tableFrom.page}, {uid:this.uid}).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.columns = [
{
title: '来源/用途',
key: 'title',
minWidth: 120
},
{
title: '积分变化',
key: 'integral',
minWidth: 120
},
{
title: '变化后积分',
key: 'balance',
minWidth: 120
},
{
title: '日期',
key: 'updateTime',
minWidth: 120
},
{
title: '备注',
key: 'mark',
minWidth: 120
}
]
this.loading = false
}).catch(res => {
this.loading = false
})
},
getInfo() {
this.tableFrom.userId = this.uid
@@ -140,35 +182,6 @@
}
]
break;
case '1':
this.columns = [
{
title: '来源/用途',
key: 'title',
minWidth: 120
},
{
title: '积分变化',
key: 'number',
minWidth: 120
},
{
title: '变化后积分',
key: 'balance',
minWidth: 120
},
{
title: '日期',
key: 'add_time',
minWidth: 120
},
{
title: '备注',
key: 'mark',
minWidth: 120
}
]
break;
case '2':
this.columns = [
{
@@ -217,7 +230,7 @@
},
{
title: '兑换时间',
key: 'useTime',
key: 'updateTime',
minWidth: 120
}
]