Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c8d39dde
authored
Sep 02, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
福利
parent
8ef2db1e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
12 deletions
pages/person/welfare/index.js
pages/person/welfare/index.wxml
pages/search/result/index.js
project.config.json
pages/person/welfare/index.js
View file @
c8d39dde
// pages/person/welfare/index.js
const
http
=
require
(
'../../../utils/util.js'
);
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
integralsList
:
{},
integral
:
''
,
code
:
''
},
/**
...
...
@@ -26,7 +33,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
getData
();
},
/**
...
...
@@ -56,4 +63,54 @@ Page({
onReachBottom
:
function
()
{
},
/**
* 获取数据
*/
getData
:
function
()
{
http
.
getData
(
apis
.
integralsList
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
integralsList
:
res
.
data
,
integral
:
res
.
integral
,
code
:
res
.
code
});
}
},
true
,
false
,
true
);
},
/**
* 跳转地址
*/
toUrl
:
function
(
e
)
{
let
id
=
e
.
currentTarget
.
dataset
.
id
;
if
(
id
==
1
)
{
wx
.
navigateTo
({
url
:
"/pages/person/invitation/index"
})
}
else
if
(
id
==
2
)
{
wx
.
navigateTo
({
url
:
"/pages/form/good/index"
})
}
else
if
(
id
==
3
)
{
wx
.
navigateTo
({
url
:
"/pages/person/packet/index"
})
}
else
if
(
id
==
4
)
{
}
else
if
(
id
==
5
)
{
wx
.
navigateTo
({
url
:
"/pages/form/xj/index"
})
}
else
if
(
id
==
6
)
{
wx
.
navigateTo
({
url
:
"/pages/list/signin/index"
})
}
}
})
\ No newline at end of file
pages/person/welfare/index.wxml
View file @
c8d39dde
...
...
@@ -6,27 +6,44 @@
<text class="t1">我的红包</text>
</view>
<view class="num">
<text class="t1">
10.93
</text>
<text class="t1">
{{integral}}
</text>
<text class="t2">元</text>
</view>
<view class="code-text">
<text class="t1">红包码:</text>
<text class="t2">
RDD23423
</text>
<text class="t2">
{{code}}
</text>
</view>
</view>
<view class="column">
<text class="rule">查看规则</text>
<view class="exchange row verCenter ">
<
text class="t1">兑换记录</text
>
<
view
class="t2 row verCenter rowCenter">
<
navigator url="/pages/person/exchange/index" class="t1">兑换记录</navigator
>
<
navigator url="/pages/person/withdrawal/index"
class="t2 row verCenter rowCenter">
<text class="icon iconfont iconiconxiantiaoshouji28"></text>
<text>提现兑换</text>
</
view
>
</
navigator
>
</view>
</view>
</view>
<view class="list">
<view class="list-wrap row verCenter bothSide bor">
<block wx:for="{{integralsList}}" wx:for-item="item" wx:for-index="index">
<view class="list-wrap row verCenter bothSide bor">
<view>
<view>
<text class="t1">{{item.name}}</text>
<text wx:if="{{item.tips}}" class="icon iconfont iconiconxiantiaoshouji27"></text>
<text class="t2">{{item.tips}}</text>
</view>
<view>
<text class="t3">{{item.description}}</text>
</view>
</view>
<view bind:tap="toUrl" data-id="{{item.id}}" wx:if="{{item.button_text}}" class="btn blue {{index > 2 ? 'yellow':''}}">
{{item.button_text}}
</view>
</view>
</block>
<!-- <view class="list-wrap row verCenter bothSide bor">
<view>
<view>
<text class="t1">邀请好友</text>
...
...
@@ -98,6 +115,6 @@
</view>
</view>
<view class="btn yellow">去报价</view>
</view>
</view>
-->
</view>
</view>
\ No newline at end of file
pages/search/result/index.js
View file @
c8d39dde
...
...
@@ -136,39 +136,54 @@ Page({
this
.
getData
()
}
},
getData
:
function
()
{
getData
:
function
()
{
let
me
=
this
;
let
url
,
token
=
wx
.
getStorageSync
(
'access_token'
);
let
str
=
""
;
let
params
=
{
offset
:
me
.
data
.
limit
,
p
:
me
.
data
.
p
,
"goods_name/like"
:
me
.
data
.
confirmKey
};
if
(
me
.
data
.
tabIndex
==
1
)
{
url
=
apis
.
goodsSearch
str
=
"goods_list"
}
else
{
url
=
apis
.
inquirySearch
;
str
=
"inquiry_list"
}
if
(
token
)
{
params
.
token
=
token
}
getData
(
url
,
'get'
,
params
,
function
(
res
)
{
getData
(
url
,
'get'
,
params
,
function
(
res
)
{
if
(
res
.
errcode
===
0
)
{
let
newArr
=
[];
if
(
me
.
data
.
p
>
1
)
{
newArr
=
me
.
data
.
priceList
;
}
for
(
let
key
in
res
[
str
])
{
newArr
.
push
(
res
[
str
][
key
])
}
me
.
setData
({
priceList
:
newArr
,
total
:
res
.
total
,
});
}
else
{
if
(
me
.
data
.
p
==
1
)
{
me
.
setData
({
priceList
:
[]
...
...
project.config.json
View file @
c8d39dde
...
...
@@ -65,6 +65,13 @@
"id"
:
-1
,
"name"
:
"pages/list/signin/index"
,
"pathName"
:
"pages/list/signin/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/welfare/index"
,
"pathName"
:
"pages/person/welfare/index"
,
"scene"
:
null
}
]
...
...
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