Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
2a82aa82
Commit
2a82aa82
authored
Jun 04, 2021
by
王波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memberBenefit
parent
c4468795
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
prize-dialog.axml
client/components/dialog/prize-dialog/prize-dialog.axml
+13
-1
prize-dialog.js
client/components/dialog/prize-dialog/prize-dialog.js
+13
-0
No files found.
client/components/dialog/prize-dialog/prize-dialog.axml
View file @
2a82aa82
...
...
@@ -28,7 +28,19 @@
<!-- <option a:if="{{typeChecked.includes(5)}}" value="{{5}}">降级奖品</option> -->
</select>
</form-item>
<form-item a:if="{{[EQUITY_TYPE].includes(prizeInitData.type)}}" validateState="{{choosePrizeTips.status}}" style="width:100%" size="large" help="{{choosePrizeTips.content}}" class="probability-prize-content-formItem probability-prize-content-formItem-choosePrize" label="选择奖品" required>
<%if(buttons.includes('useMemberBenefit')) {%>
<%- `<form-item a:if="{{[EQUITY_TYPE].includes(prizeInitData.type)}}" style="width:100%" size="large" class="probability-prize-content-formItem" label="权益类型" required>
<radio-group disabled="{{isEdit}}" value="{{prizeInitData.benefitType}}" onChange="onBenefitTypeTypeChange">
<radio value="{{1}}">普通权益</radio>
<radio value="{{2}}">会员权益</radio>
</radio-group>
</form-item>` %>
<%}%>
<form-item a:if="{{[EQUITY_TYPE].includes(prizeInitData.type) && prizeInitData.benefitType == 2}}" validateState="{{choosePrizeTips.status}}" style="width:100%" size="large" help="{{choosePrizeTips.content}}" class="probability-prize-content-formItem probability-prize-content-formItem-choosePrize" label="权益隐藏id" required>
<input class="probability-prize-content-input" data-name="ename" onChange="onChangePrizeValue" value="{{prizeInitData.ename}}" hasLimitHint="true" name="权益隐藏id" defaultValue="{{prizeDialogEdit ? prizeDialogData.record.ename : prizeInitData.ename}}" placeholder="请输入权益隐藏id"/>
</form-item>
<form-item a:if="{{[EQUITY_TYPE].includes(prizeInitData.type) && prizeInitData.benefitType == 1}}" validateState="{{choosePrizeTips.status}}" style="width:100%" size="large" help="{{choosePrizeTips.content}}" class="probability-prize-content-formItem probability-prize-content-formItem-choosePrize" label="选择奖品" required>
<view class="probability-prize-content-formitem-choosePrize-wrap">
<input a:if="{{prizeInitData.ename}}" class="probability-prize-content-input" style="margin-right:10px" onChange="changeInput" maxLength="10" value="{{prizeInitData.name}}" hasLimitHint="true" name="活动名称" defaultValue="{{prizeDialogEdit ? prizeDialogData.record.name : prizeInitData.name}}" placeholder="请选择奖品"/>
<view a:if="{{!isEdit}}" class="probability-prize-content-formitem-goequity" onTap="navigateToPlugin" type="primary">{{prizeInitData.ename ? '重新选择' : '选择奖品'}}</view>
...
...
client/components/dialog/prize-dialog/prize-dialog.js
View file @
2a82aa82
...
...
@@ -29,6 +29,7 @@ const INIT_DATA = {
rank
:
""
,
amount
:
""
,
itemId
:
""
,
benefitType
:
1
,
};
Component
({
...
...
@@ -98,6 +99,7 @@ Component({
switchStock
:
STOCK_NO_LIMIT
,
isBackUp
:
false
,
useStock
:
0
,
benefitType
:
1
,
rank
:
""
,
amount
:
""
,
itemId
:
""
,
...
...
@@ -247,6 +249,15 @@ Component({
},
});
},
onBenefitTypeTypeChange
(
e
)
{
let
value
=
e
.
detail
.
value
;
this
.
setData
({
prizeInitData
:
{
...
this
.
data
.
prizeInitData
,
benefitType
:
value
},
});
},
navigateToPlugin
()
{
clearTimeout
(
this
.
$page
.
data
.
backPageTimeOut
);
my
.
navigateTo
({
...
...
@@ -388,6 +399,7 @@ Component({
switchStock
,
isBackUp
,
endTime
,
benefitType
,
rank
,
itemId
,
amount
,
...
...
@@ -582,6 +594,7 @@ Component({
prizeDataType
:
+
prizeDataType
,
itemId
,
amount
,
benefitType
,
...
rest
,
};
// 自定义新增字段
...
...
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