优化上线问题,安全设置等
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
<div>
|
||||
<!-- <el-button type="primary" @click="resetting">添加</el-button> -->
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="类型" prop="type">
|
||||
<!-- <el-table-column label="类型" prop="type">
|
||||
<template v-slot="row">
|
||||
{{ row.row.type == 'text' ? '文本' : '图片' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="描述" prop="name"> </el-table-column>
|
||||
<el-table-column label="内容" prop="value">
|
||||
<el-table-column label="图片" prop="value">
|
||||
<template v-slot="row">
|
||||
<template v-if="row.row.id">
|
||||
<img v-if="row.row.type == 'img'" :src="row.row.value" style="width: 40px;height: 40px;">
|
||||
@@ -20,11 +20,11 @@
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" size="mini" round icon="el-icon-edit"
|
||||
@click="edit(scope.row)">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delHandle([scope.row.id])">
|
||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="delHandle([scope.row.id])">
|
||||
<el-button type="text" :disabled="!scope.row.id" size="mini" round icon="el-icon-delete" slot="reference">
|
||||
删除
|
||||
</el-button>
|
||||
</el-popconfirm>
|
||||
</el-popconfirm> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :model="form" label-width="120px" label-position="left">
|
||||
<el-form-item label="校验安全密码">
|
||||
<el-checkbox v-model="form.isReturn">退款</el-checkbox>
|
||||
<el-checkbox v-model="form.isMemberIn">会员充值</el-checkbox>
|
||||
<el-checkbox v-model="form.isMemberReturn">会员退款</el-checkbox>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="操作密码">
|
||||
<el-input v-model="form.password" type="number" @input="jiantingshuru" :disabled="disabled"
|
||||
:placeholder="disabled ? '******' : '请输入操作密码'" style="width: 200px;"></el-input>
|
||||
@@ -22,6 +18,17 @@
|
||||
<el-button type="primary" @click="submitHandle">保存 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<hr />
|
||||
<el-form ref="form" :model="form" label-width="120px" label-position="left">
|
||||
<el-form-item label="校验安全密码">
|
||||
<el-checkbox v-model="form.isReturn">退款</el-checkbox>
|
||||
<el-checkbox v-model="form.isMemberIn">会员充值</el-checkbox>
|
||||
<el-checkbox v-model="form.isMemberReturn">会员退款</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitHandles">保存 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -54,29 +61,25 @@ export default {
|
||||
},
|
||||
async submitHandle() {
|
||||
|
||||
// if (!this.form.prepareAmount) {
|
||||
// this.$message({
|
||||
// message: "请输入验证码或密码"
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
console.log(this.form, 'tiaoshi1')
|
||||
if (this.form.password) {
|
||||
const res = await modfiyUserInfo({
|
||||
code: this.form.prepareAmount,
|
||||
pwd: md5(this.form.password),
|
||||
});
|
||||
} else {
|
||||
const res = await tbShopInfoPUT({
|
||||
// code: this.form.prepareAmount,
|
||||
// id: this.form.id,
|
||||
// status:this.form.status,
|
||||
...this.form,
|
||||
isReturn: this.form.isReturn == true ? 1 : 0,
|
||||
isMemberIn: this.form.isMemberIn == true ? 1 : 0,
|
||||
isMemberReturn: this.form.isMemberReturn == true ? 1 : 0,
|
||||
});
|
||||
if (!this.form.prepareAmount) {
|
||||
this.$message({
|
||||
message: "请输入验证码"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.form.password) {
|
||||
this.$message({
|
||||
message: "请输入密码"
|
||||
})
|
||||
return
|
||||
}
|
||||
const res = await modfiyUserInfo({
|
||||
code: this.form.prepareAmount,
|
||||
pwd: md5(this.form.password),
|
||||
});
|
||||
console.log(222)
|
||||
|
||||
|
||||
this.form.prepareAmount = ''
|
||||
this.form.password = "******"
|
||||
this.disabled = true
|
||||
@@ -85,6 +88,21 @@ export default {
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
async submitHandles() {
|
||||
const res = await tbShopInfoPUT({
|
||||
// code: this.form.prepareAmount,
|
||||
// id: this.form.id,
|
||||
// status:this.form.status,
|
||||
...this.form,
|
||||
isReturn: this.form.isReturn == true ? 1 : 0,
|
||||
isMemberIn: this.form.isMemberIn == true ? 1 : 0,
|
||||
isMemberReturn: this.form.isMemberReturn == true ? 1 : 0,
|
||||
});
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
},
|
||||
resetting() {
|
||||
this.form.password = ''
|
||||
this.disabled = false
|
||||
|
||||
Reference in New Issue
Block a user