Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
marubi-wish-list-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
6ea0086f
authored
2019-08-01 17:33:39 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
版本提交
1 parent
e56c47ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
10 deletions
src/component/tips-wish-comp/tips-wish-comp.js
src/component/tips-wish-comp/tips-wish-comp.wxml
src/pages/create-wish/create-wish.js
src/pages/create-wish/create-wish.wxml
src/component/tips-wish-comp/tips-wish-comp.js
View file @
6ea0086
...
...
@@ -8,7 +8,11 @@ Component({
wishList
:
{
type
:
Object
,
value
:
[],
}
},
eleVal
:
{
type
:
Number
,
value
:
0
,
},
},
data
:
{
// 这里是一些组件内部数据
...
...
src/component/tips-wish-comp/tips-wish-comp.wxml
View file @
6ea0086
...
...
@@ -17,7 +17,7 @@
<view wx:if="{{wishList[1]}}" class="row row2">
<view class="wish-item ">
<view class="desc">
<view class="name">{{wishList[1].productName}}</view>
<view class="name">{{wishList[1].productName}}</view>
<view class="val">需弹力值:{{wishList[1].conditionElasticValue}}</view>
</view>
<view class="prod">
...
...
@@ -26,7 +26,7 @@
</view>
</view>
<view wx:if="{{wishList[2]}}" class="row">
<view
class="wish-item">
<view class="wish-item">
<view class="prod">
<image mode="widthFix" src="../../image/prize/prize-{{wishList[2].tag}}.png" />
</view>
...
...
@@ -40,7 +40,7 @@
<view class="wish-val">
<image class="icon" mode="widthFix" src="../../image/oss/question/question-light.png" />
累计心愿单所需弹力值:
<span class="val">
2500
</span>
<span class="val">
{{eleVal}}
</span>
</view>
</view>
<view class="btn-wrap">
...
...
src/pages/create-wish/create-wish.js
View file @
6ea0086
...
...
@@ -21,7 +21,7 @@ Page({
curStatus
:
1
,
// 当前场景
candidate
:
[],
// 心愿候选列表
myWishList
:
[],
// 我的心愿列表
val
Total
:
0
,
// 心愿单累计需要弹力值
val
ElasticTotal
:
0
,
// 心愿单累计需要弹力值
curWish
:
{},
// 当前选择心愿
userInfo
:
{}
},
...
...
@@ -108,12 +108,17 @@ Page({
*/
onSubmitHandler
()
{
this
.
checkSubmit
().
then
((
result
)
=>
{
let
valTotal
=
0
;
let
myWishList
=
this
.
data
.
myWishList
;
let
valElasticTotal
=
0
;
myWishList
.
forEach
(
element
=>
{
valElasticTotal
+=
element
.
conditionElasticValue
});
this
.
setData
({
tipsWishVisible
:
true
tipsWishVisible
:
true
,
valElasticTotal
:
valElasticTotal
})
console
.
log
(
"wish:"
,
this
.
data
.
myWishList
);
console
.
log
(
"wish:"
,
this
.
data
.
myWishList
);
}).
catch
((
err
)
=>
{});;
},
// billCode
...
...
src/pages/create-wish/create-wish.wxml
View file @
6ea0086
...
...
@@ -65,7 +65,7 @@
<tips-new-comp bind:evtcomp="evtcomp" user-info="{{userInfo}}"></tips-new-comp>
</van-popup>
<van-popup show="{{ tipsWishVisible }}">
<tips-wish-comp bind:evtcomp="evtcomp" wish-list="{{myWishList}}"></tips-wish-comp>
<tips-wish-comp bind:evtcomp="evtcomp" wish-list="{{myWishList}}"
ele-val="{{valElasticTotal}}"
></tips-wish-comp>
</van-popup>
<van-popup show="{{ tipsShakeVisible }}">
<tips-shake-comp bind:evtcomp="evtcomp"></tips-shake-comp>
...
...
Please
register
or
sign in
to post a comment