Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dc7d1f6d
authored
Mar 07, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.50' of
http://192.168.3.233:8090/glsx/gl_tape
into SAAS+V4.50
2 parents
06649e2c
6eb6bb78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
24 deletions
api/module/point.js
components/HomeFrame/components/Point/LevelPoint.vue
components/HomeFrame/components/Point/index.vue
api/module/point.js
View file @
dc7d1f6
...
@@ -172,5 +172,13 @@ module.exports = {
...
@@ -172,5 +172,13 @@ module.exports = {
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
data
...
data
})
})
},
/** 查询附近地址 */
searchStoreAddress
(
data
)
{
return
http
.
post
({
method
:
'dj.api.car.boutique.resident.coupon.address.search'
,
projectName
:
'boutique'
,
...
data
})
}
}
}
}
components/HomeFrame/components/Point/LevelPoint.vue
View file @
dc7d1f6
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<view
:class=
"['coupon-bg', `$
{TYPE_LIST[item.couponState]}-bg`]">
<view
:class=
"['coupon-bg', `$
{TYPE_LIST[item.couponState]}-bg`]">
<image
v-if=
"item.couponState == 2"
class=
"claimed-left"
:src=
"require('@/assets/images/point/claimed-left.png')"
alt=
""
/>
<image
v-if=
"item.couponState == 2"
class=
"claimed-left"
:src=
"require('@/assets/images/point/claimed-left.png')"
alt=
""
/>
<view
class=
"coupon-img"
>
<view
class=
"coupon-img"
>
<image
class=
"img"
:src=
"item.couUrl || require('@/assets/images/point/default-coupon.png')"
alt=
""
/>
<image
class=
"img"
mode=
"aspectFill"
:src=
"item.couUrl || require('@/assets/images/point/default-coupon.png')"
alt=
""
/>
</view>
</view>
<view
class=
"coupon-info"
>
<view
class=
"coupon-info"
>
<view
:class=
"['coupon-name',
{ 'gray-name': item.couponState == 3 }]">
{{
item
.
couponName
}}
<view
:class=
"['coupon-name',
{ 'gray-name': item.couponState == 3 }]">
{{
item
.
couponName
}}
...
@@ -147,10 +147,10 @@
...
@@ -147,10 +147,10 @@
</template> -->
</template> -->
</view>
</view>
</view>
</view>
<view
class=
"store-info"
>
<view
class=
"store-info"
v-if=
"this.storeAddress"
>
<view
class=
"sprite-icon icon-icon-store"
></view>
<view
class=
"sprite-icon icon-icon-store"
></view>
<p
class=
"store-label"
>
附近门店
</p>
<p
class=
"store-label"
>
附近门店
</p>
<p
class=
"store-address"
>
{{
couponDetailInfo.merchant
Address }}
</p>
<p
class=
"store-address"
>
{{
store
Address }}
</p>
<view
class=
"copy-btn"
@
click=
"copyText"
><view
class=
"sprite-icon icon-icon-copy copy"
></view>
复制
</view>
<view
class=
"copy-btn"
@
click=
"copyText"
><view
class=
"sprite-icon icon-icon-copy copy"
></view>
复制
</view>
</view>
</view>
<view
:class=
"['usage-notice', couponDetailInfo.couponState == 2 ? 'claimed-usage':'']"
>
<view
:class=
"['usage-notice', couponDetailInfo.couponState == 2 ? 'claimed-usage':'']"
>
...
@@ -233,7 +233,8 @@ export default {
...
@@ -233,7 +233,8 @@ export default {
},
},
total
:
0
,
total
:
0
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
8
pageSize
:
12
,
storeAddress
:
''
}
}
},
},
props
:
{
props
:
{
...
@@ -252,6 +253,31 @@ export default {
...
@@ -252,6 +253,31 @@ export default {
console
.
log
(
'init'
);
console
.
log
(
'init'
);
this
.
getGrantRecord
()
this
.
getGrantRecord
()
},
},
getLocation
(
brandName
)
{
uni
.
getLocation
({
type
:
'gcj02'
,
geocode
:
true
,
// 设置为 true 可直接获取经纬度及城市信息
success
:
function
(
res
)
{
console
.
log
(
res
,
'===='
);
// 打印位置信息
// 处理位置数据
const
params
=
{
brandName
,
lat
:
res
.
latitude
,
lng
:
res
.
longitude
}
uni
.
$api
.
pointApi
.
searchStoreAddress
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'======'
);
this
.
storeAddress
=
res
})
},
fail
:
function
()
{
uni
.
showToast
({
title
:
'获取地址失败,将导致部分功能不可用'
,
icon
:
'none'
});
}
});
},
/** 接口调用 uni.$api.pointApi*/
/** 接口调用 uni.$api.pointApi*/
// 优惠券个数
// 优惠券个数
statisticsCount
()
{
statisticsCount
()
{
...
@@ -265,27 +291,37 @@ export default {
...
@@ -265,27 +291,37 @@ export default {
this
.
typeList
[
3
].
num
=
()
=>
`(
${
res
[
2
]}
)`
this
.
typeList
[
3
].
num
=
()
=>
`(
${
res
[
2
]}
)`
})
})
},
},
getGrantRecord
(
couponState
)
{
async
getGrantRecord
(
couponState
)
{
console
.
log
(
'查询优惠券列表'
);
try
{
const
{
pageNum
,
pageSize
}
=
this
uni
.
showLoading
({
const
params
=
{
mask
:
true
staffPhone
:
uni
.
$storage
.
get
(
'userInfo'
).
phone
,
})
pageNum
,
console
.
log
(
'查询优惠券列表'
);
pageSize
const
{
pageNum
,
pageSize
}
=
this
}
const
params
=
{
if
(
couponState
)
params
.
couponState
=
couponState
staffPhone
:
uni
.
$storage
.
get
(
'userInfo'
).
phone
,
console
.
log
(
params
,
'chaxun'
);
pageNum
,
uni
.
$api
.
pointApi
.
getGrantRecord
(
params
).
then
(
res
=>
{
pageSize
}
if
(
couponState
)
params
.
couponState
=
couponState
console
.
log
(
params
,
'chaxun'
);
const
res
=
await
uni
.
$api
.
pointApi
.
getGrantRecord
(
params
)
console
.
log
(
res
,
'========================'
,
pageNum
);
console
.
log
(
res
,
'========================'
,
pageNum
);
if
(
pageNum
==
1
)
{
if
(
pageNum
==
1
)
{
this
.
list
=
res
.
list
this
.
list
=
res
.
list
}
else
{
}
else
{
this
.
list
=
this
.
list
.
concat
(
res
.
list
)
this
.
list
=
this
.
list
.
concat
(
res
.
list
)
}
}
uni
.
hideLoading
()
this
.
total
=
res
.
total
this
.
total
=
res
.
total
this
.
nothing
=
res
.
length
?
true
:
false
this
.
nothing
=
res
.
length
?
true
:
false
})
this
.
statisticsCount
()
this
.
statisticsCount
()
}
catch
(
error
)
{
uni
.
showToast
({
title
:
'error'
,
});
}
},
},
changeType
(
index
,
name
)
{
changeType
(
index
,
name
)
{
console
.
log
(
index
,
name
);
console
.
log
(
index
,
name
);
...
@@ -324,10 +360,12 @@ export default {
...
@@ -324,10 +360,12 @@ export default {
// 使用优惠券
// 使用优惠券
this
.
showCouponPon
=
true
this
.
showCouponPon
=
true
// this.couponDetailInfo = row
// this.couponDetailInfo = row
this
.
getLocation
(
row
.
brandName
)
break
break
case
2
:
case
2
:
this
.
showCouponPon
=
true
this
.
showCouponPon
=
true
// this.couponDetailInfo = row
// this.couponDetailInfo = row
this
.
getLocation
(
row
.
brandName
)
break
break
default
:
default
:
return
return
...
@@ -335,6 +373,7 @@ export default {
...
@@ -335,6 +373,7 @@ export default {
},
},
closePop
()
{
closePop
()
{
this
.
showCouponPon
=
false
this
.
showCouponPon
=
false
this
.
storeAddress
=
''
},
},
// 领取使用按钮
// 领取使用按钮
handleUse
()
{
handleUse
()
{
...
@@ -363,7 +402,7 @@ export default {
...
@@ -363,7 +402,7 @@ export default {
// 复制
// 复制
copyText
()
{
copyText
()
{
uni
.
setClipboardData
({
uni
.
setClipboardData
({
data
:
this
.
couponDetailInfo
.
merchant
Address
,
data
:
this
.
store
Address
,
success
:
function
()
{
success
:
function
()
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'复制成功'
,
title
:
'复制成功'
,
...
@@ -567,13 +606,13 @@ export default {
...
@@ -567,13 +606,13 @@ export default {
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
background-color
:
#fff
;
background-color
:
#fff
;
width
:
toRpx
(
152
);
width
:
toRpx
(
240
);
height
:
toRpx
(
152
);
height
:
toRpx
(
152
);
margin
:
toRpx
(
40
)
auto
;
margin
:
toRpx
(
40
)
auto
;
border-radius
:
toRpx
(
32
);
border-radius
:
toRpx
(
32
);
.img
{
.img
{
width
:
toRpx
(
152
);
width
:
toRpx
(
240
);
height
:
toRpx
(
152
);
height
:
toRpx
(
152
);
border-radius
:
toRpx
(
32
);
border-radius
:
toRpx
(
32
);
}
}
...
@@ -1049,9 +1088,9 @@ export default {
...
@@ -1049,9 +1088,9 @@ export default {
.coupon-tips
{
.coupon-tips
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
color
:
#EF6F2C
;
color
:
#EF6F2C
;
font-size
:
toRpx
(
28
);
font-size
:
toRpx
(
28
);
padding-left
:
toRpx
(
36
);
}
}
.coupon-qrcode
{
.coupon-qrcode
{
width
:
100%
;
width
:
100%
;
...
@@ -1092,7 +1131,7 @@ export default {
...
@@ -1092,7 +1131,7 @@ export default {
}
}
}
}
.redeem-code
{
.redeem-code
{
padding
:
0
toRpx
(
132
);
padding
:
0
toRpx
(
40
);
margin
:
toRpx
(
48
)
0
toRpx
(
80
);
margin
:
toRpx
(
48
)
0
toRpx
(
80
);
.redeem-item
{
.redeem-item
{
display
:
flex
;
display
:
flex
;
...
@@ -1176,7 +1215,7 @@ export default {
...
@@ -1176,7 +1215,7 @@ export default {
color
:
#020305
;
color
:
#020305
;
font-weight
:
500
;
font-weight
:
500
;
margin-bottom
:
toRpx
(
16
);
margin-bottom
:
toRpx
(
16
);
padding
:
0
toRpx
(
32
);
padding
:
0
toRpx
(
26
);
}
}
.usage-notice
{
.usage-notice
{
background-color
:
#F5F7FA
;
background-color
:
#F5F7FA
;
...
...
components/HomeFrame/components/Point/index.vue
View file @
dc7d1f6
...
@@ -52,7 +52,9 @@
...
@@ -52,7 +52,9 @@
<
template
v-if=
"couponCount"
>
<
template
v-if=
"couponCount"
>
<view
class=
"coupon-card"
>
<view
class=
"coupon-card"
>
<view
v-for=
"item in couponList"
:key=
"item.id"
class=
"card-bg"
:class=
"item.isclaimed ? 'claimed-bg' : 'unclaimed-bg'"
>
<view
v-for=
"item in couponList"
:key=
"item.id"
class=
"card-bg"
:class=
"item.isclaimed ? 'claimed-bg' : 'unclaimed-bg'"
>
<view
class=
"coupon-img"
></view>
<view
class=
"coupon-img"
>
<image
mode=
"aspectFit"
:src=
"item.couUrl || require('@/assets/images/point/default-coupon.png')"
alt=
""
/>
</view>
<view
class=
"coupon-right"
>
<view
class=
"coupon-right"
>
<view
:class=
"['coupon-name', item.couponState == 2 ? 'unclaimed-name':'']"
>
{{
item
.
couponName
}}
</view>
<view
:class=
"['coupon-name', item.couponState == 2 ? 'unclaimed-name':'']"
>
{{
item
.
couponName
}}
</view>
<view
:class=
"['coupon-price', item.couponState == 2 ? 'unclaimed-price':'']"
>
价值¥
{{
item
.
lineationPrice
}}
</view>
<view
:class=
"['coupon-price', item.couponState == 2 ? 'unclaimed-price':'']"
>
价值¥
{{
item
.
lineationPrice
}}
</view>
...
@@ -370,6 +372,11 @@ export default {
...
@@ -370,6 +372,11 @@ export default {
width
:
toRpx
(
88
);
width
:
toRpx
(
88
);
height
:
toRpx
(
112
);
height
:
toRpx
(
112
);
border-radius
:
toRpx
(
16
);
border-radius
:
toRpx
(
16
);
image
{
width
:
toRpx
(
88
);
height
:
toRpx
(
112
);
border-radius
:
toRpx
(
16
);
}
}
}
.coupon-right
{
.coupon-right
{
margin-left
:
toRpx
(
24
);
margin-left
:
toRpx
(
24
);
...
...
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