Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
ybf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xulili
ybf
Commits
43181b6e
Commit
43181b6e
authored
5 years ago
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改添加优惠券样式
parent
c12a2b4f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
92 deletions
+109
-92
addCoupon.vue
wx_application/src/views/coupon/addCoupon.vue
+17
-10
home.vue
ybf_wx/src/views/home.vue
+1
-1
index 1.vue
ybf_wx/src/views/sideNav/discount/index 1.vue
+30
-50
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+61
-31
No files found.
wx_application/src/views/coupon/addCoupon.vue
View file @
43181b6e
...
@@ -77,9 +77,9 @@
...
@@ -77,9 +77,9 @@
</div>
</div>
</
template
>
</
template
>
</van-cell>
</van-cell>
<van-cell
title=
"金额"
style=
"font-size:14px;"
>
<van-cell
title=
"金额"
style=
"font-size:14px;"
class=
"js"
>
<
template
slot=
"default"
>
<
template
slot=
"default"
>
<van-stepper
v-model=
"addForm.unit"
step=
"1"
/>
<van-stepper
v-model=
"addForm.unit"
step=
"1"
:show-plus=
"false"
:show-minus=
"false"
/>
</
template
>
</
template
>
</van-cell>
</van-cell>
<van-cell
title=
"开始时间"
style=
"font-size:14px;"
>
<van-cell
title=
"开始时间"
style=
"font-size:14px;"
>
...
@@ -157,8 +157,8 @@
...
@@ -157,8 +157,8 @@
</div>
</div>
</
template
>
</
template
>
</van-cell>
</van-cell>
<van-cell
title=
"总限制次数"
style=
"font-size:14px;"
>
<van-cell
title=
"总限制次数"
style=
"font-size:14px;"
class=
"js"
>
<van-stepper
v-model=
"addForm.limitOfUse"
step=
"1"
/>
<van-stepper
v-model=
"addForm.limitOfUse"
step=
"1"
:show-plus=
"false"
:show-minus=
"false"
/>
</van-cell>
</van-cell>
<van-cell
title=
"总限制提示"
style=
"font-size:14px;"
>
<van-cell
title=
"总限制提示"
style=
"font-size:14px;"
>
<
template
slot=
"default"
>
<
template
slot=
"default"
>
...
@@ -170,17 +170,17 @@
...
@@ -170,17 +170,17 @@
/>
/>
</
template
>
</
template
>
</van-cell>
</van-cell>
<van-cell
title=
"编码券使用上限(次)"
style=
"font-size:14px;"
>
<van-cell
title=
"编码券使用上限(次)"
style=
"font-size:14px;"
class=
"js"
>
<van-stepper
v-model=
"addForm.usageMax"
step=
"1"
/>
<van-stepper
v-model=
"addForm.usageMax"
step=
"1"
:show-plus=
"false"
:show-minus=
"false"
/>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
<div
class=
"title"
>
编码券使用规则明细
</div>
<div
class=
"title"
>
编码券使用规则明细
</div>
<van-cell-group
class=
"all"
>
<van-cell-group
class=
"all"
>
<van-cell
title=
"销售金额"
style=
"font-size:14px;"
>
<van-cell
title=
"销售金额"
style=
"font-size:14px;"
class=
"js"
>
<van-stepper
v-model=
"addForm.salesAmount"
step=
"1"
:min=
"addForm.usageAmount"
/>
<van-stepper
v-model=
"addForm.salesAmount"
step=
"1"
:min=
"addForm.usageAmount"
:show-plus=
"false"
:show-minus=
"false"
/>
</van-cell>
</van-cell>
<van-cell
title=
"用券金额"
style=
"font-size:14px;"
>
<van-cell
title=
"用券金额"
style=
"font-size:14px;"
class=
"js"
>
<van-stepper
v-model=
"addForm.usageAmount"
step=
"1"
/>
<van-stepper
v-model=
"addForm.usageAmount"
step=
"1"
:show-plus=
"false"
:show-minus=
"false"
/>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
</div>
</div>
...
@@ -368,6 +368,13 @@ export default {
...
@@ -368,6 +368,13 @@ export default {
<
style
></
style
>
<
style
></
style
>
<
style
scoped
>
<
style
scoped
>
.js
>>>
.van-stepper
{
text-align
:
right
;
}
.js
>>>
.van-stepper__input
{
text-align
:
center
;
width
:
60%
;
}
.condition
{
.condition
{
display
:
flex
;
display
:
flex
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/home.vue
View file @
43181b6e
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
if
(
sessionStorage
.
getItem
(
"userId"
))
{
if
(
sessionStorage
.
getItem
(
"userId"
))
{
this
.
zcache
.
userId
=
sessionStorage
.
getItem
(
"userId"
)
this
.
zcache
.
userId
=
sessionStorage
.
getItem
(
"userId"
)
}
else
{
}
else
{
this
.
zReadyUserId
();
//
this.zReadyUserId();
this
.
zTestGetNowUrlInfo
();
this
.
zTestGetNowUrlInfo
();
}
}
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/sideNav/discount/index
copy
.vue
→
ybf_wx/src/views/sideNav/discount/index
1
.vue
View file @
43181b6e
...
@@ -103,43 +103,23 @@ export default {
...
@@ -103,43 +103,23 @@ export default {
// 获取店铺数据
// 获取店铺数据
zReadyGetUserFromId
()
{
zReadyGetUserFromId
()
{
let
postData
=
{
let
postData
=
{
//
userName: this.zcache.userId
userName
:
this
.
zcache
.
userId
userName
:
'ShanDian'
//
userName: 'ShanDian'
}
}
getUserInfoByUserId
(
postData
)
getUserInfoByUserId
(
postData
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
length
==
0
)
{
if
(
res
.
data
.
length
==
0
)
{
alert
(
'您当前没有绑定店铺'
)
alert
(
'您当前没有绑定店铺'
)
}
else
{
}
else
{
// this.zcache.storeId = res.data[0].oyStallCode
this
.
zcache
.
storeId
=
res
.
data
[
0
].
oyStallCode
// let list = []
res
.
data
.
forEach
(
item
=>
{
// res.data.forEach(item => {
this
.
getVoucherList
(
item
.
oyStallCode
).
then
(
res
=>
{
// this.getVoucherList(item.oyStallCode).then(res => {
console
.
log
(
res
,
'优惠券数据'
)
// console.log(res,'优惠券数据')
this
.
zlist
.
voucher
.
push
(...
res
)
// this.zlist.voucher.push(...res)
console
.
log
(
this
.
zlist
.
voucher
,
'this.zlist.voucher'
)
// console.log(this.zlist.voucher,'this.zlist.voucher')
// })
// console.log(this.zlist.voucher,'111')
// })
let
arr
=
res
.
data
.
map
(
item
=>
{
return
this
.
getVoucherList
(
item
.
oyStallCode
)
})
console
.
log
();
let
promiseAll
=
Promise
.
all
([
res
.
data
.
map
(
item
=>
{
let
obj
=
this
.
getVoucherList
(
item
.
oyStallCode
)
return
obj
})
})
])
console
.
log
(
this
.
zlist
.
voucher
,
'111'
)
console
.
log
(
promiseAll
,
'promiseAll'
)
promiseAll
.
then
(
res
=>
{
console
.
log
(
res
,
'sss'
)
})
})
}
}
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{})
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/sideNav/discount/index.vue
View file @
43181b6e
...
@@ -103,23 +103,49 @@ export default {
...
@@ -103,23 +103,49 @@ export default {
// 获取店铺数据
// 获取店铺数据
zReadyGetUserFromId
()
{
zReadyGetUserFromId
()
{
let
postData
=
{
let
postData
=
{
userName
:
this
.
zcache
.
userId
//
userName: this.zcache.userId
//
userName: 'ShanDian'
userName
:
'ShanDian'
}
}
getUserInfoByUserId
(
postData
)
getUserInfoByUserId
(
postData
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
length
==
0
)
{
if
(
res
.
data
.
length
==
0
)
{
alert
(
'您当前没有绑定店铺'
)
alert
(
'您当前没有绑定店铺'
)
}
else
{
}
else
{
this
.
zcache
.
storeId
=
res
.
data
[
0
].
oyStallCode
// this.zcache.storeId = res.data[0].oyStallCode
// let list = []
// res.data.forEach(item => {
// this.getVoucherList(item.oyStallCode).then(res => {
// console.log(res,'优惠券数据')
// this.zlist.voucher.push(...res)
// console.log(this.zlist.voucher,'this.zlist.voucher')
// })
// console.log(this.zlist.voucher,'111')
// })
let
list
=
[]
res
.
data
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
item
=>
{
this
.
getVoucherList
(
item
.
oyStallCode
).
then
(
res
=>
{
let
obj
=
this
.
getVoucherList
(
item
.
oyStallCode
)
console
.
log
(
res
,
'优惠券数据'
)
list
.
push
(
obj
)
this
.
zlist
.
voucher
.
push
(...
res
)
console
.
log
(
this
.
zlist
.
voucher
,
'this.zlist.voucher'
)
})
console
.
log
(
this
.
zlist
.
voucher
,
'111'
)
})
})
console
.
log
(
list
,
'list'
);
let
promiseAll
=
Promise
.
all
([
...
list
// res.data.map(item => {
// console.log(item,'item');
// let obj = this.getVoucherList(item.oyStallCode)
// console.log(obj,'obj');
// return obj
// })
])
console
.
log
(
promiseAll
,
'promiseAll'
)
// promiseAll.then(res =>{
// console.log(res,'sss')
// })
}
}
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{})
...
@@ -151,7 +177,11 @@ export default {
...
@@ -151,7 +177,11 @@ export default {
if
(
res
.
errCode
==
0
)
{
if
(
res
.
errCode
==
0
)
{
if
(
res
.
result
.
coupons
.
length
!=
0
)
{
if
(
res
.
result
.
coupons
.
length
!=
0
)
{
resolve
(
res
.
result
.
coupons
)
resolve
(
res
.
result
.
coupons
)
}
else
{
resolve
(
res
.
result
)
}
}
}
else
{
resolve
(
''
)
}
}
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment