Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-limited-sell-miniapp
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
肖亚东
6 years ago
Commit
523a48430556b7af7fe4a593e658f89c637bf8bc
1 parent
d0c2e7f3
新增是否APP专享和是否新客功能开发
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
11 deletions
app/pages/index/index.js
app/pages/index/index.wxml
app/pages/product/detail/detail.js
app/pages/product/detail/detail.wxml
app/pages/index/index.js
View file @
523a484
...
...
@@ -149,9 +149,9 @@ Page({
console
.
log
(
e
);
let
id
=
e
.
currentTarget
.
dataset
.
id
;
let
limitProductCode
=
e
.
currentTarget
.
dataset
.
code
;
let
appOnly
=
e
.
currentTarget
.
dataset
.
appOnly
;
let
isApp
=
e
.
currentTarget
.
dataset
.
isApp
;
if
(
appOnly
)
{
if
(
isApp
)
{
wx
.
showModal
({
title
:
''
,
content
:
'请去有货APP参加'
,
...
...
app/pages/index/index.wxml
View file @
523a484
...
...
@@ -20,10 +20,10 @@
<view class='list-container'>
<block wx:for='{{listData}}' wx:key='index' wx:for-item='nowList'>
<block wx:if='{{index === tabSelected}}'>
<view class='item-container' wx:for='{{nowList.limitProductVoList}}' wx:key="listItem.id" wx:for-item='listItem' data-id='{{listItem.id}}' data-code='{{listItem.limitProductCode}}' bindtap='navigateToDetail'>
<view class='item-container' wx:for='{{nowList.limitProductVoList}}' wx:key="listItem.id" wx:for-item='listItem'
wx:for-index="index"
data-id='{{listItem.id}}' data-code='{{listItem.limitProductCode}}' bindtap='navigateToDetail'>
<image src="{{helper.image(listItem.defaultUrl, 690, 460, 1)}}"></image>
<image wx:if="{{true}}" src="../../static/images/no1@3x.png" class="rank" />
<image wx:if="{{true}}" src="../../static/images/app_only@3x.png" class="app_only" />
<image wx:if="{{index < 5}}" src="../../static/images/no{{index+1}}@3x.png" class="rank" />
<image wx:if="{{listItem.isApp}}" src="../../static/images/app_only@3x.png" class="app_only" />
<image wx:if="{{true}}" src="../../static/images/sold_out@3x.png" class="sold_out" />
<view class='item-content'>
<text class='item-name'>{{listItem.productName}}</text>
...
...
app/pages/product/detail/detail.js
View file @
523a484
...
...
@@ -389,6 +389,9 @@ Page(Object.assign({
productSourceType
=
PRODUCT_SOURCE_TYPE
.
SHARE
;
}
let
isFollowServiceNumber
=
res
.
data
.
isFollowServiceNumber
;
let
isNew
=
res
.
data
.
isNew
;
this
.
setData
({
productSkn
:
res
.
data
.
productSkn
?
res
.
data
.
productSkn
:
''
,
productName
:
res
.
data
.
productName
?
res
.
data
.
productName
:
''
,
...
...
@@ -402,7 +405,9 @@ Page(Object.assign({
activityId
:
res
.
data
.
activityId
?
res
.
data
.
activityId
:
''
,
productDesc
,
snapData
,
productSourceType
productSourceType
,
isFollowServiceNumber
,
isNew
,
});
}
else
{
return
Promise
.
reject
();
...
...
@@ -660,7 +665,7 @@ Page(Object.assign({
},
//倒计时结束
endCountdown
()
{
this
.
reload
();
},
assistCancel
()
{
this
.
reload
();
...
...
app/pages/product/detail/detail.wxml
View file @
523a484
...
...
@@ -70,7 +70,7 @@
<action-bar wx:if="{{assistStatus === 1 || assistStatus === 3}}">
<form bindsubmit="assistShare" report-submit='true'>
<view class="bottom1-action">
<button class="as-bottom ok" formType="submit">
邀请新用户助力获取限购码
</button>
<button class="as-bottom ok" formType="submit">
{{isNew ? '邀请新用户助力获取限购码' : '邀请好友助力获取限购码'}}
</button>
<view class="help-wrapper" bindtap="goHelp">
<image class="help" src="../../../static/images/XD_q_ic@3x.png"></image>
</view>
...
...
@@ -202,7 +202,8 @@
<block wx:elif="{{showStatus === 6}}">
<action-bar wx:if="{{productSourceType === 1}}">
<view class="bottom1-action">
<view class="as-bottom confirm" bindtap="saleRemind">关注公众号获得发售提醒</view>
<view wx:if="{{isFollowServiceNumber}}" class="as-bottom cancel" bindtap="buyNow">查看商品详情</view>
<view wx:else class="as-bottom confirm" bindtap="saleRemind">关注公众号获得发售提醒</view>
</view>
</action-bar>
...
...
@@ -218,7 +219,7 @@
<action-bar wx:else>
<view class="bottom1-action">
<view class="as-bottom cancel">
关注公众号获得发售提醒
</view>
<view class="as-bottom cancel">
即将开售
</view>
</view>
</action-bar>
</block>
...
...
@@ -273,7 +274,7 @@
<view class="bottom1-action">
<view class="action-list" style="width: 570rpx;">
<view class="as-bottom confirm width250" style="width: 230rpx;" bindtap="goQueueList">排队中,查看详情</view>
<view class="as-bottom ok width250" style="width: 230rpx;" bindtap="assistShare">
邀请好友助力排队
</view>
<view class="as-bottom ok width250" style="width: 230rpx;" bindtap="assistShare">
{{isNew ? '邀请新用户助力排队' : '邀请好友助力排队'}}
</view>
</view>
<view class="help-wrapper" bindtap="goHelp">
...
...
Please
register
or
login
to post a comment