Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
a2421796
Commit
a2421796
authored
Aug 03, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券
parent
b2ebea03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
7 deletions
+35
-7
packageDetail.js
src/api/packageDetail.js
+8
-0
iconfont.css
src/assets/iconfont/iconfont.css
+7
-3
packageDetails.vue
src/pages/packageDetails/packageDetails.vue
+20
-4
No files found.
src/api/packageDetail.js
View file @
a2421796
...
...
@@ -22,3 +22,11 @@ export function getCouponShopList(prodId, shopId) {
method
:
'GET'
,
});
}
// 商家商品优惠券
export
function
receiveCoupon
(
data
)
{
return
request
({
url
:
`/sgyrdd/coupon/receiveCoupon`
,
method
:
'POST'
,
data
,
});
}
src/assets/iconfont/iconfont.css
View file @
a2421796
@font-face
{
font-family
:
"iconfont"
;
/* Project id 4633414 */
src
:
url('//at.alicdn.com/t/c/font_4633414_
jxzjjul419.woff2?t=1722502888587
')
format
(
'woff2'
),
url('//at.alicdn.com/t/c/font_4633414_
jxzjjul419.woff?t=1722502888587
')
format
(
'woff'
),
url('//at.alicdn.com/t/c/font_4633414_
jxzjjul419.ttf?t=1722502888587
')
format
(
'truetype'
);
src
:
url('//at.alicdn.com/t/c/font_4633414_
ne2afa4bsr9.woff2?t=1722652845956
')
format
(
'woff2'
),
url('//at.alicdn.com/t/c/font_4633414_
ne2afa4bsr9.woff?t=1722652845956
')
format
(
'woff'
),
url('//at.alicdn.com/t/c/font_4633414_
ne2afa4bsr9.ttf?t=1722652845956
')
format
(
'truetype'
);
}
.iconfont
{
...
...
@@ -13,6 +13,10 @@
-moz-osx-font-smoothing
:
grayscale
;
}
.icon-lianhe40
:before
{
content
:
"\e866"
;
}
.icon-shuangxiajiantou
:before
{
content
:
"\e660"
;
}
...
...
src/pages/packageDetails/packageDetails.vue
View file @
a2421796
...
...
@@ -38,7 +38,14 @@
<text
class=
"title"
>
{{
item
.
activityName
}}
</text>
<view
class=
"headbox"
>
<text
class=
"time"
>
{{
item
.
endTime
}}
过期
</text>
<view
class=
"btn"
@
click=
"getCoupon(item)"
>
立即领取
</view>
<view
v-if=
"item.numState === 0"
class=
"btn"
@
click=
"getCoupon(item)"
>
立即领取
</view>
<i
v-else
class=
"iconfont icon-lianhe40"
style=
"font-size: 120rpx; color: #efefef"
></i>
</view>
</view>
<view
class=
"foot"
>
...
...
@@ -63,6 +70,7 @@
</view>
</view>
</view>
<wd-status-tip
v-if=
"productCoupons.length === 0"
image=
"content"
tip=
"暂无优惠券"
/>
</view>
</wd-popup>
<!-- 轮播 -->
...
...
@@ -223,9 +231,8 @@
</
template
>
<
script
setup
>
import
{
getProdDetail
,
getCollect
,
getCouponShopList
}
from
'@/api/packageDetail'
;
import
{
getProdDetail
,
getCollect
,
getCouponShopList
,
receiveCoupon
}
from
'@/api/packageDetail'
;
import
{
getStoreInformation
}
from
'@/api/shop'
;
import
{
useMessage
}
from
'../../../node_modules/wot-design-uni'
;
const
prodInfo
=
ref
({});
const
prodRlue
=
ref
({});
const
myProdId
=
ref
(
''
);
...
...
@@ -332,7 +339,13 @@ function collectionFn() {
* 领取优惠券
* @param {*} item
*/
function
getCoupon
(
item
)
{}
function
getCoupon
(
item
)
{
receiveCoupon
([
item
.
couponYzfId
]).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
item
.
numState
=
1
;
}
});
}
function
getLocationFn
()
{
xma
.
getLocation
({
type
:
'wgs84'
,
...
...
@@ -394,6 +407,9 @@ page {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#fff
;
position
:
relative
;
top
:
0
;
width
:
100%
;
.title
{
font-size
:
15
*
2rpx
;
...
...
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