68 Commits

Author SHA1 Message Date
68ea7e40de 修改oss地址 2025-11-04 11:14:16 +08:00
296a8032de 修改为php接口请求 2025-10-15 13:28:19 +08:00
2f464cdc2d 代码更新 2025-10-09 11:29:16 +08:00
a4abdf9cc0 增加登录跳转刷新 2025-08-19 13:34:05 +08:00
d10a6cb178 代码打包修改 2025-08-18 17:22:08 +08:00
gyq
1cfad99f47 优化用户状态编辑 2025-05-26 14:16:02 +08:00
gyq
de16122ec1 新增用户状态修改 2025-05-24 18:16:33 +08:00
duan
2073deec7b 修改文案长度问题 2025-04-21 15:14:11 +08:00
duan
3a211fc862 添加订单统计,达标情况 2025-04-21 14:35:02 +08:00
duan
9ee23afc38 抽奖次数、邀请好友优化 2025-04-02 09:51:53 +08:00
duan
6cccadbbce 抽奖次数、邀请好友 2025-04-01 10:00:31 +08:00
duan
1d2862765b Merge branch 'master' of https://e.coding.net/g-cphe0354/duanju/video_admin 2025-03-06 18:29:00 +08:00
duan
bf93fea486 修改拉黑原因 2025-03-06 18:28:58 +08:00
d1c676336e 更新readme.md 2025-02-26 09:40:25 +08:00
25dcbea759 修改用户信息的问题 2025-02-26 08:52:52 +08:00
duan
55af5fd698 提交代码 2025-02-25 19:37:37 +08:00
gyq
d5d19e2696 去除抽奖转盘接口app/ 2025-02-05 09:34:17 +08:00
gyq
5c5516834e 优化时间选择 2025-01-24 17:43:46 +08:00
gyq
97e8be58c5 优化 2025-01-18 16:45:08 +08:00
gyq
99ef49ffc6 版本更新显示ios 2025-01-17 17:12:16 +08:00
gyq
15354833e2 优化全局系统设置 2025-01-14 15:16:20 +08:00
gyq
21f049f65c 优化订单汇总 2025-01-14 14:31:35 +08:00
gyq
eb33ef97b1 会员列表新增订单汇总 2025-01-14 13:32:54 +08:00
gyq
65d61c5ebc 新增实名用户列表 2025-01-14 08:51:36 +08:00
gyq
93fb3bc46f 优化 2025-01-13 16:45:07 +08:00
gyq
95d1eda7a3 提现中心优化 2025-01-13 16:27:25 +08:00
gyq
67a15a9183 Merge branch 'master' of e.coding.net:g-cphe0354/duanju/video_admin into gyq 2025-01-09 17:30:13 +08:00
6f83ecd9f9 弹窗公共列表增加类型展示 2025-01-09 16:41:55 +08:00
2c65bfca6a 增加弹窗广告类型,修改内容为富文本 2025-01-09 15:54:22 +08:00
gyq
c65278cb28 优化提现统计 2025-01-09 14:59:48 +08:00
gyq
2cd5bb75dd 提现中心新增危险用户提示 2025-01-08 15:18:01 +08:00
wwz
2dc98838c7 累计提现金额 保留后两位 2025-01-07 11:09:59 +08:00
wwz
5723fb853a 处理分页问题 2025-01-07 09:48:42 +08:00
wwz
114ee304d8 提现信息页面空白 2025-01-06 22:11:07 +08:00
wwz
b58f60bb23 userId 2025-01-06 16:04:25 +08:00
6b711858e6 系统配置增加是否返回给app 2025-01-04 14:51:41 +08:00
gyq
729d4bc645 优化分页 2025-01-03 10:52:05 +08:00
cc6d86b07c Merge branch 'master' of https://e.coding.net/g-cphe0354/duanju/video_admin 2025-01-02 17:07:52 +08:00
d67b7e4342 消息中心增加首页弹窗公共 2025-01-02 17:07:49 +08:00
gyq
42e84864c4 优化支付宝提现统计 2024-12-31 15:55:59 +08:00
gyq
c5c679e1ab 财务中心新增支付宝提现统计 2024-12-31 15:34:22 +08:00
ef09b41510 处理请求多余/问题 2024-12-30 19:07:40 +08:00
697436ee71 去除请求中的// 2024-12-30 18:23:10 +08:00
757a97d254 修复上传正式apk名称判断 2024-12-28 19:59:48 +08:00
52c0552e43 Merge branch 'ymf' of https://e.coding.net/g-cphe0354/duanju/video_admin 2024-12-28 09:48:08 +08:00
f9cf68d83e 修改请求域名 2024-12-28 09:28:26 +08:00
gyq
1b130a9baa 更新 2024-12-27 17:46:46 +08:00
gyq
88156a6e4e 提现审核增加信息 2024-12-27 17:08:30 +08:00
gyq
653ab223c9 更新体现表格 2024-12-27 15:03:02 +08:00
a8f2a8c8b4 gulp打包revReplace方法换回replace 2024-12-27 13:47:05 +08:00
f256740dcb 修改打包方式 2024-12-26 17:37:28 +08:00
gyq
139f198ad5 新增提现审核 2024-12-26 17:04:01 +08:00
GYJ
a526f5ddd6 修改请求地址 2024-12-26 14:29:24 +08:00
gyq
1a3b207d4d table增加剩余数量、总数量 2024-12-25 14:59:13 +08:00
gyq
872c79cc75 优化 2024-12-25 14:42:48 +08:00
gyq
317acfecca Merge branch 'master' of e.coding.net:g-cphe0354/duanju/video_admin into gyq 2024-12-25 14:40:49 +08:00
gyq
bc03876a7e 新增兑奖记录 2024-12-25 14:39:57 +08:00
798fa845ea 修复奖励图片不展示问题 2024-12-25 13:54:22 +08:00
bef654169f 任务列表页面修改奖励图片标题文字 2024-12-25 13:46:59 +08:00
f1f6605617 任务奖励列表增加图片展示 2024-12-25 13:40:38 +08:00
698f8ae186 任务奖励增加图片 2024-12-25 10:22:53 +08:00
0ffc27f750 增加购买10集价格 2024-12-24 14:45:25 +08:00
e0b70d8f65 任务列表增加按钮下方内容和跳转字段 2024-12-21 17:08:40 +08:00
1173900fb6 抽奖转盘增加类型,修复转盘抽奖上传图片回显问题 2024-12-21 10:21:57 +08:00
4b55f7f344 修改现金红包抽奖金额配置:
从第几次变化可以为空
2024-12-19 14:38:49 +08:00
b5b9db41b2 数据中心》订单统计增加提现次数,提现总金额,打包代码增加; 2024-12-19 13:56:51 +08:00
e6245e08e0 红包抽奖配置增加从第几次开始变化 2024-12-19 09:37:37 +08:00
9a9f4745fc 依赖更新 2024-12-18 11:26:07 +08:00
47 changed files with 8985 additions and 6828 deletions

View File

@@ -7,3 +7,9 @@
- 发布时可动态配置CDN静态资源切换新旧版本 - 发布时可动态配置CDN静态资源切换新旧版本
雷池测试
https://47.122.26.160:9443
admin kwxpryrq
雷池正式
https://47.122.73.144:9443/
admin Qhs6AogY

View File

@@ -1,102 +1,105 @@
'use strict' "use strict";
// Template version: 1.2.5 // Template version: 1.2.5
// see http://vuejs-templates.github.io/webpack for documentation. // see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path') const path = require("path");
const devEnv = require('./dev.env') const devEnv = require("./dev.env");
module.exports = { module.exports = {
dev: { dev: {
// Paths // Paths
assetsSubDirectory: 'static', assetsSubDirectory: "static",
assetsPublicPath: '/', assetsPublicPath: "/",
// 代理列表, 是否开启代理通过[./dev.env.js]配置 // 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : { proxyTable:
'/sqx_fast': { devEnv.OPEN_PROXY === false
// target: 'http://192.168.0.132:8100/sqx_fast/', ? {}
// target: 'https://duanjuadmin.xianmxkj.com/sqx_fast/', : {
target: 'http://127.0.0.1/sqx_fast/', "/czg": {
changeOrigin: true, // target: 'http://192.168.0.132:8100/czg/',
pathRewrite: { // target: 'https://duanjuadmin.xianmxkj.com/czg/',
'^/sqx_fast': '' target: "http://127.0.0.1/czg/",
} changeOrigin: true,
}, pathRewrite: {
'/weixin': { "^/czg": ""
target: 'https://api.weixin.qq.com/', }
// target: 'https://duanjuadmin.xianmxkj.com/sqx_fast/', },
// target: 'http://127.0.0.1/sqx_fast/', "/weixin": {
changeOrigin: true, target: "https://api.weixin.qq.com/",
pathRewrite: { // target: 'https://duanjuadmin.xianmxkj.com/czg/',
'^/weixin': '' // target: 'http://127.0.0.1/czg/',
} changeOrigin: true,
}, pathRewrite: {
}, "^/weixin": ""
}
}
},
// Various Dev Server settings // 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 port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,
notifyOnErrors: true, notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader? // Use Eslint Loader?
// If true, your code will be linted during bundling and // If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console. // linting errors and warnings will be shown in the console.
useEslint: true, useEslint: true,
// If true, eslint errors and warnings will also be shown in the error overlay // If true, eslint errors and warnings will also be shown in the error overlay
// in the browser. // in the browser.
showEslintErrorsInOverlay: false, showEslintErrorsInOverlay: false,
/** /**
* Source Maps * Source Maps
*/ */
// https://webpack.js.org/configuration/devtool/#development // https://webpack.js.org/configuration/devtool/#development
devtool: 'eval-source-map', devtool: "eval-source-map",
// If you have problems debugging vue-files in devtools, // If you have problems debugging vue-files in devtools,
// set this to false - it *may* help // set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting // https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true, cacheBusting: true,
// CSS Sourcemaps off by default because relative paths are "buggy" // CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README // with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps) // (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected, // In our experience, they generally work as expected,
// just be aware of this issue when enabling this option. // just be aware of this issue when enabling this option.
cssSourceMap: false, cssSourceMap: false
}, },
build: { build: {
// publicPath: '/admin/', // publicPath: '/admin/',
// Template for index.html // Template for index.html
index: path.resolve(__dirname, '../dist/index.html'), index: path.resolve(__dirname, "../dist/index.html"),
// Paths // Paths
assetsRoot: path.resolve(__dirname, '../dist'), assetsRoot: path.resolve(__dirname, "../dist"),
assetsSubDirectory: 'static', assetsSubDirectory: "static",
assetsPublicPath: './', assetsPublicPath: "./",
/** /**
* Source Maps * Source Maps
*/ */
productionSourceMap: false, productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production // https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map', devtool: "#source-map",
// Gzip off by default as many popular static hosts such as // Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you. // Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to: // Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin // npm install --save-dev compression-webpack-plugin
productionGzip: false, productionGzip: false,
productionGzipExtensions: ['js', 'css'], productionGzipExtensions: ["js", "css"],
// Run the build command with an extra argument to // Run the build command with an extra argument to
// View the bundle analyzer report after build finishes: // View the bundle analyzer report after build finishes:
// `npm run build --report` // `npm run build --report`
// Set to `true` or `false` to always turn it on or off // Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report bundleAnalyzerReport: process.env.npm_config_report
} }
} };

102
gulpfile copy.js Normal file
View File

@@ -0,0 +1,102 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var path = require('path');
var del = require('del');
var distPath = path.resolve('./dist');
var version = ''; // 版本号
var versionPath = ''; // 版本号路径
var env = ''; // 运行环境
// 创建版本号(年月日时分)
(function () {
var d = new Date();
var yy = d.getFullYear().toString().slice(2);
var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1);
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate();
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours();
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes();
version = yy + MM + DD + h + mm;
versionPath = distPath + '/' + version;
})();
// 编译
gulp.task('build', $.shell.task(['node build/build.js']));
// 创建版本号目录
gulp.task('create:versionCatalog', gulp.series('build', function () {
return gulp.src(`${distPath}/static/**/*`)
.pipe(gulp.dest(`${versionPath}/static/`))
}))
// 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量
gulp.task('replace:cdnUrl', gulp.series('create:versionCatalog', function () {
return gulp.src(`${versionPath}/static/js/manifest.js`)
.pipe($.replace(new RegExp(`"${require('./config').build.assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"'))
.pipe(gulp.dest(`${versionPath}/static/js/`))
}))
// 替换${versionPath}/static/config/index-${env}.js window.SITE_CONFIG['version']配置变量
gulp.task('replace:version', gulp.series('create:versionCatalog', function () {
return gulp.src(`${versionPath}/static/config/index-${env}.js`)
.pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`))
.pipe(gulp.dest(`${versionPath}/static/config/`))
}))
// 合并${versionPath}/static/config/[index-${env}, init].js 至 ${distPath}/config/index.js
gulp.task('concat:config', gulp.series('replace:version', function () {
return gulp.src([`${versionPath}/static/config/index-${env}.js`, `${versionPath}/static/config/init.js`])
.pipe($.concat('index.js'))
.pipe(gulp.dest(`${distPath}/config/`))
}))
// 清空文件历史
gulp.task('clean', function () {
console.log('--clean--')
// del([`${distPath}/static`, `${versionPath}/static/config`]);
// return del([versionPath])
return del([`${distPath}`])
})
gulp.task('build-end', function () {
console.log('--builed-end--')
// del([`${distPath}/static`, `${versionPath}/static/config`]);
return del([`${distPath}/static`, `${versionPath}/static/config`]);
})
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod';
gulp.task('default',
gulp.series('clean',
gulp.parallel('create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config'),
'build', 'build-end')
)
/* gulp.task('default', gulp.series('clean', function (done) {
// 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
// 开始打包编译
// 开始打包编译
gulp.task('default', gulp.series('build','create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config', function (done) {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
done();
}))
})); */
/*
gulp.task('default', gulp.series('clean', function (done) {
// 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
// 开始打包编译
// 开始打包编译
gulp.task('default', gulp.series('build','create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config', function (done) {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
done();
}))
}));
*/

View File

@@ -1,102 +1,86 @@
var gulp = require('gulp') var gulp = require('gulp');
var $ = require('gulp-load-plugins')() var $ = require('gulp-load-plugins')();
var path = require('path') var path = require('path');
var del = require('del') var del = require('del');
var distPath = path.resolve('./dist') // 先设置环境变量,确保任务定义时可以正确访问
var version = '' // 版本号 var env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod';
var versionPath = '' // 版本号路径
var env = ''; // 运行环境 var distPath = path.resolve('./dist');
var version = ''; // 版本号
var versionPath = ''; // 版本号路径
// 创建版本号(年月日时分) // 创建版本号(年月日时分)
(function () { (function () {
var d = new Date() var d = new Date();
var yy = d.getFullYear().toString().slice(2) var yy = d.getFullYear().toString().slice(2);
var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1) var MM = (d.getMonth() + 1).toString().padStart(2, '0');
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate() var DD = d.getDate().toString().padStart(2, '0');
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours() var h = d.getHours().toString().padStart(2, '0');
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes() var mm = d.getMinutes().toString().padStart(2, '0');
version = yy + MM + DD + h + mm; version = yy + MM + DD + h + mm;
versionPath = distPath + '/' + version; versionPath = path.join(distPath, version); // 使用path.join更安全
})() })();
// 编译 // 编译
gulp.task('build', $.shell.task(['node build/build.js'])) gulp.task('build', $.shell.task(['node build/build.js']));
// 创建版本号目录 // 创建版本号目录
gulp.task('create:versionCatalog', gulp.series('build', function () { gulp.task('create:versionCatalog', gulp.series('build', function () {
return gulp.src(`${distPath}/static/**/*`) return gulp.src(path.join(distPath, 'static', '**', '*'))
.pipe(gulp.dest(`${versionPath}/static/`)) .pipe(gulp.dest(path.join(versionPath, 'static')));
})) }));
// 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量 // 替换cdnUrl占位变量
gulp.task('replace:cdnUrl', gulp.series('create:versionCatalog', function () { gulp.task('replace:cdnUrl', gulp.series('create:versionCatalog', function () {
return gulp.src(`${versionPath}/static/js/manifest.js`) const assetsPublicPath = require('./config').build.assetsPublicPath;
.pipe($.replace(new RegExp(`"${require('./config').build.assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"')) return gulp.src(path.join(versionPath, 'static', 'js', 'manifest.js'))
.pipe(gulp.dest(`${versionPath}/static/js/`)) .pipe($.replace(new RegExp(`"${assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"'))
})) .pipe(gulp.dest(path.join(versionPath, 'static', 'js')));
}));
// 替换${versionPath}/static/config/index-${env}.js window.SITE_CONFIG['version']配置变量 // 替换version配置变量
gulp.task('replace:version', gulp.series('create:versionCatalog', function () { gulp.task('replace:version', gulp.series('create:versionCatalog', function () {
return gulp.src(`${versionPath}/static/config/index-${env}.js`) return gulp.src(path.join(versionPath, 'static', 'config', `index-${env}.js`))
.pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`)) .pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`))
.pipe(gulp.dest(`${versionPath}/static/config/`)) .pipe(gulp.dest(path.join(versionPath, 'static', 'config')));
})) }));
// 合并${versionPath}/static/config/[index-${env}, init].js 至 ${distPath}/config/index.js // 合并配置文件
gulp.task('concat:config', gulp.series('replace:version', function () { gulp.task('concat:config', gulp.series('replace:version', function () {
return gulp.src([`${versionPath}/static/config/index-${env}.js`, `${versionPath}/static/config/init.js`]) return gulp.src([
.pipe($.concat('index.js')) path.join(versionPath, 'static', 'config', `index-${env}.js`),
.pipe(gulp.dest(`${distPath}/config/`)) path.join(versionPath, 'static', 'config', 'init.js')
})) ])
.pipe($.concat('index.js'))
.pipe(gulp.dest(path.join(distPath, 'config')));
}));
// 清空文件历史 // 清空文件历史
gulp.task('clean', function () { gulp.task('clean', function () {
console.log('--clean--') console.log('--clean--');
// del([`${distPath}/static`, `${versionPath}/static/config`]); return del([distPath]);
// return del([versionPath]) });
return del([`${distPath}`])
})
// 构建结束清理
gulp.task('build-end', function () { gulp.task('build-end', function () {
console.log('--builed-end--') console.log('--builed-end--');
// del([`${distPath}/static`, `${versionPath}/static/config`]); return del([
return del([`${distPath}/static`, `${versionPath}/static/config`]); path.join(distPath, 'static'),
}) path.join(versionPath, 'static', 'config')
]);
});
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod' // 主任务 - 按正确顺序执行
gulp.task('default', gulp.series(
gulp.task('default', 'clean',
gulp.series('clean', 'build',
gulp.parallel('create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config'), 'create:versionCatalog',
'build','build-end') gulp.parallel('replace:cdnUrl', 'replace:version'),
) 'concat:config',
'build-end',
function (done) {
console.log(`构建完成,环境: ${env},版本号: ${version}`);
done();
/* gulp.task('default', gulp.series('clean', function (done) { }
// 获取环境配置 ));
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
// 开始打包编译
// 开始打包编译
gulp.task('default', gulp.series('build','create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config', function (done) {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
done();
}))
})); */
/*
gulp.task('default', gulp.series('clean', function (done) {
// 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'
// 开始打包编译
// 开始打包编译
gulp.task('default', gulp.series('build','create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config', function (done) {
// 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`])
done();
}))
}));
*/

355
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,7 @@
"axios": "0.17.1", "axios": "0.17.1",
"babel-plugin-component": "0.10.1", "babel-plugin-component": "0.10.1",
"babel-polyfill": "6.26.0", "babel-polyfill": "6.26.0",
"dayjs": "^1.11.13",
"echarts": "^5.5.1", "echarts": "^5.5.1",
"element-china-area-data": "^5.0.2", "element-china-area-data": "^5.0.2",
"element-ui": "2.8.2", "element-ui": "2.8.2",
@@ -29,12 +30,16 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"npm": "^6.9.0", "npm": "^6.9.0",
"qs": "^6.13.1",
"quill": "^2.0.3",
"svg-baker-runtime": "^1.4.7",
"svg-sprite-loader": "3.7.3", "svg-sprite-loader": "3.7.3",
"video.js": "^8.20.0", "video.js": "^8.20.0",
"videojs-contrib-hls": "^5.15.0", "videojs-contrib-hls": "^5.15.0",
"vue": "2.5.16", "vue": "2.5.16",
"vue-baidu-map": "^0.21.22", "vue-baidu-map": "^0.21.22",
"vue-cookie": "1.1.4", "vue-cookie": "1.1.4",
"vue-hot-reload-api": "^2.3.4",
"vue-jsonp": "^2.0.0", "vue-jsonp": "^2.0.0",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-router": "3.0.1", "vue-router": "3.0.1",

2
src/api/announcement.js Normal file
View File

@@ -0,0 +1,2 @@
import {API1} from './classApi'
export const $announcement=new API1('announcement')

View File

@@ -25,4 +25,32 @@ class API {
} }
} }
export class API1 {
constructor(url) {
const map = {
add: 'POST',
del: 'DELETE',
update: 'PUT',
get: 'GET'
}
this.url = url
for (let key in map) {
this[key] = function (data) {
data = Array.isArray(data) ? data : {
...data
}
if (key === 'del') {
}
const par={ url:key==='get'?url+'/list':url, method: map[key] }
if(key==='get'){
par.params=data
}else{
par.data=data
}
return $http(par)
}
}
}
}
export default API export default API

View File

@@ -8,14 +8,14 @@ function add(data) {
} }
function del(data) { function del(data) {
return $http({ return $http({
url: 'discSpinning/deleteDiscSpinning', url: 'discSpinning/deleteDiscSpinning?id='+data.id,
method: 'post', method: 'post',
data: data data: data
}) })
} }
function getList(data) { function getList(data) {
return $http({ return $http({
url: 'app/discSpinning/selectDiscSpinning', url: 'discSpinning/selectDiscSpinning',
method: 'get', method: 'get',
params: data params: data
}) })

27
src/api/renwu-record.js Normal file
View File

@@ -0,0 +1,27 @@
import $http from "@/utils/httpRequest";
/**
* 兑换记录
* @param {*} params
* @returns
*/
export function userPrizeExchangePage(params) {
return $http({
url: "/userPrizeExchange/page",
method: "get",
params
});
}
/**
* 管理端-发放奖品
* @param {*} params
* @returns
*/
export function userPrizeExchangeDeliver(data) {
return $http({
url: "/userPrizeExchange/deliver",
method: "POST",
data
});
}

View File

@@ -1,41 +1,42 @@
import $http from '@/utils/httpRequest' import $http from "@/utils/httpRequest";
function add(data) { function add(data) {
return $http({ return $http({
url: 'taskCenter/insertTaskCenter', url: "taskCenter/insertTaskCenter",
method: 'post', method: "post",
data: data data: data
}) });
} }
function del(id) { function del(id) {
return $http({ return $http({
url: 'taskCenter/deleteTaskCenter?id='+id, url: "taskCenter/deleteTaskCenter?id=" + id,
method: 'post' method: "post"
}) });
} }
function getList(data) { function getList(data) {
return $http({ return $http({
url: 'taskCenter/selectTaskCenter', url: "taskCenter/selectTaskCenter",
method: 'get', method: "get",
params: data params: data
}) });
} }
function get(id) { function get(id) {
return $http({ return $http({
url: 'taskCenter' + id, url: "taskCenter" + id,
method: 'get', method: "get",
params: data params: data
}) });
} }
function update(data) { function update(data) {
return $http({ return $http({
url: 'taskCenter/updateTaskCenter', url: "taskCenter/updateTaskCenter",
method: 'post', method: "post",
data: data data: data
}) });
} }
export default { export default {
add add,
, del, del,
get, getList, get,
update getList,
} update
};

14
src/api/viplist.js Normal file
View File

@@ -0,0 +1,14 @@
import $http from "@/utils/httpRequest";
/**
* 根据交易订单号获取汇总信息
* @param {*} params
* @returns
*/
export function queryByTradeNo(params) {
return $http({
url: "/order/queryByTradeNo",
method: "get",
params
});
}

78
src/api/withdraw.js Normal file
View File

@@ -0,0 +1,78 @@
import $http from "@/utils/httpRequest";
/**
* 提现记录
* @param {*} params
* @returns
*/
export function cashOutAuditPage(params) {
return $http({
url: "/cashOutAudit/page",
method: "get",
params
});
}
/**
* 提现审核
* @param {*} params
* @returns
*/
export function cashOutAuditAudit(data) {
return $http({
url: "/cashOutAudit/audit",
method: "POST",
data
});
}
/**
* 提现统计
* @param {*} params
* @returns
*/
export function summary_query(params) {
return $http({
url: "/cashOutAudit/alipay/transfer/summary/query",
method: "get",
params
});
}
/**
* 实名信息列表
* @param {*} params
* @returns
*/
export function userInfo_list(params) {
return $http({
url: "/czg/userInfo/list",
method: "get",
params
});
}
/**
* 实名信息修改
* @param {*} data
* @returns
*/
export function userInfo(data) {
return $http({
url: "/czg/userInfo",
method: "put",
data
});
}
/**
* 实名删除
* @param {*} data
* @returns
*/
export function userInfoDel(data) {
return $http({
url: "/czg/userInfo",
method: "DELETE",
data
});
}

View File

@@ -70,7 +70,7 @@ export default {
return; return;
} }
this.url = fileRes.replace( this.url = fileRes.replace(
"https://sy-duanju.oss-cn-nanjing.aliyuncs.com/", "https://sy-duanju.oss-cn-chengdu.aliyuncs.com/",
"https://short-video.hnsiyao.cn/" "https://short-video.hnsiyao.cn/"
); );
}, },

View File

@@ -1,9 +1,12 @@
export const testUrl='video-admin'; export const testUrl='video-admin';
export const productUrl='dj-admin'; export const productUrl='dj-admin';
// const baseUrl = "http://192.168.1.15:8100/sqx_fast/" // const baseUrl = "http://192.168.1.7:8100/czg/"
const baseUrl = "https://video.hnsiyao.cn/sqx_fast/" // const baseUrl = "https://api.tianjinzhitongdaohe.com/czg/"
// const baseUrl = "https://dj-api.hnsiyao.cn/sqx_fast/"
// const baseUrl = "https://web-api.hnsiyao.cn/czg/" //测试
const baseUrl = "https://web.hnsiyao.cn/czg/" // 线上
// const baseUrl = "https://ph.hnsiyao.cn/czg/" // 线上
export default{ export default{
baseUrl baseUrl

View File

@@ -37,6 +37,8 @@ const mainRoutes = {
{path: '/userList', component: _import('user/userList'), name: 'userList', meta: {title: '用户列表', isTab: true}}, {path: '/userList', component: _import('user/userList'), name: 'userList', meta: {title: '用户列表', isTab: true}},
{path: '/allocationList',component: _import('allocation/allocationList'),name: 'allocationList',meta: {title: '配置列表', isTab: true}}, {path: '/allocationList',component: _import('allocation/allocationList'),name: 'allocationList',meta: {title: '配置列表', isTab: true}},
{path: '/financeList', component: _import('finance/financeList'), name: 'financeList', meta: {title: '财务中心', isTab: true}}, {path: '/financeList', component: _import('finance/financeList'), name: 'financeList', meta: {title: '财务中心', isTab: true}},
{path: '/shareFriends', component: _import('finance/shareFriends'), name: 'shareFriends', meta: {title: '邀请好友奖励', isTab: true}},
{path: '/lotteryInquiry', component: _import('finance/lotteryInquiry'), name: 'lotteryInquiry', meta: {title: '抽奖查询', isTab: true}},
{path: '/message', component: _import('message/message'), name: 'message', meta: {title: '消息中心', isTab: true}}, {path: '/message', component: _import('message/message'), name: 'message', meta: {title: '消息中心', isTab: true}},
{path: '/renwu', component: _import('renwu/index'), name: 'renwu', meta: {title: '任务中心', isTab: false}}, {path: '/renwu', component: _import('renwu/index'), name: 'renwu', meta: {title: '任务中心', isTab: false}},
{path: '/taskConfig', component: _import('taskConfig/taskConfig'), name: 'taskConfig', meta: {title: '任务配置', isTab: true}}, {path: '/taskConfig', component: _import('taskConfig/taskConfig'), name: 'taskConfig', meta: {title: '任务配置', isTab: true}},

View File

@@ -9,14 +9,14 @@ export const entryName = '短剧13.2系统';
const baseUrl = config.baseUrl const baseUrl = config.baseUrl
// const baseUrl = "http://192.168.1.15:8100/sqx_fast/" // const baseUrl = "http://192.168.1.15:8100/czg/"
// const baseUrl = "https://video.hnsiyao.cn/sqx_fast/" // const baseUrl = "https://video.hnsiyao.cn/czg/"
// const baseUrl = "https://dj-api.hnsiyao.cn/sqx_fast/" // const baseUrl = "https://dj-api.hnsiyao.cn/czg/"
// const $urlMap={ // const $urlMap={
// local:'http://192.168.1.15:8100/sqx_fast/', // local:'http://192.168.1.15:8100/czg/',
// product:'https://dj-api.hnsiyao.cn/sqx_fast/', // product:'https://dj-api.hnsiyao.cn/czg/',
// test:'https://dj-api.hnsiyao.cn/sqx_fast/', // test:'https://dj-api.hnsiyao.cn/czg/',
// } // }
// const $env='product' // const $env='product'
const http = axios.create({ const http = axios.create({
@@ -33,9 +33,10 @@ const http = axios.create({
http.interceptors.request.use(config => { http.interceptors.request.use(config => {
config.headers['token'] = Vue.cookie.get('token') // 请求头带上token config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
// config.baseURL = $urlMap[$env] // config.baseURL = $urlMap[$env]
const arr = config.url.split('sqx_fast/') const arr = config.url.split('czg/')
config.url = baseUrl + (arr.length >= 2 ? arr[1] : arr[0]) config.url = baseUrl + (arr.length >= 2 ? arr[1] : arr[0])
// config.url = "https://dj-api.hnsiyao.cn/sqx_fast/" config.url = config.url.replace('czg//', 'czg/');
// config.url = "https://dj-api.hnsiyao.cn/czg/"
return config return config
}, error => { }, error => {
return Promise.reject(error) return Promise.reject(error)
@@ -48,6 +49,9 @@ http.interceptors.response.use(response => {
if (response.data && response.data.code === 401) { // 401, token失效 if (response.data && response.data.code === 401) { // 401, token失效
clearLoginInfo() clearLoginInfo()
router.push({name: 'login'}) router.push({name: 'login'})
setTimeout(() => {
window.location.reload()
}, 300);
} }
return response return response
}, error => { }, error => {
@@ -61,8 +65,8 @@ http.interceptors.response.use(response => {
http.adornUrl = (actionName) => { http.adornUrl = (actionName) => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截! // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
// return 'http://192.168.0.132:8100/sqx_fast/' + actionName // return 'http://192.168.0.132:8100/czg/' + actionName
// return 'https://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName // return 'https://duanjuadmin.xianmxkj.com/czg/' + actionName
actionName = actionName.replace(/^\//, ""); actionName = actionName.replace(/^\//, "");
return baseUrl + actionName return baseUrl + actionName
@@ -70,8 +74,8 @@ http.adornUrl = (actionName) => {
http.adornUrlUp = (actionName) => { http.adornUrlUp = (actionName) => {
// 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截! // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
// return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
// return 'http://192.168.0.132:8183/sqx_fast/' + actionName // return 'http://192.168.0.132:8183/czg/' + actionName
// return 'https://duanjuadmin.xianmxkj.com/sqx_fast/' + actionName // return 'https://duanjuadmin.xianmxkj.com/czg/' + actionName
actionName = actionName.replace(/^\//, ""); actionName = actionName.replace(/^\//, "");
return baseUrl + actionName return baseUrl + actionName
@@ -82,7 +86,7 @@ http.adornUrlWX = (actionName) => {
actionName = actionName.replace(/^\//, ""); actionName = actionName.replace(/^\//, "");
return '/weixin/' + actionName return '/weixin/' + actionName
// return 'https://api.weixin.qq.com/' + actionName // return 'https://api.weixin.qq.com/' + actionName
// return 'https://dj-api.hnsiyao.cn/sqx_fast/' + actionName // return 'https://dj-api.hnsiyao.cn/czg/' + actionName
} }
/** /**

View File

@@ -9,6 +9,13 @@
</el-table-column> </el-table-column>
<el-table-column prop="value" label="内容" width="500"> <el-table-column prop="value" label="内容" width="500">
</el-table-column> </el-table-column>
<el-table-column label="是否返回给App" prop="isAppUse" width="120">
<template slot-scope="scope">
<!-- <el-switch v-model="scope.row.isAppUse" @change="updateAmendNotice($event, scope.row)"
:active-value="1" :inactive-value="0"></el-switch> -->
{{ scope.row.isAppUse == 1 ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column prop="createAt" label="创建时间"> <el-table-column prop="createAt" label="创建时间">
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="id" width="120"> <el-table-column label="操作" prop="id" width="120">
@@ -28,7 +35,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="value" label="内容" width="500"> <el-table-column prop="value" label="内容" width="500">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">{{scope.row.value}}</div> <div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
{{ scope.row.value }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createAt" label="创建时间"> <el-table-column prop="createAt" label="创建时间">
@@ -107,8 +116,8 @@
<el-table-column prop="value" label="内容" width="500"> <el-table-column prop="value" label="内容" width="500">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 4;overflow: hidden;"> style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 4;line-clamp: 4;overflow: hidden;">
{{scope.row.value}}</div> {{ scope.row.value }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createAt" label="创建时间"> <el-table-column prop="createAt" label="创建时间">
@@ -161,48 +170,52 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="文件上传配置" name="wenjian"> <el-tab-pane label="文件上传配置" name="wenjian">
<el-table v-loading="tableDataLoading" :data="tableData"> <el-table v-loading="tableDataLoading" :data="tableData">
<el-table-column fixed prop="type" label="编号" align="center" width="80"> <el-table-column fixed prop="type" label="编号" align="center" width="80">
</el-table-column> </el-table-column>
<el-table-column prop="min" label="类型"> <el-table-column prop="min" label="类型">
</el-table-column> </el-table-column>
<el-table-column prop="value" label="内容" width="500"> <el-table-column prop="value" label="内容" width="500">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">{{scope.row.value}}</div> <div
</template> style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
</el-table-column> {{ scope.row.value }}</div>
<el-table-column prop="createAt" label="创建时间"> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="id" width="120"> <el-table-column prop="createAt" label="创建时间">
<template slot-scope="scope"> </el-table-column>
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')" <el-table-column label="操作" prop="id" width="120">
@click="amend(scope.$index, scope.row)">编辑 <template slot-scope="scope">
</el-button> <el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
</template> @click="amend(scope.$index, scope.row)">编辑
</el-table-column> </el-button>
</el-table> </template>
</el-table-column>
</el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="协议配置" name="xieyi"> <el-tab-pane label="协议配置" name="xieyi">
<el-table v-loading="tableDataLoading" :data="tableData"> <el-table v-loading="tableDataLoading" :data="tableData">
<el-table-column fixed prop="type" label="编号" align="center" width="80"> <el-table-column fixed prop="type" label="编号" align="center" width="80">
</el-table-column> </el-table-column>
<el-table-column prop="min" label="类型"> <el-table-column prop="min" label="类型">
</el-table-column> </el-table-column>
<el-table-column prop="value" label="内容" width="500"> <el-table-column prop="value" label="内容" width="500">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">{{scope.row.value}}</div> <div
</template> style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
</el-table-column> {{ scope.row.value }}</div>
<el-table-column prop="createAt" label="创建时间"> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="id" width="120"> <el-table-column prop="createAt" label="创建时间">
<template slot-scope="scope"> </el-table-column>
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')" <el-table-column label="操作" prop="id" width="120">
@click="amend(scope.$index, scope.row)">编辑 <template slot-scope="scope">
</el-button> <el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
</template> @click="amend(scope.$index, scope.row)">编辑
</el-table-column> </el-button>
</el-table> </template>
</el-table-column>
</el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="开关配置" name="kaiguan"> <el-tab-pane label="开关配置" name="kaiguan">
<el-table v-loading="tableDataLoading" :data="tableData"> <el-table v-loading="tableDataLoading" :data="tableData">
@@ -232,8 +245,8 @@
<el-table-column prop="value" label="内容"> <el-table-column prop="value" label="内容">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;"> style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
{{scope.row.value}} {{ scope.row.value }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -248,6 +261,32 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="分享好友页面配置" name="Share">
<el-form ref="ShareFriends" :model="ShareFriends" :rules="ShareFriendsrules" label-width="80px">
<el-form-item label="顶部图">
<div
style=" width: 148px; height: 148px; border: 1px dashed #c0ccda; border-radius: 6px;text-align: center;line-height: 148px; ">
<el-upload class="avatar-uploader" v-model="ShareFriends.imageUrl"
:action="$http.adornUrlUp('alioss/upload')" :show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar"
style="border-radius: 6px; width: 148px; height: 148px" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
<div> *建议优先选择jpg格式并且最好控制在500kb内</div>
</el-form-item>
<el-form-item label="邀请文案" prop="tips">
<el-row>
<el-col :span="8"><el-input v-model="ShareFriends.tips"></el-input></el-col>
</el-row>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs> </el-tabs>
<!-- 修改弹框 --> <!-- 修改弹框 -->
<el-dialog title="修改" :visible.sync="dialogFormVisible" center> <el-dialog title="修改" :visible.sync="dialogFormVisible" center>
@@ -256,19 +295,22 @@
<el-input v-model="form.min" style="width:65%;" readonly></el-input> <el-input v-model="form.min" style="width:65%;" readonly></el-input>
</el-form-item> </el-form-item>
<el-form-item label="内容:" :label-width="formLabelWidth"> <el-form-item label="内容:" :label-width="formLabelWidth">
<quill-editor v-if="form.conditionFrom=='xieyi'" ref="myTextEditor" v-model="form.value" :options="quillOption" <quill-editor v-if="form.conditionFrom == 'xieyi'" ref="myTextEditor" v-model="form.value"
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;"> :options="quillOption"
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
</quill-editor> </quill-editor>
<div v-else-if="form.conditionFrom=='image'"> <div v-else-if="form.conditionFrom == 'image'">
<!-- <el-input v-model="form.value" style="width:65%;"></el-input> --> <!-- <el-input v-model="form.value" style="width:65%;"></el-input> -->
<el-upload class="avatar-uploader" v-model="form.value" <el-upload class="avatar-uploader" v-model="form.value"
:action="$http.adornUrlUp('alioss/upload')" :show-file-list="false" :action="$http.adornUrlUp('alioss/upload')" :show-file-list="false"
:on-success="handleAvatarSuccess1"> :on-success="handleAvatarSuccess1">
<img v-if="form.value" :src="form.value" class="avatar" style="width: 148px;height: 148px;" /> <img v-if="form.value" :src="form.value" class="avatar"
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon"
style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload>
</div> </div>
<div v-else-if="form.conditionFrom=='kaiguan'"> <div v-else-if="form.conditionFrom == 'kaiguan'">
<div> <div>
<el-radio-group v-model="form.value"> <el-radio-group v-model="form.value">
<el-radio label="是"></el-radio> <el-radio label="是"></el-radio>
@@ -276,9 +318,17 @@
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<el-input v-else v-model="form.value" :rows="4" style="width:65%;"></el-input> <el-input v-else v-model="form.value" :rows="4" style="width:65%;"></el-input>
<!-- <el-input v-model="form.value" style="width:65%;"></el-input> --> <!-- <el-input v-model="form.value" style="width:65%;"></el-input> -->
</el-form-item> </el-form-item>
<el-form-item label="是否返回给App" :label-width="formLabelWidth">
<!-- <el-switch v-model="form.isAppUse" :active-value="1" :inactive-value="0"></el-switch> -->
<el-radio-group v-model="form.isAppUse">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button> <el-button @click="dialogFormVisible = false"> </el-button>
@@ -289,233 +339,341 @@
</template> </template>
<script> <script>
import { import {
quillEditor
} from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import quillConfig from '../locality/quill-config.js'
export default {
components: {
quillEditor quillEditor
} from 'vue-quill-editor' },
import 'quill/dist/quill.core.css' data() {
import 'quill/dist/quill.snow.css' return {
import 'quill/dist/quill.bubble.css' quillOption: quillConfig,
import quillConfig from '../locality/quill-config.js' openValue: '是',
export default { closeValue: '否',
components: { limit: 10,
quillEditor page: 0,
}, min: '',
data() { value: '',
return { id: '',
quillOption: quillConfig, condition: 'xitong',
openValue: '', activeName: 'first',
closeValue: '否', dialogFormVisible: false,
limit: 10, dialogFormVisible1: false,
page: 0, tableDataLoading: true,
formLabelWidth: '200px',
ShareFriends: {},
ShareFriendsrules: {
imageUrl: [{
required: true,
message: '请选择图片',
trigger: 'blur'
}],
tips: [{
required: true,
message: '请输入文案',
trigger: 'blur'
}],
},
form: {
id: '',
min: '', min: '',
value: '', value: '',
type: '',
isAppUse: false,
},
form2: {
id: '', id: '',
condition: 'xitong', min: '',
activeName: 'first', value: '',
dialogFormVisible: false, type: '',
dialogFormVisible1: false, },
tableDataLoading: true, values: [{
formLabelWidth: '200px', value: 1,
form: { label: '是'
id: '', },
min: '', {
value: '', value: 2,
type: '', label: ''
},
form2: {
id: '',
min: '',
value: '',
type: '',
},
values: [{
value: 1,
label: '是'
},
{
value: 2,
label: '否'
}
],
tableData: [],
checkBoxData: [] //多选框选择的值
} }
}, ],
methods: { imageUrl: '',
handleSizeChange(val) { tableData: [],
this.limit = val; checkBoxData: [] //多选框选择的值
this.dataSelect();
},
handleCurrentChange(val) {
this.page = val - 1;
this.dataSelect();
},
handleClick(tab, event) {
if (tab._props.label == '全局系统配置') {
this.condition = 'xitong'
this.dataSelect()
}
if (tab._props.label == '首页配置') {
this.condition = 'shouye'
this.dataSelect()
}
if (tab._props.label == '微信配置') {
this.condition = 'weixin'
this.dataSelect()
}
if (tab._props.label == '支付宝配置') {
this.condition = 'zhifubao'
this.dataSelect()
}
if (tab._props.label == '短信配置') {
this.condition = 'duanxin'
this.dataSelect()
}
if (tab._props.label == '任务系统配置') {
this.condition = 'renwu'
this.dataSelect()
}
if (tab._props.label == '文件上传配置') {
this.condition = 'oss'
this.dataSelect()
}
if (tab._props.label == '服务费配置') {
this.condition = 'fuwufei'
this.dataSelect()
}
if (tab._props.label == '协议配置') {
this.condition = 'xieyi'
this.dataSelect()
}
if (tab._props.label == '图片配置') {
this.condition = 'image'
this.dataSelect()
}
if (tab._props.label == '开关配置') {
this.condition = 'kaiguan'
this.dataSelect()
}
if (tab._props.label == '客服配置') {
this.condition = 'kefu'
this.dataSelect()
}
},
// 修改弹框
amend(index, rows) {
this.dialogFormVisible = true;
this.form.id = rows.id;
this.form.type = rows.type
this.form.min = rows.min;
this.form.value = rows.value;
this.form.max = rows.max;
this.form.createAt = rows.createAt;
this.form.conditionFrom = rows.conditionFrom
},
// 修改
amendNoticeTo() {
this.$http({
url: this.$http.adornUrl('common/update'),
method: 'post',
data: this.$http.adornData({
'id': this.form.id,
'type': this.form.type,
'value': this.form.value,
'min': this.form.min,
'max': this.form.max,
'createAt': this.form.createAt,
'conditionFrom': this.form.conditionFrom
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
},
// 修改首页
amendWhether(index, rows) {
this.dialogFormVisible1 = true;
this.form2.id = rows.id;
this.form2.type = rows.type
this.form2.min = rows.min;
this.form2.value = rows.value;
this.form2.max = rows.max;
this.form2.createAt = rows.createAt;
this.form2.conditionFrom = rows.conditionFrom
},
WhetherNoticeTo() {
this.$http({
url: this.$http.adornUrl('common/update'),
method: 'post',
data: this.$http.adornData({
'id': this.form2.id,
'type': this.form2.type,
'value': this.form2.value,
'min': this.form2.min,
'max': this.form2.max,
'createAt': this.form2.createAt,
'conditionFrom': this.form2.conditionFrom
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible1 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
},
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/${this.condition}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
})
},
handleAvatarSuccess1(file, fileList) {
this.form.value = file.data
console.log('file.data',file.data)
},
},
mounted() {
this.dataSelect()
} }
},
methods: {
handleSizeChange(val) {
this.limit = val;
this.dataSelect();
},
handleCurrentChange(val) {
this.page = val - 1;
this.dataSelect();
},
onSubmit() {
console.log(this.ShareFriends,'111111111111')
if (!this.ShareFriends.imageUrl) {
this.$message({
message: '请选择图片',
type: 'warning',
duration: 1500
})
return false
}
this.$refs.ShareFriends.validate((valid) => {
if (valid) {
console.log(111)
this.$http({
url: this.$http.adornUrl('/ext/sys/invite/friend/config/save'),
method: 'post',
data: this.$http.adornData({
...this.ShareFriends,
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getData()
}
})
} else {
this.$message.error(data.msg)
}
})
} else {
console.log('error submit!!');
return false;
}
});
},
handleClick(tab, event) {
if (tab._props.label == '全局系统配置') {
this.condition = 'xitong'
this.dataSelect()
}
if (tab._props.label == '首页配置') {
this.condition = 'shouye'
this.dataSelect()
}
if (tab._props.label == '微信配置') {
this.condition = 'weixin'
this.dataSelect()
}
if (tab._props.label == '支付宝配置') {
this.condition = 'zhifubao'
this.dataSelect()
}
if (tab._props.label == '短信配置') {
this.condition = 'duanxin'
this.dataSelect()
}
if (tab._props.label == '任务系统配置') {
this.condition = 'renwu'
this.dataSelect()
}
if (tab._props.label == '文件上传配置') {
this.condition = 'oss'
this.dataSelect()
}
if (tab._props.label == '服务费配置') {
this.condition = 'fuwufei'
this.dataSelect()
}
if (tab._props.label == '协议配置') {
this.condition = 'xieyi'
this.dataSelect()
}
if (tab._props.label == '图片配置') {
this.condition = 'image'
this.dataSelect()
}
if (tab._props.label == '开关配置') {
this.condition = 'kaiguan'
this.dataSelect()
}
if (tab._props.label == '客服配置') {
this.condition = 'kefu'
this.dataSelect()
}
if (tab._props.label == '分享好友页面配置') {
this.condition = 'Share'
this.getData()
}
},
getData(){
this.$http({
url: this.$http.adornUrl(`ext/sys/invite/friend/config/get`),
method: 'get',
params: {}
}).then(({
data
}) => {
if (data && data.code === 0) {
this.ShareFriends = data.data
this.imageUrl = data.data.imageUrl
}
})
},
// 修改弹框
amend(index, rows) {
this.dialogFormVisible = true;
this.form.id = rows.id;
this.form.type = rows.type
this.form.min = rows.min;
this.form.value = rows.value;
this.form.max = rows.max;
this.form.createAt = rows.createAt;
this.form.isAppUse = rows.isAppUse;
this.form.conditionFrom = rows.conditionFrom
},
updateAmendNotice(e, row) {
this.$http({
url: this.$http.adornUrl('common/update'),
method: 'post',
data: this.$http.adornData({
...row,
isAppUse: e
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
this.dataSelect()
} else {
this.$message.error(data.msg)
}
})
},
// 修改
amendNoticeTo() {
this.$http({
url: this.$http.adornUrl('common/update'),
method: 'post',
data: this.$http.adornData({
'id': this.form.id,
'type': this.form.type,
'value': this.form.value,
'min': this.form.min,
'max': this.form.max,
'createAt': this.form.createAt,
'conditionFrom': this.form.conditionFrom,
isAppUse: this.form.isAppUse
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
this.dataSelect()
} else {
this.$message.error(data.msg)
}
})
},
// 修改首页
amendWhether(index, rows) {
this.dialogFormVisible1 = true;
this.form2.id = rows.id;
this.form2.type = rows.type
this.form2.min = rows.min;
this.form2.value = rows.value;
this.form2.max = rows.max;
this.form2.createAt = rows.createAt;
this.form2.conditionFrom = rows.conditionFrom
},
WhetherNoticeTo() {
this.$http({
url: this.$http.adornUrl('common/update'),
method: 'post',
data: this.$http.adornData({
'id': this.form2.id,
'type': this.form2.type,
'value': this.form2.value,
'min': this.form2.min,
'max': this.form2.max,
'createAt': this.form2.createAt,
'conditionFrom': this.form2.conditionFrom
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.dialogFormVisible1 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message.error(data.msg)
}
})
},
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl(`common/type/condition/${this.condition}`),
method: 'get',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data;
this.tableData = returnData
}
})
},
handleAvatarSuccess(file, fileList) {
this.ShareFriends.imageUrl = file.data
this.imageUrl = file.data
},
handleAvatarSuccess1(file, fileList) {
this.form.value = file.data
console.log('file.data', file.data)
},
},
mounted() {
this.dataSelect()
} }
}
</script> </script>
<style scoped="scoped"> <style scoped="scoped">
.eit { .eit {
height: 120px; height: 120px;
} }
</style> </style>

View File

@@ -2,16 +2,8 @@
<div> <div>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<div style="float: right; margin-right: 2%"> <div style="float: right; margin-right: 2%">
<el-button <el-button style="margin: 10px 0" :disabled="!isAuth('app:add')" size="mini" type="primary" icon="document"
style="margin: 10px 0" v-if="upgradeData1.records.length <= 0" @click="addUpgrade">添加升级</el-button>
:disabled="!isAuth('app:add')"
size="mini"
type="primary"
icon="document"
v-if="upgradeData1.records.length <= 0"
@click="addUpgrade"
>添加升级</el-button
>
</div> </div>
<el-table v-loading="tableDataLoading" :data="upgradeData1.records"> <el-table v-loading="tableDataLoading" :data="upgradeData1.records">
<el-table-column fixed prop="id" label="编号" width="80"> <el-table-column fixed prop="id" label="编号" width="80">
@@ -20,7 +12,7 @@
<el-table-column prop="androidWgtUrl" label="安卓"> </el-table-column> <el-table-column prop="androidWgtUrl" label="安卓"> </el-table-column>
<!-- <el-table-column prop="iosWgtUrl" label="苹果"> </el-table-column> --> <!-- <el-table-column prop="iosWgtUrl" label="苹果"> </el-table-column> -->
<el-table-column prop="version" label="安卓版本"> </el-table-column> <el-table-column prop="version" label="安卓版本"> </el-table-column>
<!-- <el-table-column prop="iosVersion" label="ios版本"> </el-table-column> --> <el-table-column prop="iosVersion" label="ios版本"> </el-table-column>
<el-table-column prop="content" label="升级方式"> <el-table-column prop="content" label="升级方式">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
@@ -31,33 +23,18 @@
<el-table-column prop="createAt" label="创建时间"> </el-table-column> <el-table-column prop="createAt" label="创建时间"> </el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="primary" :disabled="!isAuth('app:update')"
size="mini" @click="upgradebj(scope.$index, scope.row)">编辑
type="primary"
:disabled="!isAuth('app:update')"
@click="upgradebj(scope.$index, scope.row)"
>编辑
</el-button> </el-button>
<el-button <el-button size="mini" type="danger" :disabled="!isAuth('app:delete')" @click="upgradelete(scope.row)">删除
size="mini"
type="danger"
:disabled="!isAuth('app:delete')"
@click="upgradelete(scope.row)"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="text-align: center; margin-top: 10px"> <div style="text-align: center; margin-top: 10px">
<el-pagination <el-pagination @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
@size-change="handleSizeChange2" :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
@current-change="handleCurrentChange2" layout="total,sizes, prev, pager, next,jumper" :total="upgradeData1.total">
:page-sizes="[10, 20, 30, 40]"
:page-size="limit"
:current-page="page"
layout="total,sizes, prev, pager, next,jumper"
:total="upgradeData1.total"
>
</el-pagination> </el-pagination>
</div> </div>
<!-- 添加修改升级弹框 --> <!-- 添加修改升级弹框 -->
@@ -66,71 +43,41 @@
<!-- <el-form-item <!-- <el-form-item
label="统一地址:" label="统一地址:"
:label-width="formLabelWidth" :label-width="formLabelWidth"
> >
<el-input v-model="formupgrad.wgtUrl" style="width: 65%"></el-input> <el-input v-model="formupgrad.wgtUrl" style="width: 65%"></el-input>
</el-form-item> --> </el-form-item> -->
<div class="file-box" style="margin-bottom: 10px; display: flex"> <div class="file-box" style="margin-bottom: 10px; display: flex">
<span style="width: 200px; display: inline-block; text-align: right" <span style="width: 200px; display: inline-block; text-align: right"><i
><i style="color: #f56c6c; margin-right: 2px">*</i>安卓包</span style="color: #f56c6c; margin-right: 2px">*</i>安卓包</span>
> <div style="
<div
style="
width: 200px; width: 200px;
height: 148px; height: 148px;
border: 1px dashed #c0ccda; border: 1px dashed #c0ccda;
border-radius: 6px; border-radius: 6px;
text-align: center; text-align: center;
" ">
> <el-upload class="avatar-uploader" v-model="formupgrad.androidWgtUrl" action="" :auto-upload="false"
<el-upload :onChange="onChooseAndriod" :show-file-list="false" :multiple="false">
class="avatar-uploader" <div v-if="formupgrad.androidWgtUrl" class="flex flex-col flex-xy-center">
v-model="formupgrad.androidWgtUrl" <img src="../../assets/img/android.png" style="width: 50px; height: 50px" />
action=""
:auto-upload="false"
:onChange="onChooseAndriod"
:show-file-list="false"
:multiple="false"
>
<div
v-if="formupgrad.androidWgtUrl"
class="flex flex-col flex-xy-center"
>
<img
src="../../assets/img/android.png"
style="width: 50px; height: 50px"
/>
<span style="margin-top: 10px">{{ <span style="margin-top: 10px">{{
formupgrad.androidWgtUrl | name formupgrad.androidWgtUrl | name
}}</span> }}</span>
</div> </div>
<i <i v-if="!formupgrad.androidWgtUrl && percentage <= 0"
v-if="!formupgrad.androidWgtUrl && percentage <= 0" class="el-icon-plus avatar-uploader-icon iconss"></i>
class="el-icon-plus avatar-uploader-icon iconss" <el-progress type="circle" v-if="
></i> !formupgrad.androidWgtUrl &&
<el-progress percentage > 0 &&
type="circle" percentage <= 100 &&
v-if=" key == 'andriod'
!formupgrad.androidWgtUrl && " :percentage="percentage" color="#efefef"></el-progress>
percentage > 0 &&
percentage <= 100 &&
key == 'andriod'
"
:percentage="percentage"
color="#efefef"
></el-progress>
</el-upload> </el-upload>
</div> </div>
</div> </div>
<el-form-item <el-form-item label="安卓地址:" :label-width="formLabelWidth" required>
label="安卓地址:" <el-input v-model="formupgrad.androidWgtUrl" style="width: 65%"></el-input>
:label-width="formLabelWidth"
required
>
<el-input
v-model="formupgrad.androidWgtUrl"
style="width: 65%"
></el-input>
</el-form-item> </el-form-item>
<!-- <div class="file-box" style="margin-bottom: 10px; display: flex"> <!-- <div class="file-box" style="margin-bottom: 10px; display: flex">
<span style="width: 200px; display: inline-block; text-align: right" <span style="width: 200px; display: inline-block; text-align: right"
@@ -190,50 +137,19 @@
style="width: 65%" style="width: 65%"
></el-input> ></el-input>
</el-form-item> --> </el-form-item> -->
<el-form-item <el-form-item label="安卓版本号:" :label-width="formLabelWidth" required>
label="安卓版本号:" <el-input v-model="formupgrad.version" style="width: 65%"></el-input>
:label-width="formLabelWidth"
required
>
<el-input
v-model="formupgrad.version"
style="width: 65%"
></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item <el-form-item label="ios版本号" :label-width="formLabelWidth" required>
label="ios版本号" <el-input v-model="formupgrad.iosVersion" style="width: 65%"></el-input>
:label-width="formLabelWidth" </el-form-item>
required <el-form-item label="升级方式:" :label-width="formLabelWidth" required>
> <el-select v-model="formupgrad.method" placeholder="请选择升级方式" style="width: 65%">
<el-input <el-option v-for="item in methods" :key="item.value" :label="item.label" :value="item.value">
v-model="formupgrad.iosVersion"
style="width: 65%"
></el-input>
</el-form-item> -->
<el-form-item
label="升级方式:"
:label-width="formLabelWidth"
required
>
<el-select
v-model="formupgrad.method"
placeholder="请选择升级方式"
style="width: 65%"
>
<el-option
v-for="item in methods"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="升级内容:" :label-width="formLabelWidth" required>
label="升级内容:"
:label-width="formLabelWidth"
required
>
<el-input v-model="formupgrad.des" style="width: 65%"></el-input> <el-input v-model="formupgrad.des" style="width: 65%"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -307,7 +223,7 @@ export default {
choicenData2: [], choicenData2: [],
upgradeData: [], upgradeData: [],
upgradeData1: { upgradeData1: {
records:[] records: []
}, },
choicenData: [], choicenData: [],
types: [ types: [
@@ -361,8 +277,8 @@ export default {
}, },
}, },
methods: { methods: {
resetFormupgrad(){ resetFormupgrad() {
for(let i in this.formupgrad){ for (let i in this.formupgrad) {
this.formupgrad[i] = ""; this.formupgrad[i] = "";
} }
}, },
@@ -404,8 +320,8 @@ export default {
console.log(data); console.log(data);
const date = new Date(); const date = new Date();
const houzhui = "." + data.name.substr(data.name.lastIndexOf(".") + 1); const houzhui = "." + data.name.substr(data.name.lastIndexOf(".") + 1);
const isTest=config.baseUrl.includes('dj-api.hnsiyao.cn')?false:true const isTest = config.baseUrl.includes('web.hnsiyao.cn') ? false : true
const appName=isTest?'test-duanju':'sy-duanju' const appName = isTest ? 'test-duanju' : 'sy-duanju'
const name = "app/" + appName + houzhui; const name = "app/" + appName + houzhui;
console.log(name); console.log(name);
const fileRes = await this.ossClient.partUpload(name, data.raw, (p) => { const fileRes = await this.ossClient.partUpload(name, data.raw, (p) => {
@@ -429,7 +345,7 @@ export default {
return; return;
} }
return fileRes.replace( return fileRes.replace(
"https://sy-duanju.oss-cn-nanjing.aliyuncs.com/", "https://sy-duanju.oss-cn-chengdu.aliyuncs.com/",
"https://short-video.hnsiyao.cn/" "https://short-video.hnsiyao.cn/"
); );
}, },
@@ -530,7 +446,7 @@ export default {
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => {}, onClose: () => { },
}); });
}); });
} }
@@ -565,7 +481,7 @@ export default {
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => {}, onClose: () => { },
}); });
}); });
}, },
@@ -595,7 +511,7 @@ export default {
}); });
}); });
}) })
.catch(() => {}); .catch(() => { });
}, },
// 升级配置数据列表 // 升级配置数据列表
@@ -632,16 +548,19 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
::v-deep .avatar-uploader { ::v-deep .avatar-uploader {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
} }
.el-upload { .el-upload {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
.customWidth { .customWidth {
width: 80% !important; width: 80% !important;
} }
@@ -652,9 +571,11 @@ export default {
text-align: center; text-align: center;
border: 1px dotted rgba(67, 79, 103, 0.4); border: 1px dotted rgba(67, 79, 103, 0.4);
} }
.margin-auto { .margin-auto {
margin: auto; margin: auto;
} }
.cards { .cards {
padding: 0 8px; padding: 0 8px;
margin-bottom: 15px; margin-bottom: 15px;
@@ -678,12 +599,15 @@ export default {
height: 113px; height: 113px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.flex { .flex {
display: flex; display: flex;
} }
.flex-col { .flex-col {
flex-direction: column; flex-direction: column;
} }
.flex-xy-center { .flex-xy-center {
justify-content: center; justify-content: center;
align-items: center; align-items: center;

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +1,24 @@
<template> <template>
<el-dialog <el-dialog :title="form.id ? '修改红包' : '新增红包'" width="500px" :visible.sync="dialogVisible" @close="diaClose"
:title="form.id ? '修改红包' : '新增红包'" :close-on-click-modal="true">
width="500px"
:visible.sync="dialogVisible"
@close="diaClose"
:close-on-click-modal="true"
>
<el-form :model="form" label-width="100px"> <el-form :model="form" label-width="100px">
<el-form-item label="描述" required> <el-form-item label="描述" required>
<el-input v-model="form.name"></el-input> <el-input v-model="form.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="从第几次开始变化">
<el-input-number :min="0" stepstep-strictly v-model="form.num"></el-input-number>
</el-form-item>
<el-form-item label="最大金额" required> <el-form-item label="最大金额" required>
<el-input-number <el-input-number :min="0" :max="100" v-model="form.maxAmount"></el-input-number>
:min="0"
:max="100"
v-model="form.maxAmount"
></el-input-number>
<span></span> <span></span>
</el-form-item> </el-form-item>
<el-form-item label="中奖概率" required> <el-form-item label="中奖概率" required>
<el-input-number <el-input-number :min="0" :max="1" :step="0.1" v-model="form.random"></el-input-number>
:min="0"
:max="1"
:step="0.1"
v-model="form.random"
></el-input-number>
<span></span> <span></span>
</el-form-item> </el-form-item>
<el-form-item label="是否启用" required> <el-form-item label="是否启用" required>
<el-switch <el-switch v-model="form.status" :inactive-value="0" :active-value="1"></el-switch>
v-model="form.status"
:inactive-value="0"
:active-value="1"
></el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -48,6 +33,12 @@
import { $redPackApi } from "@/api/red-pack.js"; import { $redPackApi } from "@/api/red-pack.js";
import { isNull } from "@/utils/validate.js"; import { isNull } from "@/utils/validate.js";
export default { export default {
props: {
source: {
type: [String, Number],
default: 1
}
},
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
@@ -57,6 +48,7 @@ export default {
maxAmount: "", maxAmount: "",
random: "", random: "",
status: "", status: "",
num: undefined,
}, },
}; };
}, },
@@ -68,9 +60,14 @@ export default {
console.log(item); console.log(item);
this.dialogVisible = true; this.dialogVisible = true;
this.item = item; this.item = item;
this.form = { if (item !== undefined) {
...item, this.form = {
}; ...item,
num: item.num === "" || item.num === null ? undefined : item.num,
};
}
console.log(this.form);
}, },
diaClose() { diaClose() {
this.dialogVisible = false; this.dialogVisible = false;
@@ -93,13 +90,14 @@ export default {
if (this.form.random > 1 || this.form.random < 0) { if (this.form.random > 1 || this.form.random < 0) {
return this.$message.error("概率为0-1"); return this.$message.error("概率为0-1");
} }
console.log(id);
const res = id const res = id
? await $redPackApi.update(this.form) ? await $redPackApi.update({ ...this.form, num: this.form.num || "", discType: this.source, type: this.source })
: await $redPackApi.add(this.form); : await $redPackApi.add({ ...this.form, discType: this.source, type: this.source });
console.log(res); console.log(res);
const { data, msg } = res; const { data, msg } = res;
if (data && data.code == 0) { if (data && data.code == 0) {
this.$message.success("修改成功"); this.$message.success(id ? "修改成功" : "添加成功");
this.$emit("refresh"); this.$emit("refresh");
this.diaClose(); this.diaClose();
} else { } else {
@@ -113,9 +111,11 @@ export default {
.el-form-item__label { .el-form-item__label {
text-align: left; text-align: left;
} }
::v-deep .el-form-item__label { ::v-deep .el-form-item__label {
text-align: left; text-align: left;
} }
.upload-file-box { .upload-file-box {
border-radius: 6px; border-radius: 6px;
width: 148px; width: 148px;
@@ -125,6 +125,7 @@ export default {
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
border: 1px solid #c0c4cc; border: 1px solid #c0c4cc;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@@ -27,7 +27,7 @@
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
v-model="form.url" v-model="form.url"
:action="$http.adornUrl('alioss/upload')" :action="$http.adornUrlUp('alioss/upload')"
:show-file-list="false" :show-file-list="false"
:on-success="uploadSuccess" :on-success="uploadSuccess"
> >
@@ -50,6 +50,12 @@
import $disc from "@/api/disc-spinning.js"; import $disc from "@/api/disc-spinning.js";
export default { export default {
props: {
source:{
type:[String,Number],
default:1
}
},
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
@@ -65,14 +71,14 @@ export default {
methods: { methods: {
uploadSuccess(file) { uploadSuccess(file) {
this.form.url = file.data; this.form.url = file.data;
console.log(file.data);
console.log(this.form.url);
}, },
open(item) { open(item) {
console.log(item); console.log(item);
this.dialogVisible = true; this.dialogVisible = true;
this.item = item; this.item = item;
this.form = { Object.assign(this.form, item);
...item,
};
}, },
diaClose() { diaClose() {
this.dialogVisible = false; this.dialogVisible = false;
@@ -91,9 +97,10 @@ export default {
return this.$message.error("中奖概率不能为空!"); return this.$message.error("中奖概率不能为空!");
} }
const { name, url, type, odds, id } = this.form; const { name, url, type, odds, id } = this.form;
const { data } = await $disc.update({ name, url, type, odds, id }); const submitForm={ name, url, type, odds, discType:this.source };
const { data } =id? await $disc.update({...submitForm,id }) : await $disc.add({ ...submitForm});
if (data.code == 0) { if (data.code == 0) {
this.$message.success("修改成功"); this.$message.success(id?"修改成功":'添加成功');
this.$emit("refresh"); this.$emit("refresh");
this.diaClose(); this.diaClose();
}else{ }else{

View File

@@ -0,0 +1,299 @@
<template>
<div>
<el-form inline @submit.native.prevent="queryHandle">
<el-form-item label="用户ID">
<el-input v-model="query.userId" placeholder="请输入用户ID" />
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="query.userName" placeholder="请输入用户名" />
</el-form-item>
<el-form-item label="支付宝账号">
<el-input v-model="query.zhifubao" placeholder="请输入支付宝账号" />
</el-form-item>
<el-form-item label="支付宝姓名">
<el-input v-model="query.zhifubaoName" placeholder="请输入支付宝姓名" />
</el-form-item>
<el-form-item label="提现类型">
<el-select v-model="query.userType">
<el-option label="全部" value=""></el-option>
<el-option label="用户提现" value="1"></el-option>
<el-option label="分销商提现" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="query.state">
<el-option label="全部" value=""></el-option>
<el-option label="待转账" value="0"></el-option>
<el-option label="成功" value="1"></el-option>
<el-option label="失败" value="2"></el-option>
<el-option label="待审核" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="日期">
<el-date-picker v-model="timeValue" type="datetimerange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" @change="changeTime" :default-time="['00:00:00', '23:59:59']">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="queryHandle">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="tableData.loading" :data="tableData.list" border stripe>
<el-table-column label="ID" prop="id" width="80"></el-table-column>
<el-table-column label="用户ID" prop="userId" width="100"></el-table-column>
<el-table-column label="用户名" prop="userName" width="200">
<template slot-scope="scope">
<template v-if="scope.row.relationId">
<div class="danger_user">
<div class="user_info">
<i class="icon el-icon-warning"></i>
危险用户{{ scope.row.userName }}
</div>
<el-tag type="danger" disable-transitions>{{ scope.row.relationId }}</el-tag>
</div>
</template>
<template v-else>
{{ scope.row.userName }}
</template>
</template>
</el-table-column>
<el-table-column label="提现账号" prop="zhifubao" width="200">
<template slot-scope="scope">
{{ scope.row.zhifubaoName }} / {{ scope.row.zhifubao }}
</template>
</el-table-column>
<el-table-column label="提现信息" width="200">
<template slot-scope="scope">
<div>提现金额{{ scope.row.money }}</div>
<div>手续费{{ scope.row.rate }}</div>
<div style="margin-top: 6px;">
提现类型
<span v-if="scope.row.userType == 1">用户提现</span>
<span v-if="scope.row.userType == 2">代理提现</span>
</div>
<div>订单编号{{ scope.row.orderNumber }}</div>
</template>
</el-table-column>
<el-table-column label="提现统计" width="200">
<template slot-scope="scope">
<div>成功提现金额{{ scope.row.total }}</div>
<div>成功提现次数{{ scope.row.count }}</div>
<div style="margin-top: 6px;">待审提现金额合计{{ scope.row.verifyTotal }}</div>
<div>待审提现申请笔数{{ scope.row.verifyCount }}</div>
</template>
</el-table-column>
<el-table-column label="申请时间" prop="createAt" width="200"></el-table-column>
<el-table-column label="转账时间" prop="outAt" width="200"></el-table-column>
<el-table-column label="状态" prop="state" width="200">
<template slot-scope="scope">
<el-tag type="warning" v-if="scope.row.state == 0" disable-transitions>
待转账
</el-tag>
<el-tag type="success" v-if="scope.row.state == 1" disable-transitions>
成功
</el-tag>
<div class="tag_danger" v-if="scope.row.state == 2">
失败{{ scope.row.refund }}
</div>
<el-tag type="warning" v-if="scope.row.state == 3" disable-transitions>
待审核
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="deliverHandle(scope.row)" v-if="scope.row.state == 3">
待审核
</el-button>
<el-button type="text" disabled v-else>已审核</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]" :page-size="tableData.limit" :current-page="tableData.page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
</el-pagination>
</div>
<el-dialog title="提现审核" width="600px" :visible.sync="visible" @close="onClose">
<el-form :model="form" :rules="rules" ref="form" label-width="80px" label-position="left">
<el-form-item label="审核" prop="isAgree">
<el-radio-group v-model="form.isAgree">
<el-radio label="1"> 同意 </el-radio>
<el-radio label="0"> 拒绝 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="refund" v-if="form.isAgree == 0">
<el-input v-model="form.refund" placeholder="拒绝原因"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer" style="display: flex; justify-content: flex-end;">
<el-button size="small" @click="visible = false"> </el-button>
<el-button size="small" type="primary" :loading="confirmLoading"
@click="confirmHandle">确定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import dayjs from 'dayjs'
import { cashOutAuditPage, cashOutAuditAudit } from "@/api/withdraw.js";
export default {
data() {
return {
timeValue: [],
query: {
userId: "",
userName: "",
userType: '',
zhifubao: "",
zhifubaoName: "",
state: "",
startTime: "",
endTime: ""
},
resetQuery: {},
tableData: {
page: 1,
limit: 10,
total: 0,
list: [],
loading: false
},
visible: false,
confirmLoading: false,
form: {
id: "",
isAgree: "1",
refund: "",
userId: ''
},
rules: {
isAgree: [],
refund: [
{ required: true, message: "请输入拒绝原因", trigger: "blur" }
]
}
};
},
mounted() {
this.resetQuery = { ...this.query };
this.cashOutAuditPage();
},
methods: {
// 关闭弹窗, 重置表单
onClose() {
this.$refs.form.resetFields();
},
// 打开发放奖品弹窗
deliverHandle(row) {
this.form.id = row.id;
this.form.userId = row.userId
this.visible = true;
},
// 提交发放奖品
confirmHandle() {
this.$refs.form.validate(async valid => {
if (valid) {
this.confirmLoading = true;
try {
const { data } = await cashOutAuditAudit(this.form);
if (data.code == 0) {
this.$message.success("审核成功");
this.visible = false;
this.cashOutAuditPage();
} else {
this.$message.error(data.msg || "审核失败");
}
} catch (error) {
console.log(error);
}
this.confirmLoading = false;
}
});
},
// 开始查询
queryHandle() {
this.tableData.page = 1;
this.cashOutAuditPage();
},
// 重置查询
resetHandle() {
this.query = { ...this.resetQuery };
this.timeValue = [];
this.cashOutAuditPage();
},
// 确认选择日期
changeTime(e) {
console.log(e);
this.timeValue = e
if (this.timeValue.length == 2) {
this.query.startTime = dayjs(this.timeValue[0]).format("YYYY-MM-DD HH:mm:ss");
this.query.endTime = dayjs(this.timeValue[1]).format("YYYY-MM-DD HH:mm:ss");
} else {
this.query.startTime = "";
this.query.endTime = "";
}
},
// 分页数量
handleSizeChange(size) {
this.tableData.limit = size;
this.cashOutAuditPage();
},
// 分页
handleCurrentChange(val) {
this.tableData.page = val;
this.cashOutAuditPage();
},
// 获取列表
async cashOutAuditPage() {
try {
this.tableData.loading = true;
const { data } = await cashOutAuditPage({
...this.query,
page: this.tableData.page,
limit: this.tableData.limit
});
this.tableData.loading = false;
this.tableData.list = data.page.list;
this.tableData.total = data.page.totalCount;
} catch (error) {
this.tableData.loading = false;
console.log(error);
}
}
}
};
</script>
<style scoped lang="scss">
.danger_user {
display: flex;
flex-direction: column;
gap: 4px;
.user_info {
display: flex;
align-items: center;
$color: #F56C6C;
color: $color;
gap: 4px;
.icon {
color: $color;
}
}
}
.tag_danger {
background-color: rgba(245, 108, 108, .1);
color: #f56c6c;
border-radius: 4px;
border: 1px solid rgba(245, 108, 108, .2);
padding: 2px 10px;
}
</style>

View File

@@ -0,0 +1,277 @@
<template>
<div>
<el-form inline @submit.native.prevent="queryHandle">
<!-- <el-form-item label="用户ID">
<el-input v-model="query.userId" placeholder="请输入用户ID" />
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="query.userName" placeholder="请输入用户名" />
</el-form-item>
<el-form-item label="支付宝账号">
<el-input v-model="query.zhifubao" placeholder="请输入支付宝账号" />
</el-form-item> -->
<el-form-item>
<el-input v-model="query.alipayAccountName" placeholder="请输入支付宝账户姓名查询" />
</el-form-item>
<!-- <el-form-item label="提现类型">
<el-select v-model="query.userType">
<el-option label="全部" value=""></el-option>
<el-option label="用户提现" value="1"></el-option>
<el-option label="分销商提现" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="query.state">
<el-option label="全部" value=""></el-option>
<el-option label="待转账" value="0"></el-option>
<el-option label="成功" value="1"></el-option>
<el-option label="失败" value="2"></el-option>
<el-option label="待审核" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="日期">
<el-date-picker v-model="timeValue" type="datetimerange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" @change="changeTime" :default-time="['00:00:00', '23:59:59']">
</el-date-picker>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="queryHandle">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<el-col :span="6" class="cards">
<div class="box">
<div class="box_num">
<div class="box_color">成功提现次数合计</div>
<div class="text_color">
<span>{{ count }}</span>
</div>
</div>
</div>
</el-col>
<el-col :span="6" class="cards">
<div class="box">
<div class="box_num">
<div class="box_color">成功提现金额合计</div>
<div class="text_color">
<span>{{ totalMoney }}</span>
</div>
</div>
</div>
</el-col>
</el-row>
<el-table v-loading="tableData.loading" :data="tableData.list" border stripe>
<el-table-column label="用户ID" prop="userId"></el-table-column>
<el-table-column label="用户名" prop="userName"></el-table-column>
<el-table-column label="手机号" prop="phone"></el-table-column>
<el-table-column label="邀请码" prop="inviterCode"></el-table-column>
<el-table-column label="提现小计" prop="subTotal">
<template slot-scope="scope">
<div>提现金额{{ scope.row.subTotal }}</div>
<div>提现次数{{ scope.row.subCount }}</div>
</template>
</el-table-column>
<el-table-column label="提现账号" prop="zhifubao">
<template slot-scope="scope">
{{ scope.row.zhiFuBaoName }} / {{ scope.row.zhiFuBao }}
</template>
</el-table-column>
</el-table>
<!-- <div class="pagination">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]" :page-size="tableData.limit" :current-page="tableData.page"
layout="total" :total="tableData.total">
</el-pagination>
</div> -->
<el-dialog title="提现审核" width="600px" :visible.sync="visible" @close="onClose">
<el-form :model="form" :rules="rules" ref="form" label-width="80px" label-position="left">
<el-form-item label="审核" prop="isAgree">
<el-radio-group v-model="form.isAgree">
<el-radio label="1"> 同意 </el-radio>
<el-radio label="0"> 拒绝 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="refund" v-if="form.isAgree == 0">
<el-input v-model="form.refund" placeholder="拒绝原因"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer" style="display: flex; justify-content: flex-end;">
<el-button size="small" @click="visible = false"> </el-button>
<el-button size="small" type="primary" :loading="confirmLoading"
@click="confirmHandle">确定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import { summary_query } from "@/api/withdraw.js";
export default {
data() {
return {
timeValue: [],
query: {
userId: "",
userName: "",
userType: '',
zhifubao: "",
zhifubaoName: "",
state: "",
startTime: "",
endTime: "",
alipayAccountName: ""
},
resetQuery: {},
count: 0,
totalMoney: 0,
tableData: {
page: 1,
limit: 10,
total: 0,
list: [],
loading: false
},
visible: false,
confirmLoading: false,
form: {
id: "",
isAgree: "1",
refund: ""
},
rules: {
isAgree: [],
refund: [
{ required: true, message: "请输入拒绝原因", trigger: "blur" }
]
}
};
},
mounted() {
this.resetQuery = { ...this.query };
this.getTableData();
},
methods: {
// 关闭弹窗, 重置表单
onClose() {
this.$refs.form.resetFields();
},
// 打开发放奖品弹窗
deliverHandle(row) {
this.form.id = row.id;
this.visible = true;
},
// 提交发放奖品
confirmHandle() {
this.$refs.form.validate(async valid => {
if (valid) {
this.confirmLoading = true;
try {
const { data } = await cashOutAuditAudit(this.form);
if (data.code == 0) {
this.$message.success("审核成功");
this.visible = false;
this.getTableData();
} else {
this.$message.error(data.msg || "审核失败");
}
} catch (error) {
console.log(error);
}
this.confirmLoading = false;
}
});
},
// 开始查询
queryHandle() {
this.tableData.page = 1;
this.getTableData();
},
// 重置查询
resetHandle() {
this.query = { ...this.resetQuery };
this.timeValue = [];
this.getTableData();
},
// 确认选择日期
changeTime() {
if (this.timeValue.length == 2) {
this.query.startTime = this.timeValue[0];
this.query.endTime = this.timeValue[1];
} else {
this.query.startTime = "";
this.query.endTime = "";
}
},
// 分页数量
handleSizeChange(size) {
this.tableData.limit = size;
this.getTableData();
},
// 分页
handleCurrentChange(val) {
this.tableData.page = val;
this.getTableData();
},
// 获取列表
async getTableData() {
try {
this.tableData.loading = true;
const { data } = await summary_query({
...this.query
});
this.tableData.loading = false;
this.tableData.list = data.data.list;
this.tableData.total = data.data.count;
this.count = data.data.count;
this.totalMoney = data.data.sum;
} catch (error) {
this.tableData.loading = false;
this.tableData.list = [];
this.tableData.total = 0;
this.count = 0;
this.totalMoney = 0;
console.log('error===', error);
}
}
}
};
</script>
<style scoped lang="scss">
.box {
padding: 44px;
border: 1px solid #eee;
margin: 0 15px 25px 0;
}
.box_num {
font-size: 14px;
color: #66b1ff;
}
.box_num .box_color {
color: #333;
font-size: 14px;
margin-bottom: 15px;
}
.box_num div span {
font-size: 20px;
margin-left: 5px;
}
.text_color {
color: #4f9dec;
}
.text_color span {
margin-right: 5px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,164 @@
<template>
<div>
<div style="display: inline-block;">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="用户昵称/手机号">
<el-input v-model="formInline.keywords" placeholder="请输入用户昵称/手机号" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="onSubmit">搜索</el-button>
<el-button icon="Refresh" @click="reset">重置</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="rechargeData.list">
<el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="avatar" label="头像">
<template slot-scope="scope">
<img :src="scope.row.avatar" alt="" style="width: 50px; height: 50px; border-radius: 50%;" />
</template>
</el-table-column>
<el-table-column prop="userName" label="用户昵称"></el-table-column>
<el-table-column prop="phone" label="手机号"></el-table-column>
<el-table-column prop="todayUnlocked" label="今日订单数">
</el-table-column>
<el-table-column prop="todayDrawCount" label="当日抽奖次数">
</el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="text" @click="rewardDetails(scope.row)">查看抽奖详情</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4" @current-change="handleCurrentChange4"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeData.limit" :current-page="rechargeData.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeData.totalCount">
</el-pagination>
</div>
<!-- 详情 -->
<el-dialog title="抽奖详情" :visible.sync="dialogVisible" width="50%">
<div>抽奖次数合计:{{ rechargeDataA.totalCount }} </div>
<el-table :data="rechargeDataA.list">
<el-table-column prop="id" label="ID"></el-table-column>
<el-table-column prop="name" label="抽奖结果"></el-table-column>
<el-table-column prop="number" label="金额"></el-table-column>
<el-table-column prop="createTime" label="抽奖时间"></el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4A" @current-change="handleCurrentChange4A"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataA.limit" :current-page="rechargeDataA.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataA.totalCount">
</el-pagination>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
rechargeDataList: [],
formInline: {
keywords: ''
},
rechargeData: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
},
rechargeDataA: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
itemUserId: ''
},
list: [],
dialogVisible: false,
}
},
mounted() {
this.getRechargeData()
},
methods: {
goUrl(item) {
this.$router.push({ path: '/orderCenter', query: { userName: item.userName } })
},
onSubmit() {
this.rechargeData.page = 1
this.rechargeData.limit = 10
this.getRechargeData()
}, reset() {
this.formInline = {
keywords: ''
}
this.getRechargeData()
},
getRechargeData() {
this.$http.get('/ext/sys/lottery/count/query/page', {
params: {
page: this.rechargeData.page,
limit: this.rechargeData.limit,
keywords: this.formInline.keywords
}
}).then(response => {
if (response.data.code === 0) {
this.rechargeData.list = response.data.data.list
this.rechargeData.totalCount = response.data.data.totalCount
// this.rechargeData = response.data.data
} else {
this.$message.error(response.data.msg)
}
}).catch(error => {
console.error(error)
})
}, rewardDetails(item) {
if (item) {
this.rechargeDataA.itemUserId = item.userId
}
this.$http.get('/ext/sys/lottery/detail/page', {
params: {
page: this.rechargeDataA.page,
limit: this.rechargeDataA.limit,
userId: this.rechargeDataA.itemUserId
}
}).then(response => {
if (response.data.code === 0) {
this.rechargeDataA.list = response.data.data.list
this.rechargeDataA.totalCount = response.data.data.totalCount
this.dialogVisible = true
} else {
this.$message.error(response.data.message)
}
}).catch(error => {
console.error(error)
this.$message.error('获取数据失败')
})
},
handleSizeChange4(val) {
this.rechargeData.limit = val
this.rechargeData.page = 1
this.getRechargeData()
},
handleCurrentChange4(val) {
this.rechargeData.page = val
this.getRechargeData()
},
handleSizeChange4A(val) {
this.rechargeDataA.limit = val
this.rechargeDataA.page = 1
this.rewardDetails()
},
handleCurrentChange4A(val) {
console.log(val, '11111111111')
this.rechargeDataA.page = val
this.rewardDetails()
}
}
}
</script>

View File

@@ -0,0 +1,231 @@
<template>
<div>
<div style="display: inline-block;">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="用户昵称/手机号">
<el-input v-model="formInline.keywords" placeholder="请输入用户昵称/手机号" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="onSubmit">搜索</el-button>
<el-button icon="Refresh" @click="reset">重置</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="rechargeDataAA.list">
<el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column label="头像" width="200">
<template slot-scope="scope">
<img :src="scope.row.avatar" alt="头像" style="width: 50px; height: 50px; border-radius: 50%;" />
</template>
</el-table-column>
<el-table-column prop="userName" label="用户昵称"></el-table-column>
<el-table-column prop="phone" label="手机号"></el-table-column>
<el-table-column prop="signInNum" label="总签到人数"></el-table-column>
<el-table-column prop="awardAmount" label="已发放奖励总金额"></el-table-column>
<el-table-column label="操作" width="300">
<template slot-scope="scope">
<el-button type="text" @click="viewUserDetails(scope.row)">查看用户详情</el-button>
<el-button type="text" @click="rewardDetails(scope.row)">奖励详情</el-button>
<el-button type="text" @click="signInDetails(scope.row)">签到详情</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4" @current-change="handleCurrentChange4"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataAA.limit" :current-page="rechargeDataAA.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataAA.totalCount">
</el-pagination>
</div>
<!-- 奖励详情 -->
<el-dialog title="奖励详情" :visible.sync="dialogVisible" width="50%">
<div>奖励发放金额合计{{ rechargeDataBB.totalCount }} </div>
<el-table :data="rechargeDataBB.list">
<el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="amount" label="发放金额"></el-table-column>
<el-table-column prop="userPhone" label="有效邀请人"></el-table-column>
<el-table-column prop="createTime" label="发放时间"></el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4BB" @current-change="handleCurrentChange4BB"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataCC.limit" :current-page="rechargeDataCC.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataCC.totalCount">
</el-pagination>
</div>
</el-dialog>
<!-- 签到详情 -->
<el-dialog title="签到详情" :visible.sync="dialogVisibles" width="50%">
<div><span>签到人数合计{{ rechargeDataCC.totalCount }}</span> <span>实名人数合计{{
rechargeDataCC.totalCount }}</span> </div>
<el-table :data="rechargeDataCC.list">
<el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="userName" label="签到账号"></el-table-column>
<el-table-column prop="phone" label="签到手机号"></el-table-column>
<el-table-column prop="userName" label="实名信息">
<template slot-scope="scope">
<div>姓名{{ scope.row.realName }}</div>
<div>身份证号{{ scope.row.idCardNo }}</div>
<div>银行卡号{{ scope.row.bankCardNo }}</div>
<div>开户行{{ scope.row.bankBranch }}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="签到时间"></el-table-column>
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4CC" @current-change="handleCurrentChange4CC"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataCC.limit" :current-page="rechargeDataCC.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataCC.totalCount">
</el-pagination>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
rewardDetailsList: [], // 奖励详情列表
rewardtotalPage: 0, // 奖励详情总页数
signInDetailsList: [], // 签到详情列表
signInDetailsTotalPage: 0, // 签到详情总页数
formInline: {
keywords: ''
},
page: 1,
limit: 10,
rechargeDataAA: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
},
rechargeDataBB: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
},
rechargeDataCC: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
},
dialogVisible: false,// 控制奖励详情弹窗的显示与隐藏
dialogVisibles: false // 控制签到详情弹窗的显示与隐藏
}
},
mounted() {
this.getRechargeData()
},
methods: {
viewUserDetails(item) {
this.$router.push({ path: '/userDetail', query: { userId: item.userId, active: 'first' } })
},
rewardDetails(item) {
if (item) {
this.rechargeDataBB.itemUserId = item.userId
}
this.$http.get('/ext/sys/invite/friend/award/detail/page', {
params: {
page: this.rechargeDataBB.page,
limit: this.rechargeDataBB.limit,
userId: this.rechargeDataBB.itemUserId
}
}).then(response => {
if (response.data.code === 0) {
this.rechargeDataBB.list = response.data.data.list
this.rechargeDataBB.totalCount = response.data.data.totalCount
this.dialogVisible = true
} else {
this.$message.error(response.data.message)
}
}).catch(error => {
console.error(error)
this.$message.error('获取数据失败')
})
},
signInDetails(item) {
if (item) {
this.rechargeDataCC.itemUserId = item.userId
}
this.$http.get('/ext/sys/invite/friend/signIn/page', {
params: {
page: this.rechargeDataCC.page,
limit: this.rechargeDataCC.limit,
userId: this.rechargeDataCC.itemUserId
}
}).then(response => {
if (response.data.code === 0) {
this.rechargeDataCC.list = response.data.data.list
this.rechargeDataCC.totalCount = response.data.data.totalCount
this.dialogVisibles = true
} else {
this.$message.error(response.data.message)
}
}).catch(error => {
console.error(error)
this.$message.error('获取数据失败')
})
},
onSubmit() {
this.rechargeDataAA.page = 1
this.rechargeDataAA.limit = 10
this.getRechargeData()
},
reset() {
this.formInline = {
keywords: ''
}
this.getRechargeData()
},
getRechargeData() {
this.$http.get('/ext/sys/invite/friend/award/page', {
params: {
page: this.rechargeDataAA.page,
limit: this.rechargeDataAA.limit,
keywords: this.formInline.keywords
}
}).then(response => {
if (response.data.code === 0) {
this.rechargeDataAA.list = response.data.data.list
this.rechargeDataAA.totalCount = response.data.data.totalCount
} else {
this.$message.error(response.data.message)
}
}).catch(error => {
console.error(error)
this.$message.error('获取数据失败')
})
},
handleSizeChange4(val) {
this.rechargeDataAA.limit = val
this.rechargeDataAA.page = 1
this.getRechargeData()
},
handleCurrentChange4(val) {
this.rechargeDataAA.page = val
this.getRechargeData()
},
handleSizeChange4BB(val) {
this.rechargeDataBB.limit = val
this.rechargeDataBB.page = 1
this.rewardDetails()
},
handleCurrentChange4BB(val) {
this.rechargeDataBB.page = val
this.rewardDetails()
},
handleSizeChange4CC(val) {
this.rechargeDataCC.limit = val
this.rechargeDataCC.page = 1
this.signInDetails()
},
handleCurrentChange4CC(val) {
this.rechargeDataCC.page = val
this.signInDetails()
}
}
}
</script>

View File

@@ -1978,8 +1978,11 @@
}).then(({ }).then(({
data data
}) => { }) => {
console.log('-------')
this.tableDataLoading = false this.tableDataLoading = false
let returnData = data.data; let returnData = data.data;
console.log(returnData)
this.tableDataYe = returnData this.tableDataYe = returnData
}) })

View File

@@ -0,0 +1,173 @@
<template>
<el-dialog
:title="title"
width="800px"
top="20px"
:visible.sync="dialogVisible"
@close="diaClose"
:close-on-click-modal="true"
>
<div>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-form-item label="标题" prop="title">
<el-input v-model="form.title"></el-input>
</el-form-item>
<el-form-item label="类型" prop="title">
<el-radio-group v-model="form.type">
<el-radio
:label="item.value"
v-for="(item, index) in types"
:key="index"
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="状态" required>
<el-switch
v-model="form.state"
:active-value="1"
:inactive-value="0"
></el-switch>
</el-form-item>
<el-form-item label="内容" prop="content">
<quill-editor
ref="myTextEditor"
v-model="form.content"
:options="quillOption"
style="
padding-bottom: 50px;
height: 300px;
width: 100%;
display: inline-table;
"
>
</quill-editor>
</el-form-item>
</el-form>
</div>
<div class="dialog-footer">
<el-button @click="diaClose"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { $announcement as $api } from "@/api/announcement.js";
import { $types } from "../data.js";
import { quillEditor } from "vue-quill-editor";
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
import quillConfig from "../../locality/quill-config.js";
export default {
components: {
quillEditor,
},
data() {
return {
quillOption: quillConfig,
types: $types,
dialogVisible: false,
title: "",
rules: {
title: [{ required: true, message: "请输入公告标题", trigger: "blur" }],
content: [
{ required: true, message: "请输入公告内容", trigger: "blur" },
],
},
form: {
title: "",
content: "",
state: 1,
type: "",
},
};
},
methods: {
open(item) {
console.log(item);
this.dialogVisible = true;
Object.assign(this.form, item);
this.title = item ? "修改公告" : "添加公告";
},
diaClose() {
this.dialogVisible = false;
this.form = {
title: "",
content: "",
state: 1,
type: "",
};
this.$refs.form.resetFields();
},
async confirm() {
if (!this.form.title) {
return this.$message.error("请输入公告标题");
}
if (!this.form.content) {
return this.$message.error("请输入公告内容");
}
if (this.form.type === "") {
return this.$message.error("请选择公告类型");
}
this.submit();
},
async submit() {
let res = { data: { code: 1 } };
const submitForm = {
...this.form,
};
if (this.form.id) {
res = await $api.update(submitForm);
} else {
res = await $api.add(submitForm);
}
console.log(res);
const { data } = res;
if (data.code == 0) {
this.$message.success(this.form.id ? "修改成功" : "添加成功");
this.$emit("refresh");
this.diaClose();
} else {
this.$message.error(data.msg);
}
},
},
};
</script>
<style scoped lang="scss">
.el-form-item__label {
text-align: left;
}
::v-deep .el-form-item__label {
text-align: left;
}
.dialog-footer {
padding-top: 20px;
display: flex;
justify-content: flex-end;
}
.upload-file-box {
border-radius: 6px;
width: 148px;
height: 148px;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
border: 1px solid #c0c4cc;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
</style>

View File

@@ -0,0 +1,4 @@
export const $types=[
{label:'首页',value:0},
{label:'提现',value:1}
]

View File

@@ -1,135 +1,275 @@
<template> <template>
<el-tabs v-model="activeName" @tab-click="handleClick"> <div>
<el-tab-pane label="公告中心" name="first"> <el-tabs v-model="activeName" @tab-click="handleClick">
<div style="float: right;margin-right:2%;"> <el-tab-pane label="弹窗公告" name="dialogMessage">
<el-button style="margin: 10px 0;" :disabled="!isAuth('message:add')" size="mini" type="primary" <div style="float: right; margin-right: 2%">
icon="document" @click="addNotice">添加公告</el-button> <el-button
</div> style="margin: 10px 0"
<el-table v-loading="tableDataLoading" :data="tableData.list"> :disabled="!isAuth('message:add')"
<el-table-column prop="id" label="编号" width="80"> size="mini"
</el-table-column> type="primary"
<el-table-column prop="title" label="标题"> icon="document"
</el-table-column> @click="refPopAddMessageOpen()"
<el-table-column prop="url" label="链接"> >添加公告</el-button
</el-table-column> >
<el-table-column prop="type" label="类型"> </div>
<template slot-scope="scope"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.type === 'url' ">链接</span> <el-table-column prop="id" label="编号" width="80"> </el-table-column>
<span style="color: #4f9dec;cursor: pointer;" v-if="scope.row.type === 'word' ">文本</span> <el-table-column prop="title" label="标题"> </el-table-column>
</template> <el-table-column prop="title" label="类型">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="createAt" label="创建时间"> <div>{{ returnType(scope.row) }}</div>
</el-table-column> </template>
<el-table-column label="操作" width="150"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="content" label="内容" width="480">
<el-button size="mini" type="primary" :disabled="!isAuth('message:update')" <template slot-scope="scope">
@click="updates(scope.$index, scope.row)">修改 <div v-html="scope.row.content"></div>
</el-button> </template>
<el-button size="mini" type="danger" :disabled="!isAuth('message:delete')" </el-table-column>
@click="deletes(scope.row)">删除 <el-table-column prop="content" label="是否启用">
</el-button> <template slot-scope="scope">
</template> <el-switch :value="scope.row.state" :active-value="1" :inactive-value="0" @change="dialogMessageUpdate($event, scope.row)"> </el-switch>
</el-table-column> </template>
</el-table> </el-table-column>
<div style="text-align: center;margin-top: 10px;"> <el-table-column prop="createTime" label="创建时间"> </el-table-column>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-table-column label="操作" width="150">
:page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page" <template slot-scope="scope">
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalElements"> <el-button
</el-pagination> size="mini"
</div> type="primary"
<!-- 添加弹框 --> :disabled="!isAuth('message:update')"
<el-dialog title="添加公告" :visible.sync="dialogFormVisible" center> @click="refPopAddMessageOpen( scope.row)"
<div style="margin-bottom: 10px;"> >修改
<span style="width: 200px;display: inline-block;text-align: right;">标题</span> </el-button>
<el-input style="width:50%;" v-model="title" placeholder="请输入公告标题"></el-input> <el-button
</div> size="mini"
<div style="margin-bottom: 10px;" v-if="type=='url'"> type="danger"
<span style="width: 200px;display: inline-block;text-align: right;">链接</span> :disabled="!isAuth('message:delete')"
<el-input style="width: 50%;" v-model="url" placeholder="请输入公告链接"></el-input> @click="dialogMessagedeletes(scope.row)"
</div> >删除
<div style="margin-bottom: 10px;"> </el-button>
<span style="width: 200px;display: inline-block;text-align: right;">类型</span> </template>
<el-select v-model="type" placeholder="请选择公告类型" style="width:50%;"> </el-table-column>
<el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value"> </el-table>
</el-option> <div style="text-align: center; margin-top: 10px" v-if="false">
</el-select> <el-pagination
</div> @size-change="handleSizeChange"
<div slot="footer" class="dialog-footer"> @current-change="handleCurrentChange"
<el-button @click="dialogFormVisible = false"> </el-button> :page-sizes="[5, 10, 15, 20]"
<el-button type="primary" @click="releasNoticeTo()"> </el-button> :page-size="limit"
</div> :current-page="page"
</el-dialog> layout="total,sizes, prev, pager, next,jumper"
<!-- 修改弹框 --> :total="tableData.totalElements"
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center> >
<el-form :model="form"> </el-pagination>
<el-form-item label="标题:" :label-width="formLabelWidth"> </div>
<el-input v-model="form.title" style="width:65%;"></el-input> <pop-add-message ref="refPopAddMessage" @refresh="getDialogMessage"></pop-add-message>
</el-form-item>
<el-form-item label="链接:" :label-width="formLabelWidth"> </el-tab-pane>
<el-input v-model="form.url" style="width:65%;"></el-input> <el-tab-pane label="公告中心" name="first">
</el-form-item> <div style="float: right; margin-right: 2%">
<el-form-item label="类型:" :label-width="formLabelWidth"> <el-button
<el-select v-model="form.type" placeholder="请选择类型" style="width:65%;"> style="margin: 10px 0"
<el-option v-for="item in types" :key="item.value" :label="item.label" :value="item.value"> :disabled="!isAuth('message:add')"
</el-option> size="mini"
</el-select> type="primary"
</el-form-item> icon="document"
</el-form> @click="addNotice"
<div slot="footer" class="dialog-footer"> >添加公告</el-button
<el-button @click="dialogFormVisible1 = false"> </el-button> >
<el-button type="primary" @click="amendNoticeTo()"> </el-button> </div>
</div> <el-table v-loading="tableDataLoading" :data="tableData.list">
</el-dialog> <el-table-column prop="id" label="编号" width="80"> </el-table-column>
</el-tab-pane> <el-table-column prop="title" label="标题"> </el-table-column>
<el-tab-pane label="用户反馈" name="two"> <el-table-column prop="url" label="链接"> </el-table-column>
<el-table v-loading="tableDataLoading" :data="tableData.list"> <el-table-column prop="type" label="类型">
<el-table-column prop="id" label="编号" width="80"> <template slot-scope="scope">
</el-table-column> <span
<el-table-column prop="title" label="联系方式"> style="color: #4f9dec; cursor: pointer"
</el-table-column> v-if="scope.row.type === 'url'"
<el-table-column prop="content" label="内容"> >链接</span
</el-table-column> >
<el-table-column prop="createAt" label="创建时间" width="160"> <span
</el-table-column> style="color: #4f9dec; cursor: pointer"
</el-table> v-if="scope.row.type === 'word'"
<div style="text-align: center;margin-top: 10px;"> >文本</span
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" >
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page" </template>
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount"> </el-table-column>
</el-pagination> <el-table-column prop="createAt" label="创建时间"> </el-table-column>
</div> <el-table-column label="操作" width="150">
</el-tab-pane> <template slot-scope="scope">
<el-tab-pane label="用户消息" name="fourth"> <el-button
<div style="float: right;margin-right:2%;"> size="mini"
<el-button style='margin: 10px 0;' :disabled="!isAuth('message:push')" size="mini" type="primary" type="primary"
icon="document" @click="magNotice">消息推送</el-button> :disabled="!isAuth('message:update')"
</div> @click="updates(scope.$index, scope.row)"
<el-table v-loading="tableDataLoading" :data="tableData.list"> >修改
<el-table-column prop="id" label="编号" width="80"> </el-button>
</el-table-column> <el-button
<el-table-column prop="userName" label="用户名称"> size="mini"
</el-table-column> type="danger"
<el-table-column prop="title" label="消息标题"> :disabled="!isAuth('message:delete')"
</el-table-column> @click="deletes(scope.row)"
<el-table-column prop="content" label="消息内容"> >删除
</el-table-column> </el-button>
<el-table-column prop="createAt" label="创建时间"> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> </el-table>
<template slot-scope="scope"> <div style="text-align: center; margin-top: 10px">
<el-button size="mini" type="primary" @click="updataDetails(scope.row)">用户详情 <el-pagination
</el-button> @size-change="handleSizeChange"
</template> @current-change="handleCurrentChange"
</el-table-column> :page-sizes="[5, 10, 15, 20]"
</el-table> :page-size="limit"
<div style="text-align: center;margin-top: 10px;"> :current-page="page"
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" layout="total,sizes, prev, pager, next,jumper"
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page" :total="tableData.totalElements"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount"> >
</el-pagination> </el-pagination>
</div> </div>
</el-tab-pane> <!-- 添加弹框 -->
<!-- <el-tab-pane label="消息推送" name="seventh"> <el-dialog title="添加公告" :visible.sync="dialogFormVisible" center>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right"
>标题</span
>
<el-input
style="width: 50%"
v-model="title"
placeholder="请输入公告标题"
></el-input>
</div>
<div style="margin-bottom: 10px" v-if="type == 'url'">
<span style="width: 200px; display: inline-block; text-align: right"
>链接</span
>
<el-input
style="width: 50%"
v-model="url"
placeholder="请输入公告链接"
></el-input>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right"
>类型</span
>
<el-select
v-model="type"
placeholder="请选择公告类型"
style="width: 50%"
>
<el-option
v-for="item in types"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="releasNoticeTo()"
> </el-button
>
</div>
</el-dialog>
<!-- 修改弹框 -->
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
<el-form :model="form">
<el-form-item label="标题:" :label-width="formLabelWidth">
<el-input v-model="form.title" style="width: 65%"></el-input>
</el-form-item>
<el-form-item label="链接:" :label-width="formLabelWidth">
<el-input v-model="form.url" style="width: 65%"></el-input>
</el-form-item>
<el-form-item label="类型:" :label-width="formLabelWidth">
<el-select
v-model="form.type"
placeholder="请选择类型"
style="width: 65%"
>
<el-option
v-for="item in types"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false"> </el-button>
<el-button type="primary" @click="amendNoticeTo()"> </el-button>
</div>
</el-dialog>
</el-tab-pane>
<el-tab-pane label="用户反馈" name="two">
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column prop="id" label="编号" width="80"> </el-table-column>
<el-table-column prop="title" label="联系方式"> </el-table-column>
<el-table-column prop="content" label="内容"> </el-table-column>
<el-table-column prop="createAt" label="创建时间" width="160">
</el-table-column>
</el-table>
<div style="text-align: center; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]"
:page-size="limit"
:current-page="page"
layout="total,sizes, prev, pager, next,jumper"
:total="tableData.totalCount"
>
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="用户消息" name="fourth">
<div style="float: right; margin-right: 2%">
<el-button
style="margin: 10px 0"
:disabled="!isAuth('message:push')"
size="mini"
type="primary"
icon="document"
@click="magNotice"
>消息推送</el-button
>
</div>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column prop="id" label="编号" width="80"> </el-table-column>
<el-table-column prop="userName" label="用户名称"> </el-table-column>
<el-table-column prop="title" label="消息标题"> </el-table-column>
<el-table-column prop="content" label="消息内容"> </el-table-column>
<el-table-column prop="createAt" label="创建时间"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="updataDetails(scope.row)"
>用户详情
</el-button>
</template>
</el-table-column>
</el-table>
<div style="text-align: center; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]"
:page-size="limit"
:current-page="page"
layout="total,sizes, prev, pager, next,jumper"
:total="tableData.totalCount"
>
</el-pagination>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="消息推送" name="seventh">
<el-table v-loading="tableDataLoading" :data="tableData.list"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="id" label="编号" width="80"> <el-table-column fixed prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
@@ -155,41 +295,81 @@
</el-pagination> </el-pagination>
</div> </div>
</el-tab-pane> --> </el-tab-pane> -->
<!-- 消息推送 --> <!-- 消息推送 -->
<el-dialog title="消息推送" :visible.sync="dialogFormVisible2" center> <el-dialog title="消息推送" :visible.sync="dialogFormVisible2" center>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px">
<span style="width: 200px;display: inline-block;text-align: right;">类型</span> <span style="width: 200px; display: inline-block; text-align: right"
<el-select v-model="flag" placeholder="请选择类型" style="width:50%"> >类型</span
<el-option v-for="item in flags" :key="item.value" :label="item.label" :value="item.value"> >
</el-option> <el-select v-model="flag" placeholder="请选择类型" style="width: 50%">
</el-select>&nbsp;&nbsp;&nbsp;&nbsp; <el-option
</div> v-for="item in flags"
<div style="margin-bottom: 10px;" v-if="flag == 1"> :key="item.value"
<span style="width: 200px;display: inline-block;text-align: right;">用户手机号</span> :label="item.label"
<el-input style="width: 50%;" v-model="phone" placeholder="请输入用户手机号"></el-input> :value="item.value"
</div> >
<div style="margin-bottom: 10px;"> </el-option> </el-select
<span style="width: 200px;display: inline-block;text-align: right;">消息标题</span> >&nbsp;&nbsp;&nbsp;&nbsp;
<el-input style="width: 50%;" v-model="title" placeholder="请输入消息标题"></el-input> </div>
</div> <div style="margin-bottom: 10px" v-if="flag == 1">
<div style="margin-bottom: 10px;"> <span style="width: 200px; display: inline-block; text-align: right"
<span >用户手机号</span
style="width: 200px;display: inline-block;text-align: right;position: relative;top: -65px;">消息内容</span> >
<el-input style="width: 50%;" type="textarea" rows="4" v-model="content" placeholder="请输入消息内容"> <el-input
</el-input> style="width: 50%"
</div> v-model="phone"
<div slot="footer" class="dialog-footer"> placeholder="请输入用户手机号"
<el-button @click="dialogFormVisible2 = false"> </el-button> ></el-input>
<el-button type="primary" @click="magNoticeTo()"> </el-button> </div>
</div> <div style="margin-bottom: 10px">
</el-dialog> <span style="width: 200px; display: inline-block; text-align: right"
</el-tabs> >消息标题</span
>
<el-input
style="width: 50%"
v-model="title"
placeholder="请输入消息标题"
></el-input>
</div>
<div style="margin-bottom: 10px">
<span
style="
width: 200px;
display: inline-block;
text-align: right;
position: relative;
top: -65px;
"
>消息内容</span
>
<el-input
style="width: 50%"
type="textarea"
rows="4"
v-model="content"
placeholder="请输入消息内容"
>
</el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible2 = false"> </el-button>
<el-button type="primary" @click="magNoticeTo()"> </el-button>
</div>
</el-dialog>
</el-tabs>
</div>
</template> </template>
<script> <script>
import {$announcement} from '@/api/announcement';
import popAddMessage from './components/pop-add-message.vue';
import {$types} from './data.js';
export default { export default {
components:{popAddMessage},
data() { data() {
return { return {
noticeTypes: $types,
limit: 10, limit: 10,
page: 1, page: 1,
state: 1, state: 1,
@@ -235,7 +415,7 @@
} }
], ],
formLabelWidth: '200px', formLabelWidth: '200px',
activeName: 'first', activeName: 'dialogMessage',
tableDataLoading: false, tableDataLoading: false,
dialogFormVisible1: false, dialogFormVisible1: false,
dialogFormVisible2: false, dialogFormVisible2: false,
@@ -244,6 +424,40 @@
} }
}, },
methods: { methods: {
returnType(row) {
const item=this.noticeTypes.find(item => item.value == row.type)
return item.label
},
dialogMessageUpdate(e,item){
$announcement.update({...item,state:e}).then(({
data
}) => {
this.getDialogMessage()
})
},
// 删除首页弹窗公告
dialogMessagedeletes(row) {
let delid = row.id
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$announcement.del({id:delid}).then(({
data
}) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500
})
this.getDialogMessage()
})
}).catch(() => {})
},
refPopAddMessageOpen(item){
this.$refs.refPopAddMessage.open(item)
},
// 详情跳转 // 详情跳转
updataDetails(row) { updataDetails(row) {
this.$router.push({ this.$router.push({
@@ -261,7 +475,24 @@
this.page = val; this.page = val;
this.dataSelect() this.dataSelect()
}, },
getDialogMessage() {
this.tableDataLoading = true
$announcement.get({
page: this.page,
limit: this.limit
}).then(({data}) => {
console.log(data)
this.tableDataLoading = false
this.tableData = {list:data.data}
})
},
handleClick(tab, event) { handleClick(tab, event) {
if (tab._props.label == '首页弹窗公告') {
this.page = 1
this.limit = 10
this.state = 1
this.getDialogMessage()
}
if (tab._props.label == '公告中心') { if (tab._props.label == '公告中心') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
@@ -404,6 +635,10 @@
}, },
// 获取数据列表 // 获取数据列表
dataSelect() { dataSelect() {
if(this.activeName == 'dialogMessage'){
this.getDialogMessage()
return
}
this.tableDataLoading = true this.tableDataLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`message/page/${this.state}/${this.page}/${this.limit}`), url: this.$http.adornUrl(`message/page/${this.state}/${this.page}/${this.limit}`),
@@ -583,5 +818,4 @@
</script> </script>
<style> <style>
</style>
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,370 +1,388 @@
<template> <template>
<el-tabs v-model = "activeName" @tab-click = "handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label = "订单列表" name = "first"> <el-tab-pane label="订单列表" name="first">
<div style = "margin-right:2%;"> <div style="margin-right:2%;">
<span>状态</span> <span>状态</span>
<el-select v-model="status" style="width:150px;margin-left: 10px;" @change="animeDat(status)"> <el-select v-model="status" style="width:150px;margin-left: 10px;" @change="animeDat(status)">
<el-option v-for="item in statesnum" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in statesnum" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp; </el-select>&nbsp;&nbsp;&nbsp;&nbsp;
<div style="position: relative;display: inline-block;"> <div style="position: relative;display: inline-block;">
<span>订单编号</span> <span>订单编号</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入订单编号" <el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入订单编号"
v-model="ordersNo"></el-input>&nbsp;&nbsp; v-model="ordersNo"></el-input>&nbsp;&nbsp;
</div> </div>
<span>订单类型</span> <span>订单类型</span>
<el-select v-model="ordersType" style="width:150px;margin-left: 10px;" @change="animeDat()"> <el-select v-model="ordersType" style="width:150px;margin-left: 10px;" @change="animeDat()">
<el-option v-for="item in ordersTypenum" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in ordersTypenum" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp; </el-select>&nbsp;&nbsp;&nbsp;&nbsp;
<div style="position: relative;display: inline-block;"> <div style="position: relative;display: inline-block;">
<span>购买用户昵称</span> <span>购买用户昵称</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入购买用户昵称" <el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入购买用户昵称"
v-model="userName"></el-input>&nbsp;&nbsp; v-model="userName"></el-input>&nbsp;&nbsp;
</div> </div>
<div style="position: relative;display: inline-block;"> <div style="position: relative;display: inline-block;">
<span>渠道码</span> <span>渠道码</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道码" <el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道码"
v-model="qdCode"></el-input>&nbsp;&nbsp; v-model="qdCode"></el-input>&nbsp;&nbsp;
</div> </div>
<div style="position: relative;display: inline-block;"> <div style="position: relative;display: inline-block;">
<span>渠道商名称</span> <span>渠道商名称</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道商名称" <el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道商名称"
v-model="sysUserName"></el-input>&nbsp;&nbsp; v-model="sysUserName"></el-input>&nbsp;&nbsp;
</div> </div>
<div style="margin:5px;display: inline-block;"> <div style="margin:5px;display: inline-block;">
<span>开始时间</span> <span>开始时间</span>
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right" <el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间"> type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
</el-date-picker> </el-date-picker>
</div> </div>
<div style="margin:5px;display: inline-block;"> <div style="margin:5px;display: inline-block;">
<span>截止时间</span> <span>截止时间</span>
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date" <el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间"> format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
</el-date-picker> </el-date-picker>
</div> </div>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询 <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button> </el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置 <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button> </el-button>
</div> </div>
<el-table v-loading = "tableDataLoading" :data = "tableData.list" > <el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop = "ordersId" label = "编号" width = "80"></el-table-column> <el-table-column fixed prop="ordersId" label="编号" width="80"></el-table-column>
<el-table-column prop = "ordersNo" label = "订单编号" width = "180"></el-table-column> <el-table-column prop="ordersNo" label="订单编号" width="180"></el-table-column>
<el-table-column prop = "userName" label = "购买用户昵称" width = "120" align="center"> <el-table-column prop="userName" label="购买用户昵称" width="120" align="center">
<template slot-scope = "scope"> <template slot-scope="scope">
<span style = "color: #4f9dec;cursor: pointer;" @click = "updates(scope.row)"> <span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.userName}} {{ scope.row.userName }}
</span> </span>
</template>
</el-table-column>
<el-table-column prop = "title" label = "购买短剧/会员等级" width = "180" align="center">
<template slot-scope = "scope">
<span v-if = "scope.row.ordersType == 1">{{scope.row.title}}</span>
<span v-if = "scope.row.ordersType == 2 && scope.row.vipNameType==0">月卡</span>
<span v-if = "scope.row.ordersType == 2 && scope.row.vipNameType==1">季卡</span>
<span v-if = "scope.row.ordersType == 2 && scope.row.vipNameType==2">年卡</span>
</template>
</el-table-column>
<el-table-column prop = "qdCode" label = "渠道码"></el-table-column>
<el-table-column prop = "sysUserName" label = "渠道商名称" width = "180">
<template slot-scope = "scope">
<span style = "color: #4f9dec;">{{ scope.row.sysUserName}}</span>
</template>
</el-table-column>
<el-table-column prop = "payWay" label = "订单类型" width = "120">
<template slot-scope = "scope">
<span v-if = "scope.row.ordersType == 1">短剧</span>
<span v-if = "scope.row.ordersType == 2">会员</span>
</template>
</el-table-column>
<el-table-column prop = "payWay" label = "支付方式" width = "120">
<template slot-scope = "scope">
<span v-if = "scope.row.payWay == null">暂无</span>
<span v-if = "scope.row.payWay == 1">微信APP</span>
<span v-if = "scope.row.payWay == 2">微信公众号</span>
<span v-if = "scope.row.payWay == 3">微信小程序</span>
<span v-if = "scope.row.payWay == 4">支付宝</span>
<span v-if = "scope.row.payWay == 5">会员免费</span>
<span v-if = "scope.row.payWay == 6">金币</span>
<span v-if = "scope.row.payWay == 7">抖音</span>
<span v-if = "scope.row.payWay == 8">快手</span>
</template>
</el-table-column>
<el-table-column prop="payDiamond" label="钻石价格" width="100">
</el-table-column>
<el-table-column prop="diamond" label="是否是钻石支付" width="100">
<template slot-scope="scope">
<span v-if="scope.row.diamond == 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop = "payMoney" label = "支付金额" width = "120"></el-table-column>
<el-table-column prop = "qdMoney" label = "渠道佣金">
<template slot-scope = "scope">
<span >{{ scope.row.qdMoney?scope.row.qdMoney:0}}</span>
</template>
</el-table-column>
<el-table-column prop = "status" label = "状态" width="80" fixed="right">
<template slot-scope = "scope">
<span v-if = "scope.row.status == null">待支付</span>
<span v-if = "scope.row.status == 0">待支付</span>
<span v-if = "scope.row.status == 1">已支付</span>
<span v-if = "scope.row.status == 2">已退款</span>
</template>
</el-table-column>
<!-- <el-table-column prop = "refundContent" label = "退款原因" ></el-table-column> -->
<el-table-column prop = "createTime" label = "创建时间" width = "200" ></el-table-column>
<el-table-column label = "操作" width = "80" align="center" fixed="right">
<template slot-scope = "scope">
<el-button style="margin:5px;" size="mini" type="warning" icon="document" :disabled="!isAuth('orderCenter:tuikuan')" @click="tuikuanBtn(scope.row)" v-if="scope.row.status==1&&scope.row.payWay != 5">退款
</el-button>
<el-button size = "mini" type = "danger" :disabled = "!isAuth('orderCenter:delete')" style="margin:5px;"
@click = "deletes(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="title" label="购买短剧/会员等级" width="180" align="center">
<template slot-scope="scope">
<span v-if="scope.row.ordersType == 1">{{ scope.row.title }}</span>
<span v-if="scope.row.ordersType == 2 && scope.row.vipNameType == 0">月卡</span>
<span v-if="scope.row.ordersType == 2 && scope.row.vipNameType == 1">季卡</span>
<span v-if="scope.row.ordersType == 2 && scope.row.vipNameType == 2">年卡</span>
</template>
</el-table-column>
<el-table-column prop="qdCode" label="渠道码"></el-table-column>
<el-table-column prop="sysUserName" label="渠道商名称" width="180">
<template slot-scope="scope">
<span style="color: #4f9dec;">{{ scope.row.sysUserName }}</span>
</template>
</el-table-column>
<el-table-column prop="payWay" label="订单类型" width="120">
<template slot-scope="scope">
<span v-if="scope.row.ordersType == 1">短剧</span>
<span v-if="scope.row.ordersType == 2">会员</span>
</template>
</el-table-column>
<el-table-column prop="payWay" label="支付方式" width="120">
<template slot-scope="scope">
<span v-if="scope.row.payWay == null">暂无</span>
<span v-if="scope.row.payWay == 1">微信APP</span>
<span v-if="scope.row.payWay == 2">微信公众号</span>
<span v-if="scope.row.payWay == 3">微信小程序</span>
<span v-if="scope.row.payWay == 4">支付宝</span>
<span v-if="scope.row.payWay == 5">会员免费</span>
<span v-if="scope.row.payWay == 6">金币</span>
<span v-if="scope.row.payWay == 7">抖音</span>
<span v-if="scope.row.payWay == 8">快手</span>
</template>
</el-table-column>
<el-table-column prop="payDiamond" label="钻石价格" width="100">
</el-table-column>
<el-table-column prop="diamond" label="是否是钻石支付" width="100">
<template slot-scope="scope">
<span v-if="scope.row.diamond == 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="payMoney" label="支付金额" width="120"></el-table-column>
<el-table-column prop="qdMoney" label="渠道佣金">
<template slot-scope="scope">
<span>{{ scope.row.qdMoney ? scope.row.qdMoney : 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="80" fixed="right">
<template slot-scope="scope">
<span v-if="scope.row.status == null">待支付</span>
<span v-if="scope.row.status == 0">待支付</span>
<span v-if="scope.row.status == 1">已支付</span>
<span v-if="scope.row.status == 2">已退款</span>
</template>
</el-table-column>
<!-- <el-table-column prop = "refundContent" label = "退款原因" ></el-table-column> -->
<el-table-column prop="createTime" label="创建时间" width="200"></el-table-column>
<el-table-column label="操作" width="80" align="center" fixed="right">
<template slot-scope="scope">
<el-button style="margin:5px;" size="mini" type="warning" icon="document"
:disabled="!isAuth('orderCenter:tuikuan')" @click="tuikuanBtn(scope.row)"
v-if="scope.row.status == 1 && scope.row.payWay != 5">退款
</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('orderCenter:delete')"
style="margin:5px;" @click="deletes(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div style="color: #B94A48;font-size: 20px;margin-top: 10px;display: inline-block;"> <div style="color: #B94A48;font-size: 20px;margin-top: 10px;display: inline-block;">
本页累计收入统计{{totalMoney.toFixed(2)}} </div> 本页累计收入统计{{ totalMoney.toFixed(2) }} </div>
<div style = "text-align: center;margin-top: 10px;float:right"> <div style="text-align: center;margin-top: 10px;float:right">
<el-pagination @size-change = "handleSizeChange" @current-change = "handleCurrentChange" :page-sizes = "[10, 20, 30, 40, 100, 200, 500]" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-size = "limit" :current-page = "page" layout = "total,sizes, prev, pager, next,jumper" :page-sizes="[10, 20, 30, 40, 100, 200, 500]" :page-size="limit" :current-page="page"
:total = "tableData.totalCount"> layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination> </el-pagination>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
<script> <script>
export default {
data () { export default {
return { data() {
page: 1, return {
limit: 10, page: 1,
classify: 1, limit: 10,
ordersNo: '', classify: 1,
imageUrl: '', ordersNo: '',
url: '', imageUrl: '',
status: '', url: '',
activeName: 'first', status: '',
tableDataLoading: true, activeName: 'first',
tableData: [], tableDataLoading: true,
checkBoxData: [],//多选框选择的值 tableData: [],
statesnum:[ checkBoxData: [],//多选框选择的值
{ statesnum: [
label: '全部', {
value: '' label: '全部',
}, value: ''
{ },
label: '待支付', {
value: 0 label: '待支付',
}, value: 0
{ },
label: '已支付', {
value: 1 label: '已支付',
}, value: 1
{ },
label: '已退款', {
value: 2 label: '已退款',
}, value: 2
], },
totalMoney: 0, ],
ordersTypenum: [{ totalMoney: 0,
label: '全部', ordersTypenum: [{
value: '' label: '全部',
}, value: ''
{ },
label: '短剧', {
value: 1 label: '短剧',
}, value: 1
{ },
label: '会员', {
value: 2 label: '会员',
}, value: 2
], },
ordersType: '', ],
userName: '', ordersType: '',
startTime: '', userName: '',
endTime: '', startTime: '',
qdCode:'', endTime: '',
sysUserName:'', qdCode: '',
sysUserName: '',
}
}
},
methods: {
// 多选
changeFun(val) {
this.checkBoxData = val
}, },
methods: { //处理默认选中当前日期
// 多选 // getNowTime () {
changeFun (val) { // var now = new Date()
this.checkBoxData = val // var year = now.getFullYear() //得到年份
}, // var month = now.getMonth() //得到月份
//处理默认选中当前日期 // var date = now.getDate() //得到日期
// getNowTime () { // var hh = now.getHours() < 10 ? '0' + now.getHours() : now.getHours()
// var now = new Date() // var mm = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes()
// var year = now.getFullYear() //得到年份 // var ss = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds()
// var month = now.getMonth() //得到月份 // month = month + 1
// var date = now.getDate() //得到日期 // month = month.toString().padStart(2, '0')
// var hh = now.getHours() < 10 ? '0' + now.getHours() : now.getHours() // date = date.toString().padStart(2, '0')
// var mm = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes() // var defaultDate = `${year}-${month}-${date} ${hh}:${mm}:${ss}`
// var ss = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds() // return defaultDate
// month = month + 1 // this.$set(this.info, 'stockDate', defaultDate)
// month = month.toString().padStart(2, '0') // },
// date = date.toString().padStart(2, '0') // tabs切换
// var defaultDate = `${year}-${month}-${date} ${hh}:${mm}:${ss}` handleClick(tab, event) {
// return defaultDate if (tab._props.label == '订单列表') {
// this.$set(this.info, 'stockDate', defaultDate)
// },
// tabs切换
handleClick (tab, event) {
if (tab._props.label == '订单列表') {
this.page = 1
this.limit = 10
this.classify = 1
this.dataSelect()
}
},
handleSizeChange (val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange (val) {
this.page = val
this.dataSelect()
},
// 查询短剧列表
select() {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.classify = 1
this.dataSelect() this.dataSelect()
}, }
// 重置短剧列表 },
cleans() { handleSizeChange(val) {
this.ordersNo = '' this.limit = val
this.status = '' this.dataSelect()
this.page = 1 },
this.ordersType = '' handleCurrentChange(val) {
this.userName = '' this.page = val
this.startTime = '' this.dataSelect()
this.endTime = '' },
this.qdCode = '' // 查询短剧列表
this.sysUserName = '' select() {
this.page = 1
this.dataSelect() this.limit = 10
}, this.dataSelect()
// select选择事件 },
animeDat(state) { // 重置短剧列表
this.page = 1 cleans() {
this.status = state this.ordersNo = ''
console.log(state) this.status = ''
this.dataSelect() this.page = 1
}, this.ordersType = ''
// 删除banner图 this.userName = ''
deletes (row) { this.startTime = ''
let delid = row.ordersId this.endTime = ''
this.$confirm(`确定删除此条信息?`, '提示', { this.qdCode = ''
confirmButtonText: '确定', this.sysUserName = ''
cancelButtonText: '取消',
type: 'warning' this.dataSelect()
}).then(() => { },
this.$http({ // select选择事件
url: this.$http.adornUrl(`order/deleteOrders?ids=${delid}`), animeDat(state) {
method: 'get', this.page = 1
data: this.$http.adornData({}) this.status = state
}).then(({data}) => { console.log(state)
this.dataSelect()
},
// 删除banner图
deletes(row) {
let delid = row.ordersId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`order/deleteOrders?ids=${delid}`),
method: 'get',
data: this.$http.adornData({})
}).then(({ data }) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}).catch(() => {
})
},
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.totalMoney = 0
this.$http({
url: this.$http.adornUrl('order/selectOrders'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'ordersNo': this.ordersNo,
'status': this.status,
'ordersType': this.ordersType,
'userName': this.userName,
'startTime': this.startTime,
'endTime': this.endTime,
'qdCode': this.qdCode,
'sysUserName': this.sysUserName,
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.tableDataLoading = false
for (var i in data.data.list) {
if (data.data.list[i].payMoney) {
this.totalMoney = this.totalMoney + Number(data.data.list[i].payMoney)
}
}
let returnData = data.data
this.tableData = returnData
}
})
},
// 详情跳转
updates(row) {
this.$router.push({ path: '/userDetail', query: { userId: row.userId } })
},
// 退款
tuikuanBtn(row) {
let delid = row.ordersId
this.$confirm(`确定退款吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('order/refundOrders?ordersId=' + delid),
method: 'post',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({ this.$message({
message: '删除成功', message: '操作成功',
type: 'success', type: 'success',
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.dataSelect() this.dataSelect()
} }
}) })
}) } else {
}).catch(() => { this.$message({
}) message: data.msg,
}, type: 'warning',
// 获取数据列表 duration: 1500,
dataSelect () { onClose: () => {
this.tableDataLoading = true
this.totalMoney = 0
this.$http({
url: this.$http.adornUrl('order/selectOrders'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'ordersNo':this.ordersNo,
'status':this.status,
'ordersType': this.ordersType,
'userName': this.userName,
'startTime': this.startTime,
'endTime': this.endTime,
'qdCode': this.qdCode,
'sysUserName': this.sysUserName,
})
}).then(({data}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
for (var i in data.data.list) {
if (data.data.list[i].payMoney) {
this.totalMoney = this.totalMoney + Number(data.data.list[i].payMoney)
} }
} })
let returnData = data.data
this.tableData = returnData
} }
}) })
}, })
// 详情跳转
updates (row) {
this.$router.push({path: '/userDetail', query: {userId: row.userId}})
},
// 退款
tuikuanBtn(row){
let delid = row.ordersId
this.$confirm(`确定退款吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('order/refundOrders?ordersId='+delid),
method: 'post',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
})
},
}, },
mounted () { },
this.dataSelect() mounted() {
if (this.$route.query.userName) {
this.status = 1
this.userName = this.$route.query.userName
} }
} this.dataSelect()
},
watch: {
// 监听路由变化,重新获取数据
'$route'(to, from) {
if (to.query.userName) {
this.status = 1
this.userName = to.query.userName
this.dataSelect()
}
},
},
}
</script> </script>
<style> <style>
.customWidth { .customWidth {
width: 80% !important; width: 80% !important;
} }
</style> </style>

View File

@@ -1,12 +1,6 @@
<template> <template>
<el-dialog <el-dialog :title="title" width="800px" top="20px" :visible.sync="dialogVisible" @close="diaClose"
:title="title" :close-on-click-modal="true">
width="800px"
top="20px"
:visible.sync="dialogVisible"
@close="diaClose"
:close-on-click-modal="true"
>
<div style="max-height: 70vh; overflow-y: scroll"> <div style="max-height: 70vh; overflow-y: scroll">
<el-form ref="table" :rules="rules" :model="form" label-width="100px"> <el-form ref="table" :rules="rules" :model="form" label-width="100px">
<el-form-item label="奖励名称" required> <el-form-item label="奖励名称" required>
@@ -16,16 +10,28 @@
<el-radio-group v-model="form.type"> <el-radio-group v-model="form.type">
<el-radio :label="1">金币</el-radio> <el-radio :label="1">金币</el-radio>
<el-radio :label="2">现金</el-radio> <el-radio :label="2">现金</el-radio>
<el-radio :label="3">虚拟物品</el-radio>
<el-radio :label="9">大转盘抽奖次数</el-radio> <el-radio :label="9">大转盘抽奖次数</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="奖励图标">
<el-upload class="avatar-uploader" v-model="form.img" :action="$http.adornUrl('alioss/upload')"
:show-file-list="false" :on-success="uploadSuccess">
<div class="upload-file-box">
<img v-if="form.img" :src="form.img" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon iconss"></i>
</div>
</el-upload>
</el-form-item>
<el-form-item label="数量" required> <el-form-item label="数量" required>
<el-input-number <el-input-number :min="0" :step="1" :step-strictly="form.type == 9 ? true : false"
:min="0" v-model="form.number"></el-input-number>
:step="1" </el-form-item>
:step-strictly="form.type == 9 ? true : false" <el-form-item label="剩余数量" required>
v-model="form.number" <el-input-number :min="0" :step="1" v-model="form.surplusNumber"></el-input-number>
></el-input-number> </el-form-item>
<el-form-item label="总数量" required>
<el-input-number :min="0" :step="1" v-model="form.totalNumber"></el-input-number>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@@ -54,13 +60,16 @@ export default {
name: "", name: "",
number: "", number: "",
type: "", type: "",
img: '',
surplusNumber: '',
totalNumber: '',
}, },
}; };
}, },
methods: { methods: {
uploadSuccess(file) { uploadSuccess(file) {
this.form.rewardImg = file.data; this.form.img = file.data;
console.log(this.form.rewardImg);
}, },
open(item, renwu) { open(item, renwu) {
console.log(item); console.log(item);
@@ -76,8 +85,9 @@ export default {
name: "", name: "",
number: "", number: "",
type: "", type: "",
img: "",
}; };
this.renwu={} this.renwu = {}
}, },
async confirm() { async confirm() {
if (!this.form.name) { if (!this.form.name) {
@@ -120,12 +130,15 @@ export default {
.el-form-item__label { .el-form-item__label {
text-align: left; text-align: left;
} }
::v-deep .el-form-item__label { ::v-deep .el-form-item__label {
text-align: left; text-align: left;
} }
.dialog-footer { .dialog-footer {
padding-top: 20px; padding-top: 20px;
} }
.upload-file-box { .upload-file-box {
border-radius: 6px; border-radius: 6px;
width: 148px; width: 148px;
@@ -135,6 +148,7 @@ export default {
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
border: 1px solid #c0c4cc; border: 1px solid #c0c4cc;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@@ -83,6 +83,12 @@
<el-form-item label="按钮内容"> <el-form-item label="按钮内容">
<el-input v-model="form.buttonTitle"></el-input> <el-input v-model="form.buttonTitle"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="按钮下方内容">
<el-input v-model="form.buttonUnderContent"></el-input>
</el-form-item>
<el-form-item label="按钮下方内容 跳转路径">
<el-input v-model="form.buttonUnderUrl "></el-input>
</el-form-item>
</el-form> </el-form>
</div> </div>
@@ -122,6 +128,8 @@ export default {
title: "", title: "",
shows: 1, shows: 1,
sort: "", sort: "",
buttonUnderContent:'',
buttonUnderUrl:''
}, },
}; };
}, },

View File

@@ -18,11 +18,30 @@
<span>{{ returnTypeName(scope.row.type) }}</span> <span>{{ returnTypeName(scope.row.type) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="奖励图片">
<template slot-scope="scope">
<img
style="width: 50px; height: 50px"
v-if="scope.row.img"
:src="scope.row.img"
/>
</template>
</el-table-column>
<el-table-column label="数量"> <el-table-column label="数量">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.number }}</span> <span>{{ scope.row.number }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="剩余数量">
<template slot-scope="scope">
<span>{{ scope.row.surplusNumber }}</span>
</template>
</el-table-column>
<el-table-column label="总数量">
<template slot-scope="scope">
<span>{{ scope.row.totalNumber }}</span>
</template>
</el-table-column>
<el-table-column label="编辑"> <el-table-column label="编辑">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" @click="openAdd(scope.row)" <el-button type="text" size="mini" @click="openAdd(scope.row)"
@@ -106,20 +125,21 @@ export default {
const $types = { const $types = {
1: "金币", 1: "金币",
2: "现金红包", 2: "现金红包",
3: "虚拟物品",
9: "大转盘抽奖次数", 9: "大转盘抽奖次数",
}; };
return $types[type] ? $types[type] : ""; return $types[type] ? $types[type] : "";
}, },
//数据初始化 //数据初始化
async init() { async init() {
const {id}=this.renwu; const { id } = this.renwu;
const { data } = await $api.getList({ const { data } = await $api.getList({
taskId:id, taskId: id,
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
}); });
this.tableData = data.data.records; this.tableData = data.data.records;
this.total = data.data.total; this.total = data.data.totalCount;
}, },
del(item) { del(item) {
this.$confirm("是否删除该任务?", "提示", { this.$confirm("是否删除该任务?", "提示", {

View File

@@ -0,0 +1,221 @@
<template>
<div>
<el-form inline>
<el-form-item label="用户ID">
<el-input v-model="query.userId" placeholder="请输入用户ID" />
</el-form-item>
<el-form-item label="记录ID">
<el-input v-model="query.discSpinningRecordId" placeholder="请输入抽奖记录id" />
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="query.userName" placeholder="请输入用户名" />
</el-form-item>
<el-form-item label="手机号">
<el-input v-model="query.phone" placeholder="手机号" />
</el-form-item>
<el-form-item label="奖品名称">
<el-input v-model="query.prizeName" placeholder="请输入奖品名称" />
</el-form-item>
<el-form-item label="状态">
<el-select v-model="query.status">
<el-option label="全部" value=""></el-option>
<el-option label="待发放" value="0"></el-option>
<el-option label="已发放" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="日期">
<el-date-picker v-model="timeValue" type="datetimerange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" @change="changeTime" :default-time="['00:00:00', '23:59:59']">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="queryHandle">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="tableData.loading" :data="tableData.list" border stripe>
<el-table-column label="用户ID" prop="userId"></el-table-column>
<el-table-column label="记录ID" prop="discSpinningRecordId"></el-table-column>
<el-table-column label="用户名" prop="userName"></el-table-column>
<el-table-column label="手机号" prop="phone"></el-table-column>
<el-table-column label="奖品名称" prop="prizeName"></el-table-column>
<el-table-column label="状态" prop="status">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status == 1" disable-transitions>
已发放
</el-tag>
<el-tag type="warning" v-if="scope.row.status == 0" disable-transitions>
待发放
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="deliverHandle(scope.row)" v-if="scope.row.status == 0">
发放
</el-button>
<span v-else>已发放</span>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]" :page-size="tableData.limit" :current-page="tableData.page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
</el-pagination>
</div>
<el-dialog title="发放奖品" width="600px" :visible.sync="visible" @close="onClose">
<el-form :model="form" :rules="rules" ref="form">
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="请输入地址"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer" style="display: flex; justify-content: flex-end;">
<el-button size="small" @click="visible = false"> </el-button>
<el-button size="small" type="primary" :loading="confirmLoading"
@click="confirmHandle">确定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import {
userPrizeExchangePage,
userPrizeExchangeDeliver
} from "@/api/renwu-record.js";
export default {
data() {
return {
timeValue: [],
query: {
userId: "",
discSpinningRecordId: "",
userName: "",
prizeName: "",
status: "",
phone: "",
beginDate: "",
endDate: ""
},
resetQuery: {},
tableData: {
page: 1,
limit: 10,
total: 0,
list: [],
loading: false
},
visible: false,
confirmLoading: false,
form: {
id: "",
address: "",
remark: "",
phone: ""
},
rules: {
address: [
{ required: true, message: "请输入地址", trigger: "blur" }
],
phone: [
{ required: true, message: "请输入正确的手机号", trigger: "blur", pattern: /^(?:(?:\+|00)86)?1\d{10}$/ }
]
}
};
},
mounted() {
this.resetQuery = { ...this.query };
this.userPrizeExchangePage();
},
methods: {
// 关闭弹窗, 重置表单
onClose() {
this.$refs.form.resetFields();
},
// 打开发放奖品弹窗
deliverHandle(row) {
this.form.id = row.id;
this.visible = true;
},
// 提交发放奖品
confirmHandle() {
this.$refs.form.validate(async valid => {
if (valid) {
this.confirmLoading = true;
try {
const { data } = await userPrizeExchangeDeliver(this.form);
if (data.code == 0) {
this.$message.success("发放成功");
this.visible = false;
this.userPrizeExchangePage();
} else {
this.$message.error(data.msg || "发放失败");
}
} catch (error) {
console.log(error);
}
this.confirmLoading = false;
}
});
},
// 开始查询
queryHandle() {
this.page = 1;
this.userPrizeExchangePage();
},
// 重置查询
resetHandle() {
this.query = { ...this.resetQuery };
this.timeValue = [];
this.userPrizeExchangePage();
},
// 确认选择日期
changeTime() {
if (this.timeValue.length == 2) {
this.query.beginDate = this.timeValue[0];
this.query.endDate = this.timeValue[1];
} else {
this.query.beginDate = "";
this.query.endDate = "";
}
},
// 分页数量
handleSizeChange(size) {
this.tableData.limit = size;
this.userPrizeExchangePage();
},
// 分页
handleCurrentChange(val) {
this.tableData.page = val;
this.userPrizeExchangePage();
},
// 获取列表
async userPrizeExchangePage() {
try {
this.tableData.loading = true;
const { data } = await userPrizeExchangePage({
...this.query,
page: this.tableData.page,
limit: this.tableData.limit
});
this.tableData.loading = false;
this.tableData.list = data.page.list;
this.tableData.total = data.page.totalCount;
} catch (error) {
this.tableData.loading = false;
console.log(error);
}
}
}
};
</script>

View File

@@ -1,97 +1,86 @@
<template> <template>
<div class=""> <div class="">
<el-button type="primary" @click="openAddZhuanpan">添加任务</el-button> <el-tabs v-model="tabActive">
<div class="zhanwei"></div> <el-tab-pane label="任务" name="renwu"></el-tab-pane>
<el-table :border="true" :data="tableData"> <el-tab-pane label="兑换" name="exchang"></el-tab-pane>
<el-table-column </el-tabs>
prop="sort" <div v-if="tabActive == 'renwu'">
label="排序" <el-button type="primary" @click="openAddZhuanpan">添加任务</el-button>
sortable <div class="zhanwei"></div>
width="50"> <el-table :border="true" :data="tableData">
</el-table-column> <el-table-column prop="sort" label="排序" sortable width="50">
<el-table-column label="标题" prop="title"></el-table-column> </el-table-column>
<el-table-column label="标题" prop="title"></el-table-column>
<el-table-column label="任务类型"> <el-table-column label="任务类型">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ returnTypeName(scope.row.type) }}</span> <span>{{ returnTypeName(scope.row.type) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="详情描述"> <el-table-column label="详情描述">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.detail }}</span> <span>{{ scope.row.detail }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="奖励设置"> <el-table-column label="奖励设置">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex flex-center"> <div class="flex flex-center">
<el-button type="text" size="mini" @click="opengiftList(scope.row)" <el-button type="text" size="mini" @click="opengiftList(scope.row)">编辑</el-button>
>编辑</el-button </div>
>
</div> <!-- <span>{{ scope.row.rewardDetail }}</span> -->
</template>
<!-- <span>{{ scope.row.rewardDetail }}</span> --> </el-table-column>
</template> <el-table-column label="奖励描述">
</el-table-column> <template slot-scope="scope">
<el-table-column label="奖励描述"> <span>{{ scope.row.rewardDetail }}</span>
<template slot-scope="scope"> </template>
<span>{{ scope.row.rewardDetail }}</span> </el-table-column>
</template> <el-table-column label="奖励图片">
</el-table-column> <template slot-scope="scope">
<el-table-column label="奖励图片"> <img style="width: 50px; height: 50px" v-if="scope.row.rewardImg" :src="scope.row.rewardImg" />
<template slot-scope="scope"> </template>
<img </el-table-column>
style="width: 50px; height: 50px" <el-table-column label="达标次数">
v-if="scope.row.rewardImg" <template slot-scope="scope">
:src="scope.row.rewardImg" <span v-if="scope.row.type == 2">{{ scope.row.number }}</span>
/> </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="跳转类型">
<el-table-column label="达标次数"> <template slot-scope="scope">
<template slot-scope="scope"> <span>{{ returnJumpTypeName(scope.row.jumpType) }}</span>
<span v-if="scope.row.type == 2">{{ scope.row.number }}</span> </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="跳转路径">
<template slot-scope="scope">
<el-table-column label="跳转类型"> <span>{{ scope.row.buttonUrl }}</span>
<template slot-scope="scope"> </template>
<span>{{ returnJumpTypeName(scope.row.jumpType) }}</span> </el-table-column>
</template> <el-table-column label="是否展示">
</el-table-column> <template slot-scope="scope">
<el-table-column label="跳转路径"> <el-switch @change="showsChange($event, scope.row)" v-model="scope.row.shows" :inactive-value="0"
<template slot-scope="scope"> :active-value="1"></el-switch>
<span>{{ scope.row.buttonUrl }}</span> </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="编辑">
<el-table-column label="是否展示"> <template slot-scope="scope">
<template slot-scope="scope"> <el-button type="text" size="mini" @click="openAddZhuanpan(scope.row)">编辑</el-button>
<el-switch @change="showsChange($event,scope.row)" v-model="scope.row.shows" :inactive-value="0" :active-value="1"></el-switch> <el-button type="text" size="mini" @click="del(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编辑"> </el-table>
<template slot-scope="scope"> <div class="pagination">
<el-button type="text" size="mini" @click="openAddZhuanpan(scope.row)" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
>编辑</el-button :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
> layout="total,sizes, prev, pager, next,jumper" :total="total">
<el-button type="text" size="mini" @click="del(scope.row)" </el-pagination>
>删除</el-button </div>
> <add-renwu ref="refRenwu" @refresh="init"></add-renwu>
</template> <gift-list ref="giftList" @refresh="init"></gift-list>
</el-table-column> </div>
</el-table> <div v-if="tabActive == 'exchang'">
<div class="pagination"> <record ref="record" />
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]"
:page-size="limit"
:current-page="page"
layout="total,sizes, prev, pager, next,jumper"
:total="total"
>
</el-pagination>
</div> </div>
<add-renwu ref="refRenwu" @refresh="init"></add-renwu>
<gift-list ref="giftList" @refresh="init"></gift-list>
</div> </div>
</template> </template>
@@ -99,12 +88,14 @@
import $api from "@/api/renwu.js"; import $api from "@/api/renwu.js";
import addRenwu from "./components/pop-add-renwu.vue"; import addRenwu from "./components/pop-add-renwu.vue";
import giftList from "./components/pop-gift-list.vue"; import giftList from "./components/pop-gift-list.vue";
import {$renwuType,$jumpType} from './data.js' import record from "./components/record.vue";
import { $renwuType, $jumpType } from './data.js'
export default { export default {
components: { addRenwu,giftList }, components: { addRenwu, giftList, record },
data() { data() {
return { return {
tabActive: 'renwu',
total: 0, total: 0,
tableData: [], tableData: [],
page: 1, page: 1,
@@ -114,21 +105,21 @@ export default {
}; };
}, },
methods: { methods: {
opengiftList(item){ opengiftList(item) {
this.$refs.giftList.open(item) this.$refs.giftList.open(item)
}, },
async showsChange(e,item){ async showsChange(e, item) {
console.log(e) console.log(e)
const res=await $api.update({...item,shows:e}) const res = await $api.update({ ...item, shows: e })
if(res.data.code==0){ if (res.data.code == 0) {
this.$message.success('修改成功') this.$message.success('修改成功')
this.init() this.init()
}else{ } else {
this.$message.error(res.data.msg || '修改失败') this.$message.error(res.data.msg || '修改失败')
} }
}, },
handleSizeChange() { handleSizeChange(limit) {
this.page = 1; this.limit = limit;
this.init(); this.init();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
@@ -136,8 +127,8 @@ export default {
this.init(); this.init();
}, },
returnJumpTypeName(type) { returnJumpTypeName(type) {
console.log(type) // console.log(type)
console.log($jumpType[type]) // console.log($jumpType[type])
return $jumpType[type] ? $jumpType[type] : ""; return $jumpType[type] ? $jumpType[type] : "";
}, },
returnTypeName(type) { returnTypeName(type) {
@@ -150,7 +141,7 @@ export default {
limit: this.limit, limit: this.limit,
}); });
this.tableData = data.data.records; this.tableData = data.data.records;
this.total = data.data.total; this.total = data.data.totalCount;
}, },
del(item) { del(item) {
this.$confirm("是否删除该任务?", "提示", { this.$confirm("是否删除该任务?", "提示", {
@@ -169,7 +160,7 @@ export default {
} }
}); });
}) })
.catch(() => {}); .catch(() => { });
}, },
openAddZhuanpan(item) { openAddZhuanpan(item) {
this.$refs.refRenwu.open(item); this.$refs.refRenwu.open(item);
@@ -180,19 +171,14 @@ export default {
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.zhanwei { .zhanwei {
height: 20px; height: 20px;
} }
.pagination { .pagination {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
} }
// .flex{
// display: flex;
// }
// .flex-center{
// justify-content: center;
// }
</style> </style>

View File

@@ -57,7 +57,7 @@
<div style="text-align: center;margin-top: 10px;"> <div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
:page-sizes="[10, 20, 30, 40]" :page-size="size" :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="size" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="homeData.total"> layout="total,sizes, prev, pager, next,jumper" :total="homeData.totalCount">
</el-pagination> </el-pagination>
</div> </div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,205 @@
<template>
<div>
<el-form :model="queryForm" inline @submit.native.prevent="queryByTradeNo">
<el-form-item label="订单号" prop="outTradeNo">
<el-input v-model="queryForm.outTradeNo" placeholder="请输入订单号查询" style="width: 500px;"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="queryByTradeNo" :loading="loading">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-form-item>
</el-form>
<div class="order_info">
<div class="item">
<div class="title">
用户信息
</div>
<template v-if="orderInfo.userInfo">
<div class="row">
<span> 昵称</span>{{ orderInfo.userInfo.userName }}
</div>
<div class="row">
<span> 手机号</span>{{ orderInfo.userInfo.phone }}
</div>
<div class="row">
<span> 支付宝账号</span>{{ orderInfo.userInfo.zhiFuBao }}
</div>
<div class="row">
<span>支付宝姓名</span> {{ orderInfo.userInfo.zhiFuBaoName }}
</div>
<div class="row">
<span>状态</span>
<span v-if="orderInfo.userInfo.status == 1" style="color: #67C23A;">正常</span>
<span v-else style="color: #F56C6C;">异常</span>
</div>
<div class="row" v-if="!orderInfo.userInfo.status">
<span>异常原因</span> <span style="color: #F56C6C;">{{ orderInfo.userInfo.platform }}</span>
</div>
</template>
<div class="empty" v-else>空空如也~</div>
</div>
<div class="item">
<div class="title">
<span>实名认证信息</span>
</div>
<template v-if="orderInfo.authInfo">
<div class="row">
<span>真实姓名</span> {{ orderInfo.authInfo.certName }}
</div>
<div class="row">
<span>身份证号</span> {{ orderInfo.authInfo.certNo }}
</div>
<div class="row">
<span>银行名称</span> {{ orderInfo.authInfo.bankName }}
</div>
<div class="row">
<span>银行卡号</span> {{ orderInfo.authInfo.accountNo }}
</div>
<div class="row">
<span>预留手机号</span> {{ orderInfo.authInfo.mobile }}
</div>
</template>
<div class="empty" v-else>空空如也~</div>
</div>
<div class="item">
<div class="title">
提现信息
</div>
<template v-if="orderInfo.withdrawTotal">
<div class="row">
<span>成功合计</span> {{ orderInfo.withdrawTotal.success.total }}
</div>
<div class="row">
<span>成功笔数</span> {{ orderInfo.withdrawTotal.success.count }}
</div>
<div class="row">
<span>失败合计</span> {{ orderInfo.withdrawTotal.fail.total }}
</div>
<div class="row">
<span>失败笔数</span> {{ orderInfo.withdrawTotal.fail.count }}
</div>
<div class="row">
<span>审核中合计</span> {{ orderInfo.withdrawTotal.auditing.count }}
</div>
<div class="row">
<span>审核中笔数</span> {{ orderInfo.withdrawTotal.auditing.count }}
</div>
<div class="row">
<span>其他合计</span> {{ orderInfo.withdrawTotal.other.count }}
</div>
<div class="row">
<span>其他笔数</span> {{ orderInfo.withdrawTotal.other.count }}
</div>
</template>
<div class="empty" v-else>空空如也~</div>
</div>
<div class="item">
<div class="title">
支付信息
</div>
<template v-if="orderInfo.payTotal">
<div class="row">
<span>成功合计</span> {{ orderInfo.payTotal.success.total }}
</div>
<div class="row">
<span>成功笔数</span> {{ orderInfo.payTotal.success.count }}
</div>
<div class="row">
<span>失败合计</span> {{ orderInfo.payTotal.fail.total }}
</div>
<div class="row">
<span>失败笔数</span> {{ orderInfo.payTotal.fail.count }}
</div>
<div class="row">
<span>未付款合计</span> {{ orderInfo.payTotal.unpaid.count }}
</div>
<div class="row">
<span>未付款笔数</span> {{ orderInfo.payTotal.unpaid.count }}
</div>
</template>
<div class="empty" v-else>空空如也~</div>
</div>
</div>
</div>
</template>
<script>
import { queryByTradeNo } from '@/api/viplist.js'
export default {
data() {
return {
loading: false,
queryForm: {
// outTradeNo: '7ed7edc900884b6dabf871a330c3e13b-1075149450307057439'
outTradeNo: ''
},
orderInfo: ''
}
},
methods: {
// 重置
resetHandle() {
this.queryForm.outTradeNo = ''
this.orderInfo = ''
},
// 根据订单号查询
async queryByTradeNo() {
try {
if (!this.queryForm.outTradeNo) return
this.loading = true
const res = await queryByTradeNo({ outTradeNo: this.queryForm.outTradeNo })
console.log(res);
if (res.data.code == 0) {
this.orderInfo = res.data.data
} else {
this.orderInfo = ''
this.$message.error(res.data.msg)
}
} catch (error) {
this.orderInfo = ''
console.log(error);
}
this.loading = false
}
}
}
</script>
<style scoped lang="scss">
.order_info {
display: grid;
grid-template-columns: repeat(2, auto);
grid-template-rows: repeat(2, auto);
grid-column-gap: 15px;
grid-row-gap: 15px;
.item {
border: 1px solid #ececec;
padding: 15px;
background-color: #fff;
.title {
font-size: 16px;
font-weight: bold;
padding-bottom: 10px;
}
.row {
margin-top: 10px;
span {
color: #999;
}
}
.empty {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #999;
padding-bottom: 45px;
}
}
}
</style>

View File

@@ -0,0 +1,194 @@
<template>
<div>
<div>
<el-form :inline="true" :model="query" class="demo-form-inline">
<el-form-item label="手机号">
<el-input v-model="query.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="用户名">
<el-input v-model="query.name" placeholder="请输入用户名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getTableData">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-table :data="tableData.list" v-loading="tableData.loading" border stripe>
<el-table-column label="用户ID" prop="userId"></el-table-column>
<el-table-column label="用户名" prop="name"></el-table-column>
<el-table-column label="手机号" prop="mobile"></el-table-column>
<el-table-column label="实名信息" prop="certName" width="300">
<template slot-scope="scope">
<div>姓名{{ scope.row.certName }}</div>
<div>身份证号{{ scope.row.certNo }}</div>
<div>银行卡号{{ scope.row.accountNo }}</div>
<div>开户行{{ scope.row.bankName }}</div>
</template>
</el-table-column>
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="edit(scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="del(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]" :page-size="tableData.limit" :current-page="tableData.page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
</el-pagination>
</div>
<el-dialog title="编辑" width="600px" :visible.sync="visible" @close="onClose">
<el-form :model="form" :rules="rules" ref="form" label-width="100px" label-position="left">
<el-form-item label="姓名" prop="certName">
<el-input v-model="form.certName" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="身份证号" prop="certNo">
<el-input v-model="form.certNo" placeholder="请输入身份证号"></el-input>
</el-form-item>
<el-form-item label="银行卡号" prop="accountNo">
<el-input v-model="form.accountNo" placeholder="请输入银行卡号"></el-input>
</el-form-item>
<el-form-item label="预留手机号" prop="mobile">
<el-input v-model="form.mobile" placeholder="请输入预留手机号"></el-input>
</el-form-item>
<el-form-item label="开户行" prop="bankName">
<el-input v-model="form.bankName" placeholder="请输入开户行"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer" style="display: flex; justify-content: flex-end;">
<el-button size="small" @click="visible = false"> </el-button>
<el-button size="small" type="primary" :loading="confirmLoading"
@click="confirmHandle">确定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script>
import { userInfo_list, userInfo, userInfoDel } from "@/api/withdraw.js";
export default {
data() {
return {
query: {
phone: "",
name: "",
},
resetQuery: {},
tableData: {
page: 1,
limit: 10,
total: 0,
list: [],
loading: false
},
visible: false,
confirmLoading: false,
form: {
userId: '',
certName: "",
certNo: "",
accountNo: "",
mobile: "",
bankName: "",
},
rules: {
certName: [{ required: true, message: "请输入姓名", trigger: "blur" }],
certNo: [{ required: true, message: "请输入身份证号", trigger: "blur" }],
accountNo: [{ required: true, message: "请输入银行卡号", trigger: "blur" }],
mobile: [{ required: true, message: "请输入预留手机号", trigger: "blur" }],
bankName: [{ required: true, message: "请输入开户行", trigger: "blur" }],
}
}
},
mounted() {
this.resetQuery = { ...this.query };
this.getTableData()
},
methods: {
// 确定编辑
confirmHandle() {
this.$refs.form.validate(async valid => {
if (valid) {
try {
this.confirmLoading = true
await userInfo(this.form)
this.visible = false
this.$message.success('编辑成功')
this.getTableData()
} catch (error) {
console.log(error);
}
this.confirmLoading = false
}
})
},
// 关闭弹窗, 重置表单
onClose() {
this.$refs.form.resetFields();
},
// 编辑
edit(row) {
this.form = { ...row }
this.visible = true
},
// 删除
del(row) {
console.log(row);
this.$confirm('是否删除该用户信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
await userInfoDel({ userId: row.userId })
this.$message.success('删除成功')
this.getTableData()
} catch (error) {
console.log(error);
}
}).catch(() => { })
},
// 重置
resetHandle() {
this.query = { ...this.resetQuery }
this.tableData.page = 1
this.getTableData()
},
// 分页数量
handleSizeChange(size) {
this.tableData.page = 1;
this.tableData.limit = size;
this.getTableData();
},
// 分页
handleCurrentChange(val) {
this.tableData.page = val;
this.getTableData();
},
// 获取数据
async getTableData() {
try {
this.tableData.loading = true
const { data } = await userInfo_list({
page: this.tableData.page,
limit: this.tableData.limit,
phone: this.query.phone,
name: this.query.name,
})
this.tableData.list = data.data.list
this.tableData.total = data.data.totalCount
} catch (error) {
console.log(error);
}
this.tableData.loading = false
}
}
}
</script>

View File

@@ -1,69 +1,55 @@
<template> <template>
<el-tabs v-model = "activeName" @tab-click = "handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<!-- <el-tab-pane label = "会员列表" name = "first"> --> <el-tab-pane label="会员列表" name="first">
<div style = "margin-right:2%;text-align: right;"> <div style="margin-right:2%;text-align: right;">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" :disabled="!isAuth('viplist:add')" @click="add">添加 <el-button style="margin-left:15px;" size="mini" type="primary" icon="document"
</el-button> :disabled="!isAuth('viplist:add')" @click="add">添加
</el-button>
</div> </div>
<el-table v-loading = "tableDataLoading" :data = "tableData.list" > <el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop = "id" label = "编号" width = "50"></el-table-column> <el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
<el-table-column prop = "vipNameType" label = "会员类型" width = "150"> <el-table-column prop="vipNameType" label="会员类型" width="150">
<template slot-scope = "scope"> <template slot-scope="scope">
<span v-if = "scope.row.vipNameType == 0">月会员</span> <span v-if="scope.row.vipNameType == 0">月会员</span>
<span v-if = "scope.row.vipNameType == 1">季会员</span> <span v-if="scope.row.vipNameType == 1">季会员</span>
<span v-if = "scope.row.vipNameType == 2">年会员</span> <span v-if="scope.row.vipNameType == 2">年会员</span>
</template>
</el-table-column>
<el-table-column prop = "money" label = "会员价格" >
</el-table-column>
<el-table-column prop="payDiamond" label="钻石价格">
</el-table-column>
<el-table-column label = "操作" width = "180" align="center" fixed="right">
<template slot-scope = "scope">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" :disabled="!isAuth('viplist:update')" @click="updata(scope.row)">修改
</el-button>
<el-button size = "mini" type = "danger" :disabled="!isAuth('viplist:delete')" @click = "deletes(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="money" label="会员价格">
</el-table-column>
<el-table-column prop="payDiamond" label="钻石价格">
</el-table-column>
<el-table-column label="操作" width="180" align="center" fixed="right">
<template slot-scope="scope">
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document"
:disabled="!isAuth('viplist:update')" @click="updata(scope.row)">修改
</el-button>
<el-button size="mini" type="danger" :disabled="!isAuth('viplist:delete')"
@click="deletes(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div style = "text-align: center;margin-top: 10px;float:right"> <div style="text-align: center;margin-top: 10px;float:right">
<el-pagination @size-change = "handleSizeChange" @current-change = "handleCurrentChange" :page-sizes = "[5, 10, 15, 20]" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-size = "limit" :current-page = "page" layout = "total,sizes, prev, pager, next,jumper" :page-sizes="[5, 10, 15, 20]" :page-size="limit" :current-page="page"
:total = "tableData.totalCount"> layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination> </el-pagination>
</div> </div>
<!-- </el-tab-pane> --> </el-tab-pane>
<el-tab-pane label="实名用户" name="realName">
<RealNameList ref="RealNameList" />
</el-tab-pane>
<el-tab-pane label="订单汇总" name="orderInfo">
<OrderInfo ref="OrderInfo" />
</el-tab-pane>
<el-dialog title="添加" :visible.sync="dialogFormVisible" center> <el-dialog title="添加" :visible.sync="dialogFormVisible" center>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">会员类型</span> <span style="width: 200px;display: inline-block;text-align: right;">会员类型</span>
<el-radio-group v-model="vipNameType"> <el-radio-group v-model="vipNameType">
<el-radio :label="0">月会员</el-radio> <el-radio :label="0">月会员</el-radio>
<el-radio :label="1">季会员</el-radio> <el-radio :label="1">季会员</el-radio>
<el-radio :label="2">年会员</el-radio> <el-radio :label="2">年会员</el-radio>
</el-radio-group> </el-radio-group>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">会员价格</span>
<el-input style="width:50%;" v-model="money" type="number" min="0" placeholder="请输入会员价格" ></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格</span>
<el-input style="width:50%;" v-model="payDiamond" type="number" min="0" placeholder="请输入钻石价格" ></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="vipAdd()"> </el-button>
</div>
</el-dialog>
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">会员类型</span>
<el-radio-group v-model="vipNameType">
<el-radio :label="0">月会员</el-radio>
<el-radio :label="1">季会员</el-radio>
<el-radio :label="2">年会员</el-radio>
</el-radio-group>
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">会员价格</span> <span style="width: 200px;display: inline-block;text-align: right;">会员价格</span>
@@ -71,7 +57,32 @@
</div> </div>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格</span> <span style="width: 200px;display: inline-block;text-align: right;">钻石价格</span>
<el-input style="width:50%;" v-model="payDiamond" type="number" min="0" placeholder="请输入钻石价格" ></el-input> <el-input style="width:50%;" v-model="payDiamond" type="number" min="0"
placeholder="请输入钻石价格"></el-input>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="vipAdd()"> </el-button>
</div>
</el-dialog>
<el-dialog title="修改" :visible.sync="dialogFormVisible1" center>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">会员类型</span>
<el-radio-group v-model="vipNameType">
<el-radio :label="0">月会员</el-radio>
<el-radio :label="1">季会员</el-radio>
<el-radio :label="2">年会员</el-radio>
</el-radio-group>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">会员价格</span>
<el-input style="width:50%;" v-model="money" type="number" min="0" placeholder="请输入会员价格"></el-input>
</div>
<div style="margin-bottom: 10px;">
<span style="width: 200px;display: inline-block;text-align: right;">钻石价格</span>
<el-input style="width:50%;" v-model="payDiamond" type="number" min="0"
placeholder="请输入钻石价格"></el-input>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false"> </el-button> <el-button @click="dialogFormVisible1 = false"> </el-button>
@@ -82,229 +93,236 @@
</template> </template>
<script> <script>
export default { import RealNameList from './components/realNameList.vue'
data () { import OrderInfo from './components/orderInfo.vue'
return { export default {
activeName:'first', components: {
page: 1, RealNameList,
limit: 10, OrderInfo
classify: 1, },
id:'', data() {
vipNameType: -1, return {
money: '', activeName: 'first',
payDiamond:'', // activeName: 'orderInfo',
tableDataLoading:false, page: 1,
dialogFormVisible:false, limit: 10,
dialogFormVisible1:false, classify: 1,
tableData:{}, id: '',
} vipNameType: -1,
}, money: '',
methods: { payDiamond: '',
// 多选 tableDataLoading: false,
changeFun (val) { dialogFormVisible: false,
this.checkBoxData = val dialogFormVisible1: false,
}, tableData: {},
// tabs切换
handleClick (tab, event) {
if (tab._props.label == '轮播图') {
this.page = 1
this.limit = 5
this.classify = 1
this.dataSelect()
}
},
handleSizeChange (val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange (val) {
this.page = val
this.dataSelect()
},
// 查询列表
select() {
this.page = 1
this.limit = 10
this.dataSelect()
},
// 添加
add(){
this.vipNameType = -1
this.money = ''
this.payDiamond = ''
this.id = ''
this.dialogFormVisible = true
},
updata(row){
this.vipNameType = row.vipNameType
this.money = row.money
this.payDiamond = row.payDiamond
this.id = row.id
this.dialogFormVisible1 = true
},
vipAdd(){
if (this.vipNameType == -1) {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择会员类型',
type: 'warning'
});
return
}
if (this.money === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入会员价格',
type: 'warning'
});
return
}
if (this.payDiamond === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入钻石价格',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('vipDetails/insertVipDetails'),
method: 'post',
data: this.$http.adornData({
'vipNameType':this.vipNameType,
'money':this.money,
'payDiamond':this.payDiamond,
})
}).then(({data}) => {
if(data.code == 0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dialogFormVisible = false
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
vipUpdata(){
if (this.money === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入会员价格',
type: 'warning'
});
return
}
if (this.payDiamond === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入钻石价格',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('vipDetails/updateVipDetails'),
method: 'post',
data: this.$http.adornData({
'vipNameType':this.vipNameType,
'money':this.money,
'payDiamond':this.payDiamond,
'id':this.id
})
}).then(({data}) => {
if(data.code == 0){
this.dialogFormVisible1 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
// 删除banner图
deletes (row) {
let delid = row.id
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`vipDetails/deleteVipDetails?id=${delid}`),
method: 'post',
params: this.$http.adornParams({})
}).then(({data}) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}).catch(() => {
})
},
// 获取数据列表
dataSelect () {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('vipDetails/selectVipDetailsList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit
})
}).then(({data}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data
this.tableData = returnData
}
})
}
},
mounted () {
this.dataSelect()
} }
},
methods: {
// 多选
changeFun(val) {
this.checkBoxData = val
},
// tabs切换
handleClick(tab, event) {
if (tab._props.label == '轮播图') {
this.page = 1
this.limit = 5
this.classify = 1
this.dataSelect()
}
},
handleSizeChange(val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val
this.dataSelect()
},
// 查询列表
select() {
this.page = 1
this.limit = 10
this.dataSelect()
},
// 添加
add() {
this.vipNameType = -1
this.money = ''
this.payDiamond = ''
this.id = ''
this.dialogFormVisible = true
},
updata(row) {
this.vipNameType = row.vipNameType
this.money = row.money
this.payDiamond = row.payDiamond
this.id = row.id
this.dialogFormVisible1 = true
},
vipAdd() {
if (this.vipNameType == -1) {
this.$notify({
title: '提示',
duration: 1800,
message: '请选择会员类型',
type: 'warning'
});
return
}
if (this.money === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入会员价格',
type: 'warning'
});
return
}
if (this.payDiamond === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入钻石价格',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('vipDetails/insertVipDetails'),
method: 'post',
data: this.$http.adornData({
'vipNameType': this.vipNameType,
'money': this.money,
'payDiamond': this.payDiamond,
})
}).then(({ data }) => {
if (data.code == 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dialogFormVisible = false
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
vipUpdata() {
if (this.money === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入会员价格',
type: 'warning'
});
return
}
if (this.payDiamond === '') {
this.$notify({
title: '提示',
duration: 1800,
message: '请输入钻石价格',
type: 'warning'
});
return
}
this.$http({
url: this.$http.adornUrl('vipDetails/updateVipDetails'),
method: 'post',
data: this.$http.adornData({
'vipNameType': this.vipNameType,
'money': this.money,
'payDiamond': this.payDiamond,
'id': this.id
})
}).then(({ data }) => {
if (data.code == 0) {
this.dialogFormVisible1 = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
},
// 删除banner图
deletes(row) {
let delid = row.id
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`vipDetails/deleteVipDetails?id=${delid}`),
method: 'post',
params: this.$http.adornParams({})
}).then(({ data }) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}).catch(() => {
})
},
// 获取数据列表
dataSelect() {
this.tableDataLoading = true
this.$http({
url: this.$http.adornUrl('vipDetails/selectVipDetailsList'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data
this.tableData = returnData
}
})
}
},
mounted() {
this.dataSelect()
} }
}
</script> </script>
<style> <style>
.customWidth { .customWidth {
width: 80% !important; width: 80% !important;
} }
</style> </style>

View File

@@ -83,7 +83,7 @@
:page-size="limit" :page-size="limit"
:current-page="page" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" layout="total,sizes, prev, pager, next,jumper"
:total="tableData.total" :total="tableData.totalCount"
> >
</el-pagination> </el-pagination>
</div> </div>

View File

@@ -5,8 +5,8 @@
window.SITE_CONFIG = {}; window.SITE_CONFIG = {};
// api接口请求地址 // api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'https://ditanxiong.gomyorder.cn/sqx_fast'; window.SITE_CONFIG['baseUrl'] = 'https://web.hnsiyao.cn/czg';
// cdn地址 = 域名 + 版本号 // cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名 window.SITE_CONFIG['domain'] = './'; // 域名
window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分) window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分)

View File

@@ -5,7 +5,7 @@
window.SITE_CONFIG = {}; window.SITE_CONFIG = {};
// api接口请求地址 // api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'https://video.hnsiyao.cn/sqx_fast'; window.SITE_CONFIG['baseUrl'] = 'https://video.hnsiyao.cn/czg';
// cdn地址 = 域名 + 版本号 // cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名 window.SITE_CONFIG['domain'] = './'; // 域名