优化用户状态编辑
This commit is contained in:
@@ -1,39 +1,42 @@
|
||||
'use strict'
|
||||
"use strict";
|
||||
// Template version: 1.2.5
|
||||
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||
|
||||
const path = require('path')
|
||||
const devEnv = require('./dev.env')
|
||||
const path = require("path");
|
||||
const devEnv = require("./dev.env");
|
||||
|
||||
module.exports = {
|
||||
dev: {
|
||||
// Paths
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
assetsSubDirectory: "static",
|
||||
assetsPublicPath: "/",
|
||||
// 代理列表, 是否开启代理通过[./dev.env.js]配置
|
||||
proxyTable: devEnv.OPEN_PROXY === false ? {} : {
|
||||
'/czg': {
|
||||
proxyTable:
|
||||
devEnv.OPEN_PROXY === false
|
||||
? {}
|
||||
: {
|
||||
"/czg": {
|
||||
// target: 'http://192.168.0.132:8100/czg/',
|
||||
// target: 'https://duanjuadmin.xianmxkj.com/czg/',
|
||||
target: 'http://127.0.0.1/czg/',
|
||||
target: "http://127.0.0.1/czg/",
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/czg': ''
|
||||
"^/czg": ""
|
||||
}
|
||||
},
|
||||
'/weixin': {
|
||||
target: 'https://api.weixin.qq.com/',
|
||||
"/weixin": {
|
||||
target: "https://api.weixin.qq.com/",
|
||||
// target: 'https://duanjuadmin.xianmxkj.com/czg/',
|
||||
// target: 'http://127.0.0.1/czg/',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/weixin': ''
|
||||
"^/weixin": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// Various Dev Server settings
|
||||
host: 'localhost', // can be overwritten by process.env.HOST
|
||||
host: "localhost", // can be overwritten by process.env.HOST
|
||||
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: true,
|
||||
errorOverlay: true,
|
||||
@@ -53,7 +56,7 @@ module.exports = {
|
||||
*/
|
||||
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
devtool: 'eval-source-map',
|
||||
devtool: "eval-source-map",
|
||||
|
||||
// If you have problems debugging vue-files in devtools,
|
||||
// set this to false - it *may* help
|
||||
@@ -65,18 +68,18 @@ module.exports = {
|
||||
// (https://github.com/webpack/css-loader#sourcemaps)
|
||||
// In our experience, they generally work as expected,
|
||||
// just be aware of this issue when enabling this option.
|
||||
cssSourceMap: false,
|
||||
cssSourceMap: false
|
||||
},
|
||||
|
||||
build: {
|
||||
// publicPath: '/admin/',
|
||||
// Template for index.html
|
||||
index: path.resolve(__dirname, '../dist/index.html'),
|
||||
index: path.resolve(__dirname, "../dist/index.html"),
|
||||
|
||||
// Paths
|
||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: './',
|
||||
assetsRoot: path.resolve(__dirname, "../dist"),
|
||||
assetsSubDirectory: "static",
|
||||
assetsPublicPath: "./",
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
@@ -84,14 +87,14 @@ module.exports = {
|
||||
|
||||
productionSourceMap: false,
|
||||
// https://webpack.js.org/configuration/devtool/#production
|
||||
devtool: '#source-map',
|
||||
devtool: "#source-map",
|
||||
|
||||
// Gzip off by default as many popular static hosts such as
|
||||
// Surge or Netlify already gzip all static assets for you.
|
||||
// Before setting to `true`, make sure to:
|
||||
// npm install --save-dev compression-webpack-plugin
|
||||
productionGzip: false,
|
||||
productionGzipExtensions: ['js', 'css'],
|
||||
productionGzipExtensions: ["js", "css"],
|
||||
|
||||
// Run the build command with an extra argument to
|
||||
// View the bundle analyzer report after build finishes:
|
||||
@@ -99,4 +102,4 @@ module.exports = {
|
||||
// Set to `true` or `false` to always turn it on or off
|
||||
bundleAnalyzerReport: process.env.npm_config_report
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -4,8 +4,8 @@ export const productUrl='dj-admin';
|
||||
// const baseUrl = "http://192.168.1.7:8100/czg/"
|
||||
// const baseUrl = "https://api.tianjinzhitongdaohe.com/czg/"
|
||||
|
||||
const baseUrl = "https://web-api.hnsiyao.cn/czg/" //测试
|
||||
// const baseUrl = "https://web.hnsiyao.cn/czg/" // 线上
|
||||
// const baseUrl = "https://web-api.hnsiyao.cn/czg/" //测试
|
||||
const baseUrl = "https://web.hnsiyao.cn/czg/" // 线上
|
||||
|
||||
export default{
|
||||
baseUrl
|
||||
|
||||
@@ -69,9 +69,8 @@
|
||||
</td>
|
||||
<th>图像</th>
|
||||
<td class="border-rt">
|
||||
<img
|
||||
:src="tableData.avatar ? tableData.avatar : $http.adornUrlUp('logo.png')"
|
||||
width="80" height="80" />
|
||||
<img :src="tableData.avatar ? tableData.avatar : $http.adornUrlUp('logo.png')" width="80"
|
||||
height="80" />
|
||||
<el-button size="mini" :disabled="!isAuth('userList:update')"
|
||||
style="color: #4f9dec;background: #fff;border: none;" @click="ageChangeU(tableData)">
|
||||
修改</el-button>
|
||||
@@ -106,7 +105,6 @@
|
||||
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
|
||||
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(tableData, 'rate')">
|
||||
修改</el-button>
|
||||
</span>
|
||||
</td>
|
||||
<th>二级推广收益比例</th>
|
||||
<td class="border-rt">
|
||||
@@ -114,7 +112,6 @@
|
||||
<el-button size="mini" :disabled="!isAuth('userList:updatebl')"
|
||||
style="color: #4f9dec;background: #fff;border: none;" @click="xiugai(tableData, 'twoRate')">
|
||||
修改</el-button>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -124,10 +121,10 @@
|
||||
<td>{{ tableData.zhifubao ? tableData.zhifubao : '未绑定' }}</td>
|
||||
<th>用户状态</th>
|
||||
<td class="border-rt">
|
||||
<span v-if="tableData.status == 0" style="color: #f56c6c;">拉黑</span>
|
||||
<span v-if="tableData.status == 1">正常</span>
|
||||
<span v-if="tableData.status == 2" style="color: #f56c6c;">禁用</span>
|
||||
<span style="color: #4f9dec;cursor:pointer;"
|
||||
@click="stateChange(tableData)">更改状态</span>
|
||||
<span style="color: #4f9dec;cursor:pointer;" @click="stateChange(tableData)">更改状态</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -138,8 +135,7 @@
|
||||
<th>渠道码</th>
|
||||
<td class="border-rt">
|
||||
{{ tableData.qdCode }}
|
||||
<el-button size="mini" type="warning" plain
|
||||
@click="ageChangeMm(tableData)">修改
|
||||
<el-button size="mini" type="warning" plain @click="ageChangeMm(tableData)">修改
|
||||
</el-button>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -223,9 +219,8 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
|
||||
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
|
||||
layout="total,sizes, prev, pager, next,jumper" :total="userData.total">
|
||||
<el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :page-sizes="[5, 10, 15, 20]"
|
||||
:page-size="limit" :current-page="page" layout="total,sizes, prev, pager, next,jumper" :total="userData.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-tab-pane> -->
|
||||
@@ -300,12 +295,12 @@
|
||||
<el-tab-pane label="充值明细" name="seventh">
|
||||
<div style="display: inline-block;">
|
||||
<span>开始时间:</span>
|
||||
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
|
||||
type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
|
||||
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right" type="datetime"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
|
||||
</el-date-picker>
|
||||
<span>截止时间:</span>
|
||||
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right"
|
||||
type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
|
||||
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="datetime"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
|
||||
</el-date-picker>
|
||||
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="timeDate2">
|
||||
查询</el-button>
|
||||
@@ -737,12 +732,11 @@
|
||||
</div> -->
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">图像:</span>
|
||||
<div style="display: inline-block;width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||
<el-upload class="avatar-uploader" v-model="avatarU"
|
||||
:action="$http.adornUrl('alioss/upload')" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccess1">
|
||||
<img v-if="avatarU" :src="avatarU" class="avatar"
|
||||
style="width: 148px;height: 148px;" />
|
||||
<div
|
||||
style="display: inline-block;width:148px;height:148px;border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;">
|
||||
<el-upload class="avatar-uploader" v-model="avatarU" :action="$http.adornUrl('alioss/upload')"
|
||||
:show-file-list="false" :on-success="handleAvatarSuccess1">
|
||||
<img v-if="avatarU" :src="avatarU" class="avatar" style="width: 148px;height: 148px;" />
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
@@ -760,8 +754,7 @@
|
||||
</div> -->
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">渠道码:</span>
|
||||
<el-input style="width:50%;" v-model="age" type="text" :controls="false"
|
||||
placeholder="请输入渠道码"></el-input>
|
||||
<el-input style="width:50%;" v-model="age" type="text" :controls="false" placeholder="请输入渠道码"></el-input>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisibleMm = false">取 消</el-button>
|
||||
@@ -776,8 +769,7 @@
|
||||
</div> -->
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="width: 200px;display: inline-block;text-align: right;">新密码:</span>
|
||||
<el-input style="width:50%;" v-model="age" type="text" :controls="false"
|
||||
placeholder="请输入新密码"></el-input>
|
||||
<el-input style="width:50%;" v-model="age" type="text" :controls="false" placeholder="请输入新密码"></el-input>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisibleMima = false">取 消</el-button>
|
||||
@@ -785,6 +777,35 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-tabs>
|
||||
<el-dialog title="账号状态" :visible.sync="userStatusDialog">
|
||||
<el-form :model="userStatusForm" :rules="userStatusFormFules" label-width="80px">
|
||||
<el-form-item label="用户编号">
|
||||
<span>{{ userStatusRow.userId }}</span>
|
||||
<!-- <el-input v-model="userStatusRow.userId" disabled></el-input> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="用户昵称">
|
||||
<span>{{ userStatusRow.userName }}</span>
|
||||
<!-- <el-input v-model="userStatusRow.userName" disabled></el-input> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号">
|
||||
<span>{{ userStatusRow.phone }}</span>
|
||||
<!-- <el-input v-model="userStatusRow.phone" disabled></el-input> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="账号状态" prop="status">
|
||||
<el-radio-group v-model="userStatusForm.status" horizontal>
|
||||
<el-radio :label="0">拉黑</el-radio>
|
||||
<el-radio :label="1">正常</el-radio>
|
||||
<el-radio :label="2">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="userStatusDialog = false">取消</el-button>
|
||||
<el-button type="primary" :loading="userStatusFormLoading" @click="userStatusHandle">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -792,6 +813,19 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userStatusDialog: false,
|
||||
userStatusRow: '',
|
||||
userStatusForm: {
|
||||
status: 1
|
||||
},
|
||||
userStatusFormFules: {
|
||||
status: [{
|
||||
required: true,
|
||||
message: '请选择账号状态',
|
||||
trigger: 'change'
|
||||
}]
|
||||
},
|
||||
userStatusFormLoading: false,
|
||||
openValue: 1,
|
||||
closeValue: 0,
|
||||
state: 0,
|
||||
@@ -1265,8 +1299,49 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 改变用户状态
|
||||
userStatusHandle() {
|
||||
this.userStatusFormLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`user/updateUserStatusByUserId?userId=${this.userStatusRow.userId}&status=${this.userStatusForm.status}`),
|
||||
method: 'get'
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
this.userStatusFormLoading = false
|
||||
if (data.code == 0) {
|
||||
this.userStatusDialog = false
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
})
|
||||
this.dataSelect()
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error',
|
||||
duration: 1500,
|
||||
})
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.userStatusFormLoading = false
|
||||
this.$message({
|
||||
message: err.mes,
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
})
|
||||
})
|
||||
},
|
||||
// 更改状态
|
||||
stateChange(row) {
|
||||
console.log("row", row);
|
||||
this.userStatusRow = { ...row };
|
||||
this.userStatusDialog = true;
|
||||
this.userStatusForm.status = row.status;
|
||||
return
|
||||
|
||||
|
||||
let userId = this.$route.query.userId;
|
||||
if (row.status == 1) {
|
||||
var status = 2;
|
||||
|
||||
Reference in New Issue
Block a user