Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 74f5e3b4
authored
Jan 17, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.4.0' into 'develop'
V3.4.0 See merge request
!88
2 parents
eb86bbcb
408de8f4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
74 deletions
src/views/account/addAccount.vue
src/views/account/editAccount.vue
src/views/baseInfo/index.vue
vue.config.js
src/views/account/addAccount.vue
View file @
74f5e3b
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"scrm-main"
v-loading=
"loading"
>
<div
v-show=
"step == 1"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
<span>
创建子商户/门店
</span>
...
...
@@ -105,9 +105,12 @@ export default {
console
.
log
(
value
)
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
callback
(
new
Error
(
'登录账户名不可为 11 位纯数字'
))
}
else
{
callback
()
}
}
return
{
loading
:
false
,
editStatus
:
false
,
nextStatus
:
false
,
accountTypesRule
:
false
,
...
...
@@ -230,10 +233,13 @@ export default {
},
//下一步
handleNext
()
{
console
.
log
(
2222
)
this
.
loading
=
true
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
(
valid
=>
{
if
(
valid
)
resolve
()
else
{
this
.
loading
=
false
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
'is-error'
)
isError
[
0
].
querySelector
(
'input'
).
focus
()
...
...
@@ -246,6 +252,7 @@ export default {
this
.
$refs
.
accountInfoForm
.
validate
(
valid
=>
{
if
(
valid
)
resolve
()
else
{
this
.
loading
=
false
pm1
.
then
(()
=>
{
document
.
querySelector
(
'#app'
).
scrollTop
=
1000
})
...
...
@@ -257,10 +264,12 @@ export default {
})
})
if
(
this
.
accounttypeId
.
length
==
0
)
{
this
.
loading
=
false
this
.
accountTypesRule
=
true
return
}
if
(
this
.
accountAddForm
.
merchantType
==
1
&&
this
.
accountAddForm
.
merchantOrgcode
&&
!
util
.
checkIdCard
(
this
.
accountAddForm
.
merchantOrgcode
))
{
this
.
loading
=
false
this
.
$message
.
error
(
'请输入正确的身份证号码'
)
document
.
querySelector
(
'#app'
).
scrollTop
=
0
setTimeout
(()
=>
{
...
...
@@ -282,6 +291,7 @@ export default {
if
(
this
.
accountAddForm
.
residentPhone
)
{
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
if
(
!
result
)
{
this
.
loading
=
false
this
.
$message
({
message
:
'请输入正确的驻店信息'
,
type
:
'warning'
...
...
@@ -320,6 +330,7 @@ export default {
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
[
merchant
](
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
loading
=
false
this
.
step
=
2
this
.
nextStatus
=
true
if
(
typeof
res
==
'number'
)
{
...
...
src/views/account/editAccount.vue
View file @
74f5e3b
...
...
@@ -82,6 +82,8 @@ export default {
console
.
log
(
value
)
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
callback
(
new
Error
(
'登录账户名不可为 11 位纯数字'
))
}
else
{
callback
()
}
}
return
{
...
...
src/views/baseInfo/index.vue
View file @
74f5e3b
...
...
@@ -64,10 +64,12 @@ export default {
}
this
.
$apis
.
baseInfo
.
merchantInfo
(
para
).
then
(
res
=>
{
this
.
blocInfo
=
res
this
.
storesList
=
res
.
stores
.
map
(
item
=>
{
item
.
date
=
`
${
this
.
dateFormat
(
item
.
starttime
,
'YYYY.MM.DD'
)}
--
${
this
.
dateFormat
(
item
.
endtime
,
'YYYY.MM.DD'
)}
`
return
item
})
if
(
res
.
stores
)
{
this
.
storesList
=
res
.
stores
.
map
(
item
=>
{
item
.
date
=
`
${
this
.
dateFormat
(
item
.
starttime
,
'YYYY.MM.DD'
)}
--
${
this
.
dateFormat
(
item
.
endtime
,
'YYYY.MM.DD'
)}
`
return
item
})
}
})
},
dateFormat
:
function
(
dateTime
,
format
=
'yyyy-MM-dd'
)
{
...
...
vue.config.js
View file @
74f5e3b
...
...
@@ -5,77 +5,74 @@ 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/maps?v=1.3&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder'
]
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/maps?v=1.3&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder'
]
}
module
.
exports
=
{
outputDir
:
`../dist/
${
packageName
}
`
,
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'
}
outputDir
:
`dist`
,
publicPath
,
assetsDir
:
'static'
,
productionSourceMap
:
false
,
configureWebpack
:
{
resolve
:
{
alias
:
{
'@'
:
resolve
(
'src'
),
assets
:
resolve
(
'src/assets'
),
views
:
resolve
(
'src/views'
),
components
:
resolve
(
'src/components'
)
}
},
devServer
:
{
hot
:
true
,
disableHostCheck
:
true
,
host
:
process
.
env
.
VUE_APP_HOST
,
port
:
process
.
env
.
VUE_APP_PORT
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
// 主应用获取子应用时跨域响应头
}
output
:
{
library
:
`
${
packageName
}
-[name]`
,
libraryTarget
:
'umd'
,
// 把微应用打包成 umd 库格式
jsonpFunction
:
`webpackJsonp_
${
packageName
}
`
},
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
()
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'
:
'*'
// 主应用获取子应用时跨域响应头
}
}
\ No newline at end of file
},
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
()
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment