Commit 696d65ed by leic

last release

1 parent bf8b905e
Showing with 1010 additions and 635 deletions
...@@ -78,6 +78,8 @@ module.exports = { ...@@ -78,6 +78,8 @@ module.exports = {
loader: 'url-loader', loader: 'url-loader',
options: { options: {
limit: 10000, limit: 10000,
// 解决打包编译后icon不显示问题
publicPath: '../../',
name: utils.assetsPath('fonts/[name].[hash:7].[ext]') name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
} }
} }
......
var gulp = require('gulp'); var gulp = require("gulp");
var cleanCSS = require('gulp-clean-css') var rev = require("gulp-rev");
var cssWrap = require('gulp-css-wrap') var revCollector = require("gulp-rev-collector");
var merge = require('merge-stream'); var cleanCSS = require("gulp-clean-css");
var $ = require('gulp-load-plugins')(); var cssWrap = require("gulp-css-wrap");
var path = require('path'); var merge = require("merge-stream");
var del = require('del'); var $ = require("gulp-load-plugins")();
var path = require("path");
var del = require("del");
var distPath = path.resolve('./dist'); var distPath = path.resolve("./dist");
var version = ''; // 版本号 var version = ""; // 版本号
var versionPath = ''; // 版本号路径 var versionPath = ""; // 版本号路径
var env = ''; // 运行环境 var env = ""; // 运行环境
// 创建版本号(年月日时分) // 创建版本号(年月日时分)
(function () { (function() {
var d = new Date(); var d = new Date();
var yy = d.getFullYear().toString().slice(2); var yy = d
var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1); .getFullYear()
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate(); .toString()
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours(); .slice(2);
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes(); 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; version = yy + MM + DD + h + mm;
versionPath = distPath + '/' + version; versionPath = distPath + "/" + version;
})(); })();
// 编译 // 编译
gulp.task('build', $.shell.task([ 'node build/build.js' ])); gulp.task("build", $.shell.task(["node build/build.js"]));
// 创建版本号目录 // 创建版本号目录
gulp.task('create:versionCatalog', ['build'], function () { gulp.task("create:versionCatalog", ["build"], function() {
return gulp.src(`${distPath}/static/**/*`) return gulp
.pipe(gulp.dest(`${versionPath}/static/`)) .src(`${distPath}/static/**/*`)
.pipe(gulp.dest(`${versionPath}/static/`));
}); });
// 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量 // 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量
gulp.task('replace:cdnUrl', ['create:versionCatalog'], function () { gulp.task("replace:cdnUrl", ["create:versionCatalog"], function() {
return gulp.src(`${versionPath}/static/js/manifest.js`) return gulp
.pipe($.replace(new RegExp(`"${require('./config').build.assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"')) .src(`${versionPath}/static/js/manifest.js`)
.pipe(gulp.dest(`${versionPath}/static/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']配置变量 // 替换${versionPath}/static/config/index-${env}.js window.SITE_CONFIG['version']配置变量
gulp.task('replace:version', ['create:versionCatalog'], function () { gulp.task("replace:version", ["create:versionCatalog"], function() {
return gulp.src(`${versionPath}/static/config/index-${env}.js`) return gulp
.pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`)) .src(`${versionPath}/static/config/index-${env}.js`)
.pipe(gulp.dest(`${versionPath}/static/config/`)) .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 // 合并${versionPath}/static/config/[index-${env}, init].js 至 ${distPath}/config/index.js
gulp.task('concat:config', ['replace:version'], function () { gulp.task("concat:config", ["replace:version"], function() {
return gulp.src([`${versionPath}/static/config/index-${env}.js`, `${versionPath}/static/config/init.js`]) return gulp
.pipe($.concat('index.js')) .src([
.pipe(gulp.dest(`${distPath}/config/`)) `${versionPath}/static/config/index-${env}.js`,
`${versionPath}/static/config/init.js`
])
.pipe($.concat("index.js"))
.pipe(rev()) //添加md5,防止缓存
.pipe(gulp.dest(`${versionPath}/static/config`)) // 将生成的hash文件添加到打包目录
.pipe(rev.manifest("js-rev.json"))
.pipe(gulp.dest(`${versionPath}/static/config`))// 将map映射文件添加到打包目录
});
gulp.task("revhtml", ["concat:config"], function() {
return gulp
.src([`${versionPath}/static/config/js-rev.json`, `${distPath}/*.html`])
.pipe(
revCollector({
replaceReved: true //允许替换, 已经被替换过的文件
})
) // 把引用的js替换成有版本号的名字
.pipe(gulp.dest(distPath));
}); });
// 清空 // 清空
gulp.task('clean', function () { gulp.task("clean", function() {
return del([versionPath]) return del([versionPath, `${distPath}/config`]);
}); });
gulp.task('default', ['clean'], function () { gulp.task("default", ["clean"], function() {
// 获取环境配置 // 获取环境配置
env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod' env = process.env.npm_config_qa
? "qa"
: process.env.npm_config_uat
? "uat"
: "prod";
// 开始打包编译 // 开始打包编译
gulp.start(['build', 'create:versionCatalog', 'replace:cdnUrl', 'replace:version', 'concat:config'], function () { gulp.start(
[
"build",
"create:versionCatalog",
"replace:cdnUrl",
"replace:version",
"concat:config",
"revhtml"
],
function() {
// 清除, 编译 / 处理项目中产生的文件 // 清除, 编译 / 处理项目中产生的文件
del([`${distPath}/static`, `${versionPath}/static/config`]) del([
}) `${distPath}/static`,
`${versionPath}/static/config/index-${env}.js`,
`${versionPath}/static/config/init.js`,
`${versionPath}/static/config/index.js`,
`${versionPath}/static/config/js-rev.json`,
]);
}
);
});
// 主题清空
gulp.task("theme-clean", function() {
return del(['./src/assets/theme/theme_0BB2D4/index.css','./src/assets/theme/theme_3E8EF7/index.css','./src/assets/theme/theme_11C26D/index.css','./src/assets/theme/theme_9463F7/index.css']);
}); });
// 名为themeTask的任务 // 名为themeTask的任务
gulp.task('themetask', function () { gulp.task("themetask", ['theme-clean'], function() {
//主题1 //主题1
var theme_0BB2D4 = gulp.src(path.resolve('./src/element-ui-theme/element-#0BB2D4/index.css')) // 需要添加类名的css文件,支持正则表达式 var theme_0BB2D4 = gulp
.pipe(cssWrap({ selector: '.theme_0BB2D4' })) // 添加的类名 .src(path.resolve("./src/element-ui-theme/element-#0BB2D4/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_0BB2D4" })) // 添加的类名
.pipe(cleanCSS()) .pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_0BB2D4'));// 生成的css文件存放的目录 .pipe(gulp.dest("./src/assets/theme/theme_0BB2D4")); // 生成的css文件存放的目录
//主题2 //主题2
var theme_3E8EF7 = gulp.src(path.resolve('./src/element-ui-theme/element-#3E8EF7/index.css')) // 需要添加类名的css文件,支持正则表达式 var theme_3E8EF7 = gulp
.pipe(cssWrap({ selector: '.theme_3E8EF7' })) // 添加的类名 .src(path.resolve("./src/element-ui-theme/element-#3E8EF7/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_3E8EF7" })) // 添加的类名
.pipe(cleanCSS()) .pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_3E8EF7'));// 生成的css文件存放的目录 .pipe(gulp.dest("./src/assets/theme/theme_3E8EF7")); // 生成的css文件存放的目录
//主题3 //主题3
var theme_11C26D = gulp.src(path.resolve('./src/element-ui-theme/element-#11C26D/index.css')) // 需要添加类名的css文件,支持正则表达式 var theme_11C26D = gulp
.pipe(cssWrap({ selector: '.theme_11C26D' })) // 添加的类名 .src(path.resolve("./src/element-ui-theme/element-#11C26D/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_11C26D" })) // 添加的类名
.pipe(cleanCSS()) .pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_11C26D'));// 生成的css文件存放的目录 .pipe(gulp.dest("./src/assets/theme/theme_11C26D")); // 生成的css文件存放的目录
//主题4 //主题4
var theme_9463F7 = gulp.src(path.resolve('./src/element-ui-theme/element-#9463F7/index.css')) // 需要添加类名的css文件,支持正则表达式 var theme_9463F7 = gulp
.pipe(cssWrap({ selector: '.theme_9463F7' })) // 添加的类名 .src(path.resolve("./src/element-ui-theme/element-#9463F7/index.css")) // 需要添加类名的css文件,支持正则表达式
.pipe(cssWrap({ selector: ".theme_9463F7" })) // 添加的类名
.pipe(cleanCSS()) .pipe(cleanCSS())
.pipe(gulp.dest('./src/assets/theme/theme_9463F7'));// 生成的css文件存放的目录 .pipe(gulp.dest("./src/assets/theme/theme_9463F7")); // 生成的css文件存放的目录
return merge(theme_0BB2D4, theme_3E8EF7, theme_11C26D, theme_9463F7); return merge(theme_0BB2D4, theme_3E8EF7, theme_11C26D, theme_9463F7);
}) });
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<title>裹裹快递上门取件寄快递系统</title> <title>裹裹快递上门取件寄快递系统</title>
<% if (process.env.NODE_ENV==='production' ) { %> <% if (process.env.NODE_ENV==='production' ) { %>
<!-- 生产环境 --> <!-- 生产环境 -->
<script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script> <!-- <script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script> -->
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico"> <link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<script src="./static/config/index.js"></script> <script src="./static/config/index.js"></script>
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script> <script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
......
...@@ -73,6 +73,9 @@ ...@@ -73,6 +73,9 @@
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-clean-css": "^4.3.0", "gulp-clean-css": "^4.3.0",
"gulp-css-wrap": "^0.1.2", "gulp-css-wrap": "^0.1.2",
"gulp-rev": "^8.1.0",
"gulp-rev-collector": "^1.3.3",
"gulp-sequence": "^1.0.0",
"html-webpack-plugin": "2.30.1", "html-webpack-plugin": "2.30.1",
"jest": "21.2.0", "jest": "21.2.0",
"jest-serializer-vue": "0.3.0", "jest-serializer-vue": "0.3.0",
......
...@@ -7,10 +7,15 @@ ...@@ -7,10 +7,15 @@
<script> <script>
import { setCookie } from './utils/cookie'; import { setCookie } from './utils/cookie';
import { initTheme } from './utils/theme'; import { initTheme } from './utils/theme';
import { getBaseInfo } from '@/api/ldy/miniProgram'
export default { export default {
created() { created() {
// setCookie('token') // setCookie('token')
getBaseInfo().then(res => {
sessionStorage.setItem("mtoken", res.data.mtoken)
sessionStorage.setItem("btoken", res.data.btoken)
})
}, },
mounted() { mounted() {
initTheme() initTheme()
......
...@@ -51,3 +51,28 @@ export function preChargeSumDetailAPI(data) { ...@@ -51,3 +51,28 @@ export function preChargeSumDetailAPI(data) {
data: $http.adornData(data), data: $http.adornData(data),
}); });
} }
export function getMonth(data) {
return $http({
url: $http.adornLdyUrl('funds/bill/month'),
method: 'post',
data: $http.adornData(data),
source: 'cm'
})
}
export function getDate(data) {
return $http({
url: $http.adornLdyUrl('funds/bill/day'),
method: 'post',
data: $http.adornData(data),
source: 'cm'
})
}
// 获取分销员列表
export const distributorList = data => $http({
url: $http.adornLdyUrl('distribution/user/list'),
method: 'post',
data: $http.adornData(data),
});
...@@ -81,7 +81,7 @@ export function wxpayConfigSave(data) { ...@@ -81,7 +81,7 @@ export function wxpayConfigSave(data) {
url: $http.adornLdyUrl("payments/wxpay/config/save"), url: $http.adornLdyUrl("payments/wxpay/config/save"),
method: "post", method: "post",
source: "cm", source: "cm",
data: $http.adornData(data), data: data,
headers: { headers: {
"Content-Type": "multipart/form-data" "Content-Type": "multipart/form-data"
} }
......
...@@ -519,6 +519,14 @@ img { ...@@ -519,6 +519,14 @@ img {
} }
} }
} }
// 处理tabs基础样式被card样式覆盖
.el-tabs--top .el-tabs__item.is-top:nth-child(2) {
padding-left: 0 !important;
}
.el-tabs--top .el-tabs__item.is-top:last-child {
padding-right: 0 !important;
}
} }
} }
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<template> <template>
<div class="setting_container" @click="openSetting"> <div v-show="!isOpen" class="setting_container" @click="openSetting">
<span class="action-setting"> <span class="action-setting">
<svg viewBox="64 64 896 896" focusable="false" data-icon="setting" width="1em" height="1em" fill="currentColor" <svg viewBox="64 64 896 896" focusable="false" data-icon="setting" width="1em" height="1em" fill="currentColor"
aria-hidden="true"> aria-hidden="true">
......
<template>
<el-tooltip effect="dark" popper-class="my_tooltip" :content="content" placement="top" :disabled="isShowTooltip"
:open-delay="100">
<div :class="['text-wrap', multiLine ? 'multi' : '']" @mouseenter="onMouseenter">
<span ref="tooltipText">{{ text }}</span>
</div>
</el-tooltip>
</template>
<script>
import { Tooltip } from 'element-ui'
export default {
name: 'text-tooltip',
props: {
text: {
type: String,
default: ''
},
multiLine: {
type: Boolean,
default: false
}
},
components: {
Tooltip
},
data() {
return {
isShowTooltip: false,
content: "",
};
},
methods: {
onMouseenter() {
// 内容超出,显示文字提示内容
const tag = this.$refs.tooltipText;
const parentWidth = tag.parentNode.offsetWidth; // 获取元素父级可视宽度
const contentWidth = tag.offsetWidth; // 获取元素可视宽度
const parentHeight = tag.parentNode.clientHeight;
const contentHeight = tag.offsetHeight;
if (this.multiLine) {
// 如果是多行文本溢出
this.isShowTooltip = contentHeight <= parentHeight;
} else {
this.isShowTooltip = contentWidth <= parentWidth;
}
// 鼠标悬停后显示的内容
this.content = this.text;
}
},
};
</script>
<style scoped>
.my_tooltip {
max-width: 80%;
}
.text-wrap {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.text-wrap.multi {
width: 100%;
overflow: hidden;
white-space: normal;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
</style>
\ No newline at end of file
<template>
<div class="images-list">
<el-upload v-if="showFileList" class="avatar-uploader" :action="uploadUrl" :before-upload="handleBeforeUpload"
:on-success="handleSuccess" :on-error="handleUploadError" :on-remove="handleRemove" :on-exceed="handleExceed"
:file-list="fileList" :multiple="fileLimit > 1" :data="paramsData" :limit="fileLimit" :list-type="listType"
:show-file-list="true">
<i v-if="listType === 'picture-card'" class="el-icon-plus"></i>
<el-button v-else size="small" type="primary">点击上传</el-button>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<el-upload class="avatar-uploader" :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleSuccess"
:on-error="handleUploadError" :on-remove="handleRemove" :on-exceed="handleExceed" :multiple="false"
:show-file-list="false"
:data="paramsData" :list-type="listType">
<img v-if="value" :src="value" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
</div>
</template>
<script>
export default {
props: {
// 值
value: [String, Object, Array],
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
// 文件类型, 例如["doc", "xls", "ppt", "txt", "pdf"]
fileType: {
type: Array,
default: () => ['png', 'jpg', 'jpeg'],
},
// 文件列表类型 text/picture/picture-card
listType: {
type: String,
default: 'picture'
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: false
},
// 最大允许上传个数
fileLimit: {
type: Number,
default: 99
},
// 是否显示文件列表
showFileList: {
type: Boolean,
default: false
}
},
data() {
return {
uploadUrl: "https://xxxxxxxxxxxxxxxxxxx/upload", // 上传的图片服务器地址
paramsData: {
}, // 上传携带的参数,看需求要不要
fileList: [],
tempFileList: [] // 因为 fileList为只读属性,所以用了一个中间变量来进行数据改变的交互。
}
},
watch: {
value: {
handler: function (newVal, oldVa) {
this.tempFileList = newVal
},
immediate: true,
deep: true
}
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
fileTypeName() {
let typeName = ''
this.fileType.forEach(item => {
typeName += `${item},`
})
return typeName
},
fileAccept() {
let fileAccept = ''
this.fileType.forEach(element => {
fileAccept += `.${element},`
})
return fileAccept
}
},
created() {
console.log(this.value)
if (this.value) {
if (Array.isArray(this.value)) {
this.fileList = JSON.parse(JSON.stringify(this.value))
} else {
this.fileList = [{ name: '1', url: this.value }]
}
}
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType && file) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk & file) {
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
return false;
}
}
// 校检文件大小
if (this.fileSize && file) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
return true;
},
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
},
// 文件个数超出
handleExceed() {
this.$message.error(`超出上传文件个数,请删除以后再上传!`);
},
// 文件上传成功的钩子
handleSuccess(res, file, fileList) {
this.$message.success("上传成功")
this.changeFileList(fileList)
},
// 文件列表移除文件时的钩子
handleRemove(file, fileList) {
this.changeFileList(fileList)
},
// 文件列表改变的时候,更新组件的v-model的文的数据
changeFileList(fileList) {
const tempFileList = fileList.map(item => {
let tempItem = {
name: item.name,
url: item.response ? item.response.url : item.url
}
return tempItem
})
this.$emit("input", tempFileList)
}
},
}
</script>
<style lang="scss" scoped>
.images-list {
// border: 1px dashed #d5d5d5;
// padding: 10px;
// border-radius: 4px;
// background: #fff;
.avatar-uploader {
/deep/ .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
&:hover {
border-color: var(--primary-color);
}
}
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 178px;
height: 178px;
display: block;
}
}
</style>
\ No newline at end of file
<template>
<div class="images-list">
<el-upload v-if="multiple" class="avatar-uploader" accept="image/*" :action="uploadUrl"
:before-upload="handleBeforeUpload" :on-success="handleSuccess" :on-error="handleUploadError"
:on-remove="handleRemove" :on-preview="handlePictureCardPreview" :on-exceed="handleExceed" :multiple="multiple"
:file-list="fileList" :limit="fileLimit" :show-file-list="false" list-type="picture-card" :data="paramsData">
<i class="el-icon-plus"></i>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<el-upload v-else class="avatar-uploader" accept="image/*" :action="uploadUrl" :before-upload="handleBeforeUpload"
:on-success="handleSuccess" :on-error="handleUploadError" :on-remove="handleRemove"
:on-preview="handlePictureCardPreview" :on-exceed="handleExceed" :show-file-list="false" list-type="picture"
:data="paramsData">
<template v-if="value">
<img :src="value" class="avatar">
<span class="upload-action" @click.stop="() => { }">
<span><i class="el-icon-zoom-in" @click.stop="handlePictureCardPreview({ url: value })"></i></span>
<span><i class="el-icon-delete" @click.stop="handleRemove([{ url: value }])"></i></span>
</span>
</template>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<div v-if="showTip" slot="tip" class="el-upload__tip">只能上传{{ fileTypeName || 'jpg/png' }}文件,且不超过 {{ fileSize }}MB
</div>
</el-upload>
<image-viewer
v-if="previewVisible"
:z-index="10000"
:urlList="previewList"
:on-close="onClose"></image-viewer>
<!-- <el-dialog :visible.sync="previewVisible" append-to-body>
<img width="100%" :src="previewUrl" alt="">
</el-dialog> -->
</div>
</template>
<script>
import moment from 'moment'
import getUpToken from '@/api/ldy/getUpToken'
import ImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
props: {
// 值
value: [String, Object, Array],
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
// 文件类型, 例如["doc", "xls", "ppt", "txt", "pdf"]
fileType: {
type: Array,
default: () => ['png', 'jpg', 'jpeg'],
},
// 文件列表类型 text/picture/picture-card
listType: {
type: String,
default: 'picture'
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: false
},
// 最大允许上传个数
fileLimit: {
type: Number,
default: 99
},
// 是否显示文件列表
showFileList: {
type: Boolean,
default: false
},
// 是否多选
multiple: {
type: Boolean,
default: false
},
// 上传样式
fileStyle: {
type: Object,
default: () => {
return {}
}
}
},
components: { ImageViewer },
data() {
return {
loading: false,
previewVisible: false,
previewUrl: '',
previewList: [],
uploadUrl: "//up.qbox.me", // 上传的图片服务器地址
paramsData: {
key: "",
token: ""
}, // 上传携带的参数,看需求要不要
fileList: [],
tempFileList: [], // 因为 fileList为只读属性,所以用了一个中间变量来进行数据改变的交互。
}
},
watch: {
value: {
handler: function (newVal, oldVa) {
if (Array.isArray(newVal))
this.tempFileList = newVal
},
immediate: true,
deep: true
}
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
fileTypeName() {
let typeName = ''
this.fileType.forEach(item => {
typeName += `${item},`
})
return typeName
},
fileAccept() {
let fileAccept = ''
this.fileType.forEach(element => {
fileAccept += `.${element},`
})
return fileAccept
}
},
created() {
if (this.value) {
if (Array.isArray(this.value)) {
this.fileList = JSON.parse(JSON.stringify(this.value))
}
}
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType && file) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk & file) {
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
return false;
}
}
// 校检文件大小
if (this.fileSize && file) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
this.loading = true
let splitArray = file.name.split(".");
let current = moment()
.format("YYYYMMDD")
.toString(),
prefix = moment(file.lastModified)
.format("HHmmss")
.toString(),
suffix = new Date().getTime() + "." + splitArray[splitArray.length - 1],
key = encodeURI(`${current}/${prefix}_${suffix}`);
return getUpToken({ key })
.then(res => {
this.paramsData = {
key: key,
token: res.data.uptoken
};
})
.catch(() => {
this.loading = false
this.$message.error("上传图片失败");
});
},
handleUploadError(err) {
this.loading = false;
this.$message.error("上传失败, 请重试");
},
// 文件个数超出
handleExceed() {
this.loading = false;
this.$message.error(`超出上传文件个数,请删除以后再上传!`);
},
// 文件上传成功的钩子
handleSuccess(res, file, fileList) {
console.log(res, file, fileList)
this.$message.success("上传成功")
this.loading = false;
if (!this.multiple) {
this.$emit("input", res.domain + res.truekey)
} else {
this.changeFileList(fileList)
}
},
// 文件列表移除文件时的钩子
handleRemove(file, fileList) {
if (!this.multiple) {
this.$emit("input", '')
} else {
this.changeFileList(fileList)
}
},
// 预览
handlePictureCardPreview(file) {
this.previewUrl = file.url;
if(!this.multiple) {
this.previewList = [this.previewUrl]
}
this.previewVisible = true;
// 解决 显示大图预览后发现鼠标上下滚动放大缩小图片时,遮罩后面的页面如果有滚动条,也会跟着滚动,体验感不好
this.stopMove();
},
// 文件列表改变的时候,更新组件的v-model的数据
changeFileList(fileList) {
const tempFileList = fileList.map(item => {
let tempItem = {
name: item.key,
url: item.response.domain + item.response.truekey
}
return tempItem
})
this.$emit("input", tempFileList)
},
onClose() {
this.previewVisible = false;
// 解决 显示大图预览后发现鼠标上下滚动放大缩小图片时,遮罩后面的页面如果有滚动条,也会跟着滚动,体验感不好
this.move();
},
// 停止页面滚动
stopMove() {
const m = (e) => {
e.preventDefault();
};
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); // 禁止页面滑动
},
// 开启页面滚动
move() {
const m = (e) => {
e.preventDefault();
};
document.body.style.overflow = "auto";
document.removeEventListener("touchmove", m, true);
},
},
}
</script>
<style lang="scss" scoped>
.images-list {
// border: 1px dashed #d5d5d5;
// padding: 10px;
// border-radius: 4px;
// background: #fff;
.avatar-uploader {
/deep/ .el-upload {
width: 178px;
height: 178px;
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
&:hover {
border-color: var(--primary-color);
}
}
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 100%;
height: 100%;
display: block;
}
.upload-action {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
cursor: default;
text-align: center;
color: #fff;
opacity: 0;
font-size: 20px;
background-color: rgba(0, 0, 0, .5);
transition: opacity .3s;
display: flex;
align-items: center;
justify-content: center;
span {
display: none;
cursor: pointer;
margin: 0 10px;
}
&:hover {
opacity: 1;
span {
display: inline-block;
}
}
}
}
</style>
\ No newline at end of file
...@@ -10,15 +10,7 @@ ...@@ -10,15 +10,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="value" label="内容"> <el-table-column prop="value" label="内容">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip placement="top" popper-class="sysSetTable_tooltip"> <tooltip-text :text="scope.row.value" multiLine />
<div slot="content">
{{ scope.row.value }}
</div>
<div
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">
{{ scope.row.value }}
</div>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createAt" label="创建时间" width="180"> <el-table-column prop="createAt" label="创建时间" width="180">
...@@ -38,6 +30,7 @@ ...@@ -38,6 +30,7 @@
<script> <script>
import sysSetDialog from '@/components/sysSetDialog' import sysSetDialog from '@/components/sysSetDialog'
import TooltipText from '@/components/Tooltip'
export default { export default {
props: { props: {
data: { data: {
...@@ -50,7 +43,8 @@ export default { ...@@ -50,7 +43,8 @@ export default {
}, },
}, },
components: { components: {
sysSetDialog sysSetDialog,
TooltipText
}, },
data() { data() {
return { return {
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -81,7 +81,8 @@ import { ...@@ -81,7 +81,8 @@ import {
Link, Link,
Avatar, Avatar,
Skeleton, Skeleton,
SkeletonItem SkeletonItem,
Popconfirm
} from 'element-ui' } from 'element-ui'
Vue.use(Pagination) Vue.use(Pagination)
...@@ -153,6 +154,7 @@ Vue.use(Link) ...@@ -153,6 +154,7 @@ Vue.use(Link)
Vue.use(Avatar) Vue.use(Avatar)
Vue.use(Skeleton) Vue.use(Skeleton)
Vue.use(SkeletonItem) Vue.use(SkeletonItem)
Vue.use(Popconfirm)
Vue.use(Loading.directive) Vue.use(Loading.directive)
......
import Vue from 'vue' import Vue from "vue";
import App from '@/App' import App from "@/App";
import router from '@/router' // api: https://github.com/vuejs/vue-router import router from "@/router"; // api: https://github.com/vuejs/vue-router
import store from '@/store' // api: https://github.com/vuejs/vuex import store from "@/store"; // api: https://github.com/vuejs/vuex
import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie import VueCookie from "vue-cookie"; // api: https://github.com/alfhen/vue-cookie
import '@/element-ui' // api: https://github.com/ElemeFE/element import "@/element-ui"; // api: https://github.com/ElemeFE/element
import '@/icons' // api: http://www.iconfont.cn/ import "@/icons"; // api: http://www.iconfont.cn/
// 引入echarts // 引入echarts
import echarts from "@/components/ecahrts"; import echarts from "@/components/ecahrts";
// 挂载到vue实例中 // 挂载到vue实例中
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts;
// import '@/element-ui-theme' // import '@/element-ui-theme'
// 引入主题样式 // 引入主题样式
import '@/assets/theme/theme_0BB2D4/index.css' import "@/assets/theme/theme_0BB2D4/index.css";
import '@/assets/theme/theme_3E8EF7/index.css' import "@/assets/theme/theme_3E8EF7/index.css";
import '@/assets/theme/theme_11C26D/index.css' import "@/assets/theme/theme_11C26D/index.css";
import '@/assets/theme/theme_9463F7/index.css' import "@/assets/theme/theme_9463F7/index.css";
import '@/assets/scss/index.scss' import "@/assets/scss/index.scss";
import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios import httpRequest from "@/utils/httpRequest"; // api: https://github.com/axios/axios
import { isAuth } from '@/utils' import { isAuth } from "@/utils";
import cloneDeep from 'lodash/cloneDeep' import cloneDeep from "lodash/cloneDeep";
import BaiduMap from 'vue-baidu-map' import BaiduMap from "vue-baidu-map";
import {VueJsonp} from 'vue-jsonp' import { VueJsonp } from "vue-jsonp";
import VueClipboard from 'vue-clipboard2' import VueClipboard from "vue-clipboard2";
Vue.use(VueClipboard) Vue.use(VueClipboard);
// 全局注册表格empty组件 // 全局注册表格empty组件
import TableEmpty from '@/components/TableEmpty/' import TableEmpty from "@/components/TableEmpty/";
import { isEmpty } from '@/utils/validate.js' import { isEmpty } from "@/utils/validate.js";
Vue.component('TableEmpty', TableEmpty) Vue.component("TableEmpty", TableEmpty);
Vue.use(VueJsonp) Vue.use(VueJsonp);
Vue.use(BaiduMap, { Vue.use(BaiduMap, {
ak: 'miP4RMG1yZoROVRSqTPghvUaRb68iGUB' ak: "miP4RMG1yZoROVRSqTPghvUaRb68iGUB"
}) });
Vue.use(VueCookie) Vue.use(VueCookie);
Vue.config.productionTip = false Vue.config.productionTip = false;
// 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock // 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== "production") {
require('@/mock') require("@/mock");
} }
// 挂载全局 // 挂载全局
Vue.prototype.$http = httpRequest // ajax请求方法 Vue.prototype.$http = httpRequest; // ajax请求方法
Vue.prototype.isAuth = isAuth // 权限方法 Vue.prototype.isAuth = isAuth; // 权限方法
Vue.prototype.isEmpty = isEmpty //非空判断 Vue.prototype.isEmpty = isEmpty; //非空判断
// 保存整站vuex本地储存初始状态 // 保存整站vuex本地储存初始状态
window.SITE_CONFIG['storeState'] = cloneDeep(store.state) window.SITE_CONFIG["storeState"] = cloneDeep(store.state);
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
el: '#app', el: "#app",
router, router,
store, store,
template: '<App/>', template: "<App/>",
components: { App } components: { App }
}) });
...@@ -370,7 +370,7 @@ router.beforeEach((to, from, next) => { ...@@ -370,7 +370,7 @@ router.beforeEach((to, from, next) => {
// 添加动态(菜单)路由 // 添加动态(菜单)路由
// 1. 已经添加 or 全局路由, 直接访问 // 1. 已经添加 or 全局路由, 直接访问
// 2. 获取菜单列表, 添加并保存本地存储 // 2. 获取菜单列表, 添加并保存本地存储
if (token != "" && menuList && (menuList == "[]" || menuList.length == 0)) { if (token != "" && menuList && (menuList == "[]" || menuList .length == 0) && !router.options.isAddDynamicMenuRoutes) {
http({ http({
url: http.adornUrl("/sys/menu/nav"), url: http.adornUrl("/sys/menu/nav"),
method: "get", method: "get",
......
...@@ -8,7 +8,7 @@ const cookie_pre = config.extraData.cookie.pre ...@@ -8,7 +8,7 @@ const cookie_pre = config.extraData.cookie.pre
export function getMallToken() { export function getMallToken() {
let token = let token =
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODIyNDY0MzgsIm5iZiI6MTY4MjI0NjQzOCwiZXhwIjoxNjgyODUxMjM4LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiaW5kdXN0cnlfaWQiOiIxIiwiaW5kdXN0cnlfYWxpYXMiOiJzdG9yZSIsImluZHVzdHJ5X2xldmVsX2lkIjoiMiIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoiYWR2YW5jZWQiLCJzaG9wX2lkIjoiMSIsIm10b2tlbiI6IjkyM2YyNjlmNTdmZGJhZWU4ZTFhMjA3ZjlmMWYyYThkIiwidHlwZSI6IiIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJiNDNiNzljM2E3ZTExOWNmZjk2MmJkMGNmNDE5NWE0ZiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4MjQxNTQwNn0.XHJXEZdOOC3V8sdQsk6xQBccrWSCVPdXXqbkJ5zuzr0"; "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODM4NzUxMTQsIm5iZiI6MTY4Mzg3NTExNCwiZXhwIjoxNjg0NDc5OTE0LCJ0b2tlbiI6ImVlOTNmN2VkMDNhZGFlZjVlODQ1MTg3MTFjOWU5MzMwIiwiYnRva2VuIjoiZWU5M2Y3ZWQwM2FkYWVmNWU4NDUxODcxMWM5ZTkzMzAiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIzMCIsIm5hbWUiOiIxOTIwMDAwMDAwMCIsInBob25lIjoiMTkyMDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjE0IiwibXRva2VuIjoiODUxMjc0YTI0NjUwMTgwYjc3OWZmZjk1ZTY2YTAyMzMiLCJ0eXBlIjoic3RvcmUiLCJ0aGlyZF9hcHBpZCI6IiIsImN1cnJlbnRfYnRva2VuIjoiZWU5M2Y3ZWQwM2FkYWVmNWU4NDUxODcxMWM5ZTkzMzAiLCJhY2NvdW50X3R5cGUiOiIxIiwiYWNjb3VudF9yb2xlcyI6WyJtYXN0ZXIiXSwic3dpdGNoX3RpbWUiOjE2ODM4NzU0MTd9.wBPUbouiSs2HeQPZUuwVQ62BHUoNWFydE6vre8ulwZs";
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
return token; return token;
} else return getCookie("token"); } else return getCookie("token");
...@@ -32,8 +32,7 @@ export function getMallInfo() { ...@@ -32,8 +32,7 @@ export function getMallInfo() {
export function setCookie(cookie) { export function setCookie(cookie) {
if (cookie == "token") { if (cookie == "token") {
Vue.cookie.set( Vue.cookie.set(
cookie_pre + "storeMallToken", cookie_pre + "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODM4NjI3MzIsIm5iZiI6MTY4Mzg2MjczMiwiZXhwIjoxNjg0NDY3NTMyLCJ0b2tlbiI6ImM3MWY0MjZjMTEzMjYyMjA0NzI3ZGNhZGNhNmU3NzM2IiwiYnRva2VuIjoiYzcxZjQyNmMxMTMyNjIyMDQ3MjdkY2FkY2E2ZTc3MzYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIyMyIsIm5hbWUiOiIxOTYwMDAwMDAwMCIsInBob25lIjoiMTk2MDAwMDAwMDAiLCJzb3VyY2UiOiJwYyIsImluZHVzdHJ5X2lkIjoiMSIsImluZHVzdHJ5X2FsaWFzIjoic3RvcmUiLCJpbmR1c3RyeV9sZXZlbF9pZCI6IjIwMCIsImluZHVzdHJ5X2xldmVsX2FsaWFzIjoia3VhaWRpIiwic2hvcF9pZCI6IjciLCJtdG9rZW4iOiIwYWI4NDQyMTgxZTdhZWM5OWY0NmIzYjg4ZTI2ZjdiNyIsInR5cGUiOiJzdG9yZSIsInRoaXJkX2FwcGlkIjoiIiwiY3VycmVudF9idG9rZW4iOiJjNzFmNDI2YzExMzI2MjIwNDcyN2RjYWRjYTZlNzczNiIsImFjY291bnRfdHlwZSI6IjEiLCJhY2NvdW50X3JvbGVzIjpbIm1hc3RlciJdLCJzd2l0Y2hfdGltZSI6MTY4Mzg2MzEyM30.2NMTgbZMsd2p_LiReRSv3nqx9yDBkbfv3AlxaxjyyzE"
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IiJ9.eyJpc3MiOiIiLCJhdWQiOiIiLCJqdGkiOiIiLCJpYXQiOjE2ODEyMDUwNzYsIm5iZiI6MTY4MTIwNTA3NiwiZXhwIjoxNjgxODA5ODc2LCJ0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYnRva2VuIjoiYjQzYjc5YzNhN2UxMTljZmY5NjJiZDBjZjQxOTVhNGYiLCJyb2xlIjoiYnVzaW5lc3MiLCJiaWQiOiIxIiwibmFtZSI6IjE4NzEwODQ3MzA4IiwicGhvbmUiOiIxODcxMDg0NzMwOCIsInNvdXJjZSI6InBjIiwiY2VtZXRlcnlfaWQiOiIiLCJpbmR1c3RyeV9pZCI6IjEiLCJpbmR1c3RyeV9hbGlhcyI6InN0b3JlIiwiaW5kdXN0cnlfbGV2ZWxfaWQiOiIyIiwiaW5kdXN0cnlfbGV2ZWxfYWxpYXMiOiJhZHZhbmNlZCIsInNob3BfaWQiOiIxIiwibXRva2VuIjoiOTIzZjI2OWY1N2ZkYmFlZThlMWEyMDdmOWYxZjJhOGQiLCJ0eXBlIjoiIiwidGhpcmRfYXBwaWQiOiIiLCJjdXJyZW50X2J0b2tlbiI6ImI0M2I3OWMzYTdlMTE5Y2ZmOTYyYmQwY2Y0MTk1YTRmIiwiYWNjb3VudF90eXBlIjoiMSIsImFjY291bnRfcm9sZXMiOlsibWFzdGVyIl0sInN3aXRjaF90aW1lIjoxNjgxMjA1NDk0fQ._D73SkAoataYGsDhKy_-0_tyobYsEM2EFkPVaAL5QAk"
); );
} else { } else {
Vue.cookie.set(cookie); Vue.cookie.set(cookie);
...@@ -42,10 +41,6 @@ export function setCookie(cookie) { ...@@ -42,10 +41,6 @@ export function setCookie(cookie) {
export function getCookie(cookie) { export function getCookie(cookie) {
if (cookie == "token") { if (cookie == "token") {
console.log(
"----token---",
Vue.cookie.get(cookie_pre + "storeMallToken")
);
return Vue.cookie.get(cookie_pre + "storeMallToken"); return Vue.cookie.get(cookie_pre + "storeMallToken");
} }
return Vue.cookie.get(cookie_pre + cookie); return Vue.cookie.get(cookie_pre + cookie);
......
...@@ -46,14 +46,14 @@ http.interceptors.response.use( ...@@ -46,14 +46,14 @@ http.interceptors.response.use(
onClose: () => { onClose: () => {
clearCookie(); clearCookie();
sessionStorage.clear(); sessionStorage.clear();
window.location.href = store.state.domainURL + 'shoplist'; // window.location.href = store.state.domainURL + 'shoplist';
} }
}); });
// router.push({ name: 'login' }) // router.push({ name: 'login' })
} else if (response.data.error && response.data.error !== 0) { } else if (response.data.error && response.data.error !== 0) {
console.log("----------", response.data); console.log("----------", response.data);
Message({ Message({
message: response.data["error_reason"], message: response.data["error_reason"] || response.data["msg"],
type: "error", type: "error",
duration: 1.5 * 1000 duration: 1.5 * 1000
}); });
......
/***
* 将url参数转化为url参数
* @param param 需要转化的js 对象
* @param key
* @param encode
* @returns {string} &minimum=1530374400&maximum=1530547200&type=2
*/
export function urlEncode(param, key, encode) {
if (param == null) return '';
let paramStr = '';
let t = typeof (param);
if (t == 'string' || t == 'number' || t == 'boolean') {
paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param);
} else {
for (let i in param) {
let k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i);
paramStr += urlEncode(param[i], k, encode);
}
}
return paramStr;
}
\ No newline at end of file
...@@ -337,7 +337,7 @@ ...@@ -337,7 +337,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="state" label="是否启用"> <el-table-column prop="state" label="是否启用">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.state" @change="change(scope.row.state,scope.row)" <el-switch v-model="scope.row.state" :disabled="!isAuth('bannerList:update')" @change="change(scope.row.state,scope.row)"
:active-value="openValue" :inactive-value="closeValue" active-color="#13ce66" :active-value="openValue" :inactive-value="closeValue" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949">
</el-switch> </el-switch>
...@@ -528,19 +528,19 @@ ...@@ -528,19 +528,19 @@
// this.state = 1 // this.state = 1
// this.dataSelect1() // this.dataSelect1()
// } // }
if (tab._props.label == '轮播图') { if (tab.name == 'first') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.classify = 1 this.classify = 1
this.dataSelect() this.dataSelect()
} }
if (tab._props.label == '首页分类') { if (tab.name == 'fourthly') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.classify = 2 this.classify = 2
this.dataSelect() this.dataSelect()
} }
if (tab._props.label == '分类活动') { if (tab.name == 'fenleihuodong') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.classify = 3 this.classify = 3
...@@ -552,13 +552,13 @@ ...@@ -552,13 +552,13 @@
// this.classify = 4 // this.classify = 4
// this.dataSelect() // this.dataSelect()
// } // }
if (tab._props.label == '其他背景图') { if (tab.name == 'qita') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.classify = 4 this.classify = 4
this.dataSelect() this.dataSelect()
} }
if (tab._props.label == '分享图') { if (tab.name == 'fivethly') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.classify = 5 this.classify = 5
...@@ -1322,8 +1322,8 @@ ...@@ -1322,8 +1322,8 @@
}).catch(() => {}) }).catch(() => {})
}, },
}, },
mounted() { activated() {
this.dataSelect() this.handleClick({name: this.activeName})
} }
} }
</script> </script>
......
...@@ -226,14 +226,6 @@ export default { ...@@ -226,14 +226,6 @@ export default {
this.page = val; this.page = val;
this.dataSelect() this.dataSelect()
}, },
handleSizeChange(val) {
this.size = val;
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val;
this.dataSelect()
},
handleSizeChangeY(val) { handleSizeChangeY(val) {
this.size1 = val; this.size1 = val;
...@@ -418,7 +410,7 @@ export default { ...@@ -418,7 +410,7 @@ export default {
this.tableDataLoading = false this.tableDataLoading = false
let returnData = data.data; let returnData = data.data;
this.tableData = returnData this.tableData = returnData
if (data.data.list.length == 0) { if (data.data.list.length == 0 && this.page > 1) {
this.page = this.page - 1 this.page = this.page - 1
this.dataSelect() this.dataSelect()
} }
......
...@@ -125,15 +125,15 @@ ...@@ -125,15 +125,15 @@
<el-input v-model="form.couponName" style="width:65%;" placeholder="请输入优惠券名称"></el-input> <el-input v-model="form.couponName" style="width:65%;" placeholder="请输入优惠券名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="优惠券图片:" :label-width="formLabelWidth"> <el-form-item label="优惠券图片:" :label-width="formLabelWidth">
<div style=" width:148px;height:148px;background-color: #fbfdff; border: 1px dashed #c0ccda;border-radius: 6px;text-align: center;line-height: 148px;display: inline-block;"> <div>
<el-upload class="avatar-uploader" v-model="form.couponPicture" <!-- <el-upload class="avatar-uploader" v-model="form.couponPicture"
action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false" action="https://admin.sj088.cn/sqx_fast/alioss/upload" :show-file-list="false"
:on-success="handleAvatarSuccess2"> :on-success="handleAvatarSuccess2">
<img v-if="form.couponPicture" :src="form.couponPicture" class="avatar" <img v-if="form.couponPicture" :src="form.couponPicture" class="avatar"
style="width: 148px;height: 148px;" /> style="width: 148px;height: 148px;" />
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i> <i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
</el-upload> </el-upload> -->
<!-- <upload :value="form.couponPicture" @input="uploadInput"></upload> --> <upload-image v-model="form.couponPicture"></upload-image>
</div> </div>
</el-form-item> </el-form-item>
...@@ -388,13 +388,15 @@ ...@@ -388,13 +388,15 @@
</template> </template>
<script> <script>
import Upload from '@/components/Upload' import UploadImage from '@/components/UploadImage'
export default { export default {
components: { components: {
Upload UploadImage
}, },
data() { data() {
return { return {
dialogImageUrl: '',
dialogVisible: false,
size: 10, size: 10,
page: 1, page: 1,
size1: 10, size1: 10,
...@@ -469,10 +471,6 @@ export default { ...@@ -469,10 +471,6 @@ export default {
}, },
methods: { methods: {
// 文件上传改变
uploadInput(fileList) {
console.log(fileList, 'fileList')
},
// 通用券/商品券 // 通用券/商品券
couponClick(val) { couponClick(val) {
if (val = 1) { if (val = 1) {
...@@ -707,6 +705,13 @@ export default { ...@@ -707,6 +705,13 @@ export default {
this.dialogFormVisible2 = false this.dialogFormVisible2 = false
}) })
}, },
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
// 删除优惠券 // 删除优惠券
shopdeletes(row) { shopdeletes(row) {
this.$confirm(`确定删除此条信息?`, '提示', { this.$confirm(`确定删除此条信息?`, '提示', {
...@@ -1070,7 +1075,7 @@ export default { ...@@ -1070,7 +1075,7 @@ export default {
}) })
}, },
}, },
mounted() { activated() {
this.dataSelect() this.dataSelect()
} }
}; };
......
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
}) })
}, },
}, },
created() { activated() {
this.dataSelect() this.dataSelect()
} }
}; };
......
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
title: '订单管理', title: '订单管理',
}, },
{ {
title: '寄件提交', title: '平台数据',
}, },
{ {
title: '建议反馈', title: '建议反馈',
...@@ -333,10 +333,14 @@ export default { ...@@ -333,10 +333,14 @@ export default {
this.$router.push({ name: 'orderCenter' }) this.$router.push({ name: 'orderCenter' })
break; break;
case 4: case 4:
// this.$router.push({ name: 'miniProgram' }) this.$router.push({ name: 'dataBase' })
break; break;
case 5: case 5:
this.$router.push({ name: 'message' }) this.$notify({
message: '该功能暂未开放',
type: 'warning'
});
// this.$router.push({ name: 'message' })
break; break;
} }
}, },
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
tableData: [] tableData: []
} }
}, },
mounted() { activated() {
this.getList(1); this.getList(1);
}, },
watch: { watch: {
...@@ -118,29 +118,11 @@ export default { ...@@ -118,29 +118,11 @@ export default {
getNoticeList(data).then(res => { getNoticeList(data).then(res => {
this.currentPage = 1; this.currentPage = 1;
this.total = 0; this.total = 0;
this.tableData = [ if (res.error == 0 && res.data) {
{ this.currentPage = val;
attach: "W4VAI56js5r611s99satp3bbIh1TIRs6", this.total = res.data.count;
category: 4, this.tableData = res.data.item;
content: "您好,教培行业整体解决方案上线,详细请咨询客户经理!", }
created_at: "2021-07-01 07:17:42",
industry: "ADVANCED",
is_read: "1",
origin_unique_id: "26",
post_time: "2021-07-01 07:17",
role: "BUSINESS",
scene: "SYSTEM_UPGRADE",
title: "系统升级",
type: "LESTORE_NOTICE",
unique_id: "8B927B78-21BB-5C01-33AD-8CDCF3DEF27B",
}
];
// if (res.error == 0 && res.data) {
// this.currentPage = val;
// this.total = res.data.count;
// this.tableData = res.data.item;
// }
}) })
} }
} }
......
...@@ -695,7 +695,7 @@ export default { ...@@ -695,7 +695,7 @@ export default {
return this.dataInfos.ordersMoney_month - this.dataInfos.sumMoney_month; return this.dataInfos.ordersMoney_month - this.dataInfos.sumMoney_month;
}, },
}, },
created() { activated() {
//当日数据 //当日数据
this.getViewData(); this.getViewData();
// 当月数据 // 当月数据
......
...@@ -3,34 +3,34 @@ ...@@ -3,34 +3,34 @@
<search-form :searchForm="formItems" :searchData="searchData" @search="serachHandle"> <search-form :searchForm="formItems" :searchData="searchData" @search="serachHandle">
</search-form> </search-form>
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common">
<el-table v-loading="tableDataLoading" :data="tableData.records"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 --> <!-- ele 暂无数据插槽 -->
<template slot="empty"> <template slot="empty">
<TableEmpty /> <TableEmpty />
</template> </template>
<el-table-column prop="id" label="金额"> <el-table-column prop="amount" label="金额" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="变化前"> <el-table-column prop="beforeAmount" label="变化前" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column> </el-table-column>
<el-table-column prop="phone" label="变化后"> <el-table-column prop="afterAmount" label="变化后" :formatter="(row, column) => tableFormatter(row, column, null, '元')">
</el-table-column> </el-table-column>
<el-table-column prop="type" label="类型"> <el-table-column prop="type" label="类型">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type == 1"><span class="badge—common primary"></span>订单支付</span> <span v-if="scope.row.type == 0"><span class="badge—common primary"></span>订单支付</span>
<span v-if="scope.row.type == 2"><span class="badge—common"></span>订单退款</span> <span v-if="scope.row.type == 1"><span class="badge—common"></span>订单退款</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ordersNo" label="订单号"> <el-table-column prop="orderNo" label="订单号">
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注"> <el-table-column prop="remark" label="备注">
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间"> <el-table-column prop="createdAt" label="创建时间">
</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 @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[5, 10, 15]" :page-size="size" :current-page="page" :page-sizes="[5, 10, 15]" :page-size="size" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.total"> layout="total,sizes, prev, pager, next,jumper" :total="totalnum">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
...@@ -46,7 +46,6 @@ export default { ...@@ -46,7 +46,6 @@ export default {
}, },
data() { data() {
return { return {
activeName: 'first',
size: 10, size: 10,
page: 1, page: 1,
totalnum: 0, totalnum: 0,
...@@ -65,11 +64,11 @@ export default { ...@@ -65,11 +64,11 @@ export default {
options: [ options: [
{ {
label: '订单支付', label: '订单支付',
value: 1, value: 0,
}, },
{ {
label: '订单退款', label: '订单退款',
value: 2, value: 1,
}, },
], ],
}, },
...@@ -105,20 +104,21 @@ export default { ...@@ -105,20 +104,21 @@ export default {
getTableData() { getTableData() {
this.tableDataLoading = true this.tableDataLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('Details/selectCouponList'), url: this.$http.adornUrl('expressageAccount/logs'),
method: 'get', method: 'post',
params: this.$http.adornParams({ data: this.$http.adornData({
'page': this.page, 'page': this.page,
'limit': this.size, 'pageSize': this.size,
...this.searchData ...this.searchData
}) })
}).then(({ }).then(({
data data
}) => { }) => {
this.tableDataLoading = false
let tableData = data.data let tableData = data.data
this.tableData = tableData this.tableData = tableData
this.totalnum = tableData.totalCount this.totalnum = tableData.totalCount
}).finally(() => {
this.tableDataLoading = false
}) })
}, },
// 复制 // 复制
...@@ -133,8 +133,21 @@ export default { ...@@ -133,8 +133,21 @@ export default {
_this.$message.error('复制失败'); _this.$message.error('复制失败');
}) })
}, },
// 表格数据格式化
tableFormatter(row, column, type, unit) {
if (!this.isEmpty(row[column.property])) {
switch (type) {
case 'datetime':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
case 'date':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default:
return unit ? row[column.property] + unit : row[column.property]
}
}
},
}, },
created() { activated() {
this.getTableData() this.getTableData()
} }
}; };
......
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
} }
} }
}, },
mounted() { activated() {
this.getTableData("POST", res => { this.getTableData("POST", res => {
this.saveTableData(res); this.saveTableData(res);
}); });
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<el-table-column prop="tradeNo" label="充值编号"> <el-table-column prop="tradeNo" label="充值编号">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.tradeNo }}</span> <span>{{ scope.row.tradeNo }}</span>
<span @click="copys(scope.row.tradeNo)" class="copy_icon"> <span v-if="scope.row.tradeNo" @click="copys(scope.row.tradeNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.tradeNo" class="el-icon-copy-document"></i> <i class="el-icon-document-copy"></i>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
<span v-if="scope.row.state == 1"><span class="badge—common success"></span>已付款</span> <span v-if="scope.row.state == 1"><span class="badge—common success"></span>已付款</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="pay_channel" label="充值渠道"> <!-- <el-table-column prop="pay_channel" label="充值渠道">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.pay_channel == 'wechat'"> <span v-if="scope.row.pay_channel == 'wechat'">
<span class="badge—common success"></span> <span class="badge—common success"></span>
微信 微信
</span> </span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column prop="createdAt" label="创建时间" <el-table-column prop="createdAt" label="创建时间"
:formatter="(row, column) => tableFormatter(row, column, 'datetime')"> :formatter="(row, column) => tableFormatter(row, column, 'datetime')">
</el-table-column> </el-table-column>
...@@ -107,17 +107,17 @@ export default { ...@@ -107,17 +107,17 @@ export default {
}, },
], ],
}, },
{ // {
label: '充值渠道', // label: '充值渠道',
prop: 'pay_channel', // prop: 'pay_channel',
type: 'Select', // type: 'Select',
options: [ // options: [
{ // {
label: '微信', // label: '微信',
value: 'wechat', // value: 'wechat',
}, // },
], // ],
}, // },
], ],
money: 0, money: 0,
tradeNo: '', tradeNo: '',
......
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
}) })
}, },
}, },
created() { activated() {
this.getTableData() this.getTableData()
} }
}; };
......
...@@ -1004,33 +1004,33 @@ export default { ...@@ -1004,33 +1004,33 @@ export default {
this.rechargeSelectYhq() this.rechargeSelectYhq()
}, },
handleClick(tab, event) { handleClick(tab, event) {
if (tab._props.label == '提现管理') { if (tab.name == 'first') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.dataSelect() this.dataSelect()
} }
if (tab._props.label == '收入统计') { if (tab.name == 'sixth') {
this.flag = 1 this.flag = 1
this.incomeSelect() this.incomeSelect()
} }
if (tab._props.label == '会员开通统计') { if (tab.name == 'vip') {
this.flag = 1 this.flag = 1
this.rechSelect() this.rechSelect()
} }
if (tab._props.label == '优惠券购买统计') { if (tab.name == 'youhuiquan') {
this.flag = 1 this.flag = 1
this.rechSelectYhq() this.rechSelectYhq()
} }
if (tab._props.label == '提现统计') { if (tab.name == 'third') {
this.flag = 1 this.flag = 1
this.withdrawSelect() this.withdrawSelect()
} }
if (tab._props.label == '会员开通记录') { if (tab.name == 'fourth') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.rechargeSelect() this.rechargeSelect()
} }
if (tab._props.label == '优惠券购买记录') { if (tab.name == 'youhuiquanL') {
this.page = 1 this.page = 1
this.limit = 10 this.limit = 10
this.rechargeSelectYhq() this.rechargeSelectYhq()
...@@ -1393,8 +1393,8 @@ export default { ...@@ -1393,8 +1393,8 @@ export default {
}) })
}, },
}, },
mounted() { activated() {
this.dataSelect() this.handleClick({name: this.activeName})
} }
} }
</script> </script>
......
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
}) })
}, },
}, },
created() { activated() {
this.getTableData() this.getTableData()
} }
}; };
......
...@@ -51,7 +51,6 @@ export default { ...@@ -51,7 +51,6 @@ export default {
} }
}, },
created() { created() {
console.log(this.mainTabs)
}, },
computed: { computed: {
documentClientHeight: { documentClientHeight: {
...@@ -89,13 +88,13 @@ export default { ...@@ -89,13 +88,13 @@ export default {
}, },
// tabs, 删除tab // tabs, 删除tab
removeTabHandle(tabName) { removeTabHandle(tabName) {
let isHome = find(this.mainTabs, { name: 'home' }) // let isHome = find(this.mainTabs, { name: 'home' })
if (isHome) { // if (isHome) {
this.mainTabs = [isHome] // this.mainTabs = [isHome]
this.menuActiveName = 'home' // this.menuActiveName = 'home'
this.$router.push({ path: '/' }) // this.$router.push({ path: '/' })
return // return
} // }
this.mainTabs = this.mainTabs.filter(item => item.name !== tabName) this.mainTabs = this.mainTabs.filter(item => item.name !== tabName)
if (this.mainTabs.length >= 1) { if (this.mainTabs.length >= 1) {
// 当前选中tab被删除 // 当前选中tab被删除
......
...@@ -10,14 +10,16 @@ ...@@ -10,14 +10,16 @@
<el-table-column prop="trade_no" label="订单号" min-width="180px"> <el-table-column prop="trade_no" label="订单号" min-width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.trade_no }}</span> <span>{{ scope.row.trade_no }}</span>
<span @click="copys(scope.row.trade_no)" class="copy_icon"> <span v-if="scope.row.trade_no" @click="copys(scope.row.trade_no)" class="copy_icon">
<i name="bianji" v-if="scope.row.trade_no" class="el-icon-copy-document"></i> <i class="el-icon-document-copy"></i>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="名称"> <!-- <el-table-column prop="name" label="名称">
</el-table-column> -->
<el-table-column prop="remark" label="套餐" :formatter="(row, column) => tableFormatter(row, column, null, '次')">
</el-table-column> </el-table-column>
<el-table-column prop="tc" label="套餐" :formatter="(row, column) => tableFormatter(row, column, null, '次')"> <el-table-column prop="amount" label="套餐次数" :formatter="(row, column) => tableFormatter(row, column, null, '次')">
</el-table-column> </el-table-column>
<el-table-column prop="used" label="已使用" :formatter="(row, column) => tableFormatter(row, column, null, '次')"> <el-table-column prop="used" label="已使用" :formatter="(row, column) => tableFormatter(row, column, null, '次')">
</el-table-column> </el-table-column>
...@@ -64,7 +66,7 @@ export default { ...@@ -64,7 +66,7 @@ export default {
tableData: [], tableData: [],
searchData: { searchData: {
trade_no: '', //订单号 trade_no: '', //订单号
name: '', //名称 remark: '', //套餐
state: null, //状态 state: null, //状态
}, },
formItems: [ formItems: [
...@@ -74,8 +76,8 @@ export default { ...@@ -74,8 +76,8 @@ export default {
type: 'Input', type: 'Input',
}, },
{ {
label: '名称', label: '套餐',
prop: 'name', prop: 'remark',
type: 'Input', type: 'Input',
}, },
{ {
......
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
console.log(value) console.log(value)
} }
}, },
created() { activated() {
this.getTableData() this.getTableData()
} }
}; };
......
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
this.getTableData(); this.getTableData();
} }
}, },
created() { activated() {
this.getTableData() this.getTableData()
} }
}; };
......
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
console.log(value) console.log(value)
} }
}, },
created() { activated() {
this.getTableData() this.getTableData()
} }
}; };
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<div class="logistics_bottom"> <div class="logistics_bottom">
<div class="price"> <div class="price">
<span>50元 / 10000</span> <span>{{ packageChecked.price }}元 / {{ packageChecked.amount }}</span>
</div> </div>
<div class="right"> <div class="right">
<el-button class="btn" type="primary" size="mini" <el-button class="btn" type="primary" size="mini"
...@@ -65,17 +65,20 @@ ...@@ -65,17 +65,20 @@
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center;">
<!-- <el-avatar class="checkcard-avatar" shape="square" :size="48" <!-- <el-avatar class="checkcard-avatar" shape="square" :size="48"
:src="item.pay_icon" fit="cover"></el-avatar> --> :src="item.pay_icon" fit="cover"></el-avatar> -->
<svg style="width: 48px;height: 48px" t="1682219172782" class="icon" viewBox="0 0 1068 1024" version="1.1" <!-- <svg style="width: 48px;height: 48px" t="1682219172782" class="icon" viewBox="0 0 1068 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="1151" width="64" height="64"> xmlns="http://www.w3.org/2000/svg" p-id="1151" width="64" height="64">
<path d="M3.710145 0h1024v1024H3.710145z" fill="#D8D8D8" fill-opacity="0" <path d="M3.710145 0h1024v1024H3.710145z" fill="#D8D8D8" fill-opacity="0"
p-id="1152"></path> p-id="1152"></path>
<path <path
d="M402.216812 278.229333h215.296c66.56 0 117.418667-151.893333 117.418666-151.893333 0-45.525333-4.309333-79.957333-78.293333-82.346667-73.984-2.432-91.690667 54.357333-144.853333 54.357334-54.442667 0-81.706667-44.672-148.736-54.4-66.986667-9.685333-78.293333 36.864-78.293334 82.389333 0 0 50.773333 151.893333 117.461334 151.893333z m227.029333 46.976H402.216812C150.782145 325.205333 89.043478 844.586667 89.043478 844.586667 89.043478 912.853333 141.608812 981.333333 206.462145 981.333333h618.496C889.811478 981.333333 942.376812 912.810667 942.376812 844.586667c0 0-61.738667-519.381333-313.130667-519.381334z m25.770667 399.189334c15.189333 0 27.477333 12.928 27.477333 28.842666 0 15.957333-12.288 28.885333-27.477333 28.885334h-111.36v75.690666a29.226667 29.226667 0 0 1-13.397334 25.770667 26.282667 26.282667 0 0 1-27.946666 0 29.226667 29.226667 0 0 1-13.44-25.770667v-75.690666H376.830145c-15.189333 0-27.477333-12.928-27.477333-28.885334 0-15.914667 12.288-28.842667 27.477333-28.842666h112.042667v-36.650667H376.830145c-15.189333 0-27.477333-12.928-27.477333-28.842667 0-15.957333 12.288-28.842667 27.477333-28.842666h75.733333L375.038145 485.12a29.696 29.696 0 0 1 10.666667-38.229333 26.666667 26.666667 0 0 1 36.821333 9.386666l93.354667 173.781334h4.693333l93.397333-173.781334a26.709333 26.709333 0 0 1 37.461334-10.538666c13.141333 7.978667 17.621333 25.6 10.026666 39.381333l-77.525333 144.938667h71.082667c15.189333 0 27.477333 12.928 27.477333 28.842666 0 15.957333-12.288 28.885333-27.477333 28.885334h-111.36v36.608h111.36z" d="M402.216812 278.229333h215.296c66.56 0 117.418667-151.893333 117.418666-151.893333 0-45.525333-4.309333-79.957333-78.293333-82.346667-73.984-2.432-91.690667 54.357333-144.853333 54.357334-54.442667 0-81.706667-44.672-148.736-54.4-66.986667-9.685333-78.293333 36.864-78.293334 82.389333 0 0 50.773333 151.893333 117.461334 151.893333z m227.029333 46.976H402.216812C150.782145 325.205333 89.043478 844.586667 89.043478 844.586667 89.043478 912.853333 141.608812 981.333333 206.462145 981.333333h618.496C889.811478 981.333333 942.376812 912.810667 942.376812 844.586667c0 0-61.738667-519.381333-313.130667-519.381334z m25.770667 399.189334c15.189333 0 27.477333 12.928 27.477333 28.842666 0 15.957333-12.288 28.885333-27.477333 28.885334h-111.36v75.690666a29.226667 29.226667 0 0 1-13.397334 25.770667 26.282667 26.282667 0 0 1-27.946666 0 29.226667 29.226667 0 0 1-13.44-25.770667v-75.690666H376.830145c-15.189333 0-27.477333-12.928-27.477333-28.885334 0-15.914667 12.288-28.842667 27.477333-28.842666h112.042667v-36.650667H376.830145c-15.189333 0-27.477333-12.928-27.477333-28.842667 0-15.957333 12.288-28.842667 27.477333-28.842666h75.733333L375.038145 485.12a29.696 29.696 0 0 1 10.666667-38.229333 26.666667 26.666667 0 0 1 36.821333 9.386666l93.354667 173.781334h4.693333l93.397333-173.781334a26.709333 26.709333 0 0 1 37.461334-10.538666c13.141333 7.978667 17.621333 25.6 10.026666 39.381333l-77.525333 144.938667h71.082667c15.189333 0 27.477333 12.928 27.477333 28.842666 0 15.957333-12.288 28.885333-27.477333 28.885334h-111.36v36.608h111.36z"
fill="#4A90E2" p-id="1153"></path> fill="#4A90E2" p-id="1153"></path>
<!-- <path </svg> -->
d="M844.243478 883.2m-42.666666 0a42.666667 42.666667 0 1 0 85.333333 0 42.666667 42.666667 0 1 0-85.333333 0Z" <div style="display: flex; align-items: center;margin-right: 5px;">
fill="#E02020" p-id="1154"></path> --> <img style="width: 20px;height: 20px;margin-right: 2px;"
</svg> src="../../assets/img/wPay2.png" alt="">
<img style="width: 20px;height: 20px" src="../../assets/img/aliPay2.png"
alt="">
</div>
<div class="checkcard-title"> <div class="checkcard-title">
{{ item.pay_title }} {{ item.pay_title }}
</div> </div>
...@@ -113,7 +116,8 @@ ...@@ -113,7 +116,8 @@
<div style="margin-top: 20px;display: flex;flex-direction: row;"> <div style="margin-top: 20px;display: flex;flex-direction: row;">
<img src="../../assets/wechat/WeChatPay.png" style="margin-right: 5px;" /> <img src="../../assets/wechat/WeChatPay.png" style="margin-right: 5px;" />
微信支付 微信支付
<img width="16px" height="16px" src="../../assets/wechat/aliPay.png" style="margin-right: 5px;margin-left: 10px;" /> <img width="16px" height="16px" src="../../assets/wechat/aliPay.png"
style="margin-right: 5px;margin-left: 10px;" />
支付宝 支付宝
</div> </div>
<p style="font-size: 20px;margin: 20px 0;">扫一扫完成支付</p> <p style="font-size: 20px;margin: 20px 0;">扫一扫完成支付</p>
...@@ -172,7 +176,6 @@ export default { ...@@ -172,7 +176,6 @@ export default {
}, },
// 立即购买 // 立即购买
buyClick() { buyClick() {
this.getPackageList()
this.dialogVisible = true this.dialogVisible = true
}, },
// 资源包列表 // 资源包列表
...@@ -180,7 +183,7 @@ export default { ...@@ -180,7 +183,7 @@ export default {
packageListAPI().then((res) => { packageListAPI().then((res) => {
if (res.error == 0) { if (res.error == 0) {
this.packageList = res.data || [] this.packageList = res.data || []
if(this.packageList.length > 0) { if (this.packageList.length > 0) {
this.packageChecked = this.packageList[0] this.packageChecked = this.packageList[0]
this.price = this.packageChecked.price this.price = this.packageChecked.price
} }
...@@ -194,7 +197,7 @@ export default { ...@@ -194,7 +197,7 @@ export default {
}, },
// 确认订购 // 确认订购
payGo(row) { payGo(row) {
if(!this.packageChecked.id) { if (!this.packageChecked.id) {
this.$message.error('请选择订购套餐'); this.$message.error('请选择订购套餐');
return; return;
} }
...@@ -243,7 +246,8 @@ export default { ...@@ -243,7 +246,8 @@ export default {
} }
} }
}, },
created() { activated() {
this.getPackageList()
} }
}; };
</script> </script>
......
...@@ -323,7 +323,7 @@ export default { ...@@ -323,7 +323,7 @@ export default {
}) })
}, },
}, },
mounted() { activated() {
this.dataSelect() this.dataSelect()
} }
}; };
......
...@@ -709,7 +709,7 @@ export default { ...@@ -709,7 +709,7 @@ export default {
}); });
} }
}, },
created() { activated() {
this.getList(); this.getList();
this.getDoAuthUrl(); this.getDoAuthUrl();
// this.getStoreInfo(); // this.getStoreInfo();
...@@ -717,8 +717,6 @@ export default { ...@@ -717,8 +717,6 @@ export default {
// this.isAdmin = getMallInfo().mall_payment == "1" ? true : false; // this.isAdmin = getMallInfo().mall_payment == "1" ? true : false;
// } // }
}, },
mounted() {
}
} }
</script> </script>
......
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
width="160" width="160"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="!isAuth('sys:menu:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.menuId)">修改</el-button> <el-button :disabled="!isAuth('sys:menu:update')" type="primary" size="mini" @click="addOrUpdateHandle(scope.row.menuId)">修改</el-button>
<el-button class="text-danger" :disabled="!isAuth('sys:menu:delete')" type="text" size="small" @click="deleteHandle(scope.row.menuId)">删除</el-button> <el-button class="text-danger" :disabled="!isAuth('sys:menu:delete')" type="danger" size="mini" @click="deleteHandle(scope.row.menuId)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
</el-table-column> </el-table-column>
<el-table-column fixed="right" header-align="center" align="center" width="160" label="操作"> <el-table-column fixed="right" header-align="center" align="center" width="160" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="!isAuth('sys:role:update')" type="text" size="small" <el-button :disabled="!isAuth('sys:role:update')" type="primary" size="mini"
@click="addOrUpdateHandle(scope.row.roleId)">修改</el-button> @click="addOrUpdateHandle(scope.row.roleId)">修改</el-button>
<el-button class="text-danger" :disabled="!isAuth('sys:role:delete')" type="text" size="small" <el-button class="text-danger" :disabled="!isAuth('sys:role:delete')" type="danger" size="mini"
@click="deleteHandle(scope.row.roleId)">删除</el-button> @click="deleteHandle(scope.row.roleId)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-link :underline="false" @click="updates(scope.row)">{{ scope.row.ordersNo }}</el-link> <el-link :underline="false" @click="updates(scope.row)">{{ scope.row.ordersNo }}</el-link>
<span @click="copys(scope.row.ordersNo)" class="copy_icon"> <span @click="copys(scope.row.ordersNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.ordersNo" class="el-icon-copy-document"></i> <i v-if="scope.row.ordersNo" class="el-icon-document-copy"></i>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<el-table-column prop="ordersNo" label="订单编号" width="220px"> <el-table-column prop="ordersNo" label="订单编号" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link :underline="false" @click="updates(scope.row)">{{ scope.row.ordersNo }}</el-link> <el-link :underline="false" @click="updates(scope.row)">{{ scope.row.ordersNo }}</el-link>
<span @click="copys(scope.row.ordersNo)" class="copy_icon"> <span v-if="scope.row.ordersNo" @click="copys(scope.row.ordersNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.ordersNo" class="el-icon-copy-document"></i> <i class="el-icon-document-copy"></i>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
scope.row.goodsVolumeHeight || 0 }}cm</span> scope.row.goodsVolumeHeight || 0 }}cm</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="类型"> <!-- <el-table-column prop="type" label="类型">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.type == 1"><span class="badge—common success"></span>超轻</div> <div v-if="scope.row.type == 1"><span class="badge—common success"></span>超轻</div>
<div v-if="scope.row.type == 2"><span class="badge—common danger"></span>超重</div> <div v-if="scope.row.type == 2"><span class="badge—common danger"></span>超重</div>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column prop="goodsImage" label="寄件图片"> <el-table-column prop="goodsImage" label="寄件图片">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.goodsImage"> <span v-if="scope.row.goodsImage">
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
ordersNo: '', //订单号 ordersNo: '', //订单号
parentParentName: '', //物流单号 parentParentName: '', //物流单号
haoCaiStatus: '', //处理状态 haoCaiStatus: '', //处理状态
type: '', //类型 // type: '', //类型
}, },
formItems: [ formItems: [
{ {
...@@ -108,22 +108,22 @@ export default { ...@@ -108,22 +108,22 @@ export default {
prop: 'parentParentName', prop: 'parentParentName',
type: 'Input', type: 'Input',
}, },
{ // {
label: '类型', // label: '类型',
prop: 'type', // prop: 'type',
type: 'Select', // type: 'Select',
placeholder: '请选择', // placeholder: '请选择',
options: [ // options: [
{ // {
label: '超重', // label: '超重',
value: '0' // value: '0'
}, // },
{ // {
label: '超轻', // label: '超轻',
value: '1' // value: '1'
}, // },
] // ]
}, // },
{ {
label: '处理状态', label: '处理状态',
prop: 'haoCaiStatus', prop: 'haoCaiStatus',
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
this.page = val; this.page = val;
this.getTableData() this.getTableData()
}, },
//获取已发布优惠券数据 //获取数据
getTableData() { getTableData() {
this.tableDataLoading = true this.tableDataLoading = true
selectWeightErrorExpressageListAPI({ selectWeightErrorExpressageListAPI({
...@@ -212,11 +212,11 @@ export default { ...@@ -212,11 +212,11 @@ export default {
tableFormatter(row, column, type, unit) { tableFormatter(row, column, type, unit) {
switch (type) { switch (type) {
case 'datetime': case 'datetime':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property] return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD HH:mm:ss') : row[column.property]
case 'date': case 'date':
return row[column.property] ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property] return !this.isEmpty(row[column.property]) ? moment(row[column.property]).format('YYYY-MM-DD') : row[column.property]
default: default:
return unit && row[column.property] ? row[column.property] + unit : row[column.property] return unit && !this.isEmpty(row[column.property]) ? row[column.property] + unit : row[column.property]
} }
}, },
// 超轻退款 // 超轻退款
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
// 超轻作废 // 超轻作废
cancellation() { } cancellation() { }
}, },
mounted() { activated() {
this.getTableData() this.getTableData()
} }
}; };
......
...@@ -139,8 +139,7 @@ ...@@ -139,8 +139,7 @@
<td class="border-rt"> <td class="border-rt">
<span>{{ scope.row.ordersNo }}</span> <span>{{ scope.row.ordersNo }}</span>
<span @click="copys(scope.row.ordersNo)" class="copy_icon"> <span @click="copys(scope.row.ordersNo)" class="copy_icon">
<i name="bianji" v-if="scope.row.ordersNo" <i class="el-icon-document-copy"></i>
class="el-icon-copy-document"></i>
</span> </span>
</td> </td>
</tr> </tr>
...@@ -151,9 +150,9 @@ ...@@ -151,9 +150,9 @@
target="_blank" class="page-scroll" v-if="scope.row.expressageNo">{{ target="_blank" class="page-scroll" v-if="scope.row.expressageNo">{{
scope.row.expressageNo }}</a> scope.row.expressageNo }}</a>
<span v-else> - </span> <span v-else> - </span>
<span @click="copys(scope.row.expressageNo)" class="copy_icon"> <span v-show="scope.row.expressageNo" @click="copys(scope.row.expressageNo)"
<i name="bianji" v-if="scope.row.expressageNo" class="copy_icon">
class="el-icon-copy-document"></i> <i class="el-icon-document-copy"></i>
</span> </span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> --> <!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td> </td>
...@@ -165,9 +164,9 @@ ...@@ -165,9 +164,9 @@
class="page-scroll" v-if="scope.row.waybill">{{ class="page-scroll" v-if="scope.row.waybill">{{
scope.row.waybill }}</a> scope.row.waybill }}</a>
<span v-else> - </span> <span v-else> - </span>
<span @click="copys(scope.row.waybill)" class="copy_icon"> <span v-if="scope.row.waybill" @click="copys(scope.row.waybill)"
<i name="bianji" v-if="scope.row.waybill" class="copy_icon">
class="el-icon-copy-document"></i> <i class="el-icon-document-copy"></i>
</span> </span>
<!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> --> <!-- <icon-svg name="bianji" class="el-icon-document-copy" style="color: var(--primary-color);"></icon-svg> -->
</td> </td>
...@@ -186,7 +185,8 @@ ...@@ -186,7 +185,8 @@
</tr> </tr>
<tr> <tr>
<th class="border-bt">快递员</th> <th class="border-bt">快递员</th>
<td class="border-bt border-rt"><span style="cursor: pointer;color: var(--primary-color);" <td class="border-bt border-rt"><span
style="cursor: pointer;color: var(--primary-color);"
@click="dataDel(scope.row, 1)">{{ scope.row.expressageName ? @click="dataDel(scope.row, 1)">{{ scope.row.expressageName ?
scope.row.expressageName : '-' }}</span> scope.row.expressageName : '-' }}</span>
<span style="cursor: pointer;color: var(--primary-color);" <span style="cursor: pointer;color: var(--primary-color);"
...@@ -216,9 +216,9 @@ ...@@ -216,9 +216,9 @@
<th>手机号</th> <th>手机号</th>
<td class="border-rt"> <td class="border-rt">
{{ scope.row.senderPhone }} {{ scope.row.senderPhone }}
<span @click="copys(scope.row.senderPhone)" class="copy_icon"> <span v-if="scope.row.senderPhone" @click="copys(scope.row.senderPhone)"
<i name="bianji" v-if="scope.row.senderPhone" class="copy_icon">
class="el-icon-copy-document"></i> <i class="el-icon-document-copy"></i>
</span> </span>
</td> </td>
</tr> </tr>
...@@ -233,9 +233,9 @@ ...@@ -233,9 +233,9 @@
<tr> <tr>
<th>手机号</th> <th>手机号</th>
<td class="border-rt">{{ scope.row.receiverPhone }} <td class="border-rt">{{ scope.row.receiverPhone }}
<span @click="copys(scope.row.receiverPhone)" class="copy_icon"> <span v-if="scope.row.receiverPhone" @click="copys(scope.row.receiverPhone)"
<i name="bianji" v-if="scope.row.receiverPhone" class="copy_icon">
class="el-icon-copy-document"></i> <i class="el-icon-document-copy"></i>
</span> </span>
</td> </td>
</tr> </tr>
...@@ -558,7 +558,7 @@ ...@@ -558,7 +558,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;float:right"> <div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount"> layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
...@@ -599,7 +599,8 @@ ...@@ -599,7 +599,8 @@
<div class="box_num"> <div class="box_num">
<div class="box_color">寄件人昵称</div> <div class="box_color">寄件人昵称</div>
<div class="text_color"> <div class="text_color">
<span style="cursor: pointer;color: var(--primary-color);" @click="updates(detaDatle.userId)">{{ <span style="cursor: pointer;color: var(--primary-color);"
@click="updates(detaDatle.userId)">{{
detaDatle.userName ? detaDatle.userName : '-' }}</span> detaDatle.userName ? detaDatle.userName : '-' }}</span>
</div> </div>
</div> </div>
...@@ -1569,12 +1570,12 @@ export default { ...@@ -1569,12 +1570,12 @@ export default {
}).then(({ }).then(({
data data
}) => { }) => {
console.log(data)
if (data && data.code === 0) { if (data && data.code === 0) {
this.tableDataLoading = false
let returnData = data.data let returnData = data.data
this.tableData = returnData this.tableData = returnData
} }
}).finally(() => {
this.tableDataLoading = false
}) })
}, },
// 详情跳转 // 详情跳转
...@@ -1882,8 +1883,6 @@ export default { ...@@ -1882,8 +1883,6 @@ export default {
if (data.code == 0) { if (data.code == 0) {
this.wuliuDate = data.data; this.wuliuDate = data.data;
this.dialogVisible = true this.dialogVisible = true
} else {
this.$message(data.msg);
} }
}) })
...@@ -2071,15 +2070,13 @@ export default { ...@@ -2071,15 +2070,13 @@ export default {
}, },
}, },
created() { activated() {
let ordersNo = this.$route.query.ordersNo || '' let ordersNo = this.$route.query.ordersNo || ''
this.searchData.ordersNo = ordersNo; this.searchData.ordersNo = ordersNo;
this.animeDat(); this.animeDat();
this.kuaid()
}, },
mounted() { mounted() {
this.tableDataLoading = false
this.dataSelect()
this.kuaid()
} }
} }
</script> </script>
......
...@@ -16,13 +16,21 @@ export default { ...@@ -16,13 +16,21 @@ export default {
components: { components: {
sysSetTable sysSetTable
}, },
watch: {
tabName(val) {
if (val == 'kefu') {
this.getData()
}
}
},
data() { data() {
return { return {
tableDataLoading: false, tableDataLoading: false,
tableData: [], tableData: [],
} }
}, },
created() { activated() {
if (this.tabName == 'kefu')
this.getData(); this.getData();
}, },
methods: { methods: {
......
...@@ -5,25 +5,29 @@ ...@@ -5,25 +5,29 @@
<div style="width: 50%;margin: 0 auto;"> <div style="width: 50%;margin: 0 auto;">
<el-form ref="form" :model="ruleForm" label-width="150px" size="mini"> <el-form ref="form" :model="ruleForm" label-width="150px" size="mini">
<el-form-item label="下单提示弹框"> <el-form-item label="下单提示弹框">
<el-switch v-model="ruleForm.form1"></el-switch> <el-switch v-model="ruleForm.needPop" :active-value="1" :inactive-value="0"></el-switch>
<div class="form_item_explain"> <div class="form_item_explain">
<div>开启后,用户下单时候会有弹框提示</div> <div>开启后,用户下单时候会有弹框提示</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="弹框标题"> <el-form-item label="弹框标题">
<el-input v-model="ruleForm.form2" clearable></el-input> <el-input v-model="ruleForm.title" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="弹框内容"> <el-form-item label="弹框内容">
<el-input type="textarea" v-model="ruleForm.form3" :autosize="{ minRows: 3, maxRows: 3}"></el-input> <el-input type="textarea" v-model="ruleForm.content"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="重货弹框内容"> <el-form-item label="重货弹框内容">
<el-input type="textarea" v-model="ruleForm.form4" :autosize="{ minRows: 3, maxRows: 3}"></el-input> <el-input type="textarea" v-model="ruleForm.hiveWeightContent"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="快递下单上方提示语"> <el-form-item label="快递下单上方提示语">
<el-input type="textarea" v-model="ruleForm.form5" :autosize="{ minRows: 3, maxRows: 3}"></el-input> <el-input type="textarea" v-model="ruleForm.kdUpNotice"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="重物下单上方提示语"> <el-form-item label="重物下单上方提示语">
<el-input type="textarea" v-model="ruleForm.form6" :autosize="{ minRows: 3, maxRows: 3}"></el-input> <el-input type="textarea" v-model="ruleForm.hiveWeightUpNotice"
:autosize="{ minRows: 3, maxRows: 3 }"></el-input>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="submit">提交</el-button> <el-button type="primary" @click="submit">提交</el-button>
...@@ -54,12 +58,12 @@ export default { ...@@ -54,12 +58,12 @@ export default {
return { return {
loading: true, loading: true,
ruleForm: { ruleForm: {
form1: false, //下单提示框是否开启 needPop: 0, //下单提示框是否开启
form2: '', //弹框标题 title: '', //弹框标题
form3: '', //弹框内容 content: '', //弹框内容
form4: '', //重货弹框内容 hiveWeightContent: '', //重货弹框内容
form5: '', //快递下单上方提示语 kdUpNotice: '', //快递下单上方提示语
form6: '', //重物下单上方提示语 hiveWeightUpNotice: '', //重物下单上方提示语
}, },
} }
}, },
...@@ -67,15 +71,15 @@ export default { ...@@ -67,15 +71,15 @@ export default {
// 获取数据 // 获取数据
getData() { getData() {
this.$http({ this.$http({
url: this.$http.adornUrl(`common/type/condition/kefu`), url: this.$http.adornUrl(`orderNotice/detail`),
method: 'get', method: 'get',
params: this.$http.adornParams({}) params: this.$http.adornParams({})
}).then(({ }).then(({
data data
}) => { }) => {
if (data && data.code === 0) { if (data && data.error === 0 && data.code === 0) {
this.loading = false this.loading = false
this.ruleForm = { ...data.data }
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
...@@ -84,9 +88,30 @@ export default { ...@@ -84,9 +88,30 @@ export default {
// 提交 // 提交
submit() { submit() {
console.log(this.ruleForm) console.log(this.ruleForm)
let params = {
needPop: this.ruleForm.needPop,
title: this.ruleForm.title,
content: this.ruleForm.content,
hiveWeightContent: this.ruleForm.hiveWeightContent,
kdUpNotice: this.ruleForm.kdUpNotice,
hiveWeightUpNotice: this.ruleForm.hiveWeightUpNotice,
}
this.$http({
url: this.$http.adornUrl(`orderNotice/save`),
method: 'post',
data: this.$http.adornData(params)
}).then(({
data
}) => {
if (data && data.error === 0 && data.code === 0) {
this.$message.success('操作成功!')
this.getData()
}
})
}, },
}, },
created() { activated() {
if (this.tabName == 'tishi')
this.getData(); this.getData();
}, },
} }
......
...@@ -6,39 +6,41 @@ ...@@ -6,39 +6,41 @@
<span class="card_title">*注:销售比例信息设置,用于总控成本价基础上进行加价。</span> <span class="card_title">*注:销售比例信息设置,用于总控成本价基础上进行加价。</span>
</div> </div>
<div style="width: 50%;margin: 0 auto;"> <div style="width: 50%;margin: 0 auto;">
<el-radio-group v-model="tabPosition" size="small" style="margin-bottom: 30px;"> <el-radio-group v-model="tabPosition" size="small" style="margin-bottom: 30px;" @input="radioChange">
<!-- <el-radio label="jine">金额设置</el-radio> <!-- <el-radio label="jine">金额设置</el-radio>
<el-radio label="bili">比例设置</el-radio> --> <el-radio label="bili">比例设置</el-radio> -->
<el-radio-button label="jine">金额设置</el-radio-button> <el-radio-button label="jine">金额设置</el-radio-button>
<el-radio-button label="bili">比例设置</el-radio-button> <el-radio-button label="bili">比例设置</el-radio-button>
</el-radio-group> </el-radio-group>
<el-form v-if="tabPosition === 'jine'" ref="form" :model="sumForm" label-suffix=" (元)" label-width="150px" size="mini"> <el-form v-if="tabPosition === 'jine'" ref="form" :model="sumForm" label-suffix=" (元)" label-width="150px"
size="mini">
<el-form-item label="首重增加金额"> <el-form-item label="首重增加金额">
<el-input-number v-model="sumForm.first_weight" controls-position="right" <el-input-number v-model="sumForm.first_weight" controls-position="right" :precision="2" :step="0.1"
:precision="2" :step="0.1" :min="0.8"></el-input-number> :min="0.8"></el-input-number>
<div class="form_item_explain"> <div class="form_item_explain">
<div>为避免内耗,首重建议最低加0.8元以上!</div> <div>为避免内耗,首重建议最低加0.8元以上!</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="续重增加金额"> <el-form-item label="续重增加金额">
<el-input-number v-model="sumForm.renew_weight" controls-position="right" :precision="2" <el-input-number v-model="sumForm.renew_weight" controls-position="right" :precision="2" :step="0.1"
:step="0.1" :min="0"></el-input-number> :min="0"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="sumSubmit">提交</el-button> <el-button type="primary" size="small" @click="save(1)">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form v-if="tabPosition === 'bili'" ref="form" :model="ratioForm" label-suffix=" (%)" label-width="150px" size="mini"> <el-form v-if="tabPosition === 'bili'" ref="form" :model="ratioForm" label-suffix=" (%)" label-width="150px"
size="mini">
<el-form-item label="首重增加比例"> <el-form-item label="首重增加比例">
<el-input-number v-model="ratioForm.first_weight" controls-position="right" :precision="2" <el-input-number v-model="ratioForm.first_weight" controls-position="right" :precision="2" :step="1"
:step="1" :min="0"></el-input-number> :min="0"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="续重增加比例"> <el-form-item label="续重增加比例">
<el-input-number v-model="ratioForm.renew_weight" controls-position="right" :precision="2" <el-input-number v-model="ratioForm.renew_weight" controls-position="right" :precision="2" :step="1"
:step="1" :min="0"></el-input-number> :min="0"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="ratioSubmit">提交</el-button> <el-button type="primary" size="small" @click="save(2)">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -58,7 +60,7 @@ export default { ...@@ -58,7 +60,7 @@ export default {
watch: { watch: {
tabName(val) { tabName(val) {
if (val == 'xiaoshou') { if (val == 'xiaoshou') {
this.getSumData() this.getData()
} }
} }
}, },
...@@ -78,9 +80,9 @@ export default { ...@@ -78,9 +80,9 @@ export default {
}, },
methods: { methods: {
// 获取金额数据列表 // 获取金额数据列表
getSumData() { getData() {
this.$http({ this.$http({
url: this.$http.adornUrl(`common/type/condition/kefu`), url: this.$http.adornUrl(`proxy/expressage/priceSetting/detail`),
method: 'get', method: 'get',
params: this.$http.adornParams({}) params: this.$http.adornParams({})
}).then(({ }).then(({
...@@ -88,39 +90,45 @@ export default { ...@@ -88,39 +90,45 @@ export default {
}) => { }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.loading = false this.loading = false
this.sumForm.first_weight = data.data.firstWeightAddPrice || 0
this.sumForm.renew_weight = data.data.xuWeightAddPrice || 0
this.ratioForm.first_weight = data.data.firstWeightAddRate || 0
this.ratioForm.renew_weight = data.data.xuWeightAddRate || 0
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
// 获取比例数据列表 // 设置提交
getRatioData() { save(type) {
let params = {
type,
firstWeightAddPrice: this.sumForm.first_weight,
xuWeightAddPrice: this.sumForm.renew_weight,
firstWeightAddRate: this.ratioForm.first_weight,
xuWeightAddRate: this.ratioForm.renew_weight
}
this.$http({ this.$http({
url: this.$http.adornUrl(`common/type/condition/kefu`), url: this.$http.adornUrl(`proxy/expressage/priceSetting/save`),
method: 'get', method: 'post',
params: this.$http.adornParams({}) data: this.$http.adornData(params)
}).then(({ }).then(({
data data
}) => { }) => {
if (data && data.code === 0) { if (data && data.error === 0 && data.code === 0) {
this.loading = false this.$message.success('操作成功!')
this.getData()
} }
}).catch(() => {
this.loading = false
}) })
}, },
// 金额设置提交 radioChange() {
sumSubmit() { this.getData()
console.log(this.sumForm) }
},
// 比例设置提交
ratioSubmit() {
console.log(this.ratioForm)
},
}, },
created() { activated() {
this.getSumData(); if (this.tabName == 'xiaoshou')
this.getData();
}, },
} }
</script> </script>
...@@ -130,9 +138,11 @@ export default { ...@@ -130,9 +138,11 @@ export default {
/deep/ .el-card__header { /deep/ .el-card__header {
padding: 0; padding: 0;
border: 0; border: 0;
.card_title { .card_title {
font-size: 14px; font-size: 14px;
color: #ff8d03; color: #ff8d03;
} }
} }
}</style> }
\ No newline at end of file </style>
\ No newline at end of file
...@@ -16,13 +16,21 @@ export default { ...@@ -16,13 +16,21 @@ export default {
components: { components: {
sysSetTable sysSetTable
}, },
watch: {
tabName(val) {
if (val == 'kaiguan') {
this.getData()
}
}
},
data() { data() {
return { return {
tableDataLoading: false, tableDataLoading: false,
tableData: [], tableData: [],
} }
}, },
created() { activated() {
if (this.tabName == 'kaiguan')
this.getData(); this.getData();
}, },
methods: { methods: {
......
...@@ -22,7 +22,8 @@ export default { ...@@ -22,7 +22,8 @@ export default {
tableData: [], tableData: [],
} }
}, },
created() { activated() {
if (this.tabName == 'xieyi')
this.getData() this.getData()
}, },
methods: { methods: {
......
...@@ -5,21 +5,22 @@ ...@@ -5,21 +5,22 @@
<div style="width: 50%;margin: 0 auto;"> <div style="width: 50%;margin: 0 auto;">
<el-form ref="form" :model="ruleForm" label-width="150px" size="mini"> <el-form ref="form" :model="ruleForm" label-width="150px" size="mini">
<el-form-item label="关闭渠道"> <el-form-item label="关闭渠道">
<el-select v-model="ruleForm.form1"> <el-select v-model="ruleForm.form1" clearable>
<el-option v-for="(op, index) in options" :key="index" :label="op.label" :value="op.value"></el-option> <el-option v-for="(op, index) in channelList" :key="index" :label="op.expressageCompanyName"
:value="op.expressageCompanyName"></el-option>
</el-select> </el-select>
<div class="form_item_explain"> <div class="form_item_explain">
<div>显示已开通的渠道,并选择关闭那些快递渠道</div> <div>显示已开通的渠道,并选择关闭那些快递渠道</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="申通开通城市"> <el-form-item label="申通开通城市" v-if="ruleForm.form1 == '申通'">
<el-input v-model="ruleForm.form2" clearable placeholder="当申通快递关闭时,可选择开通部分城市"></el-input> <el-input v-model="ruleForm.form2" clearable placeholder="当申通快递关闭时,可选择开通部分城市"></el-input>
<div class="form_item_explain"> <div class="form_item_explain">
<div>例如:北京市|南京市,多个之间用|隔开,留空表示都开启</div> <div>例如:北京市|南京市,多个之间用|隔开,留空表示都开启</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="submit">提交</el-button> <el-button type="primary" @click="submit" size="small">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
</template> </template>
<script> <script>
import { getExpressageCompanySimpleAPI } from '@/api/ldy/home'
export default { export default {
props: { props: {
tabName: { tabName: {
...@@ -39,7 +41,7 @@ export default { ...@@ -39,7 +41,7 @@ export default {
watch: { watch: {
tabName(val) { tabName(val) {
if (val == 'qudao') { if (val == 'qudao') {
this.getData() this.getExpressageCompanySimple()
} }
} }
}, },
...@@ -50,39 +52,35 @@ export default { ...@@ -50,39 +52,35 @@ export default {
form1: '', //关闭渠道 form1: '', //关闭渠道
form2: '', //申通开通城市 form2: '', //申通开通城市
}, },
options: [ channelList: []
{
label: '申通',
value: 1
}
]
} }
}, },
methods: { methods: {
// 获取数据 // 已开通渠道
getData() { getExpressageCompanySimple() {
this.$http({ getExpressageCompanySimpleAPI().then((response) => {
url: this.$http.adornUrl(`common/type/condition/kefu`), let res = response.data
method: 'get', if (res.error == 0 && res.code == 0 && res.data) {
params: this.$http.adornParams({}) this.channelList = res.data
}).then(({
data
}) => {
if (data && data.code === 0) {
this.loading = false
} }
}).catch(() => { }).finally(() => {
this.loading = false this.loading = false
}) })
}, },
// 提交 // 提交
submit() { submit() {
if (!this.ruleForm.form1) {
return this.$message.error('请选择需要关闭的快递渠道!')
}
if (this.ruleForm.form1 == '申通' && !this.ruleForm.form2) {
return this.$message.error('请输入申通快递所开通的城市!')
}
console.log(this.ruleForm) console.log(this.ruleForm)
}, },
}, },
created() { activated() {
this.getData(); if (this.tabName == 'qudao')
this.getExpressageCompanySimple();
}, },
} }
</script> </script>
......
...@@ -22,7 +22,8 @@ export default { ...@@ -22,7 +22,8 @@ export default {
tableData: [], tableData: [],
} }
}, },
created() { activated() {
if (this.tabName == 'fuwufei')
this.getData(); this.getData();
}, },
methods: { methods: {
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
<el-tab-pane label="短信配置" name="duanxin" lazy> <el-tab-pane label="短信配置" name="duanxin" lazy>
<note-setting :tabName="activeName"></note-setting> <note-setting :tabName="activeName"></note-setting>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="公众号通知(订阅消息)通知商家" name="tongzhi" lazy> <!-- <el-tab-pane label="公众号通知(订阅消息)通知商家" name="tongzhi" lazy>
<notice-setting :tabName="activeName"></notice-setting> <notice-setting :tabName="activeName"></notice-setting>
</el-tab-pane> </el-tab-pane> -->
<el-tab-pane label="渠道管理" name="qudao" lazy> <el-tab-pane label="渠道管理" name="qudao" lazy>
<channel-setting :tabName="activeName"></channel-setting> <channel-setting :tabName="activeName"></channel-setting>
</el-tab-pane> </el-tab-pane>
...@@ -65,8 +65,6 @@ export default { ...@@ -65,8 +65,6 @@ export default {
}, },
}, },
created() { created() {
},
mounted() {
this.activeName = 'fuwufei' this.activeName = 'fuwufei'
}, },
}; };
......
...@@ -22,7 +22,8 @@ export default { ...@@ -22,7 +22,8 @@ export default {
tableData: [], tableData: [],
} }
}, },
created() { activated() {
if (this.tabName == 'duanxin')
this.getData(); this.getData();
}, },
methods: { methods: {
......
...@@ -163,6 +163,7 @@ export default { ...@@ -163,6 +163,7 @@ export default {
this.uploadForm.append("mch_id", this.newform.PartnerId); this.uploadForm.append("mch_id", this.newform.PartnerId);
this.uploadForm.append("md5_key", this.newform.PartnerKey); this.uploadForm.append("md5_key", this.newform.PartnerKey);
console.log(this.uploadForm.getAll('mch_id'))
if (this.type == 1) { if (this.type == 1) {
wxpayConfigSave(this.uploadForm).then(res => { wxpayConfigSave(this.uploadForm).then(res => {
if (res.error == 0) { if (res.error == 0) {
......
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
<span class="label">通联支付({{ allConfig }}):</span> <span class="label">通联支付({{ allConfig }}):</span>
<el-switch v-model="UnionPayType" @change="savePayType($event, 'ALLINPAY')"></el-switch> <el-switch v-model="UnionPayType" @change="savePayType($event, 'ALLINPAY')"></el-switch>
</div> --> </div> -->
<div class="switch-type"><span class="label">新申请微信支付({{ is_meepay ? meConfig : fuConfig }}):</span> <!-- <div class="switch-type"><span class="label">新申请微信支付({{ is_meepay ? meConfig : fuConfig }}):</span>
<el-switch v-model="mePayType" @change="savePayType($event, 'MEEPAY')"></el-switch> <el-switch v-model="mePayType" @change="savePayType($event, 'MEEPAY')"></el-switch>
</div> -->
</div>
<div class="switch-type" v-if="is_wxpay"> <div class="switch-type" v-if="is_wxpay">
<span class="label">已有微信支付({{ wxConfig }}):</span> <span class="label">已有微信支付({{ wxConfig }}):</span>
<el-switch v-model="wechatPayType" @change="savePayType($event, 'WXPAY')"></el-switch> <el-switch v-model="wechatPayType" @change="savePayType($event, 'WXPAY')"></el-switch>
...@@ -41,9 +40,9 @@ ...@@ -41,9 +40,9 @@
<!-- <span class="tabs-span" :class="{active:payType==0}" v-if="is_all_config" @click="toggle(0)"> <!-- <span class="tabs-span" :class="{active:payType==0}" v-if="is_all_config" @click="toggle(0)">
通联支付 通联支付
</span> --> </span> -->
<span class="tabs-span" :class="{ active: payType == 1 }" @click="toggle(1)"> <!-- <span class="tabs-span" :class="{ active: payType == 1 }" @click="toggle(1)">
微信支付(新申请) 微信支付(新申请)
</span> </span> -->
<span class="tabs-span" :class="{ active: payType == 2 }" v-if="is_wxpay" @click="toggle(2)"> <span class="tabs-span" :class="{ active: payType == 2 }" v-if="is_wxpay" @click="toggle(2)">
申请过微信支付 申请过微信支付
</span> </span>
...@@ -54,7 +53,7 @@ ...@@ -54,7 +53,7 @@
<div class="content"> <div class="content">
<!-- <payConfig v-if="payType==0 && is_all_config"></payConfig> --> <!-- <payConfig v-if="payType==0 && is_all_config"></payConfig> -->
<wechatPay v-if="payType == 1 && is_meepay"></wechatPay> <!-- <wechatPay v-if="payType == 1 && is_meepay"></wechatPay> -->
<oldWePay v-if="payType == 2 && is_wxpay" type="1"></oldWePay> <oldWePay v-if="payType == 2 && is_wxpay" type="1"></oldWePay>
<!-- <merchantPay v-if="payType==1&&!is_meepay"></merchantPay> <!-- <merchantPay v-if="payType==1&&!is_meepay"></merchantPay>
<wechatPay v-if="payType==4 && show_meepay"></wechatPay> --> <wechatPay v-if="payType==4 && show_meepay"></wechatPay> -->
...@@ -95,7 +94,7 @@ export default { ...@@ -95,7 +94,7 @@ export default {
UnionPayType: false, UnionPayType: false,
wechatPayType: false, wechatPayType: false,
mePayType: false, mePayType: false,
payType: 1, payType: 2,
centerDialogVisible: false, centerDialogVisible: false,
allConfig: '未配置', allConfig: '未配置',
meConfig: '未配置', meConfig: '未配置',
...@@ -107,7 +106,7 @@ export default { ...@@ -107,7 +106,7 @@ export default {
show_meepay: false, show_meepay: false,
} }
}, },
beforeMount() { activated() {
this.getStatus(); this.getStatus();
}, },
methods: { methods: {
...@@ -142,7 +141,7 @@ export default { ...@@ -142,7 +141,7 @@ export default {
this.wxConfig = status.WXPAY ? '已配置' : '未配置'; this.wxConfig = status.WXPAY ? '已配置' : '未配置';
this.fuConfig = status.FUPAY ? '已配置' : '未配置'; this.fuConfig = status.FUPAY ? '已配置' : '未配置';
this.payType = status.ALLINPAY ? 0 : status.MEEPAY ? 1 : status.WXPAY ? 2 : 1; this.payType = status.ALLINPAY ? 0 : status.MEEPAY ? 1 : status.WXPAY ? 2 : 2;
// this.is_wxpay = res.data.is_wxpay; // this.is_wxpay = res.data.is_wxpay;
this.is_wxpay = true; this.is_wxpay = true;
......
<template> <template>
<div> <div>
<el-table :key="tabName" v-loading="tableDataLoading" :data="tableData.list"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<!-- ele 暂无数据插槽 --> <!-- ele 暂无数据插槽 -->
<template slot="empty"> <template slot="empty">
<TableEmpty /> <TableEmpty />
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
<el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')" <el-button size="mini" type="danger" :disabled="!isAuth('userList:delete')"
@click="deleteuser(scope.row)">删除用户</el-button> @click="deleteuser(scope.row)">删除用户</el-button>
<el-button size="mini" type="warning" @click="updatesVip(scope.row)">赠送会员</el-button> <el-button size="mini" type="warning" @click="updatesVip(scope.row)">赠送会员</el-button>
<el-button v-if="tabName === 'yichang'" :disabled="!isAuth('userList:updateStatus')" size="mini" type="danger" plain <el-button v-if="tabName === 'yichang'" :disabled="!isAuth('userList:updateStatus')" size="mini"
@click="stateChangeHmd(scope.row.userId)">拉出黑名单</el-button> type="danger" plain @click="stateChangeHmd(scope.row.userId)">拉出黑名单</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -105,15 +105,18 @@ export default { ...@@ -105,15 +105,18 @@ export default {
return { return {
limit: 10, limit: 10,
page: 1, page: 1,
tableDataLoading: true, tableDataLoading: false,
tableData: [], tableData: [],
openValue: 1, openValue: 1,
closeValue: 2, closeValue: 2,
} }
}, },
created() { watch: {
tabName(val) {
if (val)
this.dataSelect(); this.dataSelect();
}
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
...@@ -155,9 +158,10 @@ export default { ...@@ -155,9 +158,10 @@ export default {
}).then(({ }).then(({
data data
}) => { }) => {
this.tableDataLoading = false
let returnData = data.data let returnData = data.data
this.tableData = returnData this.tableData = returnData
}).finally(() => {
this.tableDataLoading = false
}) })
}, },
// 修改佣金比例 // 修改佣金比例
......
...@@ -11,32 +11,21 @@ ...@@ -11,32 +11,21 @@
</div> --> </div> -->
<el-card shadow="never" class="card-common"> <el-card shadow="never" class="card-common">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="全部用户" name="all" lazy> <el-tab-pane label="全部用户" name="all">
<user-table ref="userTableRef_all" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="普通用户" name="putong">
<el-tab-pane label="普通用户" name="putong" lazy>
<user-table ref="userTableRef_putong" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="会员用户" name="huiyuan" lazy> <el-tab-pane label="会员用户" name="huiyuan">
<user-table ref="userTableRef_huiyuan" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="钱包用户" name="qianbao" lazy> <el-tab-pane label="钱包用户" name="qianbao">
<user-table ref="userTableRef_qianbao" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="订单用户" name="dingdan" lazy> <el-tab-pane label="订单用户" name="dingdan">
<user-table ref="userTableRef_dingdan" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="黑名单用户" name="yichang" lazy> <el-tab-pane label="黑名单用户" name="yichang">
<user-table ref="userTableRef_yichang" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<user-table ref="userTableRef" :tabName="activeName" :searchData="searchData" :tabInfo="tabInfo">
</user-table>
</el-card> </el-card>
</div> </div>
</template> </template>
...@@ -141,6 +130,11 @@ export default { ...@@ -141,6 +130,11 @@ export default {
], ],
} }
}, },
activated() {
this.$nextTick(() => {
this.$refs.userTableRef.dataSelect()
})
},
methods: { methods: {
// 查询 // 查询
serachHandle() { serachHandle() {
...@@ -196,6 +190,4 @@ export default { ...@@ -196,6 +190,4 @@ export default {
} }
</script> </script>
<style scoped="scoped"> <style scoped="scoped"></style>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!