Commit f166c481 by 李伟康

提交

1 parent b4ab48ca
import { preReleaseAppId } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
let index = 3
let index = 2
/**
*
......
......@@ -99,7 +99,7 @@ module.exports = {
/** 获取商品关联优惠券列表 */
getGoodscouponList(data) {
return api.fetch('scrm.api.shopmall.weapp.goods.user.coupons.get', data)
return api.fetch('scrm.api.coupon.seahorse.knife.goods.list', data)
},
/** 领取商品详情优惠券 */
......
......@@ -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 == 3}}">无期限</view>
<!-- 已领取,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 == 3}}">无期限</view>
</view>
<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" bind:tap="toDetail" wx:elif="{{item.couponStatus == 1}}">已领取</view>
<view class="already" wx:if="{{item.couponStatus == 1}}">
<view class="box_btn_color_been" bind:tap="toDetail" wx:elif="{{item.couponStatus == 1}}">已领取</view> -->
<block wx:if="{{item.couponStatus == 1}}">
<view class="already">
<glsx-image webp src="coupons/been.png" />
</view>
</block>
</block>
<block wx:else>
<view class="circle-selected" data-item="{{item}}" data-index="{{index}}" wx:if="{{item.isChecked}}" bindtap="selectCoupon">
<glsx-image webp src="coupons/select.png" />
......@@ -66,9 +66,6 @@
</view>
</block> -->
</scroll-view>
</view>
</view>
......
......@@ -11,7 +11,7 @@
display: flex;
align-items: center;
position: relative;
margin-top: 24rpx;
margin: 24rpx;
}
.gray {
......@@ -24,7 +24,7 @@
display: flex;
align-items: center;
position: relative;
margin-top: 24rpx;
margin-top: 24rpx auto 0;
}
.left_icon_box {
......
......@@ -394,21 +394,21 @@ Page({
})
},
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
id = id ? id : this.data.id
wx.p.api.shopmallApi
.getGoodscouponList({
id
})
.then(({
wx.p.api.shopmallApi.getGoodscouponList({
goodsId: id,
merchantId
}).then(({
code,
data,
message
}) => {
let list =
data &&
data.map(item => {
let list = data && data.map(item => {
if (item.effectiveEndTime || item.effectiveStartTime) {
item.effectiveEndTime = new Date(item.effectiveEndTime).format('yyyy.MM.dd')
item.effectiveStartTime = new Date(item.effectiveStartTime).format('yyyy.MM.dd')
......
......@@ -49,7 +49,6 @@
"tabSize": 2
},
"condition": {},
"libVersion": "2.24.4",
"packOptions": {
"ignore": [
{
......@@ -59,6 +58,5 @@
],
"include": []
},
"appid": "wx2a9f38eb8e39b823",
"projectname": "hmd-0817"
"appid": "wx2a9f38eb8e39b823"
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!