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
3c729c45
Commit
3c729c45
authored
Jun 02, 2021
by
王波
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'b-template-component-taskConfig' into 'b-template-component'
模板任务配置 See merge request
!26
parents
97b155f9
7a8ecf50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
+20
-7
items-config.axml
client/components/task/items-config/items-config.axml
+2
-2
add.js
client/pages/activity/add/add.js
+18
-5
No files found.
client/components/task/items-config/items-config.axml
View file @
3c729c45
<view class="items-config">
<view class="items-config">
<text
style="font-size: 12px">{{itemIds ? `已选择${(itemIds + '').split(',').length}个商品` : ''
}} </text>
<text
a:if="{{itemIds}}" style="font-size: 12px; margin-right: 10px">{{`已选择${(itemIds + '').split(',').length}个商品`
}} </text>
<button type="primary" text size="small" onTap="onOpenDialog">{{itemIds ? '更换商品' : '选择商品'}}</button>
<button type="primary"
style="height:auto;"
text size="small" onTap="onOpenDialog">{{itemIds ? '更换商品' : '选择商品'}}</button>
<items-dialog
<items-dialog
onUpdateBabyChoose="onUpdateBabyChoose"
onUpdateBabyChoose="onUpdateBabyChoose"
browseItemIds="{{itemIds + ''}}"
browseItemIds="{{itemIds + ''}}"
...
...
client/pages/activity/add/add.js
View file @
3c729c45
...
@@ -21,11 +21,12 @@ var validator = new schema(descriptor)
...
@@ -21,11 +21,12 @@ var validator = new schema(descriptor)
const
tasks
=
{
const
tasks
=
{
<%
for
(
var
i
=
0
;
i
<
configList
.
length
;
++
i
)
{
%>
<%
for
(
var
i
=
0
;
i
<
configList
.
length
;
++
i
)
{
%>
<%-
taskKeys
.
includes
(
configList
[
i
].
key
)
&&
configList
[
i
].
key
!==
'label'
?
`
${
configList
[
i
].
key
}
:{
<%-
taskKeys
.
includes
(
configList
[
i
].
key
)
&&
configList
[
i
].
key
!==
'label'
?
`
${
configList
[
i
].
key
}
:{
value:"",
value:
${
configList
[
i
].
value
||
'""'
}
,
taskRateType:"",
taskRateType:
${
configList
[
i
].
taskRateType
?
`TASK_RATE_TYPE["
${
configList
[
i
].
taskRateType
}
"]`
:
'""'
}
,
times:"",
times:
${
configList
[
i
].
times
||
'""'
}
,
title:"",
title:"
${
configList
[
i
].
name
||
''
}
",
link:""
link:"",
itemIds:""
},`
:
''
%><%
}
%>
},`
:
''
%><%
}
%>
}
}
...
@@ -220,6 +221,18 @@ Component({
...
@@ -220,6 +221,18 @@ Component({
}
}
return
prizeInfoListCopy
return
prizeInfoListCopy
},
},
// 任务配置选择商品回调
onItemIdsChange
(
ids
,
dataName
)
{
this
.
setData
({
tasks
:
{
...
this
.
data
.
tasks
,
[
dataName
]:
{
...
this
.
data
.
tasks
[
dataName
],
itemIds
:
ids
}
},
});
},
backList
()
{
backList
()
{
this
.
$page
.
$router
.
go
(
-
1
)
this
.
$page
.
$router
.
go
(
-
1
)
}
}
...
...
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