Commit 2192c2a1 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsalesProgram

parents 9a4c0652 b0187041
// pages/person/exchange/index.js const http = require('../../../utils/util.js');
import {
apis
} from '../../../utils/api.js';
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
tabIndex: 1 tabIndex: 1,
integralBillsList: [],
userExchanges: []
}, },
/** /**
...@@ -26,7 +33,7 @@ Page({ ...@@ -26,7 +33,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.getData();
}, },
/** /**
...@@ -57,18 +64,61 @@ Page({ ...@@ -57,18 +64,61 @@ Page({
}, },
/** /**
* 获取数据
*/
getData: function () {
let url = '';
if (this.data.tabIndex == 1) {
url = apis.integralBillsList;
} else if (this.data.tabIndex == 2) {
url = apis.userExchangesList;
}
http.getData(url, 'GET', null, (res) => {
if (res.errcode === 0) {
if (this.data.tabIndex == 1) {
this.setData({
integralBillsList: res.data
});
} else if (this.data.tabIndex == 2) {
this.setData({
userExchanges: res.data
});
}
}
}, true, false, true);
},
/**
* tab切换 * tab切换
*/ */
switchTab: function (e) { switchTab: function (e) {
let i = e.currentTarget.dataset.index; let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) { this.setData({
return; tabIndex: i,
} else { });
this.setData({
tabIndex: i, this.getData();
})
} },
/**
* 跳转地址
*/
toUrl: function () {
wx.navigateTo({
url: '/pages/person/withdrawal/index'
});
} }
}) })
\ No newline at end of file
...@@ -17,10 +17,11 @@ ...@@ -17,10 +17,11 @@
font-size: 22rpx; font-size: 22rpx;
line-height: 30rpx; line-height: 30rpx;
} }
.t2s{
.t2s {
color: #EA1717; color: #EA1717;
font-size: 22rpx; font-size: 22rpx;
line-height: 30rpx; line-height: 30rpx;
} }
.t3 { .t3 {
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
font-size: 24rpx; font-size: 24rpx;
color: #8A9299; color: #8A9299;
} }
} }
} }
......
...@@ -11,69 +11,46 @@ ...@@ -11,69 +11,46 @@
</view> </view>
<block wx:if="{{tabIndex == 1}}"> <block wx:if="{{tabIndex == 1}}">
<view class="content"> <view class="content">
<view class="list row verCenter bothSide boxsiz"> <block wx:for="{{integralBillsList}}" wx:key="item">
<view class="column"> <view class="list row verCenter bothSide boxsiz">
<text class="t1">首次上传库存奖励</text> <view class="column">
<text class="t2">2019-05-10 10:15</text> <text class="t1">{{item.name}}</text>
</view> <text class="t2">{{item.add_time}}</text>
<view> </view>
<text class="t3">+</text> <view>
<text class="t4">¥0.05</text> <text class="t3">+</text>
</view> <text class="t4">¥{{item.amount}}</text>
</view> </view>
<view class="list row verCenter bothSide boxsiz"> </view>
<view class="column"> </block>
<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> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="content"> <view class="content">
<view class="list row verCenter bothSide boxsiz"> <block wx:for="{{userExchanges}}" wx:key="item">
<view class="column"> <view class="list row verCenter bothSide boxsiz">
<text class="t1">话费充值</text> <view class="column">
<text class="t2">2019-05-10 10:15</text> <text class="t1">{{item.type}}</text>
</view> <text class="t2">{{item.add_time}}</text>
<view class="t6"> </view>
15012479484 <view class="t6">{{item.mobile}}</view>
</view> <view class="column">
<view class="column"> <text class="t5">¥{{item.amount}}</text>
<text class="t5">¥50</text> <block wx:if="{{item.status == 1}}">
<text class="t2">充值成功</text> <text class="t2">充值成功</text>
</view> </block>
</view> <block wx:elif="{{item.status == 0}}">
<view class="list row verCenter bothSide boxsiz"> <text class="t2">审核中</text>
<view class="column"> </block>
<text class="t1">话费充值</text> <block wx:else>
<text class="t2">2019-05-10 10:15</text> <text class="t2s">充值失败</text>
</view> </block>
<view class="t6"> </view>
15012479484 </view>
</view> </block>
<view class="column">
<text class="t5">¥50</text>
<text class="t2s">充值失败</text>
</view>
</view>
</view> </view>
</block> </block>
<view class="btn"> <view class="btn" bind:tap="toUrl">
<text class="icon iconfont iconiconxiantiaoshouji28"></text> <text class="icon iconfont iconiconxiantiaoshouji28"></text>
<text class="t1">提现兑换</text> <text class="t1">提现兑换</text>
</view> </view>
......
...@@ -10,6 +10,7 @@ Page({ ...@@ -10,6 +10,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
assistsList: '',
exchange_id: '' exchange_id: ''
}, },
...@@ -62,6 +63,24 @@ Page({ ...@@ -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) { getData: function (type) {
...@@ -70,7 +89,9 @@ Page({ ...@@ -70,7 +89,9 @@ Page({
exchange_id: 24 exchange_id: 24
}, (res) => { }, (res) => {
if (res.errcode === 0) { if (res.errcode === 0) {
this.setData({
assistsList: res.data
});
} }
}, true, false, true); }, true, false, true);
......
...@@ -89,6 +89,19 @@ ...@@ -89,6 +89,19 @@
text-align: center; text-align: center;
line-height: 80rpx; 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 @@ ...@@ -118,7 +131,7 @@
margin: 60rpx auto 0; margin: 60rpx auto 0;
.list { .list {
width: 101rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background: rgba(5, 5, 5, 0.2); background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff; border: dashed 2px #ffffff;
...@@ -126,6 +139,19 @@ ...@@ -126,6 +139,19 @@
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
border-radius: 50%; 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 { &:first-child {
margin-right: 59rpx; margin-right: 59rpx;
......
<view class="helpfriend"> <view class="helpfriend">
<view class="wrap"> <view class="wrap">
<view class="con"> <view class="con">
<image class="im" src="http://img.ichunt.com/images/ichunt/minProgram/4c42da6667beedcd6688f504138fa3be.jpg"></image> <image class="im" src="{{assistsList.user_info.avatar}}"></image>
<text class="t1">深圳市猎芯科技有限公司</text> <text class="t1">{{assistsList.user_info.company_name}}</text>
<view class="t2"> <view class="t2">
我正在提现 我正在提现
<text>5元</text> <text>{{assistsList.amount}}元</text>
现金红包, 现金红包,
</view> </view>
<text class="t3">请帮我助力吧! 谢谢!</text> <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"> <view class="t4">
还需 还需
<text>1人</text> <text>{{assistsList.need_assist_count}}人</text>
助力 助力
</view> </view>
</view> </view>
...@@ -20,9 +25,23 @@ ...@@ -20,9 +25,23 @@
<view class="bar"> <view class="bar">
<text class="t1">*助力好友需要登录后,才能帮助好友助力</text> <text class="t1">*助力好友需要登录后,才能帮助好友助力</text>
<view class="bg">助力记录</view> <view class="bg">助力记录</view>
<view class="pic row rowCenter"> <view class="pic row verCenter rowCenter">
<view class="list">?</view> <block wx:if="{{assistsList.assist_list.length > 0 && assistsList.assist_list[0]}}">
<view class="list">?</view> <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>
<view class="bg">活动规则</view> <view class="bg">活动规则</view>
</view> </view>
......
...@@ -81,6 +81,18 @@ ...@@ -81,6 +81,18 @@
text-align: center; text-align: center;
line-height: 80rpx; 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 { .helpfriend .bar {
padding-top: 155rpx; padding-top: 155rpx;
text-align: center; text-align: center;
...@@ -105,7 +117,7 @@ ...@@ -105,7 +117,7 @@
margin: 60rpx auto 0; margin: 60rpx auto 0;
} }
.helpfriend .bar .pic .list { .helpfriend .bar .pic .list {
width: 101rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background: rgba(5, 5, 5, 0.2); background: rgba(5, 5, 5, 0.2);
border: dashed 2px #ffffff; border: dashed 2px #ffffff;
...@@ -113,6 +125,16 @@ ...@@ -113,6 +125,16 @@
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
border-radius: 50%; 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 { .helpfriend .bar .pic .list:first-child {
margin-right: 59rpx; margin-right: 59rpx;
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 8, "current": 0,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -91,37 +91,29 @@ ...@@ -91,37 +91,29 @@
}, },
{ {
"id": -1, "id": -1,
"name": "pages/person/company/index", "name": "pages/person/invitationrecord/index",
"pathName": "pages/person/company/index", "pathName": "pages/person/invitationrecord/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1, "id": -1,
"name": "pages/person/editcompany/index", "name": "pages/person/packet/index",
"pathName": "pages/person/editcompany/index", "pathName": "pages/person/packet/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1, "id": -1,
"name": "pages/person/notice/index", "name": "pages/person/helpfriend/index",
"pathName": "pages/person/notice/index", "pathName": "pages/person/helpfriend/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1, "id": -1,
"name": "pages/person/privacy/index", "name": "pages/person/exchange/index",
"pathName": "pages/person/privacy/index", "pathName": "pages/person/exchange/index",
"query": "",
"scene": null
},
{
"id": 8,
"name": "pages/detail/company/index",
"pathName": "pages/detail/company/index",
"query": "type=2&userId=93",
"scene": null "scene": null
} }
] ]
......
...@@ -282,7 +282,7 @@ const apis = { ...@@ -282,7 +282,7 @@ const apis = {
/** /**
* 兑换记录(话费充值, 微信转账) * 兑换记录(话费充值, 微信转账)
*/ */
userExchanges: welfare_url + '/user_exchanges/list', userExchangesList: welfare_url + '/user_exchanges/list',
/** /**
* 兑换配置列表(话费, 微信兑换页面的可兑换项) * 兑换配置列表(话费, 微信兑换页面的可兑换项)
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment