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
8861a373
Commit
8861a373
authored
Aug 02, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改测试环境
parent
bdd970d7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
10 deletions
+72
-10
packageDetail.js
src/api/packageDetail.js
+7
-0
packageDetails.vue
src/pages/packageDetails/packageDetails.vue
+61
-5
shop.vue
src/pages/shop/shop.vue
+3
-4
vite.config.ts
vite.config.ts
+1
-1
No files found.
src/api/packageDetail.js
View file @
8861a373
...
...
@@ -15,3 +15,10 @@ export function getCollect(data) {
method
:
'GET'
,
});
}
// 商家商品优惠券
export
function
getCouponShopList
(
prodId
,
shopId
)
{
return
request
({
url
:
`/sgyrdd/coupon/couponGoodsShopList/
${
shopId
}
/
${
prodId
}
`
,
method
:
'GET'
,
});
}
src/pages/packageDetails/packageDetails.vue
View file @
8861a373
<
template
>
<view
class=
"package-details"
>
<wd-popup
v-model=
"showpopup"
position=
"bottom"
custom-style=
"height: 50%;"
@
close=
"handleClose"
:safe-area-inset-bottom=
"true"
custom-class=
"popup"
></wd-popup>
<!-- 轮播 -->
<view
class=
"swiper"
>
<wd-swiper
...
...
@@ -17,6 +25,13 @@
<!-- 轮播-end -->
<!-- card -->
<view
class=
"package-details-card"
>
<wd-overlay
:show=
"show"
@
click=
"show = false"
>
<view
class=
"wrapper"
>
<view
class=
"block"
>
{{
productCoupons
[
0
].
activityNotes
}}
</view>
</view>
</wd-overlay>
<view
class=
"package-details-num"
>
<view
class=
"num"
>
<text
class=
"icon"
>
¥
</text>
...
...
@@ -31,10 +46,10 @@
<text
class=
"yh-name"
>
优惠:
</text>
<view
class=
"bt-icon"
>
<image
src=
"@/static/shop/bt-icon.png"
></image>
<text
class=
"yh-name lj"
>
立减10元
</text>
<text
class=
"yh-name lj"
>
{{
productCoupons
[
0
].
activityName
}}
</text>
</view>
<view
class=
"ylq-icon"
>
已领取
<view
class=
"ylq-icon"
@
click=
"showpopup = true"
>
{{
productCoupons
[
0
].
numState
===
0
?
'未领取'
:
'已领取'
}}
<wd-icon
name=
"arrow-right"
size=
"16px"
></wd-icon>
</view>
</view>
...
...
@@ -52,7 +67,7 @@
<i
class=
"iconfont icon icon-jinggao"
/>
随时用
</view>
<i
class=
"iconfont jg icon-jinggao"
/>
<i
@
click=
"alert"
class=
"iconfont jg icon-jinggao"
/>
</view>
<view
class=
"xz"
>
<text
class=
"yh-name"
>
限制:
</text>
...
...
@@ -148,8 +163,10 @@
</
template
>
<
script
setup
>
import
{
getProdDetail
,
getCollect
}
from
'@/api/packageDetail'
;
import
{
getProdDetail
,
getCollect
,
getCouponShopList
}
from
'@/api/packageDetail'
;
import
{
getStoreInformation
}
from
'@/api/shop'
;
import
{
useMessage
}
from
'../../../node_modules/wot-design-uni'
;
const
message
=
useMessage
();
const
prodInfo
=
ref
({});
const
prodRlue
=
ref
({});
const
myProdId
=
ref
(
''
);
...
...
@@ -157,19 +174,34 @@ const current = ref(0);
const
showRlue
=
ref
(
true
);
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
shopInfo
=
ref
({});
const
show
=
ref
(
false
);
const
currentLatitudeAndLongitude
=
ref
({});
const
shopId
=
ref
(
''
);
const
showpopup
=
ref
(
false
);
// 商品优惠券
const
productCoupons
=
ref
([]);
onLoad
((
options
)
=>
{
const
{
prodId
}
=
options
;
myProdId
.
value
=
prodId
;
getProdDetailFn
(
prodId
).
then
((
shopId
)
=>
{
getStoreInformationFn
(
shopId
);
getCouponShopListFn
(
prodId
,
shopId
);
});
});
onShow
(()
=>
{
// 获取位置
getLocationFn
();
});
function
alert
()
{
show
.
value
=
true
;
}
/**
* 关闭弹窗
*/
function
handleClose
()
{
showpopup
.
value
=
false
;
}
/**
* 获取套餐详情
* @param {String} prodId
...
...
@@ -198,6 +230,16 @@ function getProdDetailFn(prodId) {
});
});
}
/**
* 获取商品优惠券列表
*/
function
getCouponShopListFn
(
prodId
,
shopId
)
{
getCouponShopList
(
prodId
,
shopId
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
productCoupons
.
value
=
res
.
data
;
}
});
}
/**
* 获取收藏
*/
...
...
@@ -298,6 +340,20 @@ page {
flex-direction
:
column
;
position
:
relative
;
margin-top
:
-40rpx
;
.wrapper
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
100%
;
}
.block
{
padding
:
20rpx
;
box-sizing
:
border-box
;
background-color
:
#fff
;
font-size
:
24rpx
;
color
:
#767676
;
}
.package-details-num
{
display
:
flex
;
align-items
:
flex-end
;
...
...
src/pages/shop/shop.vue
View file @
8861a373
...
...
@@ -66,13 +66,12 @@
<text
class=
"shop-address-detail"
>
{{
shopInfo
.
shopAddress
}}
</text>
</view>
<view
class=
"shop-map-phone"
>
<image
mode=
"aspectFill"
class=
"img1"
src=
"@/static/shop/map.png"
></image>
<image
mode=
"aspectFill"
@
tap=
"callShopPhone(shopInfo.phone)"
class=
"img1
"
src=
"@/static/shop/
map
.png"
mode=
"aspectFill
"
src=
"@/static/shop/
phone
.png"
></image>
<image
mode=
"aspectFill"
src=
"@/static/shop/phone.png"
></image>
</view>
</view>
</view>
...
...
vite.config.ts
View file @
8861a373
...
...
@@ -41,7 +41,7 @@ export default defineConfig({
// 代理配置
proxy
:
{
'/api'
:
{
target
:
'http://
192.168.0.147:9999
'
,
target
:
'http://
test2.rhhzkj.com:8080
'
,
changeOrigin
:
true
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
''
),
},
...
...
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