Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
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 f166c481
authored
Aug 25, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
b4ab48ca
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
24 deletions
api/env/index.js
api/module/shopmall.js
packageMall/components/CouponGoods/CouponGoods.wxml
packageMall/components/CouponGoods/CouponGoods.wxss
packageMall/pages/detail/detail.js
project.config.json
api/env/index.js
View file @
f166c48
import
{
preReleaseAppId
}
from
'~/config'
import
{
preReleaseAppId
}
from
'~/config'
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
let
index
=
3
let
index
=
2
/**
/**
*
*
...
...
api/module/shopmall.js
View file @
f166c48
...
@@ -99,7 +99,7 @@ module.exports = {
...
@@ -99,7 +99,7 @@ module.exports = {
/** 获取商品关联优惠券列表 */
/** 获取商品关联优惠券列表 */
getGoodscouponList
(
data
)
{
getGoodscouponList
(
data
)
{
return
api
.
fetch
(
'scrm.api.
shopmall.weapp.goods.user.coupons.ge
t'
,
data
)
return
api
.
fetch
(
'scrm.api.
coupon.seahorse.knife.goods.lis
t'
,
data
)
},
},
/** 领取商品详情优惠券 */
/** 领取商品详情优惠券 */
...
...
packageMall/components/CouponGoods/CouponGoods.wxml
View file @
f166c48
...
@@ -23,19 +23,19 @@
...
@@ -23,19 +23,19 @@
<view class="h4_text drive" wx:if="{{item.couponStatus == 0&&item.effectiveType == 2}}">{{item.effectiveStartTime}}-{{item.effectiveEndTime}}</view>
<view class="h4_text drive" wx:if="{{item.couponStatus == 0&&item.effectiveType == 2}}">{{item.effectiveStartTime}}-{{item.effectiveEndTime}}</view>
<view class="h4_text drive" wx:if="{{item.couponStatus == 0&&item.effectiveType == 3}}">无期限</view>
<view class="h4_text drive" wx:if="{{item.couponStatus == 0&&item.effectiveType == 3}}">无期限</view>
<!-- 已领取,effectiveType == 1 或者2,都显示时间段,effectiveType == 3 无限制 -->
<!-- 已领取,effectiveType == 1 或者2,都显示时间段,effectiveType == 3 无限制 -->
<view class="h4_text drive" wx:if="{{item.couponStatus == 1&&item.effectiveType == 1||item.couponStatus == 1&&item.effectiveType == 2 }}">{{item.effectiveStartTime}}-{{item.effectiveEndTime}}</view>
<view class="h4_text drive" wx:if="{{item.couponStatus == 1&&item.effectiveType == 1||item.couponStatus == 1&&item.effectiveType == 2 }}">{{item.effectiveStartTime}}-{{item.effectiveEndTime}}</view>
<view class="h4_text drive" wx:if="{{item.couponStatus == 1&&item.effectiveType == 3}}">无期限</view>
<view class="h4_text drive" wx:if="{{item.couponStatus == 1&&item.effectiveType == 3}}">无期限</view>
</view>
</view>
<block wx:if="{{order == 0}}">
<block wx:if="{{order == 0}}">
<view class="box_btn box_btn_color box_btn_color_grey" bindtap="toDetail" wx:if="{{item.couponStatus == 0&&item.residueAmount >0}}" data-item="{{item}}" bindtap="getCoupon">领取</view>
<
!-- <
view class="box_btn box_btn_color box_btn_color_grey" bindtap="toDetail" wx:if="{{item.couponStatus == 0&&item.residueAmount >0}}" data-item="{{item}}" bindtap="getCoupon">领取</view>
<view class="box_btn_color_been_gray " bind:tap="toDetail" wx:elif="{{item.couponStatus != 1&&item.residueAmount ==0}}">已抢光</view>
<view class="box_btn_color_been_gray " bind:tap="toDetail" wx:elif="{{item.couponStatus != 1&&item.residueAmount ==0}}">已抢光</view>
<view class="box_btn_color_been" bind:tap="toDetail" wx:elif="{{item.couponStatus == 1}}">已领取</view>
<view class="box_btn_color_been" bind:tap="toDetail" wx:elif="{{item.couponStatus == 1}}">已领取</view> -->
<view class="already" wx:if="{{item.couponStatus == 1}}">
<block wx:if="{{item.couponStatus == 1}}">
<view class="already">
<glsx-image webp src="coupons/been.png" />
<glsx-image webp src="coupons/been.png" />
</view>
</view>
</block>
</block>
</block>
<block wx:else>
<block wx:else>
<view class="circle-selected" data-item="{{item}}" data-index="{{index}}" wx:if="{{item.isChecked}}" bindtap="selectCoupon">
<view class="circle-selected" data-item="{{item}}" data-index="{{index}}" wx:if="{{item.isChecked}}" bindtap="selectCoupon">
<glsx-image webp src="coupons/select.png" />
<glsx-image webp src="coupons/select.png" />
...
@@ -66,9 +66,6 @@
...
@@ -66,9 +66,6 @@
</view>
</view>
</block> -->
</block> -->
</scroll-view>
</scroll-view>
</view>
</view>
</view>
</view>
...
...
packageMall/components/CouponGoods/CouponGoods.wxss
View file @
f166c48
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
position: relative;
position: relative;
margin
-top
: 24rpx;
margin: 24rpx;
}
}
.gray {
.gray {
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
position: relative;
position: relative;
margin-top: 24rpx;
margin-top: 24rpx
auto 0
;
}
}
.left_icon_box {
.left_icon_box {
...
...
packageMall/pages/detail/detail.js
View file @
f166c48
...
@@ -394,21 +394,21 @@ Page({
...
@@ -394,21 +394,21 @@ Page({
})
})
},
},
async
getGoodscouponList
(
id
)
{
async
getGoodscouponList
(
id
)
{
const
res
=
await
wx
.
p
.
router
.
intercept
(
false
)
const
res
=
await
wx
.
p
.
router
.
intercept
(
false
),
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
if
(
res
)
return
if
(
res
)
return
id
=
id
?
id
:
this
.
data
.
id
id
=
id
?
id
:
this
.
data
.
id
wx
.
p
.
api
.
shopmallApi
wx
.
p
.
api
.
shopmallApi
.
getGoodscouponList
({
.
getGoodscouponList
({
goodsId
:
id
,
id
merchantId
})
}).
then
(({
.
then
(({
code
,
code
,
data
,
data
,
message
message
})
=>
{
})
=>
{
let
list
=
let
list
=
data
&&
data
.
map
(
item
=>
{
data
&&
data
.
map
(
item
=>
{
if
(
item
.
effectiveEndTime
||
item
.
effectiveStartTime
)
{
if
(
item
.
effectiveEndTime
||
item
.
effectiveStartTime
)
{
item
.
effectiveEndTime
=
new
Date
(
item
.
effectiveEndTime
).
format
(
'yyyy.MM.dd'
)
item
.
effectiveEndTime
=
new
Date
(
item
.
effectiveEndTime
).
format
(
'yyyy.MM.dd'
)
item
.
effectiveStartTime
=
new
Date
(
item
.
effectiveStartTime
).
format
(
'yyyy.MM.dd'
)
item
.
effectiveStartTime
=
new
Date
(
item
.
effectiveStartTime
).
format
(
'yyyy.MM.dd'
)
...
...
project.config.json
View file @
f166c48
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
"tabSize"
:
2
"tabSize"
:
2
},
},
"condition"
:
{},
"condition"
:
{},
"libVersion"
:
"2.24.4"
,
"packOptions"
:
{
"packOptions"
:
{
"ignore"
:
[
"ignore"
:
[
{
{
...
@@ -59,6 +58,5 @@
...
@@ -59,6 +58,5 @@
],
],
"include"
:
[]
"include"
:
[]
},
},
"appid"
:
"wx2a9f38eb8e39b823"
,
"appid"
:
"wx2a9f38eb8e39b823"
"projectname"
:
"hmd-0817"
}
}
\ No newline at end of file
\ No newline at end of file
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