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
56bcdbd6
authored
Sep 09, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
777a7291
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
146 additions
and
46 deletions
pages/person/exchange/index.js
pages/person/exchange/index.wxml
pages/person/helpfriend/index.js
pages/person/helpfriend/index.less
pages/person/helpfriend/index.wxml
pages/person/helpfriend/index.wxss
project.config.json
pages/person/exchange/index.js
View file @
56bcdbd6
// pages/person/exchange/index.js
const
http
=
require
(
'../../../utils/util.js'
);
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
tabIndex
:
1
tabIndex
:
1
,
integralBillsList
:
[]
},
/**
...
...
@@ -26,7 +32,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
getData
();
},
/**
...
...
@@ -57,18 +63,38 @@ Page({
},
/**
* 获取数据
*/
getData
:
function
(
url
,
type
)
{
http
.
getData
(
apis
.
integralBillsList
,
'GET'
,
null
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
integralBillsList
:
res
.
data
});
}
},
true
,
false
,
true
);
},
/**
* tab切换
*/
switchTab
:
function
(
e
)
{
let
i
=
e
.
currentTarget
.
dataset
.
index
;
if
(
i
==
this
.
data
.
tabIndex
)
{
return
;
}
else
{
console
.
log
(
i
)
this
.
setData
({
tabIndex
:
i
,
})
}
});
}
})
\ No newline at end of file
pages/person/exchange/index.wxml
View file @
56bcdbd6
...
...
@@ -11,36 +11,18 @@
</view>
<block wx:if="{{tabIndex == 1}}">
<view class="content">
<block wx:for="{{integralBillsList}}" wx:key="item">
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">首次上传库存奖励</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view>
<text class="t3">+</text>
<text class="t4">¥0.05</text>
</view>
</view>
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">首次上传库存奖励</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view>
<text class="t3">+</text>
<text class="t4">¥0.05</text>
</view>
</view>
<view class="list row verCenter bothSide boxsiz">
<view class="column">
<text class="t1">首次上传库存奖励</text>
<text class="t2">2019-05-10 10:15</text>
<text class="t1">{{item.name}}</text>
<text class="t2">{{item.add_time}}</text>
</view>
<view>
<text class="t3">+</text>
<text class="t4">¥0.05
</text>
<text class="t4">¥{{item.amount}}
</text>
</view>
</view>
</block>
</view>
</block>
<block wx:else>
...
...
@@ -50,9 +32,7 @@
<text class="t1">话费充值</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="t6">
15012479484
</view>
<view class="t6">15012479484</view>
<view class="column">
<text class="t5">¥50</text>
<text class="t2">充值成功</text>
...
...
@@ -63,9 +43,7 @@
<text class="t1">话费充值</text>
<text class="t2">2019-05-10 10:15</text>
</view>
<view class="t6">
15012479484
</view>
<view class="t6">15012479484</view>
<view class="column">
<text class="t5">¥50</text>
<text class="t2s">充值失败</text>
...
...
pages/person/helpfriend/index.js
View file @
56bcdbd6
...
...
@@ -10,6 +10,7 @@ Page({
* 页面的初始数据
*/
data
:
{
assistsList
:
''
,
exchange_id
:
''
},
...
...
@@ -62,6 +63,24 @@ Page({
},
/**
* 助力
*/
assistance
:
function
()
{
http
.
getData
(
apis
.
assistsAdd
,
'GET'
,
{
exchange_id
:
24
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
getData
();
}
else
{
wx
.
showToast
({
title
:
res
.
errmsg
,
icon
:
'none'
,
duration
:
2000
});
}
},
true
,
false
,
true
);
},
/**
* 获取数据
*/
getData
:
function
(
type
)
{
...
...
@@ -70,7 +89,9 @@ Page({
exchange_id
:
24
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
assistsList
:
res
.
data
});
}
},
true
,
false
,
true
);
...
...
pages/person/helpfriend/index.less
View file @
56bcdbd6
...
...
@@ -89,6 +89,19 @@
text-align: center;
line-height: 80rpx;
}
.btn_1 {
margin: 168rpx auto 0;
width: 380rpx;
height: 80rpx;
background-image: linear-gradient(0deg, #dd1b33 0%, #e9196c 100%);
box-shadow: 0px 6rpx 0px 0px #cb0a3f, inset 0px 0px 10rpx 0px rgba(255, 255, 255, 0.26);
border-radius: 40rpx;
color: #ffffff;
font-size: 38rpx;
text-align: center;
line-height: 80rpx;
}
}
}
...
...
@@ -118,7 +131,7 @@
margin: 60rpx auto 0;
.list {
width: 10
1
rpx;
width: 10
0
rpx;
height: 100rpx;
background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff;
...
...
@@ -126,6 +139,19 @@
text-align: center;
line-height: 100rpx;
border-radius: 50%;
box-sizing: border-box;
&.list-pic {
border: solid 2px transparent;
background: none;
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
&:first-child {
margin-right: 59rpx;
...
...
pages/person/helpfriend/index.wxml
View file @
56bcdbd6
<view class="helpfriend">
<view class="wrap">
<view class="con">
<image class="im" src="
http://img.ichunt.com/images/ichunt/minProgram/4c42da6667beedcd6688f504138fa3be.jpg
"></image>
<text class="t1">
深圳市猎芯科技有限公司
</text>
<image class="im" src="
{{assistsList.user_info.avatar}}
"></image>
<text class="t1">
{{assistsList.user_info.company_name}}
</text>
<view class="t2">
我正在提现
<text>
5
元</text>
<text>
{{assistsList.amount}}
元</text>
现金红包,
</view>
<text class="t3">请帮我助力吧! 谢谢!</text>
<button class="btn">分享给好友</button>
<block wx:if="{{assistsList.need_assist_count > 0 }}">
<button class="btn_1" bind:tap="assistance">助力好友</button>
</block>
<block wx:else>
<button class="btn">助力成功,我也要红包</button>
</block>
<view class="t4">
还需
<text>
1
人</text>
<text>
{{assistsList.need_assist_count}}
人</text>
助力
</view>
</view>
...
...
@@ -20,9 +25,23 @@
<view class="bar">
<text class="t1">*助力好友需要登录后,才能帮助好友助力</text>
<view class="bg">助力记录</view>
<view class="pic row rowCenter">
<view class="pic row verCenter rowCenter">
<block wx:if="{{assistsList.assist_list.length > 0 && assistsList.assist_list[0]}}">
<view class="list list-pic row verCenter">
<image src="{{assistsList.assist_list[0].assist_user_avatar}}"></image>
</view>
</block>
<block wx:else>
<view class="list">?</view>
</block>
<block wx:if="{{assistsList.assist_list.length > 0 && assistsList.assist_list[1]}}">
<view class="list list-pic row verCenter">
<image src="{{assistsList.assist_list[1].assist_user_avatar}}"></image>
</view>
</block>
<block wx:else>
<view class="list">?</view>
</block>
</view>
<view class="bg">活动规则</view>
</view>
...
...
pages/person/helpfriend/index.wxss
View file @
56bcdbd6
...
...
@@ -81,6 +81,18 @@
text-align: center;
line-height: 80rpx;
}
.helpfriend .wrap .con .btn_1 {
margin: 168rpx auto 0;
width: 380rpx;
height: 80rpx;
background-image: linear-gradient(0deg, #dd1b33 0%, #e9196c 100%);
box-shadow: 0px 6rpx 0px 0px #cb0a3f, inset 0px 0px 10rpx 0px rgba(255, 255, 255, 0.26);
border-radius: 40rpx;
color: #ffffff;
font-size: 38rpx;
text-align: center;
line-height: 80rpx;
}
.helpfriend .bar {
padding-top: 155rpx;
text-align: center;
...
...
@@ -105,7 +117,7 @@
margin: 60rpx auto 0;
}
.helpfriend .bar .pic .list {
width: 10
1
rpx;
width: 10
0
rpx;
height: 100rpx;
background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff;
...
...
@@ -113,6 +125,16 @@
text-align: center;
line-height: 100rpx;
border-radius: 50%;
box-sizing: border-box;
}
.helpfriend .bar .pic .list.list-pic {
border: solid 2px transparent;
background: none;
}
.helpfriend .bar .pic .list.list-pic image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
.helpfriend .bar .pic .list:first-child {
margin-right: 59rpx;
...
...
project.config.json
View file @
56bcdbd6
...
...
@@ -107,6 +107,13 @@
"id"
:
-1
,
"name"
:
"pages/person/helpfriend/index"
,
"pathName"
:
"pages/person/helpfriend/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/person/exchange/index"
,
"pathName"
:
"pages/person/exchange/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