Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 5a8400f1
authored
Jul 13, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
众筹,默认地址
1 parent
5b3cc591
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
10 deletions
src/api/modules/common.js
src/views/seckillActivity/editCrowdFund.vue
src/api/modules/common.js
View file @
5a8400f
import
{
http
,
http_common
,
http2
}
from
'@/main'
import
{
http
,
http_common
,
http2
,
http_merchant
}
from
'@/main'
const
defaultPath
=
'scrm.api.carlife.'
const
getMerchantGoodsListApi
=
params
=>
{
...
...
@@ -139,4 +139,15 @@ const getStaffFollowerListApi = params => {
})
}
export
default
{
getMerchantGoodsListApi
,
getGoodsListApi
,
uploadImgApi
,
uploadMusicApi
,
uploadVideoApi
,
getMerchantList
,
getSimpleMerchantList
,
getZoneListApi
,
getClassifyListApi
,
pictureUpload
,
querylabeltree
,
getCrowdTreeListApi
,
getStaffFollowerListApi
}
// 获取商户信息
const
getMerchantInfoApi
=
params
=>
{
params
.
method
=
'merchants.api.merchant.findMerchantBaseInfo'
return
http_merchant
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getMerchantGoodsListApi
,
getGoodsListApi
,
uploadImgApi
,
uploadMusicApi
,
uploadVideoApi
,
getMerchantList
,
getSimpleMerchantList
,
getZoneListApi
,
getClassifyListApi
,
pictureUpload
,
querylabeltree
,
getCrowdTreeListApi
,
getStaffFollowerListApi
,
getMerchantInfoApi
}
src/views/seckillActivity/editCrowdFund.vue
View file @
5a8400f
...
...
@@ -180,6 +180,7 @@ export default {
footerLeft
:
'0'
,
footerWidth
:
'0'
,
editChildRef
:
'editChildRef'
,
userInfo
:
{},
pickerOptions
:
{
disabledDate
(
v
)
{
//禁用当前之前的日期
...
...
@@ -301,11 +302,6 @@ export default {
}
],
// 活动配置
// customerServiceName: [{ required: true, message: '请输入客服名称', trigger: 'change' }],
// customerServicePhone: [{ required: true, message: '请输入客服电话', trigger: 'change' }],
// customerServiceQrImg: [{ required: true, message: '请选择客服二维码', trigger: 'change' }],
// sponsorName: [{ required: true, message: '请输入主办方', trigger: 'change' }],
// activityAddressDetailName: [{ required: true, message: '请选择活动地址', trigger: 'change' }],
activityBigImg
:
[{
required
:
true
,
message
:
'请选择活动大图'
,
trigger
:
'change'
}],
activityDetail
:
[{
required
:
true
,
message
:
'请输入活动详情'
,
trigger
:
'change'
}],
forwardTitle
:
[{
required
:
true
,
message
:
'请输入转发标题'
,
trigger
:
'change'
}]
...
...
@@ -579,7 +575,7 @@ export default {
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
''
this
.
routeInfo
.
addOrEdit
!=
'add'
?
this
.
getInfo
()
:
this
.
getMerchantInfo
()
var
id
=
this
.
routeInfo
.
id
var
detailDisableList
=
[
'editFormData'
]
if
(
id
)
{
...
...
@@ -615,10 +611,10 @@ export default {
newValue
&&
newValue
.
length
&&
this
.
countDown
()
},
'editForm.predictVolume'
(
newValue
,
oldValue
)
{
this
.
editForm
.
predictVolume
=
limitPrice
(
newValue
,
oldValue
,
7
,
0
,
0
,
1000000
)
this
.
editForm
.
predictVolume
=
limitPrice
(
newValue
,
oldValue
,
7
,
2
,
0
,
1000000
)
},
'editForm.fictitiousGroupQuantity'
(
newValue
,
oldValue
)
{
this
.
editForm
.
fictitiousGroupQuantity
=
limitPrice
(
newValue
,
oldValue
,
7
,
0
,
0
)
this
.
editForm
.
fictitiousGroupQuantity
=
limitPrice
(
newValue
,
oldValue
,
3
,
0
,
0
,
10
0
)
},
'editForm.fictitiousLadderQuantity'
(
newValue
,
oldValue
)
{
this
.
editForm
.
fictitiousLadderQuantity
=
limitPrice
(
newValue
,
oldValue
,
7
,
0
,
0
)
...
...
@@ -918,6 +914,29 @@ export default {
})
},
getMerchantInfo
()
{
let
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
$apis
.
common
.
getMerchantInfoApi
({
merchantId
:
merchantId
}).
then
(
res
=>
{
this
.
userInfo
=
res
this
.
editForm
.
sponsorName
=
res
.
merchantName
// 地图
if
(
res
.
provinceName
||
res
.
cityName
)
{
this
.
$refs
.
configEditFormRef
.
$refs
.
provinceForm
[
0
].
init
(
res
.
provinceName
,
res
.
cityName
)
let
mapAttr
=
this
.
configEditFormData
.
find
(
item
=>
item
.
name
==
'activityAddressDetailName'
)
this
.
editForm
[
mapAttr
.
attrObj
.
provinceName
]
=
res
.
provinceName
this
.
editForm
[
mapAttr
.
attrObj
.
provinceCode
]
=
res
.
provinceCode
this
.
editForm
[
mapAttr
.
attrObj
.
cityName
]
=
res
.
cityName
this
.
editForm
[
mapAttr
.
attrObj
.
cityCode
]
=
res
.
cityCode
this
.
editForm
[
mapAttr
.
attrObj
.
lat
]
=
res
.
lat
this
.
editForm
[
mapAttr
.
attrObj
.
lng
]
=
res
.
lng
this
.
editForm
[
mapAttr
.
attrObj
.
fullAddress
]
=
res
.
merchantAddress
}
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
})
},
getInfo
()
{
this
.
$apis
.
seckillActivity
.
getActivityDetailApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
var
info
=
res
...
...
@@ -929,6 +948,10 @@ export default {
this
.
editForm
.
activityPrice
=
(
info
.
activityPrice
/
100
).
toFixed
(
2
)
this
.
editForm
.
goodsStock
=
info
.
goodsStock
+
''
}
// 预估销量
if
(
info
.
predictVolume
)
{
this
.
editForm
.
predictVolume
=
(
info
.
predictVolume
/
100
).
toFixed
(
2
)
}
// 地图
if
(
info
.
activityAddressProvinceName
||
info
.
activityAddressCityName
)
{
this
.
$refs
.
configEditFormRef
.
$refs
.
provinceForm
[
0
].
init
(
info
.
activityAddressProvinceName
,
info
.
activityAddressCityName
)
...
...
@@ -999,6 +1022,10 @@ export default {
param
.
specificationDetailList
.
push
(
obj
)
})
}
// 预估销量
if
(
this
.
editForm
.
predictVolume
)
{
param
.
predictVolume
=
(
this
.
editForm
.
predictVolume
*
100
).
toFixed
(
0
)
}
// 活动详情
if
(
this
.
editForm
.
activityDetail
)
{
param
.
activityDetail
=
encodeURIComponent
(
this
.
editForm
.
activityDetail
)
...
...
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