Commit 80ec209c by chenwq

店铺设置-客户管理开发联调

1 parent fcd5773b
Showing 69 changed files with 2925 additions and 0 deletions
NODE_ENV='development'
# must start with VUE_APP_
VUE_APP_ENV = 'development'
VUE_APP_PORT = 6652
NODE_ENV='production'
# must start with VUE_APP_
VUE_APP_ENV = 'production'
\ No newline at end of file
{
"root": true,
"env": {
"node": true
},
"globals": {
"AMap": true
},
"extends": ["plugin:vue/essential", "@vue/prettier"],
"rules": {
"no-console": "off",
"no-unused-vars":"off",
"prettier.endOfLine": "crlf",
"endOfLine":"auto"
},
"parserOptions": {
"parser": "babel-eslint"
}
}
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
{
"printWidth": 800,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"semi": false,
"wrap_line_length": 820,
"wrap_attributes": "auto",
"proseWrap": "always",
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "ignore",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"jsxBracketSameLine": true,
"files.insertFinalNewline": true,
"useTabs": false,
"eslintIntegration": true,
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
}
],
"endOfLine": "auto"
}
# subapp-blog
微前端博客子应用
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
plugins: [
[
"component",
{
libraryName: "element-ui",
styleLibraryName: "theme-chalk"
}
]
]
};
This diff could not be displayed because it is too large.
{
"name": "shop",
"version": "1.0.0",
"description": "A Vue.js project",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"bignumber.js": "^9.1.1",
"core-js": "^3.4.4",
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^2.0.9",
"glsx-components": "^1.5.7",
"vue": "^2.6.10",
"vue-amap": "^0.5.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"babel-plugin-component": "^1.1.1",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
No preview for this file type
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="referrer" content="never">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
<% } %>
<!-- 使用CDN的JS文件 预加载 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %>
<title>微前端子应用:博客</title>
</head>
<body>
<noscript>
<strong>We're sorry but module-report doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body>
</html>
\ No newline at end of file
var express = require('express')
// var history = require('connect-history-api-fallback')
var cors = require('cors')
var app = express()
// app.use(history())
app.use(cors())
app.use(express.static('./dist'))
app.get('/', function(req, res) {
res.send('Hello jq')
})
const port = 6652
app.listen(port)
console.log(`服务已运行:\r\n http://127.0.0.1:${port}`)
<template>
<div id="app">
<!-- <h2>
报表子应用
<span class="right"></span>
</h2>
<div id="nav">
<span>切换路由:</span>
<el-button-group class="right">
<el-button type="primary" size="medium" @click="routerChange('/')">报表</el-button>
<el-button type="primary" size="medium" @click="routerChange('/about')">穿梭框</el-button>
<el-button type="primary" size="medium" @click="toAppReport('1-1')">表格</el-button>
<el-button type="primary" size="medium" @click="toAppReport('1-2')">日历</el-button>
<el-button type="primary" size="medium" @click="toAppReport('3-1')">aaaa</el-button>
</el-button-group>
</div>
<div class="parent-child-communication">
<h3>父子应用通信:</h3>
<div style="margin-bottom: 20px;">
<span>rxjs通信方案:</span>
<el-button class="right" type="primary" size="medium" @click="callParentChange('rxjs')">通知父应用变天了</el-button>
</div>
<div>
<span>官方通信方案:</span>
<el-button class="right" type="primary" size="medium" @click="callParentChange('default')">通知父应用收到</el-button>
</div>
<img src="./assets/logo.png" alt="" srcset="" />
</div>-->
<router-view />
</div>
</template>
<script>
export default {
name: 'report-app',
props: {
msg: String,
message: String
},
data() {
return {
myMsg: '',
gs: ''
}
},
created() {
this.myMsg = this.msg
this.myMessage = this.message
}
}
</script>
<style lang="scss">
.parent-child-communication {
padding: 20px 0;
line-height: 36px;
}
#app {
padding: 0px 20px 20px 40px;
// overflow-y: auto;
height: 100%;
}
</style>
>
/*
所有模块都定义在 modules
|-modules
|----demo.js
|----demo1.js
|----...
|-index.js ---动态对外暴露所有模块 无须手动添加
参考demo.js 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
*/
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
return modules
}, {})
export default modules
import { http } from '@/main'
// 分页查询客户信息
const getList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchantCustomer.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取服务中心下拉筛选 所有服务商数据
const getServiceCenterList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.businessAssistant.serviceCenter.listByServiceMerchantId'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 分页查询开店审核记录
const getReviewList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.createMerchant.review.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询商户详情
const getMerchantInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchantCustomer.merchantInfo'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据场景查询产品
const findProByScene = params => {
params.method = `scrm.api.busassistant.activity.productByscene`
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询场景和产品的开通状态
const getSceneProStatus = params => {
params.method = `scrm.api.busassistant.activity.findSceneProductStatus`
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
// 查看客户销售顾问:
const getStaffList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.staff.searchStaffPage'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 创建邀请销售顾问二维码
const getInviteCode = params => {
params.method = `scrm.api.busassistant.merchantCustomer.inviteCode`
return http({
url: 'rop-scrm-busassistant/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getList, getServiceCenterList, getReviewList, getMerchantInfo, findProByScene, getSceneProStatus, getStaffList, getInviteCode }
import { http, http_common, http_merchant } from '@/main'
const path = 'dj.api.'
const defaultPath = 'scrm.api.carlife.'
// 获取不同场景的商品分类
const getGoodsCategoryConfiguration = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.currentPage = 1
params.pageSize = 999999
params.routerMethod = `${path}goodsCategoryConfiguration.page`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 视频上传
const uploadVideo = params => {
params.method = `${defaultPath}common.uploadVideo`
return http({
url: 'rop-scrm-carlife/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
const uploadImg = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
// 获取省市区信息
const getAreaInfoApi = function(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}yseMerchantOffline.getAreaInfo`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const brandList = params => {
params.method = 'merchants.api.merchantCommon.getCarbrandTree'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getAreaInfoApi, getGoodsCategoryConfiguration, uploadImg, uploadVideo, brandList }
.left {
float: left;
}
.right {
float: right;
}
.align-right {
text-align: right;
}
.left{float:left}.right{float:right}.align-right{text-align:right}
$color-yellow:#fdb757;
$color-green:#2cca74;
$color-gray:#999;
$color-red:#EB4E4E;
//背景图片 100%
@mixin bkgMaxSize($url) {
background-image: url($url);
background-repeat: no-repeat;
background-size: 100% 100%;
}
@mixin font-setting-group($font-size,$font-family,$font-weight,$color,$line-height){
font-size: $font-size;
font-family: $font-family;
font-weight: $font-weight;
color: $color;
line-height: $line-height;
}
//边框圆角
@mixin borderRadius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
-o-border-radius: $radius;
border-radius: $radius;
}
//定位上下左右居中
@mixin positionCenter {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
//定位上下居中
@mixin ct {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
//定位左右居中
@mixin cl {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
//定位全屏
@mixin allcover {
position: absolute;
top: 0;
right: 0;
}
//相对定位
@mixin my-absolute($left, $top,$z) {
position: absolute;
z-index: $z;
margin-left: $left;
margin-top: $top;
}
//宽高-不同
@mixin widthHeightN($width, $height){
width: $width;
height: $height;
}
//宽高-相同
@mixin widthHeightY($number){
width: $number;
height: $number;
}
//字体大小,颜色
@mixin sizeColor($size, $color){
font-size: $size;
color: $color;
}
//flex布局
@mixin center_none{
display: flex;
justify-content: center;
align-items: center;
}
@mixin center_center{
display: flex;
justify-content: center;
align-items: center;
}
@mixin flex-start_center{
display: flex;
justify-content: flex-start;
align-items: center;
}
@mixin space-between_center{
display: flex;
justify-content: space-between;
align-items: center;
}
@mixin space-around_center{
display: flex;
justify-content: space-around;
align-items: center;
}
@mixin flex-end_center{
display: flex;
justify-content: flex-end;
align-items: center;
}
@mixin wrap_flex-start{
display: flex;
flex-wrap:wrap;
align-content:flex-start;
}
@mixin flex-start_column{
display: flex;
justify-content: flex-start;
flex-direction: column;
}
@mixin none_center_column{
display: flex;
align-items: center;
flex-direction: column;
}
@mixin center_center_column{
display: flex;
align-items: center;
justify-content: flex-start;
flex-direction: column;
}
//圆点
@mixin dot{
width: 6px;
height: 6px;
border-radius: 50%;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
body,
html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #f4f5fa;
}
.flex {
display: flex;
}
.shop .container {
background: #ffffff;
padding: 20px;
}
.shop.edit-box .container.all-page {
min-height: calc(100vh - 204px);
}
.shop.edit-box .container {
padding: 0 0 20px;
}
.shop .table-header {
display: flex;
justify-content: space-between;
line-height: 32px;
margin-bottom: 10px;
}
.shop .page-title {
padding-left: 20px;
height: 55px;
line-height: 55px;
border-bottom: 1px solid #e5e5e5;
}
.shop .m-b-20 {
margin-bottom: 20px;
}
.shop .p-t-20 {
padding-top: 20px;
}
.pointer {
cursor: pointer;
}
.carIcon {
display: inline-block;
width: 22px;
height: 22px;
background: url(../../images/shoppingCarIcon.webp) no-repeat;
background-size: 100% 100%;
margin-right: 4px;
}
.el-cascader-menu__wrap {
height: 204px !important;
}
/**
* 根据路由匹配地址
* @param {*} data 路由数据
* @param {*} base 路由前缀
* @param {*} options 粗略的配置项
*/
function routeMatch(data, base, options = { url: 'url', name: 'name', id: 'id', permissions: 'permissions' }) {
if (!Array.isArray(data)) return []
// 主视图路由 正式项目需要区分登陆注册等
/* let userRouter = {
path: "/layout",
name: "layout",
component: () => import('@/views/layout/index.vue'),
redirect: '/index',
children: []
}; */
// 创建路由盒子
let routerBox = []
// 将菜单数据处理为一维函数 如果有多级菜单
// let menu = flattenDeep(data, 'children');
let menu = data
// 遍历处理路由
menu.forEach(item => {
if (!item[options.url]) return
let _url = item[options.url].replace(base, '')
try {
let routerItem = {
path: _url, // 路由路径名
name: item[options.name] || item[options.id], // 命名路由 用于配合菜单简洁跳转
meta: {
purview: item[options.permissions]
}, // 路由元信息 定义路由时即可携带的参数,可用来管理每个路由的按钮操作权限
component: () => import(`@/views${_url}/index.vue`) // 路由映射真实视图路径
}
routerBox.push(routerItem)
} catch (err) {
item[options.url] = '/err-404'
}
})
// 推入需要授权后等异步加载的,非服务端获取的功能性页面
// routerBox.push(...nextRouter);
let errorBox = {
path: '*',
redirect: '/err-404'
}
routerBox.push(errorBox)
return routerBox
}
export default routeMatch
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
/* eslint-disable */
var reg = {
priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/,
zNumReg: /^\d*$/
}
/* eslint-enable */
regRule = regRule || 'priceReg'
if (newValue && ((minValue && newValue < minValue) || (maxValue && newValue > maxValue))) {
return oldValue || ''
}
if (newValue && reg[regRule].test(newValue + '')) {
if (/\./.test(newValue)) {
newValue = newValue + ''
var interger = newValue.split('.')[0]
var point = newValue.split('.')[1]
var intergerNum = interger.length > intergerDigit ? oldValue.split('.')[0] : interger
var pointNum = point.length > pointDigit ? point.slice(0, pointDigit) : point
newValue = pointDigit ? intergerNum + '.' + pointNum : newValue.split('.')[0]
} else {
newValue = newValue.length > intergerDigit ? oldValue.slice(0, intergerDigit) : newValue
if (regRule == 'zNumReg') {
newValue = newValue.split('')[0] == '0' ? '0' : newValue
}
}
return newValue
} else {
return newValue ? oldValue : ''
}
}
export { limitPrice }
// 获取最近n个月,默认6个月
export function getCurrentSixMonth(n = 5) {
return [new Date(new Date().setMonth(new Date().getMonth() - n)), new Date()]
}
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
export function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
var reg = {
priceReg: /^\d[\d\.]*$/, // eslint-disable-line
numReg: /^[1-9]\d*$/
}
regRule = regRule || 'priceReg'
if (newValue && ((minValue && newValue < minValue) || (maxValue && newValue > maxValue))) {
return oldValue || ''
}
if (newValue && reg[regRule].test(newValue + '')) {
if (/\./.test(newValue)) {
newValue = newValue + ''
var interger = newValue.split('.')[0]
var point = newValue.split('.')[1]
var intergerNum = interger.length > intergerDigit ? oldValue.split('.')[0] : interger
var pointNum = point.length > pointDigit ? point.slice(0, pointDigit) : point
newValue = pointDigit ? intergerNum + '.' + pointNum : newValue.split('.')[0]
} else {
newValue = newValue.length > intergerDigit ? oldValue.slice(0, intergerDigit) : newValue
}
return newValue
} else {
return newValue ? oldValue : ''
}
}
/**
* 时间控件-限制月份
*/
export const rangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
/**
* 时间控件-(0-30天内的日期)
*/
export const appointDays = 35
export const afterTodayOptions = {
disabledDate(date) {
if (date < new Date(new Date().toLocaleDateString()) || date > new Date(new Date().setDate(new Date().getDate() + (appointDays - 1)))) {
return true
}
return false
}
}
<template>
<div>
<div class="input-number-range" :class="{ 'is-disabled': disabled }">
<div class="flex">
<div class="from">
<el-input ref="input_from" v-model="formData[keyObj.from]" :disabled="disabled" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="请输入" @change="handleInputChangeFrom"></el-input>
</div>
<div class="center">
<span>至</span>
</div>
<div class="to">
<el-input ref="input_to" v-model="formData[keyObj.to]" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" :disabled="disabled" placeholder="请输入" @change="handleInputChangeTo"></el-input>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'InputNumberRange',
props: {
// 是否禁用
disabled: {
type: Boolean,
default: false
},
formData: {
type: Object,
default: () => {
return {}
}
},
keyObj: {
type: Object,
default: () => {
return {
from: 'a',
to: 'b'
}
}
}
},
data() {
return {}
},
methods: {
// from输入框change事件
handleInputChangeFrom(value) {
let from = this.formData[this.keyObj.from]
let to = this.formData[this.keyObj.to]
if (+from > +to) {
this.formData[this.keyObj.to] = from
}
},
// to输入框change事件
handleInputChangeTo(value) {
let from = this.formData[this.keyObj.from]
let to = this.formData[this.keyObj.to]
if (+from > +to) {
this.formData[this.keyObj.to] = from
}
}
}
}
</script>
<style lang="scss" scoped>
.input-number-range {
background-color: #fff;
border: 1px solid #dcdfe6;
border-radius: 4px;
}
.flex {
display: flex;
flex-direction: row;
width: 100%;
justify-content: center;
align-items: center;
/deep/ .el-input .el-input__inner {
border: 0px;
margin: 0;
padding: 0 10px;
background-color: transparent;
}
.center {
margin-top: 1px;
}
.unit {
margin-right: 10px;
}
}
.is-disabled {
background-color: #eef0f6;
border-color: #e4e7ed;
color: #c0c4cc;
cursor: not-allowed;
}
</style>
\ No newline at end of file
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
<template>
<div class="map-box" :style="{ height: mapHeight + 'px' }">
<div id="container" style="width: 100%; height: 100%"></div>
<div class="map-address">{{ address }}</div>
<div id="myPageTop" style="position: absolute; top: 10px; width: 50%; left: 25%">
<el-input placeholder="请输入关键字" v-model="input" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="searchAddress"></el-button>
</el-input>
</div>
</div>
</template>
<script>
let map, marker, placeSearch
export default {
name: 'map',
props: {
mapHeight: {
type: Number,
default: 300
}
},
data() {
return {
input: '',
address: '',
lnglat: [],
geocoderAddress: {}
}
},
methods: {
mapInit() {
map = new AMap.Map('container', {
resizeEnable: true,
zoom: 20
})
AMap.plugin(['AMap.PlaceSearch'], function() {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
pageIndex: 1, // 页码
citylimit: false, //是否强制限制在设置的城市内搜索
// panel: "panel", // 结果列表将在此容器中进行展示。
autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
renderStyle: 'default'
})
})
// 添加列表点选监听事件
map.on('click', this.getAddress)
},
searchAddress() {
let _this = this
placeSearch.search(this.input, function(status, result) {
if (status === 'complete' && result.poiList.pois.length) {
let lnglat = result.poiList.pois[0].location
_this.getAddress(lnglat)
}
})
},
addMarker(lnglat) {
let position
if (lnglat.lng) {
position = [lnglat.lng, lnglat.lat]
} else {
position = lnglat
}
marker = new AMap.Marker({
icon: new AMap.Icon({
image: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
size: new AMap.Size(27, 34), //图标大小
imageSize: new AMap.Size(27, 34)
}),
position: position,
offset: new AMap.Pixel(-10, -10)
})
map.add(marker)
map.setFitView()
},
getAddress(e) {
let self = this
let lnglat
if (e.type == 'click') {
lnglat = e.lnglat
} else {
let { lng, lat } = e
lnglat = [lng, lat]
}
if (marker) {
marker.setMap(null)
marker = null
}
self.addMarker(lnglat)
AMap.plugin('AMap.Geocoder', () => {
const geocoder = new AMap.Geocoder()
geocoder.getAddress(lnglat, (status, result) => {
self.lnglat = lnglat
self.address = result.regeocode.formattedAddress
geocoder.getLocation(self.address, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
this.geocoderAddress = result.geocodes[0]
}
})
})
})
},
selectAddress(e) {
//这里获得点选地点的经纬度
this.getAddress()
}
},
mounted() {
this.mapInit()
}
}
</script>
<style scoped lang="scss">
.map-box {
position: relative;
width: 100%;
}
#container {
position: absolute;
height: 100%;
}
#panel {
position: absolute;
max-height: 90%;
overflow-y: auto;
top: 80px;
right: 10px;
width: 280px;
}
.map-address {
position: absolute;
line-height: 20px;
bottom: -30px;
}
</style>
<!--
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-04-21 18:43:21
* @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
-->
<template>
<div v-loading="loading">
<div class="brand select-input-box" @click="switchBrand">
<div>
<template v-for="(item, idx) in getCheckedArr">
<el-tag effect="plain" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)" v-if="idx < 3">
{{ item.label }}
</el-tag>
</template>
<el-popover placement="top" width="600" trigger="hover" class="select-popover">
<div class="select-popover-box">
<el-tag effect="plain" class="popover-item" v-for="(item, idx) in getCheckedArr" type="info" :key="idx" closable :disable-transitions="false" @close="removeItem(item, idx)">
{{ item.label }}
</el-tag>
</div>
<el-tag effect="plain" slot="reference" type="info" v-show="getCheckedArr.length > 3">+ {{ getCheckedArr.length - 3 }}</el-tag>
</el-popover>
</div>
<div>
<i v-show="!brandTree" class="el-icon-arrow-up" style="color:#909399"></i>
<i v-show="brandTree" class="el-icon-arrow-down" style="color:#909399"></i>
</div>
</div>
<div class="tree-box" v-show="brandTree">
<el-input class="tree-input" prefix-icon="el-icon-search" placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
<el-tree class="filter-tree" @check="handleCheck" :data="brandListTree" :props="defaultProps" node-key="id" show-checkbox :filter-node-method="filterNode" ref="tree"></el-tree>
<div class="tree-footer">
<div class="tree-footer-checkbox">
<el-checkbox v-model="checkedAll" @change="selectAll">全部</el-checkbox>
</div>
<div class="tree-footer-reset" @click="selectClear">重置</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'selectBrand',
data() {
return {
loading: false,
checkedAll: false,
filterText: '',
treeArr: [],
getCheckedArr: [],
defaultProps: {
children: 'children',
label: 'label'
},
brandTree: false
}
},
props: {
brandListTree: {
type: Array
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
},
treeArr: {
handler() {
const getCheckedNodes = this.$refs.tree.getCheckedNodes()
this.getCheckedArr = getCheckedNodes.reduce((prev, cur) => {
if (Object.keys(cur).includes('children') && cur.children && cur.children.length > 0) {
return prev
}
return prev.concat(cur)
}, [])
},
deep: true
}
},
methods: {
getMerchantBrandList() {
let getCheckedNodes = this.$refs.tree.getCheckedNodes()
const getCheckedKeys = this.$refs.tree.getCheckedKeys()
const getHalfCheckedNodes = this.$refs.tree.getHalfCheckedNodes()
let merchantBrandList = getHalfCheckedNodes.map(car => {
let merchantBrandId = []
car.children.forEach(item => {
if (getCheckedKeys.includes(item.id)) {
merchantBrandId.push(item.id)
}
})
return {
cars: car.id,
merchantBrandId
}
})
let checkNodes = getCheckedNodes.filter(item => item.children)
let noCheckNodes = getCheckedNodes
.filter(item => item.children === null)
.map(i => {
return {
cars: i.id
}
})
let merchantBrandList2 = checkNodes.map(car => {
let merchantBrandId = []
car.children.forEach(item => {
if (getCheckedKeys.includes(item.id)) {
merchantBrandId.push(item.id)
}
})
return {
cars: car.id,
merchantBrandId
}
})
return merchantBrandList.concat(merchantBrandList2).concat(noCheckNodes)
},
//勾选
handleCheck() {
this.treeArr = this.getTreeArray()
if (this.$refs.tree.getCheckedKeys().length == 0) {
this.checkedAll = false
}
if (this.$refs.tree.getCheckedKeys().length == this.treeArr.length) {
this.checkedAll = true
}
},
getCheckList(checkArr = []) {
checkArr.forEach(item => (item = parseInt(item)))
this.$refs.tree.setCheckedKeys(checkArr)
this.$nextTick(() => {
this.handleCheck()
})
},
//获取选择项
getTreeArray() {
let tree_arr = []
this.brandListTree.forEach(k => {
let child = k.children
if (child && child.length > 0) {
child.forEach(j => {
tree_arr.push(j.id)
})
} else {
tree_arr.push(k.id)
}
})
return tree_arr
},
//全选
selectAll() {
this.loading = true
this.treeArr = this.getTreeArray()
if (this.getCheckedArr.length == this.treeArr.length) {
this.checkedAll = false
this.$refs.tree.setCheckedKeys([])
} else {
this.checkedAll = true
this.$refs.tree.setCheckedKeys(this.treeArr)
}
setTimeout(() => {
this.loading = false
}, 1000)
},
//重置
selectClear() {
this.treeArr = []
this.checkedAll = false
this.$refs.tree.setCheckedKeys([])
},
//删除
removeItem(checkItem, index) {
this.loading = true
this.getCheckedArr.splice(index, 1)
const getCheckedNodes = this.$refs.tree.getCheckedNodes()
let getCheckedArr = getCheckedNodes.reduce((prev, cur) => {
if (Object.keys(cur).includes('children')) {
return prev
}
return prev.concat(cur)
}, [])
getCheckedArr = getCheckedArr.filter(item => {
return item.id != checkItem.id
})
this.$refs.tree.setCheckedNodes(getCheckedArr)
if (getCheckedArr.length == 0) {
this.checkedAll = false
}
this.$nextTick(() => {
this.loading = false
})
},
//过滤
filterNode(value, data) {
if (!value) return true
return data.label.indexOf(value) !== -1
},
// 显示隐藏
switchBrand() {
this.brandTree = !this.brandTree
this.$emit('clickBrand', this.brandTree)
}
}
}
</script>
<style lang="scss">
.brand.select-input-box {
width: 100%;
height: 38px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 8px;
display: flex;
justify-content: space-between;
align-items: center;
/deep/ .el-tag {
margin-right: 5px;
height: 26px;
line-height: 26px;
box-sizing: border-box;
}
}
.select-popover {
&-box {
display: flex;
flex-wrap: wrap;
max-height: 500px;
overflow-y: auto;
.popover-item {
margin-right: 5px;
margin-bottom: 5px;
height: 26px;
line-height: 26px;
box-sizing: border-box;
}
}
}
.tree-box {
margin-top: 10px;
padding: 15px 15px 0px;
background: #ffffff;
// box-shadow: 0px 6px 20px 0px rgba(122, 122, 122, 0.2);
border-radius: 4px;
border: 1px solid #e5e5e5;
.tree-input {
margin-bottom: 10px;
}
.filter-tree {
height: 300px;
overflow-y: auto;
}
.tree-footer {
border-top: 1px solid #e5e5e5;
height: 48px;
padding: 0px 15px;
display: flex;
justify-content: space-between;
align-items: center;
}
}
.tree-footer-reset {
cursor: pointer;
}
</style>
<!-- 弹窗 -->
<template>
<div>
<el-dialog
:title="title"
:visible.sync="isVisible"
:show-close="showClose"
:before-close="handleClose"
:close-on-click-modal="false"
:modal-append-to-body="false"
:width="width"
class="app-dialog"
>
<el-scrollbar v-if="hasScroll">
<span slot="title">
<span class="main-title"></span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</el-scrollbar>
<template v-if="!hasScroll">
<span slot="title">
<span class="main-title"></span>
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
</template>
<div slot="footer">
<slot name="btn-start"></slot>
<el-button
:type="typeName"
v-if="!noClose"
:size="btnSize"
@click="handleClose"
></el-button>
<el-button
type="default"
v-if="!noCancel"
:size="btnSize"
@click="handleClose"
></el-button>
<el-button
type="primary"
v-if="!noBtnOk"
:size="btnSize"
@click="handleConfirm"
></el-button>
<slot name="btn-middle"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'glsx-dialog',
data() {
return {}
},
props: {
hasScroll: {
type: Boolean,
default: true
},
title: {
type: String,
default: ''
},
isVisible: {
type: Boolean,
default: false
},
showClose: {
type: Boolean,
default: false
},
btnCloseLabel: {
type: String,
default: '关闭'
},
btnOkLabel: {
type: String,
default: '确定'
},
btnCancelLabel: {
type: String,
default: '取消'
},
noBtnOk: {
type: Boolean,
default: false
},
noCancel: {
type: Boolean,
default: false
},
noClose: {
type: Boolean,
default: true
},
typeName: {
type: String,
default: 'default'
},
width: {
type: String,
default: '580px'
},
btnSize: {
type: String,
default: 'small'
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
}
}
}
</script>
<style lang="scss">
.dialog-sub-title {
font-size: 12px;
color: #666666;
}
</style>
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-06 10:10:44
* @LastEditors: limin
* @LastEditTime: 2021-09-06 10:11:49
* @FilePath: \scrm\scrm-sub-blog\src\components\index.js
*/
import Vue from 'vue'
import glsxDialog from '@/components/glsx-dialog/index.vue'
import InputNumRange from '@/components/InputNumRange/index.vue'
import glsxCombiForm from '@/components/glsx-combi-form/index.vue'
Vue.component('glsx-dialog', glsxDialog)
Vue.component('input-num-range', InputNumRange)
Vue.component('glsx-combi-form', glsxCombiForm)
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-06-08 16:55:43
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
const environment = process.env.NODE_ENV || 'production'
let config = require('./env.' + environment)
module.exports = config
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-18 11:51:29
*/
// 本地环境配置
module.exports = {
title: 'scrm-sub-marketing',
response: {
data_key: 'data',
message_key: 'message',
code_key: 'code',
code_success_value: '0',
errId_logout_value: '21',
code_message_map: {}
},
request: {
// baseURL: 'http://scrm.test.glsx.com.cn/',
baseURL: 'http://192.168.2.42:8064/',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
module.exports = {
title: 'scrm-sub-marketing',
response: {
data_key: 'data',
message_key: 'message',
code_key: 'code',
code_success_value: '0',
errId_logout_value: '21',
code_message_map: {}
},
request: {
baseURL: 'http://scrm.test.glsx.com.cn/',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-07 14:38:52
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
let cfg = require('./conf.js')
import { Http, utils } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function(common) {
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
let params = { moduleName: 'shop', mockUrl: 'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/shop/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return common.utils.getConfig(params)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res)
}
export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
No preview for this file type
No preview for this file type
No preview for this file type
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:31
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
import apis from './api'
import './public-path'
import '@/assets/css/public.scss'
import '@/components'
import utils from './utils/index'
// import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup'
import VueAMap from 'vue-amap'
Vue.use(VueAMap)
// 初始化vue-amap
VueAMap.initAMapApiLoader({
key: 'bd290dc27d0945959280753215ddda71', // 这里写你申请的高德地图的key
plugin: ['AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.Geolocation'],
v: '1.4.15'
})
Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
Vue.prototype.$utils = utils
Vue.prototype.$EventBus = new Vue()
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_common = params => Vue.prototype.$http_common(params)
File mode changed
import Vue from 'vue'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree, Card, Table, TableColumn, Pagination, Loading, Dialog, MessageBox, Upload, Tooltip, Tabs, TabPane, Container } from 'element-ui'
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(TimePicker)
Vue.use(Col)
Vue.use(DatePicker)
Vue.use(Tree)
Vue.use(Card)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Pagination)
Vue.use(Loading)
Vue.use(Dialog)
Vue.use(Upload)
Vue.use(Tooltip)
Vue.use(Tabs)
Vue.use(TabPane)
export const message = Message
export const messageBox = MessageBox
if (window.__POWERED_BY_QIANKUN__) {
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
Vue.use(VueRouter)
// 处理重复点击同一个路由报错的问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
function getRoutes(routesData) {
return routesData.reduce((routes, route) => {
routes.push({ ...route, component: () => import('@/views' + route.compath + '.vue') })
return routes
}, [])
}
export { VueRouter, routes, getRoutes }
const staticRoutes = Object.freeze([
{
name: 'default',
path: '/'
},
{
name: 'customerManage',
path: '/customerManage/index',
component: resolve => require([`@/views/customerManage/index.vue`], resolve),
meta: {}
},
{
name: 'customerDetail',
path: '/customerManage/customerDetail',
component: resolve => require([`@/views/customerManage/customerDetail.vue`], resolve),
meta: {}
},
{
name: 'editCustomer',
path: '/customerManage/editCustomer',
component: resolve => require([`@/views/customerManage/editCustomer.vue`], resolve),
meta: {}
}
])
export default staticRoutes
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:31:52
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:09
* @FilePath: \scrm\scrm-sub-blog\src\setup\index.js
*/
import { bootstrap, mount, unmount } from './qiankun'
import { start } from './single'
export { bootstrap, mount, unmount, start }
import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import ElementUI from 'element-ui'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, request_merchant } = await fetchConfig(common)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:04:32
* @LastEditors: limin
* @LastEditTime: 2021-10-14 16:30:47
* @FilePath: \scrm\scrm-sub-blog\src\setup\render.js
*/
import App from '../App.vue'
import Vue from 'vue'
import store from '@/store'
import { VueRouter } from '@/router'
const render = (base, routes) => {
const router = new VueRouter({
base,
routes,
mode: 'history'
})
const vm = new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
return { router, vm }
}
export default render
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:02:23
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:17
* @FilePath: \scrm\scrm-sub-blog\src\setup\single.js
*/
import Vue from 'vue'
import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { Http, utils } from 'glsx-common'
import render from './render'
import { routes } from '@/router'
export async function start() {
if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig()
var urlParams = {}
// window.location.href
// .split('?')[1]
// .split('&')
// .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1]
// })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-53e870b5-80d5-483e-8277-cdc4dec0ad80-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes)
}
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-08-25 14:14:44
* @FilePath: \scrm\scrm-base\src\store\index.js
*/
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce(
(result, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
result.getters[moduleName] = state => state[moduleName]
result.modules[moduleName] = value.default
return result
},
{ modules: {}, getters: {} }
)
const store = new Vuex.Store(modules)
export default store
export default {
namespaced: true,
state: {
size: 10, // 分页 页大小
token: ''
},
mutations: {
// 设置分页大小
SET_PAGE_SIZE(state, data) {
state.size = data
},
// 设置token
SET_TOKEN(state, data) {
state.token = data
}
},
actions: {
// 设置分页大小
setPageSize({ commit }, data) {
commit('SET_PAGE_SIZE', data)
},
// 设置token
setToken({ commit }, data) {
commit('SET_TOKEN', data)
}
}
}
export default {
namespaced: true,
state: {},
mutations: {},
actions: {}
}
File mode changed
function debounce(func, wait = 200) {
let timeout
return function(event) {
clearTimeout(timeout)
timeout = setTimeout(() => {
func.call(this, event)
}, wait)
}
}
function dateFormat(dateTime, format = 'YYYY-MM-DD HH:mm') {
const date = new Date(dateTime)
const config = {
YYYY: date.getFullYear(),
MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD: date.getDate(),
HH: date.getHours(),
mm: date.getMinutes(),
ss: date.getSeconds()
}
for (const key in config) {
format = format.replace(key, config[key])
}
return format
}
/**
* 校验手机号码格式
*/
function checkPhone(mobile) {
const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile)
}
/**
* 用于glsx-combi-form的select写入options
* formName String FormData的属性名
* hasAll Boolean 是否需要添加“全部”属性
* refreshSigle String 更新特定的属性的options
*/
function getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = that[formName].find(k => k.name == refreshSigle)
var index = that[formName].findIndex(k => k.name == refreshSigle)
that.$set(that[formName][index], 'optionList', that.$common.utils.deepClone(that.baseData[item.optionsName]))
if (hasAll && that.baseData[item.optionsName].length && that.baseData[item.optionsName][0][that[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[that[formName][index].optionId] = ''
temp[that[formName][index].optionLabel] = '全部'
that[formName][index].optionList.unshift(temp)
}
} else {
that[formName].forEach((item, index) => {
if (item.type === 'select' && that.baseData[item.optionsName]?.length) {
that.$set(that[formName][index], 'optionList', that.$common.utils.deepClone(that.baseData[item.optionsName]))
if (hasAll && that.baseData[item.optionsName].length && that.baseData[item.optionsName][0][that[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[that[formName][index].optionId] = ''
temp[that[formName][index].optionLabel] = '全部'
that[formName][index].optionList.unshift(temp)
}
}
})
}
}
/** 二次确认封装 */
function secondConfirm(that, title, txt, apiModule, apiName, apiParams, type = 'warning', fn) {
that.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type,
callback: action => {
if (action == 'confirm') {
that.$apis[apiModule][apiName](apiParams).then(res => {
that.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
that.handleSearch()
}
})
}
}
})
}
function aToExport(url) {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', url)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
}
export default {
debounce,
dateFormat,
checkPhone,
getOptionsList,
secondConfirm,
aToExport
}
<!-- 我的开店申请弹窗 -->
<template>
<GLDialog class="apply-store" bigTitle="我的开店申请" mode="big" :visible.sync="isVisible" :before-close="handleClose" v-loading="loading" :hasFooter="false">
<div>
<slot name="search"></slot>
<GLTable ref="storeRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="applyStatus" slot-scope="scope" class="flex">
<div :class="['dot', statusClass[scope.scope.reviewStatus]]"></div>
{{ reviewStatusObj[scope.scope.reviewStatus] }}
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'ApplyStoreDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.customer.getReviewList,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '客户名称',
prop: 'merchantName',
width: 120,
line: 1
},
{
label: '联系人',
prop: 'contactName'
},
{
label: '联系电话',
prop: 'phone',
width: 120
},
{
label: '地址',
prop: 'merchantAddress',
width: 140,
line: 1
},
{
label: '主营品牌',
prop: '',
width: 140,
formatter: cellValue => {
return cellValue.merchantBrandNameList.length ? cellValue.merchantBrandNameList.join('/') : '--'
}
},
{
label: '所属服务中心',
prop: 'partnerMerchantName'
},
{
label: '申请时间',
prop: 'createdDate',
width: '180px',
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '申请状态',
prop: 'reviewStatus',
width: '100px',
addHtml: 'applyStatus'
},
{
label: '说明',
prop: 'rejectedReason'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
statusClass: {
1: '',
2: 'green',
3: 'red'
},
reviewStatusObj: {
1: '审核中',
2: '已通过',
3: '已驳回'
}
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm.merchantType = 2
this.tableSearchForm.partnerMerchantId = this.$globalState.session.merchantId
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
.flex {
display: flex;
align-items: center;
}
.dot {
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 4px;
margin-right: 6px;
}
.green {
background: #4aca74;
}
.red {
background: #eb4e4e;
}
</style>
<!-- 邀请销售顾问 -->
<template>
<GLDialog title="邀请销售顾问" mode="mid" :visible.sync="isVisible" :before-close="handleClose" @onOk="handleClose" @onCancel="handleClose">
<div class="share-dialog">
<div class="box">
<div class="title">邀请方式1:二维码邀请</div>
<div class="flex">
<img style="width: 118px; height: 118px;" :src="inviteData.qrcodeUrl" />
<el-button style="padding: 8px 0;" :size="size" type="text" @click="handleSaveImg(inviteData.qrcodeUrl)">下载图片</el-button>
</div>
</div>
<div class="box">
<div class="title">邀请方式2:链接邀请</div>
<span class="txt-blue">{{ inviteData.inviteUrl }}</span>
<el-button :size="size" type="text" @click="handleSaveTxt(inviteData.inviteUrl)">复制</el-button>
</div>
</div>
</GLDialog>
</template>
<script>
export default {
name: 'InviteDialog',
data() {
return {
inviteData: {}
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
inviteInfo: {
type: Object,
default: () => { }
}
// hideStatus: Boolean
},
mounted() {
this.getInviteCode()
},
methods: {
getInviteCode() {
let sceneStr = ''
let sceneToNum = {
SC001: 0,
SC002: 1,
SC003: 2,
SC004: 3
}
this.inviteInfo.sceneList = ['SC001']
this.inviteInfo.sceneList.forEach(item => {
sceneStr = sceneStr + (sceneStr ? (',' + sceneToNum[item]) : sceneToNum[item])
})
let params = {
merchantId: this.inviteInfo.yqMerchantId,
staffLabel: sceneStr
}
this.$apis.customer.getInviteCode(params).then(res => {
this.inviteData = res
})
},
handleSaveImg(url, downloadTxt = '海报') {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
alink.download = downloadTxt
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', txt)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
.share-dialog {
display: flex;
}
.share-dialog .flex {
display: flex;
align-items: flex-end;
}
.share-dialog .box {
box-sizing: border-box;
width: calc((100% - 16px) / 2);
height: 182px;
padding: 20px;
background: #f9f9f9;
}
.share-dialog .box:first-child {
margin-right: 16px;
}
.share-dialog .title {
font-size: 14px;
color: #333333;
font-weight: 500;
margin-bottom: 8px;
}
.txt-blue {
font-size: 14px;
color: #5092ff;
}
</style>
<template>
<div class="shop">
<div class="flex">
<img class="icon" src="@/assets/icon-merchant.png" />
<div class="merchant-name">{{ detailInfo.shopMerchantName }}</div>
</div>
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="pointRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
data() {
//这里存放数据
return {
size: 'small',
url: url,
searchForm: {
merchantNoList: []
},
detailInfo: {},
showFormData: [
{
label: '销售顾问',
name: '',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '手机号',
name: '',
type: 'input',
isClear: true,
maxlength: 11
}
],
// 表格
getListApi: this.$apis.customer.getStaffList,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '销售顾问名称',
prop: 'staffName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '加入时间',
prop: 'createdDate',
formatter: cellValue => {
return cellValue.createdDate ? cellValue.createdDate.replaceAll('.', '/') : '--'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 基本数据
baseData: {
statusList: []
}
}
},
created() {
this.detailInfo = this.$route.query.detailInfo
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.merchantNoList = [this.detailInfo.yqMerchantId]
resolve()
})
},
handleSearch() {
this.$refs.pointRef.refreshTable()
},
handleReset() {
this.searchForm = {
merchantNoList: []
}
this.handleSearch()
}
}
}
</script>
<style scoped>
.flex {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.icon {
width: 32px;
height: 32px;
margin-right: 8px;
}
.merchant-name {
font-weight: 500;
font-size: 16px;
color: #333333;
}
</style>
<!-- 编辑专区 -->
<template>
<div class="edit-zone shop edit-box">
<div class="container edit-container all-page">
<p class="page-title">基础信息</p>
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="business" slot-scope="scope">
<el-select v-model="editForm[scope.name]" multiple filterable placeholder="请选择">
<el-option-group v-for="group in baseData.sceneList" :key="group.sceneCode" :label="group.name">
<el-option v-for="item in group.productList" :key="item.productCode" :label="item.productName" :value="item.productCode"></el-option>
</el-option-group>
</el-select>
</div>
</glsx-combi-form>
</div>
<GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
</GLFooter>
</div>
</template>
<script>
export default {
name: 'editCustomer',
data() {
return {
size: 'small',
editChildRef: 'editChildRef',
routeInfo: {
editType: 'add',
id: ''
},
editStatus: false,
editForm: {
yqMerchantId: '',
merchantName: '',
contactName: '',
phone: '',
},
editRule: {
yqMerchantId: [{ required: true, message: '请选择所属服务中心', trigger: 'change' }],
merchantName: [{ required: true, message: '请输入客户名称', trigger: 'change' }],
contactName: [{ required: true, message: '请输入联系人', trigger: 'change' }],
phone: [{ required: true, message: '请输入联系电话', trigger: 'change' }],
},
isEdit: true,
editFormData: [
{
label: '所属服务中心',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'yqMerchantId',
optionLabel: 'yqMerchantName',
optionsName: 'merchantList'
},
{
label: '客户名称',
name: 'merchantName',
type: 'input',
maxlength: 20
},
{
label: '联系人',
name: 'contactName',
type: 'input',
maxlength: 20
},
{
label: '联系电话',
name: 'phone',
type: 'input',
maxlength: 11
},
{
// label: '',
labelName: '地址:',
name: '',
type: 'map',
inline: true
},
{
label: '主营品牌',
name: '',
type: 'brand'
},
{
label: '业务开通',
name: 'productCodeList',
addHtml: 'business'
}
],
// 基本数据
baseData: {
merchantList: []
}
}
},
watch: {
editForm: {
handler(val) {
this.editStatus = true
},
deep: true
}
},
mounted() {
this.routeInfo = this.$route.query
this.routeInfo.editType != 'add' ? this.getInfo() : ''
this.userInfo = this.$globalState.session
this.getServiceCenterList()
this.findProByScene()
},
methods: {
getServiceCenterList() {
const params = {
partnerMerchantId: this.userInfo.merchantId
}
this.$apis.customer.getServiceCenterList(params).then(res => {
this.baseData.merchantList = res
this.$utils.getOptionsList(this, 'editFormData', false)
})
},
findProByScene() {
this.$apis.customer.findProByScene({}).then(res => {
this.baseData.sceneList = res
if (this.routeInfo.editType == 'edit') {
this.getSceneProStatus()
}
})
},
// 获取开通状态
getSceneProStatus() {
const params = { merchant4sId: this.routeInfo.merchantInfo.yqMerchantId }
this.$apis.customer.getSceneProStatus(params).then(res => {
console.log(res, '开通状态----')
})
},
getInfo() {
this.editForm = {
...this.$common.utils.deepClone(this.routeInfo.merchantInfo),
merchantName: this.routeInfo.merchantInfo.shopMerchantName || '',
oldPhone: this.routeInfo.merchantInfo?.phone,
oldMerchantName: this.routeInfo.merchantInfo.shopMerchantName || ''
}
this.$apis.customer.getMerchantInfo({ merchantId: this.routeInfo.merchantInfo.yqMerchantId }).then(res => {
console.log(res, 'res----')
console.log(this.editForm)
this.$nextTick(() => {
this.editStatus = false
})
})
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
if (this.routeInfo.editType == 'edit') {
params.id = this.routeInfo.id
}
params.merchantList = []
this.editForm.merchantList.forEach(item => {
params.merchantList.push({
merchantId: item.merchantNo,
merchantName: item.merchantName,
merchantAccountLevel: item.merchantAccountLevel
})
})
// console.log(params)
this.$apis.zoneList.insertZoneApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.cancelJump()
}
})
}
})
},
cancelJump() {
this.$router.push({
path: '/customerManage/index'
})
},
handleCancel() {
if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.cancelJump()
})
.catch(() => { })
} else {
this.cancelJump()
}
}
}
}
</script>
<style scoped>
.shop.edit-zone .select-merchant {
/* width: calc(98% - 140px); */
width: 98%;
}
</style>
<template>
<div class="shop">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>积分核销列表</h2>
<div>
<el-button size="small" @click="handleEditCustomer('add')" type="primary" plain>新增客户</el-button>
<el-button size="small" @click="handleApply" type="primary">我的开店申请</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="pointRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<ApplyStoreDialog v-if="isApplyVisible" :isVisible="isApplyVisible" @handleClose="handleApply"></ApplyStoreDialog>
<InviteDialog v-if="isInviteVisible" :isVisible="isInviteVisible" :inviteInfo="inviteInfo" @handleClose="handleInviteClose"></InviteDialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import ApplyStoreDialog from './components/ApplyStoreDialog.vue'
import InviteDialog from './components/InviteDialog.vue'
export default {
data() {
return {
size: 'small',
url: url,
userInfo: {},
searchForm: {
settlementStatus: ''
},
tableSearchForm: {},
showFormData: [
{
label: '客户名称',
name: 'shopMerchantName',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '商户号',
name: 'shopMerchantId',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '所属服务中心',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'yqMerchantId',
optionLabel: 'yqMerchantName',
optionsName: 'merchantList'
}
],
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEditCustomer('edit', row)
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleDetail(row)
}
},
{
type: 'GLButton',
name: '邀请',
attrs: {
type: 'text',
fn: '邀请'
},
listeners: {
click: row => this.handleInvite(row)
}
}
],
// 表格
getListApi: this.$apis.customer.getList,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '客户名称',
prop: 'shopMerchantName',
width: 180,
line: 1
},
{
label: '商户号',
prop: 'shopMerchantId',
width: 120
},
{
label: '联系人',
prop: 'contactName',
width: 120
},
{
label: '联系电话',
prop: 'phone',
width: '120px'
},
{
label: '所属服务中心',
prop: 'yqMerchantName',
width: 200,
line: 1
},
{
label: '销售顾问',
prop: 'employeeNum',
width: '180px'
},
{
label: '创建时间',
prop: 'createdDate',
width: '180px',
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY/MM/DD HH:mm:ss') : '--'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
isApplyVisible: false,
isInviteVisible: false,
inviteInfo: {},
// 基本数据
baseData: {
merchantList: []
}
}
},
components: {
ApplyStoreDialog,
InviteDialog
},
mounted() {
this.userInfo = this.$globalState.session
this.getServiceCenterList()
},
methods: {
getServiceCenterList() {
const params = {
partnerMerchantId: this.userInfo.merchantId
}
this.$apis.customer.getServiceCenterList(params).then(res => {
this.baseData.merchantList = res
this.$utils.getOptionsList(this, 'showFormData')
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
handleSearch() {
this.$refs.pointRef.refreshTable()
},
handleReset() {
this.searchForm = {
settlementStatus: ''
}
this.handleSearch()
},
handleApply() {
this.isApplyVisible = !this.isApplyVisible
},
handleInviteClose() {
this.isInviteVisible = !this.isInviteVisible
},
handleInvite(row) {
this.inviteInfo = row
this.handleInviteClose()
},
handleEditCustomer(editType, row) {
var params = {
editType: editType,
$title: encodeURI(editType == 'add' ? '新增客户' : '编辑客户')
}
editType != 'add' && (params.merchantInfo = row)
this.$router.push({
path: '/customerManage/editCustomer',
query: params
})
},
handleDetail(row) {
console.log(row)
this.$router.push({
path: '/customerManage/customerDetail',
query: {
$title: encodeURI('查看销售顾问'),
detailInfo: row
}
})
}
}
}
</script>
<style scoped>
.import-btn {
position: relative;
width: 116px;
height: 32px;
text-align: center;
background: #5850ff;
border-radius: 4px;
color: #ffffff;
font-size: 14px;
margin-right: 8px;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
</style>
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
}
module.exports = {
outputDir: `dist`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
components: resolve('src/components')
}
},
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
vue: 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
vuex: 'Vuex',
axios: 'axios',
echarts: 'echarts',
AMap: 'AMap'
}
},
devServer: {
hot: true,
disableHostCheck: true,
host: process.env.VUE_APP_HOST,
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}
},
chainWebpack: config => {
config.plugin('html').tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
}
return options
})
.end()
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!